summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--src/devices/bus/a1bus/a1bus.cpp2
-rw-r--r--src/devices/bus/a1bus/a1cffa.cpp2
-rw-r--r--src/devices/bus/a2bus/a2bus.cpp8
-rw-r--r--src/devices/bus/a2bus/a2cffa.cpp2
-rw-r--r--src/devices/bus/a2bus/a2eauxslot.cpp2
-rw-r--r--src/devices/bus/a2bus/a2hsscsi.cpp12
-rw-r--r--src/devices/bus/a2bus/a2mcms.cpp8
-rw-r--r--src/devices/bus/a2bus/a2pic.cpp2
-rw-r--r--src/devices/bus/a2bus/a2scsi.cpp12
-rw-r--r--src/devices/bus/a2bus/a2ssc.cpp2
-rw-r--r--src/devices/bus/a2bus/a2vulcan.cpp2
-rw-r--r--src/devices/bus/a2bus/a2zipdrive.cpp2
-rw-r--r--src/devices/bus/a2bus/corvfdc01.cpp14
-rw-r--r--src/devices/bus/a2bus/corvfdc02.cpp12
-rw-r--r--src/devices/bus/a2bus/mouse.cpp4
-rw-r--r--src/devices/bus/a7800/a78_slot.cpp20
-rw-r--r--src/devices/bus/a7800/a78_slot.h4
-rw-r--r--src/devices/bus/a7800/hiscore.cpp2
-rw-r--r--src/devices/bus/a7800/xboard.cpp4
-rw-r--r--src/devices/bus/a800/a800_slot.cpp20
-rw-r--r--src/devices/bus/a800/a800_slot.h4
-rw-r--r--src/devices/bus/a800/a8sio.cpp6
-rw-r--r--src/devices/bus/abcbus/abc890.cpp80
-rw-r--r--src/devices/bus/abcbus/fd2.cpp4
-rw-r--r--src/devices/bus/abcbus/hdc.cpp2
-rw-r--r--src/devices/bus/abcbus/lux10828.cpp4
-rw-r--r--src/devices/bus/abcbus/lux21046.cpp6
-rw-r--r--src/devices/bus/abcbus/lux21056.cpp2
-rw-r--r--src/devices/bus/abcbus/turbo.cpp2
-rw-r--r--src/devices/bus/abckb/abckb.cpp4
-rw-r--r--src/devices/bus/adam/exp.cpp6
-rw-r--r--src/devices/bus/adam/exp.h2
-rw-r--r--src/devices/bus/adam/ide.cpp2
-rw-r--r--src/devices/bus/adamnet/adamnet.cpp6
-rw-r--r--src/devices/bus/adamnet/fdc.cpp4
-rw-r--r--src/devices/bus/adamnet/spi.cpp2
-rw-r--r--src/devices/bus/amiga/zorro/a2232.cpp18
-rw-r--r--src/devices/bus/amiga/zorro/buddha.cpp4
-rw-r--r--src/devices/bus/amiga/zorro/zorro.cpp24
-rw-r--r--src/devices/bus/apf/slot.cpp22
-rw-r--r--src/devices/bus/apf/slot.h2
-rw-r--r--src/devices/bus/apricot/expansion.cpp12
-rw-r--r--src/devices/bus/arcadia/slot.cpp16
-rw-r--r--src/devices/bus/arcadia/slot.h2
-rw-r--r--src/devices/bus/astrocde/slot.cpp22
-rw-r--r--src/devices/bus/astrocde/slot.h2
-rw-r--r--src/devices/bus/bml3/bml3bus.cpp6
-rw-r--r--src/devices/bus/bml3/bml3mp1802.cpp2
-rw-r--r--src/devices/bus/bml3/bml3mp1805.cpp4
-rw-r--r--src/devices/bus/bw2/exp.cpp14
-rw-r--r--src/devices/bus/c64/16kb.cpp4
-rw-r--r--src/devices/bus/c64/bn1541.cpp8
-rw-r--r--src/devices/bus/c64/dela_ep256.cpp16
-rw-r--r--src/devices/bus/c64/dela_ep64.cpp4
-rw-r--r--src/devices/bus/c64/dela_ep7x8.cpp14
-rw-r--r--src/devices/bus/c64/dqbb.h4
-rw-r--r--src/devices/bus/c64/exp.cpp18
-rw-r--r--src/devices/bus/c64/exp.h2
-rw-r--r--src/devices/bus/c64/fcc.h4
-rw-r--r--src/devices/bus/c64/ide64.cpp2
-rw-r--r--src/devices/bus/c64/ieee488.cpp2
-rw-r--r--src/devices/bus/c64/neoram.h4
-rw-r--r--src/devices/bus/c64/reu.cpp2
-rw-r--r--src/devices/bus/c64/rex_ep256.cpp16
-rw-r--r--src/devices/bus/c64/swiftlink.cpp2
-rw-r--r--src/devices/bus/c64/turbo232.cpp2
-rw-r--r--src/devices/bus/cbm2/exp.cpp6
-rw-r--r--src/devices/bus/cbm2/exp.h2
-rw-r--r--src/devices/bus/cbm2/user.h18
-rw-r--r--src/devices/bus/cbmiec/c1541.cpp4
-rw-r--r--src/devices/bus/cbmiec/c1571.cpp4
-rw-r--r--src/devices/bus/cbmiec/cbmiec.cpp20
-rw-r--r--src/devices/bus/cbmiec/interpod.cpp2
-rw-r--r--src/devices/bus/centronics/ctronics.cpp2
-rw-r--r--src/devices/bus/centronics/epson_lx810l.cpp2
-rw-r--r--src/devices/bus/cgenie/expansion/expansion.cpp6
-rw-r--r--src/devices/bus/cgenie/expansion/floppy.cpp8
-rw-r--r--src/devices/bus/cgenie/parallel/parallel.cpp2
-rw-r--r--src/devices/bus/chanf/slot.cpp22
-rw-r--r--src/devices/bus/chanf/slot.h2
-rw-r--r--src/devices/bus/coco/coco_dwsock.cpp14
-rw-r--r--src/devices/bus/coco/coco_fdc.cpp6
-rw-r--r--src/devices/bus/coco/coco_multi.cpp6
-rw-r--r--src/devices/bus/coco/cococart.cpp12
-rw-r--r--src/devices/bus/coco/cococart.h2
-rw-r--r--src/devices/bus/coleco/ctrl.h2
-rw-r--r--src/devices/bus/coleco/exp.cpp10
-rw-r--r--src/devices/bus/coleco/exp.h2
-rw-r--r--src/devices/bus/comx35/exp.cpp14
-rw-r--r--src/devices/bus/comx35/expbox.cpp34
-rw-r--r--src/devices/bus/comx35/fdc.cpp6
-rw-r--r--src/devices/bus/cpc/cpc_rom.cpp6
-rw-r--r--src/devices/bus/cpc/cpc_rom.h4
-rw-r--r--src/devices/bus/cpc/cpc_rs232.cpp4
-rw-r--r--src/devices/bus/cpc/cpc_ssa1.cpp4
-rw-r--r--src/devices/bus/cpc/ddi1.cpp2
-rw-r--r--src/devices/bus/cpc/mface2.cpp4
-rw-r--r--src/devices/bus/cpc/playcity.cpp2
-rw-r--r--src/devices/bus/cpc/symbfac2.cpp2
-rw-r--r--src/devices/bus/crvision/slot.cpp22
-rw-r--r--src/devices/bus/crvision/slot.h2
-rw-r--r--src/devices/bus/dmv/k210.cpp2
-rw-r--r--src/devices/bus/dmv/k801.cpp2
-rw-r--r--src/devices/bus/ecbbus/ecbbus.cpp28
-rw-r--r--src/devices/bus/ecbbus/grip.cpp2
-rw-r--r--src/devices/bus/econet/e01.cpp2
-rw-r--r--src/devices/bus/econet/econet.cpp14
-rw-r--r--src/devices/bus/ep64/exdos.cpp12
-rw-r--r--src/devices/bus/epson_sio/epson_sio.cpp4
-rw-r--r--src/devices/bus/epson_sio/pf10.cpp4
-rw-r--r--src/devices/bus/epson_sio/tf20.cpp6
-rw-r--r--src/devices/bus/gameboy/gb_slot.cpp32
-rw-r--r--src/devices/bus/gameboy/gb_slot.h2
-rw-r--r--src/devices/bus/gba/gba_slot.cpp28
-rw-r--r--src/devices/bus/gba/gba_slot.h2
-rw-r--r--src/devices/bus/generic/slot.cpp16
-rw-r--r--src/devices/bus/generic/slot.h6
-rw-r--r--src/devices/bus/ieee488/c2040fdc.cpp4
-rw-r--r--src/devices/bus/ieee488/c8050fdc.cpp4
-rw-r--r--src/devices/bus/ieee488/c8280.cpp4
-rw-r--r--src/devices/bus/ieee488/ieee488.cpp20
-rw-r--r--src/devices/bus/ieee488/shark.cpp2
-rw-r--r--src/devices/bus/ieee488/softbox.cpp2
-rw-r--r--src/devices/bus/imi7000/imi5000h.cpp2
-rw-r--r--src/devices/bus/intv/ecs.cpp4
-rw-r--r--src/devices/bus/intv/slot.cpp18
-rw-r--r--src/devices/bus/intv/slot.h2
-rw-r--r--src/devices/bus/intv/voice.cpp2
-rw-r--r--src/devices/bus/iq151/disc2.cpp4
-rw-r--r--src/devices/bus/iq151/iq151.cpp4
-rw-r--r--src/devices/bus/iq151/iq151.h4
-rw-r--r--src/devices/bus/isa/3c505.cpp4
-rw-r--r--src/devices/bus/isa/aga.cpp4
-rw-r--r--src/devices/bus/isa/cga.cpp10
-rw-r--r--src/devices/bus/isa/com.cpp4
-rw-r--r--src/devices/bus/isa/ega.cpp2
-rw-r--r--src/devices/bus/isa/hdc.cpp82
-rw-r--r--src/devices/bus/isa/ide.cpp2
-rw-r--r--src/devices/bus/isa/mda.cpp4
-rw-r--r--src/devices/bus/isa/mufdc.cpp4
-rw-r--r--src/devices/bus/isa/omti8621.cpp10
-rw-r--r--src/devices/bus/isa/pc1640_iga.cpp2
-rw-r--r--src/devices/bus/isa/pgc.cpp2
-rw-r--r--src/devices/bus/isa/s3virge.h2
-rw-r--r--src/devices/bus/isa/sblaster.cpp4
-rw-r--r--src/devices/bus/isa/sc499.cpp10
-rw-r--r--src/devices/bus/isa/sc499.h2
-rw-r--r--src/devices/bus/isa/side116.cpp2
-rw-r--r--src/devices/bus/isa/xtide.cpp2
-rw-r--r--src/devices/bus/isbx/isbx.h2
-rw-r--r--src/devices/bus/kc/d002.cpp28
-rw-r--r--src/devices/bus/kc/d004.cpp6
-rw-r--r--src/devices/bus/kc/kc.cpp6
-rw-r--r--src/devices/bus/kc/kc.h4
-rw-r--r--src/devices/bus/lpci/i82439tx.cpp6
-rw-r--r--src/devices/bus/lpci/pci.cpp22
-rw-r--r--src/devices/bus/lpci/southbridge.cpp4
-rw-r--r--src/devices/bus/macpds/pds_tpdfpd.cpp2
-rw-r--r--src/devices/bus/megadrive/ggenie.cpp2
-rw-r--r--src/devices/bus/megadrive/md_slot.cpp22
-rw-r--r--src/devices/bus/megadrive/md_slot.h2
-rw-r--r--src/devices/bus/megadrive/sk.cpp4
-rw-r--r--src/devices/bus/midi/midi.cpp2
-rw-r--r--src/devices/bus/msx_cart/ascii.cpp38
-rw-r--r--src/devices/bus/msx_cart/crossblaim.cpp10
-rw-r--r--src/devices/bus/msx_cart/disk.cpp14
-rw-r--r--src/devices/bus/msx_cart/fmpac.cpp2
-rw-r--r--src/devices/bus/msx_cart/fs_sr022.cpp2
-rw-r--r--src/devices/bus/msx_cart/halnote.cpp12
-rw-r--r--src/devices/bus/msx_cart/hfox.cpp2
-rw-r--r--src/devices/bus/msx_cart/holy_quran.cpp6
-rw-r--r--src/devices/bus/msx_cart/konami.cpp44
-rw-r--r--src/devices/bus/msx_cart/korean.cpp8
-rw-r--r--src/devices/bus/msx_cart/majutsushi.cpp8
-rw-r--r--src/devices/bus/msx_cart/msx_audio.cpp6
-rw-r--r--src/devices/bus/msx_cart/msx_audio_kb.cpp2
-rw-r--r--src/devices/bus/msx_cart/msxdos2.cpp2
-rw-r--r--src/devices/bus/msx_cart/rtype.cpp4
-rw-r--r--src/devices/bus/msx_cart/super_swangi.cpp2
-rw-r--r--src/devices/bus/msx_cart/superloderunner.cpp2
-rw-r--r--src/devices/bus/msx_cart/yamaha.cpp2
-rw-r--r--src/devices/bus/msx_slot/bunsetsu.cpp8
-rw-r--r--src/devices/bus/msx_slot/cartridge.cpp16
-rw-r--r--src/devices/bus/msx_slot/cartridge.h2
-rw-r--r--src/devices/bus/msx_slot/disk.cpp66
-rw-r--r--src/devices/bus/msx_slot/fs4600.cpp10
-rw-r--r--src/devices/bus/msx_slot/music.cpp8
-rw-r--r--src/devices/bus/msx_slot/panasonic08.cpp10
-rw-r--r--src/devices/bus/msx_slot/rom.cpp12
-rw-r--r--src/devices/bus/msx_slot/sony08.cpp16
-rw-r--r--src/devices/bus/nasbus/floppy.cpp10
-rw-r--r--src/devices/bus/nasbus/nasbus.cpp12
-rw-r--r--src/devices/bus/neogeo/banked_cart.cpp4
-rw-r--r--src/devices/bus/neogeo/bootleg_prot.cpp6
-rw-r--r--src/devices/bus/neogeo/cmc_prot.cpp18
-rw-r--r--src/devices/bus/neogeo/fatfury2_prot.cpp2
-rw-r--r--src/devices/bus/neogeo/neogeo_slot.cpp10
-rw-r--r--src/devices/bus/neogeo/neogeo_slot.h16
-rw-r--r--src/devices/bus/neogeo/pcm2_prot.cpp2
-rw-r--r--src/devices/bus/neogeo/pvc_prot.cpp2
-rw-r--r--src/devices/bus/neogeo/sbp_prot.cpp2
-rw-r--r--src/devices/bus/neogeo/sma_prot.cpp2
-rw-r--r--src/devices/bus/nes/aladdin.cpp4
-rw-r--r--src/devices/bus/nes/aladdin.h2
-rw-r--r--src/devices/bus/nes/datach.cpp2
-rw-r--r--src/devices/bus/nes/datach.h2
-rw-r--r--src/devices/bus/nes/disksys.cpp2
-rw-r--r--src/devices/bus/nes/ggenie.cpp2
-rw-r--r--src/devices/bus/nes/jaleco.cpp14
-rw-r--r--src/devices/bus/nes/karastudio.cpp2
-rw-r--r--src/devices/bus/nes/karastudio.h2
-rw-r--r--src/devices/bus/nes/mmc5.cpp4
-rw-r--r--src/devices/bus/nes/nes_ines.inc4
-rw-r--r--src/devices/bus/nes/nes_pcb.inc34
-rw-r--r--src/devices/bus/nes/nes_slot.cpp18
-rw-r--r--src/devices/bus/nes/nes_slot.h2
-rw-r--r--src/devices/bus/nes/nes_unif.inc4
-rw-r--r--src/devices/bus/nes/pt554.cpp2
-rw-r--r--src/devices/bus/nes/sunsoft_dcs.cpp4
-rw-r--r--src/devices/bus/nes/sunsoft_dcs.h2
-rw-r--r--src/devices/bus/nes_ctrl/joypad.cpp2
-rw-r--r--src/devices/bus/nubus/nubus_48gc.cpp4
-rw-r--r--src/devices/bus/nubus/nubus_image.cpp20
-rw-r--r--src/devices/bus/nubus/nubus_m2hires.cpp2
-rw-r--r--src/devices/bus/nubus/nubus_m2video.cpp2
-rw-r--r--src/devices/bus/nubus/nubus_radiustpd.cpp2
-rw-r--r--src/devices/bus/nubus/nubus_spec8.cpp2
-rw-r--r--src/devices/bus/nubus/nubus_specpdq.cpp2
-rw-r--r--src/devices/bus/nubus/nubus_wsportrait.cpp2
-rw-r--r--src/devices/bus/nubus/pds30_30hr.cpp2
-rw-r--r--src/devices/bus/nubus/pds30_cb264.cpp2
-rw-r--r--src/devices/bus/nubus/pds30_mc30.cpp2
-rw-r--r--src/devices/bus/nubus/pds30_procolor816.cpp2
-rw-r--r--src/devices/bus/nubus/pds30_sigmalview.cpp2
-rw-r--r--src/devices/bus/odyssey2/slot.cpp22
-rw-r--r--src/devices/bus/odyssey2/slot.h2
-rw-r--r--src/devices/bus/odyssey2/voice.cpp2
-rw-r--r--src/devices/bus/oricext/jasmin.cpp12
-rw-r--r--src/devices/bus/oricext/microdisc.cpp6
-rw-r--r--src/devices/bus/oricext/oricext.cpp2
-rw-r--r--src/devices/bus/pc_joy/pc_joy_sw.cpp2
-rw-r--r--src/devices/bus/pc_kbd/pc_kbdc.cpp6
-rw-r--r--src/devices/bus/pce/pce_slot.cpp24
-rw-r--r--src/devices/bus/pce/pce_slot.h2
-rw-r--r--src/devices/bus/pet/cass.cpp8
-rw-r--r--src/devices/bus/pet/exp.cpp6
-rw-r--r--src/devices/bus/pet/superpet.cpp2
-rw-r--r--src/devices/bus/pet/user.cpp40
-rw-r--r--src/devices/bus/plus4/exp.cpp6
-rw-r--r--src/devices/bus/plus4/exp.h2
-rw-r--r--src/devices/bus/plus4/sid.cpp2
-rw-r--r--src/devices/bus/psx/memcard.h2
-rw-r--r--src/devices/bus/psx/multitap.cpp6
-rw-r--r--src/devices/bus/ql/cst_q_plus4.cpp8
-rw-r--r--src/devices/bus/ql/qubide.cpp2
-rw-r--r--src/devices/bus/ql/rom.cpp2
-rw-r--r--src/devices/bus/ql/rom.h2
-rw-r--r--src/devices/bus/ql/sandy_superdisk.cpp6
-rw-r--r--src/devices/bus/ql/sandy_superqboard.cpp6
-rw-r--r--src/devices/bus/ql/trumpcard.cpp6
-rw-r--r--src/devices/bus/rs232/null_modem.cpp2
-rw-r--r--src/devices/bus/rs232/pty.cpp2
-rw-r--r--src/devices/bus/rs232/rs232.cpp4
-rw-r--r--src/devices/bus/s100/dj2db.cpp10
-rw-r--r--src/devices/bus/s100/wunderbus.cpp4
-rw-r--r--src/devices/bus/saturn/sat_slot.cpp10
-rw-r--r--src/devices/bus/saturn/sat_slot.h2
-rw-r--r--src/devices/bus/scsi/scsi.cpp38
-rw-r--r--src/devices/bus/scsi/scsihle.cpp10
-rw-r--r--src/devices/bus/scv/slot.cpp24
-rw-r--r--src/devices/bus/scv/slot.h2
-rw-r--r--src/devices/bus/sega8/ccatch.cpp2
-rw-r--r--src/devices/bus/sega8/mgear.cpp2
-rw-r--r--src/devices/bus/sega8/sega8_slot.cpp28
-rw-r--r--src/devices/bus/sega8/sega8_slot.h2
-rw-r--r--src/devices/bus/sms_exp/gender.cpp2
-rw-r--r--src/devices/bus/snes/bsx.cpp2
-rw-r--r--src/devices/bus/snes/sdd1.cpp12
-rw-r--r--src/devices/bus/snes/sgb.cpp2
-rw-r--r--src/devices/bus/snes/snes_slot.cpp34
-rw-r--r--src/devices/bus/snes/snes_slot.h2
-rw-r--r--src/devices/bus/snes/spc7110.cpp10
-rw-r--r--src/devices/bus/snes/sufami.cpp4
-rw-r--r--src/devices/bus/ti99_peb/bwg.cpp36
-rw-r--r--src/devices/bus/ti99_peb/hfdc.cpp52
-rw-r--r--src/devices/bus/ti99_peb/horizon.cpp4
-rw-r--r--src/devices/bus/ti99_peb/memex.cpp6
-rw-r--r--src/devices/bus/ti99_peb/myarcmem.cpp2
-rw-r--r--src/devices/bus/ti99_peb/pcode.cpp4
-rw-r--r--src/devices/bus/ti99_peb/peribox.cpp28
-rw-r--r--src/devices/bus/ti99_peb/samsmem.cpp4
-rw-r--r--src/devices/bus/ti99_peb/ti_32kmem.cpp2
-rw-r--r--src/devices/bus/ti99_peb/ti_fdc.cpp18
-rw-r--r--src/devices/bus/ti99_peb/ti_rs232.cpp8
-rw-r--r--src/devices/bus/ti99_peb/ti_rs232.h4
-rw-r--r--src/devices/bus/ti99_peb/tn_ide.cpp4
-rw-r--r--src/devices/bus/ti99x/990_dk.cpp8
-rw-r--r--src/devices/bus/ti99x/990_hd.cpp10
-rw-r--r--src/devices/bus/ti99x/990_tap.cpp4
-rw-r--r--src/devices/bus/ti99x/998board.cpp32
-rw-r--r--src/devices/bus/ti99x/datamux.cpp20
-rw-r--r--src/devices/bus/ti99x/genboard.cpp4
-rw-r--r--src/devices/bus/ti99x/grom.cpp2
-rw-r--r--src/devices/bus/ti99x/gromport.cpp212
-rw-r--r--src/devices/bus/ti99x/gromport.h12
-rw-r--r--src/devices/bus/tvc/hbf.cpp2
-rw-r--r--src/devices/bus/vboy/slot.cpp18
-rw-r--r--src/devices/bus/vboy/slot.h2
-rw-r--r--src/devices/bus/vc4000/slot.cpp22
-rw-r--r--src/devices/bus/vc4000/slot.h2
-rw-r--r--src/devices/bus/vcs/dpc.cpp8
-rwxr-xr-xsrc/devices/bus/vcs/vcs_slot.cpp26
-rwxr-xr-xsrc/devices/bus/vcs/vcs_slot.h2
-rw-r--r--src/devices/bus/vcs_ctrl/ctrl.h2
-rw-r--r--src/devices/bus/vectrex/slot.cpp14
-rw-r--r--src/devices/bus/vectrex/slot.h2
-rw-r--r--src/devices/bus/vic10/exp.cpp14
-rw-r--r--src/devices/bus/vic10/exp.h2
-rw-r--r--src/devices/bus/vic20/exp.cpp6
-rw-r--r--src/devices/bus/vic20/exp.h2
-rw-r--r--src/devices/bus/vic20/std.cpp8
-rw-r--r--src/devices/bus/vic20/vic1010.cpp12
-rw-r--r--src/devices/bus/vic20/vic1011.cpp2
-rw-r--r--src/devices/bus/vic20/vic1112.cpp2
-rw-r--r--src/devices/bus/vidbrain/exp.cpp6
-rw-r--r--src/devices/bus/vidbrain/exp.h2
-rw-r--r--src/devices/bus/vip/byteio.cpp10
-rw-r--r--src/devices/bus/vip/exp.cpp26
-rw-r--r--src/devices/bus/vip/vp575.cpp62
-rw-r--r--src/devices/bus/vtech/ioexp/ioexp.cpp4
-rw-r--r--src/devices/bus/vtech/memexp/floppy.cpp4
-rw-r--r--src/devices/bus/vtech/memexp/memexp.cpp6
-rw-r--r--src/devices/bus/vtech/memexp/rs232.cpp2
-rw-r--r--src/devices/bus/wangpc/rtc.cpp2
-rw-r--r--src/devices/bus/wswan/slot.cpp22
-rw-r--r--src/devices/bus/wswan/slot.h2
-rw-r--r--src/devices/bus/z88/z88.cpp4
-rw-r--r--src/devices/bus/z88/z88.h4
-rw-r--r--src/devices/cpu/8x300/8x300.h2
-rw-r--r--src/devices/cpu/adsp2100/adsp2100.cpp8
-rw-r--r--src/devices/cpu/alph8201/8201dasm.cpp6
-rw-r--r--src/devices/cpu/alph8201/alph8201.h2
-rw-r--r--src/devices/cpu/alto2/a2curt.cpp6
-rw-r--r--src/devices/cpu/alto2/a2dht.cpp6
-rw-r--r--src/devices/cpu/alto2/a2disk.cpp2
-rw-r--r--src/devices/cpu/alto2/a2disp.cpp6
-rw-r--r--src/devices/cpu/alto2/a2dvt.cpp4
-rw-r--r--src/devices/cpu/alto2/a2dwt.cpp4
-rw-r--r--src/devices/cpu/alto2/a2emu.cpp36
-rw-r--r--src/devices/cpu/alto2/a2ether.cpp2
-rw-r--r--src/devices/cpu/alto2/a2hw.cpp4
-rw-r--r--src/devices/cpu/alto2/a2ksec.cpp44
-rw-r--r--src/devices/cpu/alto2/a2kwd.cpp38
-rw-r--r--src/devices/cpu/alto2/a2mem.cpp46
-rw-r--r--src/devices/cpu/alto2/a2mouse.cpp2
-rw-r--r--src/devices/cpu/alto2/a2mrt.cpp2
-rw-r--r--src/devices/cpu/alto2/a2ram.cpp10
-rw-r--r--src/devices/cpu/alto2/a2roms.cpp4
-rw-r--r--src/devices/cpu/alto2/alto2cpu.cpp20
-rw-r--r--src/devices/cpu/am29000/am29000.h2
-rw-r--r--src/devices/cpu/amis2000/amis2000.h4
-rw-r--r--src/devices/cpu/amis2000/amis2000op.cpp2
-rw-r--r--src/devices/cpu/apexc/apexc.h2
-rw-r--r--src/devices/cpu/arc/arc.h2
-rw-r--r--src/devices/cpu/arcompact/arcompact.cpp4
-rw-r--r--src/devices/cpu/arcompact/arcompact.h2
-rw-r--r--src/devices/cpu/arm/arm.cpp12
-rw-r--r--src/devices/cpu/arm/arm.h2
-rw-r--r--src/devices/cpu/arm7/arm7.h2
-rw-r--r--src/devices/cpu/arm7/arm7drc.inc28
-rw-r--r--src/devices/cpu/arm7/arm7ops.cpp4
-rw-r--r--src/devices/cpu/arm7/lpc210x.cpp2
-rw-r--r--src/devices/cpu/asap/asap.cpp6
-rw-r--r--src/devices/cpu/avr8/avr8.cpp18
-rw-r--r--src/devices/cpu/ccpu/ccpu.h2
-rw-r--r--src/devices/cpu/cop400/cop400.cpp12
-rw-r--r--src/devices/cpu/cop400/cop400.h2
-rw-r--r--src/devices/cpu/cosmac/cosmac.cpp12
-rw-r--r--src/devices/cpu/cp1610/1610dasm.cpp2
-rw-r--r--src/devices/cpu/cp1610/cp1610.h2
-rw-r--r--src/devices/cpu/cubeqcpu/cubeqcpu.cpp4
-rw-r--r--src/devices/cpu/cubeqcpu/cubeqcpu.h6
-rw-r--r--src/devices/cpu/drcbec.cpp6
-rw-r--r--src/devices/cpu/drcbeut.cpp44
-rw-r--r--src/devices/cpu/drcbex64.cpp68
-rw-r--r--src/devices/cpu/drcbex64.h2
-rw-r--r--src/devices/cpu/drcbex86.cpp100
-rw-r--r--src/devices/cpu/drcbex86.h2
-rw-r--r--src/devices/cpu/drccache.cpp30
-rw-r--r--src/devices/cpu/drccache.h4
-rw-r--r--src/devices/cpu/drcfe.cpp32
-rw-r--r--src/devices/cpu/drcuml.cpp34
-rw-r--r--src/devices/cpu/drcuml.h6
-rw-r--r--src/devices/cpu/dsp16/dsp16.cpp8
-rw-r--r--src/devices/cpu/dsp16/dsp16ops.inc18
-rw-r--r--src/devices/cpu/dsp32/dsp32.cpp6
-rw-r--r--src/devices/cpu/dsp56k/dsp56k.h2
-rw-r--r--src/devices/cpu/dsp56k/dsp56ops.inc236
-rw-r--r--src/devices/cpu/dsp56k/inst.cpp4
-rw-r--r--src/devices/cpu/dsp56k/pmove.cpp2
-rw-r--r--src/devices/cpu/e0c6200/e0c6200.h2
-rw-r--r--src/devices/cpu/e0c6200/e0c6s46.cpp2
-rw-r--r--src/devices/cpu/e132xs/e132xs.cpp4
-rw-r--r--src/devices/cpu/es5510/es5510.cpp6
-rw-r--r--src/devices/cpu/esrip/esrip.cpp4
-rw-r--r--src/devices/cpu/f8/f8.h2
-rw-r--r--src/devices/cpu/g65816/g65816.cpp12
-rw-r--r--src/devices/cpu/g65816/g65816.h4
-rw-r--r--src/devices/cpu/h6280/h6280.cpp4
-rw-r--r--src/devices/cpu/h6280/h6280.h2
-rw-r--r--src/devices/cpu/h8/h8.cpp2
-rw-r--r--src/devices/cpu/h8/h8_timer16.cpp4
-rw-r--r--src/devices/cpu/h8/h8_timer8.cpp18
-rw-r--r--src/devices/cpu/hcd62121/hcd62121.cpp4
-rw-r--r--src/devices/cpu/hcd62121/hcd62121.h2
-rw-r--r--src/devices/cpu/hd61700/hd61700.cpp4
-rw-r--r--src/devices/cpu/hd61700/hd61700.h2
-rw-r--r--src/devices/cpu/hmcs40/hmcs40.h2
-rw-r--r--src/devices/cpu/hphybrid/hphybrid.h2
-rw-r--r--src/devices/cpu/hphybrid/hphybrid_dasm.cpp2
-rw-r--r--src/devices/cpu/i386/i386.cpp62
-rw-r--r--src/devices/cpu/i386/i386.h2
-rw-r--r--src/devices/cpu/i386/i386op16.inc18
-rw-r--r--src/devices/cpu/i386/i386op32.inc16
-rw-r--r--src/devices/cpu/i386/i386ops.inc12
-rw-r--r--src/devices/cpu/i386/pentops.inc4
-rw-r--r--src/devices/cpu/i4004/i4004.h2
-rw-r--r--src/devices/cpu/i8008/i8008.cpp6
-rw-r--r--src/devices/cpu/i8085/i8085.h2
-rw-r--r--src/devices/cpu/i8089/i8089.cpp2
-rw-r--r--src/devices/cpu/i8089/i8089_channel.cpp8
-rw-r--r--src/devices/cpu/i8089/i8089_dasm.cpp4
-rw-r--r--src/devices/cpu/i86/i186.cpp22
-rw-r--r--src/devices/cpu/i86/i186.h2
-rw-r--r--src/devices/cpu/i86/i286.h2
-rw-r--r--src/devices/cpu/i86/i86.h2
-rw-r--r--src/devices/cpu/i860/i860.h2
-rw-r--r--src/devices/cpu/i860/i860dec.inc182
-rw-r--r--src/devices/cpu/i860/i860dis.cpp174
-rw-r--r--src/devices/cpu/i960/i960.cpp2
-rw-r--r--src/devices/cpu/i960/i960.h2
-rw-r--r--src/devices/cpu/ie15/ie15.cpp8
-rw-r--r--src/devices/cpu/jaguar/jaguar.cpp12
-rw-r--r--src/devices/cpu/jaguar/jaguar.h2
-rw-r--r--src/devices/cpu/lc8670/lc8670.cpp2
-rw-r--r--src/devices/cpu/lh5801/5801dasm.cpp4
-rw-r--r--src/devices/cpu/lh5801/lh5801.h2
-rw-r--r--src/devices/cpu/lr35902/lr35902.h2
-rw-r--r--src/devices/cpu/lr35902/lr35902d.cpp30
-rw-r--r--src/devices/cpu/lr35902/opc_cb.inc14
-rw-r--r--src/devices/cpu/lr35902/opc_main.inc40
-rw-r--r--src/devices/cpu/m37710/m37710.h2
-rw-r--r--src/devices/cpu/m6502/deco16.cpp6
-rw-r--r--src/devices/cpu/m6502/m3745x.cpp6
-rw-r--r--src/devices/cpu/m6502/m3745x.h2
-rw-r--r--src/devices/cpu/m6502/m5074x.cpp2
-rw-r--r--src/devices/cpu/m6502/m5074x.h2
-rw-r--r--src/devices/cpu/m6502/m6502.cpp4
-rw-r--r--src/devices/cpu/m6502/n2a03.cpp4
-rw-r--r--src/devices/cpu/m6800/m6800.cpp6
-rw-r--r--src/devices/cpu/m6800/m6800.h4
-rw-r--r--src/devices/cpu/m68000/m68kcpu.cpp24
-rw-r--r--src/devices/cpu/m68000/m68kdasm.cpp6
-rw-r--r--src/devices/cpu/m68000/m68kmake.cpp36
-rw-r--r--src/devices/cpu/m68000/m68kops.cpp2
-rw-r--r--src/devices/cpu/m6805/m6805.cpp2
-rw-r--r--src/devices/cpu/m6809/hd6309.cpp4
-rw-r--r--src/devices/cpu/m6809/m6809.cpp14
-rw-r--r--src/devices/cpu/m6809/m6809.h10
-rw-r--r--src/devices/cpu/mb86233/mb86233.h2
-rw-r--r--src/devices/cpu/mb86235/mb86235.h2
-rw-r--r--src/devices/cpu/mb88xx/mb88xx.cpp4
-rw-r--r--src/devices/cpu/mb88xx/mb88xx.h2
-rw-r--r--src/devices/cpu/mc68hc11/mc68hc11.h2
-rw-r--r--src/devices/cpu/mcs48/mcs48.cpp2
-rw-r--r--src/devices/cpu/mcs48/mcs48.h46
-rw-r--r--src/devices/cpu/mcs51/mcs51.cpp8
-rw-r--r--src/devices/cpu/mcs51/mcs51.h2
-rw-r--r--src/devices/cpu/mcs51/mcs51dasm.cpp6
-rw-r--r--src/devices/cpu/mcs96/i8x9x.cpp2
-rw-r--r--src/devices/cpu/mcs96/mcs96.cpp2
-rw-r--r--src/devices/cpu/melps4/melps4.h2
-rw-r--r--src/devices/cpu/minx/minx.h2
-rw-r--r--src/devices/cpu/mips/mips3.cpp58
-rw-r--r--src/devices/cpu/mips/mips3.h2
-rw-r--r--src/devices/cpu/mips/mips3drc.cpp46
-rw-r--r--src/devices/cpu/mips/r3000.cpp6
-rw-r--r--src/devices/cpu/mn10200/mn10200.h2
-rw-r--r--src/devices/cpu/nec/nec.h2
-rw-r--r--src/devices/cpu/nec/necdasm.cpp2
-rw-r--r--src/devices/cpu/nec/v25.cpp2
-rw-r--r--src/devices/cpu/nec/v25.h2
-rw-r--r--src/devices/cpu/pdp1/pdp1.cpp6
-rw-r--r--src/devices/cpu/pdp1/pdp1.h2
-rw-r--r--src/devices/cpu/pdp1/tx0.cpp4
-rw-r--r--src/devices/cpu/pdp1/tx0.h2
-rw-r--r--src/devices/cpu/pic16c5x/16c5xdsm.cpp2
-rw-r--r--src/devices/cpu/pic16c5x/pic16c5x.h2
-rw-r--r--src/devices/cpu/pic16c62x/16c62xdsm.cpp2
-rw-r--r--src/devices/cpu/pic16c62x/pic16c62x.cpp6
-rw-r--r--src/devices/cpu/pic16c62x/pic16c62x.h2
-rw-r--r--src/devices/cpu/powerpc/ppc.h36
-rw-r--r--src/devices/cpu/powerpc/ppccom.cpp46
-rw-r--r--src/devices/cpu/powerpc/ppcdrc.cpp68
-rw-r--r--src/devices/cpu/powerpc/ppcfe.cpp6
-rw-r--r--src/devices/cpu/pps4/pps4.h2
-rw-r--r--src/devices/cpu/pps4/pps4dasm.cpp2
-rw-r--r--src/devices/cpu/psx/psx.cpp14
-rw-r--r--src/devices/cpu/psx/psx.h2
-rw-r--r--src/devices/cpu/psx/psxdasm.cpp8
-rw-r--r--src/devices/cpu/rsp/rsp.cpp42
-rw-r--r--src/devices/cpu/rsp/rsp.h2
-rw-r--r--src/devices/cpu/rsp/rspcp2.cpp10
-rw-r--r--src/devices/cpu/rsp/rspdrc.cpp26
-rw-r--r--src/devices/cpu/s2650/2650dasm.cpp4
-rw-r--r--src/devices/cpu/s2650/s2650.h2
-rw-r--r--src/devices/cpu/saturn/saturn.h2
-rw-r--r--src/devices/cpu/saturn/saturnds.cpp4
-rw-r--r--src/devices/cpu/sc61860/sc61860.h2
-rw-r--r--src/devices/cpu/sc61860/scdasm.cpp58
-rw-r--r--src/devices/cpu/scmp/scmp.h2
-rw-r--r--src/devices/cpu/score/score.cpp2
-rw-r--r--src/devices/cpu/scudsp/scudsp.h2
-rw-r--r--src/devices/cpu/se3208/se3208.cpp4
-rw-r--r--src/devices/cpu/se3208/se3208.h2
-rw-r--r--src/devices/cpu/sh2/sh2.cpp56
-rw-r--r--src/devices/cpu/sh2/sh2drc.cpp50
-rw-r--r--src/devices/cpu/sh4/sh4.h2
-rw-r--r--src/devices/cpu/sharc/sharc.cpp54
-rw-r--r--src/devices/cpu/sharc/sharc.h2
-rw-r--r--src/devices/cpu/sharc/sharcops.inc2
-rw-r--r--src/devices/cpu/sm510/sm510.cpp2
-rw-r--r--src/devices/cpu/sm510/sm510.h2
-rw-r--r--src/devices/cpu/sm510/sm510d.cpp2
-rw-r--r--src/devices/cpu/sm8500/sm8500.cpp4
-rw-r--r--src/devices/cpu/sm8500/sm8500.h2
-rw-r--r--src/devices/cpu/spc700/spc700.h2
-rw-r--r--src/devices/cpu/ssem/ssem.cpp2
-rw-r--r--src/devices/cpu/ssp1601/ssp1601.cpp6
-rw-r--r--src/devices/cpu/ssp1601/ssp1601.h2
-rw-r--r--src/devices/cpu/superfx/superfx.cpp4
-rw-r--r--src/devices/cpu/superfx/superfx.h2
-rw-r--r--src/devices/cpu/t11/t11.h2
-rw-r--r--src/devices/cpu/tlcs90/tlcs90.cpp4
-rw-r--r--src/devices/cpu/tlcs90/tlcs90.h2
-rw-r--r--src/devices/cpu/tlcs900/900tbl.inc8
-rw-r--r--src/devices/cpu/tlcs900/tlcs900.h2
-rw-r--r--src/devices/cpu/tms0980/tms0980.cpp2
-rw-r--r--src/devices/cpu/tms0980/tms0980.h4
-rw-r--r--src/devices/cpu/tms32010/32010dsm.cpp2
-rw-r--r--src/devices/cpu/tms32010/tms32010.h2
-rw-r--r--src/devices/cpu/tms32025/32025dsm.cpp2
-rw-r--r--src/devices/cpu/tms32025/tms32025.cpp108
-rw-r--r--src/devices/cpu/tms32025/tms32025.h2
-rw-r--r--src/devices/cpu/tms32031/tms32031.cpp6
-rw-r--r--src/devices/cpu/tms32051/tms32051.h2
-rw-r--r--src/devices/cpu/tms32082/tms32082.h4
-rw-r--r--src/devices/cpu/tms34010/34010gfx.inc2
-rw-r--r--src/devices/cpu/tms34010/tms34010.cpp18
-rw-r--r--src/devices/cpu/tms34010/tms34010.h2
-rw-r--r--src/devices/cpu/tms57002/tms57002.cpp2
-rw-r--r--src/devices/cpu/tms7000/tms7000.h2
-rw-r--r--src/devices/cpu/tms9900/9900dasm.cpp6
-rw-r--r--src/devices/cpu/tms9900/ti990_10.cpp6
-rw-r--r--src/devices/cpu/tms9900/tms9900.cpp38
-rw-r--r--src/devices/cpu/tms9900/tms9995.cpp28
-rw-r--r--src/devices/cpu/ucom4/ucom4.h2
-rw-r--r--src/devices/cpu/uml.cpp12
-rw-r--r--src/devices/cpu/uml.h2
-rw-r--r--src/devices/cpu/unsp/unsp.h2
-rw-r--r--src/devices/cpu/upd7725/upd7725.cpp10
-rw-r--r--src/devices/cpu/upd7810/upd7810.h2
-rw-r--r--src/devices/cpu/upd7810/upd7810_dasm.cpp5248
-rw-r--r--src/devices/cpu/v30mz/v30mz.h2
-rw-r--r--src/devices/cpu/v60/v60.h2
-rw-r--r--src/devices/cpu/v810/v810.h2
-rw-r--r--src/devices/cpu/vtlb.cpp2
-rw-r--r--src/devices/cpu/x86log.cpp8
-rw-r--r--src/devices/cpu/z180/z180.cpp6
-rw-r--r--src/devices/cpu/z180/z180dasm.cpp60
-rw-r--r--src/devices/cpu/z8/z8.cpp12
-rw-r--r--src/devices/cpu/z8/z8.h4
-rw-r--r--src/devices/cpu/z80/tmpz84c015.cpp2
-rw-r--r--src/devices/cpu/z80/z80.cpp18
-rw-r--r--src/devices/cpu/z80/z80.h40
-rw-r--r--src/devices/cpu/z80/z80daisy.cpp24
-rw-r--r--src/devices/cpu/z80/z80daisy.h2
-rw-r--r--src/devices/cpu/z80/z80dasm.cpp52
-rw-r--r--src/devices/cpu/z8000/8000dasm.cpp2
-rw-r--r--src/devices/cpu/z8000/z8000.cpp6
-rw-r--r--src/devices/cpu/z8000/z8000.h4
-rw-r--r--src/devices/cpu/z8000/z8000tbl.inc4
-rw-r--r--src/devices/imagedev/bitbngr.h2
-rw-r--r--src/devices/imagedev/cassette.cpp16
-rw-r--r--src/devices/imagedev/cassette.h36
-rw-r--r--src/devices/imagedev/chd_cd.cpp22
-rw-r--r--src/devices/imagedev/diablo.cpp30
-rw-r--r--src/devices/imagedev/flopdrv.cpp44
-rw-r--r--src/devices/imagedev/floppy.cpp48
-rw-r--r--src/devices/imagedev/floppy.h52
-rw-r--r--src/devices/imagedev/harddriv.cpp36
-rw-r--r--src/devices/imagedev/mfmhd.cpp52
-rw-r--r--src/devices/imagedev/midiin.cpp12
-rw-r--r--src/devices/imagedev/midiin.h2
-rw-r--r--src/devices/imagedev/midiout.cpp8
-rw-r--r--src/devices/imagedev/midiout.h2
-rw-r--r--src/devices/imagedev/printer.h2
-rw-r--r--src/devices/imagedev/snapquik.cpp12
-rw-r--r--src/devices/imagedev/snapquik.h2
-rw-r--r--src/devices/machine/53c810.cpp6
-rw-r--r--src/devices/machine/64h156.cpp2
-rw-r--r--src/devices/machine/6525tpi.cpp4
-rw-r--r--src/devices/machine/6532riot.cpp2
-rw-r--r--src/devices/machine/68307.cpp6
-rw-r--r--src/devices/machine/68307bus.cpp4
-rw-r--r--src/devices/machine/68307sim.cpp4
-rw-r--r--src/devices/machine/68307tmu.cpp8
-rw-r--r--src/devices/machine/68340.cpp8
-rw-r--r--src/devices/machine/68340dma.cpp4
-rw-r--r--src/devices/machine/68340ser.cpp4
-rw-r--r--src/devices/machine/68340sim.cpp12
-rw-r--r--src/devices/machine/68340tmu.cpp4
-rw-r--r--src/devices/machine/6840ptm.cpp10
-rw-r--r--src/devices/machine/74148.cpp4
-rw-r--r--src/devices/machine/74153.cpp12
-rw-r--r--src/devices/machine/akiko.cpp44
-rw-r--r--src/devices/machine/am9517a.cpp12
-rw-r--r--src/devices/machine/amigafdc.cpp8
-rw-r--r--src/devices/machine/at28c16.cpp4
-rw-r--r--src/devices/machine/at45dbxx.cpp4
-rw-r--r--src/devices/machine/at_keybc.cpp2
-rw-r--r--src/devices/machine/ataflash.cpp4
-rw-r--r--src/devices/machine/ataintf.cpp50
-rw-r--r--src/devices/machine/ay31015.cpp16
-rw-r--r--src/devices/machine/bankdev.cpp2
-rw-r--r--src/devices/machine/bankdev.h2
-rw-r--r--src/devices/machine/bcreader.h2
-rw-r--r--src/devices/machine/clock.cpp6
-rw-r--r--src/devices/machine/corvushd.cpp6
-rw-r--r--src/devices/machine/cr511b.cpp4
-rw-r--r--src/devices/machine/diablo_hd.cpp30
-rw-r--r--src/devices/machine/dmac.cpp6
-rw-r--r--src/devices/machine/ds1302.cpp4
-rw-r--r--src/devices/machine/ds2404.cpp10
-rw-r--r--src/devices/machine/eeprom.cpp8
-rw-r--r--src/devices/machine/er2055.cpp4
-rw-r--r--src/devices/machine/hd63450.cpp8
-rw-r--r--src/devices/machine/hdc92x4.cpp22
-rw-r--r--src/devices/machine/i2cmem.cpp4
-rw-r--r--src/devices/machine/i8155.cpp4
-rw-r--r--src/devices/machine/i8257.cpp14
-rw-r--r--src/devices/machine/i8271.cpp28
-rw-r--r--src/devices/machine/i8355.cpp4
-rw-r--r--src/devices/machine/idectrl.cpp4
-rw-r--r--src/devices/machine/idehd.cpp6
-rw-r--r--src/devices/machine/idehd.h8
-rw-r--r--src/devices/machine/intelfsh.cpp8
-rw-r--r--src/devices/machine/jvsdev.cpp4
-rw-r--r--src/devices/machine/jvshost.cpp4
-rw-r--r--src/devices/machine/kb3600.cpp4
-rw-r--r--src/devices/machine/keyboard.cpp4
-rw-r--r--src/devices/machine/laserdsc.cpp64
-rw-r--r--src/devices/machine/laserdsc.h12
-rw-r--r--src/devices/machine/ldv1000.cpp4
-rw-r--r--src/devices/machine/ldvp931.cpp4
-rw-r--r--src/devices/machine/legscsi.cpp26
-rw-r--r--src/devices/machine/linflash.cpp2
-rw-r--r--src/devices/machine/lpci.cpp22
-rw-r--r--src/devices/machine/m6m80011ap.cpp4
-rw-r--r--src/devices/machine/matsucd.cpp14
-rw-r--r--src/devices/machine/mc146818.cpp2
-rw-r--r--src/devices/machine/mc6843.cpp8
-rw-r--r--src/devices/machine/mc6854.cpp6
-rw-r--r--src/devices/machine/mc68681.cpp2
-rw-r--r--src/devices/machine/mccs1850.cpp2
-rw-r--r--src/devices/machine/mcf5206e.cpp4
-rw-r--r--src/devices/machine/mos8722.cpp4
-rw-r--r--src/devices/machine/mpu401.cpp2
-rw-r--r--src/devices/machine/msm5832.cpp4
-rw-r--r--src/devices/machine/msm58321.cpp4
-rw-r--r--src/devices/machine/ncr539x.cpp2
-rw-r--r--src/devices/machine/netlist.h14
-rw-r--r--src/devices/machine/nscsi_bus.cpp2
-rw-r--r--src/devices/machine/nvram.cpp10
-rw-r--r--src/devices/machine/pc_fdc.cpp6
-rw-r--r--src/devices/machine/pccard.cpp12
-rw-r--r--src/devices/machine/pci.cpp12
-rw-r--r--src/devices/machine/pci9050.cpp4
-rw-r--r--src/devices/machine/pckeybrd.cpp4
-rw-r--r--src/devices/machine/pit8253.cpp14
-rw-r--r--src/devices/machine/pla.cpp10
-rw-r--r--src/devices/machine/ram.cpp18
-rw-r--r--src/devices/machine/ram.h4
-rw-r--r--src/devices/machine/rp5h01.cpp2
-rw-r--r--src/devices/machine/rtc9701.cpp4
-rw-r--r--src/devices/machine/s2636.cpp6
-rw-r--r--src/devices/machine/s3c24xx.inc16
-rw-r--r--src/devices/machine/s3c44b0.cpp24
-rw-r--r--src/devices/machine/saturn.cpp8
-rw-r--r--src/devices/machine/spchrom.cpp2
-rw-r--r--src/devices/machine/stvcd.cpp48
-rw-r--r--src/devices/machine/tc009xlvc.cpp6
-rw-r--r--src/devices/machine/timekpr.cpp4
-rw-r--r--src/devices/machine/tmp68301.cpp4
-rw-r--r--src/devices/machine/tms9902.cpp2
-rw-r--r--src/devices/machine/upd1990a.cpp4
-rw-r--r--src/devices/machine/upd71071.cpp4
-rw-r--r--src/devices/machine/upd765.cpp30
-rw-r--r--src/devices/machine/vrc4373.cpp2
-rw-r--r--src/devices/machine/vt82c496.cpp2
-rw-r--r--src/devices/machine/wd7600.cpp4
-rw-r--r--src/devices/machine/wd_fdc.cpp2
-rw-r--r--src/devices/machine/wozfdc.cpp6
-rw-r--r--src/devices/machine/x2212.cpp4
-rw-r--r--src/devices/machine/z80ctc.cpp10
-rw-r--r--src/devices/machine/z80dart.cpp20
-rw-r--r--src/devices/machine/z80pio.cpp2
-rw-r--r--src/devices/machine/z80scc.cpp12
-rw-r--r--src/devices/machine/z80sio.cpp12
-rw-r--r--src/devices/machine/z80sti.cpp4
-rw-r--r--src/devices/machine/z8536.cpp4
-rw-r--r--src/devices/sound/2151intf.cpp6
-rw-r--r--src/devices/sound/2203intf.cpp2
-rw-r--r--src/devices/sound/2413intf.cpp2
-rw-r--r--src/devices/sound/2608intf.cpp2
-rw-r--r--src/devices/sound/2610intf.cpp4
-rw-r--r--src/devices/sound/2612intf.cpp2
-rw-r--r--src/devices/sound/262intf.cpp2
-rw-r--r--src/devices/sound/315-5641.cpp4
-rw-r--r--src/devices/sound/3526intf.cpp6
-rw-r--r--src/devices/sound/3812intf.cpp6
-rw-r--r--src/devices/sound/8950intf.cpp6
-rw-r--r--src/devices/sound/aica.cpp14
-rw-r--r--src/devices/sound/amiga.cpp4
-rw-r--r--src/devices/sound/asc.cpp2
-rw-r--r--src/devices/sound/astrocde.cpp2
-rw-r--r--src/devices/sound/awacs.cpp4
-rw-r--r--src/devices/sound/ay8910.cpp10
-rw-r--r--src/devices/sound/beep.cpp2
-rw-r--r--src/devices/sound/bsmt2000.cpp14
-rw-r--r--src/devices/sound/c140.cpp8
-rw-r--r--src/devices/sound/c352.cpp4
-rw-r--r--src/devices/sound/cdda.cpp2
-rw-r--r--src/devices/sound/cdp1863.cpp2
-rw-r--r--src/devices/sound/cdp1864.cpp6
-rw-r--r--src/devices/sound/cdp1869.cpp6
-rw-r--r--src/devices/sound/cem3394.cpp6
-rw-r--r--src/devices/sound/dac.cpp2
-rw-r--r--src/devices/sound/digitalk.cpp4
-rw-r--r--src/devices/sound/disc_dev.inc4
-rw-r--r--src/devices/sound/disc_inp.inc8
-rw-r--r--src/devices/sound/disc_mth.inc4
-rw-r--r--src/devices/sound/disc_wav.inc2
-rw-r--r--src/devices/sound/discrete.cpp50
-rw-r--r--src/devices/sound/discrete.h8
-rw-r--r--src/devices/sound/dmadac.cpp2
-rw-r--r--src/devices/sound/es1373.cpp6
-rw-r--r--src/devices/sound/es5503.cpp28
-rw-r--r--src/devices/sound/es5506.cpp36
-rw-r--r--src/devices/sound/es8712.cpp2
-rw-r--r--src/devices/sound/flt_rc.cpp2
-rw-r--r--src/devices/sound/flt_vol.cpp2
-rw-r--r--src/devices/sound/fm.cpp12
-rw-r--r--src/devices/sound/fm2612.cpp2
-rw-r--r--src/devices/sound/fmopl.cpp70
-rw-r--r--src/devices/sound/gaelco.cpp14
-rw-r--r--src/devices/sound/hc55516.cpp4
-rw-r--r--src/devices/sound/i5000.cpp4
-rw-r--r--src/devices/sound/ics2115.cpp42
-rw-r--r--src/devices/sound/iremga20.cpp4
-rw-r--r--src/devices/sound/k005289.cpp10
-rw-r--r--src/devices/sound/k007232.cpp4
-rw-r--r--src/devices/sound/k051649.cpp8
-rw-r--r--src/devices/sound/k053260.cpp18
-rw-r--r--src/devices/sound/k054539.cpp12
-rw-r--r--src/devices/sound/l7a1045_l6028_dsp_a.cpp4
-rw-r--r--src/devices/sound/mos6560.cpp12
-rw-r--r--src/devices/sound/mos6581.cpp4
-rw-r--r--src/devices/sound/mos7360.cpp8
-rw-r--r--src/devices/sound/multipcm.cpp30
-rw-r--r--src/devices/sound/n63701x.cpp2
-rw-r--r--src/devices/sound/namco.cpp14
-rw-r--r--src/devices/sound/nes_apu.cpp18
-rw-r--r--src/devices/sound/nes_defs.h20
-rw-r--r--src/devices/sound/nile.cpp4
-rw-r--r--src/devices/sound/okim6258.cpp2
-rw-r--r--src/devices/sound/okim6295.cpp16
-rw-r--r--src/devices/sound/okim6376.cpp2
-rw-r--r--src/devices/sound/okim9810.cpp14
-rw-r--r--src/devices/sound/pokey.cpp2
-rw-r--r--src/devices/sound/qs1000.cpp18
-rw-r--r--src/devices/sound/qsound.cpp32
-rw-r--r--src/devices/sound/rf5c400.cpp2
-rw-r--r--src/devices/sound/rf5c68.cpp2
-rw-r--r--src/devices/sound/s14001a.cpp2
-rw-r--r--src/devices/sound/saa1099.cpp2
-rw-r--r--src/devices/sound/samples.cpp26
-rw-r--r--src/devices/sound/samples.h20
-rw-r--r--src/devices/sound/scsp.cpp22
-rw-r--r--src/devices/sound/segapcm.cpp4
-rw-r--r--src/devices/sound/sidvoice.cpp4
-rw-r--r--src/devices/sound/sn76477.cpp4
-rw-r--r--src/devices/sound/sn76496.cpp2
-rw-r--r--src/devices/sound/snkwave.cpp2
-rw-r--r--src/devices/sound/sp0250.cpp16
-rw-r--r--src/devices/sound/spu.cpp74
-rw-r--r--src/devices/sound/spu_tables.cpp4
-rw-r--r--src/devices/sound/st0016.cpp2
-rw-r--r--src/devices/sound/t6721a.cpp2
-rw-r--r--src/devices/sound/tiaintf.cpp6
-rw-r--r--src/devices/sound/tms3615.cpp2
-rw-r--r--src/devices/sound/tms36xx.cpp6
-rw-r--r--src/devices/sound/tms5110.cpp6
-rw-r--r--src/devices/sound/tms5220.cpp6
-rw-r--r--src/devices/sound/upd7752.cpp2
-rw-r--r--src/devices/sound/upd7759.cpp16
-rw-r--r--src/devices/sound/vlm5030.cpp6
-rw-r--r--src/devices/sound/votrax.cpp6
-rw-r--r--src/devices/sound/vrender0.cpp6
-rw-r--r--src/devices/sound/wave.cpp2
-rw-r--r--src/devices/sound/x1_010.cpp6
-rw-r--r--src/devices/sound/ym2151.cpp10
-rw-r--r--src/devices/sound/ym2413.cpp70
-rw-r--r--src/devices/sound/ymdeltat.cpp2
-rw-r--r--src/devices/sound/ymf262.cpp70
-rw-r--r--src/devices/sound/ymf271.cpp6
-rw-r--r--src/devices/sound/ymf278b.cpp10
-rw-r--r--src/devices/sound/ymf278b.h2
-rw-r--r--src/devices/sound/ymz280b.cpp8
-rw-r--r--src/devices/sound/ymz770.cpp102
-rw-r--r--src/devices/sound/zsg2.cpp26
-rw-r--r--src/devices/video/315_5124.cpp4
-rw-r--r--src/devices/video/315_5124.h2
-rw-r--r--src/devices/video/bufsprite.h6
-rw-r--r--src/devices/video/crt9007.cpp8
-rw-r--r--src/devices/video/crtc_ega.cpp4
-rw-r--r--src/devices/video/ef9345.cpp4
-rw-r--r--src/devices/video/epic12.cpp8
-rw-r--r--src/devices/video/fixfreq.cpp8
-rw-r--r--src/devices/video/h63484.cpp4
-rw-r--r--src/devices/video/hd44780.cpp8
-rw-r--r--src/devices/video/hd61830.cpp4
-rw-r--r--src/devices/video/hd63484.cpp2
-rw-r--r--src/devices/video/hd66421.cpp8
-rw-r--r--src/devices/video/huc6261.cpp8
-rw-r--r--src/devices/video/huc6272.cpp4
-rw-r--r--src/devices/video/i82730.cpp4
-rw-r--r--src/devices/video/m50458.cpp4
-rw-r--r--src/devices/video/mb90082.cpp4
-rw-r--r--src/devices/video/mb_vcu.cpp6
-rw-r--r--src/devices/video/mc6845.cpp10
-rw-r--r--src/devices/video/mc6847.cpp4
-rw-r--r--src/devices/video/mc6847.h2
-rw-r--r--src/devices/video/mos6566.cpp14
-rw-r--r--src/devices/video/msm6222b.cpp2
-rw-r--r--src/devices/video/msm6255.cpp4
-rw-r--r--src/devices/video/pc_vga.cpp2
-rw-r--r--src/devices/video/poly.h24
-rw-r--r--src/devices/video/polylgcy.cpp16
-rw-r--r--src/devices/video/psx.cpp4
-rw-r--r--src/devices/video/ramdac.cpp4
-rw-r--r--src/devices/video/scn2674.cpp2
-rw-r--r--src/devices/video/scn2674.h2
-rw-r--r--src/devices/video/sed1330.cpp4
-rw-r--r--src/devices/video/snes_ppu.cpp48
-rw-r--r--src/devices/video/stvvdp2.cpp4
-rw-r--r--src/devices/video/tms34061.cpp8
-rw-r--r--src/devices/video/tms3556.cpp6
-rw-r--r--src/devices/video/tms9927.cpp10
-rw-r--r--src/devices/video/tms9928a.cpp8
-rw-r--r--src/devices/video/tms9928a.h2
-rw-r--r--src/devices/video/upd7220.cpp8
-rw-r--r--src/devices/video/upd7227.cpp2
-rw-r--r--src/devices/video/v9938.cpp44
-rw-r--r--src/devices/video/v9938.h2
-rw-r--r--src/devices/video/vic4567.cpp6
-rw-r--r--src/devices/video/voodoo.cpp46
-rw-r--r--src/devices/video/voodoo.h2
-rw-r--r--src/emu/addrmap.cpp26
-rw-r--r--src/emu/addrmap.h4
-rw-r--r--src/emu/audit.cpp74
-rw-r--r--src/emu/audit.h4
-rw-r--r--src/emu/cheat.cpp140
-rw-r--r--src/emu/cheat.h22
-rw-r--r--src/emu/clifront.cpp134
-rw-r--r--src/emu/cliopts.cpp8
-rw-r--r--src/emu/config.cpp20
-rw-r--r--src/emu/crsshair.cpp28
-rw-r--r--src/emu/debug/debugcmd.cpp192
-rw-r--r--src/emu/debug/debugcon.cpp14
-rw-r--r--src/emu/debug/debugcpu.cpp304
-rw-r--r--src/emu/debug/debugcpu.h24
-rw-r--r--src/emu/debug/debughlp.cpp2
-rw-r--r--src/emu/debug/debugvw.cpp28
-rw-r--r--src/emu/debug/debugvw.h2
-rw-r--r--src/emu/debug/dvbpoints.cpp6
-rw-r--r--src/emu/debug/dvbpoints.h4
-rw-r--r--src/emu/debug/dvdisasm.cpp12
-rw-r--r--src/emu/debug/dvdisasm.h8
-rw-r--r--src/emu/debug/dvmemory.cpp34
-rw-r--r--src/emu/debug/dvmemory.h8
-rw-r--r--src/emu/debug/dvstate.cpp26
-rw-r--r--src/emu/debug/dvstate.h4
-rw-r--r--src/emu/debug/dvtext.cpp2
-rw-r--r--src/emu/debug/dvtext.h4
-rw-r--r--src/emu/debug/dvwpoints.cpp6
-rw-r--r--src/emu/debug/dvwpoints.h4
-rw-r--r--src/emu/debug/express.cpp122
-rw-r--r--src/emu/debug/express.h10
-rw-r--r--src/emu/debug/textbuf.cpp8
-rw-r--r--src/emu/debugger.cpp4
-rw-r--r--src/emu/devcb.cpp32
-rw-r--r--src/emu/devcb.h20
-rw-r--r--src/emu/devdelegate.cpp4
-rw-r--r--src/emu/devdelegate.h10
-rw-r--r--src/emu/devfind.cpp12
-rw-r--r--src/emu/devfind.h28
-rw-r--r--src/emu/device.cpp114
-rw-r--r--src/emu/device.h102
-rw-r--r--src/emu/diexec.cpp28
-rw-r--r--src/emu/diexec.h14
-rw-r--r--src/emu/digfx.cpp38
-rw-r--r--src/emu/digfx.h12
-rw-r--r--src/emu/diimage.cpp122
-rw-r--r--src/emu/diimage.h18
-rw-r--r--src/emu/dimemory.cpp46
-rw-r--r--src/emu/dimemory.h16
-rw-r--r--src/emu/dioutput.cpp2
-rw-r--r--src/emu/dipty.cpp4
-rw-r--r--src/emu/diserial.cpp4
-rw-r--r--src/emu/diserial.h2
-rw-r--r--src/emu/dislot.cpp20
-rw-r--r--src/emu/dislot.h2
-rw-r--r--src/emu/disound.cpp52
-rw-r--r--src/emu/disound.h14
-rw-r--r--src/emu/dispatch.h18
-rw-r--r--src/emu/distate.cpp30
-rw-r--r--src/emu/distate.h6
-rw-r--r--src/emu/divideo.cpp22
-rw-r--r--src/emu/divideo.h4
-rw-r--r--src/emu/drawgfx.cpp52
-rw-r--r--src/emu/drawgfx.h2
-rw-r--r--src/emu/drivenum.cpp24
-rw-r--r--src/emu/drivenum.h5
-rw-r--r--src/emu/driver.cpp12
-rw-r--r--src/emu/driver.h14
-rw-r--r--src/emu/drivers/empty.cpp2
-rw-r--r--src/emu/drivers/testcpu.cpp10
-rw-r--r--src/emu/emualloc.cpp34
-rw-r--r--src/emu/emualloc.h6
-rw-r--r--src/emu/emucore.cpp8
-rw-r--r--src/emu/emucore.h4
-rw-r--r--src/emu/emuopts.cpp102
-rw-r--r--src/emu/emuopts.h2
-rw-r--r--src/emu/emupal.cpp26
-rw-r--r--src/emu/emupal.h12
-rw-r--r--src/emu/fileio.cpp108
-rw-r--r--src/emu/fileio.h6
-rw-r--r--src/emu/hash.cpp22
-rw-r--r--src/emu/hash.h4
-rw-r--r--src/emu/hashfile.cpp32
-rw-r--r--src/emu/image.cpp38
-rw-r--r--src/emu/info.cpp134
-rw-r--r--src/emu/inpttype.h46
-rw-r--r--src/emu/input.cpp124
-rw-r--r--src/emu/input.h12
-rw-r--r--src/emu/ioport.cpp932
-rw-r--r--src/emu/ioport.h16
-rw-r--r--src/emu/luaengine.cpp40
-rw-r--r--src/emu/luaengine.h4
-rw-r--r--src/emu/machine.cpp66
-rw-r--r--src/emu/machine.h4
-rw-r--r--src/emu/machine/generic.cpp12
-rw-r--r--src/emu/mame.cpp16
-rw-r--r--src/emu/mconfig.cpp42
-rw-r--r--src/emu/memarray.cpp8
-rw-r--r--src/emu/memory.cpp362
-rw-r--r--src/emu/memory.h52
-rw-r--r--src/emu/network.cpp18
-rw-r--r--src/emu/output.cpp30
-rw-r--r--src/emu/profiler.cpp8
-rw-r--r--src/emu/profiler.h2
-rw-r--r--src/emu/render.cpp266
-rw-r--r--src/emu/render.h34
-rw-r--r--src/emu/rendersw.inc36
-rw-r--r--src/emu/rendfont.cpp54
-rw-r--r--src/emu/rendfont.h4
-rw-r--r--src/emu/rendlay.cpp126
-rw-r--r--src/emu/rendutil.cpp10
-rw-r--r--src/emu/romload.cpp132
-rw-r--r--src/emu/save.cpp46
-rw-r--r--src/emu/save.h4
-rw-r--r--src/emu/schedule.cpp116
-rw-r--r--src/emu/schedule.h22
-rw-r--r--src/emu/screen.cpp44
-rw-r--r--src/emu/screen.h34
-rw-r--r--src/emu/softlist.cpp242
-rw-r--r--src/emu/softlist.h16
-rw-r--r--src/emu/sound.cpp106
-rw-r--r--src/emu/sound.h2
-rw-r--r--src/emu/sound/filter.cpp4
-rw-r--r--src/emu/sound/wavwrite.cpp4
-rw-r--r--src/emu/speaker.cpp2
-rw-r--r--src/emu/speaker.h2
-rw-r--r--src/emu/sprite.cpp10
-rw-r--r--src/emu/sprite.h10
-rw-r--r--src/emu/tilemap.cpp50
-rw-r--r--src/emu/tilemap.h6
-rw-r--r--src/emu/timer.cpp16
-rw-r--r--src/emu/timer.h8
-rw-r--r--src/emu/ui/barcode.cpp6
-rw-r--r--src/emu/ui/barcode.h4
-rw-r--r--src/emu/ui/cheatopt.cpp16
-rw-r--r--src/emu/ui/cheatopt.h4
-rw-r--r--src/emu/ui/devctrl.h4
-rw-r--r--src/emu/ui/devopt.cpp28
-rw-r--r--src/emu/ui/devopt.h4
-rw-r--r--src/emu/ui/filemngr.cpp34
-rw-r--r--src/emu/ui/filemngr.h6
-rw-r--r--src/emu/ui/filesel.cpp112
-rw-r--r--src/emu/ui/filesel.h24
-rw-r--r--src/emu/ui/imgcntrl.cpp20
-rw-r--r--src/emu/ui/imgcntrl.h4
-rw-r--r--src/emu/ui/info.cpp22
-rw-r--r--src/emu/ui/info.h8
-rw-r--r--src/emu/ui/info_pty.cpp12
-rw-r--r--src/emu/ui/info_pty.h4
-rw-r--r--src/emu/ui/inputmap.cpp110
-rw-r--r--src/emu/ui/inputmap.h24
-rw-r--r--src/emu/ui/mainmenu.cpp66
-rw-r--r--src/emu/ui/mainmenu.h4
-rw-r--r--src/emu/ui/menu.cpp56
-rw-r--r--src/emu/ui/miscmenu.cpp24
-rw-r--r--src/emu/ui/miscmenu.h24
-rw-r--r--src/emu/ui/selgame.cpp34
-rw-r--r--src/emu/ui/selgame.h6
-rw-r--r--src/emu/ui/sliders.cpp18
-rw-r--r--src/emu/ui/sliders.h6
-rw-r--r--src/emu/ui/slotopt.cpp18
-rw-r--r--src/emu/ui/slotopt.h4
-rw-r--r--src/emu/ui/swlist.cpp74
-rw-r--r--src/emu/ui/swlist.h12
-rw-r--r--src/emu/ui/tapectrl.cpp18
-rw-r--r--src/emu/ui/tapectrl.h4
-rw-r--r--src/emu/ui/ui.cpp132
-rw-r--r--src/emu/ui/ui.h2
-rw-r--r--src/emu/ui/videoopt.cpp14
-rw-r--r--src/emu/ui/videoopt.h8
-rw-r--r--src/emu/ui/viewgfx.cpp10
-rw-r--r--src/emu/uiinput.cpp10
-rw-r--r--src/emu/validity.cpp94
-rw-r--r--src/emu/validity.h2
-rw-r--r--src/emu/video.cpp84
-rw-r--r--src/emu/video.h2
-rw-r--r--src/emu/video/vector.cpp4
-rw-r--r--src/emu/video/vector.h2
-rw-r--r--src/lib/formats/a26_cas.cpp4
-rw-r--r--src/lib/formats/ace_tap.cpp4
-rw-r--r--src/lib/formats/adam_cas.cpp4
-rw-r--r--src/lib/formats/ap2_dsk.cpp34
-rw-r--r--src/lib/formats/ap_dsk35.cpp22
-rw-r--r--src/lib/formats/apf_apt.cpp8
-rw-r--r--src/lib/formats/atari_dsk.cpp4
-rw-r--r--src/lib/formats/atom_tap.cpp2
-rw-r--r--src/lib/formats/basicdsk.cpp6
-rw-r--r--src/lib/formats/camplynx_cas.cpp6
-rw-r--r--src/lib/formats/cassimg.cpp24
-rw-r--r--src/lib/formats/cbm_tap.cpp10
-rw-r--r--src/lib/formats/ccvf_dsk.cpp2
-rw-r--r--src/lib/formats/cgen_cas.cpp4
-rw-r--r--src/lib/formats/coco_cas.cpp4
-rw-r--r--src/lib/formats/cqm_dsk.cpp2
-rw-r--r--src/lib/formats/cqm_dsk.h16
-rw-r--r--src/lib/formats/csw_cas.cpp14
-rw-r--r--src/lib/formats/d88_dsk.cpp4
-rw-r--r--src/lib/formats/d88_dsk.h16
-rw-r--r--src/lib/formats/dfi_dsk.h12
-rw-r--r--src/lib/formats/dsk_dsk.cpp6
-rw-r--r--src/lib/formats/dsk_dsk.h12
-rw-r--r--src/lib/formats/fc100_cas.cpp4
-rw-r--r--src/lib/formats/flopimg.cpp48
-rw-r--r--src/lib/formats/fm7_cas.cpp4
-rw-r--r--src/lib/formats/fmsx_cas.cpp2
-rw-r--r--src/lib/formats/g64_dsk.cpp2
-rw-r--r--src/lib/formats/gtp_cas.cpp8
-rw-r--r--src/lib/formats/hect_dsk.cpp6
-rw-r--r--src/lib/formats/hect_tap.cpp8
-rw-r--r--src/lib/formats/hxcmfm_dsk.h16
-rw-r--r--src/lib/formats/imageutl.cpp2
-rw-r--r--src/lib/formats/imd_dsk.cpp10
-rw-r--r--src/lib/formats/imd_dsk.h12
-rw-r--r--src/lib/formats/ioprocs.cpp4
-rw-r--r--src/lib/formats/ipf_dsk.cpp6
-rw-r--r--src/lib/formats/ipf_dsk.h12
-rw-r--r--src/lib/formats/kc_cas.cpp12
-rw-r--r--src/lib/formats/kim1_cas.cpp4
-rw-r--r--src/lib/formats/lviv_lvt.cpp2
-rw-r--r--src/lib/formats/mbee_cas.cpp4
-rw-r--r--src/lib/formats/mfi_dsk.cpp4
-rw-r--r--src/lib/formats/mfi_dsk.h16
-rw-r--r--src/lib/formats/mz_cas.cpp4
-rw-r--r--src/lib/formats/nes_dsk.cpp4
-rw-r--r--src/lib/formats/orao_cas.cpp8
-rw-r--r--src/lib/formats/oric_tap.cpp2
-rw-r--r--src/lib/formats/p6001_cas.cpp4
-rw-r--r--src/lib/formats/pasti_dsk.cpp6
-rw-r--r--src/lib/formats/pc_dsk.cpp2
-rw-r--r--src/lib/formats/phc25_cas.cpp4
-rw-r--r--src/lib/formats/pmd_cas.cpp4
-rw-r--r--src/lib/formats/primoptp.cpp2
-rw-r--r--src/lib/formats/rk_cas.cpp18
-rw-r--r--src/lib/formats/sc3000_bit.cpp2
-rw-r--r--src/lib/formats/sol_cas.cpp4
-rw-r--r--src/lib/formats/sorc_cas.cpp4
-rw-r--r--src/lib/formats/sorc_dsk.cpp4
-rw-r--r--src/lib/formats/sord_cas.cpp2
-rw-r--r--src/lib/formats/spc1000_cas.cpp8
-rw-r--r--src/lib/formats/svi_cas.cpp2
-rw-r--r--src/lib/formats/td0_dsk.cpp10
-rw-r--r--src/lib/formats/td0_dsk.h14
-rw-r--r--src/lib/formats/thom_cas.cpp12
-rw-r--r--src/lib/formats/thom_dsk.cpp14
-rw-r--r--src/lib/formats/trs_cas.cpp4
-rw-r--r--src/lib/formats/tvc_cas.cpp2
-rw-r--r--src/lib/formats/tzx_cas.cpp14
-rw-r--r--src/lib/formats/uef_cas.cpp18
-rw-r--r--src/lib/formats/vg5k_cas.cpp4
-rw-r--r--src/lib/formats/vt_cas.cpp8
-rw-r--r--src/lib/formats/x07_cas.cpp4
-rw-r--r--src/lib/formats/x1_tap.cpp2
-rw-r--r--src/lib/formats/zx81_p.cpp4
-rw-r--r--src/lib/util/avhuff.cpp20
-rw-r--r--src/lib/util/avhuff.h8
-rw-r--r--src/lib/util/aviio.cpp124
-rw-r--r--src/lib/util/bitmap.cpp24
-rw-r--r--src/lib/util/bitmap.h2
-rw-r--r--src/lib/util/cdrom.cpp48
-rw-r--r--src/lib/util/chd.cpp114
-rw-r--r--src/lib/util/chd.h16
-rw-r--r--src/lib/util/chdcd.cpp30
-rw-r--r--src/lib/util/chdcd.h2
-rw-r--r--src/lib/util/chdcodec.cpp80
-rw-r--r--src/lib/util/chdcodec.h2
-rw-r--r--src/lib/util/corealloc.cpp66
-rw-r--r--src/lib/util/corefile.cpp52
-rw-r--r--src/lib/util/corestr.cpp14
-rw-r--r--src/lib/util/coretmpl.h54
-rw-r--r--src/lib/util/cstrpool.cpp12
-rw-r--r--src/lib/util/delegate.h36
-rw-r--r--src/lib/util/flac.cpp48
-rw-r--r--src/lib/util/flac.h4
-rw-r--r--src/lib/util/harddisk.cpp12
-rw-r--r--src/lib/util/hashing.cpp16
-rw-r--r--src/lib/util/huffman.cpp4
-rw-r--r--src/lib/util/huffman.h4
-rw-r--r--src/lib/util/opresolv.cpp34
-rw-r--r--src/lib/util/options.cpp62
-rw-r--r--src/lib/util/options.h8
-rw-r--r--src/lib/util/palette.cpp14
-rw-r--r--src/lib/util/png.cpp90
-rw-r--r--src/lib/util/pool.cpp66
-rw-r--r--src/lib/util/tagmap.h31
-rw-r--r--src/lib/util/un7z.cpp48
-rw-r--r--src/lib/util/unicode.cpp4
-rw-r--r--src/lib/util/unzip.cpp44
-rw-r--r--src/lib/util/vbiparse.cpp2
-rw-r--r--src/lib/util/xmlfile.cpp144
-rw-r--r--src/lib/util/zippath.cpp104
-rw-r--r--src/mame/audio/8080bw.cpp4
-rw-r--r--src/mame/audio/astrof.cpp2
-rw-r--r--src/mame/audio/atarijsa.cpp40
-rw-r--r--src/mame/audio/beezer.cpp2
-rw-r--r--src/mame/audio/blockade.cpp2
-rw-r--r--src/mame/audio/bzone.cpp4
-rw-r--r--src/mame/audio/cage.cpp78
-rw-r--r--src/mame/audio/carnival.cpp2
-rw-r--r--src/mame/audio/cclimber.cpp2
-rw-r--r--src/mame/audio/channelf.cpp2
-rw-r--r--src/mame/audio/cinemat.cpp28
-rw-r--r--src/mame/audio/circus.cpp8
-rw-r--r--src/mame/audio/copsnrob.cpp6
-rw-r--r--src/mame/audio/cps3.cpp4
-rw-r--r--src/mame/audio/dave.cpp34
-rw-r--r--src/mame/audio/dcs.cpp52
-rw-r--r--src/mame/audio/depthch.cpp2
-rw-r--r--src/mame/audio/dkong.cpp4
-rw-r--r--src/mame/audio/exidy.cpp20
-rw-r--r--src/mame/audio/exidy440.cpp20
-rw-r--r--src/mame/audio/flower.cpp4
-rw-r--r--src/mame/audio/gamate.cpp2
-rw-r--r--src/mame/audio/geebee.cpp6
-rw-r--r--src/mame/audio/gomoku.cpp14
-rw-r--r--src/mame/audio/gorf.cpp6
-rw-r--r--src/mame/audio/gottlieb.cpp14
-rw-r--r--src/mame/audio/gridlee.cpp4
-rw-r--r--src/mame/audio/invinco.cpp2
-rw-r--r--src/mame/audio/leland.cpp2
-rw-r--r--src/mame/audio/lynx.cpp4
-rw-r--r--src/mame/audio/m72.cpp2
-rw-r--r--src/mame/audio/mac.cpp2
-rw-r--r--src/mame/audio/mario.cpp6
-rw-r--r--src/mame/audio/mea8000.cpp16
-rw-r--r--src/mame/audio/micro3d.cpp2
-rw-r--r--src/mame/audio/midway.cpp2
-rw-r--r--src/mame/audio/mw8080bw.cpp14
-rw-r--r--src/mame/audio/pleiads.cpp4
-rw-r--r--src/mame/audio/polepos.cpp2
-rw-r--r--src/mame/audio/pulsar.cpp2
-rw-r--r--src/mame/audio/redbaron.cpp4
-rw-r--r--src/mame/audio/scramble.cpp2
-rw-r--r--src/mame/audio/segag80r.cpp12
-rw-r--r--src/mame/audio/segasnd.cpp6
-rw-r--r--src/mame/audio/seibu.cpp10
-rw-r--r--src/mame/audio/senjyo.cpp2
-rw-r--r--src/mame/audio/skyraid.cpp2
-rw-r--r--src/mame/audio/snes_snd.cpp2
-rw-r--r--src/mame/audio/snk6502.cpp10
-rw-r--r--src/mame/audio/spacefb.cpp2
-rw-r--r--src/mame/audio/specimx_snd.cpp2
-rw-r--r--src/mame/audio/svis_snd.cpp2
-rw-r--r--src/mame/audio/t5182.cpp2
-rw-r--r--src/mame/audio/targ.cpp2
-rw-r--r--src/mame/audio/tiamc1.cpp2
-rw-r--r--src/mame/audio/trackfld.cpp2
-rw-r--r--src/mame/audio/triplhnt.cpp2
-rw-r--r--src/mame/audio/turbo.cpp6
-rw-r--r--src/mame/audio/turrett.cpp8
-rw-r--r--src/mame/audio/tx1.cpp6
-rw-r--r--src/mame/audio/vboy.cpp2
-rw-r--r--src/mame/audio/vc4000snd.cpp2
-rw-r--r--src/mame/audio/vicdual.cpp6
-rw-r--r--src/mame/audio/warpwarp.cpp8
-rw-r--r--src/mame/audio/wiping.cpp16
-rw-r--r--src/mame/audio/wow.cpp6
-rw-r--r--src/mame/audio/wswan_snd.cpp2
-rw-r--r--src/mame/audio/zaxxon.cpp4
-rw-r--r--src/mame/drivers/2mindril.cpp4
-rw-r--r--src/mame/drivers/4enlinea.cpp4
-rw-r--r--src/mame/drivers/5clown.cpp8
-rw-r--r--src/mame/drivers/a2600.cpp6
-rw-r--r--src/mame/drivers/a5105.cpp2
-rw-r--r--src/mame/drivers/a7800.cpp2
-rw-r--r--src/mame/drivers/abc1600.cpp16
-rw-r--r--src/mame/drivers/abc80.cpp4
-rw-r--r--src/mame/drivers/abc80x.cpp24
-rw-r--r--src/mame/drivers/ac1.cpp6
-rw-r--r--src/mame/drivers/ace.cpp12
-rw-r--r--src/mame/drivers/aces1.cpp4
-rw-r--r--src/mame/drivers/adam.cpp28
-rw-r--r--src/mame/drivers/aerofgt.cpp30
-rw-r--r--src/mame/drivers/aim65.cpp2
-rw-r--r--src/mame/drivers/altos5.cpp4
-rw-r--r--src/mame/drivers/amiga.cpp36
-rw-r--r--src/mame/drivers/ampro.cpp4
-rw-r--r--src/mame/drivers/amstr_pc.cpp6
-rw-r--r--src/mame/drivers/amstrad.cpp16
-rw-r--r--src/mame/drivers/apc.cpp2
-rw-r--r--src/mame/drivers/apexc.cpp12
-rw-r--r--src/mame/drivers/apf.cpp4
-rw-r--r--src/mame/drivers/apollo.cpp4
-rw-r--r--src/mame/drivers/apple2.cpp22
-rw-r--r--src/mame/drivers/apple2e.cpp38
-rw-r--r--src/mame/drivers/apple2gs.cpp14
-rw-r--r--src/mame/drivers/apple3.cpp10
-rw-r--r--src/mame/drivers/applix.cpp2
-rw-r--r--src/mame/drivers/apricot.cpp8
-rw-r--r--src/mame/drivers/apricotp.cpp6
-rw-r--r--src/mame/drivers/arcadia.cpp2
-rw-r--r--src/mame/drivers/aristmk4.cpp2
-rw-r--r--src/mame/drivers/aristmk5.cpp2
-rw-r--r--src/mame/drivers/arsystems.cpp2
-rw-r--r--src/mame/drivers/astinvad.cpp2
-rw-r--r--src/mame/drivers/astrocde.cpp4
-rw-r--r--src/mame/drivers/astrohome.cpp4
-rw-r--r--src/mame/drivers/at.cpp56
-rw-r--r--src/mame/drivers/atari400.cpp18
-rw-r--r--src/mame/drivers/atarig1.cpp2
-rw-r--r--src/mame/drivers/atarigx2.cpp8
-rw-r--r--src/mame/drivers/atarist.cpp22
-rw-r--r--src/mame/drivers/atlantis.cpp2
-rw-r--r--src/mame/drivers/attache.cpp4
-rw-r--r--src/mame/drivers/aussiebyte.cpp4
-rw-r--r--src/mame/drivers/avigo.cpp2
-rw-r--r--src/mame/drivers/avt.cpp2
-rw-r--r--src/mame/drivers/babbage.cpp2
-rw-r--r--src/mame/drivers/badlands.cpp2
-rw-r--r--src/mame/drivers/battlane.cpp6
-rw-r--r--src/mame/drivers/bbc.cpp8
-rw-r--r--src/mame/drivers/bbcbc.cpp2
-rw-r--r--src/mame/drivers/bcs3.cpp2
-rw-r--r--src/mame/drivers/bebox.cpp2
-rw-r--r--src/mame/drivers/bestleag.cpp12
-rw-r--r--src/mame/drivers/beta.cpp4
-rw-r--r--src/mame/drivers/bfm_sc1.cpp6
-rw-r--r--src/mame/drivers/bfm_sc2.cpp8
-rw-r--r--src/mame/drivers/bfm_sc45_helper.cpp60
-rw-r--r--src/mame/drivers/bfmsys85.cpp6
-rw-r--r--src/mame/drivers/bigbord2.cpp4
-rw-r--r--src/mame/drivers/binbug.cpp4
-rw-r--r--src/mame/drivers/bitgraph.cpp4
-rw-r--r--src/mame/drivers/blitz.cpp6
-rw-r--r--src/mame/drivers/bloodbro.cpp10
-rw-r--r--src/mame/drivers/bmcpokr.cpp2
-rw-r--r--src/mame/drivers/bml3.cpp8
-rw-r--r--src/mame/drivers/bnstars.cpp4
-rw-r--r--src/mame/drivers/br8641.cpp2
-rw-r--r--src/mame/drivers/btime.cpp4
-rw-r--r--src/mame/drivers/buggychl.cpp2
-rw-r--r--src/mame/drivers/bullet.cpp42
-rw-r--r--src/mame/drivers/bw12.cpp4
-rw-r--r--src/mame/drivers/bw2.cpp8
-rw-r--r--src/mame/drivers/by35.cpp14
-rw-r--r--src/mame/drivers/c128.cpp14
-rw-r--r--src/mame/drivers/c64.cpp22
-rw-r--r--src/mame/drivers/c80.cpp2
-rw-r--r--src/mame/drivers/calchase.cpp12
-rw-r--r--src/mame/drivers/camplynx.cpp2
-rw-r--r--src/mame/drivers/casloopy.cpp2
-rw-r--r--src/mame/drivers/cbm2.cpp36
-rw-r--r--src/mame/drivers/cc40.cpp8
-rw-r--r--src/mame/drivers/cchasm.cpp2
-rw-r--r--src/mame/drivers/ccs2810.cpp2
-rw-r--r--src/mame/drivers/cgenie.cpp4
-rw-r--r--src/mame/drivers/channelf.cpp2
-rw-r--r--src/mame/drivers/chihiro.cpp14
-rw-r--r--src/mame/drivers/cinemat.cpp16
-rw-r--r--src/mame/drivers/cischeat.cpp2
-rw-r--r--src/mame/drivers/clcd.cpp4
-rw-r--r--src/mame/drivers/cninja.cpp2
-rw-r--r--src/mame/drivers/cobra.cpp104
-rw-r--r--src/mame/drivers/coleco.cpp18
-rw-r--r--src/mame/drivers/compis.cpp8
-rw-r--r--src/mame/drivers/compucolor.cpp4
-rw-r--r--src/mame/drivers/concept.cpp10
-rw-r--r--src/mame/drivers/coolridr.cpp18
-rw-r--r--src/mame/drivers/cops.cpp4
-rw-r--r--src/mame/drivers/cosmic.cpp6
-rw-r--r--src/mame/drivers/cps1.cpp20
-rw-r--r--src/mame/drivers/cps2.cpp124
-rw-r--r--src/mame/drivers/cps3.cpp22
-rw-r--r--src/mame/drivers/crvision.cpp4
-rw-r--r--src/mame/drivers/csplayh5.cpp2
-rw-r--r--src/mame/drivers/ct486.cpp8
-rw-r--r--src/mame/drivers/cubo.cpp4
-rw-r--r--src/mame/drivers/cvs.cpp6
-rw-r--r--src/mame/drivers/cyberbal.cpp2
-rw-r--r--src/mame/drivers/czk80.cpp2
-rw-r--r--src/mame/drivers/dacholer.cpp2
-rw-r--r--src/mame/drivers/dai3wksi.cpp2
-rw-r--r--src/mame/drivers/darius.cpp32
-rw-r--r--src/mame/drivers/dcon.cpp4
-rw-r--r--src/mame/drivers/ddenlovr.cpp14
-rw-r--r--src/mame/drivers/dec0.cpp4
-rw-r--r--src/mame/drivers/decocass.cpp8
-rw-r--r--src/mame/drivers/dectalk.cpp6
-rw-r--r--src/mame/drivers/deshoros.cpp2
-rw-r--r--src/mame/drivers/destroyr.cpp4
-rw-r--r--src/mame/drivers/djmain.cpp10
-rw-r--r--src/mame/drivers/dkong.cpp4
-rw-r--r--src/mame/drivers/dlair.cpp24
-rw-r--r--src/mame/drivers/dmv.cpp28
-rw-r--r--src/mame/drivers/dragon.cpp2
-rw-r--r--src/mame/drivers/dreambal.cpp2
-rw-r--r--src/mame/drivers/drtomy.cpp10
-rw-r--r--src/mame/drivers/dwarfd.cpp16
-rw-r--r--src/mame/drivers/dynax.cpp8
-rw-r--r--src/mame/drivers/dynduke.cpp12
-rw-r--r--src/mame/drivers/ec184x.cpp22
-rw-r--r--src/mame/drivers/einstein.cpp4
-rw-r--r--src/mame/drivers/enmirage.cpp2
-rw-r--r--src/mame/drivers/eolithsp.cpp4
-rw-r--r--src/mame/drivers/ep64.cpp4
-rw-r--r--src/mame/drivers/eprom.cpp4
-rw-r--r--src/mame/drivers/equites.cpp16
-rw-r--r--src/mame/drivers/esd16.cpp12
-rw-r--r--src/mame/drivers/esq1.cpp4
-rw-r--r--src/mame/drivers/esq5505.cpp6
-rw-r--r--src/mame/drivers/ettrivia.cpp2
-rw-r--r--src/mame/drivers/excali64.cpp8
-rw-r--r--src/mame/drivers/exerion.cpp2
-rw-r--r--src/mame/drivers/exidy440.cpp4
-rw-r--r--src/mame/drivers/f1gp.cpp2
-rw-r--r--src/mame/drivers/famibox.cpp12
-rw-r--r--src/mame/drivers/fantland.cpp6
-rw-r--r--src/mame/drivers/fastfred.cpp6
-rw-r--r--src/mame/drivers/fcrash.cpp8
-rw-r--r--src/mame/drivers/firebeat.cpp2
-rw-r--r--src/mame/drivers/firetrk.cpp26
-rw-r--r--src/mame/drivers/fm7.cpp2
-rw-r--r--src/mame/drivers/fmtowns.cpp18
-rw-r--r--src/mame/drivers/fruitpc.cpp2
-rw-r--r--src/mame/drivers/funkball.cpp4
-rw-r--r--src/mame/drivers/gaelco2.cpp56
-rw-r--r--src/mame/drivers/gaelco3d.cpp6
-rw-r--r--src/mame/drivers/galaga.cpp18
-rw-r--r--src/mame/drivers/galaxi.cpp8
-rw-r--r--src/mame/drivers/galaxian.cpp76
-rw-r--r--src/mame/drivers/gamecstl.cpp6
-rw-r--r--src/mame/drivers/gaplus.cpp20
-rw-r--r--src/mame/drivers/gb.cpp6
-rw-r--r--src/mame/drivers/gba.cpp4
-rw-r--r--src/mame/drivers/gcpinbal.cpp2
-rw-r--r--src/mame/drivers/gei.cpp2
-rw-r--r--src/mame/drivers/geneve.cpp4
-rw-r--r--src/mame/drivers/geniusiq.cpp2
-rw-r--r--src/mame/drivers/genpc.cpp10
-rw-r--r--src/mame/drivers/gimix.cpp6
-rw-r--r--src/mame/drivers/goldnpkr.cpp354
-rw-r--r--src/mame/drivers/goldstar.cpp44
-rw-r--r--src/mame/drivers/goodejan.cpp6
-rw-r--r--src/mame/drivers/gottlieb.cpp22
-rw-r--r--src/mame/drivers/gotya.cpp2
-rw-r--r--src/mame/drivers/gp_1.cpp2
-rw-r--r--src/mame/drivers/gp_2.cpp2
-rw-r--r--src/mame/drivers/gridlee.cpp2
-rw-r--r--src/mame/drivers/groundfx.cpp2
-rw-r--r--src/mame/drivers/gstream.cpp2
-rw-r--r--src/mame/drivers/gts1.cpp4
-rw-r--r--src/mame/drivers/gunpey.cpp2
-rw-r--r--src/mame/drivers/harddriv.cpp32
-rw-r--r--src/mame/drivers/hh_hmcs40.cpp20
-rw-r--r--src/mame/drivers/hideseek.cpp6
-rw-r--r--src/mame/drivers/homerun.cpp8
-rw-r--r--src/mame/drivers/horizon.cpp22
-rw-r--r--src/mame/drivers/hornet.cpp6
-rw-r--r--src/mame/drivers/hp64k.cpp6
-rw-r--r--src/mame/drivers/ht68k.cpp6
-rw-r--r--src/mame/drivers/huebler.cpp2
-rw-r--r--src/mame/drivers/hunter2.cpp2
-rw-r--r--src/mame/drivers/hx20.cpp2
-rw-r--r--src/mame/drivers/hyperscan.cpp16
-rw-r--r--src/mame/drivers/ibmpc.cpp10
-rw-r--r--src/mame/drivers/ibmpcjr.cpp8
-rw-r--r--src/mame/drivers/igs009.cpp4
-rw-r--r--src/mame/drivers/igs011.cpp22
-rw-r--r--src/mame/drivers/igspoker.cpp20
-rw-r--r--src/mame/drivers/imds2.cpp6
-rw-r--r--src/mame/drivers/intv.cpp2
-rw-r--r--src/mame/drivers/iq151.cpp28
-rw-r--r--src/mame/drivers/isbc.cpp12
-rw-r--r--src/mame/drivers/iskr103x.cpp16
-rw-r--r--src/mame/drivers/itech32.cpp2
-rw-r--r--src/mame/drivers/itech8.cpp2
-rw-r--r--src/mame/drivers/itt3030.cpp18
-rw-r--r--src/mame/drivers/jack.cpp20
-rw-r--r--src/mame/drivers/jackie.cpp2
-rw-r--r--src/mame/drivers/jaguar.cpp8
-rw-r--r--src/mame/drivers/jalmah.cpp12
-rw-r--r--src/mame/drivers/jangou.cpp2
-rw-r--r--src/mame/drivers/jankenmn.cpp2
-rw-r--r--src/mame/drivers/jclub2.cpp4
-rw-r--r--src/mame/drivers/jollyjgr.cpp2
-rw-r--r--src/mame/drivers/joystand.cpp6
-rw-r--r--src/mame/drivers/jpmimpct.cpp8
-rw-r--r--src/mame/drivers/juicebox.cpp10
-rw-r--r--src/mame/drivers/jupiter.cpp4
-rw-r--r--src/mame/drivers/kaneko16.cpp52
-rw-r--r--src/mame/drivers/kaypro.cpp4
-rw-r--r--src/mame/drivers/kc.cpp14
-rw-r--r--src/mame/drivers/kenseim.cpp2
-rw-r--r--src/mame/drivers/kickgoal.cpp12
-rw-r--r--src/mame/drivers/kingdrby.cpp4
-rw-r--r--src/mame/drivers/kinst.cpp2
-rw-r--r--src/mame/drivers/koikoi.cpp4
-rw-r--r--src/mame/drivers/konamigx.cpp2
-rw-r--r--src/mame/drivers/ksys573.cpp8
-rw-r--r--src/mame/drivers/kyocera.cpp8
-rw-r--r--src/mame/drivers/legionna.cpp122
-rw-r--r--src/mame/drivers/lemmings.cpp6
-rw-r--r--src/mame/drivers/lethal.cpp4
-rw-r--r--src/mame/drivers/lethalj.cpp16
-rw-r--r--src/mame/drivers/liberate.cpp10
-rw-r--r--src/mame/drivers/llc.cpp6
-rw-r--r--src/mame/drivers/lola8a.cpp4
-rw-r--r--src/mame/drivers/m10.cpp2
-rw-r--r--src/mame/drivers/m20.cpp4
-rw-r--r--src/mame/drivers/m24.cpp6
-rw-r--r--src/mame/drivers/m5.cpp2
-rw-r--r--src/mame/drivers/m63.cpp6
-rw-r--r--src/mame/drivers/m92.cpp10
-rw-r--r--src/mame/drivers/mac.cpp42
-rw-r--r--src/mame/drivers/macs.cpp22
-rw-r--r--src/mame/drivers/magictg.cpp2
-rw-r--r--src/mame/drivers/mario.cpp8
-rw-r--r--src/mame/drivers/mbc200.cpp2
-rw-r--r--src/mame/drivers/mbee.cpp2
-rw-r--r--src/mame/drivers/mc1502.cpp2
-rw-r--r--src/mame/drivers/mc80.cpp2
-rw-r--r--src/mame/drivers/mcr.cpp6
-rw-r--r--src/mame/drivers/mcr3.cpp4
-rw-r--r--src/mame/drivers/meadows.cpp2
-rw-r--r--src/mame/drivers/mediagx.cpp10
-rw-r--r--src/mame/drivers/megadriv.cpp12
-rw-r--r--src/mame/drivers/megatech.cpp6
-rw-r--r--src/mame/drivers/meritm.cpp2
-rw-r--r--src/mame/drivers/mexico86.cpp2
-rw-r--r--src/mame/drivers/microvsn.cpp20
-rw-r--r--src/mame/drivers/midqslvr.cpp6
-rw-r--r--src/mame/drivers/midvunit.cpp2
-rw-r--r--src/mame/drivers/mikromik.cpp6
-rw-r--r--src/mame/drivers/miniboy7.cpp2
-rw-r--r--src/mame/drivers/mirage.cpp2
-rw-r--r--src/mame/drivers/missb2.cpp4
-rw-r--r--src/mame/drivers/missile.cpp4
-rw-r--r--src/mame/drivers/mitchell.cpp12
-rw-r--r--src/mame/drivers/model1.cpp4
-rw-r--r--src/mame/drivers/model2.cpp4
-rw-r--r--src/mame/drivers/model3.cpp306
-rw-r--r--src/mame/drivers/mogura.cpp2
-rw-r--r--src/mame/drivers/monty.cpp8
-rw-r--r--src/mame/drivers/mpf1.cpp2
-rw-r--r--src/mame/drivers/mpu3.cpp162
-rw-r--r--src/mame/drivers/mpu4mdm.cpp2
-rw-r--r--src/mame/drivers/mpu4vid.cpp20
-rw-r--r--src/mame/drivers/mpz80.cpp22
-rw-r--r--src/mame/drivers/mquake.cpp2
-rw-r--r--src/mame/drivers/mrgame.cpp2
-rw-r--r--src/mame/drivers/msx.cpp4
-rw-r--r--src/mame/drivers/mtx.cpp4
-rw-r--r--src/mame/drivers/multigam.cpp10
-rw-r--r--src/mame/drivers/mwarr.cpp10
-rw-r--r--src/mame/drivers/myb3k.cpp2
-rw-r--r--src/mame/drivers/mz2000.cpp4
-rw-r--r--src/mame/drivers/mz2500.cpp2
-rw-r--r--src/mame/drivers/mz3500.cpp6
-rw-r--r--src/mame/drivers/n64.cpp2
-rw-r--r--src/mame/drivers/nakajies.cpp4
-rw-r--r--src/mame/drivers/namcoic.cpp8
-rw-r--r--src/mame/drivers/namcona1.cpp2
-rw-r--r--src/mame/drivers/namcos10.cpp4
-rw-r--r--src/mame/drivers/namcos11.cpp4
-rw-r--r--src/mame/drivers/namcos12.cpp2
-rw-r--r--src/mame/drivers/namcos22.cpp10
-rw-r--r--src/mame/drivers/namcos23.cpp2
-rw-r--r--src/mame/drivers/namcos86.cpp6
-rw-r--r--src/mame/drivers/nanos.cpp2
-rw-r--r--src/mame/drivers/naomi.cpp2
-rw-r--r--src/mame/drivers/nascom1.cpp18
-rw-r--r--src/mame/drivers/nbmj9195.cpp4
-rw-r--r--src/mame/drivers/nc.cpp6
-rw-r--r--src/mame/drivers/nemesis.cpp4
-rw-r--r--src/mame/drivers/neogeo.cpp12
-rw-r--r--src/mame/drivers/neogeo_noslot.cpp100
-rw-r--r--src/mame/drivers/nes.cpp4
-rw-r--r--src/mame/drivers/next.cpp18
-rw-r--r--src/mame/drivers/ng_aes.cpp6
-rw-r--r--src/mame/drivers/ngen.cpp14
-rw-r--r--src/mame/drivers/ngp.cpp4
-rw-r--r--src/mame/drivers/nightgal.cpp2
-rw-r--r--src/mame/drivers/ninjaw.cpp10
-rw-r--r--src/mame/drivers/niyanpai.cpp2
-rw-r--r--src/mame/drivers/nmk16.cpp8
-rw-r--r--src/mame/drivers/ob68k1a.cpp2
-rw-r--r--src/mame/drivers/odyssey2.cpp2
-rw-r--r--src/mame/drivers/oric.cpp8
-rw-r--r--src/mame/drivers/osbexec.cpp4
-rw-r--r--src/mame/drivers/osborne1.cpp2
-rw-r--r--src/mame/drivers/osi.cpp2
-rw-r--r--src/mame/drivers/p8k.cpp4
-rw-r--r--src/mame/drivers/palm.cpp2
-rw-r--r--src/mame/drivers/palm_dbg.inc2
-rw-r--r--src/mame/drivers/palmz22.cpp4
-rw-r--r--src/mame/drivers/pasogo.cpp2
-rw-r--r--src/mame/drivers/pasopia.cpp2
-rw-r--r--src/mame/drivers/pasopia7.cpp2
-rw-r--r--src/mame/drivers/pc.cpp2
-rw-r--r--src/mame/drivers/pc1512.cpp22
-rw-r--r--src/mame/drivers/pc8401a.cpp12
-rw-r--r--src/mame/drivers/pc88va.cpp2
-rw-r--r--src/mame/drivers/pc9801.cpp4
-rw-r--r--src/mame/drivers/pcd.cpp6
-rw-r--r--src/mame/drivers/pce.cpp6
-rw-r--r--src/mame/drivers/pcfx.cpp6
-rw-r--r--src/mame/drivers/pcm.cpp2
-rw-r--r--src/mame/drivers/pcw.cpp10
-rw-r--r--src/mame/drivers/pcw16.cpp2
-rw-r--r--src/mame/drivers/pdp1.cpp42
-rw-r--r--src/mame/drivers/pegasus.cpp2
-rw-r--r--src/mame/drivers/peplus.cpp170
-rw-r--r--src/mame/drivers/pet.cpp12
-rw-r--r--src/mame/drivers/photon2.cpp2
-rw-r--r--src/mame/drivers/photoply.cpp2
-rw-r--r--src/mame/drivers/pinball2k.cpp4
-rw-r--r--src/mame/drivers/pinkiri8.cpp2
-rw-r--r--src/mame/drivers/pipedrm.cpp8
-rw-r--r--src/mame/drivers/pipeline.cpp2
-rw-r--r--src/mame/drivers/playmark.cpp78
-rw-r--r--src/mame/drivers/plus4.cpp14
-rw-r--r--src/mame/drivers/poisk1.cpp6
-rw-r--r--src/mame/drivers/polyplay.cpp2
-rw-r--r--src/mame/drivers/portfoli.cpp2
-rw-r--r--src/mame/drivers/powerbal.cpp4
-rw-r--r--src/mame/drivers/primo.cpp6
-rw-r--r--src/mame/drivers/proconn.cpp2
-rw-r--r--src/mame/drivers/prof80.cpp16
-rw-r--r--src/mame/drivers/proteus3.cpp2
-rw-r--r--src/mame/drivers/psikyo.cpp2
-rw-r--r--src/mame/drivers/psikyo4.cpp6
-rw-r--r--src/mame/drivers/pt68k4.cpp28
-rw-r--r--src/mame/drivers/pulsar.cpp4
-rw-r--r--src/mame/drivers/pve500.cpp14
-rw-r--r--src/mame/drivers/px4.cpp42
-rw-r--r--src/mame/drivers/px8.cpp4
-rw-r--r--src/mame/drivers/pzletime.cpp10
-rw-r--r--src/mame/drivers/qdrmfgp.cpp4
-rw-r--r--src/mame/drivers/ql.cpp8
-rw-r--r--src/mame/drivers/queen.cpp8
-rw-r--r--src/mame/drivers/qx10.cpp4
-rw-r--r--src/mame/drivers/r2dx_v33.cpp4
-rw-r--r--src/mame/drivers/raiden.cpp14
-rw-r--r--src/mame/drivers/raiden2.cpp68
-rw-r--r--src/mame/drivers/rainbow.cpp28
-rw-r--r--src/mame/drivers/rallyx.cpp2
-rw-r--r--src/mame/drivers/rc759.cpp2
-rw-r--r--src/mame/drivers/retofinv.cpp4
-rw-r--r--src/mame/drivers/rmnimbus.cpp2
-rw-r--r--src/mame/drivers/rotaryf.cpp2
-rw-r--r--src/mame/drivers/royalmah.cpp4
-rw-r--r--src/mame/drivers/rpunch.cpp2
-rw-r--r--src/mame/drivers/rt1715.cpp2
-rw-r--r--src/mame/drivers/rungun.cpp4
-rw-r--r--src/mame/drivers/s11.cpp2
-rw-r--r--src/mame/drivers/safarir.cpp2
-rw-r--r--src/mame/drivers/sage2.cpp4
-rw-r--r--src/mame/drivers/samcoupe.cpp4
-rw-r--r--src/mame/drivers/saturn.cpp16
-rw-r--r--src/mame/drivers/savquest.cpp10
-rw-r--r--src/mame/drivers/sbrain.cpp2
-rw-r--r--src/mame/drivers/scorpion.cpp2
-rw-r--r--src/mame/drivers/scv.cpp2
-rw-r--r--src/mame/drivers/sealy.cpp2
-rw-r--r--src/mame/drivers/seattle.cpp6
-rw-r--r--src/mame/drivers/segac2.cpp8
-rw-r--r--src/mame/drivers/segag80r.cpp6
-rw-r--r--src/mame/drivers/segag80v.cpp6
-rw-r--r--src/mame/drivers/segahang.cpp2
-rw-r--r--src/mame/drivers/segaorun.cpp4
-rw-r--r--src/mame/drivers/segapico.cpp6
-rw-r--r--src/mame/drivers/segas16a.cpp4
-rw-r--r--src/mame/drivers/segas16b.cpp8
-rw-r--r--src/mame/drivers/segas18.cpp2
-rw-r--r--src/mame/drivers/segas24.cpp16
-rw-r--r--src/mame/drivers/segas32.cpp14
-rw-r--r--src/mame/drivers/segaufo.cpp10
-rw-r--r--src/mame/drivers/segaxbd.cpp20
-rw-r--r--src/mame/drivers/seibuspi.cpp8
-rw-r--r--src/mame/drivers/sengokmj.cpp4
-rw-r--r--src/mame/drivers/seta.cpp14
-rw-r--r--src/mame/drivers/seta2.cpp6
-rw-r--r--src/mame/drivers/sg1000.cpp10
-rw-r--r--src/mame/drivers/shangha3.cpp10
-rw-r--r--src/mame/drivers/sigmab98.cpp2
-rw-r--r--src/mame/drivers/silkroad.cpp12
-rw-r--r--src/mame/drivers/skykid.cpp10
-rw-r--r--src/mame/drivers/slapshot.cpp6
-rw-r--r--src/mame/drivers/slicer.cpp8
-rw-r--r--src/mame/drivers/smc777.cpp2
-rw-r--r--src/mame/drivers/sms.cpp90
-rw-r--r--src/mame/drivers/snes.cpp2
-rw-r--r--src/mame/drivers/snk.cpp4
-rw-r--r--src/mame/drivers/snk6502.cpp6
-rw-r--r--src/mame/drivers/socrates.cpp2
-rw-r--r--src/mame/drivers/softbox.cpp2
-rw-r--r--src/mame/drivers/spc1000.cpp2
-rw-r--r--src/mame/drivers/spectrum.cpp4
-rw-r--r--src/mame/drivers/speedatk.cpp2
-rw-r--r--src/mame/drivers/spoker.cpp10
-rw-r--r--src/mame/drivers/sprint2.cpp4
-rw-r--r--src/mame/drivers/sprint4.cpp6
-rw-r--r--src/mame/drivers/srmp5.cpp2
-rw-r--r--src/mame/drivers/ssfindo.cpp2
-rw-r--r--src/mame/drivers/ssingles.cpp2
-rw-r--r--src/mame/drivers/sslam.cpp12
-rw-r--r--src/mame/drivers/ssv.cpp76
-rw-r--r--src/mame/drivers/starcrus.cpp2
-rw-r--r--src/mame/drivers/starfire.cpp2
-rw-r--r--src/mame/drivers/starshp1.cpp2
-rw-r--r--src/mame/drivers/stlforce.cpp20
-rw-r--r--src/mame/drivers/stratos.cpp6
-rw-r--r--src/mame/drivers/studio2.cpp2
-rw-r--r--src/mame/drivers/stv.cpp6
-rw-r--r--src/mame/drivers/subsino.cpp4
-rw-r--r--src/mame/drivers/subsino2.cpp4
-rw-r--r--src/mame/drivers/suna8.cpp30
-rw-r--r--src/mame/drivers/super6.cpp8
-rw-r--r--src/mame/drivers/super80.cpp2
-rw-r--r--src/mame/drivers/supercon.cpp2
-rw-r--r--src/mame/drivers/superslave.cpp8
-rw-r--r--src/mame/drivers/system1.cpp16
-rw-r--r--src/mame/drivers/system16.cpp18
-rw-r--r--src/mame/drivers/taito_f3.cpp372
-rw-r--r--src/mame/drivers/taito_l.cpp52
-rw-r--r--src/mame/drivers/taitosj.cpp10
-rw-r--r--src/mame/drivers/taitotz.cpp8
-rw-r--r--src/mame/drivers/taitowlf.cpp4
-rw-r--r--src/mame/drivers/tandy1t.cpp36
-rw-r--r--src/mame/drivers/tandy2k.cpp2
-rw-r--r--src/mame/drivers/tankbatt.cpp2
-rw-r--r--src/mame/drivers/tatsumi.cpp2
-rw-r--r--src/mame/drivers/tavernie.cpp2
-rw-r--r--src/mame/drivers/tecnbras.cpp4
-rw-r--r--src/mame/drivers/thayers.cpp16
-rw-r--r--src/mame/drivers/thief.cpp6
-rw-r--r--src/mame/drivers/thomson.cpp4
-rw-r--r--src/mame/drivers/ti99_4p.cpp2
-rw-r--r--src/mame/drivers/ti99_4x.cpp24
-rw-r--r--src/mame/drivers/ti99_8.cpp6
-rw-r--r--src/mame/drivers/tiamc1.cpp16
-rw-r--r--src/mame/drivers/tiki100.cpp10
-rw-r--r--src/mame/drivers/tim011.cpp2
-rw-r--r--src/mame/drivers/timex.cpp4
-rw-r--r--src/mame/drivers/tispeak.cpp2
-rw-r--r--src/mame/drivers/tk2000.cpp2
-rw-r--r--src/mame/drivers/tm990189.cpp4
-rw-r--r--src/mame/drivers/tmaster.cpp4
-rw-r--r--src/mame/drivers/toaplan2.cpp6
-rw-r--r--src/mame/drivers/topspeed.cpp2
-rw-r--r--src/mame/drivers/triforce.cpp2
-rw-r--r--src/mame/drivers/trs80m2.cpp16
-rw-r--r--src/mame/drivers/trvmadns.cpp2
-rw-r--r--src/mame/drivers/tryout.cpp2
-rw-r--r--src/mame/drivers/turrett.cpp2
-rw-r--r--src/mame/drivers/tvc.cpp8
-rw-r--r--src/mame/drivers/twinkle.cpp2
-rw-r--r--src/mame/drivers/tx0.cpp26
-rw-r--r--src/mame/drivers/ultratnk.cpp2
-rw-r--r--src/mame/drivers/undrfire.cpp14
-rw-r--r--src/mame/drivers/univac.cpp4
-rw-r--r--src/mame/drivers/unixpc.cpp2
-rw-r--r--src/mame/drivers/upscope.cpp2
-rw-r--r--src/mame/drivers/usgames.cpp2
-rw-r--r--src/mame/drivers/uzebox.cpp2
-rw-r--r--src/mame/drivers/v1050.cpp8
-rw-r--r--src/mame/drivers/v6809.cpp2
-rw-r--r--src/mame/drivers/vamphalf.cpp60
-rw-r--r--src/mame/drivers/vboy.cpp2
-rw-r--r--src/mame/drivers/vc4000.cpp4
-rw-r--r--src/mame/drivers/vcombat.cpp6
-rw-r--r--src/mame/drivers/vcs80.cpp2
-rw-r--r--src/mame/drivers/vectrex.cpp2
-rw-r--r--src/mame/drivers/vegas.cpp8
-rw-r--r--src/mame/drivers/vertigo.cpp2
-rw-r--r--src/mame/drivers/vic10.cpp4
-rw-r--r--src/mame/drivers/vic20.cpp6
-rw-r--r--src/mame/drivers/vicdual.cpp8
-rw-r--r--src/mame/drivers/victor9k.cpp4
-rw-r--r--src/mame/drivers/vidbrain.cpp2
-rw-r--r--src/mame/drivers/vip.cpp6
-rw-r--r--src/mame/drivers/viper.cpp2
-rw-r--r--src/mame/drivers/vixen.cpp4
-rw-r--r--src/mame/drivers/vk100.cpp2
-rw-r--r--src/mame/drivers/votrpss.cpp2
-rw-r--r--src/mame/drivers/voyager.cpp6
-rw-r--r--src/mame/drivers/vt100.cpp2
-rw-r--r--src/mame/drivers/vtech2.cpp2
-rw-r--r--src/mame/drivers/wangpc.cpp12
-rw-r--r--src/mame/drivers/warriorb.cpp8
-rw-r--r--src/mame/drivers/wecleman.cpp4
-rw-r--r--src/mame/drivers/wicat.cpp14
-rw-r--r--src/mame/drivers/wmg.cpp2
-rw-r--r--src/mame/drivers/wolfpack.cpp6
-rw-r--r--src/mame/drivers/wpc_95.cpp112
-rw-r--r--src/mame/drivers/wpc_an.cpp36
-rw-r--r--src/mame/drivers/wpc_dcs.cpp24
-rw-r--r--src/mame/drivers/wpc_dot.cpp2
-rw-r--r--src/mame/drivers/wpc_s.cpp68
-rw-r--r--src/mame/drivers/wswan.cpp2
-rw-r--r--src/mame/drivers/x07.cpp10
-rw-r--r--src/mame/drivers/x1.cpp12
-rw-r--r--src/mame/drivers/x1twin.cpp4
-rw-r--r--src/mame/drivers/x68k.cpp18
-rw-r--r--src/mame/drivers/xain.cpp6
-rw-r--r--src/mame/drivers/xerox820.cpp12
-rw-r--r--src/mame/drivers/xor100.cpp28
-rw-r--r--src/mame/drivers/xtom3d.cpp4
-rw-r--r--src/mame/drivers/z100.cpp2
-rw-r--r--src/mame/drivers/z80ne.cpp4
-rw-r--r--src/mame/drivers/z88.cpp6
-rw-r--r--src/mame/drivers/z9001.cpp2
-rw-r--r--src/mame/drivers/zac2650.cpp4
-rw-r--r--src/mame/drivers/zaxxon.cpp12
-rw-r--r--src/mame/drivers/zn.cpp8
-rw-r--r--src/mame/drivers/zorba.cpp2
-rw-r--r--src/mame/includes/apollo.h6
-rw-r--r--src/mame/includes/bullet.h2
-rw-r--r--src/mame/includes/bw2.h2
-rw-r--r--src/mame/includes/chihiro.h8
-rw-r--r--src/mame/includes/decocass.h2
-rw-r--r--src/mame/includes/fm7.h2
-rw-r--r--src/mame/includes/hp48.h4
-rw-r--r--src/mame/includes/jaguar.h6
-rw-r--r--src/mame/includes/msx.h8
-rw-r--r--src/mame/includes/namcos2.h2
-rw-r--r--src/mame/includes/osborne1.h8
-rw-r--r--src/mame/includes/rungun.h6
-rw-r--r--src/mame/includes/sage2.h2
-rw-r--r--src/mame/includes/samcoupe.h16
-rw-r--r--src/mame/includes/segaorun.h4
-rw-r--r--src/mame/includes/segas16b.h2
-rw-r--r--src/mame/includes/segaybd.h2
-rw-r--r--src/mame/includes/sms.h2
-rw-r--r--src/mame/includes/svi318.h2
-rw-r--r--src/mame/includes/tandy2k.h4
-rw-r--r--src/mame/includes/trs80.h36
-rw-r--r--src/mame/includes/trs80m2.h2
-rw-r--r--src/mame/includes/xbox.h2
-rw-r--r--src/mame/layout/rungun_dual.lay13
-rw-r--r--src/mame/machine/315-5838_317-0229_comp.cpp20
-rw-r--r--src/mame/machine/315-5881_crypt.cpp2
-rw-r--r--src/mame/machine/315_5296.cpp4
-rw-r--r--src/mame/machine/6883sam.cpp14
-rw-r--r--src/mame/machine/6883sam.h2
-rw-r--r--src/mame/machine/abc1600mac.cpp4
-rw-r--r--src/mame/machine/amiga.cpp6
-rw-r--r--src/mame/machine/amigakbd.cpp12
-rw-r--r--src/mame/machine/amstrad.cpp52
-rw-r--r--src/mame/machine/apollo.cpp8
-rw-r--r--src/mame/machine/apollo_dbg.cpp516
-rw-r--r--src/mame/machine/apollo_kbd.cpp10
-rw-r--r--src/mame/machine/appldriv.cpp16
-rw-r--r--src/mame/machine/apple2.cpp66
-rw-r--r--src/mame/machine/apple2gs.cpp14
-rw-r--r--src/mame/machine/apple3.cpp26
-rw-r--r--src/mame/machine/applefdc.cpp18
-rw-r--r--src/mame/machine/apricotkb_hle.cpp60
-rw-r--r--src/mame/machine/archimds.cpp8
-rw-r--r--src/mame/machine/asic65.cpp6
-rw-r--r--src/mame/machine/asteroid.cpp4
-rw-r--r--src/mame/machine/atarifdc.cpp6
-rw-r--r--src/mame/machine/atarigen.cpp46
-rw-r--r--src/mame/machine/awboard.cpp4
-rw-r--r--src/mame/machine/b2m.cpp2
-rw-r--r--src/mame/machine/balsente.cpp6
-rw-r--r--src/mame/machine/bbc.cpp8
-rw-r--r--src/mame/machine/bebox.cpp10
-rw-r--r--src/mame/machine/bublbobl.cpp2
-rw-r--r--src/mame/machine/c117.cpp4
-rw-r--r--src/mame/machine/c117.h2
-rw-r--r--src/mame/machine/cdi070.cpp4
-rw-r--r--src/mame/machine/cdislave.cpp16
-rw-r--r--src/mame/machine/coco.cpp106
-rw-r--r--src/mame/machine/coco_vhd.h4
-rw-r--r--src/mame/machine/cps2crpt.cpp8
-rw-r--r--src/mame/machine/cuda.cpp4
-rw-r--r--src/mame/machine/dc-ctrl.cpp12
-rw-r--r--src/mame/machine/decocass_tape.cpp10
-rw-r--r--src/mame/machine/dgn_beta.cpp128
-rw-r--r--src/mame/machine/dgnalpha.cpp2
-rw-r--r--src/mame/machine/egret.cpp2
-rw-r--r--src/mame/machine/electron.cpp2
-rw-r--r--src/mame/machine/fd1089.cpp4
-rw-r--r--src/mame/machine/fd1094.cpp20
-rw-r--r--src/mame/machine/gaelco3d.cpp12
-rw-r--r--src/mame/machine/gamecom.cpp4
-rw-r--r--src/mame/machine/gb.cpp4
-rw-r--r--src/mame/machine/gdrom.cpp4
-rw-r--r--src/mame/machine/genpin.h2
-rw-r--r--src/mame/machine/harddriv.cpp18
-rw-r--r--src/mame/machine/hec2hrp.cpp2
-rw-r--r--src/mame/machine/hp48.cpp6
-rw-r--r--src/mame/machine/igs022.cpp2
-rw-r--r--src/mame/machine/igs028.cpp2
-rw-r--r--src/mame/machine/inder_sb.cpp2
-rw-r--r--src/mame/machine/isbc_215g.cpp6
-rw-r--r--src/mame/machine/iteagle_fpga.cpp6
-rw-r--r--src/mame/machine/kaneko_calc3.cpp2
-rw-r--r--src/mame/machine/kaypro.cpp4
-rw-r--r--src/mame/machine/kc.cpp18
-rw-r--r--src/mame/machine/konppc.cpp8
-rw-r--r--src/mame/machine/lynx.cpp6
-rw-r--r--src/mame/machine/mac.cpp10
-rw-r--r--src/mame/machine/maple-dc.cpp4
-rw-r--r--src/mame/machine/mapledev.cpp2
-rw-r--r--src/mame/machine/mbc55x.cpp4
-rw-r--r--src/mame/machine/mbee.cpp2
-rw-r--r--src/mame/machine/mcr.cpp4
-rw-r--r--src/mame/machine/megacd.cpp4
-rw-r--r--src/mame/machine/megacdcd.cpp34
-rw-r--r--src/mame/machine/mexico86.cpp2
-rw-r--r--src/mame/machine/mhavoc.cpp2
-rw-r--r--src/mame/machine/microdrv.h2
-rw-r--r--src/mame/machine/micropolis.cpp16
-rw-r--r--src/mame/machine/microtan.cpp4
-rw-r--r--src/mame/machine/midwayic.cpp20
-rw-r--r--src/mame/machine/mie.cpp8
-rw-r--r--src/mame/machine/mm1kb.cpp2
-rw-r--r--src/mame/machine/model1.cpp100
-rw-r--r--src/mame/machine/model3.cpp8
-rw-r--r--src/mame/machine/msx.cpp18
-rw-r--r--src/mame/machine/mtx.cpp2
-rw-r--r--src/mame/machine/n64.cpp8
-rw-r--r--src/mame/machine/namco51.cpp2
-rw-r--r--src/mame/machine/namcoio.cpp4
-rw-r--r--src/mame/machine/namcos2.cpp10
-rw-r--r--src/mame/machine/naomibd.cpp8
-rw-r--r--src/mame/machine/naomigd.cpp6
-rw-r--r--src/mame/machine/naomim1.cpp8
-rw-r--r--src/mame/machine/naomim4.cpp6
-rw-r--r--src/mame/machine/nb1414m4.cpp2
-rw-r--r--src/mame/machine/ng_memcard.h2
-rw-r--r--src/mame/machine/nmk112.cpp8
-rw-r--r--src/mame/machine/osborne1.cpp2
-rw-r--r--src/mame/machine/pce.cpp4
-rw-r--r--src/mame/machine/pce220_ser.h4
-rw-r--r--src/mame/machine/pgmprot_igs027a_type1.cpp4
-rw-r--r--src/mame/machine/pgmprot_igs027a_type3.cpp4
-rw-r--r--src/mame/machine/pk8020.cpp2
-rw-r--r--src/mame/machine/playch10.cpp22
-rw-r--r--src/mame/machine/pmd85.cpp4
-rw-r--r--src/mame/machine/prof80mmu.cpp2
-rw-r--r--src/mame/machine/psion_pack.cpp6
-rw-r--r--src/mame/machine/psxcd.cpp44
-rw-r--r--src/mame/machine/psxcd.h4
-rw-r--r--src/mame/machine/rm380z.cpp2
-rw-r--r--src/mame/machine/rmnimbus.cpp14
-rw-r--r--src/mame/machine/rx01.cpp10
-rw-r--r--src/mame/machine/samcoupe.cpp14
-rw-r--r--src/mame/machine/scramble.cpp2
-rw-r--r--src/mame/machine/segaic16.cpp58
-rw-r--r--src/mame/machine/segaic16.h4
-rw-r--r--src/mame/machine/seicop.cpp2
-rw-r--r--src/mame/machine/sgi.cpp2
-rw-r--r--src/mame/machine/slapstic.cpp2
-rw-r--r--src/mame/machine/smartmed.cpp12
-rw-r--r--src/mame/machine/smartmed.h2
-rw-r--r--src/mame/machine/sms.cpp6
-rw-r--r--src/mame/machine/snes.cpp20
-rw-r--r--src/mame/machine/sonydriv.cpp8
-rw-r--r--src/mame/machine/special.cpp2
-rw-r--r--src/mame/machine/st0016.cpp6
-rw-r--r--src/mame/machine/super80.cpp2
-rw-r--r--src/mame/machine/svi318.cpp4
-rw-r--r--src/mame/machine/swtpc09.cpp6
-rw-r--r--src/mame/machine/tait8741.cpp16
-rw-r--r--src/mame/machine/taitoio.cpp12
-rw-r--r--src/mame/machine/taitosj.cpp2
-rw-r--r--src/mame/machine/thomflop.cpp10
-rw-r--r--src/mame/machine/thomson.cpp10
-rw-r--r--src/mame/machine/ticket.cpp2
-rw-r--r--src/mame/machine/tnzs.cpp2
-rw-r--r--src/mame/machine/trs80.cpp4
-rw-r--r--src/mame/machine/vector06.cpp2
-rw-r--r--src/mame/machine/vectrex.cpp4
-rw-r--r--src/mame/machine/volfied.cpp2
-rw-r--r--src/mame/machine/vsnes.cpp2
-rw-r--r--src/mame/machine/vtech2.cpp4
-rw-r--r--src/mame/machine/wpc_lamp.cpp2
-rw-r--r--src/mame/machine/wpc_out.cpp2
-rw-r--r--src/mame/machine/x68k_hdc.h4
-rw-r--r--src/mame/machine/xbox.cpp10
-rw-r--r--src/mame/machine/z80ne.cpp2
-rw-r--r--src/mame/machine/zs01.cpp2
-rw-r--r--src/mame/machine/zx8302.cpp2
-rw-r--r--src/mame/video/abc1600.cpp2
-rw-r--r--src/mame/video/abc806.cpp4
-rw-r--r--src/mame/video/amiga.cpp8
-rw-r--r--src/mame/video/amigaaga.cpp8
-rw-r--r--src/mame/video/antic.cpp8
-rw-r--r--src/mame/video/apollo.cpp18
-rw-r--r--src/mame/video/apple1.cpp2
-rw-r--r--src/mame/video/apple2.cpp4
-rw-r--r--src/mame/video/arcadecl.cpp8
-rw-r--r--src/mame/video/argus.cpp4
-rw-r--r--src/mame/video/arkanoid.cpp2
-rw-r--r--src/mame/video/artmagic.cpp2
-rw-r--r--src/mame/video/atarimo.cpp4
-rw-r--r--src/mame/video/atarirle.cpp10
-rw-r--r--src/mame/video/atarisy1.cpp4
-rw-r--r--src/mame/video/atarisy2.cpp2
-rw-r--r--src/mame/video/badlands.cpp2
-rw-r--r--src/mame/video/batman.cpp4
-rw-r--r--src/mame/video/bbusters.cpp2
-rw-r--r--src/mame/video/beathead.cpp2
-rw-r--r--src/mame/video/bfm_dm01.cpp8
-rw-r--r--src/mame/video/blstroid.cpp2
-rw-r--r--src/mame/video/btime.cpp4
-rw-r--r--src/mame/video/buggychl.cpp2
-rw-r--r--src/mame/video/c45.cpp6
-rw-r--r--src/mame/video/calomega.cpp2
-rw-r--r--src/mame/video/cave.cpp20
-rw-r--r--src/mame/video/cclimber.cpp2
-rw-r--r--src/mame/video/chihiro.cpp42
-rw-r--r--src/mame/video/cloak.cpp4
-rw-r--r--src/mame/video/cps1.cpp12
-rw-r--r--src/mame/video/crt.cpp4
-rw-r--r--src/mame/video/cvs.cpp4
-rw-r--r--src/mame/video/cyberbal.cpp4
-rw-r--r--src/mame/video/dassault.cpp4
-rw-r--r--src/mame/video/decbac06.cpp12
-rw-r--r--src/mame/video/deco16ic.cpp26
-rw-r--r--src/mame/video/deco_mlc.cpp2
-rw-r--r--src/mame/video/deco_zoomspr.cpp2
-rw-r--r--src/mame/video/decocomn.cpp2
-rw-r--r--src/mame/video/decodmd2.cpp2
-rw-r--r--src/mame/video/decodmd3.cpp2
-rw-r--r--src/mame/video/dkong.cpp4
-rw-r--r--src/mame/video/dooyong.cpp4
-rw-r--r--src/mame/video/dynax.cpp2
-rw-r--r--src/mame/video/eprom.cpp8
-rw-r--r--src/mame/video/exerion.cpp2
-rw-r--r--src/mame/video/exidy440.cpp2
-rw-r--r--src/mame/video/exterm.cpp4
-rw-r--r--src/mame/video/flkatck.cpp2
-rw-r--r--src/mame/video/fromanc2.cpp8
-rw-r--r--src/mame/video/fuukifg2.cpp2
-rw-r--r--src/mame/video/gaiden.cpp2
-rw-r--r--src/mame/video/galaxian.cpp6
-rw-r--r--src/mame/video/galaxold.cpp10
-rw-r--r--src/mame/video/gauntlet.cpp6
-rw-r--r--src/mame/video/gb_lcd.cpp30
-rw-r--r--src/mame/video/gic.cpp8
-rw-r--r--src/mame/video/gime.cpp10
-rw-r--r--src/mame/video/gp9001.cpp2
-rw-r--r--src/mame/video/gyruss.cpp2
-rw-r--r--src/mame/video/hnayayoi.cpp2
-rw-r--r--src/mame/video/hng64.cpp10
-rw-r--r--src/mame/video/igs017_igs031.cpp2
-rw-r--r--src/mame/video/irobot.cpp2
-rw-r--r--src/mame/video/itech32.cpp8
-rw-r--r--src/mame/video/jalblend.cpp2
-rw-r--r--src/mame/video/k001005.cpp8
-rw-r--r--src/mame/video/k001006.cpp6
-rw-r--r--src/mame/video/k001604.cpp6
-rw-r--r--src/mame/video/k007121.cpp2
-rw-r--r--src/mame/video/k007342.cpp12
-rw-r--r--src/mame/video/k007420.cpp2
-rw-r--r--src/mame/video/k037122.cpp6
-rw-r--r--src/mame/video/k051316.cpp4
-rw-r--r--src/mame/video/k051960.cpp10
-rw-r--r--src/mame/video/k052109.cpp28
-rw-r--r--src/mame/video/k053244_k053245.cpp10
-rw-r--r--src/mame/video/k053246_k053247_k055673.cpp18
-rw-r--r--src/mame/video/k053246_k053247_k055673.h4
-rw-r--r--src/mame/video/k053936.cpp4
-rw-r--r--src/mame/video/k054156_k054157_k056832.cpp22
-rw-r--r--src/mame/video/k054156_k054157_k056832.h2
-rw-r--r--src/mame/video/k054338.cpp4
-rw-r--r--src/mame/video/k057714.cpp8
-rw-r--r--src/mame/video/kan_pand.cpp2
-rw-r--r--src/mame/video/kaneko16.cpp4
-rw-r--r--src/mame/video/klax.cpp2
-rw-r--r--src/mame/video/konamigx.cpp8
-rw-r--r--src/mame/video/legionna.cpp2
-rw-r--r--src/mame/video/liberatr.cpp2
-rw-r--r--src/mame/video/m10.cpp2
-rw-r--r--src/mame/video/madalien.cpp2
-rw-r--r--src/mame/video/magmax.cpp4
-rw-r--r--src/mame/video/maria.cpp8
-rw-r--r--src/mame/video/matmania.cpp8
-rw-r--r--src/mame/video/mb60553.cpp4
-rw-r--r--src/mame/video/mbee.cpp6
-rw-r--r--src/mame/video/mcd212.cpp60
-rw-r--r--src/mame/video/megasys1.cpp2
-rw-r--r--src/mame/video/metro.cpp2
-rw-r--r--src/mame/video/midyunit.cpp2
-rw-r--r--src/mame/video/mitchell.cpp2
-rw-r--r--src/mame/video/model2.cpp24
-rw-r--r--src/mame/video/model3.cpp10
-rw-r--r--src/mame/video/mystston.cpp2
-rw-r--r--src/mame/video/mystwarr.cpp8
-rw-r--r--src/mame/video/n64.cpp8
-rw-r--r--src/mame/video/n64.h2
-rw-r--r--src/mame/video/namcos22.cpp8
-rw-r--r--src/mame/video/naughtyb.cpp4
-rw-r--r--src/mame/video/nbmj8891.cpp6
-rw-r--r--src/mame/video/nbmj8900.cpp6
-rw-r--r--src/mame/video/nemesis.cpp4
-rw-r--r--src/mame/video/neogeo.cpp16
-rw-r--r--src/mame/video/neogeo_spr.cpp2
-rw-r--r--src/mame/video/nick.cpp4
-rw-r--r--src/mame/video/nmk16.cpp2
-rw-r--r--src/mame/video/offtwall.cpp2
-rw-r--r--src/mame/video/pacman.cpp2
-rw-r--r--src/mame/video/pc080sn.cpp10
-rw-r--r--src/mame/video/pc090oj.cpp4
-rw-r--r--src/mame/video/pc_t1t.cpp10
-rw-r--r--src/mame/video/pcw.cpp2
-rw-r--r--src/mame/video/pgm.cpp10
-rw-r--r--src/mame/video/plygonet.cpp2
-rw-r--r--src/mame/video/polepos.cpp2
-rw-r--r--src/mame/video/policetr.cpp2
-rw-r--r--src/mame/video/powervr2.cpp6
-rw-r--r--src/mame/video/ppu2c0x.cpp8
-rw-r--r--src/mame/video/psikyosh.cpp2
-rw-r--r--src/mame/video/punchout.cpp2
-rw-r--r--src/mame/video/rampart.cpp2
-rw-r--r--src/mame/video/rdpblend.h2
-rw-r--r--src/mame/video/rdptpipe.h4
-rw-r--r--src/mame/video/redalert.cpp4
-rw-r--r--src/mame/video/relief.cpp2
-rw-r--r--src/mame/video/rohga.cpp2
-rw-r--r--src/mame/video/rungun.cpp44
-rw-r--r--src/mame/video/segahang.cpp2
-rw-r--r--src/mame/video/segaic16.cpp8
-rw-r--r--src/mame/video/segaic24.cpp4
-rw-r--r--src/mame/video/segaorun.cpp4
-rw-r--r--src/mame/video/segas16a.cpp2
-rw-r--r--src/mame/video/segas16b.cpp2
-rw-r--r--src/mame/video/segas18.cpp2
-rw-r--r--src/mame/video/segas32.cpp10
-rw-r--r--src/mame/video/segaxbd.cpp2
-rw-r--r--src/mame/video/segaybd.cpp2
-rw-r--r--src/mame/video/seibu_crtc.cpp4
-rw-r--r--src/mame/video/seibuspi.cpp12
-rw-r--r--src/mame/video/seta.cpp22
-rw-r--r--src/mame/video/shuuz.cpp2
-rw-r--r--src/mame/video/skullxbo.cpp2
-rw-r--r--src/mame/video/spacefb.cpp2
-rw-r--r--src/mame/video/spbactn.cpp2
-rw-r--r--src/mame/video/spectrum.cpp4
-rw-r--r--src/mame/video/sshangha.cpp4
-rw-r--r--src/mame/video/st0020.cpp2
-rw-r--r--src/mame/video/stic.cpp4
-rw-r--r--src/mame/video/system1.cpp2
-rw-r--r--src/mame/video/system16.cpp8
-rw-r--r--src/mame/video/taito_b.cpp2
-rw-r--r--src/mame/video/taito_f2.cpp20
-rw-r--r--src/mame/video/taito_f3.cpp36
-rw-r--r--src/mame/video/taitojc.cpp2
-rw-r--r--src/mame/video/tc0080vco.cpp26
-rw-r--r--src/mame/video/tc0100scn.cpp20
-rw-r--r--src/mame/video/tc0110pcr.cpp2
-rw-r--r--src/mame/video/tc0150rod.cpp2
-rw-r--r--src/mame/video/tc0180vcu.cpp2
-rw-r--r--src/mame/video/tc0280grd.cpp2
-rw-r--r--src/mame/video/tc0360pri.cpp4
-rw-r--r--src/mame/video/tc0480scp.cpp16
-rw-r--r--src/mame/video/tceptor.cpp2
-rw-r--r--src/mame/video/tecmo16.cpp2
-rw-r--r--src/mame/video/thomson.cpp6
-rw-r--r--src/mame/video/thunderj.cpp4
-rw-r--r--src/mame/video/timex.cpp4
-rw-r--r--src/mame/video/toaplan2.cpp4
-rw-r--r--src/mame/video/tp84.cpp4
-rw-r--r--src/mame/video/tubep.cpp4
-rw-r--r--src/mame/video/twin16.cpp2
-rw-r--r--src/mame/video/twincobr.cpp2
-rw-r--r--src/mame/video/vaportra.cpp4
-rw-r--r--src/mame/video/vigilant.cpp2
-rw-r--r--src/mame/video/vindictr.cpp4
-rw-r--r--src/mame/video/vs920a.cpp2
-rw-r--r--src/mame/video/vtvideo.cpp4
-rw-r--r--src/mame/video/williams.cpp4
-rw-r--r--src/mame/video/x68k.cpp2
-rw-r--r--src/mame/video/xybots.cpp2
-rw-r--r--src/mame/video/ygv608.cpp4
-rw-r--r--src/mame/video/zaccaria.cpp2
-rw-r--r--src/mame/video/zx8301.cpp4
-rw-r--r--src/osd/modules/debugger/debugint.cpp104
-rw-r--r--src/osd/modules/debugger/none.cpp2
-rw-r--r--src/osd/modules/debugger/win/debugbaseinfo.cpp4
-rw-r--r--src/osd/modules/debugger/win/debugwininfo.h2
-rw-r--r--src/osd/modules/debugger/win/disasmbasewininfo.cpp16
-rw-r--r--src/osd/modules/debugger/win/logwininfo.cpp4
-rw-r--r--src/osd/modules/lib/osdlib_win32.cpp4
-rw-r--r--src/osd/modules/lib/osdobj_common.h2
-rw-r--r--src/osd/modules/midi/portmidi.cpp6
-rw-r--r--src/osd/modules/osdmodule.cpp22
-rw-r--r--src/osd/modules/render/d3d/d3d9intf.cpp28
-rw-r--r--src/osd/modules/render/d3d/d3dhlsl.cpp4
-rw-r--r--src/osd/modules/render/draw13.cpp2
-rw-r--r--src/osd/modules/sync/sync_mini.cpp4
-rw-r--r--src/osd/modules/sync/sync_windows.cpp24
-rw-r--r--src/osd/modules/sync/work_mini.cpp6
-rw-r--r--src/osd/osdcore.cpp2
-rw-r--r--src/osd/osdcore.h4
-rw-r--r--src/osd/osdmini/minidir.cpp4
-rw-r--r--src/osd/osdmini/minifile.cpp18
-rw-r--r--src/osd/osdmini/minimain.cpp2
-rw-r--r--src/osd/osdmini/minimisc.cpp4
-rw-r--r--src/osd/osdnet.cpp6
-rw-r--r--src/osd/sdl/watchdog.cpp2
-rw-r--r--src/osd/windows/ledutil.cpp50
-rw-r--r--src/osd/windows/output.cpp26
-rw-r--r--src/osd/windows/winsocket.cpp14
-rw-r--r--src/tools/castool.cpp8
-rw-r--r--src/tools/chdman.cpp218
-rw-r--r--src/tools/floptool.cpp4
-rw-r--r--src/tools/imgtool/charconv.cpp8
-rw-r--r--src/tools/imgtool/filtbas.cpp88
-rw-r--r--src/tools/imgtool/filteoln.cpp10
-rw-r--r--src/tools/imgtool/filter.cpp10
-rw-r--r--src/tools/imgtool/iflopimg.cpp12
-rw-r--r--src/tools/imgtool/imghd.cpp6
-rw-r--r--src/tools/imgtool/imgtool.cpp190
-rw-r--r--src/tools/imgtool/library.cpp12
-rw-r--r--src/tools/imgtool/library.h6
-rw-r--r--src/tools/imgtool/main.cpp98
-rw-r--r--src/tools/imgtool/modules.cpp12
-rw-r--r--src/tools/imgtool/stream.cpp44
-rw-r--r--src/tools/jedutil.cpp198
-rw-r--r--src/tools/ldresample.cpp10
-rw-r--r--src/tools/ldverify.cpp14
-rw-r--r--src/tools/pngcmp.cpp12
-rw-r--r--src/tools/regrep.cpp86
-rw-r--r--src/tools/romcmp.cpp24
-rw-r--r--src/tools/split.cpp38
-rw-r--r--src/tools/src2html.cpp52
-rw-r--r--src/tools/srcclean.cpp6
-rw-r--r--src/tools/unidasm.cpp6
2200 files changed, 17898 insertions, 17869 deletions
diff --git a/src/devices/bus/a1bus/a1bus.cpp b/src/devices/bus/a1bus/a1bus.cpp
index ab00e304b22..c3ebc73c6de 100644
--- a/src/devices/bus/a1bus/a1bus.cpp
+++ b/src/devices/bus/a1bus/a1bus.cpp
@@ -102,7 +102,7 @@ void a1bus_device::device_start()
m_out_nmi_cb.resolve_safe();
// clear slot
- m_device = NULL;
+ m_device = nullptr;
}
//-------------------------------------------------
diff --git a/src/devices/bus/a1bus/a1cffa.cpp b/src/devices/bus/a1bus/a1cffa.cpp
index 362b712eb56..912401a0642 100644
--- a/src/devices/bus/a1bus/a1cffa.cpp
+++ b/src/devices/bus/a1bus/a1cffa.cpp
@@ -24,7 +24,7 @@
const device_type A1BUS_CFFA = &device_creator<a1bus_cffa_device>;
MACHINE_CONFIG_FRAGMENT( cffa )
- MCFG_ATA_INTERFACE_ADD(CFFA_ATA_TAG, ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD(CFFA_ATA_TAG, ata_devices, "hdd", nullptr, false)
MACHINE_CONFIG_END
ROM_START( cffa )
diff --git a/src/devices/bus/a2bus/a2bus.cpp b/src/devices/bus/a2bus/a2bus.cpp
index 4bf2c21a40e..5fd03495c87 100644
--- a/src/devices/bus/a2bus/a2bus.cpp
+++ b/src/devices/bus/a2bus/a2bus.cpp
@@ -168,9 +168,9 @@ void a2bus_device::device_start()
m_out_inh_cb.resolve_safe();
// clear slots
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_device_list)
{
- m_device_list[i] = NULL;
+ elem = nullptr;
}
m_slot_irq_mask = m_slot_nmi_mask = 0;
@@ -188,7 +188,7 @@ device_a2bus_card_interface *a2bus_device::get_a2bus_card(int slot)
{
if (slot < 0)
{
- return NULL;
+ return nullptr;
}
if (m_device_list[slot])
@@ -196,7 +196,7 @@ device_a2bus_card_interface *a2bus_device::get_a2bus_card(int slot)
return m_device_list[slot];
}
- return NULL;
+ return nullptr;
}
void a2bus_device::add_a2bus_card(int slot, device_a2bus_card_interface *card)
diff --git a/src/devices/bus/a2bus/a2cffa.cpp b/src/devices/bus/a2bus/a2cffa.cpp
index 8d91efea971..aa7f6336ce2 100644
--- a/src/devices/bus/a2bus/a2cffa.cpp
+++ b/src/devices/bus/a2bus/a2cffa.cpp
@@ -34,7 +34,7 @@ const device_type A2BUS_CFFA2_6502 = &device_creator<a2bus_cffa2_6502_device>;
#define CFFA2_ATA_TAG "cffa2_ata"
MACHINE_CONFIG_FRAGMENT( cffa2 )
- MCFG_ATA_INTERFACE_ADD(CFFA2_ATA_TAG, ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD(CFFA2_ATA_TAG, ata_devices, "hdd", nullptr, false)
// not yet, the core explodes
// MCFG_SOFTWARE_LIST_ADD("hdd_list", "apple2gs_hdd")
diff --git a/src/devices/bus/a2bus/a2eauxslot.cpp b/src/devices/bus/a2bus/a2eauxslot.cpp
index 4d272f02497..f1d4836d37b 100644
--- a/src/devices/bus/a2bus/a2eauxslot.cpp
+++ b/src/devices/bus/a2bus/a2eauxslot.cpp
@@ -104,7 +104,7 @@ void a2eauxslot_device::device_start()
m_out_nmi_cb.resolve_safe();
// clear slot
- m_device = NULL;
+ m_device = nullptr;
}
//-------------------------------------------------
diff --git a/src/devices/bus/a2bus/a2hsscsi.cpp b/src/devices/bus/a2bus/a2hsscsi.cpp
index 806773dc9bd..fa2744c995e 100644
--- a/src/devices/bus/a2bus/a2hsscsi.cpp
+++ b/src/devices/bus/a2bus/a2hsscsi.cpp
@@ -70,12 +70,12 @@ SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( hsscsi )
MCFG_NSCSI_BUS_ADD(SCSI_BUS_TAG)
- MCFG_NSCSI_ADD("scsibus:0", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:1", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:2", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:3", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:4", hsscsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:5", hsscsi_devices, 0, false)
+ MCFG_NSCSI_ADD("scsibus:0", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:1", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:2", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:3", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:4", hsscsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:5", hsscsi_devices, nullptr, false)
MCFG_NSCSI_ADD("scsibus:6", hsscsi_devices, "harddisk", false)
MCFG_NSCSI_ADD("scsibus:7", hsscsi_devices, "ncr5380", true)
MCFG_DEVICE_CARD_MACHINE_CONFIG("ncr5380", ncr5380)
diff --git a/src/devices/bus/a2bus/a2mcms.cpp b/src/devices/bus/a2bus/a2mcms.cpp
index b26fcaf3256..ad7f621d6c8 100644
--- a/src/devices/bus/a2bus/a2mcms.cpp
+++ b/src/devices/bus/a2bus/a2mcms.cpp
@@ -223,8 +223,8 @@ void mcms_device::device_start()
{
m_write_irq.resolve();
m_stream = machine().sound().stream_alloc(*this, 0, 2, 31250);
- m_timer = timer_alloc(0, NULL);
- m_clrtimer = timer_alloc(1, NULL);
+ m_timer = timer_alloc(0, nullptr);
+ m_clrtimer = timer_alloc(1, nullptr);
m_enabled = false;
memset(m_vols, 0, sizeof(m_vols));
memset(m_table, 0, sizeof(m_table));
@@ -232,9 +232,9 @@ void mcms_device::device_start()
memset(m_acc, 0, sizeof(m_acc));
// the card detect programs volumes and wavetable page but not freq and expects the accumulator to increment
- for (int i = 0; i < 16; i++)
+ for (auto & elem : m_freq)
{
- m_freq[i] = 0x0040;
+ elem = 0x0040;
}
save_item(NAME(m_enabled));
diff --git a/src/devices/bus/a2bus/a2pic.cpp b/src/devices/bus/a2bus/a2pic.cpp
index 78da204e894..f47f964f192 100644
--- a/src/devices/bus/a2bus/a2pic.cpp
+++ b/src/devices/bus/a2bus/a2pic.cpp
@@ -131,7 +131,7 @@ void a2bus_pic_device::device_start()
m_rom = device().machine().root_device().memregion(this->subtag(PIC_ROM_REGION).c_str())->base();
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(attotime::never);
save_item(NAME(m_ack));
diff --git a/src/devices/bus/a2bus/a2scsi.cpp b/src/devices/bus/a2bus/a2scsi.cpp
index d3958e41f89..50a715893bf 100644
--- a/src/devices/bus/a2bus/a2scsi.cpp
+++ b/src/devices/bus/a2bus/a2scsi.cpp
@@ -63,12 +63,12 @@ SLOT_INTERFACE_END
MACHINE_CONFIG_FRAGMENT( scsi )
MCFG_NSCSI_BUS_ADD(SCSI_BUS_TAG)
- MCFG_NSCSI_ADD("scsibus:0", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:1", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:2", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:3", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:4", scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:5", scsi_devices, 0, false)
+ MCFG_NSCSI_ADD("scsibus:0", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:1", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:2", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:3", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:4", scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:5", scsi_devices, nullptr, false)
MCFG_NSCSI_ADD("scsibus:6", scsi_devices, "harddisk", false)
MCFG_NSCSI_ADD("scsibus:7", scsi_devices, "ncr5380", true)
MCFG_DEVICE_CARD_MACHINE_CONFIG("ncr5380", ncr5380)
diff --git a/src/devices/bus/a2bus/a2ssc.cpp b/src/devices/bus/a2bus/a2ssc.cpp
index d7215435fda..d2765ebc557 100644
--- a/src/devices/bus/a2bus/a2ssc.cpp
+++ b/src/devices/bus/a2bus/a2ssc.cpp
@@ -32,7 +32,7 @@ MACHINE_CONFIG_FRAGMENT( ssc )
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(a2bus_ssc_device, acia_irq_w))
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(SSC_RS232_TAG, rs232_port_device, write_txd))
- MCFG_RS232_PORT_ADD(SSC_RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(SSC_RS232_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(SSC_ACIA_TAG, mos6551_device, write_dsr))
diff --git a/src/devices/bus/a2bus/a2vulcan.cpp b/src/devices/bus/a2bus/a2vulcan.cpp
index 04c16505ed7..f917d179ffd 100644
--- a/src/devices/bus/a2bus/a2vulcan.cpp
+++ b/src/devices/bus/a2bus/a2vulcan.cpp
@@ -69,7 +69,7 @@ const device_type A2BUS_VULCANGOLD = &device_creator<a2bus_vulcangold_device>;
#define VULCAN_ATA_TAG "vulcan_ata"
static MACHINE_CONFIG_FRAGMENT( vulcan )
- MCFG_ATA_INTERFACE_ADD(VULCAN_ATA_TAG, ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD(VULCAN_ATA_TAG, ata_devices, "hdd", nullptr, false)
MACHINE_CONFIG_END
ROM_START( vulcan )
diff --git a/src/devices/bus/a2bus/a2zipdrive.cpp b/src/devices/bus/a2bus/a2zipdrive.cpp
index a095578372b..8213a63e010 100644
--- a/src/devices/bus/a2bus/a2zipdrive.cpp
+++ b/src/devices/bus/a2bus/a2zipdrive.cpp
@@ -34,7 +34,7 @@ const device_type A2BUS_ZIPDRIVE = &device_creator<a2bus_zipdrive_device>;
#define ZIPDRIVE_ATA_TAG "zipdrive_ata"
static MACHINE_CONFIG_FRAGMENT( zipdrive )
- MCFG_ATA_INTERFACE_ADD(ZIPDRIVE_ATA_TAG, ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD(ZIPDRIVE_ATA_TAG, ata_devices, "hdd", nullptr, false)
MACHINE_CONFIG_END
ROM_START( zipdrive )
diff --git a/src/devices/bus/a2bus/corvfdc01.cpp b/src/devices/bus/a2bus/corvfdc01.cpp
index de935ff7caa..c8f93b725d1 100644
--- a/src/devices/bus/a2bus/corvfdc01.cpp
+++ b/src/devices/bus/a2bus/corvfdc01.cpp
@@ -151,7 +151,7 @@ void a2bus_corvfdc01_device::device_reset()
{
m_fdc_local_status = 0;
m_fdc_local_command = 0;
- m_curfloppy = NULL;
+ m_curfloppy = nullptr;
}
/*-------------------------------------------------
@@ -194,7 +194,7 @@ UINT8 a2bus_corvfdc01_device::read_c0nx(address_space &space, UINT8 offset)
void a2bus_corvfdc01_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
{
int current_drive;
- floppy_image_device *floppy = 0;
+ floppy_image_device *floppy = nullptr;
switch (offset)
{
@@ -205,16 +205,16 @@ void a2bus_corvfdc01_device::write_c0nx(address_space &space, UINT8 offset, UINT
switch (current_drive)
{
case 0:
- floppy = m_con1 ? m_con1->get_device() : 0;
+ floppy = m_con1 ? m_con1->get_device() : nullptr;
break;
case 1:
- floppy = m_con2 ? m_con2->get_device() : 0;
+ floppy = m_con2 ? m_con2->get_device() : nullptr;
break;
case 2:
- floppy = m_con3 ? m_con3->get_device() : 0;
+ floppy = m_con3 ? m_con3->get_device() : nullptr;
break;
case 3:
- floppy = m_con4 ? m_con4->get_device() : 0;
+ floppy = m_con4 ? m_con4->get_device() : nullptr;
break;
}
@@ -223,7 +223,7 @@ void a2bus_corvfdc01_device::write_c0nx(address_space &space, UINT8 offset, UINT
m_wdfdc->set_floppy(floppy);
}
- if (m_curfloppy != NULL)
+ if (m_curfloppy != nullptr)
{
// side select
m_curfloppy->ss_w((data & LC_FLPSD1_mask) != 0);
diff --git a/src/devices/bus/a2bus/corvfdc02.cpp b/src/devices/bus/a2bus/corvfdc02.cpp
index 6e9c9bb9eca..870fc194bfb 100644
--- a/src/devices/bus/a2bus/corvfdc02.cpp
+++ b/src/devices/bus/a2bus/corvfdc02.cpp
@@ -178,7 +178,7 @@ UINT8 a2bus_corvfdc02_device::read_c0nx(address_space &space, UINT8 offset)
void a2bus_corvfdc02_device::write_c0nx(address_space &space, UINT8 offset, UINT8 data)
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
switch (offset)
{
@@ -208,16 +208,16 @@ void a2bus_corvfdc02_device::write_c0nx(address_space &space, UINT8 offset, UINT
switch (data & 3)
{
case 0:
- floppy = m_con1 ? m_con1->get_device() : 0;
+ floppy = m_con1 ? m_con1->get_device() : nullptr;
break;
case 1:
- floppy = m_con2 ? m_con2->get_device() : 0;
+ floppy = m_con2 ? m_con2->get_device() : nullptr;
break;
case 2:
- floppy = m_con3 ? m_con3->get_device() : 0;
+ floppy = m_con3 ? m_con3->get_device() : nullptr;
break;
case 3:
- floppy = m_con4 ? m_con4->get_device() : 0;
+ floppy = m_con4 ? m_con4->get_device() : nullptr;
break;
}
@@ -230,7 +230,7 @@ void a2bus_corvfdc02_device::write_c0nx(address_space &space, UINT8 offset, UINT
}
}
- if (m_curfloppy != NULL)
+ if (m_curfloppy != nullptr)
{
// motor control (active low)
m_curfloppy->mon_w((data & 8) ? 1 : 0);
diff --git a/src/devices/bus/a2bus/mouse.cpp b/src/devices/bus/a2bus/mouse.cpp
index 0a2b110c8dc..3d4e11d3487 100644
--- a/src/devices/bus/a2bus/mouse.cpp
+++ b/src/devices/bus/a2bus/mouse.cpp
@@ -211,8 +211,8 @@ void a2bus_mouse_device::device_start()
m_rom = device().machine().root_device().memregion(this->subtag(MOUSE_ROM_REGION).c_str())->base();
// allocate two timers: one for the 68705, one for the quadrature magic
- m_timer = timer_alloc(TIMER_68705, NULL);
- m_read_timer = timer_alloc(TIMER_QUADRATURE, NULL);
+ m_timer = timer_alloc(TIMER_68705, nullptr);
+ m_read_timer = timer_alloc(TIMER_QUADRATURE, nullptr);
m_timer->adjust(attotime::never, TIMER_68705);
m_read_timer->adjust(attotime::never, TIMER_QUADRATURE);
diff --git a/src/devices/bus/a7800/a78_slot.cpp b/src/devices/bus/a7800/a78_slot.cpp
index 92f3ff215b4..7fda107b70c 100644
--- a/src/devices/bus/a7800/a78_slot.cpp
+++ b/src/devices/bus/a7800/a78_slot.cpp
@@ -42,7 +42,7 @@ const device_type A78_CART_SLOT = &device_creator<a78_cart_slot_device>;
device_a78_cart_interface::device_a78_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),
m_base_rom(0x8000),
m_bank_mask(0)
@@ -64,7 +64,7 @@ device_a78_cart_interface::~device_a78_cart_interface ()
void device_a78_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(A78SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -322,10 +322,10 @@ static const a78_slot slot_list[] =
static int a78_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -333,10 +333,10 @@ static int a78_get_pcb_id(const char *slot)
static const char *a78_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "a78_rom";
@@ -348,7 +348,7 @@ bool a78_cart_slot_device::call_load()
{
UINT32 len;
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
const char *pcb_name;
bool has_ram = get_software_region("ram") ? TRUE : FALSE;
@@ -358,7 +358,7 @@ bool a78_cart_slot_device::call_load()
m_cart->rom_alloc(len, tag());
memcpy(m_cart->get_rom_base(), get_software_region("rom"), len);
- if ((pcb_name = get_feature("slot")) != NULL)
+ if ((pcb_name = get_feature("slot")) != nullptr)
m_type = a78_get_pcb_id(pcb_name);
else
m_type = A78_TYPE0;
diff --git a/src/devices/bus/a7800/a78_slot.h b/src/devices/bus/a7800/a78_slot.h
index ff41ae8a608..3db230fa2b3 100644
--- a/src/devices/bus/a7800/a78_slot.h
+++ b/src/devices/bus/a7800/a78_slot.h
@@ -100,7 +100,7 @@ public:
int get_cart_type() { return m_type; };
int identify_cart_type(UINT8 *ROM, UINT32 len);
- bool has_cart() { return m_cart != NULL; }
+ bool has_cart() { return m_cart != nullptr; }
virtual iodevice_t image_type() const { return IO_CARTSLOT; }
virtual bool is_readable() const { return 1; }
@@ -108,7 +108,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "a7800_cart"; }
virtual const char *file_extensions() const { return "bin,a78"; }
virtual device_image_partialhash_func get_partial_hash() const { return &a78_partialhash; }
diff --git a/src/devices/bus/a7800/hiscore.cpp b/src/devices/bus/a7800/hiscore.cpp
index cbdab10f02d..3448fb85808 100644
--- a/src/devices/bus/a7800/hiscore.cpp
+++ b/src/devices/bus/a7800/hiscore.cpp
@@ -28,7 +28,7 @@ a78_hiscore_device::a78_hiscore_device(const machine_config &mconfig, const char
static MACHINE_CONFIG_FRAGMENT( a78_highscore )
- MCFG_A78_CARTRIDGE_ADD("hsc_slot", a7800_cart, NULL)
+ MCFG_A78_CARTRIDGE_ADD("hsc_slot", a7800_cart, nullptr)
MACHINE_CONFIG_END
machine_config_constructor a78_hiscore_device::device_mconfig_additions() const
diff --git a/src/devices/bus/a7800/xboard.cpp b/src/devices/bus/a7800/xboard.cpp
index 4f4cecc9c8e..af05c663440 100644
--- a/src/devices/bus/a7800/xboard.cpp
+++ b/src/devices/bus/a7800/xboard.cpp
@@ -107,7 +107,7 @@ void a78_xm_device::device_reset()
static MACHINE_CONFIG_FRAGMENT( a78_xb )
- MCFG_A78_CARTRIDGE_ADD("xb_slot", a7800_cart, NULL)
+ MCFG_A78_CARTRIDGE_ADD("xb_slot", a7800_cart, nullptr)
MCFG_SPEAKER_STANDARD_MONO("xb_speaker")
@@ -116,7 +116,7 @@ static MACHINE_CONFIG_FRAGMENT( a78_xb )
MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( a78_xm )
- MCFG_A78_CARTRIDGE_ADD("xb_slot", a7800_cart, NULL)
+ MCFG_A78_CARTRIDGE_ADD("xb_slot", a7800_cart, nullptr)
MCFG_SPEAKER_STANDARD_MONO("xb_speaker")
diff --git a/src/devices/bus/a800/a800_slot.cpp b/src/devices/bus/a800/a800_slot.cpp
index 399b744ac5f..148ab38ed03 100644
--- a/src/devices/bus/a800/a800_slot.cpp
+++ b/src/devices/bus/a800/a800_slot.cpp
@@ -40,7 +40,7 @@ const device_type XEGS_CART_SLOT = &device_creator<xegs_cart_slot_device>;
device_a800_cart_interface::device_a800_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),
m_bank_mask(0)
{
@@ -61,7 +61,7 @@ device_a800_cart_interface::~device_a800_cart_interface ()
void device_a800_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(A800SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -216,10 +216,10 @@ static const a800_slot slot_list[] =
static int a800_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -227,10 +227,10 @@ static int a800_get_pcb_id(const char *slot)
static const char *a800_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "a800_8k";
@@ -242,7 +242,7 @@ bool a800_cart_slot_device::call_load()
{
UINT32 len;
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
const char *pcb_name;
len = get_software_region_length("rom");
@@ -250,7 +250,7 @@ bool a800_cart_slot_device::call_load()
m_cart->rom_alloc(len, tag());
memcpy(m_cart->get_rom_base(), get_software_region("rom"), len);
- if ((pcb_name = get_feature("slot")) != NULL)
+ if ((pcb_name = get_feature("slot")) != nullptr)
m_type = a800_get_pcb_id(pcb_name);
else
m_type = A800_8K;
diff --git a/src/devices/bus/a800/a800_slot.h b/src/devices/bus/a800/a800_slot.h
index 8359b9c7178..8602748ff22 100644
--- a/src/devices/bus/a800/a800_slot.h
+++ b/src/devices/bus/a800/a800_slot.h
@@ -100,7 +100,7 @@ public:
int get_cart_type() { return m_type; };
int identify_cart_type(UINT8 *header);
- bool has_cart() { return m_cart != NULL; }
+ bool has_cart() { return m_cart != nullptr; }
virtual iodevice_t image_type() const { return IO_CARTSLOT; }
virtual bool is_readable() const { return 1; }
@@ -108,7 +108,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "a8bit_cart"; }
virtual const char *file_extensions() const { return "bin,rom,car"; }
diff --git a/src/devices/bus/a800/a8sio.cpp b/src/devices/bus/a800/a8sio.cpp
index 42f8474037c..54f45ecb208 100644
--- a/src/devices/bus/a800/a8sio.cpp
+++ b/src/devices/bus/a800/a8sio.cpp
@@ -126,7 +126,7 @@ void a8sio_device::device_start()
m_out_audio_in_cb.resolve_safe();
// clear slot
- m_device = NULL;
+ m_device = nullptr;
}
//-------------------------------------------------
@@ -181,8 +181,8 @@ WRITE8_MEMBER( a8sio_device::audio_in_w )
device_a8sio_card_interface::device_a8sio_card_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device)
- , m_a8sio(NULL)
- , m_a8sio_tag(NULL), m_a8sio_slottag(nullptr)
+ , m_a8sio(nullptr)
+ , m_a8sio_tag(nullptr), m_a8sio_slottag(nullptr)
{
}
diff --git a/src/devices/bus/abcbus/abc890.cpp b/src/devices/bus/abcbus/abc890.cpp
index ecfc1abf4d2..dc2b88106ae 100644
--- a/src/devices/bus/abcbus/abc890.cpp
+++ b/src/devices/bus/abcbus/abc890.cpp
@@ -27,13 +27,13 @@ const device_type ABC856 = &device_creator<abc856_t>;
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( abc890 )
- MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("mem1", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("mem2", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("mem3", abcbus_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("mem1", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("mem2", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("mem3", abcbus_cards, nullptr)
MACHINE_CONFIG_END
@@ -54,12 +54,12 @@ machine_config_constructor abc890_t::device_mconfig_additions() const
static MACHINE_CONFIG_FRAGMENT( abc_expansion_unit )
MCFG_ABCBUS_SLOT_ADD("io1", abc80_cards, "abc830")
- MCFG_ABCBUS_SLOT_ADD("io2", abc80_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io3", abc80_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io4", abc80_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("io2", abc80_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io3", abc80_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abc80_cards, nullptr)
MCFG_ABCBUS_SLOT_ADD("mem1", abc80_cards, "memcard")
MCFG_ABCBUS_SLOT_ADD("mem2", abc80_cards, "16k")
- MCFG_ABCBUS_SLOT_ADD("mem3", abc80_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("mem3", abc80_cards, nullptr)
MACHINE_CONFIG_END
@@ -79,9 +79,9 @@ machine_config_constructor abc_expansion_unit_t::device_mconfig_additions() cons
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( abc894 )
- MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
MACHINE_CONFIG_END
@@ -104,11 +104,11 @@ static MACHINE_CONFIG_FRAGMENT( abc850 )
MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, "abc850fdd")
MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, "xebec")
MCFG_DEVICE_CARD_DEFAULT_BIOS("xebec", "ro202")
- MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io5", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io6", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io7", abcbus_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io5", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io6", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io7", abcbus_cards, nullptr)
MACHINE_CONFIG_END
@@ -131,11 +131,11 @@ static MACHINE_CONFIG_FRAGMENT( abc852 )
MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, "abc850fdd")
MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, "xebec")
MCFG_DEVICE_CARD_DEFAULT_BIOS("xebec", "basf6185")
- MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io5", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io6", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io7", abcbus_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io5", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io6", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io7", abcbus_cards, nullptr)
MACHINE_CONFIG_END
@@ -158,11 +158,11 @@ static MACHINE_CONFIG_FRAGMENT( abc856 )
MCFG_ABCBUS_SLOT_ADD("io1", abcbus_cards, "abc850fdd")
MCFG_ABCBUS_SLOT_ADD("io2", abcbus_cards, "xebec")
MCFG_DEVICE_CARD_DEFAULT_BIOS("xebec", "micr1325")
- MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io5", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io6", abcbus_cards, NULL)
- MCFG_ABCBUS_SLOT_ADD("io7", abcbus_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("io3", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io4", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io5", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io6", abcbus_cards, nullptr)
+ MCFG_ABCBUS_SLOT_ADD("io7", abcbus_cards, nullptr)
MACHINE_CONFIG_END
@@ -239,7 +239,7 @@ void abc890_t::device_start()
void abc890_t::device_reset()
{
- for (device_t *device = first_subdevice(); device != NULL; device = device->next())
+ for (device_t *device = first_subdevice(); device != nullptr; device = device->next())
{
device->reset();
}
@@ -254,7 +254,7 @@ void abc890_t::abcbus_cs(UINT8 data)
{
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
slot->cs_w(data);
}
@@ -271,7 +271,7 @@ UINT8 abc890_t::abcbus_inp()
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
data &= slot->inp_r();
}
@@ -288,7 +288,7 @@ void abc890_t::abcbus_out(UINT8 data)
{
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
slot->out_w(data);
}
@@ -305,7 +305,7 @@ UINT8 abc890_t::abcbus_stat()
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
data &= slot->stat_r();
}
@@ -322,7 +322,7 @@ void abc890_t::abcbus_c1(UINT8 data)
{
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
slot->c1_w(data);
}
@@ -337,7 +337,7 @@ void abc890_t::abcbus_c2(UINT8 data)
{
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
slot->c2_w(data);
}
@@ -352,7 +352,7 @@ void abc890_t::abcbus_c3(UINT8 data)
{
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
slot->c3_w(data);
}
@@ -367,7 +367,7 @@ void abc890_t::abcbus_c4(UINT8 data)
{
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
slot->c4_w(data);
}
@@ -384,7 +384,7 @@ UINT8 abc890_t::abcbus_xmemfl(offs_t offset)
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
data &= slot->xmemfl_r(offset);
}
@@ -401,7 +401,7 @@ void abc890_t::abcbus_xmemw(offs_t offset, UINT8 data)
{
abcbus_slot_device_iterator iter(*this);
- for (abcbus_slot_t *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (abcbus_slot_t *slot = iter.first(); slot != nullptr; slot = iter.next())
{
slot->xmemw_w(offset, data);
}
diff --git a/src/devices/bus/abcbus/fd2.cpp b/src/devices/bus/abcbus/fd2.cpp
index cf4f35121d1..6a7c4cc5f4d 100644
--- a/src/devices/bus/abcbus/fd2.cpp
+++ b/src/devices/bus/abcbus/fd2.cpp
@@ -188,7 +188,7 @@ WRITE8_MEMBER( abc_fd2_t::pio_pb_w )
*/
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -212,7 +212,7 @@ WRITE8_MEMBER( abc_fd2_t::pio_pb_w )
static const z80_daisy_config daisy_chain[] =
{
{ Z80PIO_TAG },
- { NULL }
+ { nullptr }
};
diff --git a/src/devices/bus/abcbus/hdc.cpp b/src/devices/bus/abcbus/hdc.cpp
index 628fbcb2d7d..7450f60819e 100644
--- a/src/devices/bus/abcbus/hdc.cpp
+++ b/src/devices/bus/abcbus/hdc.cpp
@@ -72,7 +72,7 @@ ADDRESS_MAP_END
static const z80_daisy_config daisy_chain[] =
{
- { NULL }
+ { nullptr }
};
diff --git a/src/devices/bus/abcbus/lux10828.cpp b/src/devices/bus/abcbus/lux10828.cpp
index 2f0831f98f5..32bc5e619bc 100644
--- a/src/devices/bus/abcbus/lux10828.cpp
+++ b/src/devices/bus/abcbus/lux10828.cpp
@@ -290,7 +290,7 @@ WRITE8_MEMBER( luxor_55_10828_device::pio_pb_w )
static const z80_daisy_config daisy_chain[] =
{
{ Z80PIO_TAG },
- { NULL }
+ { nullptr }
};
static SLOT_INTERFACE_START( abc_floppies )
@@ -592,7 +592,7 @@ WRITE8_MEMBER( luxor_55_10828_device::ctrl_w )
m_sel0 = BIT(data, 0);
m_sel1 = BIT(data, 1);
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
diff --git a/src/devices/bus/abcbus/lux21046.cpp b/src/devices/bus/abcbus/lux21046.cpp
index 57650980dc6..733aee9538e 100644
--- a/src/devices/bus/abcbus/lux21046.cpp
+++ b/src/devices/bus/abcbus/lux21046.cpp
@@ -276,7 +276,7 @@ WRITE_LINE_MEMBER( luxor_55_21046_device::fdc_intrq_w )
static const z80_daisy_config z80_daisy_chain[] =
{
{ Z80DMA_TAG },
- { NULL }
+ { nullptr }
};
@@ -340,7 +340,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( abc850, luxor_55_21046 )
MCFG_FLOPPY_DRIVE_ADD(SAB1793_TAG":0", abc_floppies, "525qd", luxor_55_21046_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(SAB1793_TAG":1", abc_floppies, NULL, luxor_55_21046_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(SAB1793_TAG":1", abc_floppies, nullptr, luxor_55_21046_device::floppy_formats)
MACHINE_CONFIG_END
@@ -1057,7 +1057,7 @@ WRITE8_MEMBER( luxor_55_21046_device::_9b_w )
*/
// drive select
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
diff --git a/src/devices/bus/abcbus/lux21056.cpp b/src/devices/bus/abcbus/lux21056.cpp
index 0a89215f58a..f506c1b8e01 100644
--- a/src/devices/bus/abcbus/lux21056.cpp
+++ b/src/devices/bus/abcbus/lux21056.cpp
@@ -166,7 +166,7 @@ ADDRESS_MAP_END
static const z80_daisy_config daisy_chain[] =
{
{ Z80DMA_TAG },
- { NULL }
+ { nullptr }
};
diff --git a/src/devices/bus/abcbus/turbo.cpp b/src/devices/bus/abcbus/turbo.cpp
index 55ac6a7fa3d..449f4697a48 100644
--- a/src/devices/bus/abcbus/turbo.cpp
+++ b/src/devices/bus/abcbus/turbo.cpp
@@ -73,7 +73,7 @@ ADDRESS_MAP_END
static const z80_daisy_config daisy_chain[] =
{
- { NULL }
+ { nullptr }
};
diff --git a/src/devices/bus/abckb/abckb.cpp b/src/devices/bus/abckb/abckb.cpp
index d10c1e6bc8b..6eeab0fdc67 100644
--- a/src/devices/bus/abckb/abckb.cpp
+++ b/src/devices/bus/abckb/abckb.cpp
@@ -73,7 +73,7 @@ void abc_keyboard_port_device::device_start()
void abc_keyboard_port_device::device_reset()
{
- if (m_card != NULL)
+ if (m_card != nullptr)
get_card_device()->reset();
}
@@ -94,7 +94,7 @@ WRITE_LINE_MEMBER( abc_keyboard_port_device::write_rx )
WRITE_LINE_MEMBER( abc_keyboard_port_device::txd_w )
{
- if (m_card != NULL)
+ if (m_card != nullptr)
m_card->txd_w(state);
}
diff --git a/src/devices/bus/adam/exp.cpp b/src/devices/bus/adam/exp.cpp
index 0de506f751e..a8ac09cf676 100644
--- a/src/devices/bus/adam/exp.cpp
+++ b/src/devices/bus/adam/exp.cpp
@@ -92,7 +92,7 @@ bool adam_expansion_slot_device::call_load()
{
size_t size = 0;
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
size = length();
@@ -136,7 +136,7 @@ void adam_expansion_slot_device::get_default_card_software(std::string &result)
UINT8 adam_expansion_slot_device::bd_r(address_space &space, offs_t offset, UINT8 data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->adam_bd_r(space, offset, data, bmreq, biorq, aux_rom_cs, cas1, cas2);
}
@@ -151,7 +151,7 @@ UINT8 adam_expansion_slot_device::bd_r(address_space &space, offs_t offset, UINT
void adam_expansion_slot_device::bd_w(address_space &space, offs_t offset, UINT8 data, int bmreq, int biorq, int aux_rom_cs, int cas1, int cas2)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->adam_bd_w(space, offset, data, bmreq, biorq, aux_rom_cs, cas1, cas2);
}
diff --git a/src/devices/bus/adam/exp.h b/src/devices/bus/adam/exp.h
index 7719c3f8d11..ac5c24b603e 100644
--- a/src/devices/bus/adam/exp.h
+++ b/src/devices/bus/adam/exp.h
@@ -84,7 +84,7 @@ protected:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "adam_rom"; }
virtual const char *file_extensions() const { return "bin,rom"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/adam/ide.cpp b/src/devices/bus/adam/ide.cpp
index c7bb97e1184..54d4240f7db 100644
--- a/src/devices/bus/adam/ide.cpp
+++ b/src/devices/bus/adam/ide.cpp
@@ -61,7 +61,7 @@ const rom_entry *powermate_ide_device::device_rom_region() const
// MACHINE_CONFIG_FRAGMENT( adam_ata )
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( adam_ata )
- MCFG_ATA_INTERFACE_ADD(ATA_TAG, ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD(ATA_TAG, ata_devices, "hdd", nullptr, false)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
diff --git a/src/devices/bus/adamnet/adamnet.cpp b/src/devices/bus/adamnet/adamnet.cpp
index 0cf9762a913..487ce1b22d9 100644
--- a/src/devices/bus/adamnet/adamnet.cpp
+++ b/src/devices/bus/adamnet/adamnet.cpp
@@ -112,7 +112,7 @@ void adamnet_device::device_stop()
void adamnet_device::add_device(device_t *target)
{
- daisy_entry *entry = global_alloc(daisy_entry(target));
+ auto entry = global_alloc(daisy_entry(target));
entry->m_interface->m_bus = this;
@@ -125,9 +125,9 @@ void adamnet_device::add_device(device_t *target)
//-------------------------------------------------
adamnet_device::daisy_entry::daisy_entry(device_t *device)
- : m_next(NULL),
+ : m_next(nullptr),
m_device(device),
- m_interface(NULL),
+ m_interface(nullptr),
m_txd(1)
{
device->interface(m_interface);
diff --git a/src/devices/bus/adamnet/fdc.cpp b/src/devices/bus/adamnet/fdc.cpp
index afe93d74a29..e83ac70766d 100644
--- a/src/devices/bus/adamnet/fdc.cpp
+++ b/src/devices/bus/adamnet/fdc.cpp
@@ -183,7 +183,7 @@ adam_fdc_device::adam_fdc_device(const machine_config &mconfig, const char *tag,
m_maincpu(*this, M6801_TAG),
m_fdc(*this, WD2793_TAG),
m_floppy0(*this, WD2793_TAG":0:525ssdd"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_ram(*this, "ram"),
m_sw3(*this, "SW3")
{
@@ -289,7 +289,7 @@ WRITE8_MEMBER( adam_fdc_device::p1_w )
m_fdc->dden_w(BIT(data, 3));
// drive select
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 5))
{
diff --git a/src/devices/bus/adamnet/spi.cpp b/src/devices/bus/adamnet/spi.cpp
index 7cfff9adfeb..29da38c0b7b 100644
--- a/src/devices/bus/adamnet/spi.cpp
+++ b/src/devices/bus/adamnet/spi.cpp
@@ -80,7 +80,7 @@ static MACHINE_CONFIG_FRAGMENT( adam_spi )
MCFG_DEVICE_ADD(MC2661_TAG, MC2661, XTAL_4_9152MHz)
- MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
MCFG_CENTRONICS_DATA_INPUT_BUFFER("cent_data_in")
diff --git a/src/devices/bus/amiga/zorro/a2232.cpp b/src/devices/bus/amiga/zorro/a2232.cpp
index 89e87d3588a..4cf44853c46 100644
--- a/src/devices/bus/amiga/zorro/a2232.cpp
+++ b/src/devices/bus/amiga/zorro/a2232.cpp
@@ -94,43 +94,43 @@ static MACHINE_CONFIG_FRAGMENT( a2232 )
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(a2232_device, cia_port_b_w))
// rs232 ports
- MCFG_RS232_PORT_ADD("rs232_1", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_1", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(a2232_device, rs232_1_rxd_w))
MCFG_RS232_DCD_HANDLER(WRITELINE(a2232_device, rs232_1_dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia_0", mos6551_device, write_dsr))
MCFG_RS232_CTS_HANDLER(WRITELINE(a2232_device, rs232_1_cts_w))
- MCFG_RS232_PORT_ADD("rs232_2", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_2", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia_1", mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(WRITELINE(a2232_device, rs232_2_dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia_1", mos6551_device, write_dsr))
MCFG_RS232_CTS_HANDLER(WRITELINE(a2232_device, rs232_2_cts_w))
- MCFG_RS232_PORT_ADD("rs232_3", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_3", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia_2", mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(WRITELINE(a2232_device, rs232_3_dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia_2", mos6551_device, write_dsr))
MCFG_RS232_CTS_HANDLER(WRITELINE(a2232_device, rs232_3_cts_w))
- MCFG_RS232_PORT_ADD("rs232_4", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_4", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia_3", mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(WRITELINE(a2232_device, rs232_4_dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia_3", mos6551_device, write_dsr))
MCFG_RS232_CTS_HANDLER(WRITELINE(a2232_device, rs232_4_cts_w))
- MCFG_RS232_PORT_ADD("rs232_5", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_5", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia_4", mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(WRITELINE(a2232_device, rs232_5_dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia_4", mos6551_device, write_dsr))
MCFG_RS232_CTS_HANDLER(WRITELINE(a2232_device, rs232_5_cts_w))
- MCFG_RS232_PORT_ADD("rs232_6", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_6", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia_5", mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(WRITELINE(a2232_device, rs232_6_dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia_5", mos6551_device, write_dsr))
MCFG_RS232_CTS_HANDLER(WRITELINE(a2232_device, rs232_6_cts_w))
- MCFG_RS232_PORT_ADD("rs232_7", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_7", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia_6", mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(WRITELINE(a2232_device, rs232_7_dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia_6", mos6551_device, write_dsr))
@@ -206,9 +206,9 @@ void a2232_device::device_reset_after_children()
void a2232_device::update_irqs()
{
// look for any active irq
- for (int i = 0; i < IRQ_SOURCE_COUNT; i++)
+ for (auto & elem : m_irqs)
{
- if (m_irqs[i])
+ if (elem)
{
m_iocpu->set_input_line(INPUT_LINE_IRQ0, ASSERT_LINE);
return;
diff --git a/src/devices/bus/amiga/zorro/buddha.cpp b/src/devices/bus/amiga/zorro/buddha.cpp
index 761162269d3..7ea65396afa 100644
--- a/src/devices/bus/amiga/zorro/buddha.cpp
+++ b/src/devices/bus/amiga/zorro/buddha.cpp
@@ -29,9 +29,9 @@ const device_type BUDDHA = &device_creator<buddha_device>;
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( buddha )
- MCFG_ATA_INTERFACE_ADD("ata_0", ata_devices, NULL, NULL, false)
+ MCFG_ATA_INTERFACE_ADD("ata_0", ata_devices, nullptr, nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(buddha_device, ide_0_interrupt_w))
- MCFG_ATA_INTERFACE_ADD("ata_1", ata_devices, NULL, NULL, false)
+ MCFG_ATA_INTERFACE_ADD("ata_1", ata_devices, nullptr, nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(buddha_device, ide_1_interrupt_w))
MACHINE_CONFIG_END
diff --git a/src/devices/bus/amiga/zorro/zorro.cpp b/src/devices/bus/amiga/zorro/zorro.cpp
index aec7f5e54f8..72f4eaed43d 100644
--- a/src/devices/bus/amiga/zorro/zorro.cpp
+++ b/src/devices/bus/amiga/zorro/zorro.cpp
@@ -24,7 +24,7 @@ const device_type ZORRO_SLOT = &device_creator<zorro_slot_device>;
zorro_slot_device::zorro_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ZORRO_SLOT, "Zorro slot", tag, owner, clock, "zorro_slot", __FILE__),
device_slot_interface(mconfig, *this),
- m_zorro_tag(NULL)
+ m_zorro_tag(nullptr)
{
}
@@ -32,7 +32,7 @@ zorro_slot_device::zorro_slot_device(const machine_config &mconfig, device_type
const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_slot_interface(mconfig, *this),
- m_zorro_tag(NULL)
+ m_zorro_tag(nullptr)
{
}
@@ -70,8 +70,8 @@ void zorro_slot_device::device_start()
zorro_device::zorro_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),
- m_space(NULL),
- m_cputag(NULL),
+ m_space(nullptr),
+ m_cputag(nullptr),
m_ovr_handler(*this),
m_int2_handler(*this),
m_int6_handler(*this)
@@ -123,7 +123,7 @@ const device_type EXP_SLOT = &device_creator<exp_slot_device>;
exp_slot_device::exp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
zorro_device(mconfig, EXP_SLOT, "86-pin expansion slot", tag, owner, clock, "exp_slot", __FILE__),
m_ipl_handler(*this),
- m_dev(NULL)
+ m_dev(nullptr)
{
}
@@ -131,7 +131,7 @@ exp_slot_device::exp_slot_device(const machine_config &mconfig, device_type type
const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
zorro_device(mconfig, type, name, tag, owner, clock, shortname, source),
m_ipl_handler(*this),
- m_dev(NULL)
+ m_dev(nullptr)
{
}
@@ -192,7 +192,7 @@ zorro2_device::zorro2_device(const machine_config &mconfig, const char *tag, dev
m_eint4_handler(*this),
m_eint5_handler(*this),
m_eint7_handler(*this),
- m_autoconfig_device(NULL)
+ m_autoconfig_device(nullptr)
{
}
@@ -203,7 +203,7 @@ zorro2_device::zorro2_device(const machine_config &mconfig, device_type type, co
m_eint4_handler(*this),
m_eint5_handler(*this),
m_eint7_handler(*this),
- m_autoconfig_device(NULL)
+ m_autoconfig_device(nullptr)
{
}
@@ -295,7 +295,7 @@ void zorro2_device::fc_w(int code)
device_zorro_card_interface::device_zorro_card_interface(const machine_config &mconfig, device_t &device) :
device_slot_card_interface(mconfig, device),
- m_zorro(NULL)
+ m_zorro(nullptr)
{
}
@@ -331,7 +331,7 @@ WRITE_LINE_MEMBER( device_zorro_card_interface::cfgin_w )
device_exp_card_interface::device_exp_card_interface(const machine_config &mconfig, device_t &device) :
device_zorro_card_interface(mconfig, device),
- m_slot(NULL)
+ m_slot(nullptr)
{
}
@@ -359,8 +359,8 @@ void device_exp_card_interface::set_zorro_device()
device_zorro2_card_interface::device_zorro2_card_interface(const machine_config &mconfig, device_t &device) :
device_zorro_card_interface(mconfig, device),
- m_next(NULL),
- m_slot(NULL)
+ m_next(nullptr),
+ m_slot(nullptr)
{
}
diff --git a/src/devices/bus/apf/slot.cpp b/src/devices/bus/apf/slot.cpp
index 6ff3be5ea3c..b94f286798c 100644
--- a/src/devices/bus/apf/slot.cpp
+++ b/src/devices/bus/apf/slot.cpp
@@ -27,7 +27,7 @@ const device_type APF_CART_SLOT = &device_creator<apf_cart_slot_device>;
device_apf_cart_interface::device_apf_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_apf_cart_interface::~device_apf_cart_interface()
void device_apf_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(APFSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -131,10 +131,10 @@ static const apf_slot slot_list[] =
static int apf_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -142,10 +142,10 @@ static int apf_get_pcb_id(const char *slot)
static const char *apf_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "std";
@@ -160,7 +160,7 @@ bool apf_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
if (size > 0x3800)
{
@@ -170,12 +170,12 @@ bool apf_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);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
m_type = APF_STD;
// attempt to identify Space Destroyer, which needs 1K of additional RAM
diff --git a/src/devices/bus/apf/slot.h b/src/devices/bus/apf/slot.h
index 73853dd6bdd..1c2458d5b07 100644
--- a/src/devices/bus/apf/slot.h
+++ b/src/devices/bus/apf/slot.h
@@ -79,7 +79,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "apfm1000_cart"; }
virtual const char *file_extensions() const { return "bin"; }
diff --git a/src/devices/bus/apricot/expansion.cpp b/src/devices/bus/apricot/expansion.cpp
index 90983c8cc31..5dd7eb5ae58 100644
--- a/src/devices/bus/apricot/expansion.cpp
+++ b/src/devices/bus/apricot/expansion.cpp
@@ -60,10 +60,10 @@ const device_type APRICOT_EXPANSION_BUS = &device_creator<apricot_expansion_bus_
apricot_expansion_bus_device::apricot_expansion_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, APRICOT_EXPANSION_BUS, "Apricot Expansion Bus", tag, owner, clock, "apricot_exp_bus", __FILE__),
- m_program(NULL),
- m_io(NULL),
- m_program_iop(NULL),
- m_io_iop(NULL),
+ m_program(nullptr),
+ m_io(nullptr),
+ m_program_iop(nullptr),
+ m_io_iop(nullptr),
m_dma1_handler(*this),
m_dma2_handler(*this),
m_ext1_handler(*this),
@@ -173,8 +173,8 @@ void apricot_expansion_bus_device::install_ram(offs_t addrstart, offs_t addrend,
device_apricot_expansion_card_interface::device_apricot_expansion_card_interface(const machine_config &mconfig, device_t &device) :
device_slot_card_interface(mconfig, device),
- m_next(NULL),
- m_bus(NULL)
+ m_next(nullptr),
+ m_bus(nullptr)
{
}
diff --git a/src/devices/bus/arcadia/slot.cpp b/src/devices/bus/arcadia/slot.cpp
index 9114c16e8ad..eec8c412775 100644
--- a/src/devices/bus/arcadia/slot.cpp
+++ b/src/devices/bus/arcadia/slot.cpp
@@ -27,7 +27,7 @@ const device_type EA2001_CART_SLOT = &device_creator<arcadia_cart_slot_device>;
device_arcadia_cart_interface::device_arcadia_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_arcadia_cart_interface::~device_arcadia_cart_interface()
void device_arcadia_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(EA2001SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -120,10 +120,10 @@ static const arcadia_slot slot_list[] =
static int arcadia_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -150,16 +150,16 @@ bool arcadia_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 len = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
m_cart->rom_alloc(len, tag());
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(m_cart->get_rom_base(), len);
else
memcpy(m_cart->get_rom_base(), get_software_region("rom"), len);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
// we need to identify Golf!
m_type = ARCADIA_STD;
diff --git a/src/devices/bus/arcadia/slot.h b/src/devices/bus/arcadia/slot.h
index f1f3ca97f07..039c2944f22 100644
--- a/src/devices/bus/arcadia/slot.h
+++ b/src/devices/bus/arcadia/slot.h
@@ -68,7 +68,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 1; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "arcadia_cart"; }
virtual const char *file_extensions() const { return "bin"; }
diff --git a/src/devices/bus/astrocde/slot.cpp b/src/devices/bus/astrocde/slot.cpp
index 99f6e2609b2..877df4773a0 100644
--- a/src/devices/bus/astrocde/slot.cpp
+++ b/src/devices/bus/astrocde/slot.cpp
@@ -27,7 +27,7 @@ const device_type ASTROCADE_CART_SLOT = &device_creator<astrocade_cart_slot_devi
device_astrocade_cart_interface::device_astrocade_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_astrocade_cart_interface::~device_astrocade_cart_interface()
void device_astrocade_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(ASTROCADESLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -121,10 +121,10 @@ static const astrocade_slot slot_list[] =
static int astrocade_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -132,10 +132,10 @@ static int astrocade_get_pcb_id(const char *slot)
static const char *astrocade_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "std";
@@ -150,15 +150,15 @@ bool astrocade_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
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);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
m_type = ASTROCADE_STD;
diff --git a/src/devices/bus/astrocde/slot.h b/src/devices/bus/astrocde/slot.h
index 738c32a6faa..200f840f0e9 100644
--- a/src/devices/bus/astrocde/slot.h
+++ b/src/devices/bus/astrocde/slot.h
@@ -69,7 +69,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "astrocde_cart"; }
virtual const char *file_extensions() const { return "bin"; }
diff --git a/src/devices/bus/bml3/bml3bus.cpp b/src/devices/bus/bml3/bml3bus.cpp
index 83a2bbc082e..0438cc58997 100644
--- a/src/devices/bus/bml3/bml3bus.cpp
+++ b/src/devices/bus/bml3/bml3bus.cpp
@@ -139,9 +139,9 @@ void bml3bus_device::device_start()
m_out_firq_cb.resolve_safe();
// clear slots
- for (int i = 0; i < BML3BUS_MAX_SLOTS; i++)
+ for (auto & elem : m_device_list)
{
- m_device_list[i] = NULL;
+ elem = nullptr;
}
}
@@ -157,7 +157,7 @@ device_bml3bus_card_interface *bml3bus_device::get_bml3bus_card(int slot)
{
if (slot < 0)
{
- return NULL;
+ return nullptr;
}
return m_device_list[slot];
diff --git a/src/devices/bus/bml3/bml3mp1802.cpp b/src/devices/bus/bml3/bml3mp1802.cpp
index 7770f53f0e2..911d72c725e 100644
--- a/src/devices/bus/bml3/bml3mp1802.cpp
+++ b/src/devices/bus/bml3/bml3mp1802.cpp
@@ -82,7 +82,7 @@ READ8_MEMBER( bml3bus_mp1802_device::bml3_mp1802_r)
WRITE8_MEMBER( bml3bus_mp1802_device::bml3_mp1802_w)
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
switch (data & 0x03)
{
diff --git a/src/devices/bus/bml3/bml3mp1805.cpp b/src/devices/bus/bml3/bml3mp1805.cpp
index 039a7b1dfa4..e1b2317b7c6 100644
--- a/src/devices/bus/bml3/bml3mp1805.cpp
+++ b/src/devices/bus/bml3/bml3mp1805.cpp
@@ -27,7 +27,7 @@ static const floppy_interface bml3_mp1805_floppy_interface =
{
FLOPPY_STANDARD_3_SSDD,
LEGACY_FLOPPY_OPTIONS_NAME(default),
- NULL
+ nullptr
};
WRITE_LINE_MEMBER( bml3bus_mp1805_device::bml3_mc6843_intrq_w )
@@ -92,7 +92,7 @@ WRITE8_MEMBER( bml3bus_mp1805_device::bml3_mp1805_w)
// TODO: MESS UI for flipping disk? Note that D88 images are double-sided, but the physical drive is single-sided
int side = 0;
int motor = BIT(data, 7);
- const char *floppy_name = NULL;
+ const char *floppy_name = nullptr;
switch (drive_select) {
case 1:
drive = 0;
diff --git a/src/devices/bus/bw2/exp.cpp b/src/devices/bus/bw2/exp.cpp
index 55852f67c8e..c79e85fa90a 100644
--- a/src/devices/bus/bw2/exp.cpp
+++ b/src/devices/bus/bw2/exp.cpp
@@ -83,7 +83,7 @@ void bw2_expansion_slot_device::device_start()
void bw2_expansion_slot_device::device_reset()
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
{
m_cart->device().reset();
}
@@ -96,7 +96,7 @@ void bw2_expansion_slot_device::device_reset()
UINT8 bw2_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8 data, int ram2, int ram3, int ram4, int ram5, int ram6)
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
{
data = m_cart->bw2_cd_r(space, offset, data, ram2, ram3, ram4, ram5, ram6);
}
@@ -111,7 +111,7 @@ UINT8 bw2_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8
void bw2_expansion_slot_device::cd_w(address_space &space, offs_t offset, UINT8 data, int ram2, int ram3, int ram4, int ram5, int ram6)
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
{
m_cart->bw2_cd_w(space, offset, data, ram2, ram3, ram4, ram5, ram6);
}
@@ -126,7 +126,7 @@ READ8_MEMBER( bw2_expansion_slot_device::slot_r )
{
UINT8 data = 0xff;
- if (m_cart != NULL)
+ if (m_cart != nullptr)
{
data = m_cart->bw2_slot_r(space, offset);
}
@@ -141,7 +141,7 @@ READ8_MEMBER( bw2_expansion_slot_device::slot_r )
WRITE8_MEMBER( bw2_expansion_slot_device::slot_w )
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
{
m_cart->bw2_slot_w(space, offset, data);
}
@@ -156,7 +156,7 @@ READ8_MEMBER( bw2_expansion_slot_device::modsel_r )
{
UINT8 data = 0xff;
- if (m_cart != NULL)
+ if (m_cart != nullptr)
{
data = m_cart->bw2_modsel_r(space, offset);
}
@@ -171,7 +171,7 @@ READ8_MEMBER( bw2_expansion_slot_device::modsel_r )
WRITE8_MEMBER( bw2_expansion_slot_device::modsel_w )
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
{
m_cart->bw2_modsel_w(space, offset, data);
}
diff --git a/src/devices/bus/c64/16kb.cpp b/src/devices/bus/c64/16kb.cpp
index ff2ce6e3932..2964073aa1a 100644
--- a/src/devices/bus/c64/16kb.cpp
+++ b/src/devices/bus/c64/16kb.cpp
@@ -22,10 +22,10 @@ const device_type C64_16KB = &device_creator<c64_16kb_cartridge_device>;
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( c64_16kb )
- MCFG_GENERIC_CARTSLOT_ADD("roml", generic_linear_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("roml", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("rom,bin,80")
- MCFG_GENERIC_CARTSLOT_ADD("romh", generic_linear_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("romh", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("rom,bin,a0,e0")
MACHINE_CONFIG_END
diff --git a/src/devices/bus/c64/bn1541.cpp b/src/devices/bus/c64/bn1541.cpp
index 7b97723dd3c..d93e629aaa7 100644
--- a/src/devices/bus/c64/bn1541.cpp
+++ b/src/devices/bus/c64/bn1541.cpp
@@ -76,11 +76,11 @@ void c64_bn1541_device::device_start()
{
device_iterator iter(machine().root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
{
device_iterator subiter(*device);
- for (device_t *subdevice = subiter.first(); subdevice != NULL; subdevice = iter.next())
+ for (device_t *subdevice = subiter.first(); subdevice != nullptr; subdevice = iter.next())
{
if (subdevice->interface(m_other) && subdevice != this)
{
@@ -132,7 +132,7 @@ void c64_bn1541_device::parallel_strobe_w(int state)
void c64_bn1541_device::update_output()
{
- if (m_other != NULL)
+ if (m_other != nullptr)
{
m_other->parallel_data_w(m_parallel_output);
}
@@ -147,7 +147,7 @@ WRITE_LINE_MEMBER(c64_bn1541_device::input_8)
{
if (LOG) logerror("C64 parallel strobe %u\n", state);
- if (m_other != NULL)
+ if (m_other != nullptr)
{
m_other->parallel_strobe_w(state);
}
diff --git a/src/devices/bus/c64/dela_ep256.cpp b/src/devices/bus/c64/dela_ep256.cpp
index b4708e13856..f4c86f20db5 100644
--- a/src/devices/bus/c64/dela_ep256.cpp
+++ b/src/devices/bus/c64/dela_ep256.cpp
@@ -22,21 +22,21 @@ const device_type C64_DELA_EP256 = &device_creator<c64_dela_ep256_cartridge_devi
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( c64_dela_ep256 )
- MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom8", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom8", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
MACHINE_CONFIG_END
diff --git a/src/devices/bus/c64/dela_ep64.cpp b/src/devices/bus/c64/dela_ep64.cpp
index fcb5fc5c738..25aeb844deb 100644
--- a/src/devices/bus/c64/dela_ep64.cpp
+++ b/src/devices/bus/c64/dela_ep64.cpp
@@ -22,9 +22,9 @@ const device_type C64_DELA_EP64 = &device_creator<c64_dela_ep64_cartridge_device
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( c64_dela_ep64 )
- MCFG_GENERIC_SOCKET_ADD("eprom1", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("eprom1", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("rom,bin")
- MCFG_GENERIC_SOCKET_ADD("eprom2", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("eprom2", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("rom,bin")
MACHINE_CONFIG_END
diff --git a/src/devices/bus/c64/dela_ep7x8.cpp b/src/devices/bus/c64/dela_ep7x8.cpp
index e6d044ab490..dc3a036cb14 100644
--- a/src/devices/bus/c64/dela_ep7x8.cpp
+++ b/src/devices/bus/c64/dela_ep7x8.cpp
@@ -22,19 +22,19 @@ const device_type C64_DELA_EP7X8 = &device_creator<c64_dela_ep7x8_cartridge_devi
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( c64_dela_ep7x8 )
- MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
MACHINE_CONFIG_END
diff --git a/src/devices/bus/c64/dqbb.h b/src/devices/bus/c64/dqbb.h
index 387be1f2203..1d9acd82aa2 100644
--- a/src/devices/bus/c64/dqbb.h
+++ b/src/devices/bus/c64/dqbb.h
@@ -39,8 +39,8 @@ protected:
// device_nvram_interface overrides
virtual void nvram_default() { }
- virtual void nvram_read(emu_file &file) { if (m_nvram != NULL) { file.read(m_nvram, m_nvram.bytes()); } }
- virtual void nvram_write(emu_file &file) { if (m_nvram != NULL) { file.write(m_nvram, m_nvram.bytes()); } }
+ virtual void nvram_read(emu_file &file) { if (m_nvram != nullptr) { file.read(m_nvram, m_nvram.bytes()); } }
+ virtual void nvram_write(emu_file &file) { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } }
// device_c64_expansion_card_interface overrides
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2);
diff --git a/src/devices/bus/c64/exp.cpp b/src/devices/bus/c64/exp.cpp
index 043f4374933..1155cf54d69 100644
--- a/src/devices/bus/c64/exp.cpp
+++ b/src/devices/bus/c64/exp.cpp
@@ -119,7 +119,7 @@ bool c64_expansion_slot_device::call_load()
{
size_t size = 0;
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
size = length();
@@ -155,8 +155,8 @@ bool c64_expansion_slot_device::call_load()
if (cbm_crt_read_header(m_file, &roml_size, &romh_size, &exrom, &game))
{
- UINT8 *roml = NULL;
- UINT8 *romh = NULL;
+ UINT8 *roml = nullptr;
+ UINT8 *romh = nullptr;
m_card->m_roml.allocate(roml_size);
m_card->m_romh.allocate(romh_size);
@@ -191,8 +191,8 @@ bool c64_expansion_slot_device::call_load()
load_software_region("romh", m_card->m_romh);
load_software_region("nvram", m_card->m_nvram);
- if (get_feature("exrom") != NULL) m_card->m_exrom = atol(get_feature("exrom"));
- if (get_feature("game") != NULL) m_card->m_game = atol(get_feature("game"));
+ if (get_feature("exrom") != nullptr) m_card->m_exrom = atol(get_feature("exrom"));
+ if (get_feature("game") != nullptr) m_card->m_game = atol(get_feature("game"));
}
}
}
@@ -240,7 +240,7 @@ void c64_expansion_slot_device::get_default_card_software(std::string &result)
UINT8 c64_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->c64_cd_r(space, offset, data, sphi2, ba, roml, romh, io1, io2);
}
@@ -255,7 +255,7 @@ UINT8 c64_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8
void c64_expansion_slot_device::cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->c64_cd_w(space, offset, data, sphi2, ba, roml, romh, io1, io2);
}
@@ -272,7 +272,7 @@ int c64_expansion_slot_device::game_r(offs_t offset, int sphi2, int ba, int rw,
m_hiram = hiram;
- if (m_card != NULL)
+ if (m_card != nullptr)
{
state = m_card->c64_game_r(offset, sphi2, ba, rw);
}
@@ -291,7 +291,7 @@ int c64_expansion_slot_device::exrom_r(offs_t offset, int sphi2, int ba, int rw,
m_hiram = hiram;
- if (m_card != NULL)
+ if (m_card != nullptr)
{
state = m_card->c64_exrom_r(offset, sphi2, ba, rw);
}
diff --git a/src/devices/bus/c64/exp.h b/src/devices/bus/c64/exp.h
index 8ece3920e82..d66f0575313 100644
--- a/src/devices/bus/c64/exp.h
+++ b/src/devices/bus/c64/exp.h
@@ -146,7 +146,7 @@ protected:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "c64_cart,vic10_cart"; }
virtual const char *file_extensions() const { return "80,a0,e0,crt"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/c64/fcc.h b/src/devices/bus/c64/fcc.h
index 0727e3ebec4..7ca145246c8 100644
--- a/src/devices/bus/c64/fcc.h
+++ b/src/devices/bus/c64/fcc.h
@@ -46,8 +46,8 @@ protected:
// device_nvram_interface overrides
virtual void nvram_default() { }
- virtual void nvram_read(emu_file &file) { if (m_nvram != NULL) { file.read(m_nvram, m_nvram.bytes()); } }
- virtual void nvram_write(emu_file &file) { if (m_nvram != NULL) { file.write(m_nvram, m_nvram.bytes()); } }
+ virtual void nvram_read(emu_file &file) { if (m_nvram != nullptr) { file.read(m_nvram, m_nvram.bytes()); } }
+ virtual void nvram_write(emu_file &file) { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } }
// device_c64_expansion_card_interface overrides
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2);
diff --git a/src/devices/bus/c64/ide64.cpp b/src/devices/bus/c64/ide64.cpp
index a5a4cb94c0d..01def305dd5 100644
--- a/src/devices/bus/c64/ide64.cpp
+++ b/src/devices/bus/c64/ide64.cpp
@@ -48,7 +48,7 @@ static MACHINE_CONFIG_FRAGMENT( c64_ide64 )
MCFG_ATMEL_29C010_ADD(AT29C010A_TAG)
MCFG_DS1302_ADD(DS1302_TAG, XTAL_32_768kHz)
- MCFG_ATA_INTERFACE_ADD(ATA_TAG, ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD(ATA_TAG, ata_devices, "hdd", nullptr, false)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/c64/ieee488.cpp b/src/devices/bus/c64/ieee488.cpp
index 4b41417b42d..974c9df0cb5 100644
--- a/src/devices/bus/c64/ieee488.cpp
+++ b/src/devices/bus/c64/ieee488.cpp
@@ -148,7 +148,7 @@ static MACHINE_CONFIG_FRAGMENT( c64_ieee488 )
MCFG_TPI6525_IN_PC_CB(READ8(c64_ieee488_device, tpi_pc_r))
MCFG_TPI6525_OUT_PC_CB(WRITE8(c64_ieee488_device, tpi_pc_w))
- MCFG_CBM_IEEE488_ADD(NULL)
+ MCFG_CBM_IEEE488_ADD(nullptr)
MCFG_C64_PASSTHRU_EXPANSION_SLOT_ADD()
MACHINE_CONFIG_END
diff --git a/src/devices/bus/c64/neoram.h b/src/devices/bus/c64/neoram.h
index 0011e942a53..824124bbe1e 100644
--- a/src/devices/bus/c64/neoram.h
+++ b/src/devices/bus/c64/neoram.h
@@ -38,8 +38,8 @@ protected:
// device_nvram_interface overrides
virtual void nvram_default() { }
- virtual void nvram_read(emu_file &file) { if (m_nvram != NULL) { file.read(m_nvram, m_nvram.bytes()); } }
- virtual void nvram_write(emu_file &file) { if (m_nvram != NULL) { file.write(m_nvram, m_nvram.bytes()); } }
+ virtual void nvram_read(emu_file &file) { if (m_nvram != nullptr) { file.read(m_nvram, m_nvram.bytes()); } }
+ virtual void nvram_write(emu_file &file) { if (m_nvram != nullptr) { file.write(m_nvram, m_nvram.bytes()); } }
// device_c64_expansion_card_interface overrides
virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2);
diff --git a/src/devices/bus/c64/reu.cpp b/src/devices/bus/c64/reu.cpp
index bc83c9554d2..4883ada757b 100644
--- a/src/devices/bus/c64/reu.cpp
+++ b/src/devices/bus/c64/reu.cpp
@@ -33,7 +33,7 @@ const device_type C64_REU1764 = &device_creator<c64_reu1764_cartridge_device>;
static MACHINE_CONFIG_FRAGMENT( c64_reu )
MCFG_MOS8726_ADD(MOS8726R1_TAG)
- MCFG_GENERIC_SOCKET_ADD("rom", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
MACHINE_CONFIG_END
diff --git a/src/devices/bus/c64/rex_ep256.cpp b/src/devices/bus/c64/rex_ep256.cpp
index ef87cf9dc6f..ecb5e3983e4 100644
--- a/src/devices/bus/c64/rex_ep256.cpp
+++ b/src/devices/bus/c64/rex_ep256.cpp
@@ -22,21 +22,21 @@ const device_type C64_REX_EP256 = &device_creator<c64_rex_ep256_cartridge_device
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( c64_rex_ep256 )
- MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom1", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom2", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom3", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom4", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom5", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom6", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom7", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_SOCKET_ADD("rom8", generic_linear_slot, NULL)
+ MCFG_GENERIC_SOCKET_ADD("rom8", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
MACHINE_CONFIG_END
diff --git a/src/devices/bus/c64/swiftlink.cpp b/src/devices/bus/c64/swiftlink.cpp
index cd59887c6cb..14e0b224da5 100644
--- a/src/devices/bus/c64/swiftlink.cpp
+++ b/src/devices/bus/c64/swiftlink.cpp
@@ -43,7 +43,7 @@ static MACHINE_CONFIG_FRAGMENT( c64_swiftlink )
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(c64_swiftlink_cartridge_device, acia_irq_w))
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
- 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(MOS6551_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, write_dsr))
diff --git a/src/devices/bus/c64/turbo232.cpp b/src/devices/bus/c64/turbo232.cpp
index f0d3eeabf12..1dd43b2011d 100644
--- a/src/devices/bus/c64/turbo232.cpp
+++ b/src/devices/bus/c64/turbo232.cpp
@@ -42,7 +42,7 @@ static MACHINE_CONFIG_FRAGMENT( c64_turbo232 )
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(c64_turbo232_cartridge_device, acia_irq_w))
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
- 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(MOS6551_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, write_dsr))
diff --git a/src/devices/bus/cbm2/exp.cpp b/src/devices/bus/cbm2/exp.cpp
index 4d8f6ac1c61..4eb95e81bb2 100644
--- a/src/devices/bus/cbm2/exp.cpp
+++ b/src/devices/bus/cbm2/exp.cpp
@@ -107,7 +107,7 @@ bool cbm2_expansion_slot_device::call_load()
if (m_card)
{
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
size = length();
@@ -167,7 +167,7 @@ void cbm2_expansion_slot_device::get_default_card_software(std::string &result)
UINT8 cbm2_expansion_slot_device::read(address_space &space, offs_t offset, UINT8 data, int csbank1, int csbank2, int csbank3)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->cbm2_bd_r(space, offset, data, csbank1, csbank2, csbank3);
}
@@ -182,7 +182,7 @@ UINT8 cbm2_expansion_slot_device::read(address_space &space, offs_t offset, UINT
void cbm2_expansion_slot_device::write(address_space &space, offs_t offset, UINT8 data, int csbank1, int csbank2, int csbank3)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->cbm2_bd_w(space, offset, data, csbank1, csbank2, csbank3);
}
diff --git a/src/devices/bus/cbm2/exp.h b/src/devices/bus/cbm2/exp.h
index 338e4ad1cda..5d76899db22 100644
--- a/src/devices/bus/cbm2/exp.h
+++ b/src/devices/bus/cbm2/exp.h
@@ -93,7 +93,7 @@ protected:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "cbm2_cart"; }
virtual const char *file_extensions() const { return "20,40,60"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/cbm2/user.h b/src/devices/bus/cbm2/user.h
index 7952517ed05..4aefd41bfc5 100644
--- a/src/devices/bus/cbm2/user.h
+++ b/src/devices/bus/cbm2/user.h
@@ -114,17 +114,17 @@ public:
template<class _Object> static devcb_base &set_flag_wr_callback(device_t &device, _Object object) { return downcast<cbm2_user_port_device &>(device).m_write_flag.set_callback(object); }
// computer interface
- DECLARE_READ8_MEMBER( d1_r ) { UINT8 data = 0xff; if (m_card != NULL) data = m_card->cbm2_d1_r(space, offset); return data; }
- DECLARE_WRITE8_MEMBER( d1_w ) { if (m_card != NULL) m_card->cbm2_d1_w(space, offset, data); }
- DECLARE_READ8_MEMBER( d2_r ) { UINT8 data = 0xff; if (m_card != NULL) data = m_card->cbm2_d2_r(space, offset); return data; }
- DECLARE_WRITE8_MEMBER( d2_w ) { if (m_card != NULL) m_card->cbm2_d2_w(space, offset, data); }
+ DECLARE_READ8_MEMBER( d1_r ) { UINT8 data = 0xff; if (m_card != nullptr) data = m_card->cbm2_d1_r(space, offset); return data; }
+ DECLARE_WRITE8_MEMBER( d1_w ) { if (m_card != nullptr) m_card->cbm2_d1_w(space, offset, data); }
+ DECLARE_READ8_MEMBER( d2_r ) { UINT8 data = 0xff; if (m_card != nullptr) data = m_card->cbm2_d2_r(space, offset); return data; }
+ DECLARE_WRITE8_MEMBER( d2_w ) { if (m_card != nullptr) m_card->cbm2_d2_w(space, offset, data); }
DECLARE_READ_LINE_MEMBER( pb2_r ) { return m_card ? m_card->cbm2_pb2_r() : 1; }
- DECLARE_WRITE_LINE_MEMBER( pb2_w ) { if (m_card != NULL) m_card->cbm2_pb2_w(state); }
+ DECLARE_WRITE_LINE_MEMBER( pb2_w ) { if (m_card != nullptr) m_card->cbm2_pb2_w(state); }
DECLARE_READ_LINE_MEMBER( pb3_r ) { return m_card ? m_card->cbm2_pb3_r() : 1; }
- DECLARE_WRITE_LINE_MEMBER( pb3_w ) { if (m_card != NULL) m_card->cbm2_pb3_w(state); }
- DECLARE_WRITE_LINE_MEMBER( pc_w ) { if (m_card != NULL) m_card->cbm2_pc_w(state); }
- DECLARE_WRITE_LINE_MEMBER( cnt_w ) { if (m_card != NULL) m_card->cbm2_cnt_w(state); }
- DECLARE_WRITE_LINE_MEMBER( sp_w ) { if (m_card != NULL) m_card->cbm2_sp_w(state); }
+ DECLARE_WRITE_LINE_MEMBER( pb3_w ) { if (m_card != nullptr) m_card->cbm2_pb3_w(state); }
+ DECLARE_WRITE_LINE_MEMBER( pc_w ) { if (m_card != nullptr) m_card->cbm2_pc_w(state); }
+ DECLARE_WRITE_LINE_MEMBER( cnt_w ) { if (m_card != nullptr) m_card->cbm2_cnt_w(state); }
+ DECLARE_WRITE_LINE_MEMBER( sp_w ) { if (m_card != nullptr) m_card->cbm2_sp_w(state); }
// cartridge interface
DECLARE_WRITE_LINE_MEMBER( irq_w ) { m_write_irq(state); }
diff --git a/src/devices/bus/cbmiec/c1541.cpp b/src/devices/bus/cbmiec/c1541.cpp
index 054c6e27120..a25aa7a434f 100644
--- a/src/devices/bus/cbmiec/c1541.cpp
+++ b/src/devices/bus/cbmiec/c1541.cpp
@@ -567,7 +567,7 @@ READ8_MEMBER( c1541_base_t::via0_pa_r )
WRITE8_MEMBER( c1541_base_t::via0_pa_w )
{
- if (m_other != NULL)
+ if (m_other != nullptr)
{
m_other->parallel_data_w(data);
}
@@ -636,7 +636,7 @@ WRITE8_MEMBER( c1541_base_t::via0_pb_w )
WRITE_LINE_MEMBER( c1541_base_t::via0_ca2_w )
{
- if (m_other != NULL)
+ if (m_other != nullptr)
{
m_other->parallel_strobe_w(state);
}
diff --git a/src/devices/bus/cbmiec/c1571.cpp b/src/devices/bus/cbmiec/c1571.cpp
index a08e88fb696..97ec044b271 100644
--- a/src/devices/bus/cbmiec/c1571.cpp
+++ b/src/devices/bus/cbmiec/c1571.cpp
@@ -476,7 +476,7 @@ WRITE_LINE_MEMBER( c1571_t::cia_irq_w )
WRITE_LINE_MEMBER( c1571_t::cia_pc_w )
{
- if (m_other != NULL)
+ if (m_other != nullptr)
{
m_other->parallel_strobe_w(state);
}
@@ -503,7 +503,7 @@ READ8_MEMBER( c1571_t::cia_pb_r )
WRITE8_MEMBER( c1571_t::cia_pb_w )
{
- if (m_other != NULL)
+ if (m_other != nullptr)
{
m_other->parallel_data_w(data);
}
diff --git a/src/devices/bus/cbmiec/cbmiec.cpp b/src/devices/bus/cbmiec/cbmiec.cpp
index d2d0e2c9da5..7e893614f3f 100644
--- a/src/devices/bus/cbmiec/cbmiec.cpp
+++ b/src/devices/bus/cbmiec/cbmiec.cpp
@@ -258,12 +258,12 @@ cbm_iec_slot_device::cbm_iec_slot_device(const machine_config &mconfig, const ch
void cbm_iec_slot_device::device_start()
{
- cbm_iec_device* bus = NULL;
+ cbm_iec_device* bus = nullptr;
- for (device_t *device = owner(); device != NULL; device = device->owner())
+ for (device_t *device = owner(); device != nullptr; device = device->owner())
{
bus = device->subdevice<cbm_iec_device>(CBM_IEC_TAG);
- if (bus != NULL) break;
+ if (bus != nullptr) break;
}
assert(bus);
@@ -290,9 +290,9 @@ cbm_iec_device::cbm_iec_device(const machine_config &mconfig, const char *tag, d
m_write_data(*this),
m_write_reset(*this)
{
- for (int i = 0; i < SIGNAL_COUNT; i++)
+ for (auto & elem : m_line)
{
- m_line[i] = 1;
+ elem = 1;
}
}
@@ -339,7 +339,7 @@ void cbm_iec_device::device_stop()
void cbm_iec_device::add_device(cbm_iec_slot_device *slot, device_t *target)
{
- daisy_entry *entry = global_alloc(daisy_entry(target));
+ auto entry = global_alloc(daisy_entry(target));
entry->m_interface->m_slot = slot;
entry->m_interface->m_bus = this;
@@ -353,13 +353,13 @@ void cbm_iec_device::add_device(cbm_iec_slot_device *slot, device_t *target)
//-------------------------------------------------
cbm_iec_device::daisy_entry::daisy_entry(device_t *device)
- : m_next(NULL),
+ : m_next(nullptr),
m_device(device),
- m_interface(NULL)
+ m_interface(nullptr)
{
- for (int i = 0; i < SIGNAL_COUNT; i++)
+ for (auto & elem : m_line)
{
- m_line[i] = 1;
+ elem = 1;
}
device->interface(m_interface);
diff --git a/src/devices/bus/cbmiec/interpod.cpp b/src/devices/bus/cbmiec/interpod.cpp
index 6bdc3b5ed64..f15d014a00a 100644
--- a/src/devices/bus/cbmiec/interpod.cpp
+++ b/src/devices/bus/cbmiec/interpod.cpp
@@ -130,7 +130,7 @@ static MACHINE_CONFIG_FRAGMENT( interpod )
MCFG_DEVICE_ADD(R6532_TAG, MOS6532n, 1000000)
MCFG_DEVICE_ADD(MC6850_TAG, ACIA6850, 0)
- MCFG_CBM_IEEE488_ADD(NULL)
+ MCFG_CBM_IEEE488_ADD(nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/centronics/ctronics.cpp b/src/devices/bus/centronics/ctronics.cpp
index 89850abaf17..34d2e21f022 100644
--- a/src/devices/bus/centronics/ctronics.cpp
+++ b/src/devices/bus/centronics/ctronics.cpp
@@ -32,7 +32,7 @@ centronics_device::centronics_device(const machine_config &mconfig, const char *
m_fault_handler(*this),
m_init_handler(*this),
m_select_in_handler(*this),
- m_dev(NULL)
+ m_dev(nullptr)
{
}
diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp
index 771680e5cd0..56e606d576f 100644
--- a/src/devices/bus/centronics/epson_lx810l.cpp
+++ b/src/devices/bus/centronics/epson_lx810l.cpp
@@ -564,7 +564,7 @@ WRITE_LINE_MEMBER( epson_lx810l_t::e05a30_ready )
UINT32 epson_lx810l_t::screen_update_lx810l(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
int scrolly = -bitmap_line(9);
- copyscrollbitmap(bitmap, m_bitmap, 0, NULL, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, m_bitmap, 0, nullptr, 1, &scrolly, cliprect);
/* draw "printhead" */
bitmap.plot_box(m_real_cr_pos + CR_OFFSET - 10, PAPER_HEIGHT - 36, 20, 36, 0x888888);
diff --git a/src/devices/bus/cgenie/expansion/expansion.cpp b/src/devices/bus/cgenie/expansion/expansion.cpp
index 88a89a32cce..632d921ef9c 100644
--- a/src/devices/bus/cgenie/expansion/expansion.cpp
+++ b/src/devices/bus/cgenie/expansion/expansion.cpp
@@ -29,9 +29,9 @@ const device_type EXPANSION_SLOT = &device_creator<expansion_slot_device>;
expansion_slot_device::expansion_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, EXPANSION_SLOT, "Expansion Slot", tag, owner, clock, "expansion_slot", __FILE__),
device_slot_interface(mconfig, *this),
- m_program(NULL),
- m_io(NULL),
- m_cart(NULL),
+ m_program(nullptr),
+ m_io(nullptr),
+ m_cart(nullptr),
m_int_handler(*this),
m_nmi_handler(*this),
m_reset_handler(*this)
diff --git a/src/devices/bus/cgenie/expansion/floppy.cpp b/src/devices/bus/cgenie/expansion/floppy.cpp
index 6615665d2a5..c3099cd533c 100644
--- a/src/devices/bus/cgenie/expansion/floppy.cpp
+++ b/src/devices/bus/cgenie/expansion/floppy.cpp
@@ -77,8 +77,8 @@ static MACHINE_CONFIG_FRAGMENT( cgenie_fdc )
MCFG_FLOPPY_DRIVE_ADD("fd1793:0", cgenie_floppies, "ssdd", cgenie_fdc_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fd1793:1", cgenie_floppies, "ssdd", cgenie_fdc_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fd1793:2", cgenie_floppies, NULL, cgenie_fdc_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fd1793:3", cgenie_floppies, NULL, cgenie_fdc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fd1793:2", cgenie_floppies, nullptr, cgenie_fdc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fd1793:3", cgenie_floppies, nullptr, cgenie_fdc_device::floppy_formats)
// MCFG_SOFTWARE_LIST_ADD("floppy_list", "cgenie_flop")
@@ -112,7 +112,7 @@ cgenie_fdc_device::cgenie_fdc_device(const machine_config &mconfig, const char *
m_floppy2(*this, "fd1793:2"),
m_floppy3(*this, "fd1793:3"),
m_socket(*this, "socket"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_irq_status(0)
{
}
@@ -199,7 +199,7 @@ WRITE8_MEMBER( cgenie_fdc_device::select_w )
if (VERBOSE)
logerror("cgenie_fdc_device::motor_w: 0x%02x\n", data);
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
diff --git a/src/devices/bus/cgenie/parallel/parallel.cpp b/src/devices/bus/cgenie/parallel/parallel.cpp
index e948af9c00a..d147a550135 100644
--- a/src/devices/bus/cgenie/parallel/parallel.cpp
+++ b/src/devices/bus/cgenie/parallel/parallel.cpp
@@ -29,7 +29,7 @@ const device_type PARALLEL_SLOT = &device_creator<parallel_slot_device>;
parallel_slot_device::parallel_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PARALLEL_SLOT, "Parallel Slot", tag, owner, clock, "parallel_slot", __FILE__),
device_slot_interface(mconfig, *this),
- m_cart(NULL)
+ m_cart(nullptr)
{
}
diff --git a/src/devices/bus/chanf/slot.cpp b/src/devices/bus/chanf/slot.cpp
index 4ce5380cb01..f46abf3b7c3 100644
--- a/src/devices/bus/chanf/slot.cpp
+++ b/src/devices/bus/chanf/slot.cpp
@@ -27,7 +27,7 @@ const device_type CHANF_CART_SLOT = &device_creator<channelf_cart_slot_device>;
device_channelf_cart_interface::device_channelf_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_channelf_cart_interface::~device_channelf_cart_interface()
void device_channelf_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(CHANFSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -134,10 +134,10 @@ static const chanf_slot slot_list[] =
static int chanf_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -145,10 +145,10 @@ static int chanf_get_pcb_id(const char *slot)
static const char *chanf_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "chess";
@@ -163,15 +163,15 @@ bool channelf_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 len = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
m_cart->rom_alloc(len, tag());
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(m_cart->get_rom_base(), len);
else
memcpy(m_cart->get_rom_base(), get_software_region("rom"), len);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
// we default to "chess" slot because some homebrew programs have been written to run
// on PCBs with RAM at $2000-$2800 as Saba Schach!
diff --git a/src/devices/bus/chanf/slot.h b/src/devices/bus/chanf/slot.h
index 98276b81b9f..d243b5dbbe3 100644
--- a/src/devices/bus/chanf/slot.h
+++ b/src/devices/bus/chanf/slot.h
@@ -82,7 +82,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "channelf_cart"; }
virtual const char *file_extensions() const { return "bin,chf"; }
diff --git a/src/devices/bus/coco/coco_dwsock.cpp b/src/devices/bus/coco/coco_dwsock.cpp
index 8fdceac88a3..837675aa61a 100644
--- a/src/devices/bus/coco/coco_dwsock.cpp
+++ b/src/devices/bus/coco/coco_dwsock.cpp
@@ -69,14 +69,14 @@ beckerport_device::beckerport_device(const machine_config &mconfig, const char *
: device_t(mconfig, COCO_DWSOCK, "Virtual Becker Port", tag, owner, clock, "coco_dwsock", __FILE__), m_hostname(nullptr),
m_dwconfigport(*this, DRIVEWIRE_PORT_TAG), m_dwtcpport(0)
{
- m_pSocket = NULL;
+ m_pSocket = nullptr;
m_head = 0;
m_rx_pending = 0;
}
beckerport_device::~beckerport_device()
{
- if (m_pSocket != NULL)
+ if (m_pSocket != nullptr)
device_stop();
}
@@ -110,11 +110,11 @@ void beckerport_device::device_start(void)
void beckerport_device::device_stop(void)
{
- if (m_pSocket != NULL)
+ if (m_pSocket != nullptr)
{
printf("Closing connection to Drivewire server\n");
osd_close(m_pSocket);
- m_pSocket = NULL;
+ m_pSocket = nullptr;
}
}
@@ -136,7 +136,7 @@ READ8_MEMBER(beckerport_device::read)
{
unsigned char data = 0x5a;
- if (m_pSocket == NULL)
+ if (m_pSocket == nullptr)
return data;
switch (offset)
@@ -179,7 +179,7 @@ WRITE8_MEMBER(beckerport_device::write)
char d = (char)data;
file_error filerr;
- if (m_pSocket == NULL)
+ if (m_pSocket == nullptr)
return;
switch (offset)
@@ -188,7 +188,7 @@ WRITE8_MEMBER(beckerport_device::write)
//printf("beckerport_write: error: write (0x%02x) to status register\n", d);
break;
case DWS_DATA:
- filerr = osd_write(m_pSocket, &d, 0, 1, NULL);
+ filerr = osd_write(m_pSocket, &d, 0, 1, nullptr);
if (filerr != FILERR_NONE)
fprintf(stderr, "coco_dwsock.c: beckerport_device::write() socket write operation failed with file_error %i\n", filerr);
//printf("beckerport_write: data write one byte (0x%02x)\n", d & 0xff);
diff --git a/src/devices/bus/coco/coco_fdc.cpp b/src/devices/bus/coco/coco_fdc.cpp
index 3b8a3bc19c6..f510993473d 100644
--- a/src/devices/bus/coco/coco_fdc.cpp
+++ b/src/devices/bus/coco/coco_fdc.cpp
@@ -119,8 +119,8 @@ coco_rtc_type_t coco_fdc_device::real_time_clock()
coco_rtc_type_t result = coco_rtc_type_t(read_safe(machine().root_device().ioport("real_time_clock"), RTC_NONE));
/* check to make sure we don't have any invalid values */
- if (((result == RTC_DISTO) && (m_disto_msm6242 == NULL))
- || ((result == RTC_CLOUD9) && (m_ds1315 == NULL)))
+ if (((result == RTC_DISTO) && (m_disto_msm6242 == nullptr))
+ || ((result == RTC_CLOUD9) && (m_ds1315 == nullptr)))
{
result = RTC_NONE;
}
@@ -525,7 +525,7 @@ void dragon_fdc_device::dskreg_w(UINT8 data)
data);
}
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
switch (data & 0x03)
{
diff --git a/src/devices/bus/coco/coco_multi.cpp b/src/devices/bus/coco/coco_multi.cpp
index 6d5b38ba4f1..18033158c45 100644
--- a/src/devices/bus/coco/coco_multi.cpp
+++ b/src/devices/bus/coco/coco_multi.cpp
@@ -104,15 +104,15 @@ WRITE_LINE_MEMBER(coco_multipak_device::multi_halt_w)
}
static MACHINE_CONFIG_FRAGMENT(coco_multi)
- MCFG_COCO_CARTRIDGE_ADD(SLOT1_TAG, coco_cart_slot1_3, NULL)
+ MCFG_COCO_CARTRIDGE_ADD(SLOT1_TAG, coco_cart_slot1_3, nullptr)
MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_cart_w))
MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_nmi_w))
MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_halt_w))
- MCFG_COCO_CARTRIDGE_ADD(SLOT2_TAG, coco_cart_slot1_3, NULL)
+ MCFG_COCO_CARTRIDGE_ADD(SLOT2_TAG, coco_cart_slot1_3, nullptr)
MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_cart_w))
MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_nmi_w))
MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_halt_w))
- MCFG_COCO_CARTRIDGE_ADD(SLOT3_TAG, coco_cart_slot1_3, NULL)
+ MCFG_COCO_CARTRIDGE_ADD(SLOT3_TAG, coco_cart_slot1_3, nullptr)
MCFG_COCO_CARTRIDGE_CART_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_cart_w))
MCFG_COCO_CARTRIDGE_NMI_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_nmi_w))
MCFG_COCO_CARTRIDGE_HALT_CB(DEVWRITELINE(DEVICE_SELF, coco_multipak_device, multi_halt_w))
diff --git a/src/devices/bus/coco/cococart.cpp b/src/devices/bus/coco/cococart.cpp
index 794c246352b..e3f25389eb1 100644
--- a/src/devices/bus/coco/cococart.cpp
+++ b/src/devices/bus/coco/cococart.cpp
@@ -160,7 +160,7 @@ WRITE8_MEMBER(cococart_slot_device::write)
static const char *line_value_string(cococart_line_value value)
{
- const char *s = NULL;
+ const char *s = nullptr;
switch(value)
{
case COCOCART_LINE_VALUE_CLEAR:
@@ -299,9 +299,9 @@ void cococart_slot_device::cart_set_line(cococart_line line, cococart_line_value
UINT8* cococart_slot_device::get_cart_base()
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
return m_cart->get_cart_base();
- return NULL;
+ return nullptr;
}
@@ -312,7 +312,7 @@ UINT8* cococart_slot_device::get_cart_base()
void cococart_slot_device::set_cart_base_update(cococart_base_update_delegate update)
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
m_cart->set_cart_base_update(update);
}
@@ -327,7 +327,7 @@ bool cococart_slot_device::call_load()
if (m_cart)
{
offs_t read_length = 0;
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
read_length = fread(m_cart->get_cart_base(), 0x8000);
}
@@ -424,7 +424,7 @@ WRITE8_MEMBER(device_cococart_interface::write)
UINT8* device_cococart_interface::get_cart_base()
{
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/bus/coco/cococart.h b/src/devices/bus/coco/cococart.h
index a583935b5a2..414a5184451 100644
--- a/src/devices/bus/coco/cococart.h
+++ b/src/devices/bus/coco/cococart.h
@@ -99,7 +99,7 @@ public:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "coco_cart"; }
virtual const char *file_extensions() const { return "ccc,rom"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/coleco/ctrl.h b/src/devices/bus/coleco/ctrl.h
index dc45d18c1aa..c4d6e7f12cb 100644
--- a/src/devices/bus/coleco/ctrl.h
+++ b/src/devices/bus/coleco/ctrl.h
@@ -80,7 +80,7 @@ public:
DECLARE_WRITE_LINE_MEMBER( common0_w ) { if (exists()) m_device->common0_w(state); }
DECLARE_WRITE_LINE_MEMBER( common1_w ) { if (exists()) m_device->common1_w(state); }
- bool exists() { return m_device != NULL; }
+ bool exists() { return m_device != nullptr; }
void irq_w(int state) { m_write_irq(state); }
diff --git a/src/devices/bus/coleco/exp.cpp b/src/devices/bus/coleco/exp.cpp
index b967d8a0cc5..bf79854d857 100644
--- a/src/devices/bus/coleco/exp.cpp
+++ b/src/devices/bus/coleco/exp.cpp
@@ -28,7 +28,7 @@ const device_type COLECOVISION_CARTRIDGE_SLOT = &device_creator<colecovision_car
device_colecovision_cartridge_interface::device_colecovision_cartridge_interface(const machine_config &mconfig, device_t &device) :
device_slot_card_interface(mconfig, device),
- m_rom(NULL),
+ m_rom(nullptr),
m_rom_size(0)
{
m_slot = dynamic_cast<colecovision_cartridge_slot_device *>(device.owner());
@@ -36,7 +36,7 @@ device_colecovision_cartridge_interface::device_colecovision_cartridge_interface
void device_colecovision_cartridge_interface::rom_alloc(size_t size)
{
- if (m_rom == NULL)
+ if (m_rom == nullptr)
{
m_rom = device().machine().memory().region_alloc("coleco_cart:rom", size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -78,10 +78,10 @@ bool colecovision_cartridge_slot_device::call_load()
{
if (m_card)
{
- size_t size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ size_t size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
m_card->rom_alloc(size);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
fread(m_card->m_rom, size);
}
@@ -133,7 +133,7 @@ void colecovision_cartridge_slot_device::get_default_card_software(std::string &
UINT8 colecovision_cartridge_slot_device::bd_r(address_space &space, offs_t offset, UINT8 data, int _8000, int _a000, int _c000, int _e000)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->bd_r(space, offset, data, _8000, _a000, _c000, _e000);
}
diff --git a/src/devices/bus/coleco/exp.h b/src/devices/bus/coleco/exp.h
index 882bb04b659..1264c7bec89 100644
--- a/src/devices/bus/coleco/exp.h
+++ b/src/devices/bus/coleco/exp.h
@@ -90,7 +90,7 @@ protected:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "coleco_cart"; }
virtual const char *file_extensions() const { return "rom,col,bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/comx35/exp.cpp b/src/devices/bus/comx35/exp.cpp
index adf50a06d5a..cd64a1b49a8 100644
--- a/src/devices/bus/comx35/exp.cpp
+++ b/src/devices/bus/comx35/exp.cpp
@@ -71,7 +71,7 @@ UINT8 comx_expansion_slot_device::mrd_r(address_space &space, offs_t offset, int
{
UINT8 data = 0;
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->comx_mrd_r(space, offset, extrom);
}
@@ -86,7 +86,7 @@ UINT8 comx_expansion_slot_device::mrd_r(address_space &space, offs_t offset, int
void comx_expansion_slot_device::mwr_w(address_space &space, offs_t offset, UINT8 data)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->comx_mwr_w(space, offset, data);
}
@@ -101,7 +101,7 @@ UINT8 comx_expansion_slot_device::io_r(address_space &space, offs_t offset)
{
UINT8 data = 0;
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->comx_io_r(space, offset);
}
@@ -116,7 +116,7 @@ UINT8 comx_expansion_slot_device::io_r(address_space &space, offs_t offset)
void comx_expansion_slot_device::io_w(address_space &space, offs_t offset, UINT8 data)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->comx_io_w(space, offset, data);
}
@@ -129,7 +129,7 @@ void comx_expansion_slot_device::io_w(address_space &space, offs_t offset, UINT8
WRITE_LINE_MEMBER( comx_expansion_slot_device::ds_w )
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->comx_ds_w(state);
}
@@ -142,7 +142,7 @@ WRITE_LINE_MEMBER( comx_expansion_slot_device::ds_w )
WRITE_LINE_MEMBER( comx_expansion_slot_device::q_w )
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->comx_q_w(state);
}
@@ -152,7 +152,7 @@ READ_LINE_MEMBER( comx_expansion_slot_device::ef4_r )
{
int state = CLEAR_LINE;
- if (m_card != NULL)
+ if (m_card != nullptr)
{
state = m_card->comx_ef4_r();
}
diff --git a/src/devices/bus/comx35/expbox.cpp b/src/devices/bus/comx35/expbox.cpp
index 7e4e9799e29..ce0dec61006 100644
--- a/src/devices/bus/comx35/expbox.cpp
+++ b/src/devices/bus/comx35/expbox.cpp
@@ -149,9 +149,9 @@ void comx_eb_device::device_start()
m_expansion_slot[2] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT3_TAG));
m_expansion_slot[3] = dynamic_cast<comx_expansion_slot_device *>(subdevice(SLOT4_TAG));
- for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
+ for (auto & elem : m_irq)
{
- m_irq[slot] = CLEAR_LINE;
+ elem = CLEAR_LINE;
}
}
@@ -162,12 +162,12 @@ void comx_eb_device::device_start()
void comx_eb_device::device_reset()
{
- for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
+ for (auto & elem : m_expansion_slot)
{
- if (m_expansion_slot[slot] != NULL)
+ if (elem != nullptr)
{
- m_expansion_slot[slot]->device().reset();
- m_expansion_slot[slot]->ds_w(0);
+ elem->device().reset();
+ elem->ds_w(0);
}
}
}
@@ -181,11 +181,11 @@ int comx_eb_device::comx_ef4_r()
{
int state = CLEAR_LINE;
- for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
+ for (auto & elem : m_expansion_slot)
{
- if (m_expansion_slot[slot] != NULL)
+ if (elem != nullptr)
{
- state |= m_expansion_slot[slot]->ef4_r();
+ state |= elem->ef4_r();
}
}
@@ -199,11 +199,11 @@ int comx_eb_device::comx_ef4_r()
void comx_eb_device::comx_q_w(int state)
{
- for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
+ for (auto & elem : m_expansion_slot)
{
- if (m_expansion_slot[slot] != NULL)
+ if (elem != nullptr)
{
- m_expansion_slot[slot]->q_w(state);
+ elem->q_w(state);
}
}
}
@@ -230,7 +230,7 @@ UINT8 comx_eb_device::comx_mrd_r(address_space &space, offs_t offset, int *extro
{
for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
{
- if (BIT(m_select, slot) && m_expansion_slot[slot] != NULL)
+ if (BIT(m_select, slot) && m_expansion_slot[slot] != nullptr)
{
data |= m_expansion_slot[slot]->mrd_r(space, offset, extrom);
}
@@ -249,7 +249,7 @@ void comx_eb_device::comx_mwr_w(address_space &space, offs_t offset, UINT8 data)
{
for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
{
- if (BIT(m_select, slot) && m_expansion_slot[slot] != NULL)
+ if (BIT(m_select, slot) && m_expansion_slot[slot] != nullptr)
{
m_expansion_slot[slot]->mwr_w(space, offset, data);
}
@@ -267,7 +267,7 @@ UINT8 comx_eb_device::comx_io_r(address_space &space, offs_t offset)
for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
{
- if (BIT(m_select, slot) && m_expansion_slot[slot] != NULL)
+ if (BIT(m_select, slot) && m_expansion_slot[slot] != nullptr)
{
data |= m_expansion_slot[slot]->io_r(space, offset);
}
@@ -289,7 +289,7 @@ void comx_eb_device::comx_io_w(address_space &space, offs_t offset, UINT8 data)
for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
{
- if (m_expansion_slot[slot] != NULL)
+ if (m_expansion_slot[slot] != nullptr)
{
m_expansion_slot[slot]->ds_w(BIT(m_select, slot));
}
@@ -298,7 +298,7 @@ void comx_eb_device::comx_io_w(address_space &space, offs_t offset, UINT8 data)
for (int slot = 0; slot < MAX_EB_SLOTS; slot++)
{
- if (BIT(m_select, slot) && m_expansion_slot[slot] != NULL)
+ if (BIT(m_select, slot) && m_expansion_slot[slot] != nullptr)
{
m_expansion_slot[slot]->io_w(space, offset, data);
}
diff --git a/src/devices/bus/comx35/fdc.cpp b/src/devices/bus/comx35/fdc.cpp
index 0c83d5bed29..e2c5066873a 100644
--- a/src/devices/bus/comx35/fdc.cpp
+++ b/src/devices/bus/comx35/fdc.cpp
@@ -98,7 +98,7 @@ static MACHINE_CONFIG_FRAGMENT( comx_fd )
MCFG_WD1770_ADD(WD1770_TAG, XTAL_8MHz)
MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":0", comx_fd_floppies, "525sd35t", comx_fd_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":1", comx_fd_floppies, NULL, comx_fd_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":1", comx_fd_floppies, nullptr, comx_fd_device::floppy_formats)
MACHINE_CONFIG_END
@@ -158,7 +158,7 @@ void comx_fd_device::device_reset()
{
m_fdc->reset();
m_fdc->dden_w(1);
- m_fdc->set_floppy(NULL);
+ m_fdc->set_floppy(nullptr);
m_addr = 0;
m_disb = 1;
@@ -266,7 +266,7 @@ void comx_fd_device::comx_io_w(address_space &space, offs_t offset, UINT8 data)
m_addr = data & 0x03;
// drive select
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 2)) floppy = m_floppy0->get_device();
if (BIT(data, 3)) floppy = m_floppy1->get_device();
diff --git a/src/devices/bus/cpc/cpc_rom.cpp b/src/devices/bus/cpc/cpc_rom.cpp
index b510648b1a9..a60b8e35c0b 100644
--- a/src/devices/bus/cpc/cpc_rom.cpp
+++ b/src/devices/bus/cpc/cpc_rom.cpp
@@ -30,7 +30,7 @@ static MACHINE_CONFIG_FRAGMENT( cpc_rom )
// pass-through
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(DEVWRITELINE("^", cpc_expansion_slot_device, irq_w))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(DEVWRITELINE("^", cpc_expansion_slot_device, nmi_w))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(DEVWRITELINE("^", cpc_expansion_slot_device, romdis_w)) // ROMDIS
@@ -99,7 +99,7 @@ rom_image_device::~rom_image_device()
void rom_image_device::device_start()
{
- m_base = NULL;
+ m_base = nullptr;
}
/*-------------------------------------------------
@@ -131,5 +131,5 @@ bool rom_image_device::call_load()
void rom_image_device::call_unload()
{
global_free_array(m_base);
- m_base = NULL;
+ m_base = nullptr;
}
diff --git a/src/devices/bus/cpc/cpc_rom.h b/src/devices/bus/cpc/cpc_rom.h
index 06908b14539..e5df38039fd 100644
--- a/src/devices/bus/cpc/cpc_rom.h
+++ b/src/devices/bus/cpc/cpc_rom.h
@@ -37,7 +37,7 @@ public:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "cpc_rom"; }
virtual const char *file_extensions() const { return "rom,bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
UINT8* base() { return m_base; }
@@ -70,7 +70,7 @@ public:
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
- UINT8* base(UINT8 slot) { if(slot >=1 && slot <= 8) return m_rom[slot]->base(); else return NULL; }
+ UINT8* base(UINT8 slot) { if(slot >=1 && slot <= 8) return m_rom[slot]->base(); else return nullptr; }
protected:
// device-level overrides
diff --git a/src/devices/bus/cpc/cpc_rs232.cpp b/src/devices/bus/cpc/cpc_rs232.cpp
index 4c931264fa0..ccf4165edf1 100644
--- a/src/devices/bus/cpc/cpc_rs232.cpp
+++ b/src/devices/bus/cpc/cpc_rs232.cpp
@@ -31,7 +31,7 @@ static MACHINE_CONFIG_FRAGMENT( cpc_rs232 )
MCFG_Z80DART_OUT_DTRA_CB(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
MCFG_Z80DART_OUT_RTSA_CB(DEVWRITELINE("rs232", rs232_port_device, write_rts))
- MCFG_RS232_PORT_ADD("rs232",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("rs232",default_rs232_devices,nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("dart",z80dart_device,rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("dart",z80dart_device,dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("dart",z80dart_device,ctsa_w))
@@ -39,7 +39,7 @@ static MACHINE_CONFIG_FRAGMENT( cpc_rs232 )
// pass-through
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(DEVWRITELINE("^", cpc_expansion_slot_device, irq_w))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(DEVWRITELINE("^", cpc_expansion_slot_device, nmi_w))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(DEVWRITELINE("^", cpc_expansion_slot_device, romdis_w)) // ROMDIS
diff --git a/src/devices/bus/cpc/cpc_ssa1.cpp b/src/devices/bus/cpc/cpc_ssa1.cpp
index 7ddf1ffccc5..a86847d100c 100644
--- a/src/devices/bus/cpc/cpc_ssa1.cpp
+++ b/src/devices/bus/cpc/cpc_ssa1.cpp
@@ -121,7 +121,7 @@ static MACHINE_CONFIG_FRAGMENT( cpc_ssa1 )
// pass-through
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(DEVWRITELINE("^", cpc_expansion_slot_device, irq_w))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(DEVWRITELINE("^", cpc_expansion_slot_device, nmi_w))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(DEVWRITELINE("^", cpc_expansion_slot_device, romdis_w)) // ROMDIS
@@ -137,7 +137,7 @@ static MACHINE_CONFIG_FRAGMENT( cpc_dkspeech )
// pass-through
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(DEVWRITELINE("^", cpc_expansion_slot_device, irq_w))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(DEVWRITELINE("^", cpc_expansion_slot_device, nmi_w))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(DEVWRITELINE("^", cpc_expansion_slot_device, romdis_w)) // ROMDIS
diff --git a/src/devices/bus/cpc/ddi1.cpp b/src/devices/bus/cpc/ddi1.cpp
index ba7d36ee26c..c9b4adb1a2d 100644
--- a/src/devices/bus/cpc/ddi1.cpp
+++ b/src/devices/bus/cpc/ddi1.cpp
@@ -45,7 +45,7 @@ static MACHINE_CONFIG_FRAGMENT( cpc_ddi1 )
// pass-through
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(DEVWRITELINE("^", cpc_expansion_slot_device, irq_w))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(DEVWRITELINE("^", cpc_expansion_slot_device, nmi_w))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(DEVWRITELINE("^", cpc_expansion_slot_device, romdis_w)) // ROMDIS
diff --git a/src/devices/bus/cpc/mface2.cpp b/src/devices/bus/cpc/mface2.cpp
index 7bb2aa85546..3bb01352876 100644
--- a/src/devices/bus/cpc/mface2.cpp
+++ b/src/devices/bus/cpc/mface2.cpp
@@ -20,7 +20,7 @@ const device_type CPC_MFACE2 = &device_creator<cpc_multiface2_device>;
static MACHINE_CONFIG_FRAGMENT( cpc_mface2 )
// pass-through
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(DEVWRITELINE("^", cpc_expansion_slot_device, irq_w))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(DEVWRITELINE("^", cpc_expansion_slot_device, nmi_w))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(DEVWRITELINE("^", cpc_expansion_slot_device, romdis_w)) // ROMDIS
@@ -74,7 +74,7 @@ DIRECT_UPDATE_MEMBER( cpc_multiface2_device::amstrad_multiface_directoverride )
int cpc_multiface2_device::multiface_hardware_enabled()
{
- if (m_multiface_ram!=NULL)
+ if (m_multiface_ram!=nullptr)
{
if ((ioport("multiface")->read() & 0x01)!=0)
{
diff --git a/src/devices/bus/cpc/playcity.cpp b/src/devices/bus/cpc/playcity.cpp
index b4823467d8a..8d6fd109453 100644
--- a/src/devices/bus/cpc/playcity.cpp
+++ b/src/devices/bus/cpc/playcity.cpp
@@ -34,7 +34,7 @@ static MACHINE_CONFIG_FRAGMENT( cpc_playcity )
// pass-through
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(DEVWRITELINE("^", cpc_expansion_slot_device, irq_w))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(DEVWRITELINE("^", cpc_expansion_slot_device, nmi_w))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(DEVWRITELINE("^", cpc_expansion_slot_device, romdis_w)) // ROMDIS
diff --git a/src/devices/bus/cpc/symbfac2.cpp b/src/devices/bus/cpc/symbfac2.cpp
index 8f9b3d576b7..c80d22da6c6 100644
--- a/src/devices/bus/cpc/symbfac2.cpp
+++ b/src/devices/bus/cpc/symbfac2.cpp
@@ -28,7 +28,7 @@ const device_type CPC_SYMBIFACE2 = &device_creator<cpc_symbiface2_device>;
// device machine config
static MACHINE_CONFIG_FRAGMENT( cpc_symbiface2 )
- MCFG_ATA_INTERFACE_ADD("ide",ata_devices,"hdd",NULL,false)
+ MCFG_ATA_INTERFACE_ADD("ide",ata_devices,"hdd",nullptr,false)
MCFG_DS12885_ADD("rtc")
MCFG_NVRAM_ADD_1FILL("nvram")
// no pass-through
diff --git a/src/devices/bus/crvision/slot.cpp b/src/devices/bus/crvision/slot.cpp
index f99441e06f9..207105ea1d6 100644
--- a/src/devices/bus/crvision/slot.cpp
+++ b/src/devices/bus/crvision/slot.cpp
@@ -27,7 +27,7 @@ const device_type CRVISION_CART_SLOT = &device_creator<crvision_cart_slot_device
device_crvision_cart_interface::device_crvision_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_crvision_cart_interface::~device_crvision_cart_interface()
void device_crvision_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(CRVSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -125,10 +125,10 @@ static const crvision_slot slot_list[] =
static int crvision_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -136,10 +136,10 @@ static int crvision_get_pcb_id(const char *slot)
static const char *crvision_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "crv_rom4k";
@@ -154,7 +154,7 @@ bool crvision_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
if (size > 0x4800)
{
@@ -164,12 +164,12 @@ bool crvision_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);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
m_type = CRV_4K;
diff --git a/src/devices/bus/crvision/slot.h b/src/devices/bus/crvision/slot.h
index 006f1522d40..50e1f952b1e 100644
--- a/src/devices/bus/crvision/slot.h
+++ b/src/devices/bus/crvision/slot.h
@@ -73,7 +73,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "crvision_cart"; }
virtual const char *file_extensions() const { return "bin,rom"; }
diff --git a/src/devices/bus/dmv/k210.cpp b/src/devices/bus/dmv/k210.cpp
index 823afb18b3b..0a49a824df0 100644
--- a/src/devices/bus/dmv/k210.cpp
+++ b/src/devices/bus/dmv/k210.cpp
@@ -67,7 +67,7 @@ dmv_k210_device::dmv_k210_device(const machine_config &mconfig, const char *tag,
void dmv_k210_device::device_start()
{
- m_clk1_timer = timer_alloc(0, NULL);
+ m_clk1_timer = timer_alloc(0, nullptr);
m_bus = static_cast<dmvcart_slot_device*>(owner());
}
diff --git a/src/devices/bus/dmv/k801.cpp b/src/devices/bus/dmv/k801.cpp
index 2d7525d93aa..5bc586c09b5 100644
--- a/src/devices/bus/dmv/k801.cpp
+++ b/src/devices/bus/dmv/k801.cpp
@@ -54,7 +54,7 @@ static MACHINE_CONFIG_FRAGMENT( dmv_k213 )
MCFG_FRAGMENT_ADD( dmv_k801 )
MCFG_DEVICE_MODIFY("rs232")
- MCFG_SLOT_DEFAULT_OPTION(NULL)
+ MCFG_SLOT_DEFAULT_OPTION(nullptr)
MACHINE_CONFIG_END
static INPUT_PORTS_START( dmv_k801 )
diff --git a/src/devices/bus/ecbbus/ecbbus.cpp b/src/devices/bus/ecbbus/ecbbus.cpp
index d6e26fdf746..c96d49da103 100644
--- a/src/devices/bus/ecbbus/ecbbus.cpp
+++ b/src/devices/bus/ecbbus/ecbbus.cpp
@@ -95,8 +95,8 @@ ecbbus_device::ecbbus_device(const machine_config &mconfig, const char *tag, dev
m_write_irq(*this),
m_write_nmi(*this)
{
- for (int i = 0; i < MAX_ECBBUS_SLOTS; i++)
- m_ecbbus_device[i] = NULL;
+ for (auto & elem : m_ecbbus_device)
+ elem = nullptr;
}
@@ -130,11 +130,11 @@ READ8_MEMBER( ecbbus_device::mem_r )
{
UINT8 data = 0;
- for (int i = 0; i < MAX_ECBBUS_SLOTS; i++)
+ for (auto & elem : m_ecbbus_device)
{
- if (m_ecbbus_device[i] != NULL)
+ if (elem != nullptr)
{
- data |= m_ecbbus_device[i]->ecbbus_mem_r(offset);
+ data |= elem->ecbbus_mem_r(offset);
}
}
@@ -148,11 +148,11 @@ READ8_MEMBER( ecbbus_device::mem_r )
WRITE8_MEMBER( ecbbus_device::mem_w )
{
- for (int i = 0; i < MAX_ECBBUS_SLOTS; i++)
+ for (auto & elem : m_ecbbus_device)
{
- if (m_ecbbus_device[i] != NULL)
+ if (elem != nullptr)
{
- m_ecbbus_device[i]->ecbbus_mem_w(offset, data);
+ elem->ecbbus_mem_w(offset, data);
}
}
}
@@ -166,11 +166,11 @@ READ8_MEMBER( ecbbus_device::io_r )
{
UINT8 data = 0;
- for (int i = 0; i < MAX_ECBBUS_SLOTS; i++)
+ for (auto & elem : m_ecbbus_device)
{
- if (m_ecbbus_device[i] != NULL)
+ if (elem != nullptr)
{
- data |= m_ecbbus_device[i]->ecbbus_io_r(offset);
+ data |= elem->ecbbus_io_r(offset);
}
}
@@ -184,11 +184,11 @@ READ8_MEMBER( ecbbus_device::io_r )
WRITE8_MEMBER( ecbbus_device::io_w )
{
- for (int i = 0; i < MAX_ECBBUS_SLOTS; i++)
+ for (auto & elem : m_ecbbus_device)
{
- if (m_ecbbus_device[i] != NULL)
+ if (elem != nullptr)
{
- m_ecbbus_device[i]->ecbbus_io_w(offset, data);
+ elem->ecbbus_io_w(offset, data);
}
}
}
diff --git a/src/devices/bus/ecbbus/grip.cpp b/src/devices/bus/ecbbus/grip.cpp
index c8d76981d11..75ba3961754 100644
--- a/src/devices/bus/ecbbus/grip.cpp
+++ b/src/devices/bus/ecbbus/grip.cpp
@@ -423,7 +423,7 @@ WRITE_LINE_MEMBER( grip_device::speaker_w )
static const z80_daisy_config grip_daisy_chain[] =
{
{ Z80STI_TAG },
- { NULL }
+ { nullptr }
};
diff --git a/src/devices/bus/econet/e01.cpp b/src/devices/bus/econet/e01.cpp
index e8dd0246dd6..162e8c7f6d6 100644
--- a/src/devices/bus/econet/e01.cpp
+++ b/src/devices/bus/econet/e01.cpp
@@ -541,7 +541,7 @@ WRITE8_MEMBER( e01_device::floppy_w )
*/
// floppy select
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (!BIT(data, 0)) floppy = m_floppy0->get_device();
if (!BIT(data, 1)) floppy = m_floppy1->get_device();
diff --git a/src/devices/bus/econet/econet.cpp b/src/devices/bus/econet/econet.cpp
index 93cf59eb41f..e56d843db32 100644
--- a/src/devices/bus/econet/econet.cpp
+++ b/src/devices/bus/econet/econet.cpp
@@ -198,9 +198,9 @@ econet_device::econet_device(const machine_config &mconfig, const char *tag, dev
m_write_clk(*this),
m_write_data(*this)
{
- for (int i = 0; i < SIGNAL_COUNT; i++)
+ for (auto & elem : m_line)
{
- m_line[i] = 1;
+ elem = 1;
}
}
@@ -233,7 +233,7 @@ void econet_device::device_stop()
void econet_device::add_device(device_t *target, int address)
{
- daisy_entry *entry = global_alloc(daisy_entry(target));
+ auto entry = global_alloc(daisy_entry(target));
entry->m_interface->m_econet = this;
entry->m_interface->m_address = address;
@@ -247,13 +247,13 @@ void econet_device::add_device(device_t *target, int address)
//-------------------------------------------------
econet_device::daisy_entry::daisy_entry(device_t *device) :
- m_next(NULL),
+ m_next(nullptr),
m_device(device),
- m_interface(NULL)
+ m_interface(nullptr)
{
- for (int i = 0; i < SIGNAL_COUNT; i++)
+ for (auto & elem : m_line)
{
- m_line[i] = 1;
+ elem = 1;
}
device->interface(m_interface);
diff --git a/src/devices/bus/ep64/exdos.cpp b/src/devices/bus/ep64/exdos.cpp
index f0813ff8d7e..d5910c07ee3 100644
--- a/src/devices/bus/ep64/exdos.cpp
+++ b/src/devices/bus/ep64/exdos.cpp
@@ -105,9 +105,9 @@ static MACHINE_CONFIG_FRAGMENT( ep64_exdos )
MCFG_WD1770_ADD(WD1770_TAG, XTAL_8MHz)
MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":0", ep64_exdos_floppies, "35dd", ep64_exdos_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":1", ep64_exdos_floppies, NULL, ep64_exdos_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":2", ep64_exdos_floppies, NULL, ep64_exdos_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":3", ep64_exdos_floppies, NULL, ep64_exdos_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":1", ep64_exdos_floppies, nullptr, ep64_exdos_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":2", ep64_exdos_floppies, nullptr, ep64_exdos_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1770_TAG":3", ep64_exdos_floppies, nullptr, ep64_exdos_device::floppy_formats)
MACHINE_CONFIG_END
@@ -139,7 +139,7 @@ ep64_exdos_device::ep64_exdos_device(const machine_config &mconfig, const char *
m_floppy1(*this, WD1770_TAG":1"),
m_floppy2(*this, WD1770_TAG":2"),
m_floppy3(*this, WD1770_TAG":3"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_rom(*this, "rom")
{
}
@@ -166,7 +166,7 @@ void ep64_exdos_device::device_reset()
{
m_fdc->reset();
- m_floppy = NULL;
+ m_floppy = nullptr;
m_fdc->set_floppy(m_floppy);
m_fdc->dden_w(0);
}
@@ -225,7 +225,7 @@ WRITE8_MEMBER( ep64_exdos_device::write )
*/
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
diff --git a/src/devices/bus/epson_sio/epson_sio.cpp b/src/devices/bus/epson_sio/epson_sio.cpp
index 8f4112a86eb..88e50bb9cdc 100644
--- a/src/devices/bus/epson_sio/epson_sio.cpp
+++ b/src/devices/bus/epson_sio/epson_sio.cpp
@@ -94,13 +94,13 @@ void epson_sio_device::device_reset()
WRITE_LINE_MEMBER( epson_sio_device::tx_w )
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
m_cart->tx_w(state);
}
WRITE_LINE_MEMBER( epson_sio_device::pout_w )
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
m_cart->pout_w(state);
}
diff --git a/src/devices/bus/epson_sio/pf10.cpp b/src/devices/bus/epson_sio/pf10.cpp
index f2593480a7c..7096aee3fce 100644
--- a/src/devices/bus/epson_sio/pf10.cpp
+++ b/src/devices/bus/epson_sio/pf10.cpp
@@ -72,7 +72,7 @@ static MACHINE_CONFIG_FRAGMENT( pf10 )
MCFG_UPD765A_ADD("upd765a", false, true)
MCFG_FLOPPY_DRIVE_ADD("upd765a:0", pf10_floppies, "smd165", floppy_image_device::default_floppy_formats)
- MCFG_EPSON_SIO_ADD("sio", NULL)
+ MCFG_EPSON_SIO_ADD("sio", nullptr)
MCFG_EPSON_SIO_RX(DEVWRITELINE(DEVICE_SELF, epson_pf10_device, rxc_w))
MCFG_EPSON_SIO_PIN(DEVWRITELINE(DEVICE_SELF, epson_pf10_device, pinc_w))
MACHINE_CONFIG_END
@@ -111,7 +111,7 @@ epson_pf10_device::epson_pf10_device(const machine_config &mconfig, const char *
void epson_pf10_device::device_start()
{
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_floppy = subdevice<floppy_connector>("upd765a:0")->get_device();
}
diff --git a/src/devices/bus/epson_sio/tf20.cpp b/src/devices/bus/epson_sio/tf20.cpp
index 4ab5b8adc01..07fdf31e858 100644
--- a/src/devices/bus/epson_sio/tf20.cpp
+++ b/src/devices/bus/epson_sio/tf20.cpp
@@ -107,7 +107,7 @@ static MACHINE_CONFIG_FRAGMENT( tf20 )
MCFG_FLOPPY_DRIVE_ADD("5a:1", tf20_floppies, "sd320", floppy_image_device::default_floppy_formats)
// serial interface to another device
- MCFG_EPSON_SIO_ADD("sio", NULL)
+ MCFG_EPSON_SIO_ADD("sio", nullptr)
MCFG_EPSON_SIO_RX(DEVWRITELINE(DEVICE_SELF, epson_tf20_device, rxc_w))
MCFG_EPSON_SIO_PIN(DEVWRITELINE(DEVICE_SELF, epson_tf20_device, pinc_w))
MACHINE_CONFIG_END
@@ -149,8 +149,8 @@ void epson_tf20_device::device_start()
if (!m_ram->started())
throw device_missing_dependencies();
- m_timer_serial = timer_alloc(0, NULL);
- m_timer_tc = timer_alloc(1, NULL);
+ m_timer_serial = timer_alloc(0, nullptr);
+ m_timer_tc = timer_alloc(1, nullptr);
m_fd0 = subdevice<floppy_connector>("5a:0")->get_device();
m_fd1 = subdevice<floppy_connector>("5a:1")->get_device();
diff --git a/src/devices/bus/gameboy/gb_slot.cpp b/src/devices/bus/gameboy/gb_slot.cpp
index a1f92b31bcd..e70eb07c6d2 100644
--- a/src/devices/bus/gameboy/gb_slot.cpp
+++ b/src/devices/bus/gameboy/gb_slot.cpp
@@ -38,7 +38,7 @@ const device_type MEGADUCK_CART_SLOT = &device_creator<megaduck_cart_slot_device
device_gb_cart_interface::device_gb_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), m_ram_bank(0), m_latch_bank(0), m_latch_bank2(0),
has_rumble(false),
has_timer(false),
@@ -61,7 +61,7 @@ device_gb_cart_interface::~device_gb_cart_interface()
void device_gb_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(GBSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -232,10 +232,10 @@ static const gb_slot slot_list[] =
static int gb_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -243,10 +243,10 @@ static int gb_get_pcb_id(const char *slot)
static const char *gb_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "rom";
@@ -263,12 +263,12 @@ bool base_gb_cart_slot_device::call_load()
if (m_cart)
{
UINT32 offset = 0;
- UINT32 len = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
UINT8 *ROM;
int rambanks = 0;
// From fullpath, check for presence of a header and skip it + check filesize is valid
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
if ((len % 0x4000) == 512)
{
@@ -288,7 +288,7 @@ bool base_gb_cart_slot_device::call_load()
m_cart->rom_alloc(len, tag());
ROM = m_cart->get_rom_base();
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(ROM, len);
else
memcpy(ROM, get_software_region("rom"), len);
@@ -298,7 +298,7 @@ bool base_gb_cart_slot_device::call_load()
if (get_mmm01_candidate(ROM, len))
offset = len - 0x8000;
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
m_type = gb_get_pcb_id(get_feature("slot") ? get_feature("slot") : "rom");
else
m_type = get_cart_type(ROM + offset, len - offset);
@@ -312,7 +312,7 @@ bool base_gb_cart_slot_device::call_load()
m_cart->set_additional_wirings(0x0f, -1);
// setup RAM/NVRAM/RTC/RUMBLE
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
// from softlist we only rely on xml
if (get_software_region("ram"))
@@ -413,11 +413,11 @@ bool megaduck_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 len = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
m_cart->rom_alloc(len, tag());
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(m_cart->get_rom_base(), len);
else
memcpy(m_cart->get_rom_base(), get_software_region("rom"), len);
@@ -788,7 +788,7 @@ void base_gb_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len)
{0x5301, "American Sammy"},
{0x4701, "Spectrum Holobyte"},
{0x1801, "Hudson Soft"},
- {0x0000, NULL}
+ {0x0000, nullptr}
};
static const int ramsize[8] = { 0, 2, 8, 32, 128, 64, 0, 0 };
diff --git a/src/devices/bus/gameboy/gb_slot.h b/src/devices/bus/gameboy/gb_slot.h
index 711037a0da8..e810ab99e1c 100644
--- a/src/devices/bus/gameboy/gb_slot.h
+++ b/src/devices/bus/gameboy/gb_slot.h
@@ -136,7 +136,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "gameboy_cart"; }
virtual const char *file_extensions() const { return "bin,gb,gbc"; }
diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp
index 2ae46b80864..fc8f09f30a0 100644
--- a/src/devices/bus/gba/gba_slot.cpp
+++ b/src/devices/bus/gba/gba_slot.cpp
@@ -28,7 +28,7 @@ const device_type GBA_CART_SLOT = &device_creator<gba_cart_slot_device>;
device_gba_cart_interface::device_gba_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)
{
}
@@ -48,7 +48,7 @@ device_gba_cart_interface::~device_gba_cart_interface()
void device_gba_cart_interface::rom_alloc(UINT32 size, const char *tag)
{
- if (m_rom == NULL)
+ if (m_rom == nullptr)
{
// we always alloc 32MB of rom region!
m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(GBASLOT_ROM_REGION_TAG).c_str(), 0x2000000, 4, ENDIANNESS_LITTLE)->base();
@@ -138,10 +138,10 @@ static const gba_slot slot_list[] =
static int gba_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -149,10 +149,10 @@ static int gba_get_pcb_id(const char *slot)
static const char *gba_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "gba_rom";
@@ -168,7 +168,7 @@ bool gba_cart_slot_device::call_load()
if (m_cart)
{
UINT8 *ROM;
- UINT32 size = (software_entry() != NULL) ? get_software_region_length("rom") : length();
+ UINT32 size = (software_entry() != nullptr) ? get_software_region_length("rom") : length();
if (size > 0x2000000)
{
seterror(IMAGE_ERROR_UNSPECIFIED, "Attempted loading a cart larger than 32MB");
@@ -178,7 +178,7 @@ bool gba_cart_slot_device::call_load()
m_cart->rom_alloc(size, tag());
ROM = (UINT8 *)m_cart->get_rom_base();
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
fread(ROM, size);
m_type = get_cart_type(ROM, size);
@@ -324,9 +324,9 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
chip &= ~(GBA_CHIP_EEPROM | GBA_CHIP_EEPROM_4K | GBA_CHIP_EEPROM_64K | GBA_CHIP_FLASH | GBA_CHIP_FLASH_1M | GBA_CHIP_FLASH_512 | GBA_CHIP_SRAM);
// search if it is one of the known titles with NVRAM conflicts
- for (int i = 0; i < sizeof(gba_chip_fix_conflict_list) / sizeof(gba_chip_fix_conflict_item); i++)
+ for (auto & elem : gba_chip_fix_conflict_list)
{
- const gba_chip_fix_conflict_item *item = &gba_chip_fix_conflict_list[i];
+ const gba_chip_fix_conflict_item *item = &elem;
if (!strcmp(game_code, item->game_code))
{
chip |= item->chip;
@@ -348,9 +348,9 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
osd_printf_info("GBA: Game Code \"%s\"\n", game_code);
- for (int i = 0; i < sizeof(gba_chip_fix_eeprom_list) / sizeof(gba_chip_fix_eeprom_item); i++)
+ for (auto & elem : gba_chip_fix_eeprom_list)
{
- const gba_chip_fix_eeprom_item *item = &gba_chip_fix_eeprom_list[i];
+ const gba_chip_fix_eeprom_item *item = &elem;
if (!strcmp(game_code, item->game_code))
{
chip = (chip & ~GBA_CHIP_EEPROM) | GBA_CHIP_EEPROM_64K;
diff --git a/src/devices/bus/gba/gba_slot.h b/src/devices/bus/gba/gba_slot.h
index 05181d29d4c..3c6919db041 100644
--- a/src/devices/bus/gba/gba_slot.h
+++ b/src/devices/bus/gba/gba_slot.h
@@ -87,7 +87,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "gba_cart"; }
virtual const char *file_extensions() const { return "gba,bin"; }
diff --git a/src/devices/bus/generic/slot.cpp b/src/devices/bus/generic/slot.cpp
index 91b62b5a1c2..40a32ffcecd 100644
--- a/src/devices/bus/generic/slot.cpp
+++ b/src/devices/bus/generic/slot.cpp
@@ -37,7 +37,7 @@ const device_type GENERIC_SOCKET = &device_creator<generic_slot_device>;
device_generic_cart_interface::device_generic_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)
{
}
@@ -57,7 +57,7 @@ device_generic_cart_interface::~device_generic_cart_interface()
void device_generic_cart_interface::rom_alloc(size_t size, int width, endianness_t endian, const char *tag)
{
- if (m_rom == NULL)
+ if (m_rom == nullptr)
{
m_rom = device().machine().memory().region_alloc(std::string(tag).append(GENERIC_ROM_REGION_TAG).c_str(), size, width, endian)->base();
m_rom_size = size;
@@ -87,7 +87,7 @@ generic_slot_device::generic_slot_device(const machine_config &mconfig, const ch
device_t(mconfig, GENERIC_SOCKET, "Generic ROM Socket / RAM Socket / Cartridge Slot", tag, owner, clock, "generic_socket", __FILE__),
device_image_interface(mconfig, *this),
device_slot_interface(mconfig, *this),
- m_interface(NULL),
+ m_interface(nullptr),
m_default_card("rom"),
m_extensions("bin"),
m_must_be_loaded(FALSE),
@@ -200,9 +200,9 @@ void generic_slot_device::get_default_card_software(std::string &result)
UINT32 generic_slot_device::common_get_size(const char *region)
{
// if we are loading from softlist, you have to specify a region
- assert((software_entry() == NULL) || (region != NULL));
+ assert((software_entry() == nullptr) || (region != nullptr));
- return (software_entry() == NULL) ? length() : get_software_region_length(region);
+ return (software_entry() == nullptr) ? length() : get_software_region_length(region);
}
/*-------------------------------------------------
@@ -213,12 +213,12 @@ UINT32 generic_slot_device::common_get_size(const char *region)
void generic_slot_device::common_load_rom(UINT8 *ROM, UINT32 len, const char *region)
{
// basic sanity check
- assert((ROM != NULL) && (len > 0));
+ assert((ROM != nullptr) && (len > 0));
// if we are loading from softlist, you have to specify a region
- assert((software_entry() == NULL) || (region != NULL));
+ assert((software_entry() == nullptr) || (region != nullptr));
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(ROM, len);
else
memcpy(ROM, get_software_region(region), len);
diff --git a/src/devices/bus/generic/slot.h b/src/devices/bus/generic/slot.h
index 7c8725e89a7..f31f114e4c5 100644
--- a/src/devices/bus/generic/slot.h
+++ b/src/devices/bus/generic/slot.h
@@ -119,7 +119,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return m_must_be_loaded; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return m_interface; }
virtual const char *file_extensions() const { return m_extensions; }
@@ -137,8 +137,8 @@ public:
virtual void rom_alloc(size_t size, int width, endianness_t end) { if (m_cart) m_cart->rom_alloc(size, width, end, tag()); }
virtual void ram_alloc(UINT32 size) { if (m_cart) m_cart->ram_alloc(size); }
- UINT8* get_rom_base() { if (m_cart) return m_cart->get_rom_base(); return NULL; }
- UINT8* get_ram_base() { if (m_cart) return m_cart->get_ram_base(); return NULL; }
+ UINT8* get_rom_base() { if (m_cart) return m_cart->get_rom_base(); return nullptr; }
+ UINT8* get_ram_base() { if (m_cart) return m_cart->get_ram_base(); return nullptr; }
UINT32 get_rom_size() { if (m_cart) return m_cart->get_rom_size(); return 0; }
void save_ram() { if (m_cart && m_cart->get_ram_size()) m_cart->save_ram(); }
diff --git a/src/devices/bus/ieee488/c2040fdc.cpp b/src/devices/bus/ieee488/c2040fdc.cpp
index c8cd98ae853..b39ab1d23a3 100644
--- a/src/devices/bus/ieee488/c2040fdc.cpp
+++ b/src/devices/bus/ieee488/c2040fdc.cpp
@@ -75,8 +75,8 @@ c2040_fdc_t::c2040_fdc_t(const machine_config &mconfig, const char *tag, device_
m_write_ready(*this),
m_write_error(*this),
m_gcr_rom(*this, "gcr"),
- m_floppy0(NULL),
- m_floppy1(NULL),
+ m_floppy0(nullptr),
+ m_floppy1(nullptr),
m_mtr0(1),
m_mtr1(1),
m_stp0(0),
diff --git a/src/devices/bus/ieee488/c8050fdc.cpp b/src/devices/bus/ieee488/c8050fdc.cpp
index 53485b0618d..5e2e91676c0 100644
--- a/src/devices/bus/ieee488/c8050fdc.cpp
+++ b/src/devices/bus/ieee488/c8050fdc.cpp
@@ -78,8 +78,8 @@ c8050_fdc_t::c8050_fdc_t(const machine_config &mconfig, const char *tag, device_
m_write_brdy(*this),
m_write_error(*this),
m_gcr_rom(*this, "gcr"),
- m_floppy0(NULL),
- m_floppy1(NULL),
+ m_floppy0(nullptr),
+ m_floppy1(nullptr),
m_mtr0(1),
m_mtr1(1),
m_stp0(0),
diff --git a/src/devices/bus/ieee488/c8280.cpp b/src/devices/bus/ieee488/c8280.cpp
index 72853220014..29ade86c570 100644
--- a/src/devices/bus/ieee488/c8280.cpp
+++ b/src/devices/bus/ieee488/c8280.cpp
@@ -436,7 +436,7 @@ void c8280_t::device_reset()
m_riot1->pa7_w(1);
m_fk5 = 0;
- m_floppy = NULL;
+ m_floppy = nullptr;
m_fdc->set_floppy(m_floppy);
m_fdc->dden_w(0);
}
@@ -513,7 +513,7 @@ WRITE8_MEMBER( c8280_t::fk5_w )
m_fk5 = data & 0x27;
// drive select
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
diff --git a/src/devices/bus/ieee488/ieee488.cpp b/src/devices/bus/ieee488/ieee488.cpp
index 0d749bbb153..38a1f538404 100644
--- a/src/devices/bus/ieee488/ieee488.cpp
+++ b/src/devices/bus/ieee488/ieee488.cpp
@@ -76,12 +76,12 @@ ieee488_slot_device::ieee488_slot_device(const machine_config &mconfig, const ch
void ieee488_slot_device::device_start()
{
- ieee488_device* bus = NULL;
+ ieee488_device* bus = nullptr;
- for (device_t *device = owner(); device != NULL; device = device->owner())
+ for (device_t *device = owner(); device != nullptr; device = device->owner())
{
bus = device->subdevice<ieee488_device>(IEEE488_TAG);
- if (bus != NULL) break;
+ if (bus != nullptr) break;
}
assert(bus);
@@ -112,9 +112,9 @@ ieee488_device::ieee488_device(const machine_config &mconfig, const char *tag, d
m_write_ren(*this),
m_dio(0xff)
{
- for (int i = 0; i < SIGNAL_COUNT; i++)
+ for (auto & elem : m_line)
{
- m_line[i] = 1;
+ elem = 1;
}
}
@@ -153,7 +153,7 @@ void ieee488_device::device_stop()
void ieee488_device::add_device(ieee488_slot_device *slot, device_t *target)
{
- daisy_entry *entry = global_alloc(daisy_entry(target));
+ auto entry = global_alloc(daisy_entry(target));
entry->m_interface->m_bus = this;
entry->m_interface->m_slot = slot;
@@ -167,14 +167,14 @@ void ieee488_device::add_device(ieee488_slot_device *slot, device_t *target)
//-------------------------------------------------
ieee488_device::daisy_entry::daisy_entry(device_t *device)
- : m_next(NULL),
+ : m_next(nullptr),
m_device(device),
- m_interface(NULL),
+ m_interface(nullptr),
m_dio(0xff)
{
- for (int i = 0; i < SIGNAL_COUNT; i++)
+ for (auto & elem : m_line)
{
- m_line[i] = 1;
+ elem = 1;
}
device->interface(m_interface);
diff --git a/src/devices/bus/ieee488/shark.cpp b/src/devices/bus/ieee488/shark.cpp
index 47582aa42b8..bdb11f6d261 100644
--- a/src/devices/bus/ieee488/shark.cpp
+++ b/src/devices/bus/ieee488/shark.cpp
@@ -85,7 +85,7 @@ static MACHINE_CONFIG_FRAGMENT( mshark )
// devices
MCFG_HARDDISK_ADD("harddisk1")
- MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/ieee488/softbox.cpp b/src/devices/bus/ieee488/softbox.cpp
index 56d6179158e..02d75d19a34 100644
--- a/src/devices/bus/ieee488/softbox.cpp
+++ b/src/devices/bus/ieee488/softbox.cpp
@@ -243,7 +243,7 @@ static MACHINE_CONFIG_FRAGMENT( softbox )
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_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr))
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal)
diff --git a/src/devices/bus/imi7000/imi5000h.cpp b/src/devices/bus/imi7000/imi5000h.cpp
index ff57b942f17..cea944b9eaf 100644
--- a/src/devices/bus/imi7000/imi5000h.cpp
+++ b/src/devices/bus/imi7000/imi5000h.cpp
@@ -97,7 +97,7 @@ static const z80_daisy_config z80_daisy_chain[] =
{ Z80PIO_0_TAG },
{ Z80CTC_TAG },
{ Z80PIO_2_TAG },
- { NULL }
+ { nullptr }
};
diff --git a/src/devices/bus/intv/ecs.cpp b/src/devices/bus/intv/ecs.cpp
index f9d140bb62d..b855bb73143 100644
--- a/src/devices/bus/intv/ecs.cpp
+++ b/src/devices/bus/intv/ecs.cpp
@@ -54,7 +54,7 @@ intv_ecs_device::intv_ecs_device(const machine_config &mconfig, const char *tag,
void intv_ecs_device::device_start()
{
// if the ECS is mounted directly in the system, use device rom and alloc RAM
- if (m_rom == NULL)
+ if (m_rom == nullptr)
{
std::string region_tag;
m_rom = memregion(region_tag.assign(tag()).append(":ecs").c_str())->base();
@@ -219,7 +219,7 @@ static MACHINE_CONFIG_FRAGMENT( sub_slot )
MCFG_AY8910_PORT_A_WRITE_CB(WRITE8(intv_ecs_device, ay_porta_w))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono_ecs", 0.33)
- MCFG_INTV_CARTRIDGE_ADD("subslot", intv_cart, NULL)
+ MCFG_INTV_CARTRIDGE_ADD("subslot", intv_cart, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/intv/slot.cpp b/src/devices/bus/intv/slot.cpp
index e6e3658ffbe..05e55e49318 100644
--- a/src/devices/bus/intv/slot.cpp
+++ b/src/devices/bus/intv/slot.cpp
@@ -98,7 +98,7 @@ const device_type INTV_CART_SLOT = &device_creator<intv_cart_slot_device>;
device_intv_cart_interface::device_intv_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)
{
}
@@ -118,7 +118,7 @@ device_intv_cart_interface::~device_intv_cart_interface()
void device_intv_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(INTVSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
memset(m_rom, 0xff, size);
@@ -207,10 +207,10 @@ static const intv_slot slot_list[] =
static int intv_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -219,10 +219,10 @@ static int intv_get_pcb_id(const char *slot)
#if 1
static const char *intv_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "intv_rom";
@@ -392,7 +392,7 @@ bool intv_cart_slot_device::call_load()
{
if (m_cart)
{
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
return load_fullpath();
else
{
diff --git a/src/devices/bus/intv/slot.h b/src/devices/bus/intv/slot.h
index 2b5269edb8b..2f99612fe27 100644
--- a/src/devices/bus/intv/slot.h
+++ b/src/devices/bus/intv/slot.h
@@ -115,7 +115,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "intv_cart"; }
virtual const char *file_extensions() const { return "bin,int,rom,itv"; }
diff --git a/src/devices/bus/intv/voice.cpp b/src/devices/bus/intv/voice.cpp
index 2ec50862d0d..ea2c7db82f4 100644
--- a/src/devices/bus/intv/voice.cpp
+++ b/src/devices/bus/intv/voice.cpp
@@ -75,7 +75,7 @@ static MACHINE_CONFIG_FRAGMENT( intellivoice )
/* The Intellivoice uses a speaker with its own volume control so the relative volumes to use are subjective */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono_voice", 1.00)
- MCFG_INTV_CARTRIDGE_ADD("subslot", intv_cart, NULL)
+ MCFG_INTV_CARTRIDGE_ADD("subslot", intv_cart, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/iq151/disc2.cpp b/src/devices/bus/iq151/disc2.cpp
index a63864b6a83..ba2cbf36137 100644
--- a/src/devices/bus/iq151/disc2.cpp
+++ b/src/devices/bus/iq151/disc2.cpp
@@ -111,7 +111,7 @@ void iq151_disc2_device::read(offs_t offset, UINT8 &data)
void iq151_disc2_device::io_read(offs_t offset, UINT8 &data)
{
/* This is gross */
- address_space *space = NULL;
+ address_space *space = nullptr;
if (offset == 0xaa)
data = m_fdc->msr_r(*space, 0, 0xff);
else if (offset == 0xab)
@@ -124,7 +124,7 @@ void iq151_disc2_device::io_read(offs_t offset, UINT8 &data)
void iq151_disc2_device::io_write(offs_t offset, UINT8 data)
{
- address_space *space = NULL;
+ address_space *space = nullptr;
if (offset == 0xab)
m_fdc->fifo_w(*space, 0, data, 0xff);
else if (offset == 0xac)
diff --git a/src/devices/bus/iq151/iq151.cpp b/src/devices/bus/iq151/iq151.cpp
index fd2fcb016fb..de7f9355cb3 100644
--- a/src/devices/bus/iq151/iq151.cpp
+++ b/src/devices/bus/iq151/iq151.cpp
@@ -170,9 +170,9 @@ bool iq151cart_slot_device::call_load()
offs_t read_length = 0;
UINT8 *cart_base = m_cart->get_cart_base();
- if (cart_base != NULL)
+ if (cart_base != nullptr)
{
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
read_length = length();
fread(m_cart->get_cart_base(), read_length);
diff --git a/src/devices/bus/iq151/iq151.h b/src/devices/bus/iq151/iq151.h
index 4b9c5db9887..f561a27ca3f 100644
--- a/src/devices/bus/iq151/iq151.h
+++ b/src/devices/bus/iq151/iq151.h
@@ -63,7 +63,7 @@ public:
virtual void write(offs_t offset, UINT8 data) { }
virtual void io_read(offs_t offset, UINT8 &data) { }
virtual void io_write(offs_t offset, UINT8 data) { }
- virtual UINT8* get_cart_base() { return NULL; }
+ virtual UINT8* get_cart_base() { return nullptr; }
// video update
virtual void video_update(bitmap_ind16 &bitmap, const rectangle &cliprect) { }
@@ -103,7 +103,7 @@ public:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "iq151_cart"; }
virtual const char *file_extensions() const { return "bin,rom"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/isa/3c505.cpp b/src/devices/bus/isa/3c505.cpp
index 6cb4f03775d..2cb640e91d5 100644
--- a/src/devices/bus/isa/3c505.cpp
+++ b/src/devices/bus/isa/3c505.cpp
@@ -350,7 +350,7 @@ void threecom3c505_device::device_start()
m_tx_data_buffer.start(this, ETH_BUFFER_SIZE);
m_program_buffer.start(this, PGM_BUFFER_SIZE);
- m_do_command_timer = timer_alloc(0, NULL);
+ m_do_command_timer = timer_alloc(0, nullptr);
}
//-------------------------------------------------
@@ -430,7 +430,7 @@ const char *threecom3c505_device::cpu_context()
int ms = (t % osd_ticks_per_second()) / 1000;
/* if we have an executing CPU, output data */
- if (cpu != NULL)
+ if (cpu != nullptr)
{
sprintf(statebuf, "%d.%03d %s pc=%08x - %s", s, ms, cpu->tag(),
cpu->safe_pcbase(), tag());
diff --git a/src/devices/bus/isa/aga.cpp b/src/devices/bus/isa/aga.cpp
index 6aa82eda1d4..8149486ae7e 100644
--- a/src/devices/bus/isa/aga.cpp
+++ b/src/devices/bus/isa/aga.cpp
@@ -101,7 +101,7 @@ isa8_aga_device::isa8_aga_device(const machine_config &mconfig, device_type type
void isa8_aga_device::device_start()
{
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
m_mode = AGA_COLOR;
@@ -188,7 +188,7 @@ const rom_entry *isa8_aga_pc200_device::device_rom_region() const
void isa8_aga_pc200_device::device_start()
{
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
m_mode = AGA_COLOR;
diff --git a/src/devices/bus/isa/cga.cpp b/src/devices/bus/isa/cga.cpp
index 2b0f0cc5e16..8f99ddc0792 100644
--- a/src/devices/bus/isa/cga.cpp
+++ b/src/devices/bus/isa/cga.cpp
@@ -258,7 +258,7 @@ static MACHINE_CONFIG_FRAGMENT( cga )
MCFG_MC6845_OUT_HSYNC_CB(WRITELINE(isa8_cga_device, hsync_changed))
MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(isa8_cga_device, vsync_changed))
MCFG_MC6845_RECONFIGURE_CB(isa8_cga_device, reconfigure)
- MCFG_VIDEO_SET_SCREEN(NULL)
+ MCFG_VIDEO_SET_SCREEN(nullptr)
MACHINE_CONFIG_END
@@ -343,7 +343,7 @@ isa8_cga_device::isa8_cga_device(const machine_config &mconfig, device_type type
void isa8_cga_device::device_start()
{
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
set_isa_device();
@@ -1561,7 +1561,7 @@ isa8_cga_pc1512_device::isa8_cga_pc1512_device(const machine_config &mconfig, co
const rom_entry *isa8_cga_pc1512_device::device_rom_region() const
{
- return NULL;
+ return nullptr;
}
@@ -1593,9 +1593,9 @@ void isa8_cga_pc1512_device::device_reset()
m_write = 0x0f;
m_read = 0;
m_mc6845_address = 0;
- for ( int i = 0; i < 31; i++ )
+ for (auto & elem : m_mc6845_locked_register)
{
- m_mc6845_locked_register[i] = 0;
+ elem = 0;
}
membank("bank1")->set_base(&m_vram[isa8_cga_pc1512_device::vram_offset[0]]);
diff --git a/src/devices/bus/isa/com.cpp b/src/devices/bus/isa/com.cpp
index 6d4873009a4..9a15b0b2e1f 100644
--- a/src/devices/bus/isa/com.cpp
+++ b/src/devices/bus/isa/com.cpp
@@ -49,7 +49,7 @@ static MACHINE_CONFIG_FRAGMENT( com_config )
MCFG_RS232_RI_HANDLER(DEVWRITELINE("uart_0", ins8250_uart_device, ri_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart_0", ins8250_uart_device, cts_w))
- MCFG_RS232_PORT_ADD( "serport1", isa_com, NULL )
+ MCFG_RS232_PORT_ADD( "serport1", isa_com, nullptr )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart_1", ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("uart_1", ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart_1", ins8250_uart_device, dsr_w))
@@ -157,7 +157,7 @@ static MACHINE_CONFIG_FRAGMENT( com_at_config )
MCFG_RS232_RI_HANDLER(DEVWRITELINE("uart_0", ins8250_uart_device, ri_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart_0", ins8250_uart_device, cts_w))
- MCFG_RS232_PORT_ADD( "serport1", isa_com, NULL )
+ MCFG_RS232_PORT_ADD( "serport1", isa_com, nullptr )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart_1", ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("uart_1", ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart_1", ins8250_uart_device, dsr_w))
diff --git a/src/devices/bus/isa/ega.cpp b/src/devices/bus/isa/ega.cpp
index 44663ddd5fb..762f1d05a77 100644
--- a/src/devices/bus/isa/ega.cpp
+++ b/src/devices/bus/isa/ega.cpp
@@ -592,7 +592,7 @@ isa8_ega_device::isa8_ega_device(const machine_config &mconfig, device_type type
void isa8_ega_device::device_start()
{
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
set_isa_device();
diff --git a/src/devices/bus/isa/hdc.cpp b/src/devices/bus/isa/hdc.cpp
index a56dc5261f2..e7b386b2f7b 100644
--- a/src/devices/bus/isa/hdc.cpp
+++ b/src/devices/bus/isa/hdc.cpp
@@ -56,14 +56,14 @@ static const char *const hdc_command_names[] =
{
"CMD_TESTREADY", /* 0x00 */
"CMD_RECALIBRATE", /* 0x01 */
- NULL, /* 0x02 */
+ nullptr, /* 0x02 */
"CMD_SENSE", /* 0x03 */
"CMD_FORMATDRV", /* 0x04 */
"CMD_VERIFY", /* 0x05 */
"CMD_FORMATTRK", /* 0x06 */
"CMD_FORMATBAD", /* 0x07 */
"CMD_READ", /* 0x08 */
- NULL, /* 0x09 */
+ nullptr, /* 0x09 */
"CMD_WRITE", /* 0x0A */
"CMD_SEEK", /* 0x0B */
"CMD_SETPARAM", /* 0x0C */
@@ -71,45 +71,45 @@ static const char *const hdc_command_names[] =
"CMD_READSBUFF", /* 0x0E */
"CMD_WRITESBUFF", /* 0x0F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x10-0x17 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x18-0x1F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x20-0x27 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x28-0x2F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x30-0x37 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x38-0x3F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x40-0x47 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x48-0x4F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x50-0x57 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x58-0x5F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x60-0x67 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x68-0x6F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x70-0x77 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x78-0x7F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x80-0x87 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x88-0x8F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x90-0x97 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0x98-0x9F */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xA0-0xA7 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xA8-0xAF */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xB0-0xB7 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xB8-0xBF */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xC0-0xC7 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xC8-0xCF */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xD0-0xD7 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xD8-0xDF */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x10-0x17 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x18-0x1F */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x20-0x27 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x28-0x2F */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x30-0x37 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x38-0x3F */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x40-0x47 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x48-0x4F */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x50-0x57 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x58-0x5F */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x60-0x67 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x68-0x6F */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x70-0x77 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x78-0x7F */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x80-0x87 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x88-0x8F */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x90-0x97 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0x98-0x9F */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xA0-0xA7 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xA8-0xAF */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xB0-0xB7 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xB8-0xBF */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xC0-0xC7 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xC8-0xCF */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xD0-0xD7 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xD8-0xDF */
"CMD_RAMDIAG", /* 0xE0 */
- NULL, /* 0xE1 */
- NULL, /* 0xE2 */
+ nullptr, /* 0xE1 */
+ nullptr, /* 0xE2 */
"CMD_DRIVEDIAG", /* 0xE3 */
"CMD_INTERNDIAG", /* 0xE4 */
"CMD_READLONG", /* 0xE5 */
"CMD_WRITELONG", /* 0xE6 */
- NULL, /* 0xE7 */
+ nullptr, /* 0xE7 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xE8-0xEF */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 0xF0-0xF7 */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL /* 0xF8-0xFF */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xE8-0xEF */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, /* 0xF0-0xF7 */
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr /* 0xF8-0xFF */
};
static MACHINE_CONFIG_FRAGMENT( xt_hdc_config )
@@ -204,7 +204,7 @@ void xt_hdc_device::device_reset()
{
drv = 0;
data_cnt = 0;
- buffer_ptr = NULL;
+ buffer_ptr = nullptr;
hdc_control = 0;
for (int i = 0; i < 2; i++)
{
@@ -229,7 +229,7 @@ void xt_hdc_device::device_reset()
hard_disk_file *xt_hdc_device::pc_hdc_file(int id)
{
- harddisk_image_device *img = NULL;
+ harddisk_image_device *img = nullptr;
switch( id )
{
case 0:
@@ -239,11 +239,11 @@ hard_disk_file *xt_hdc_device::pc_hdc_file(int id)
img = dynamic_cast<harddisk_image_device *>(machine().device(subtag("slave").c_str()));
break;
}
- if ( img == NULL )
- return NULL;
+ if ( img == nullptr )
+ return nullptr;
if (!img->exists())
- return NULL;
+ return nullptr;
return img->get_hard_disk_file();
}
@@ -430,7 +430,7 @@ void xt_hdc_device::dack_ws(int data)
void xt_hdc_device::execute_read()
{
- hard_disk_file *disk = NULL;
+ hard_disk_file *disk = nullptr;
int size = sector_cnt[drv] * 512;
int read_ = 0;
@@ -460,7 +460,7 @@ void xt_hdc_device::execute_read()
void xt_hdc_device::execute_write()
{
- hard_disk_file *disk = NULL;
+ hard_disk_file *disk = nullptr;
int size = sector_cnt[drv] * 512;
int write_ = 512;
diff --git a/src/devices/bus/isa/ide.cpp b/src/devices/bus/isa/ide.cpp
index 9215572bb19..be638b76a7f 100644
--- a/src/devices/bus/isa/ide.cpp
+++ b/src/devices/bus/isa/ide.cpp
@@ -42,7 +42,7 @@ WRITE_LINE_MEMBER(isa16_ide_device::ide_interrupt)
}
static MACHINE_CONFIG_FRAGMENT( ide )
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, false)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(isa16_ide_device, ide_interrupt))
MACHINE_CONFIG_END
diff --git a/src/devices/bus/isa/mda.cpp b/src/devices/bus/isa/mda.cpp
index e3fb7ed25ba..713891a5186 100644
--- a/src/devices/bus/isa/mda.cpp
+++ b/src/devices/bus/isa/mda.cpp
@@ -172,7 +172,7 @@ isa8_mda_device::isa8_mda_device(const machine_config &mconfig, device_type type
void isa8_mda_device::device_start()
{
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
set_isa_device();
@@ -591,7 +591,7 @@ isa8_hercules_device::isa8_hercules_device(const machine_config &mconfig, const
void isa8_hercules_device::device_start()
{
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
m_videoram.resize(0x10000);
diff --git a/src/devices/bus/isa/mufdc.cpp b/src/devices/bus/isa/mufdc.cpp
index 0a983dc7a2e..bb1b6fc8af4 100644
--- a/src/devices/bus/isa/mufdc.cpp
+++ b/src/devices/bus/isa/mufdc.cpp
@@ -50,8 +50,8 @@ static MACHINE_CONFIG_FRAGMENT( mufdc_device )
MCFG_UPD765_DRQ_CALLBACK(WRITELINE(mufdc_device, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD("fdc:0", drives, "35hd", mufdc_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fdc:1", drives, "35hd", mufdc_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:2", drives, NULL, mufdc_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:3", drives, NULL, mufdc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:2", drives, nullptr, mufdc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:3", drives, nullptr, mufdc_device::floppy_formats)
MACHINE_CONFIG_END
machine_config_constructor mufdc_device::device_mconfig_additions() const
diff --git a/src/devices/bus/isa/omti8621.cpp b/src/devices/bus/isa/omti8621.cpp
index a28ddca5a7a..e024f1b601c 100644
--- a/src/devices/bus/isa/omti8621.cpp
+++ b/src/devices/bus/isa/omti8621.cpp
@@ -61,9 +61,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "awd"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_create(int format_type, option_resolution *format_options);
protected:
@@ -187,7 +187,7 @@ static const char *cpu_context(const device_t *device) {
device_t *cpu = device->machine().firstcpu;
/* if we have an executing CPU, output data */
- if (cpu != NULL) {
+ if (cpu != nullptr) {
osd_ticks_t t = osd_ticks();
int s = t / osd_ticks_per_second();
int ms = (t % osd_ticks_per_second()) / 1000;
@@ -293,7 +293,7 @@ void omti8621_device::device_start()
sector_buffer.resize(OMTI_DISK_SECTOR_SIZE*OMTI_MAX_BLOCK_COUNT);
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
our_disks[0] = subdevice<omti_disk_image_device>(OMTI_DISK0_TAG);
our_disks[1] = subdevice<omti_disk_image_device>(OMTI_DISK1_TAG);
@@ -1335,7 +1335,7 @@ void omti_disk_image_device::device_start()
{
m_image = this;
- if (m_image->image_core_file() == NULL)
+ if (m_image->image_core_file() == nullptr)
{
LOG1(("device_start_omti_disk: no disk"));
}
diff --git a/src/devices/bus/isa/pc1640_iga.cpp b/src/devices/bus/isa/pc1640_iga.cpp
index 127d90560b5..05c989fcbe1 100644
--- a/src/devices/bus/isa/pc1640_iga.cpp
+++ b/src/devices/bus/isa/pc1640_iga.cpp
@@ -79,7 +79,7 @@ isa8_pc1640_iga_device::isa8_pc1640_iga_device(const machine_config &mconfig, co
void isa8_pc1640_iga_device::device_start()
{
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
set_isa_device();
diff --git a/src/devices/bus/isa/pgc.cpp b/src/devices/bus/isa/pgc.cpp
index 704859b7cf7..f551a0fc2ec 100644
--- a/src/devices/bus/isa/pgc.cpp
+++ b/src/devices/bus/isa/pgc.cpp
@@ -227,7 +227,7 @@ void isa8_pgc_device::device_start()
int width = PGC_DISP_HORZ;
int height = PGC_DISP_VERT;
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
set_isa_device();
diff --git a/src/devices/bus/isa/s3virge.h b/src/devices/bus/isa/s3virge.h
index 44bed38689f..b04354fa997 100644
--- a/src/devices/bus/isa/s3virge.h
+++ b/src/devices/bus/isa/s3virge.h
@@ -31,7 +31,7 @@ public:
virtual READ8_MEMBER(mem_r);
virtual WRITE8_MEMBER(mem_w);
- ibm8514a_device* get_8514() { fatalerror("s3virge requested non-existant 8514/A device\n"); return NULL; }
+ ibm8514a_device* get_8514() { fatalerror("s3virge requested non-existant 8514/A device\n"); return nullptr; }
protected:
// device-level overrides
virtual void device_start();
diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp
index 27db8eaf08c..6895716c7af 100644
--- a/src/devices/bus/isa/sblaster.cpp
+++ b/src/devices/bus/isa/sblaster.cpp
@@ -1170,7 +1170,7 @@ void sb8_device::device_start()
m_isa->install_device(0x0228, 0x0229, 0, 0, read8_delegate( FUNC(sb8_device::ym3812_16_r), this ), write8_delegate( FUNC(sb8_device::ym3812_16_w), this ) );
}
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
save_item(NAME(m_dack_out));
save_item(NAME(m_onebyte_midi));
@@ -1223,7 +1223,7 @@ void sb16_device::device_start()
m_isa->install_device(0x0220, 0x0223, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
m_isa->install_device(0x0228, 0x0229, 0, 0, read8_delegate(FUNC(ymf262_device::read), ymf262), write8_delegate(FUNC(ymf262_device::write), ymf262));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
save_item(NAME(m_mixer.data));
save_item(NAME(m_mixer.status));
diff --git a/src/devices/bus/isa/sc499.cpp b/src/devices/bus/isa/sc499.cpp
index 971fc8b275d..0e0c6438410 100644
--- a/src/devices/bus/isa/sc499.cpp
+++ b/src/devices/bus/isa/sc499.cpp
@@ -340,12 +340,12 @@ void sc499_device::device_start()
LOG1(("start sc499"));
- m_timer = timer_alloc(0, NULL);
- m_timer1 = timer_alloc(1, NULL);
+ m_timer = timer_alloc(0, nullptr);
+ m_timer1 = timer_alloc(1, nullptr);
m_installed = false;
- if (m_image->image_core_file() == NULL)
+ if (m_image->image_core_file() == nullptr)
{
LOG2(("start sc499: no cartridge tape"));
}
@@ -1177,7 +1177,7 @@ void sc499_device::read_block()
tape = m_image->read_block(m_tape_pos);
- if (tape == NULL)
+ if (tape == nullptr)
{
// either there is no tape or m_tape_pos goes beyond end-of-tape
m_status &= ~SC499_STAT_EXC;
@@ -1296,7 +1296,7 @@ UINT8 *sc499_ctape_image_device::read_block(int block_num)
{
// access beyond end of tape cart
if (m_ctape_data.size() <= (block_num + 1) * SC499_CTAPE_BLOCK_SIZE)
- return NULL;
+ return nullptr;
else
return &m_ctape_data[block_num * SC499_CTAPE_BLOCK_SIZE];
}
diff --git a/src/devices/bus/isa/sc499.h b/src/devices/bus/isa/sc499.h
index a83b61564b8..a6522423752 100644
--- a/src/devices/bus/isa/sc499.h
+++ b/src/devices/bus/isa/sc499.h
@@ -41,7 +41,7 @@ public:
virtual bool is_reset_on_load() const { return 0; }
virtual const char *image_interface() const { return "sc499_cass"; }
virtual const char *file_extensions() const { return "act,ct"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
UINT8 *read_block(int block_num);
void write_block(int block_num, UINT8 *ptr);
diff --git a/src/devices/bus/isa/side116.cpp b/src/devices/bus/isa/side116.cpp
index 2de8254ffe4..460ee5f54fd 100644
--- a/src/devices/bus/isa/side116.cpp
+++ b/src/devices/bus/isa/side116.cpp
@@ -23,7 +23,7 @@ const device_type ISA8_SIDE116 = &device_creator<side116_device>;
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( side116 )
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(side116_device, ide_interrupt))
MACHINE_CONFIG_END
diff --git a/src/devices/bus/isa/xtide.cpp b/src/devices/bus/isa/xtide.cpp
index cad06fcdcd2..fcd0750e5a3 100644
--- a/src/devices/bus/isa/xtide.cpp
+++ b/src/devices/bus/isa/xtide.cpp
@@ -122,7 +122,7 @@ WRITE_LINE_MEMBER(xtide_device::ide_interrupt)
}
static MACHINE_CONFIG_FRAGMENT( xtide_config )
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(xtide_device, ide_interrupt))
MCFG_EEPROM_2864_ADD("eeprom")
diff --git a/src/devices/bus/isbx/isbx.h b/src/devices/bus/isbx/isbx.h
index 5124b4fde60..6591a35320a 100644
--- a/src/devices/bus/isbx/isbx.h
+++ b/src/devices/bus/isbx/isbx.h
@@ -116,7 +116,7 @@ public:
DECLARE_WRITE8_MEMBER( mcs1_w ) { if (m_card) m_card->mcs1_w(space, offset, data); }
DECLARE_READ8_MEMBER( mdack_r ) { return m_card ? m_card->mdack_r(space, offset) : 0xff; }
DECLARE_WRITE8_MEMBER( mdack_w ) { if (m_card) m_card->mdack_w(space, offset, data); }
- DECLARE_READ_LINE_MEMBER( mpst_r ) { return m_card == NULL; }
+ DECLARE_READ_LINE_MEMBER( mpst_r ) { return m_card == nullptr; }
DECLARE_READ_LINE_MEMBER( opt0_r ) { return m_card ? m_card->opt0_r() : 1; }
DECLARE_WRITE_LINE_MEMBER( opt0_w ) { if (m_card) m_card->opt0_w(state); }
DECLARE_READ_LINE_MEMBER( opt1_r ) { return m_card ? m_card->opt1_r() : 1; }
diff --git a/src/devices/bus/kc/d002.cpp b/src/devices/bus/kc/d002.cpp
index 0ce9c02b268..fdb36a8c34d 100644
--- a/src/devices/bus/kc/d002.cpp
+++ b/src/devices/bus/kc/d002.cpp
@@ -61,25 +61,25 @@ WRITE_LINE_MEMBER(kc_d002_device::out_halt_w)
static MACHINE_CONFIG_FRAGMENT( kc_d002 )
MCFG_DEVICE_ADD("m0", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
MCFG_KCCART_SLOT_NEXT_SLOT("m4")
MCFG_KCCART_SLOT_OUT_IRQ_CB(WRITELINE(kc_d002_device, out_irq_w))
MCFG_KCCART_SLOT_OUT_NMI_CB(WRITELINE(kc_d002_device, out_nmi_w))
MCFG_KCCART_SLOT_OUT_HALT_CB(WRITELINE(kc_d002_device, out_halt_w))
MCFG_DEVICE_ADD("m4", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
MCFG_KCCART_SLOT_NEXT_SLOT("m8")
MCFG_KCCART_SLOT_OUT_IRQ_CB(WRITELINE(kc_d002_device, out_irq_w))
MCFG_KCCART_SLOT_OUT_NMI_CB(WRITELINE(kc_d002_device, out_nmi_w))
MCFG_KCCART_SLOT_OUT_HALT_CB(WRITELINE(kc_d002_device, out_halt_w))
MCFG_DEVICE_ADD("m8", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
MCFG_KCCART_SLOT_NEXT_SLOT("mc")
MCFG_KCCART_SLOT_OUT_IRQ_CB(WRITELINE(kc_d002_device, out_irq_w))
MCFG_KCCART_SLOT_OUT_NMI_CB(WRITELINE(kc_d002_device, out_nmi_w))
MCFG_KCCART_SLOT_OUT_HALT_CB(WRITELINE(kc_d002_device, out_halt_w))
MCFG_DEVICE_ADD("mc", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
MCFG_KCCART_SLOT_NEXT_SLOT("exp")
MCFG_KCCART_SLOT_OUT_IRQ_CB(WRITELINE(kc_d002_device, out_irq_w))
MCFG_KCCART_SLOT_OUT_NMI_CB(WRITELINE(kc_d002_device, out_nmi_w))
@@ -87,8 +87,8 @@ static MACHINE_CONFIG_FRAGMENT( kc_d002 )
// expansion interface
MCFG_DEVICE_ADD("exp", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_exp, NULL, false)
- MCFG_KCEXP_SLOT_NEXT_SLOT(NULL)
+ MCFG_DEVICE_SLOT_INTERFACE(kc85_exp, nullptr, false)
+ MCFG_KCEXP_SLOT_NEXT_SLOT(nullptr)
MCFG_KCEXP_SLOT_OUT_IRQ_CB(WRITELINE(kc_d002_device, out_irq_w))
MCFG_KCEXP_SLOT_OUT_NMI_CB(WRITELINE(kc_d002_device, out_nmi_w))
MCFG_KCEXP_SLOT_OUT_HALT_CB(WRITELINE(kc_d002_device, out_halt_w))
@@ -161,8 +161,8 @@ ioport_constructor kc_d002_device::device_input_ports() const
void kc_d002_device::read(offs_t offset, UINT8 &data)
{
- for (int i=0; i<5; i++)
- m_expansions[i]->read(offset, data);
+ for (auto & elem : m_expansions)
+ elem->read(offset, data);
}
//-------------------------------------------------
@@ -171,8 +171,8 @@ void kc_d002_device::read(offs_t offset, UINT8 &data)
void kc_d002_device::write(offs_t offset, UINT8 data)
{
- for (int i=0; i<5; i++)
- m_expansions[i]->write(offset, data);
+ for (auto & elem : m_expansions)
+ elem->write(offset, data);
}
//-------------------------------------------------
@@ -192,8 +192,8 @@ void kc_d002_device::io_read(offs_t offset, UINT8 &data)
}
else
{
- for (int i=0; i<5; i++)
- m_expansions[i]->io_read(offset, data);
+ for (auto & elem : m_expansions)
+ elem->io_read(offset, data);
}
}
@@ -214,8 +214,8 @@ void kc_d002_device::io_write(offs_t offset, UINT8 data)
}
else
{
- for (int i=0; i<5; i++)
- m_expansions[i]->io_write(offset, data);
+ for (auto & elem : m_expansions)
+ elem->io_write(offset, data);
}
}
diff --git a/src/devices/bus/kc/d004.cpp b/src/devices/bus/kc/d004.cpp
index a45b8b4b795..4895c5419c4 100644
--- a/src/devices/bus/kc/d004.cpp
+++ b/src/devices/bus/kc/d004.cpp
@@ -60,7 +60,7 @@ SLOT_INTERFACE_END
static const z80_daisy_config kc_d004_daisy_chain[] =
{
{ Z80CTC_TAG },
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_FRAGMENT(kc_d004)
@@ -89,7 +89,7 @@ static MACHINE_CONFIG_FRAGMENT(kc_d004_gide)
MCFG_CPU_MODIFY(Z80_TAG)
MCFG_CPU_IO_MAP(kc_d004_gide_io)
- MCFG_ATA_INTERFACE_ADD(ATA_TAG, ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD(ATA_TAG, ata_devices, "hdd", nullptr, false)
MACHINE_CONFIG_END
@@ -353,7 +353,7 @@ WRITE8_MEMBER(kc_d004_device::fdd_select_w)
else if (data & 0x08)
m_floppy = m_floppy3->get_device();
else
- m_floppy = NULL;
+ m_floppy = nullptr;
if (m_floppy)
m_floppy->mon_w(0);
diff --git a/src/devices/bus/kc/kc.cpp b/src/devices/bus/kc/kc.cpp
index a463fce40fd..b87e3f34314 100644
--- a/src/devices/bus/kc/kc.cpp
+++ b/src/devices/bus/kc/kc.cpp
@@ -193,7 +193,7 @@ kcexp_slot_device::~kcexp_slot_device()
void kcexp_slot_device::device_start()
{
m_cart = dynamic_cast<device_kcexp_interface *>(get_card_device());
- m_next_slot = m_next_slot_tag ? owner()->subdevice<kcexp_slot_device>(m_next_slot_tag) : NULL;
+ m_next_slot = m_next_slot_tag ? owner()->subdevice<kcexp_slot_device>(m_next_slot_tag) : nullptr;
// resolve callbacks
m_out_irq_cb.resolve_safe();
@@ -336,9 +336,9 @@ bool kccart_slot_device::call_load()
offs_t read_length = 0;
UINT8 *cart_base = m_cart->get_cart_base();
- if (cart_base != NULL)
+ if (cart_base != nullptr)
{
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
read_length = length();
fread(m_cart->get_cart_base(), read_length);
diff --git a/src/devices/bus/kc/kc.h b/src/devices/bus/kc/kc.h
index def77ffd955..57209a0802a 100644
--- a/src/devices/bus/kc/kc.h
+++ b/src/devices/bus/kc/kc.h
@@ -31,7 +31,7 @@ public:
virtual void write(offs_t offset, UINT8 data) { }
virtual void io_read(offs_t offset, UINT8 &data) { }
virtual void io_write(offs_t offset, UINT8 data) { }
- virtual UINT8* get_cart_base() { return NULL; }
+ virtual UINT8* get_cart_base() { return nullptr; }
virtual DECLARE_WRITE_LINE_MEMBER( mei_w ) { };
};
@@ -101,7 +101,7 @@ public:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "kc_cart"; }
virtual const char *file_extensions() const { return "bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/lpci/i82439tx.cpp b/src/devices/bus/lpci/i82439tx.cpp
index 66483af2289..ceee9a4a032 100644
--- a/src/devices/bus/lpci/i82439tx.cpp
+++ b/src/devices/bus/lpci/i82439tx.cpp
@@ -19,8 +19,8 @@ const device_type I82439TX = &device_creator<i82439tx_device>;
i82439tx_device::i82439tx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: northbridge_device(mconfig, I82439TX, "Intel 82439TX", tag, owner, clock, "i82439tx", __FILE__),
pci_device_interface( mconfig, *this ),
- m_cpu_tag( NULL ),
- m_region_tag( NULL ),
+ m_cpu_tag( nullptr ),
+ m_region_tag( nullptr ),
m_space(nullptr),
m_rom(nullptr)
{
@@ -266,7 +266,7 @@ void i82439tx_device::device_start()
northbridge_device::device_start();
/* get address space we are working on */
device_t *cpu = machine().device(m_cpu_tag);
- assert(cpu != NULL);
+ assert(cpu != nullptr);
m_space = &cpu->memory().space(AS_PROGRAM);
diff --git a/src/devices/bus/lpci/pci.cpp b/src/devices/bus/lpci/pci.cpp
index af919100382..aa095a8cd4e 100644
--- a/src/devices/bus/lpci/pci.cpp
+++ b/src/devices/bus/lpci/pci.cpp
@@ -91,10 +91,10 @@ const device_type PCI_BUS = &device_creator<pci_bus_device>;
//-------------------------------------------------
pci_bus_device::pci_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PCI_BUS, "PCI Bus", tag, owner, clock, "pci_bus", __FILE__), m_busnum(0),
- m_father(NULL), m_address(0), m_devicenum(0), m_busnumber(0), m_busnumaddr(nullptr)
+ m_father(nullptr), m_address(0), m_devicenum(0), m_busnumber(0), m_busnumaddr(nullptr)
{
- for (int i = 0; i < ARRAY_LENGTH(m_devtag); i++) {
- m_devtag[i]= NULL;
+ for (auto & elem : m_devtag) {
+ elem= nullptr;
}
m_siblings_count = 0;
}
@@ -119,7 +119,7 @@ READ32_MEMBER( pci_bus_device::read )
case 1:
if (m_devicenum != -1)
{
- if (m_busnumaddr->m_device[m_devicenum] != NULL)
+ if (m_busnumaddr->m_device[m_devicenum] != nullptr)
{
function = (m_address >> 8) & 0x07;
reg = (m_address >> 0) & 0xfc;
@@ -149,10 +149,10 @@ pci_bus_device *pci_bus_device::pci_search_bustree(int busnum, int devicenum, pc
for (a = 0; a < pcibus->m_siblings_count; a++)
{
ret = pci_search_bustree(busnum, devicenum, pcibus->m_siblings[a]);
- if (ret != NULL)
+ if (ret != nullptr)
return ret;
}
- return NULL;
+ return nullptr;
}
@@ -175,7 +175,7 @@ WRITE32_MEMBER( pci_bus_device::write )
int busnum = (m_address >> 16) & 0xff;
int devicenum = (m_address >> 11) & 0x1f;
m_busnumaddr = pci_search_bustree(busnum, devicenum, this);
- if (m_busnumaddr != NULL)
+ if (m_busnumaddr != nullptr)
{
m_busnumber = busnum;
m_devicenum = devicenum;
@@ -190,7 +190,7 @@ WRITE32_MEMBER( pci_bus_device::write )
case 1:
if (m_devicenum != -1)
{
- if (m_busnumaddr->m_device[m_devicenum] != NULL)
+ if (m_busnumaddr->m_device[m_devicenum] != nullptr)
{
int function = (m_address >> 8) & 0x07;
int reg = (m_address >> 0) & 0xfc;
@@ -263,13 +263,13 @@ void pci_bus_device::device_start()
{
sprintf(id, "%d", i);
pci_connector *conn = downcast<pci_connector *>(subdevice(id));
- if (conn!=NULL)
+ if (conn!=nullptr)
m_device[i] = conn->get_device();
else
- m_device[i] = NULL;
+ m_device[i] = nullptr;
}
- if (m_father != NULL) {
+ if (m_father != nullptr) {
pci_bus_device *father = machine().device<pci_bus_device>(m_father);
if (father)
father->add_sibling(this, m_busnum);
diff --git a/src/devices/bus/lpci/southbridge.cpp b/src/devices/bus/lpci/southbridge.cpp
index 823dded56cc..e7858521437 100644
--- a/src/devices/bus/lpci/southbridge.cpp
+++ b/src/devices/bus/lpci/southbridge.cpp
@@ -78,11 +78,11 @@ static MACHINE_CONFIG_FRAGMENT( southbridge )
MCFG_MC146818_IRQ_HANDLER(DEVWRITELINE("pic8259_slave", pic8259_device, ir0_w))
MCFG_MC146818_CENTURY_INDEX(0x32)
- MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, false)
+ MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_slave", pic8259_device, ir6_w))
MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE(":maincpu", AS_PROGRAM)
- MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide2", ata_devices, "cdrom", NULL, false)
+ MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide2", ata_devices, "cdrom", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_slave", pic8259_device, ir7_w))
MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE(":maincpu", AS_PROGRAM)
diff --git a/src/devices/bus/macpds/pds_tpdfpd.cpp b/src/devices/bus/macpds/pds_tpdfpd.cpp
index 0ceb591ce09..968eed3564f 100644
--- a/src/devices/bus/macpds/pds_tpdfpd.cpp
+++ b/src/devices/bus/macpds/pds_tpdfpd.cpp
@@ -123,7 +123,7 @@ void macpds_sedisplay_device::device_start()
m_macpds->install_device(0x770000, 0x77000f, read16_delegate(FUNC(macpds_sedisplay_device::ramdac_r), this), write16_delegate(FUNC(macpds_sedisplay_device::ramdac_w), this));
m_macpds->install_device(0xc10000, 0xc2ffff, read16_delegate(FUNC(macpds_sedisplay_device::sedisplay_r), this), write16_delegate(FUNC(macpds_sedisplay_device::sedisplay_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(879, 0), 0);
}
diff --git a/src/devices/bus/megadrive/ggenie.cpp b/src/devices/bus/megadrive/ggenie.cpp
index caef897b77c..65097208567 100644
--- a/src/devices/bus/megadrive/ggenie.cpp
+++ b/src/devices/bus/megadrive/ggenie.cpp
@@ -169,7 +169,7 @@ static SLOT_INTERFACE_START(ggenie_sub_cart)
SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( ggenie_slot )
- MCFG_MD_CARTRIDGE_ADD("subslot", ggenie_sub_cart, NULL)
+ MCFG_MD_CARTRIDGE_ADD("subslot", ggenie_sub_cart, nullptr)
MCFG_MD_CARTRIDGE_NOT_MANDATORY
MACHINE_CONFIG_END
diff --git a/src/devices/bus/megadrive/md_slot.cpp b/src/devices/bus/megadrive/md_slot.cpp
index 459acf13c4f..2d0ff90acb6 100644
--- a/src/devices/bus/megadrive/md_slot.cpp
+++ b/src/devices/bus/megadrive/md_slot.cpp
@@ -65,7 +65,7 @@ const device_type COPERA_CART_SLOT = &device_creator<copera_cart_slot_device>;
device_md_cart_interface::device_md_cart_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device), m_nvram_start(0), m_nvram_end(0), m_nvram_active(0), m_nvram_readonly(0), m_nvram_handlers_installed(0),
- m_rom(NULL),
+ m_rom(nullptr),
m_rom_size(0)
{
}
@@ -85,7 +85,7 @@ device_md_cart_interface::~device_md_cart_interface()
void device_md_cart_interface::rom_alloc(size_t size, const char *tag)
{
- if (m_rom == NULL)
+ if (m_rom == nullptr)
{
m_rom = (UINT16 *)device().machine().memory().region_alloc(std::string(tag).append(MDSLOT_ROM_REGION_TAG).c_str(), size, 2, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -289,10 +289,10 @@ static const md_slot slot_list[] =
static int md_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return SEGA_STD;
@@ -300,10 +300,10 @@ static int md_get_pcb_id(const char *slot)
static const char *md_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "rom";
@@ -329,7 +329,7 @@ bool base_md_cart_slot_device::call_load()
// STEP 1: load the file image and keep a copy for later banking
// STEP 2: identify the cart type
// The two steps are carried out differently if we are loading from a list or not
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
res = load_nonlist();
else
res = load_list();
@@ -378,7 +378,7 @@ int base_md_cart_slot_device::load_list()
if (length > get_software_region_length("rom"))
memset(ROM + get_software_region_length("rom")/2, 0xffff, (length - get_software_region_length("rom"))/2);
- if ((slot_name = get_feature("slot")) == NULL)
+ if ((slot_name = get_feature("slot")) == nullptr)
m_type = SEGA_STD;
else
m_type = md_get_pcb_id(slot_name);
@@ -995,7 +995,7 @@ void base_md_cart_slot_device::file_logging(UINT8 *ROM8, UINT32 rom_len, UINT32
logerror("FILE DETAILS\n");
logerror("============\n");
logerror("Name: %s\n", basename());
- logerror("File Size: 0x%08x\n", (software_entry() == NULL) ? (int)length() : (int)get_software_region_length("rom"));
+ logerror("File Size: 0x%08x\n", (software_entry() == nullptr) ? (int)length() : (int)get_software_region_length("rom"));
logerror("Detected type: %s\n", md_get_slot(m_type));
logerror("ROM (Allocated) Size: 0x%X\n", rom_len);
logerror("NVRAM: %s\n", nvram_len ? "Yes" : "No");
diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h
index f4a6d2f5f85..456eb6fabea 100644
--- a/src/devices/bus/megadrive/md_slot.h
+++ b/src/devices/bus/megadrive/md_slot.h
@@ -158,7 +158,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return m_must_be_loaded; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/megadrive/sk.cpp b/src/devices/bus/megadrive/sk.cpp
index 8c10826f685..4cee6dd90f4 100644
--- a/src/devices/bus/megadrive/sk.cpp
+++ b/src/devices/bus/megadrive/sk.cpp
@@ -52,7 +52,7 @@ void md_rom_sk_device::device_start()
READ16_MEMBER(md_rom_sk_device::read)
{
- if (m_exp->m_cart != NULL && m_exp->m_cart->get_rom_base() != NULL && offset >= 0x200000/2 && offset < (0x200000 + m_exp->m_cart->get_rom_size())/2)
+ if (m_exp->m_cart != nullptr && m_exp->m_cart->get_rom_base() != nullptr && offset >= 0x200000/2 && offset < (0x200000 + m_exp->m_cart->get_rom_size())/2)
return m_exp->m_cart->m_rom[offset - 0x200000/2];
if (offset < 0x400000/2)
return m_rom[MD_ADDR(offset)];
@@ -79,7 +79,7 @@ static SLOT_INTERFACE_START(sk_sub_cart)
SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( sk_slot )
- MCFG_MD_CARTRIDGE_ADD("subslot", sk_sub_cart, NULL)
+ MCFG_MD_CARTRIDGE_ADD("subslot", sk_sub_cart, nullptr)
MCFG_MD_CARTRIDGE_NOT_MANDATORY
MACHINE_CONFIG_END
diff --git a/src/devices/bus/midi/midi.cpp b/src/devices/bus/midi/midi.cpp
index 23351d5df9b..cc8a9166f4f 100644
--- a/src/devices/bus/midi/midi.cpp
+++ b/src/devices/bus/midi/midi.cpp
@@ -9,7 +9,7 @@ midi_port_device::midi_port_device(const machine_config &mconfig, const char *ta
device_slot_interface(mconfig, *this),
m_rxd(0),
m_rxd_handler(*this),
- m_dev(NULL)
+ m_dev(nullptr)
{
}
diff --git a/src/devices/bus/msx_cart/ascii.cpp b/src/devices/bus/msx_cart/ascii.cpp
index cb3aebf0d4d..04ef820e7d9 100644
--- a/src/devices/bus/msx_cart/ascii.cpp
+++ b/src/devices/bus/msx_cart/ascii.cpp
@@ -19,7 +19,7 @@ msx_cart_ascii8::msx_cart_ascii8(const machine_config &mconfig, const char *tag,
for (int i = 0; i < 4; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
}
@@ -43,9 +43,9 @@ void msx_cart_ascii8::restore_banks()
void msx_cart_ascii8::device_reset()
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
}
@@ -103,7 +103,7 @@ msx_cart_ascii16::msx_cart_ascii16(const machine_config &mconfig, const char *ta
for (int i = 0; i < 2; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
}
@@ -127,9 +127,9 @@ void msx_cart_ascii16::restore_banks()
void msx_cart_ascii16::device_reset()
{
- for (int i = 0; i < 2; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
}
@@ -194,7 +194,7 @@ msx_cart_ascii8_sram::msx_cart_ascii8_sram(const machine_config &mconfig, const
for (int i = 0; i < 4; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
}
@@ -212,7 +212,7 @@ void msx_cart_ascii8_sram::setup_bank(UINT8 bank)
if (m_selected_bank[bank] & ~(m_sram_select_mask | m_bank_mask))
{
// Nothing is mapped
- m_bank_base[bank] = NULL;
+ m_bank_base[bank] = nullptr;
}
else if (m_selected_bank[bank] & m_sram_select_mask)
{
@@ -237,9 +237,9 @@ void msx_cart_ascii8_sram::restore_banks()
void msx_cart_ascii8_sram::device_reset()
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
}
@@ -278,7 +278,7 @@ READ8_MEMBER(msx_cart_ascii8_sram::read_cart)
{
UINT8 *bank_base = m_bank_base[(offset - 0x4000) >> 13];
- if (bank_base != NULL)
+ if (bank_base != nullptr)
{
return bank_base[offset & 0x1fff];
}
@@ -319,7 +319,7 @@ msx_cart_ascii16_sram::msx_cart_ascii16_sram(const machine_config &mconfig, cons
for (int i = 0; i < 2; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
}
@@ -337,7 +337,7 @@ void msx_cart_ascii16_sram::setup_bank(UINT8 bank)
if (m_selected_bank[bank] & ~(m_sram_select_mask | m_bank_mask))
{
// Nothing is mapped
- m_bank_base[bank] = NULL;
+ m_bank_base[bank] = nullptr;
}
else if (m_selected_bank[bank] & m_sram_select_mask)
{
@@ -362,9 +362,9 @@ void msx_cart_ascii16_sram::restore_banks()
void msx_cart_ascii16_sram::device_reset()
{
- for (int i = 0; i < 2; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
}
@@ -403,7 +403,7 @@ READ8_MEMBER(msx_cart_ascii16_sram::read_cart)
{
UINT8 bank = offset >> 15;
- if (m_bank_base[bank] != NULL)
+ if (m_bank_base[bank] != nullptr)
{
if (m_selected_bank[bank] & m_sram_select_mask)
{
@@ -453,7 +453,7 @@ msx_cart_msxwrite::msx_cart_msxwrite(const machine_config &mconfig, const char *
for (int i = 0; i < 2; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
}
@@ -477,9 +477,9 @@ void msx_cart_msxwrite::restore_banks()
void msx_cart_msxwrite::device_reset()
{
- for (int i = 0; i < 2; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
}
diff --git a/src/devices/bus/msx_cart/crossblaim.cpp b/src/devices/bus/msx_cart/crossblaim.cpp
index 2b2edece1f3..f36f7b4b8cc 100644
--- a/src/devices/bus/msx_cart/crossblaim.cpp
+++ b/src/devices/bus/msx_cart/crossblaim.cpp
@@ -11,9 +11,9 @@ msx_cart_crossblaim::msx_cart_crossblaim(const machine_config &mconfig, const ch
, msx_cart_interface(mconfig, *this)
, m_selected_bank(1)
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_bank_base)
{
- m_bank_base[i] = NULL;
+ elem = nullptr;
}
}
@@ -28,9 +28,9 @@ void msx_cart_crossblaim::device_start()
void msx_cart_crossblaim::setup_bank()
{
- m_bank_base[0] = ( m_selected_bank & 2 ) ? NULL : get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000;
+ m_bank_base[0] = ( m_selected_bank & 2 ) ? nullptr : get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000;
m_bank_base[2] = get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000;
- m_bank_base[3] = ( m_selected_bank & 2 ) ? NULL : get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000;
+ m_bank_base[3] = ( m_selected_bank & 2 ) ? nullptr : get_rom_base() + ( m_selected_bank & 0x03 ) * 0x4000;
}
@@ -62,7 +62,7 @@ READ8_MEMBER(msx_cart_crossblaim::read_cart)
{
UINT8 *bank_base = m_bank_base[offset >> 14];
- if (bank_base != NULL)
+ if (bank_base != nullptr)
{
return bank_base[offset & 0x3fff];
}
diff --git a/src/devices/bus/msx_cart/disk.cpp b/src/devices/bus/msx_cart/disk.cpp
index 5a9905c852e..5d973a2fd17 100644
--- a/src/devices/bus/msx_cart/disk.cpp
+++ b/src/devices/bus/msx_cart/disk.cpp
@@ -127,7 +127,7 @@ msx_cart_disk::msx_cart_disk(const machine_config &mconfig, device_type type, co
, msx_cart_interface(mconfig, *this)
, m_floppy0(*this, "fdc:0")
, m_floppy1(*this, "fdc:1")
- , m_floppy(NULL)
+ , m_floppy(nullptr)
{
}
@@ -313,15 +313,15 @@ void msx_cart_disk_type1::set_control(UINT8 data)
{
case 0:
case 2:
- m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL;
+ m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr;
break;
case 1:
- m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL;
+ m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr;
break;
default:
- m_floppy = NULL;
+ m_floppy = nullptr;
break;
}
@@ -473,15 +473,15 @@ void msx_cart_disk_type2::set_control(UINT8 data)
switch (m_control & 3)
{
case 1:
- m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL;
+ m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr;
break;
case 2:
- m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL;
+ m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr;
break;
default:
- m_floppy = NULL;
+ m_floppy = nullptr;
break;
}
diff --git a/src/devices/bus/msx_cart/fmpac.cpp b/src/devices/bus/msx_cart/fmpac.cpp
index c4222094c1a..44b934d17f5 100644
--- a/src/devices/bus/msx_cart/fmpac.cpp
+++ b/src/devices/bus/msx_cart/fmpac.cpp
@@ -18,7 +18,7 @@ msx_cart_fmpac::msx_cart_fmpac(const machine_config &mconfig, const char *tag, d
, msx_cart_interface(mconfig, *this)
, m_ym2413(*this, "ym2413")
, m_selected_bank(0)
- , m_bank_base(NULL)
+ , m_bank_base(nullptr)
, m_sram_active(false)
, m_opll_active(false)
, m_1ffe(0)
diff --git a/src/devices/bus/msx_cart/fs_sr022.cpp b/src/devices/bus/msx_cart/fs_sr022.cpp
index c3aee7b9b81..df3819fc6b3 100644
--- a/src/devices/bus/msx_cart/fs_sr022.cpp
+++ b/src/devices/bus/msx_cart/fs_sr022.cpp
@@ -10,7 +10,7 @@ const device_type MSX_CART_FS_SR022 = &device_creator<msx_cart_fs_sr022>;
msx_cart_fs_sr022::msx_cart_fs_sr022(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MSX_CART_FS_SR022, "MSX Cartridge - FS-SR022", tag, owner, clock, "msx_cart_fs_sr022", __FILE__)
, msx_cart_interface(mconfig, *this)
- , m_bunsetsu_rom(NULL)
+ , m_bunsetsu_rom(nullptr)
, m_bunsetsu_address(0)
{
}
diff --git a/src/devices/bus/msx_cart/halnote.cpp b/src/devices/bus/msx_cart/halnote.cpp
index 35b0582b241..d37354dd0a5 100644
--- a/src/devices/bus/msx_cart/halnote.cpp
+++ b/src/devices/bus/msx_cart/halnote.cpp
@@ -14,7 +14,7 @@ msx_cart_halnote::msx_cart_halnote(const machine_config &mconfig, const char *ta
for (int i = 0; i < 8; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
}
@@ -51,8 +51,8 @@ void msx_cart_halnote::map_bank(int bank)
}
else
{
- m_bank_base[0] = NULL;
- m_bank_base[1] = NULL;
+ m_bank_base[0] = nullptr;
+ m_bank_base[1] = nullptr;
}
}
}
@@ -69,9 +69,9 @@ void msx_cart_halnote::restore_banks()
void msx_cart_halnote::device_reset()
{
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
}
@@ -113,7 +113,7 @@ WRITE8_MEMBER(msx_cart_halnote::write_cart)
{
if (offset < 0x4000)
{
- if (m_bank_base[0] != NULL)
+ if (m_bank_base[0] != nullptr)
{
m_sram[offset & 0x3fff] = data;
return;
diff --git a/src/devices/bus/msx_cart/hfox.cpp b/src/devices/bus/msx_cart/hfox.cpp
index 8cf349c403d..a0f2f7c4556 100644
--- a/src/devices/bus/msx_cart/hfox.cpp
+++ b/src/devices/bus/msx_cart/hfox.cpp
@@ -12,7 +12,7 @@ msx_cart_hfox::msx_cart_hfox(const machine_config &mconfig, const char *tag, dev
, msx_cart_interface(mconfig, *this)
{
m_selected_bank[0] = m_selected_bank[1] = 0;
- m_bank_base[0] = m_bank_base[1] = NULL;
+ m_bank_base[0] = m_bank_base[1] = nullptr;
}
diff --git a/src/devices/bus/msx_cart/holy_quran.cpp b/src/devices/bus/msx_cart/holy_quran.cpp
index cb9d0b850a7..7671e8624de 100644
--- a/src/devices/bus/msx_cart/holy_quran.cpp
+++ b/src/devices/bus/msx_cart/holy_quran.cpp
@@ -15,7 +15,7 @@ msx_cart_holy_quran::msx_cart_holy_quran(const machine_config &mconfig, const ch
for (int i = 0; i < 4; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
/* protection uses a simple rotation on databus, some lines inverted:
@@ -50,9 +50,9 @@ void msx_cart_holy_quran::restore_banks()
void msx_cart_holy_quran::device_reset()
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
}
diff --git a/src/devices/bus/msx_cart/konami.cpp b/src/devices/bus/msx_cart/konami.cpp
index c0beb8da357..d9d129888fd 100644
--- a/src/devices/bus/msx_cart/konami.cpp
+++ b/src/devices/bus/msx_cart/konami.cpp
@@ -21,9 +21,9 @@ msx_cart_konami::msx_cart_konami(const machine_config &mconfig, const char *tag,
{
m_selected_bank[i] = i;
}
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_bank_base)
{
- m_bank_base[i] = NULL;
+ elem = nullptr;
}
}
@@ -130,9 +130,9 @@ msx_cart_konami_scc::msx_cart_konami_scc(const machine_config &mconfig, const ch
{
m_selected_bank[i] = i;
}
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_bank_base)
{
- m_bank_base[i] = NULL;
+ elem = nullptr;
}
}
@@ -299,13 +299,13 @@ msx_cart_gamemaster2::msx_cart_gamemaster2(const machine_config &mconfig, const
: device_t(mconfig, MSX_CART_GAMEMASTER2, "MSX Cartridge - GAMEMASTER2", tag, owner, clock, "msx_cart_gamemaster2", __FILE__)
, msx_cart_interface(mconfig, *this)
{
- for (int i = 0; i < 3; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_bank_base)
{
- m_bank_base[i] = NULL;
+ elem = nullptr;
}
}
@@ -468,7 +468,7 @@ WRITE8_MEMBER(msx_cart_gamemaster2::write_cart)
msx_cart_synthesizer::msx_cart_synthesizer(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MSX_CART_SYNTHESIZER, "MSX Cartridge - Synthesizer", tag, owner, clock, "msx_cart_synthesizer", __FILE__)
, msx_cart_interface(mconfig, *this)
- , m_bank_base(NULL)
+ , m_bank_base(nullptr)
, m_dac(*this, "dac")
{
}
@@ -533,21 +533,21 @@ msx_cart_konami_sound::msx_cart_konami_sound(const machine_config &mconfig, devi
, m_sccplus_active(false)
, m_scc_mode(0)
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_bank_base)
{
- m_bank_base[i] = NULL;
+ elem = nullptr;
}
- for (int i = 0; i < 16; i++)
+ for (auto & elem : m_ram_bank)
{
- m_ram_bank[i] = NULL;
+ elem = nullptr;
}
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_ram_enabled)
{
- m_ram_enabled[i] = false;
+ elem = false;
}
}
@@ -671,7 +671,7 @@ READ8_MEMBER(msx_cart_konami_sound::read_cart)
UINT8 *base = m_bank_base[offset >> 13];
- if (base != NULL)
+ if (base != nullptr)
{
return base[offset & 0x1fff];
}
@@ -684,7 +684,7 @@ WRITE8_MEMBER(msx_cart_konami_sound::write_cart)
switch (offset & 0xe000)
{
case 0x4000:
- if (m_ram_enabled[0] && m_bank_base[2] != NULL)
+ if (m_ram_enabled[0] && m_bank_base[2] != nullptr)
{
m_bank_base[2][offset & 0x1fff] = data;
}
@@ -696,7 +696,7 @@ WRITE8_MEMBER(msx_cart_konami_sound::write_cart)
break;
case 0x6000:
- if (m_ram_enabled[1] && m_bank_base[3] != NULL)
+ if (m_ram_enabled[1] && m_bank_base[3] != nullptr)
{
m_bank_base[3][offset & 0x1fff] = data;
}
@@ -708,7 +708,7 @@ WRITE8_MEMBER(msx_cart_konami_sound::write_cart)
break;
case 0x8000:
- if (m_ram_enabled[2] && m_bank_base[0] != NULL)
+ if (m_ram_enabled[2] && m_bank_base[0] != nullptr)
{
m_bank_base[0][offset & 0x1fff] = data;
}
@@ -755,7 +755,7 @@ WRITE8_MEMBER(msx_cart_konami_sound::write_cart)
break;
case 0xa000:
- if (m_ram_enabled[3] && m_bank_base[1] != NULL)
+ if (m_ram_enabled[3] && m_bank_base[1] != nullptr)
{
m_bank_base[1][offset & 0x1fff] = data;
}
diff --git a/src/devices/bus/msx_cart/korean.cpp b/src/devices/bus/msx_cart/korean.cpp
index 58cdd0d5985..f1dedeb9874 100644
--- a/src/devices/bus/msx_cart/korean.cpp
+++ b/src/devices/bus/msx_cart/korean.cpp
@@ -16,7 +16,7 @@ msx_cart_korean_80in1::msx_cart_korean_80in1(const machine_config &mconfig, cons
for (int i = 0; i < 4; i++)
{
m_selected_bank[i] = i;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
}
@@ -107,9 +107,9 @@ msx_cart_korean_90in1::msx_cart_korean_90in1(const machine_config &mconfig, cons
, m_bank_mask(0)
, m_selected_bank(0)
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_bank_base)
{
- m_bank_base[i] = NULL;
+ elem = nullptr;
}
}
@@ -216,7 +216,7 @@ msx_cart_korean_126in1::msx_cart_korean_126in1(const machine_config &mconfig, co
for (int i = 0; i < 2; i++)
{
m_selected_bank[i] = i;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
}
diff --git a/src/devices/bus/msx_cart/majutsushi.cpp b/src/devices/bus/msx_cart/majutsushi.cpp
index 6c9c16e7319..23091c1fb4b 100644
--- a/src/devices/bus/msx_cart/majutsushi.cpp
+++ b/src/devices/bus/msx_cart/majutsushi.cpp
@@ -11,13 +11,13 @@ msx_cart_majutsushi::msx_cart_majutsushi(const machine_config &mconfig, const ch
, msx_cart_interface(mconfig, *this)
, m_dac(*this, "dac")
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_selected_bank)
{
- m_selected_bank[i] = 0;
+ elem = 0;
}
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_bank_base)
{
- m_bank_base[i] = NULL;
+ elem = nullptr;
}
}
diff --git a/src/devices/bus/msx_cart/msx_audio.cpp b/src/devices/bus/msx_cart/msx_audio.cpp
index 640dbc02b07..01ad0cd1f45 100644
--- a/src/devices/bus/msx_cart/msx_audio.cpp
+++ b/src/devices/bus/msx_cart/msx_audio.cpp
@@ -86,7 +86,7 @@ static MACHINE_CONFIG_FRAGMENT( msx_audio_hxmu900 )
MCFG_Y8950_KEYBOARD_WRITE_HANDLER(DEVWRITE8("kbdc", msx_audio_kbdc_port_device, write))
MCFG_Y8950_KEYBOARD_READ_HANDLER(DEVREAD8("kbdc", msx_audio_kbdc_port_device, read))
- MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, NULL)
+ MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, nullptr)
MACHINE_CONFIG_END
@@ -148,7 +148,7 @@ static MACHINE_CONFIG_FRAGMENT( msx_audio_nms1205 )
MCFG_Y8950_KEYBOARD_READ_HANDLER(DEVREAD8("kbdc", msx_audio_kbdc_port_device, read))
MCFG_Y8950_IRQ_HANDLER(WRITELINE(msx_cart_msx_audio_nms1205, irq_write))
- MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, NULL)
+ MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, nullptr)
// There is a 2 MHz crystal on the PCB, the 6850 TX and RX clocks are derived from it
MCFG_DEVICE_ADD("acia6850", ACIA6850, 0)
@@ -257,7 +257,7 @@ static MACHINE_CONFIG_FRAGMENT( msx_audio_fsca1 )
MCFG_Y8950_IO_READ_HANDLER(READ8(msx_cart_msx_audio_fsca1, y8950_io_r))
MCFG_Y8950_IO_WRITE_HANDLER(WRITE8(msx_cart_msx_audio_fsca1, y8950_io_w))
- MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, NULL)
+ MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/msx_cart/msx_audio_kb.cpp b/src/devices/bus/msx_cart/msx_audio_kb.cpp
index f88f9b94c19..0dfcebde30a 100644
--- a/src/devices/bus/msx_cart/msx_audio_kb.cpp
+++ b/src/devices/bus/msx_cart/msx_audio_kb.cpp
@@ -10,7 +10,7 @@ const device_type MSX_AUDIO_KBDC_PORT = &device_creator<msx_audio_kbdc_port_devi
msx_audio_kbdc_port_device::msx_audio_kbdc_port_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MSX_AUDIO_KBDC_PORT, "MSX Audio keyboard connector port", tag, owner, clock, "msx_audio_kbdc_port", __FILE__),
device_slot_interface(mconfig, *this),
- m_keyboard(NULL)
+ m_keyboard(nullptr)
{
}
diff --git a/src/devices/bus/msx_cart/msxdos2.cpp b/src/devices/bus/msx_cart/msxdos2.cpp
index b3c127a10cb..96f0b99f119 100644
--- a/src/devices/bus/msx_cart/msxdos2.cpp
+++ b/src/devices/bus/msx_cart/msxdos2.cpp
@@ -10,7 +10,7 @@ msx_cart_msxdos2::msx_cart_msxdos2(const machine_config &mconfig, const char *ta
: device_t(mconfig, MSX_CART_MSXDOS2, "MSX Cartridge - MSXDOS2", tag, owner, clock, "msx_cart_msxdos2", __FILE__)
, msx_cart_interface(mconfig, *this)
, m_selected_bank(0)
- , m_bank_base(NULL)
+ , m_bank_base(nullptr)
{
}
diff --git a/src/devices/bus/msx_cart/rtype.cpp b/src/devices/bus/msx_cart/rtype.cpp
index e09a57894d7..ffe7d56cfba 100644
--- a/src/devices/bus/msx_cart/rtype.cpp
+++ b/src/devices/bus/msx_cart/rtype.cpp
@@ -11,9 +11,9 @@ msx_cart_rtype::msx_cart_rtype(const machine_config &mconfig, const char *tag, d
, msx_cart_interface(mconfig, *this)
, m_selected_bank(0)
{
- for (int i = 0; i < 2; i++)
+ for (auto & elem : m_bank_base)
{
- m_bank_base[i] = NULL;
+ elem = nullptr;
}
}
diff --git a/src/devices/bus/msx_cart/super_swangi.cpp b/src/devices/bus/msx_cart/super_swangi.cpp
index 61dffe0d567..65e4992afe3 100644
--- a/src/devices/bus/msx_cart/super_swangi.cpp
+++ b/src/devices/bus/msx_cart/super_swangi.cpp
@@ -12,7 +12,7 @@ msx_cart_super_swangi::msx_cart_super_swangi(const machine_config &mconfig, cons
, msx_cart_interface(mconfig, *this)
, m_selected_bank(0)
{
- m_bank_base[0] = m_bank_base[1] = NULL;
+ m_bank_base[0] = m_bank_base[1] = nullptr;
}
diff --git a/src/devices/bus/msx_cart/superloderunner.cpp b/src/devices/bus/msx_cart/superloderunner.cpp
index c8bd6f6c973..f71a109a83b 100644
--- a/src/devices/bus/msx_cart/superloderunner.cpp
+++ b/src/devices/bus/msx_cart/superloderunner.cpp
@@ -10,7 +10,7 @@ msx_cart_superloderunner::msx_cart_superloderunner(const machine_config &mconfig
: device_t(mconfig, MSX_CART_SUPERLODERUNNER, "MSX Cartridge - Super Lode Runner", tag, owner, clock, "msx_cart_superloderunner", __FILE__)
, msx_cart_interface(mconfig, *this)
, m_selected_bank(0)
- , m_bank_base(NULL)
+ , m_bank_base(nullptr)
{
}
diff --git a/src/devices/bus/msx_cart/yamaha.cpp b/src/devices/bus/msx_cart/yamaha.cpp
index b78ec43fb9f..7abf066c3af 100644
--- a/src/devices/bus/msx_cart/yamaha.cpp
+++ b/src/devices/bus/msx_cart/yamaha.cpp
@@ -61,7 +61,7 @@ static MACHINE_CONFIG_FRAGMENT( msx_sfg )
MCFG_YM2148_PORT_READ_HANDLER(DEVREAD8("kbdc", msx_audio_kbdc_port_device, read))
MCFG_YM2148_IRQ_HANDLER(WRITELINE(msx_cart_sfg,ym2148_irq_w))
- MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, NULL)
+ MCFG_MSX_AUDIO_KBDC_PORT_ADD("kbdc", msx_audio_keyboards, nullptr)
MCFG_MIDI_PORT_ADD("mdout", midiout_slot, "midiout")
diff --git a/src/devices/bus/msx_slot/bunsetsu.cpp b/src/devices/bus/msx_slot/bunsetsu.cpp
index b8c1e7b4471..1289a84704b 100644
--- a/src/devices/bus/msx_slot/bunsetsu.cpp
+++ b/src/devices/bus/msx_slot/bunsetsu.cpp
@@ -13,8 +13,8 @@ const device_type MSX_SLOT_BUNSETSU = &device_creator<msx_slot_bunsetsu_device>;
msx_slot_bunsetsu_device::msx_slot_bunsetsu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: msx_slot_rom_device(mconfig, MSX_SLOT_BUNSETSU, "MSX Internal BUNSETSU", tag, owner, clock, "msx_slot_bunsetsu", __FILE__)
- , m_bunsetsu_region(NULL)
- , m_bunsetsu_region_tag(NULL)
+ , m_bunsetsu_region(nullptr)
+ , m_bunsetsu_region_tag(nullptr)
, m_bunsetsu_address(0)
{
}
@@ -24,14 +24,14 @@ void msx_slot_bunsetsu_device::device_start()
{
msx_slot_rom_device::device_start();
- if (m_bunsetsu_region_tag == NULL)
+ if (m_bunsetsu_region_tag == nullptr)
{
fatalerror("msx_slot_bunsetsu_device: no bunsetsu region tag specified\n");
}
m_bunsetsu_region = owner()->memregion(m_bunsetsu_region_tag);
- if (m_bunsetsu_region == NULL)
+ if (m_bunsetsu_region == nullptr)
{
fatalerror("msx_slot_bunsetsu_device: Unable to find region with tag '%s'\n", m_bunsetsu_region_tag);
}
diff --git a/src/devices/bus/msx_slot/cartridge.cpp b/src/devices/bus/msx_slot/cartridge.cpp
index a7d79be1a51..43a92a94906 100644
--- a/src/devices/bus/msx_slot/cartridge.cpp
+++ b/src/devices/bus/msx_slot/cartridge.cpp
@@ -39,7 +39,7 @@ msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconf
, device_slot_interface(mconfig, *this)
, msx_internal_slot_interface()
, m_irq_handler(*this)
- , m_cartridge(NULL)
+ , m_cartridge(nullptr)
{
}
@@ -50,7 +50,7 @@ msx_slot_cartridge_device::msx_slot_cartridge_device(const machine_config &mconf
, device_slot_interface(mconfig, *this)
, msx_internal_slot_interface()
, m_irq_handler(*this)
- , m_cartridge(NULL)
+ , m_cartridge(nullptr)
{
}
@@ -85,10 +85,10 @@ static const struct
static const char *msx_cart_get_slot_option(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return slot_list[0].slot_option;
@@ -315,11 +315,11 @@ void msx_slot_cartridge_device::get_default_card_software(std::string &result)
{ 17, KOREAN_126IN1 }
};
- for (int i = 0; i < ARRAY_LENGTH(extrainfo_map); i++)
+ for (auto & elem : extrainfo_map)
{
- if (extrainfo_map[i].extrainfo == extrainfo_type)
+ if (elem.extrainfo == extrainfo_type)
{
- type = extrainfo_map[i].mapper;
+ type = elem.mapper;
}
}
}
diff --git a/src/devices/bus/msx_slot/cartridge.h b/src/devices/bus/msx_slot/cartridge.h
index 865faad0f0f..edff7a16606 100644
--- a/src/devices/bus/msx_slot/cartridge.h
+++ b/src/devices/bus/msx_slot/cartridge.h
@@ -50,7 +50,7 @@ public:
virtual bool is_creatable() const { return false; }
virtual bool must_be_loaded() const { return false; }
virtual bool is_reset_on_load() const { return true; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "msx_cart"; }
virtual const char *file_extensions() const { return "mx1,bin,rom"; }
diff --git a/src/devices/bus/msx_slot/disk.cpp b/src/devices/bus/msx_slot/disk.cpp
index 799f05b9337..24a1b5c95c1 100644
--- a/src/devices/bus/msx_slot/disk.cpp
+++ b/src/devices/bus/msx_slot/disk.cpp
@@ -45,16 +45,16 @@ const device_type MSX_SLOT_DISK6 = &device_creator<msx_slot_disk6_device>;
msx_slot_disk_device::msx_slot_disk_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)
: msx_slot_rom_device(mconfig, type, name, tag, owner, clock, shortname, source)
- , m_floppy0(NULL)
- , m_floppy1(NULL)
- , m_floppy2(NULL)
- , m_floppy3(NULL)
- , m_floppy(NULL)
- , m_fdc_tag(NULL)
- , m_floppy0_tag(NULL)
- , m_floppy1_tag(NULL)
- , m_floppy2_tag(NULL)
- , m_floppy3_tag(NULL)
+ , m_floppy0(nullptr)
+ , m_floppy1(nullptr)
+ , m_floppy2(nullptr)
+ , m_floppy3(nullptr)
+ , m_floppy(nullptr)
+ , m_fdc_tag(nullptr)
+ , m_floppy0_tag(nullptr)
+ , m_floppy1_tag(nullptr)
+ , m_floppy2_tag(nullptr)
+ , m_floppy3_tag(nullptr)
{
}
@@ -63,17 +63,17 @@ void msx_slot_disk_device::device_start()
{
msx_slot_rom_device::device_start();
- if (m_fdc_tag == NULL)
+ if (m_fdc_tag == nullptr)
{
fatalerror("msx_slot_disk_device: no FDC tag specified\n");
}
- m_floppy0 = m_floppy0_tag ? owner()->subdevice<floppy_connector>(m_floppy0_tag) : NULL;
- m_floppy1 = m_floppy1_tag ? owner()->subdevice<floppy_connector>(m_floppy1_tag) : NULL;
- m_floppy2 = m_floppy2_tag ? owner()->subdevice<floppy_connector>(m_floppy2_tag) : NULL;
- m_floppy3 = m_floppy3_tag ? owner()->subdevice<floppy_connector>(m_floppy3_tag) : NULL;
+ m_floppy0 = m_floppy0_tag ? owner()->subdevice<floppy_connector>(m_floppy0_tag) : nullptr;
+ m_floppy1 = m_floppy1_tag ? owner()->subdevice<floppy_connector>(m_floppy1_tag) : nullptr;
+ m_floppy2 = m_floppy2_tag ? owner()->subdevice<floppy_connector>(m_floppy2_tag) : nullptr;
+ m_floppy3 = m_floppy3_tag ? owner()->subdevice<floppy_connector>(m_floppy3_tag) : nullptr;
- if (m_floppy0 == NULL && m_floppy1 == NULL)
+ if (m_floppy0 == nullptr && m_floppy1 == nullptr)
{
logerror("msx_slot_disk_device: Warning: both floppy0 and floppy1 were not found\n");
}
@@ -82,7 +82,7 @@ void msx_slot_disk_device::device_start()
msx_slot_wd_disk_device::msx_slot_wd_disk_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)
: msx_slot_disk_device(mconfig, type, name, tag, owner, clock, shortname, source)
- , m_fdc(NULL)
+ , m_fdc(nullptr)
{
}
@@ -93,7 +93,7 @@ void msx_slot_wd_disk_device::device_start()
m_fdc = owner()->subdevice<wd_fdc_analog_t>(m_fdc_tag);
- if (m_fdc == NULL)
+ if (m_fdc == nullptr)
{
fatalerror("msx_slot_wd_disk_device: Unable to find FDC with tag '%s'\n", m_fdc_tag);
}
@@ -102,7 +102,7 @@ void msx_slot_wd_disk_device::device_start()
msx_slot_tc8566_disk_device::msx_slot_tc8566_disk_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)
: msx_slot_disk_device(mconfig, type, name, tag, owner, clock, shortname, source)
- , m_fdc(NULL)
+ , m_fdc(nullptr)
{
}
@@ -113,7 +113,7 @@ void msx_slot_tc8566_disk_device::device_start()
m_fdc = owner()->subdevice<tc8566af_device>(m_fdc_tag);
- if (m_fdc == NULL)
+ if (m_fdc == nullptr)
{
fatalerror("msx_slot_tc8566_disk_device: Unable to find FDC with tag '%s'\n", m_fdc_tag);
}
@@ -178,15 +178,15 @@ void msx_slot_disk1_device::set_control(UINT8 data)
{
case 0:
case 2:
- m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL;
+ m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr;
break;
case 1:
- m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL;
+ m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr;
break;
default:
- m_floppy = NULL;
+ m_floppy = nullptr;
break;
}
@@ -327,15 +327,15 @@ void msx_slot_disk2_device::set_control(UINT8 data)
switch (m_control & 3)
{
case 1:
- m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL;
+ m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr;
break;
case 2:
- m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL;
+ m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr;
break;
default:
- m_floppy = NULL;
+ m_floppy = nullptr;
break;
}
@@ -562,23 +562,23 @@ void msx_slot_disk5_device::set_control(UINT8 control)
switch (m_control & 0x0f)
{
case 0x01:
- m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL;
+ m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr;
break;
case 0x02:
- m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL;
+ m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr;
break;
case 0x04:
- m_floppy = m_floppy2 ? m_floppy2->get_device() : NULL;
+ m_floppy = m_floppy2 ? m_floppy2->get_device() : nullptr;
break;
case 0x08:
- m_floppy = m_floppy3 ? m_floppy3->get_device() : NULL;
+ m_floppy = m_floppy3 ? m_floppy3->get_device() : nullptr;
break;
default:
- m_floppy = NULL;
+ m_floppy = nullptr;
break;
}
@@ -681,7 +681,7 @@ void msx_slot_disk6_device::select_drive()
{
if (m_drive_select1)
{
- m_floppy = m_floppy1 ? m_floppy1->get_device() : NULL;
+ m_floppy = m_floppy1 ? m_floppy1->get_device() : nullptr;
if (!m_floppy)
{
m_drive_select1 = 0;
@@ -690,7 +690,7 @@ void msx_slot_disk6_device::select_drive()
if (m_drive_select0)
{
- m_floppy = m_floppy0 ? m_floppy0->get_device() : NULL;
+ m_floppy = m_floppy0 ? m_floppy0->get_device() : nullptr;
if (!m_floppy)
{
m_drive_select0 = 0;
diff --git a/src/devices/bus/msx_slot/fs4600.cpp b/src/devices/bus/msx_slot/fs4600.cpp
index f6ad2b8c892..e6d6d8b9b9f 100644
--- a/src/devices/bus/msx_slot/fs4600.cpp
+++ b/src/devices/bus/msx_slot/fs4600.cpp
@@ -15,16 +15,16 @@ msx_slot_fs4600_device::msx_slot_fs4600_device(const machine_config &mconfig, co
: device_t(mconfig, MSX_SLOT_FS4600, "MSX Internal FS4600 Firmware", tag, owner, clock, "msx_slot_fs4600", __FILE__)
, msx_internal_slot_interface()
, m_nvram(*this, "nvram")
- , m_region(NULL)
+ , m_region(nullptr)
, m_region_offset(0)
- , m_rom(NULL)
+ , m_rom(nullptr)
, m_sram_address(0)
, m_control(0)
{
for (int i = 0; i < 4; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = 0;
+ m_bank_base[i] = nullptr;
}
memset(m_sram, 0, sizeof(m_sram));
}
@@ -52,12 +52,12 @@ void msx_slot_fs4600_device::set_rom_start(device_t &device, const char *region,
void msx_slot_fs4600_device::device_start()
{
- assert(m_region != NULL );
+ assert(m_region != nullptr );
memory_region *m_rom_region = owner()->memregion(m_region);
// Sanity checks
- if (m_rom_region == NULL )
+ if (m_rom_region == nullptr )
{
fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region);
}
diff --git a/src/devices/bus/msx_slot/music.cpp b/src/devices/bus/msx_slot/music.cpp
index 5c7d0905427..baa6bdf0175 100644
--- a/src/devices/bus/msx_slot/music.cpp
+++ b/src/devices/bus/msx_slot/music.cpp
@@ -9,8 +9,8 @@ const device_type MSX_SLOT_MUSIC = &device_creator<msx_slot_music_device>;
msx_slot_music_device::msx_slot_music_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: msx_slot_rom_device(mconfig, MSX_SLOT_MUSIC, "MSX Internal MSX-MUSIC", tag, owner, clock, "msx_slot_music", __FILE__)
- , m_ym2413(NULL)
- , m_ym2413_tag(NULL)
+ , m_ym2413(nullptr)
+ , m_ym2413_tag(nullptr)
{
}
@@ -19,14 +19,14 @@ void msx_slot_music_device::device_start()
{
msx_slot_rom_device::device_start();
- if (m_ym2413_tag == NULL)
+ if (m_ym2413_tag == nullptr)
{
fatalerror("msx_slot_music_device: no YM2413 tag specified\n");
}
m_ym2413 = owner()->subdevice<ym2413_device>(m_ym2413_tag);
- if (m_ym2413 == NULL)
+ if (m_ym2413 == nullptr)
{
fatalerror("msx_slot_ym2413_device: Unable to find YM2413 with tag '%s'\n", m_ym2413_tag);
}
diff --git a/src/devices/bus/msx_slot/panasonic08.cpp b/src/devices/bus/msx_slot/panasonic08.cpp
index df78f76a27b..ec9fdcf20ea 100644
--- a/src/devices/bus/msx_slot/panasonic08.cpp
+++ b/src/devices/bus/msx_slot/panasonic08.cpp
@@ -20,15 +20,15 @@ msx_slot_panasonic08_device::msx_slot_panasonic08_device(const machine_config &m
: device_t(mconfig, MSX_SLOT_PANASONIC08, "MSX Internal Panasonic08", tag, owner, clock, "msx_slot_panasonic08", __FILE__)
, msx_internal_slot_interface()
, m_nvram(*this, "nvram")
- , m_region(NULL)
+ , m_region(nullptr)
, m_region_offset(0)
- , m_rom(NULL)
+ , m_rom(nullptr)
, m_control(0)
{
for (int i = 0; i < 8; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = 0;
+ m_bank_base[i] = nullptr;
}
}
@@ -55,12 +55,12 @@ void msx_slot_panasonic08_device::set_rom_start(device_t &device, const char *re
void msx_slot_panasonic08_device::device_start()
{
- assert(m_region != NULL );
+ assert(m_region != nullptr );
memory_region *m_rom_region = owner()->memregion(m_region);
// Sanity checks
- if (m_rom_region == NULL )
+ if (m_rom_region == nullptr )
{
fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region);
}
diff --git a/src/devices/bus/msx_slot/rom.cpp b/src/devices/bus/msx_slot/rom.cpp
index 609201f60d1..2d4593bed2b 100644
--- a/src/devices/bus/msx_slot/rom.cpp
+++ b/src/devices/bus/msx_slot/rom.cpp
@@ -10,9 +10,9 @@ const device_type MSX_SLOT_ROM = &device_creator<msx_slot_rom_device>;
msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MSX_SLOT_ROM, "MSX Internal ROM", tag, owner, clock, "msx_slot_rom", __FILE__)
, msx_internal_slot_interface()
- , m_region(NULL)
+ , m_region(nullptr)
, m_region_offset(0)
- , m_rom(NULL)
+ , m_rom(nullptr)
{
}
@@ -20,9 +20,9 @@ msx_slot_rom_device::msx_slot_rom_device(const machine_config &mconfig, const ch
msx_slot_rom_device::msx_slot_rom_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)
, msx_internal_slot_interface()
- , m_region(NULL)
+ , m_region(nullptr)
, m_region_offset(0)
- , m_rom(NULL)
+ , m_rom(nullptr)
{
}
@@ -38,12 +38,12 @@ void msx_slot_rom_device::set_rom_start(device_t &device, const char *region, UI
void msx_slot_rom_device::device_start()
{
- assert(m_region != NULL );
+ assert(m_region != nullptr );
memory_region *m_rom_region = owner()->memregion(m_region);
// Sanity checks
- if (m_rom_region == NULL )
+ if (m_rom_region == nullptr )
{
fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region);
}
diff --git a/src/devices/bus/msx_slot/sony08.cpp b/src/devices/bus/msx_slot/sony08.cpp
index 66a5f733e2d..2f48869c291 100644
--- a/src/devices/bus/msx_slot/sony08.cpp
+++ b/src/devices/bus/msx_slot/sony08.cpp
@@ -17,14 +17,14 @@ msx_slot_sony08_device::msx_slot_sony08_device(const machine_config &mconfig, co
: device_t(mconfig, MSX_SLOT_SONY08, "MSX Internal SONY08", tag, owner, clock, "msx_slot_sony08", __FILE__)
, msx_internal_slot_interface()
, m_nvram(*this, "nvram")
- , m_region(NULL)
+ , m_region(nullptr)
, m_region_offset(0)
- , m_rom(NULL)
+ , m_rom(nullptr)
{
for (int i = 0; i < 8; i++)
{
m_selected_bank[i] = 0;
- m_bank_base[i] = NULL;
+ m_bank_base[i] = nullptr;
}
memset(m_sram, 0, sizeof(m_sram));
}
@@ -52,12 +52,12 @@ void msx_slot_sony08_device::set_rom_start(device_t &device, const char *region,
void msx_slot_sony08_device::device_start()
{
- assert(m_region != NULL );
+ assert(m_region != nullptr );
memory_region *m_rom_region = owner()->memregion(m_region);
// Sanity checks
- if (m_rom_region == NULL )
+ if (m_rom_region == nullptr )
{
fatalerror("Rom slot '%s': Unable to find memory region '%s'\n", tag(), m_region);
}
@@ -102,8 +102,8 @@ void msx_slot_sony08_device::map_bank(int bank)
}
else
{
- m_bank_base[0] = NULL;
- m_bank_base[1] = NULL;
+ m_bank_base[0] = nullptr;
+ m_bank_base[1] = nullptr;
}
}
}
@@ -144,7 +144,7 @@ WRITE8_MEMBER(msx_slot_sony08_device::write)
{
if (offset < 0x4000)
{
- if (m_bank_base[0] != NULL)
+ if (m_bank_base[0] != nullptr)
{
m_sram[offset & 0x3fff] = data;
return;
diff --git a/src/devices/bus/nasbus/floppy.cpp b/src/devices/bus/nasbus/floppy.cpp
index 7a644c9192b..8c87bf55b35 100644
--- a/src/devices/bus/nasbus/floppy.cpp
+++ b/src/devices/bus/nasbus/floppy.cpp
@@ -43,8 +43,8 @@ static MACHINE_CONFIG_FRAGMENT( nascom_fdc )
MCFG_FLOPPY_DRIVE_ADD("fd1793:0", nascom_floppies, "55f", nascom_fdc_device::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("fd1793:1", nascom_floppies, "55f", nascom_fdc_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fd1793:2", nascom_floppies, NULL, nascom_fdc_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fd1793:3", nascom_floppies, NULL, nascom_fdc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fd1793:2", nascom_floppies, nullptr, nascom_fdc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fd1793:3", nascom_floppies, nullptr, nascom_fdc_device::floppy_formats)
MCFG_SOFTWARE_LIST_ADD("floppy_list", "nascom_flop")
MACHINE_CONFIG_END
@@ -71,8 +71,8 @@ nascom_fdc_device::nascom_fdc_device(const machine_config &mconfig, const char *
m_floppy1(*this, "fd1793:1"),
m_floppy2(*this, "fd1793:2"),
m_floppy3(*this, "fd1793:3"),
- m_floppy(NULL),
- m_motor(NULL),
+ m_floppy(nullptr),
+ m_motor(nullptr),
m_select(0)
{
}
@@ -165,7 +165,7 @@ WRITE8_MEMBER( nascom_fdc_device::select_w )
if (VERBOSE)
logerror("nascom_fdc_device::select_w: 0x%02x\n", data);
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
diff --git a/src/devices/bus/nasbus/nasbus.cpp b/src/devices/bus/nasbus/nasbus.cpp
index 739ef9decdf..bd0f2d4dab4 100644
--- a/src/devices/bus/nasbus/nasbus.cpp
+++ b/src/devices/bus/nasbus/nasbus.cpp
@@ -24,7 +24,7 @@ const device_type NASBUS_SLOT = &device_creator<nasbus_slot_device>;
nasbus_slot_device::nasbus_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NASBUS_SLOT, "NASBUS Slot", tag, owner, clock, "nasbus_slot", __FILE__),
device_slot_interface(mconfig, *this),
- m_nasbus_tag(NULL)
+ m_nasbus_tag(nullptr)
{
}
@@ -32,7 +32,7 @@ nasbus_slot_device::nasbus_slot_device(const machine_config &mconfig, device_typ
const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_slot_interface(mconfig, *this),
- m_nasbus_tag(NULL)
+ m_nasbus_tag(nullptr)
{
}
@@ -71,8 +71,8 @@ const device_type NASBUS = &device_creator<nasbus_device>;
nasbus_device::nasbus_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, NASBUS_SLOT, "NASBUS Backplane", tag, owner, clock, "nasbus", __FILE__),
- m_program(NULL),
- m_io(NULL),
+ m_program(nullptr),
+ m_io(nullptr),
m_ram_disable_handler(*this)
{
}
@@ -146,8 +146,8 @@ WRITE_LINE_MEMBER( nasbus_device::ram_disable_w ) { m_ram_disable_handler(state)
device_nasbus_card_interface::device_nasbus_card_interface(const machine_config &mconfig, device_t &device) :
device_slot_card_interface(mconfig, device),
- m_next(NULL),
- m_nasbus(NULL)
+ m_next(nullptr),
+ m_nasbus(nullptr)
{
}
diff --git a/src/devices/bus/neogeo/banked_cart.cpp b/src/devices/bus/neogeo/banked_cart.cpp
index 0378715367a..1ad3b0c34e1 100644
--- a/src/devices/bus/neogeo/banked_cart.cpp
+++ b/src/devices/bus/neogeo/banked_cart.cpp
@@ -10,9 +10,9 @@ extern const device_type NEOGEO_BANKED_CART = &device_creator<neogeo_banked_cart
neogeo_banked_cart_device::neogeo_banked_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, NEOGEO_BANKED_CART, "NeoGeo Banked Cartridge", tag, owner, clock, "neogeo_banked_cart", __FILE__),
- m_bank_cartridge(0),
+ m_bank_cartridge(nullptr),
m_main_cpu_bank_address(0),
- m_region(0),
+ m_region(nullptr),
m_region_size(0)
{
diff --git a/src/devices/bus/neogeo/bootleg_prot.cpp b/src/devices/bus/neogeo/bootleg_prot.cpp
index 0bdad238b26..a577528e271 100644
--- a/src/devices/bus/neogeo/bootleg_prot.cpp
+++ b/src/devices/bus/neogeo/bootleg_prot.cpp
@@ -12,9 +12,9 @@ extern const device_type NGBOOTLEG_PROT = &device_creator<ngbootleg_prot_device>
ngbootleg_prot_device::ngbootleg_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, NGBOOTLEG_PROT, "NeoGeo Protection (Bootleg)", tag, owner, clock, "ngbootleg_prot", __FILE__),
kof2k3_overlay(0),
- m_mainrom(NULL),
- m_fixedrom(NULL),
- m_bankdev(NULL)
+ m_mainrom(nullptr),
+ m_fixedrom(nullptr),
+ m_bankdev(nullptr)
{
}
diff --git a/src/devices/bus/neogeo/cmc_prot.cpp b/src/devices/bus/neogeo/cmc_prot.cpp
index f54f09aeeb1..c4dc573af8a 100644
--- a/src/devices/bus/neogeo/cmc_prot.cpp
+++ b/src/devices/bus/neogeo/cmc_prot.cpp
@@ -11,15 +11,15 @@ extern const device_type CMC_PROT = &device_creator<cmc_prot_device>;
cmc_prot_device::cmc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CMC_PROT, "NeoGeo Protection (CMC)", tag, owner, clock, "cmc_prot", __FILE__),
- type0_t03(NULL),
- type0_t12(NULL),
- type1_t03(NULL),
- type1_t12(NULL),
- address_8_15_xor1(NULL),
- address_8_15_xor2(NULL),
- address_16_23_xor1(NULL),
- address_16_23_xor2(NULL),
- address_0_7_xor(NULL)
+ type0_t03(nullptr),
+ type0_t12(nullptr),
+ type1_t03(nullptr),
+ type1_t12(nullptr),
+ address_8_15_xor1(nullptr),
+ address_8_15_xor2(nullptr),
+ address_16_23_xor1(nullptr),
+ address_16_23_xor2(nullptr),
+ address_0_7_xor(nullptr)
{
}
diff --git a/src/devices/bus/neogeo/fatfury2_prot.cpp b/src/devices/bus/neogeo/fatfury2_prot.cpp
index be66baa3481..b2560ad4f62 100644
--- a/src/devices/bus/neogeo/fatfury2_prot.cpp
+++ b/src/devices/bus/neogeo/fatfury2_prot.cpp
@@ -11,7 +11,7 @@ extern const device_type FATFURY2_PROT = &device_creator<fatfury2_prot_device>;
fatfury2_prot_device::fatfury2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, FATFURY2_PROT, "NeoGeo Protection (Fatal Fury 2)", tag, owner, clock, "fatfury2_prot", __FILE__),
- m_bankdev(NULL),
+ m_bankdev(nullptr),
m_fatfury2_prot_data(0)
{
}
diff --git a/src/devices/bus/neogeo/neogeo_slot.cpp b/src/devices/bus/neogeo/neogeo_slot.cpp
index 0c8fa80887e..100e53e6e18 100644
--- a/src/devices/bus/neogeo/neogeo_slot.cpp
+++ b/src/devices/bus/neogeo/neogeo_slot.cpp
@@ -27,7 +27,7 @@ neogeo_cart_slot_device::neogeo_cart_slot_device(const machine_config &mconfig,
device_t(mconfig, NEOGEO_CART_SLOT, "NeoGeo Cartridge Slot", tag, owner, clock, "neogeo_cart_slot", __FILE__),
device_image_interface(mconfig, *this),
device_slot_interface(mconfig, *this),
- m_cart(0)
+ m_cart(nullptr)
{
}
@@ -76,7 +76,7 @@ bool neogeo_cart_slot_device::call_load()
UINT8* ROM8;
UINT32 len;
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
// create memory regions
len = get_software_region_length("maincpu");
@@ -87,7 +87,7 @@ bool neogeo_cart_slot_device::call_load()
m_cart->fixed_alloc(len); ROM8 = m_cart->get_fixed_base();
memcpy(ROM8, get_software_region("fixed"), len);
- if (get_software_region("audiocpu") != NULL)
+ if (get_software_region("audiocpu") != nullptr)
{
len = get_software_region_length("audiocpu");
m_cart->audio_alloc(len + 0x10000); ROM8 = m_cart->get_audio_base();
@@ -99,7 +99,7 @@ bool neogeo_cart_slot_device::call_load()
m_cart->ym_alloc(len); ROM8 = m_cart->get_ym_base();
memcpy(ROM8, get_software_region("ymsnd"), len);
- if (get_software_region("ymsnd.deltat") != NULL)
+ if (get_software_region("ymsnd.deltat") != nullptr)
{
len = get_software_region_length("ymsnd.deltat");
m_cart->ymdelta_alloc(len); ROM8 = m_cart->get_ymdelta_base();
@@ -115,7 +115,7 @@ bool neogeo_cart_slot_device::call_load()
m_cart->sprites_alloc(len); ROM8 = m_cart->get_sprites_base();
memcpy(ROM8, get_software_region("sprites"), len);
- if (get_software_region("audiocrypt") != NULL) // encrypted Z80 code
+ if (get_software_region("audiocrypt") != nullptr) // encrypted Z80 code
{
len = get_software_region_length("audiocrypt");
m_cart->audiocrypt_alloc(len); ROM8 = m_cart->get_audiocrypt_base();
diff --git a/src/devices/bus/neogeo/neogeo_slot.h b/src/devices/bus/neogeo/neogeo_slot.h
index 3020a7045a9..215d41567e7 100644
--- a/src/devices/bus/neogeo/neogeo_slot.h
+++ b/src/devices/bus/neogeo/neogeo_slot.h
@@ -36,7 +36,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "neo_cart"; }
virtual const char *file_extensions() const { return "bin"; }
@@ -46,19 +46,19 @@ public:
// reading and writing
virtual DECLARE_READ16_MEMBER(read_rom);
- UINT16* get_rom_base() { if (m_cart) { return m_cart->get_rom_base(); } else { return 0; } }
+ UINT16* get_rom_base() { if (m_cart) { return m_cart->get_rom_base(); } else { return nullptr; } }
UINT32 get_rom_size() { if (m_cart) { return m_cart->get_rom_size(); } else { return 0; } }
- UINT8* get_fixed_base() { if (m_cart) { return m_cart->get_fixed_base(); } else { return 0; } }
+ UINT8* get_fixed_base() { if (m_cart) { return m_cart->get_fixed_base(); } else { return nullptr; } }
UINT32 get_fixed_size() { if (m_cart) { return m_cart->get_fixed_size(); } else { return 0; } }
- UINT8* get_sprites_base() { if (m_cart) { return m_cart->get_sprites_base(); } else { return 0; } }
+ UINT8* get_sprites_base() { if (m_cart) { return m_cart->get_sprites_base(); } else { return nullptr; } }
UINT32 get_sprites_size() { if (m_cart) { return m_cart->get_sprites_size(); } else { return 0; } }
- UINT8* get_sprites_optimized() { if (m_cart) { return m_cart->get_sprites_optimized(); } else { return 0; } }
+ UINT8* get_sprites_optimized() { if (m_cart) { return m_cart->get_sprites_optimized(); } else { return nullptr; } }
UINT32 get_sprites_addrmask() { if (m_cart) { return m_cart->get_sprites_addrmask(); } else { return 0; } }
- UINT8* get_audio_base() { if (m_cart) { return m_cart->get_audio_base(); } else { return 0; } }
+ UINT8* get_audio_base() { if (m_cart) { return m_cart->get_audio_base(); } else { return nullptr; } }
UINT32 get_audio_size() { if (m_cart) { return m_cart->get_audio_size(); } else { return 0; } }
- UINT8* get_ym_base() { if (m_cart) { return m_cart->get_ym_base(); } else { return 0; } }
+ UINT8* get_ym_base() { if (m_cart) { return m_cart->get_ym_base(); } else { return nullptr; } }
UINT32 get_ym_size() { if (m_cart) { return m_cart->get_ym_size(); } else { return 0; } }
- UINT8* get_ymdelta_base() { if (m_cart) { return m_cart->get_ymdelta_base(); } else { return 0; } }
+ UINT8* get_ymdelta_base() { if (m_cart) { return m_cart->get_ymdelta_base(); } else { return nullptr; } }
UINT32 get_ymdelta_size() { if (m_cart) { return m_cart->get_ymdelta_size(); } else { return 0; } }
int get_fixed_bank_type(void) { if (m_cart) { return m_cart->get_fixed_bank_type(); } else { return 0; } }
diff --git a/src/devices/bus/neogeo/pcm2_prot.cpp b/src/devices/bus/neogeo/pcm2_prot.cpp
index 6ee156712e9..64159ff4185 100644
--- a/src/devices/bus/neogeo/pcm2_prot.cpp
+++ b/src/devices/bus/neogeo/pcm2_prot.cpp
@@ -38,7 +38,7 @@ void pcm2_prot_device::neo_pcm2_snk_1999(UINT8* ymrom, UINT32 ymsize, int value)
int size = ymsize;
int i, j;
- if( rom != NULL )
+ if( rom != nullptr )
{ /* swap address lines on the whole ROMs */
std::vector<UINT16> buffer(value / 2);
diff --git a/src/devices/bus/neogeo/pvc_prot.cpp b/src/devices/bus/neogeo/pvc_prot.cpp
index bd428c5a99d..bef53153a5f 100644
--- a/src/devices/bus/neogeo/pvc_prot.cpp
+++ b/src/devices/bus/neogeo/pvc_prot.cpp
@@ -12,7 +12,7 @@ extern const device_type PVC_PROT = &device_creator<pvc_prot_device>;
pvc_prot_device::pvc_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, PVC_PROT, "NeoGeo Protection (PVC)", tag, owner, clock, "pvc_prot", __FILE__),
- m_bankdev(NULL)
+ m_bankdev(nullptr)
{
}
diff --git a/src/devices/bus/neogeo/sbp_prot.cpp b/src/devices/bus/neogeo/sbp_prot.cpp
index 944ff13180e..b913eba75d9 100644
--- a/src/devices/bus/neogeo/sbp_prot.cpp
+++ b/src/devices/bus/neogeo/sbp_prot.cpp
@@ -12,7 +12,7 @@ extern const device_type SBP_PROT = &device_creator<sbp_prot_device>;
sbp_prot_device::sbp_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SBP_PROT, "NeoGeo Protection (Super Bubble Pop)", tag, owner, clock, "sbp_prot", __FILE__),
- m_mainrom(NULL)
+ m_mainrom(nullptr)
{
}
diff --git a/src/devices/bus/neogeo/sma_prot.cpp b/src/devices/bus/neogeo/sma_prot.cpp
index 2da33721d67..1c91212c416 100644
--- a/src/devices/bus/neogeo/sma_prot.cpp
+++ b/src/devices/bus/neogeo/sma_prot.cpp
@@ -10,7 +10,7 @@ extern const device_type SMA_PROT = &device_creator<sma_prot_device>;
sma_prot_device::sma_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SMA_PROT, "NeoGeo SMA Cartridge", tag, owner, clock, "sma_prot", __FILE__),
- m_bankdev(NULL),
+ m_bankdev(nullptr),
m_sma_rng(0)
{
}
diff --git a/src/devices/bus/nes/aladdin.cpp b/src/devices/bus/nes/aladdin.cpp
index 2b2621a2aa6..3022bd49f0a 100644
--- a/src/devices/bus/nes/aladdin.cpp
+++ b/src/devices/bus/nes/aladdin.cpp
@@ -40,7 +40,7 @@
aladdin_cart_interface::aladdin_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),
m_lobank(0),
m_hibank(0),
@@ -102,7 +102,7 @@ bool nes_aladdin_slot_device::call_load()
if (!ROM)
return IMAGE_INIT_FAIL;
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
if (length() != 0x20010 && length() != 0x40010)
return IMAGE_INIT_FAIL;
diff --git a/src/devices/bus/nes/aladdin.h b/src/devices/bus/nes/aladdin.h
index 18bcf988a1b..d6334276d27 100644
--- a/src/devices/bus/nes/aladdin.h
+++ b/src/devices/bus/nes/aladdin.h
@@ -62,7 +62,7 @@ public:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "ade_cart"; }
virtual const char *file_extensions() const { return "nes,bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/nes/datach.cpp b/src/devices/bus/nes/datach.cpp
index 01b454646ba..e0629f74fd3 100644
--- a/src/devices/bus/nes/datach.cpp
+++ b/src/devices/bus/nes/datach.cpp
@@ -102,7 +102,7 @@ bool nes_datach_slot_device::call_load()
return IMAGE_INIT_FAIL;
// Existing Datach carts are all 256K, so we only load files of this size
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
if (length() != 0x40000 && length() != 0x40010)
return IMAGE_INIT_FAIL;
diff --git a/src/devices/bus/nes/datach.h b/src/devices/bus/nes/datach.h
index b804c079a6f..cde1ac3ffb5 100644
--- a/src/devices/bus/nes/datach.h
+++ b/src/devices/bus/nes/datach.h
@@ -64,7 +64,7 @@ public:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "datach_cart"; }
virtual const char *file_extensions() const { return "nes,bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/nes/disksys.cpp b/src/devices/bus/nes/disksys.cpp
index 2637a731683..e89429dc0c4 100644
--- a/src/devices/bus/nes/disksys.cpp
+++ b/src/devices/bus/nes/disksys.cpp
@@ -105,7 +105,7 @@ const device_type NES_DISKSYS = &device_creator<nes_disksys_device>;
nes_disksys_device::nes_disksys_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: nes_nrom_device(mconfig, NES_DISKSYS, "FC RAM Expansion + Disk System PCB", tag, owner, clock, "fc_disksys", __FILE__), m_2c33_rom(nullptr),
- m_fds_data(NULL),
+ m_fds_data(nullptr),
m_disk(*this, FLOPPY_0), irq_timer(nullptr), m_irq_count(0), m_irq_count_latch(0), m_irq_enable(0), m_irq_transfer(0), m_fds_motor_on(0), m_fds_door_closed(0), m_fds_current_side(0), m_fds_head_position(0), m_fds_status0(0), m_read_mode(0), m_drive_ready(0),
m_fds_sides(0), m_fds_last_side(0), m_fds_count(0)
{
diff --git a/src/devices/bus/nes/ggenie.cpp b/src/devices/bus/nes/ggenie.cpp
index 7c26eadf700..148b9b568ac 100644
--- a/src/devices/bus/nes/ggenie.cpp
+++ b/src/devices/bus/nes/ggenie.cpp
@@ -259,7 +259,7 @@ READ8_MEMBER(nes_ggenie_device::nt_r)
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( sub_slot )
- MCFG_NES_CARTRIDGE_ADD("gg_slot", nes_cart, NULL)
+ MCFG_NES_CARTRIDGE_ADD("gg_slot", nes_cart, nullptr)
MCFG_NES_CARTRIDGE_NOT_MANDATORY
MACHINE_CONFIG_END
diff --git a/src/devices/bus/nes/jaleco.cpp b/src/devices/bus/nes/jaleco.cpp
index b400f6bd07a..13be40eac4c 100644
--- a/src/devices/bus/nes/jaleco.cpp
+++ b/src/devices/bus/nes/jaleco.cpp
@@ -620,7 +620,7 @@ static const char *const jf13_sample_names[] =
"13", // ??
"14", // (bat hits the ball)
"15", // (crowd)
- 0
+ nullptr
};
static const char *const jf17_sample_names[] =
@@ -646,7 +646,7 @@ static const char *const jf17_sample_names[] =
"17", // ??
"18", // (ball hits player)
"19", // NOT EXISTING?
- 0
+ nullptr
};
static const char *const jf19_sample_names[] =
@@ -672,7 +672,7 @@ static const char *const jf19_sample_names[] =
"17", // (catcher obtains the ball)
"18", // (pitcher obtains the ball)
"19", // (crowd)
- 0
+ nullptr
};
static const char *const jf23_sample_names[] =
@@ -698,7 +698,7 @@ static const char *const jf23_sample_names[] =
"17", // fair
"18", // (catcher obtains the ball, alt)
"19", // (crowd)
- 0
+ nullptr
};
static const char *const jf24_sample_names[] =
@@ -710,7 +710,7 @@ static const char *const jf24_sample_names[] =
"03", // Matta Nashi
"04", // Nokotta Nokotta
"05", // Matta Arimasen
- 0
+ nullptr
};
static const char *const jf29_sample_names[] =
@@ -736,7 +736,7 @@ static const char *const jf29_sample_names[] =
"17", // (catcher obtains the ball)
"18", // (catcher obtains the ball, alt 2)
"19", // (crowd)
- 0
+ nullptr
};
static const char *const jf33_sample_names[] =
@@ -762,7 +762,7 @@ static const char *const jf33_sample_names[] =
"17", // (catcher obtains the ball, alt)
"18", // ??
"19", // (crowd)
- 0
+ nullptr
};
//-------------------------------------------------
diff --git a/src/devices/bus/nes/karastudio.cpp b/src/devices/bus/nes/karastudio.cpp
index f6a1cb73dd7..9342f18dd40 100644
--- a/src/devices/bus/nes/karastudio.cpp
+++ b/src/devices/bus/nes/karastudio.cpp
@@ -106,7 +106,7 @@ bool nes_kstudio_slot_device::call_load()
return IMAGE_INIT_FAIL;
// Existing exapnsion carts are all 128K, so we only load files of this size
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
if (length() != 0x20000)
return IMAGE_INIT_FAIL;
diff --git a/src/devices/bus/nes/karastudio.h b/src/devices/bus/nes/karastudio.h
index b0b671e0034..00ad8aa4f86 100644
--- a/src/devices/bus/nes/karastudio.h
+++ b/src/devices/bus/nes/karastudio.h
@@ -61,7 +61,7 @@ public:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "ks_cart"; }
virtual const char *file_extensions() const { return "bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/nes/mmc5.cpp b/src/devices/bus/nes/mmc5.cpp
index c3a82e02c8e..4fcc50282d3 100644
--- a/src/devices/bus/nes/mmc5.cpp
+++ b/src/devices/bus/nes/mmc5.cpp
@@ -122,8 +122,8 @@ void nes_exrom_device::pcb_reset()
m_ex1_bank = 0;
m_vcount = 0;
- for (int i = 0; i < 12; i++)
- m_vrom_bank[i] = 0x3ff;
+ for (auto & elem : m_vrom_bank)
+ elem = 0x3ff;
m_prg_regs[0] = 0xfc;
m_prg_regs[1] = 0xfd;
diff --git a/src/devices/bus/nes/nes_ines.inc b/src/devices/bus/nes/nes_ines.inc
index ceb9581b82f..c8a495c11fc 100644
--- a/src/devices/bus/nes/nes_ines.inc
+++ b/src/devices/bus/nes/nes_ines.inc
@@ -299,7 +299,7 @@ const nes_mmc *nes_mapper_lookup( int mapper )
return &mmc_list[i];
}
- return NULL;
+ return nullptr;
}
#if 0
@@ -325,7 +325,7 @@ int nes_get_mmc_id( running_machine &machine, int mapper )
void ines_mapr_setup( int mapper, int *pcb_id )
{
const nes_mmc *mmc = nes_mapper_lookup(mapper);
- if (mmc == NULL)
+ if (mmc == nullptr)
fatalerror("Unimplemented Mapper %d\n", mapper);
*pcb_id = mmc->pcb_id;
diff --git a/src/devices/bus/nes/nes_pcb.inc b/src/devices/bus/nes/nes_pcb.inc
index 57cdf3d498c..b7af5aeefd4 100644
--- a/src/devices/bus/nes/nes_pcb.inc
+++ b/src/devices/bus/nes/nes_pcb.inc
@@ -325,29 +325,29 @@ static const nes_pcb pcb_list[] =
static const nes_pcb *nes_pcb_lookup( const char *slot )
{
- for (int i = 0; i < ARRAY_LENGTH(pcb_list); i++)
+ for (auto & elem : pcb_list)
{
- if (!core_stricmp(pcb_list[i].slot_opt, slot))
- return &pcb_list[i];
+ if (!core_stricmp(elem.slot_opt, slot))
+ return &elem;
}
- return NULL;
+ return nullptr;
}
static const nes_pcb *nes_id_lookup( int id )
{
- for (int i = 0; i < ARRAY_LENGTH(pcb_list); i++)
+ for (auto & elem : pcb_list)
{
- if (pcb_list[i].pcb_id == id)
- return &pcb_list[i];
+ if (elem.pcb_id == id)
+ return &elem;
}
- return NULL;
+ return nullptr;
}
int nes_cart_slot_device::nes_get_pcb_id( const char *slot )
{
const nes_pcb *pcb = nes_pcb_lookup(slot);
- if (pcb == NULL)
+ if (pcb == nullptr)
fatalerror("Unimplemented PCB type %s\n", slot);
return pcb->pcb_id;
@@ -358,7 +358,7 @@ const char * nes_cart_slot_device::nes_get_slot( int pcb_id )
{
const nes_pcb *pcb = nes_id_lookup(pcb_id);
- if (pcb == NULL)
+ if (pcb == nullptr)
fatalerror("Unimplemented PCB ID %d\n", pcb_id);
return pcb->slot_opt;
@@ -404,14 +404,14 @@ static const struct nes_cart_lines nes_cart_lines_table[] =
{ "CHR A16", 16 },
{ "CHR A17", 17 },
{ "NC", 127 },
- { 0 }
+ { nullptr }
};
static int nes_cart_get_line( const char *feature )
{
const struct nes_cart_lines *nes_line = &nes_cart_lines_table[0];
- if (feature == NULL)
+ if (feature == nullptr)
return 128;
while (nes_line->tag)
@@ -447,10 +447,10 @@ void nes_cart_slot_device::call_load_pcb()
m_pcb_id = NO_BOARD;
// SETUP step 3: storing the info needed for emulation
- if (get_software_region("bwram") != NULL)
+ if (get_software_region("bwram") != nullptr)
battery_size = get_software_region_length("bwram");
- if (get_software_region("wram") != NULL)
+ if (get_software_region("wram") != nullptr)
prgram_size = get_software_region_length("wram");
if (get_feature("mirroring"))
@@ -487,12 +487,12 @@ void nes_cart_slot_device::call_load_pcb()
{
int mask = 0, state = 0;
- if (get_feature("chr-pin26") != NULL)
+ if (get_feature("chr-pin26") != nullptr)
{
mask |= 0x01;
state |= !strcmp(get_feature("chr-pin26"), "CE") ? 0x01 : 0;
}
- if (get_feature("chr-pin27") != NULL)
+ if (get_feature("chr-pin27") != nullptr)
{
mask |= 0x02;
state |= !strcmp(get_feature("chr-pin27"), "CE") ? 0x02 : 0;
@@ -501,7 +501,7 @@ void nes_cart_slot_device::call_load_pcb()
m_cart->set_ce(mask, state);
}
- if (m_pcb_id == TAITO_X1_005 && get_feature("x1-pin17") != NULL && get_feature("x1-pin31") != NULL)
+ if (m_pcb_id == TAITO_X1_005 && get_feature("x1-pin17") != nullptr && get_feature("x1-pin31") != nullptr)
{
if (!strcmp(get_feature("x1-pin17"), "CIRAM A10") && !strcmp(get_feature("x1-pin31"), "NC"))
m_cart->set_x1_005_alt(TRUE);
diff --git a/src/devices/bus/nes/nes_slot.cpp b/src/devices/bus/nes/nes_slot.cpp
index f537f978561..7a4065a6d80 100644
--- a/src/devices/bus/nes/nes_slot.cpp
+++ b/src/devices/bus/nes/nes_slot.cpp
@@ -106,12 +106,12 @@ const device_type NES_CART_SLOT = &device_creator<nes_cart_slot_device>;
device_nes_cart_interface::device_nes_cart_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device),
- m_prg(NULL),
- m_vrom(NULL),
- m_ciram(NULL),
+ m_prg(nullptr),
+ m_vrom(nullptr),
+ m_ciram(nullptr),
m_prg_size(0),
m_vrom_size(0), m_maincpu(nullptr),
- m_mapper_sram(NULL),
+ m_mapper_sram(nullptr),
m_mapper_sram_size(0),
m_ce_mask(0),
m_ce_state(0),
@@ -148,7 +148,7 @@ device_nes_cart_interface::~device_nes_cart_interface()
void device_nes_cart_interface::prg_alloc(size_t size, const char *tag)
{
- if (m_prg == NULL)
+ if (m_prg == nullptr)
{
m_prg = device().machine().memory().region_alloc(std::string(tag).append(NESSLOT_PRGROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_prg_size = size;
@@ -215,7 +215,7 @@ void device_nes_cart_interface::prg_alloc(size_t size, const char *tag)
void device_nes_cart_interface::vrom_alloc(size_t size, const char *tag)
{
- if (m_vrom == NULL)
+ if (m_vrom == nullptr)
{
std::string tempstring(tag);
tempstring.append(NESSLOT_CHRROM_REGION_TAG);
@@ -371,7 +371,7 @@ inline void device_nes_cart_interface::chr_sanity_check( int source )
if (source == CHRRAM && m_vram.empty())
fatalerror("CHRRAM bankswitch with no VRAM\n");
- if (source == CHRROM && m_vrom == NULL)
+ if (source == CHRROM && m_vrom == nullptr)
fatalerror("CHRROM bankswitch with no VROM\n");
}
@@ -492,7 +492,7 @@ void device_nes_cart_interface::set_nt_page(int page, int source, int bank, int
break;
case EXRAM:
case MMC5FILL:
- base_ptr = NULL;
+ base_ptr = nullptr;
break;
case CIRAM:
default:
@@ -833,7 +833,7 @@ bool nes_cart_slot_device::call_load()
{
if (m_cart)
{
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
char magic[4];
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index f959465af33..070d9e23110 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -359,7 +359,7 @@ public:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "nes_cart"; }
virtual const char *file_extensions() const { return "nes,unf,unif"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual device_image_partialhash_func get_partial_hash() const { return &nes_partialhash; }
// slot interface overrides
diff --git a/src/devices/bus/nes/nes_unif.inc b/src/devices/bus/nes/nes_unif.inc
index b501c590159..4379c9d7602 100644
--- a/src/devices/bus/nes/nes_unif.inc
+++ b/src/devices/bus/nes/nes_unif.inc
@@ -153,7 +153,7 @@ const unif *nes_unif_lookup( const char *board )
if (!core_stricmp(unif_list[i].board, board))
return &unif_list[i];
}
- return NULL;
+ return nullptr;
}
/*************************************************************
@@ -168,7 +168,7 @@ const unif *nes_unif_lookup( const char *board )
void unif_mapr_setup( const char *board, int *pcb_id, int *battery, int *prgram, int *vram_chunks )
{
const unif *unif_board = nes_unif_lookup(board);
- if (unif_board == NULL)
+ if (unif_board == nullptr)
fatalerror("Unknown UNIF board %s.\n", board);
*pcb_id = unif_board->board_idx;
diff --git a/src/devices/bus/nes/pt554.cpp b/src/devices/bus/nes/pt554.cpp
index 4f6e843d8d1..c9fec996e8e 100644
--- a/src/devices/bus/nes/pt554.cpp
+++ b/src/devices/bus/nes/pt554.cpp
@@ -79,7 +79,7 @@ static const char *const pt554_sample_names[] =
"05",
"06",
"07",
- 0
+ nullptr
};
//-------------------------------------------------
diff --git a/src/devices/bus/nes/sunsoft_dcs.cpp b/src/devices/bus/nes/sunsoft_dcs.cpp
index 84f7af38883..8be24a9c66d 100644
--- a/src/devices/bus/nes/sunsoft_dcs.cpp
+++ b/src/devices/bus/nes/sunsoft_dcs.cpp
@@ -36,7 +36,7 @@
ntb_cart_interface::ntb_cart_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device),
- m_rom(NULL)
+ m_rom(nullptr)
{
}
@@ -85,7 +85,7 @@ bool nes_ntb_slot_device::call_load()
if (!ROM)
return IMAGE_INIT_FAIL;
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
if (length() != 0x4000)
return IMAGE_INIT_FAIL;
diff --git a/src/devices/bus/nes/sunsoft_dcs.h b/src/devices/bus/nes/sunsoft_dcs.h
index 67fcaf83b1e..bd3ecf88bf2 100644
--- a/src/devices/bus/nes/sunsoft_dcs.h
+++ b/src/devices/bus/nes/sunsoft_dcs.h
@@ -58,7 +58,7 @@ public:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "ntb_cart"; }
virtual const char *file_extensions() const { return "bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/nes_ctrl/joypad.cpp b/src/devices/bus/nes_ctrl/joypad.cpp
index b0c9617cec6..7a78d08f2c7 100644
--- a/src/devices/bus/nes_ctrl/joypad.cpp
+++ b/src/devices/bus/nes_ctrl/joypad.cpp
@@ -149,7 +149,7 @@ SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( arcstick )
// expansion port to allow daisy chaining
- MCFG_FC_EXPANSION_PORT_ADD("subexp", arcstick_daisy, NULL)
+ MCFG_FC_EXPANSION_PORT_ADD("subexp", arcstick_daisy, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/nubus/nubus_48gc.cpp b/src/devices/bus/nubus/nubus_48gc.cpp
index 2a8cb829bb9..2021def0a5d 100644
--- a/src/devices/bus/nubus/nubus_48gc.cpp
+++ b/src/devices/bus/nubus/nubus_48gc.cpp
@@ -118,8 +118,8 @@ void jmfb_device::device_start()
m_nubus->install_device(slotspace+0x200000, slotspace+0x2003ff, read32_delegate(FUNC(jmfb_device::mac_48gc_r), this), write32_delegate(FUNC(jmfb_device::mac_48gc_w), this));
- m_timer = timer_alloc(0, NULL);
- m_screen = NULL; // can we look this up now?
+ m_timer = timer_alloc(0, nullptr);
+ m_screen = nullptr; // can we look this up now?
}
//-------------------------------------------------
diff --git a/src/devices/bus/nubus/nubus_image.cpp b/src/devices/bus/nubus/nubus_image.cpp
index 3ce468de2fe..5fbcb292948 100644
--- a/src/devices/bus/nubus/nubus_image.cpp
+++ b/src/devices/bus/nubus/nubus_image.cpp
@@ -44,9 +44,9 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "img"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -86,7 +86,7 @@ void messimg_disk_image_device::device_config_complete()
void messimg_disk_image_device::device_start()
{
- m_data = (UINT8 *)NULL;
+ m_data = (UINT8 *)nullptr;
if (exists() && fseek(0, SEEK_END) == 0)
{
@@ -215,8 +215,8 @@ void nubus_image_device::device_start()
filectx.curdir[0] = '.';
filectx.curdir[1] = '\0';
- filectx.dirp = NULL;
- filectx.fd = NULL;
+ filectx.dirp = nullptr;
+ filectx.fd = nullptr;
}
//-------------------------------------------------
@@ -271,7 +271,7 @@ READ32_MEMBER( nubus_image_device::image_super_r )
WRITE32_MEMBER( nubus_image_device::file_cmd_w )
{
- const osd_directory_entry *dp = NULL;
+ const osd_directory_entry *dp = nullptr;
char fullpath[1024];
UINT64 filesize;
@@ -335,7 +335,7 @@ WRITE32_MEMBER( nubus_image_device::file_data_w )
UINT32 actualcount = 0;
data = ((data & 0xff) << 24) | ((data & 0xff00) << 8) | ((data & 0xff0000) >> 8) | ((data & 0xff000000) >> 24);
- if(filectx.fd != NULL) {
+ if(filectx.fd != nullptr) {
//data = ni_ntohl(data);
if((filectx.bytecount + count) > filectx.filelen) count = filectx.filelen - filectx.bytecount;
osd_write(filectx.fd, &data, filectx.bytecount, count, &actualcount);
@@ -343,21 +343,21 @@ WRITE32_MEMBER( nubus_image_device::file_data_w )
if(filectx.bytecount >= filectx.filelen) {
osd_close(filectx.fd);
- filectx.fd = NULL;
+ filectx.fd = nullptr;
}
}
}
READ32_MEMBER( nubus_image_device::file_data_r )
{
- if(filectx.fd != NULL) {
+ if(filectx.fd != nullptr) {
UINT32 ret;
UINT32 actual = 0;
osd_read(filectx.fd, &ret, filectx.bytecount, sizeof(ret), &actual);
filectx.bytecount += actual;
if(actual < sizeof(ret)) {
osd_close(filectx.fd);
- filectx.fd = NULL;
+ filectx.fd = nullptr;
}
return ni_htonl(ret);
}
diff --git a/src/devices/bus/nubus/nubus_m2hires.cpp b/src/devices/bus/nubus/nubus_m2hires.cpp
index 1d2598a927b..3cf9e5abead 100644
--- a/src/devices/bus/nubus/nubus_m2hires.cpp
+++ b/src/devices/bus/nubus/nubus_m2hires.cpp
@@ -106,7 +106,7 @@ void nubus_m2hires_device::device_start()
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2hires_device::vram_r), this), write32_delegate(FUNC(nubus_m2hires_device::vram_w), this));
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2hires_device::m2hires_r), this), write32_delegate(FUNC(nubus_m2hires_device::m2hires_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
diff --git a/src/devices/bus/nubus/nubus_m2video.cpp b/src/devices/bus/nubus/nubus_m2video.cpp
index 5bb8cfad09c..ec4b7fb6d4c 100644
--- a/src/devices/bus/nubus/nubus_m2video.cpp
+++ b/src/devices/bus/nubus/nubus_m2video.cpp
@@ -107,7 +107,7 @@ void nubus_m2video_device::device_start()
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_m2video_device::vram_r), this), write32_delegate(FUNC(nubus_m2video_device::vram_w), this));
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_m2video_device::m2video_r), this), write32_delegate(FUNC(nubus_m2video_device::m2video_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
diff --git a/src/devices/bus/nubus/nubus_radiustpd.cpp b/src/devices/bus/nubus/nubus_radiustpd.cpp
index 23a43f7caeb..84188fd215e 100644
--- a/src/devices/bus/nubus/nubus_radiustpd.cpp
+++ b/src/devices/bus/nubus/nubus_radiustpd.cpp
@@ -107,7 +107,7 @@ void nubus_radiustpd_device::device_start()
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this));
m_nubus->install_device(slotspace+0x980000, slotspace+0x9effff, read32_delegate(FUNC(nubus_radiustpd_device::radiustpd_r), this), write32_delegate(FUNC(nubus_radiustpd_device::radiustpd_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
diff --git a/src/devices/bus/nubus/nubus_spec8.cpp b/src/devices/bus/nubus/nubus_spec8.cpp
index 31c058651d6..8b2651bcff8 100644
--- a/src/devices/bus/nubus/nubus_spec8.cpp
+++ b/src/devices/bus/nubus/nubus_spec8.cpp
@@ -107,7 +107,7 @@ void nubus_spec8s3_device::device_start()
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_spec8s3_device::vram_r), this), write32_delegate(FUNC(nubus_spec8s3_device::vram_w), this));
m_nubus->install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(FUNC(nubus_spec8s3_device::spec8s3_r), this), write32_delegate(FUNC(nubus_spec8s3_device::spec8s3_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(767, 0), 0);
}
diff --git a/src/devices/bus/nubus/nubus_specpdq.cpp b/src/devices/bus/nubus/nubus_specpdq.cpp
index 39a4cfe4c44..d67ac04ef31 100644
--- a/src/devices/bus/nubus/nubus_specpdq.cpp
+++ b/src/devices/bus/nubus/nubus_specpdq.cpp
@@ -123,7 +123,7 @@ void nubus_specpdq_device::device_start()
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_specpdq_device::vram_r), this), write32_delegate(FUNC(nubus_specpdq_device::vram_w), this));
m_nubus->install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(FUNC(nubus_specpdq_device::specpdq_r), this), write32_delegate(FUNC(nubus_specpdq_device::specpdq_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(843, 0), 0);
}
diff --git a/src/devices/bus/nubus/nubus_wsportrait.cpp b/src/devices/bus/nubus/nubus_wsportrait.cpp
index c634ab6e000..3fe0e4c3ec0 100644
--- a/src/devices/bus/nubus/nubus_wsportrait.cpp
+++ b/src/devices/bus/nubus/nubus_wsportrait.cpp
@@ -109,7 +109,7 @@ void nubus_wsportrait_device::device_start()
m_nubus->install_device(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, read32_delegate(FUNC(nubus_wsportrait_device::vram_r), this), write32_delegate(FUNC(nubus_wsportrait_device::vram_w), this));
m_nubus->install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(FUNC(nubus_wsportrait_device::wsportrait_r), this), write32_delegate(FUNC(nubus_wsportrait_device::wsportrait_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(869, 0), 0);
}
diff --git a/src/devices/bus/nubus/pds30_30hr.cpp b/src/devices/bus/nubus/pds30_30hr.cpp
index 4e94539a88b..eb5550cb64e 100644
--- a/src/devices/bus/nubus/pds30_30hr.cpp
+++ b/src/devices/bus/nubus/pds30_30hr.cpp
@@ -108,7 +108,7 @@ void nubus_xceed30hr_device::device_start()
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceed30hr_device::vram_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::vram_w), this));
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_r), this), write32_delegate(FUNC(nubus_xceed30hr_device::xceed30hr_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
diff --git a/src/devices/bus/nubus/pds30_cb264.cpp b/src/devices/bus/nubus/pds30_cb264.cpp
index be87de6ba85..b5c10671aea 100644
--- a/src/devices/bus/nubus/pds30_cb264.cpp
+++ b/src/devices/bus/nubus/pds30_cb264.cpp
@@ -101,7 +101,7 @@ void nubus_cb264se30_device::device_start()
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_cb264se30_device::vram_r), this), write32_delegate(FUNC(nubus_cb264se30_device::vram_w), this));
m_nubus->install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(FUNC(nubus_cb264se30_device::cb264se30_r), this), write32_delegate(FUNC(nubus_cb264se30_device::cb264se30_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
diff --git a/src/devices/bus/nubus/pds30_mc30.cpp b/src/devices/bus/nubus/pds30_mc30.cpp
index b330b52df4e..4c0e6999541 100644
--- a/src/devices/bus/nubus/pds30_mc30.cpp
+++ b/src/devices/bus/nubus/pds30_mc30.cpp
@@ -104,7 +104,7 @@ void nubus_xceedmc30_device::device_start()
m_nubus->install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(FUNC(nubus_xceedmc30_device::vram_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::vram_w), this));
m_nubus->install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_r), this), write32_delegate(FUNC(nubus_xceedmc30_device::xceedmc30_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
diff --git a/src/devices/bus/nubus/pds30_procolor816.cpp b/src/devices/bus/nubus/pds30_procolor816.cpp
index 8cc136e5a53..bb995682381 100644
--- a/src/devices/bus/nubus/pds30_procolor816.cpp
+++ b/src/devices/bus/nubus/pds30_procolor816.cpp
@@ -108,7 +108,7 @@ void nubus_procolor816_device::device_start()
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_procolor816_device::vram_r), this), write32_delegate(FUNC(nubus_procolor816_device::vram_w), this));
m_nubus->install_device(slotspace+0xf00000, slotspace+0xff7fff, read32_delegate(FUNC(nubus_procolor816_device::procolor816_r), this), write32_delegate(FUNC(nubus_procolor816_device::procolor816_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(479, 0), 0);
}
diff --git a/src/devices/bus/nubus/pds30_sigmalview.cpp b/src/devices/bus/nubus/pds30_sigmalview.cpp
index f85ffb1c074..88eab2ffdcb 100644
--- a/src/devices/bus/nubus/pds30_sigmalview.cpp
+++ b/src/devices/bus/nubus/pds30_sigmalview.cpp
@@ -102,7 +102,7 @@ void nubus_lview_device::device_start()
m_nubus->install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(FUNC(nubus_lview_device::vram_r), this), write32_delegate(FUNC(nubus_lview_device::vram_w), this));
m_nubus->install_device(slotspace+0xb0000, slotspace+0xbffff, read32_delegate(FUNC(nubus_lview_device::lview_r), this), write32_delegate(FUNC(nubus_lview_device::lview_w), this));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(m_screen->time_until_pos(599, 0), 0);
}
diff --git a/src/devices/bus/odyssey2/slot.cpp b/src/devices/bus/odyssey2/slot.cpp
index caf68a0d4e2..e4d3f4c8d3c 100644
--- a/src/devices/bus/odyssey2/slot.cpp
+++ b/src/devices/bus/odyssey2/slot.cpp
@@ -27,7 +27,7 @@ const device_type O2_CART_SLOT = &device_creator<o2_cart_slot_device>;
device_o2_cart_interface::device_o2_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_o2_cart_interface::~device_o2_cart_interface()
void device_o2_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(O2SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -133,10 +133,10 @@ static const o2_slot slot_list[] =
static int o2_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -144,10 +144,10 @@ static int o2_get_pcb_id(const char *slot)
static const char *o2_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "o2_rom";
@@ -162,15 +162,15 @@ bool o2_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
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);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
m_type = O2_STD;
if (size == 12288)
diff --git a/src/devices/bus/odyssey2/slot.h b/src/devices/bus/odyssey2/slot.h
index a5cebb9ed0d..c1b29ab7d7b 100644
--- a/src/devices/bus/odyssey2/slot.h
+++ b/src/devices/bus/odyssey2/slot.h
@@ -79,7 +79,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "odyssey_cart"; }
virtual const char *file_extensions() const { return "bin,rom"; }
diff --git a/src/devices/bus/odyssey2/voice.cpp b/src/devices/bus/odyssey2/voice.cpp
index e94b3bd1432..338b8053f64 100644
--- a/src/devices/bus/odyssey2/voice.cpp
+++ b/src/devices/bus/odyssey2/voice.cpp
@@ -49,7 +49,7 @@ static MACHINE_CONFIG_FRAGMENT( o2voice )
// The Voice uses a speaker with its own volume control so the relative volumes to use are subjective, these sound good
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- MCFG_O2_CARTRIDGE_ADD("subslot", o2_cart, NULL)
+ MCFG_O2_CARTRIDGE_ADD("subslot", o2_cart, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/oricext/jasmin.cpp b/src/devices/bus/oricext/jasmin.cpp
index 106979a0581..9b4b0b35f0e 100644
--- a/src/devices/bus/oricext/jasmin.cpp
+++ b/src/devices/bus/oricext/jasmin.cpp
@@ -23,9 +23,9 @@ static MACHINE_CONFIG_FRAGMENT( jasmin )
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(oricext_device, irq_w))
MCFG_FLOPPY_DRIVE_ADD("fdc:0", jasmin_floppies, "3dsdd", jasmin_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", jasmin_floppies, NULL, jasmin_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:2", jasmin_floppies, NULL, jasmin_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:3", jasmin_floppies, NULL, jasmin_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:1", jasmin_floppies, nullptr, jasmin_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:2", jasmin_floppies, nullptr, jasmin_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:3", jasmin_floppies, nullptr, jasmin_device::floppy_formats)
MACHINE_CONFIG_END
INPUT_PORTS_START( jasmin )
@@ -70,8 +70,8 @@ void jasmin_device::device_reset()
side_sel = fdc_reset = ram_access = rom_access = false;
select[0] = select[1] = select[2] = select[3] = false;
remap();
- cur_floppy = NULL;
- fdc->set_floppy(NULL);
+ cur_floppy = nullptr;
+ fdc->set_floppy(nullptr);
}
const rom_entry *jasmin_device::device_rom_region() const
@@ -164,7 +164,7 @@ WRITE8_MEMBER(jasmin_device::rom_access_w)
WRITE8_MEMBER(jasmin_device::select_w)
{
select[offset] = data & 1;
- cur_floppy = NULL;
+ cur_floppy = nullptr;
for(int i=0; i != 4; i++)
if(select[i]) {
cur_floppy = floppies[i];
diff --git a/src/devices/bus/oricext/microdisc.cpp b/src/devices/bus/oricext/microdisc.cpp
index 26225b807c1..abb2ea138fd 100644
--- a/src/devices/bus/oricext/microdisc.cpp
+++ b/src/devices/bus/oricext/microdisc.cpp
@@ -26,9 +26,9 @@ static MACHINE_CONFIG_FRAGMENT( microdisc )
MCFG_WD_FDC_FORCE_READY
MCFG_FLOPPY_DRIVE_ADD("fdc:0", microdisc_floppies, "3dsdd", microdisc_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", microdisc_floppies, NULL, microdisc_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:2", microdisc_floppies, NULL, microdisc_device::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:3", microdisc_floppies, NULL, microdisc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:1", microdisc_floppies, nullptr, microdisc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:2", microdisc_floppies, nullptr, microdisc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:3", microdisc_floppies, nullptr, microdisc_device::floppy_formats)
MACHINE_CONFIG_END
DEVICE_ADDRESS_MAP_START(map, 8, microdisc_device)
diff --git a/src/devices/bus/oricext/oricext.cpp b/src/devices/bus/oricext/oricext.cpp
index 3034f0f6c6f..2c1894b385c 100644
--- a/src/devices/bus/oricext/oricext.cpp
+++ b/src/devices/bus/oricext/oricext.cpp
@@ -10,7 +10,7 @@ oricext_connector::oricext_connector(const machine_config &mconfig, const char *
device_t(mconfig, ORICEXT_CONNECTOR, "ORIC extension connector", tag, owner, clock, "oricext_connector", __FILE__),
device_slot_interface(mconfig, *this),
irq_handler(*this),
- cputag(NULL)
+ cputag(nullptr)
{
}
diff --git a/src/devices/bus/pc_joy/pc_joy_sw.cpp b/src/devices/bus/pc_joy/pc_joy_sw.cpp
index 69a3d5cd75e..4d826e9f62a 100644
--- a/src/devices/bus/pc_joy/pc_joy_sw.cpp
+++ b/src/devices/bus/pc_joy/pc_joy_sw.cpp
@@ -14,7 +14,7 @@ pc_mssw_pad_device::pc_mssw_pad_device(const machine_config& mconfig, const char
m_btn3(*this, "btn3"),
m_btn4(*this, "btn4"),
m_conf(*this, "CONFIG"),
- m_timer(NULL),
+ m_timer(nullptr),
m_count(0),
m_state(0),
m_active(false)
diff --git a/src/devices/bus/pc_kbd/pc_kbdc.cpp b/src/devices/bus/pc_kbd/pc_kbdc.cpp
index c579b05e6a0..9f920c6d5dd 100644
--- a/src/devices/bus/pc_kbd/pc_kbdc.cpp
+++ b/src/devices/bus/pc_kbd/pc_kbdc.cpp
@@ -78,7 +78,7 @@ pc_kbdc_device::pc_kbdc_device(const machine_config &mconfig, const char *tag, d
m_data_state(-1), m_mb_clock_state(0), m_mb_data_state(0),
m_kb_clock_state(1),
m_kb_data_state(1),
- m_keyboard( NULL )
+ m_keyboard( nullptr )
{
}
@@ -195,8 +195,8 @@ WRITE_LINE_MEMBER( pc_kbdc_device::data_write_from_kb )
device_pc_kbd_interface::device_pc_kbd_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device),
- m_pc_kbdc(NULL),
- m_pc_kbdc_tag(NULL), m_next(nullptr)
+ m_pc_kbdc(nullptr),
+ m_pc_kbdc_tag(nullptr), m_next(nullptr)
{
}
diff --git a/src/devices/bus/pce/pce_slot.cpp b/src/devices/bus/pce/pce_slot.cpp
index 6c706b97955..254993a4714 100644
--- a/src/devices/bus/pce/pce_slot.cpp
+++ b/src/devices/bus/pce/pce_slot.cpp
@@ -31,7 +31,7 @@ const device_type PCE_CART_SLOT = &device_creator<pce_cart_slot_device>;
device_pce_cart_interface::device_pce_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)
{
}
@@ -51,7 +51,7 @@ device_pce_cart_interface::~device_pce_cart_interface()
void device_pce_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(PCESLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -197,10 +197,10 @@ static const pce_slot slot_list[] =
static int pce_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -208,10 +208,10 @@ static int pce_get_pcb_id(const char *slot)
static const char *pce_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "rom";
@@ -227,11 +227,11 @@ bool pce_cart_slot_device::call_load()
if (m_cart)
{
UINT32 offset = 0;
- UINT32 len = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
UINT8 *ROM;
// From fullpath, check for presence of a header and skip it
- if (software_entry() == NULL && (len % 0x4000) == 512)
+ if (software_entry() == nullptr && (len % 0x4000) == 512)
{
logerror("Rom-header found, skipping\n");
offset = 512;
@@ -242,7 +242,7 @@ bool pce_cart_slot_device::call_load()
m_cart->rom_alloc(len, tag());
ROM = m_cart->get_rom_base();
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(ROM, len);
else
memcpy(ROM, get_software_region("rom"), len);
@@ -263,7 +263,7 @@ bool pce_cart_slot_device::call_load()
m_cart->rom_map_setup(len);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
m_type = get_cart_type(ROM, len);
else
{
diff --git a/src/devices/bus/pce/pce_slot.h b/src/devices/bus/pce/pce_slot.h
index e6968518b49..8fc691f6183 100644
--- a/src/devices/bus/pce/pce_slot.h
+++ b/src/devices/bus/pce/pce_slot.h
@@ -84,7 +84,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 1; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return m_interface; }
virtual const char *file_extensions() const { return "pce,bin"; }
diff --git a/src/devices/bus/pet/cass.cpp b/src/devices/bus/pet/cass.cpp
index a5d934cc082..cb715a18434 100644
--- a/src/devices/bus/pet/cass.cpp
+++ b/src/devices/bus/pet/cass.cpp
@@ -81,10 +81,10 @@ void pet_datassette_port_device::device_start()
}
-READ_LINE_MEMBER( pet_datassette_port_device::read ) { int state = 1; if (m_cart != NULL) state = m_cart->datassette_read(); return state; }
-WRITE_LINE_MEMBER( pet_datassette_port_device::write ) { if (m_cart != NULL) m_cart->datassette_write(state); }
-READ_LINE_MEMBER( pet_datassette_port_device::sense_r ) { int state = 1; if (m_cart != NULL) state = m_cart->datassette_sense(); return state; }
-WRITE_LINE_MEMBER( pet_datassette_port_device::motor_w ) { if (m_cart != NULL) m_cart->datassette_motor(state); }
+READ_LINE_MEMBER( pet_datassette_port_device::read ) { int state = 1; if (m_cart != nullptr) state = m_cart->datassette_read(); return state; }
+WRITE_LINE_MEMBER( pet_datassette_port_device::write ) { if (m_cart != nullptr) m_cart->datassette_write(state); }
+READ_LINE_MEMBER( pet_datassette_port_device::sense_r ) { int state = 1; if (m_cart != nullptr) state = m_cart->datassette_sense(); return state; }
+WRITE_LINE_MEMBER( pet_datassette_port_device::motor_w ) { if (m_cart != nullptr) m_cart->datassette_motor(state); }
WRITE_LINE_MEMBER( pet_datassette_port_device::read_w ) { m_read_handler(state); }
diff --git a/src/devices/bus/pet/exp.cpp b/src/devices/bus/pet/exp.cpp
index d68a39db82e..8a830a8af3a 100644
--- a/src/devices/bus/pet/exp.cpp
+++ b/src/devices/bus/pet/exp.cpp
@@ -92,7 +92,7 @@ void pet_expansion_slot_device::device_start()
void pet_expansion_slot_device::device_reset()
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
get_card_device()->reset();
}
@@ -115,7 +115,7 @@ int pet_expansion_slot_device::norom_r(address_space &space, offs_t offset, int
UINT8 pet_expansion_slot_device::read(address_space &space, offs_t offset, UINT8 data, int &sel)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->pet_bd_r(space, offset, data, sel);
}
@@ -130,7 +130,7 @@ UINT8 pet_expansion_slot_device::read(address_space &space, offs_t offset, UINT8
void pet_expansion_slot_device::write(address_space &space, offs_t offset, UINT8 data, int &sel)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->pet_bd_w(space, offset, data, sel);
}
diff --git a/src/devices/bus/pet/superpet.cpp b/src/devices/bus/pet/superpet.cpp
index 3c8b2f96742..592e50b8327 100644
--- a/src/devices/bus/pet/superpet.cpp
+++ b/src/devices/bus/pet/superpet.cpp
@@ -79,7 +79,7 @@ static MACHINE_CONFIG_FRAGMENT( superpet )
MCFG_MOS6551_IRQ_HANDLER(WRITELINE(superpet_device, acia_irq_w))
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
- 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(MOS6551_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551_TAG, mos6551_device, write_dsr))
diff --git a/src/devices/bus/pet/user.cpp b/src/devices/bus/pet/user.cpp
index b543777df63..f56132c5dd3 100644
--- a/src/devices/bus/pet/user.cpp
+++ b/src/devices/bus/pet/user.cpp
@@ -34,7 +34,7 @@ pet_user_port_device::pet_user_port_device(const machine_config &mconfig, const
m_k_handler(*this),
m_l_handler(*this),
m_m_handler(*this),
- m_card(NULL)
+ m_card(nullptr)
{
}
@@ -85,25 +85,25 @@ void pet_user_port_device::device_start()
m_m_handler(1);
}
-WRITE_LINE_MEMBER( pet_user_port_device::write_2 ) { if (m_card != NULL) m_card->input_2(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_3 ) { if (m_card != NULL) m_card->input_3(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_4 ) { if (m_card != NULL) m_card->input_4(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_5 ) { if (m_card != NULL) m_card->input_5(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_6 ) { if (m_card != NULL) m_card->input_6(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_7 ) { if (m_card != NULL) m_card->input_7(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_8 ) { if (m_card != NULL) m_card->input_8(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_9 ) { if (m_card != NULL) m_card->input_9(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_10 ) { if (m_card != NULL) m_card->input_10(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_b ) { if (m_card != NULL) m_card->input_b(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_c ) { if (m_card != NULL) m_card->input_c(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_d ) { if (m_card != NULL) m_card->input_d(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_e ) { if (m_card != NULL) m_card->input_e(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_f ) { if (m_card != NULL) m_card->input_f(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_h ) { if (m_card != NULL) m_card->input_h(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_j ) { if (m_card != NULL) m_card->input_j(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_k ) { if (m_card != NULL) m_card->input_k(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_l ) { if (m_card != NULL) m_card->input_l(state); }
-WRITE_LINE_MEMBER( pet_user_port_device::write_m ) { if (m_card != NULL) m_card->input_m(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_2 ) { if (m_card != nullptr) m_card->input_2(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_3 ) { if (m_card != nullptr) m_card->input_3(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_4 ) { if (m_card != nullptr) m_card->input_4(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_5 ) { if (m_card != nullptr) m_card->input_5(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_6 ) { if (m_card != nullptr) m_card->input_6(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_7 ) { if (m_card != nullptr) m_card->input_7(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_8 ) { if (m_card != nullptr) m_card->input_8(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_9 ) { if (m_card != nullptr) m_card->input_9(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_10 ) { if (m_card != nullptr) m_card->input_10(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_b ) { if (m_card != nullptr) m_card->input_b(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_c ) { if (m_card != nullptr) m_card->input_c(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_d ) { if (m_card != nullptr) m_card->input_d(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_e ) { if (m_card != nullptr) m_card->input_e(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_f ) { if (m_card != nullptr) m_card->input_f(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_h ) { if (m_card != nullptr) m_card->input_h(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_j ) { if (m_card != nullptr) m_card->input_j(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_k ) { if (m_card != nullptr) m_card->input_k(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_l ) { if (m_card != nullptr) m_card->input_l(state); }
+WRITE_LINE_MEMBER( pet_user_port_device::write_m ) { if (m_card != nullptr) m_card->input_m(state); }
// class device_pet_user_port_interface
diff --git a/src/devices/bus/plus4/exp.cpp b/src/devices/bus/plus4/exp.cpp
index 332fc22903b..5ea6289b2cc 100644
--- a/src/devices/bus/plus4/exp.cpp
+++ b/src/devices/bus/plus4/exp.cpp
@@ -124,7 +124,7 @@ bool plus4_expansion_slot_device::call_load()
{
if (m_card)
{
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
// TODO
}
@@ -169,7 +169,7 @@ void plus4_expansion_slot_device::get_default_card_software(std::string &result)
UINT8 plus4_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->plus4_cd_r(space, offset, data, ba, cs0, c1l, c1h, cs1, c2l, c2h);
}
@@ -184,7 +184,7 @@ UINT8 plus4_expansion_slot_device::cd_r(address_space &space, offs_t offset, UIN
void plus4_expansion_slot_device::cd_w(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->plus4_cd_w(space, offset, data, ba, cs0, c1l, c1h, cs1, c2l, c2h);
}
diff --git a/src/devices/bus/plus4/exp.h b/src/devices/bus/plus4/exp.h
index 0bd8e963cc6..d637b1b5ee2 100644
--- a/src/devices/bus/plus4/exp.h
+++ b/src/devices/bus/plus4/exp.h
@@ -132,7 +132,7 @@ protected:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "plus4_cart"; }
virtual const char *file_extensions() const { return "rom,bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/plus4/sid.cpp b/src/devices/bus/plus4/sid.cpp
index 57515474824..5e4ffb172b1 100644
--- a/src/devices/bus/plus4/sid.cpp
+++ b/src/devices/bus/plus4/sid.cpp
@@ -68,7 +68,7 @@ static MACHINE_CONFIG_FRAGMENT( plus4_sid )
MCFG_SOUND_ADD("dac", DAC, 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/psx/memcard.h b/src/devices/bus/psx/memcard.h
index 85b8d2fa4fd..88289c4ba4f 100644
--- a/src/devices/bus/psx/memcard.h
+++ b/src/devices/bus/psx/memcard.h
@@ -26,7 +26,7 @@ public:
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
virtual const char *file_extensions() const { return "mc"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual bool call_create(int format_type, option_resolution *format_options);
diff --git a/src/devices/bus/psx/multitap.cpp b/src/devices/bus/psx/multitap.cpp
index 8444e02c2fe..51cfd5948ab 100644
--- a/src/devices/bus/psx/multitap.cpp
+++ b/src/devices/bus/psx/multitap.cpp
@@ -22,9 +22,9 @@ psx_multitap_device::psx_multitap_device(const machine_config& mconfig, const ch
static MACHINE_CONFIG_FRAGMENT( psx_multitap )
MCFG_PSX_CTRL_PORT_ADD("a", psx_controllers_nomulti, "digital_pad")
- MCFG_PSX_CTRL_PORT_ADD("b", psx_controllers_nomulti, NULL)
- MCFG_PSX_CTRL_PORT_ADD("c", psx_controllers_nomulti, NULL)
- MCFG_PSX_CTRL_PORT_ADD("d", psx_controllers_nomulti, NULL)
+ MCFG_PSX_CTRL_PORT_ADD("b", psx_controllers_nomulti, nullptr)
+ MCFG_PSX_CTRL_PORT_ADD("c", psx_controllers_nomulti, nullptr)
+ MCFG_PSX_CTRL_PORT_ADD("d", psx_controllers_nomulti, nullptr)
MACHINE_CONFIG_END
machine_config_constructor psx_multitap_device::device_mconfig_additions() const
diff --git a/src/devices/bus/ql/cst_q_plus4.cpp b/src/devices/bus/ql/cst_q_plus4.cpp
index 76f5a046566..5b6d94f2a9d 100644
--- a/src/devices/bus/ql/cst_q_plus4.cpp
+++ b/src/devices/bus/ql/cst_q_plus4.cpp
@@ -52,16 +52,16 @@ const rom_entry *cst_q_plus4_t::device_rom_region() const
static MACHINE_CONFIG_FRAGMENT( cst_q_plus4 )
MCFG_DEVICE_ADD(MC6821_TAG, PIA6821, 0)
- MCFG_QL_EXPANSION_SLOT_ADD("exp1", ql_expansion_cards, NULL)
+ MCFG_QL_EXPANSION_SLOT_ADD("exp1", ql_expansion_cards, nullptr)
MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK(WRITELINE(cst_q_plus4_t, exp1_extintl_w))
- MCFG_QL_EXPANSION_SLOT_ADD("exp2", ql_expansion_cards, NULL)
+ MCFG_QL_EXPANSION_SLOT_ADD("exp2", ql_expansion_cards, nullptr)
MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK(WRITELINE(cst_q_plus4_t, exp2_extintl_w))
- MCFG_QL_EXPANSION_SLOT_ADD("exp3", ql_expansion_cards, NULL)
+ MCFG_QL_EXPANSION_SLOT_ADD("exp3", ql_expansion_cards, nullptr)
MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK(WRITELINE(cst_q_plus4_t, exp3_extintl_w))
- MCFG_QL_EXPANSION_SLOT_ADD("exp4", ql_expansion_cards, NULL)
+ MCFG_QL_EXPANSION_SLOT_ADD("exp4", ql_expansion_cards, nullptr)
MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK(WRITELINE(cst_q_plus4_t, exp4_extintl_w))
MACHINE_CONFIG_END
diff --git a/src/devices/bus/ql/qubide.cpp b/src/devices/bus/ql/qubide.cpp
index 7af6c6d6694..9241321bcac 100644
--- a/src/devices/bus/ql/qubide.cpp
+++ b/src/devices/bus/ql/qubide.cpp
@@ -92,7 +92,7 @@ const rom_entry *qubide_t::device_rom_region() const
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( qubide )
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, false)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/ql/rom.cpp b/src/devices/bus/ql/rom.cpp
index 53847b26ba0..6474957a7da 100644
--- a/src/devices/bus/ql/rom.cpp
+++ b/src/devices/bus/ql/rom.cpp
@@ -81,7 +81,7 @@ bool ql_rom_cartridge_slot_t::call_load()
{
size_t size = 0;
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
size = length();
diff --git a/src/devices/bus/ql/rom.h b/src/devices/bus/ql/rom.h
index a8b82d0dc57..b51e64e0b3a 100644
--- a/src/devices/bus/ql/rom.h
+++ b/src/devices/bus/ql/rom.h
@@ -107,7 +107,7 @@ protected:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "ql_cart"; }
virtual const char *file_extensions() const { return "rom,bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/ql/sandy_superdisk.cpp b/src/devices/bus/ql/sandy_superdisk.cpp
index 55db9141e2a..c4bdb1bfdf4 100644
--- a/src/devices/bus/ql/sandy_superdisk.cpp
+++ b/src/devices/bus/ql/sandy_superdisk.cpp
@@ -83,7 +83,7 @@ WRITE_LINE_MEMBER( sandy_super_disk_t::busy_w )
static MACHINE_CONFIG_FRAGMENT( sandy_super_disk )
MCFG_DEVICE_ADD(WD1772_TAG, WD1772, 8000000)
MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":0", sandy_super_disk_floppies, "35dd", sandy_super_disk_t::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":1", sandy_super_disk_floppies, NULL, sandy_super_disk_t::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":1", sandy_super_disk_floppies, nullptr, sandy_super_disk_t::floppy_formats)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(sandy_super_disk_t, busy_w))
@@ -144,7 +144,7 @@ void sandy_super_disk_t::device_start()
void sandy_super_disk_t::device_reset()
{
m_fdc->reset();
- m_fdc->set_floppy(NULL);
+ m_fdc->set_floppy(nullptr);
m_fdc->dden_w(0);
m_latch->write(0);
@@ -231,7 +231,7 @@ void sandy_super_disk_t::write(address_space &space, offs_t offset, UINT8 data)
*/
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 1))
{
diff --git a/src/devices/bus/ql/sandy_superqboard.cpp b/src/devices/bus/ql/sandy_superqboard.cpp
index 3e5558302db..37052242d08 100644
--- a/src/devices/bus/ql/sandy_superqboard.cpp
+++ b/src/devices/bus/ql/sandy_superqboard.cpp
@@ -104,7 +104,7 @@ WRITE_LINE_MEMBER( sandy_superqboard_t::busy_w )
static MACHINE_CONFIG_FRAGMENT( sandy_superqboard )
MCFG_DEVICE_ADD(WD1772_TAG, WD1772, XTAL_16MHz/2)
MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":0", sandy_superqboard_floppies, "35hd", sandy_superqboard_t::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":1", sandy_superqboard_floppies, NULL, sandy_superqboard_t::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":1", sandy_superqboard_floppies, nullptr, sandy_superqboard_t::floppy_formats)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(sandy_superqboard_t, busy_w))
@@ -281,7 +281,7 @@ void sandy_superqboard_t::device_start()
void sandy_superqboard_t::device_reset()
{
m_fdc->reset();
- m_fdc->set_floppy(NULL);
+ m_fdc->set_floppy(nullptr);
m_fdc->dden_w(0);
m_latch->write(0);
@@ -388,7 +388,7 @@ void sandy_superqboard_t::write(address_space &space, offs_t offset, UINT8 data)
*/
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 1))
{
diff --git a/src/devices/bus/ql/trumpcard.cpp b/src/devices/bus/ql/trumpcard.cpp
index 5ff2ad2091e..cd2a829c3b8 100644
--- a/src/devices/bus/ql/trumpcard.cpp
+++ b/src/devices/bus/ql/trumpcard.cpp
@@ -87,7 +87,7 @@ FLOPPY_FORMATS_END
static MACHINE_CONFIG_FRAGMENT( ql_trump_card )
MCFG_DEVICE_ADD(WD1772_TAG, WD1772, 8000000)
MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":0", ql_trump_card_floppies, "35dd", ql_trump_card_t::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":1", ql_trump_card_floppies, NULL, ql_trump_card_t::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG":1", ql_trump_card_floppies, nullptr, ql_trump_card_t::floppy_formats)
MACHINE_CONFIG_END
@@ -165,7 +165,7 @@ void ql_trump_card_t::device_start()
void ql_trump_card_t::device_reset()
{
- m_fdc->set_floppy(NULL);
+ m_fdc->set_floppy(nullptr);
m_fdc->dden_w(0);
m_rom_en = false;
@@ -253,7 +253,7 @@ void ql_trump_card_t::write(address_space &space, offs_t offset, UINT8 data)
*/
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 1))
{
diff --git a/src/devices/bus/rs232/null_modem.cpp b/src/devices/bus/rs232/null_modem.cpp
index e34cc1e7597..4c5d7417a8b 100644
--- a/src/devices/bus/rs232/null_modem.cpp
+++ b/src/devices/bus/rs232/null_modem.cpp
@@ -15,7 +15,7 @@ null_modem_device::null_modem_device(const machine_config &mconfig, const char *
m_rs232_stopbits(*this, "RS232_STOPBITS"),
m_input_count(0),
m_input_index(0),
- m_timer_poll(NULL)
+ m_timer_poll(nullptr)
{
}
diff --git a/src/devices/bus/rs232/pty.cpp b/src/devices/bus/rs232/pty.cpp
index c239a7dced8..3a525236128 100644
--- a/src/devices/bus/rs232/pty.cpp
+++ b/src/devices/bus/rs232/pty.cpp
@@ -19,7 +19,7 @@ pseudo_terminal_device::pseudo_terminal_device(const machine_config &mconfig, co
m_rs232_stopbits(*this, "RS232_STOPBITS"),
m_input_count(0),
m_input_index(0),
- m_timer_poll(NULL)
+ m_timer_poll(nullptr)
{
}
diff --git a/src/devices/bus/rs232/rs232.cpp b/src/devices/bus/rs232/rs232.cpp
index 4abceaff098..31d6310e2ad 100644
--- a/src/devices/bus/rs232/rs232.cpp
+++ b/src/devices/bus/rs232/rs232.cpp
@@ -17,7 +17,7 @@ rs232_port_device::rs232_port_device(const machine_config &mconfig, const char *
m_dsr_handler(*this),
m_ri_handler(*this),
m_cts_handler(*this),
- m_dev(NULL)
+ m_dev(nullptr)
{
}
@@ -34,7 +34,7 @@ rs232_port_device::rs232_port_device(const machine_config &mconfig, device_type
m_dsr_handler(*this),
m_ri_handler(*this),
m_cts_handler(*this),
- m_dev(NULL)
+ m_dev(nullptr)
{
}
diff --git a/src/devices/bus/s100/dj2db.cpp b/src/devices/bus/s100/dj2db.cpp
index f32d32e3eb2..ca144a8f82a 100644
--- a/src/devices/bus/s100/dj2db.cpp
+++ b/src/devices/bus/s100/dj2db.cpp
@@ -109,9 +109,9 @@ static MACHINE_CONFIG_FRAGMENT( s100_dj2db )
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(s100_dj2db_device, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":0", s100_dj2db_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":1", s100_dj2db_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":2", s100_dj2db_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":3", s100_dj2db_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":1", s100_dj2db_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":2", s100_dj2db_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8866_TAG":3", s100_dj2db_floppies, nullptr, floppy_image_device::default_floppy_formats)
MACHINE_CONFIG_END
@@ -259,7 +259,7 @@ s100_dj2db_device::s100_dj2db_device(const machine_config &mconfig, const char *
m_floppy1(*this, MB8866_TAG":1"),
m_floppy2(*this, MB8866_TAG":2"),
m_floppy3(*this, MB8866_TAG":3"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_rom(*this, "dj2db"),
m_ram(*this, "ram"),
m_j1a(*this, "J1A"),
@@ -417,7 +417,7 @@ void s100_dj2db_device::s100_mwrt_w(address_space &space, offs_t offset, UINT8 d
*/
// drive select
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
diff --git a/src/devices/bus/s100/wunderbus.cpp b/src/devices/bus/s100/wunderbus.cpp
index 7e06af8a26b..efa739c0742 100644
--- a/src/devices/bus/s100/wunderbus.cpp
+++ b/src/devices/bus/s100/wunderbus.cpp
@@ -111,14 +111,14 @@ static MACHINE_CONFIG_FRAGMENT( s100_wunderbus )
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(INS8250_1_TAG, ins8250_uart_device, cts_w))
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal)
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, dsr_w))
MCFG_RS232_RI_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, ri_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(INS8250_2_TAG, ins8250_uart_device, cts_w))
- MCFG_RS232_PORT_ADD(RS232_C_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_C_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_3_TAG, ins8250_uart_device, dsr_w))
diff --git a/src/devices/bus/saturn/sat_slot.cpp b/src/devices/bus/saturn/sat_slot.cpp
index 7588348ed71..7e1f0cd1233 100644
--- a/src/devices/bus/saturn/sat_slot.cpp
+++ b/src/devices/bus/saturn/sat_slot.cpp
@@ -38,7 +38,7 @@ const device_type SATURN_CART_SLOT = &device_creator<sat_cart_slot_device>;
device_sat_cart_interface::device_sat_cart_interface(const machine_config &mconfig, device_t &device)
: device_slot_card_interface(mconfig, device), m_cart_type(0),
- m_rom(NULL),
+ m_rom(nullptr),
m_rom_size(0)
{
}
@@ -58,7 +58,7 @@ device_sat_cart_interface::~device_sat_cart_interface()
void device_sat_cart_interface::rom_alloc(UINT32 size, const char *tag)
{
- if (m_rom == NULL)
+ if (m_rom == nullptr)
{
m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(SATSLOT_ROM_REGION_TAG).c_str(), size, 4, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -149,18 +149,18 @@ bool sat_cart_slot_device::call_load()
{
if (m_cart)
{
- bool is_rom = ((software_entry() == NULL) || ((software_entry() != NULL) && get_software_region("rom")));
+ bool is_rom = ((software_entry() == nullptr) || ((software_entry() != nullptr) && get_software_region("rom")));
if (is_rom)
{
// from fullpath, only ROM carts
- UINT32 len = (software_entry() != NULL) ? get_software_region_length("rom") : length();
+ UINT32 len = (software_entry() != nullptr) ? get_software_region_length("rom") : length();
UINT32 *ROM;
m_cart->rom_alloc(len, tag());
ROM = m_cart->get_rom_base();
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
memcpy(ROM, get_software_region("rom"), len);
else
fread(ROM, len);
diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h
index 13b46c23374..a0b17e42ad0 100644
--- a/src/devices/bus/saturn/sat_slot.h
+++ b/src/devices/bus/saturn/sat_slot.h
@@ -84,7 +84,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "sat_cart"; }
virtual const char *file_extensions() const { return "bin"; }
diff --git a/src/devices/bus/scsi/scsi.cpp b/src/devices/bus/scsi/scsi.cpp
index ad94fd380fa..118e2d58114 100644
--- a/src/devices/bus/scsi/scsi.cpp
+++ b/src/devices/bus/scsi/scsi.cpp
@@ -95,7 +95,7 @@ void SCSI_PORT_DEVICE::device_start()
SCSI_PORT_SLOT_device *slot = subdevice<SCSI_PORT_SLOT_device>(deviceName[i]);
m_slot[i] = slot;
- if (slot != NULL)
+ if (slot != nullptr)
m_device_count = i + 1;
}
@@ -153,7 +153,7 @@ void SCSI_PORT_DEVICE::update_bsy()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_bsy(bsy);
}
}
@@ -175,7 +175,7 @@ void SCSI_PORT_DEVICE::update_sel()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_sel(sel);
}
}
@@ -197,7 +197,7 @@ void SCSI_PORT_DEVICE::update_cd()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_cd(cd);
}
}
@@ -219,7 +219,7 @@ void SCSI_PORT_DEVICE::update_io()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_io(io);
}
}
@@ -241,7 +241,7 @@ void SCSI_PORT_DEVICE::update_msg()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_msg(msg);
}
}
@@ -263,7 +263,7 @@ void SCSI_PORT_DEVICE::update_req()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_req(req);
}
}
@@ -285,7 +285,7 @@ void SCSI_PORT_DEVICE::update_ack()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_ack(ack);
}
}
@@ -307,7 +307,7 @@ void SCSI_PORT_DEVICE::update_atn()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_atn(atn);
}
}
@@ -329,7 +329,7 @@ void SCSI_PORT_DEVICE::update_rst()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_rst(rst);
}
}
@@ -351,7 +351,7 @@ void SCSI_PORT_DEVICE::update_data0()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_data0(data0);
}
}
@@ -373,7 +373,7 @@ void SCSI_PORT_DEVICE::update_data1()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_data1(data1);
}
}
@@ -395,7 +395,7 @@ void SCSI_PORT_DEVICE::update_data2()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_data2(data2);
}
}
@@ -417,7 +417,7 @@ void SCSI_PORT_DEVICE::update_data3()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_data3(data3);
}
}
@@ -439,7 +439,7 @@ void SCSI_PORT_DEVICE::update_data4()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_data4(data4);
}
}
@@ -461,7 +461,7 @@ void SCSI_PORT_DEVICE::update_data5()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_data5(data5);
}
}
@@ -483,7 +483,7 @@ void SCSI_PORT_DEVICE::update_data6()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_data6(data6);
}
}
@@ -505,7 +505,7 @@ void SCSI_PORT_DEVICE::update_data7()
for (int i = 0; i < m_device_count; i++)
{
scsi_port_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->input_data7(data7);
}
}
@@ -669,7 +669,7 @@ const device_type SCSI_PORT = &device_creator<SCSI_PORT_DEVICE>;
SCSI_PORT_SLOT_device::SCSI_PORT_SLOT_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, SCSI_PORT_SLOT, "SCSI Connector", tag, owner, clock, "scsi_slot", __FILE__),
device_slot_interface(mconfig, *this),
- m_dev(NULL),
+ m_dev(nullptr),
m_bsy(0),
m_sel(0),
m_cd(0),
diff --git a/src/devices/bus/scsi/scsihle.cpp b/src/devices/bus/scsi/scsihle.cpp
index 43b8fb04100..e14d875881f 100644
--- a/src/devices/bus/scsi/scsihle.cpp
+++ b/src/devices/bus/scsi/scsihle.cpp
@@ -14,9 +14,9 @@ scsihle_device::scsihle_device(const machine_config &mconfig, device_type type,
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
scsi_port_interface(mconfig, *this),
m_scsi_id(*this, "SCSI_ID"),
- req_timer(NULL),
- sel_timer(NULL),
- dataout_timer(NULL),
+ req_timer(nullptr),
+ sel_timer(nullptr),
+ dataout_timer(nullptr),
cmd_idx(0),
is_linked(0),
data_idx(0),
@@ -417,11 +417,11 @@ WRITE_LINE_MEMBER( scsihle_device::input_sel )
// only one line active.
if (scsibus_driveno(m_input_data) == scsiID)
{
- void *hdfile = NULL;
+ void *hdfile = nullptr;
// Check to see if device had image file mounted, if not, do not set busy,
// and stay busfree.
GetDevice(&hdfile);
- if (hdfile != NULL)
+ if (hdfile != nullptr)
{
if (!state)
{
diff --git a/src/devices/bus/scv/slot.cpp b/src/devices/bus/scv/slot.cpp
index bc72dcc4bfb..e29221b411a 100644
--- a/src/devices/bus/scv/slot.cpp
+++ b/src/devices/bus/scv/slot.cpp
@@ -27,7 +27,7 @@ const device_type SCV_CART_SLOT = &device_creator<scv_cart_slot_device>;
device_scv_cart_interface::device_scv_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_scv_cart_interface::~device_scv_cart_interface()
void device_scv_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(SCVSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -135,10 +135,10 @@ static const scv_slot slot_list[] =
static int scv_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -146,10 +146,10 @@ static int scv_get_pcb_id(const char *slot)
static const char *scv_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "rom8k";
@@ -165,8 +165,8 @@ bool scv_cart_slot_device::call_load()
if (m_cart)
{
UINT8 *ROM;
- UINT32 len = (software_entry() == NULL) ? length() : get_software_region_length("rom");
- bool has_ram = (software_entry() != NULL) && get_software_region("ram");
+ UINT32 len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
+ bool has_ram = (software_entry() != nullptr) && get_software_region("ram");
if (len > 0x20000)
{
@@ -180,12 +180,12 @@ bool scv_cart_slot_device::call_load()
ROM = m_cart->get_rom_base();
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(ROM, len);
else
memcpy(ROM, get_software_region("rom"), len);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
m_type = get_cart_type(ROM, len);
else
{
diff --git a/src/devices/bus/scv/slot.h b/src/devices/bus/scv/slot.h
index dea4af488fb..41dad59f49f 100644
--- a/src/devices/bus/scv/slot.h
+++ b/src/devices/bus/scv/slot.h
@@ -83,7 +83,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "scv_cart"; }
virtual const char *file_extensions() const { return "bin"; }
diff --git a/src/devices/bus/sega8/ccatch.cpp b/src/devices/bus/sega8/ccatch.cpp
index ec42d1304b4..5ec9295fdba 100644
--- a/src/devices/bus/sega8/ccatch.cpp
+++ b/src/devices/bus/sega8/ccatch.cpp
@@ -54,7 +54,7 @@ static SLOT_INTERFACE_START(sg1000_card)
SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( sub_slot )
- MCFG_SG1000_CARD_ADD("cardslot", sg1000_card, NULL)
+ MCFG_SG1000_CARD_ADD("cardslot", sg1000_card, nullptr)
MACHINE_CONFIG_END
machine_config_constructor sega8_cardcatch_device::device_mconfig_additions() const
diff --git a/src/devices/bus/sega8/mgear.cpp b/src/devices/bus/sega8/mgear.cpp
index 250eb58e13a..d6b8c91c6cf 100644
--- a/src/devices/bus/sega8/mgear.cpp
+++ b/src/devices/bus/sega8/mgear.cpp
@@ -37,7 +37,7 @@ void sega8_mgear_device::device_reset()
-------------------------------------------------*/
static MACHINE_CONFIG_FRAGMENT( sub_slot )
- MCFG_SMS_CARTRIDGE_ADD("subslot", sms_cart, NULL)
+ MCFG_SMS_CARTRIDGE_ADD("subslot", sms_cart, nullptr)
MACHINE_CONFIG_END
machine_config_constructor sega8_mgear_device::device_mconfig_additions() const
diff --git a/src/devices/bus/sega8/sega8_slot.cpp b/src/devices/bus/sega8/sega8_slot.cpp
index 29bf4f5ec2b..c88be013d3f 100644
--- a/src/devices/bus/sega8/sega8_slot.cpp
+++ b/src/devices/bus/sega8/sega8_slot.cpp
@@ -51,7 +51,7 @@ const device_type SEGA8_CARD_SLOT = &device_creator<sega8_card_slot_device>;
device_sega8_cart_interface::device_sega8_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),
m_rom_page_count(0),
has_battery(FALSE),
@@ -76,7 +76,7 @@ device_sega8_cart_interface::~device_sega8_cart_interface()
void device_sega8_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(S8SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -188,10 +188,10 @@ static const sega8_slot slot_list[] =
static int sega8_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -199,10 +199,10 @@ static int sega8_get_pcb_id(const char *slot)
static const char *sega8_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "rom";
@@ -270,7 +270,7 @@ void sega8_cart_slot_device::set_lphaser_xoffset( UINT8 *rom, int size )
void sega8_cart_slot_device::setup_ram()
{
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
if (m_type == SEGA8_CASTLE)
{
@@ -335,7 +335,7 @@ bool sega8_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 len = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
UINT32 offset = 0;
UINT8 *ROM;
@@ -359,7 +359,7 @@ bool sega8_cart_slot_device::call_load()
m_cart->rom_alloc(len, tag());
ROM = m_cart->get_rom_base();
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
fseek(offset, SEEK_SET);
fread(ROM, len);
@@ -371,7 +371,7 @@ bool sega8_cart_slot_device::call_load()
if (verify_cart(ROM, len) == IMAGE_VERIFY_FAIL)
logerror("Warning loading image: verify_cart failed\n");
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
m_type = sega8_get_pcb_id(get_feature("slot") ? get_feature("slot") : "rom");
else
m_type = get_cart_type(ROM, len);
@@ -381,7 +381,7 @@ bool sega8_cart_slot_device::call_load()
setup_ram();
// Check for gamegear cartridges with PIN 42 set to SMS mode
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
const char *pin_42 = get_feature("pin_42");
if (pin_42 && !strcmp(pin_42, "sms_mode"))
@@ -731,7 +731,7 @@ void sega8_cart_slot_device::internal_header_logging(UINT8 *ROM, UINT32 len, UIN
logerror("FILE DETAILS\n" );
logerror("============\n" );
logerror("Name: %s\n", basename());
- logerror("File Size: 0x%08x\n", (software_entry() == NULL) ? (int)length() : (int)get_software_region_length("rom"));
+ logerror("File Size: 0x%08x\n", (software_entry() == nullptr) ? (int)length() : (int)get_software_region_length("rom"));
logerror("Detected type: %s\n", sega8_get_slot(m_type));
logerror("ROM (Allocated) Size: 0x%X\n", len);
logerror("RAM: %s\n", nvram_len ? "Yes" : "No");
diff --git a/src/devices/bus/sega8/sega8_slot.h b/src/devices/bus/sega8/sega8_slot.h
index ac0fdd406cd..69c42e54a4f 100644
--- a/src/devices/bus/sega8/sega8_slot.h
+++ b/src/devices/bus/sega8/sega8_slot.h
@@ -135,7 +135,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return m_must_be_loaded; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return m_interface; }
virtual const char *file_extensions() const { return m_extensions; }
diff --git a/src/devices/bus/sms_exp/gender.cpp b/src/devices/bus/sms_exp/gender.cpp
index 4ef55b1ffe5..7ca7ff48a47 100644
--- a/src/devices/bus/sms_exp/gender.cpp
+++ b/src/devices/bus/sms_exp/gender.cpp
@@ -93,7 +93,7 @@ WRITE8_MEMBER(sms_gender_adapter_device::write_ram)
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( genderadp_slot )
- MCFG_SMS_CARTRIDGE_ADD("subslot", sms_cart, NULL)
+ MCFG_SMS_CARTRIDGE_ADD("subslot", sms_cart, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/snes/bsx.cpp b/src/devices/bus/snes/bsx.cpp
index 2ab77830b41..450bcadcbce 100644
--- a/src/devices/bus/snes/bsx.cpp
+++ b/src/devices/bus/snes/bsx.cpp
@@ -249,7 +249,7 @@ static SLOT_INTERFACE_START(bsx_cart)
SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( bs_slot )
- MCFG_SNS_BSX_CARTRIDGE_ADD("bs_slot", bsx_cart, NULL)
+ MCFG_SNS_BSX_CARTRIDGE_ADD("bs_slot", bsx_cart, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/snes/sdd1.cpp b/src/devices/bus/snes/sdd1.cpp
index ccfed10ebe1..56376641705 100644
--- a/src/devices/bus/snes/sdd1.cpp
+++ b/src/devices/bus/snes/sdd1.cpp
@@ -188,10 +188,10 @@ static const SDD1_PEM_state PEM_evolution_table[33] =
void SDD1_PEM::PEM_prepareDecomp()
{
- for (int i = 0; i < 32; i++)
+ for (auto & elem : m_contextInfo)
{
- m_contextInfo[i].status = 0;
- m_contextInfo[i].MPS = 0;
+ elem.status = 0;
+ elem.MPS = 0;
}
}
@@ -459,10 +459,10 @@ void sns_rom_sdd1_device::device_reset()
m_mmc[2] = 2 << 20;
m_mmc[3] = 3 << 20;
- for(int i = 0; i < 8; i++)
+ for(auto & elem : m_dma)
{
- m_dma[i].addr = 0;
- m_dma[i].size = 0;
+ elem.addr = 0;
+ elem.size = 0;
}
}
diff --git a/src/devices/bus/snes/sgb.cpp b/src/devices/bus/snes/sgb.cpp
index a9723009771..0c6abd79490 100644
--- a/src/devices/bus/snes/sgb.cpp
+++ b/src/devices/bus/snes/sgb.cpp
@@ -150,7 +150,7 @@ static MACHINE_CONFIG_FRAGMENT( supergb )
MCFG_SOUND_ADD("sgb_snd", GAMEBOY, 0)
- MCFG_GB_CARTRIDGE_ADD("gb_slot", supergb_cart, NULL)
+ MCFG_GB_CARTRIDGE_ADD("gb_slot", supergb_cart, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/snes/snes_slot.cpp b/src/devices/bus/snes/snes_slot.cpp
index f9cd16f4e7e..10add2da1cc 100644
--- a/src/devices/bus/snes/snes_slot.cpp
+++ b/src/devices/bus/snes/snes_slot.cpp
@@ -70,7 +70,7 @@ const device_type SNS_BSX_CART_SLOT = &device_creator<sns_bsx_cart_slot_device>;
device_sns_cart_interface::device_sns_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)
{
}
@@ -90,7 +90,7 @@ device_sns_cart_interface::~device_sns_cart_interface()
void device_sns_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(SNSSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -289,10 +289,10 @@ static const sns_slot slot_list[] =
static int sns_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -300,10 +300,10 @@ static int sns_get_pcb_id(const char *slot)
static const char *sns_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "lorom";
@@ -609,7 +609,7 @@ bool base_sns_cart_slot_device::call_load()
const char *slot_name;
/* Check for a header (512 bytes), and skip it if found */
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
UINT32 tmplen = length();
dynamic_buffer tmpROM(tmplen);
@@ -618,11 +618,11 @@ bool base_sns_cart_slot_device::call_load()
fseek(offset, SEEK_SET);
}
- len = (software_entry() == NULL) ? (length() - offset) : get_software_region_length("rom");
+ len = (software_entry() == nullptr) ? (length() - offset) : get_software_region_length("rom");
m_cart->rom_alloc(len, tag());
ROM = m_cart->get_rom_base();
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(ROM, len);
else
memcpy(ROM, get_software_region("rom"), len);
@@ -630,7 +630,7 @@ bool base_sns_cart_slot_device::call_load()
m_cart->rom_map_setup(len);
// check for on-cart CPU bios
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
if (get_software_region("addon"))
{
@@ -640,11 +640,11 @@ bool base_sns_cart_slot_device::call_load()
}
// get pcb type
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
get_cart_type_addon(ROM, len, m_type, m_addon);
else
{
- if ((slot_name = get_feature("slot")) == NULL)
+ if ((slot_name = get_feature("slot")) == nullptr)
m_type = SNES_MODE20;
else
m_type = sns_get_pcb_id(slot_name);
@@ -653,7 +653,7 @@ bool base_sns_cart_slot_device::call_load()
m_type = SNES_DSP_2MB;
}
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
setup_addon_from_fullpath();
// in carts with an add-on CPU having internal dump, this speeds up access to the internal rom
@@ -797,7 +797,7 @@ void base_sns_cart_slot_device::setup_addon_from_fullpath()
if (!m_cart->get_addon_bios_size())
{
std::string region = std::string(m_cart->device().tag()).append(":addon");
- UINT8 *ROM = NULL;
+ UINT8 *ROM = nullptr;
switch (m_addon)
{
@@ -845,7 +845,7 @@ void base_sns_cart_slot_device::setup_nvram()
{
UINT8 *ROM = (UINT8 *)m_cart->get_rom_base();
UINT32 size = 0;
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
int hilo_mode = snes_find_hilo_mode(this, ROM, m_cart->get_rom_size());
UINT8 sram_size = (m_type == SNES_SFX) ? (ROM[0x00ffbd] & 0x07) : (ROM[hilo_mode + 0x18] & 0x07);
diff --git a/src/devices/bus/snes/snes_slot.h b/src/devices/bus/snes/snes_slot.h
index a6fa076810f..ab52e105e96 100644
--- a/src/devices/bus/snes/snes_slot.h
+++ b/src/devices/bus/snes/snes_slot.h
@@ -177,7 +177,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 1; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/snes/spc7110.cpp b/src/devices/bus/snes/spc7110.cpp
index 156b26c0df4..a6ebbdab2df 100644
--- a/src/devices/bus/snes/spc7110.cpp
+++ b/src/devices/bus/snes/spc7110.cpp
@@ -389,10 +389,10 @@ void SPC7110_Decomp::init(running_machine &machine, UINT8 *ROM, UINT32 len, UINT
m_decomp_buffer_length = 0;
//reset context states
- for (int i = 0; i < 32; i++)
+ for (auto & elem : m_context)
{
- m_context[i].index = 0;
- m_context[i].invert = 0;
+ elem.index = 0;
+ elem.invert = 0;
}
switch (m_decomp_mode)
@@ -873,9 +873,9 @@ void SPC7110_Decomp::mode2(UINT8 init, UINT8 *ROM, UINT32 len)
if (m_m2_buffer_index == 16)
{
- for (int i = 0; i < 16; i++)
+ for (auto & elem : m_m2_bitplanebuffer)
{
- write(m_m2_bitplanebuffer[i]);
+ write(elem);
}
m_m2_buffer_index = 0;
}
diff --git a/src/devices/bus/snes/sufami.cpp b/src/devices/bus/snes/sufami.cpp
index 2cf4de90d6c..b6ac1b376d2 100644
--- a/src/devices/bus/snes/sufami.cpp
+++ b/src/devices/bus/snes/sufami.cpp
@@ -54,8 +54,8 @@ static SLOT_INTERFACE_START(sufamiturbo_cart)
SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( st_slot )
- MCFG_SNS_SUFAMI_CARTRIDGE_ADD("st_slot1", sufamiturbo_cart, NULL)
- MCFG_SNS_SUFAMI_CARTRIDGE_ADD("st_slot2", sufamiturbo_cart, NULL)
+ MCFG_SNS_SUFAMI_CARTRIDGE_ADD("st_slot1", sufamiturbo_cart, nullptr)
+ MCFG_SNS_SUFAMI_CARTRIDGE_ADD("st_slot2", sufamiturbo_cart, nullptr)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/ti99_peb/bwg.cpp b/src/devices/bus/ti99_peb/bwg.cpp
index 59119a1046c..cc1cedaf45b 100644
--- a/src/devices/bus/ti99_peb/bwg.cpp
+++ b/src/devices/bus/ti99_peb/bwg.cpp
@@ -345,10 +345,10 @@ READ8Z_MEMBER(snug_bwg_device::crureadz)
if ((offset & 0x00ff)==0)
{
// Check what drives are not connected
- reply = ((m_floppy[0] != NULL)? 0 : 0x02) // DSK1
- | ((m_floppy[1] != NULL)? 0 : 0x04) // DSK2
- | ((m_floppy[2] != NULL)? 0 : 0x08) // DSK3
- | ((m_floppy[3] != NULL)? 0 : 0x01); // DSK4
+ reply = ((m_floppy[0] != nullptr)? 0 : 0x02) // DSK1
+ | ((m_floppy[1] != nullptr)? 0 : 0x04) // DSK2
+ | ((m_floppy[2] != nullptr)? 0 : 0x08) // DSK3
+ | ((m_floppy[3] != nullptr)? 0 : 0x01); // DSK4
// DIP switches for step and date/time display
if (m_dip1 != 0) reply |= 0x10;
@@ -425,7 +425,7 @@ WRITE8_MEMBER(snug_bwg_device::cruwrite)
// Select side of disk (bit 7)
m_SIDSEL = (data==1)? ASSERT_LINE : CLEAR_LINE;
if (TRACE_CRU) logerror("bwg: set side (bit 7) = %d\n", data);
- if (m_current_floppy != NULL) m_current_floppy->ss_w(data);
+ if (m_current_floppy != nullptr) m_current_floppy->ss_w(data);
break;
case 8:
@@ -509,7 +509,7 @@ void snug_bwg_device::set_drive()
}
else
{
- m_current_floppy = NULL;
+ m_current_floppy = nullptr;
if (TRACE_CRU) logerror("bwg: All drives deselected\n");
}
m_wd1773->set_floppy(m_current_floppy);
@@ -547,8 +547,8 @@ void snug_bwg_device::set_floppy_motors_running(bool run)
m_wd1773->set_force_ready(run);
// Set all motors
- for (int i=0; i < 4; i++)
- if (m_floppy[i] != NULL) m_floppy[i]->mon_w((run)? 0 : 1);
+ for (auto & elem : m_floppy)
+ if (elem != nullptr) elem->mon_w((run)? 0 : 1);
// The motor-on line also connects to the wait state logic
operate_ready_line();
@@ -603,7 +603,7 @@ void snug_bwg_device::device_reset()
for (int i=0; i < 4; i++)
{
- if (m_floppy[i] != NULL)
+ if (m_floppy[i] != nullptr)
logerror("bwg: Connector %d with %s\n", i, m_floppy[i]->name());
else
logerror("bwg: Connector %d has no floppy attached\n", i);
@@ -621,14 +621,14 @@ void snug_bwg_device::device_reset()
void snug_bwg_device::device_config_complete()
{
- for (int i=0; i < 4; i++)
- m_floppy[i] = NULL;
+ for (auto & elem : m_floppy)
+ elem = nullptr;
// Seems to be null when doing a "-listslots"
- if (subdevice("0")!=NULL) m_floppy[0] = static_cast<floppy_image_device*>(subdevice("0")->first_subdevice());
- if (subdevice("1")!=NULL) m_floppy[1] = static_cast<floppy_image_device*>(subdevice("1")->first_subdevice());
- if (subdevice("2")!=NULL) m_floppy[2] = static_cast<floppy_image_device*>(subdevice("2")->first_subdevice());
- if (subdevice("3")!=NULL) m_floppy[3] = static_cast<floppy_image_device*>(subdevice("3")->first_subdevice());
+ if (subdevice("0")!=nullptr) m_floppy[0] = static_cast<floppy_image_device*>(subdevice("0")->first_subdevice());
+ if (subdevice("1")!=nullptr) m_floppy[1] = static_cast<floppy_image_device*>(subdevice("1")->first_subdevice());
+ if (subdevice("2")!=nullptr) m_floppy[2] = static_cast<floppy_image_device*>(subdevice("2")->first_subdevice());
+ if (subdevice("3")!=nullptr) m_floppy[3] = static_cast<floppy_image_device*>(subdevice("3")->first_subdevice());
}
INPUT_PORTS_START( bwg_fdc )
@@ -674,9 +674,9 @@ MACHINE_CONFIG_FRAGMENT( bwg_fdc )
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("1", bwg_floppies, "525dd", snug_bwg_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("2", bwg_floppies, NULL, snug_bwg_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("2", bwg_floppies, nullptr, snug_bwg_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("3", bwg_floppies, NULL, snug_bwg_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("3", bwg_floppies, nullptr, snug_bwg_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MACHINE_CONFIG_END
@@ -684,7 +684,7 @@ ROM_START( bwg_fdc )
ROM_REGION(0x8000, DSRROM, 0)
ROM_LOAD("bwg.bin", 0x0000, 0x8000, CRC(06f1ec89) SHA1(6ad77033ed268f986d9a5439e65f7d391c4b7651)) /* BwG disk DSR ROM */
ROM_REGION(0x0800, BUFFER, 0) /* BwG RAM buffer */
- ROM_FILL(0x0000, 0x0400, 0x00)
+ ROM_FILL(0x0000, 0x0400, nullptr)
ROM_END
machine_config_constructor snug_bwg_device::device_mconfig_additions() const
diff --git a/src/devices/bus/ti99_peb/hfdc.cpp b/src/devices/bus/ti99_peb/hfdc.cpp
index 4d14da46fc2..dddc49a4aeb 100644
--- a/src/devices/bus/ti99_peb/hfdc.cpp
+++ b/src/devices/bus/ti99_peb/hfdc.cpp
@@ -587,14 +587,14 @@ void myarc_hfdc_device::signal_drive_status()
reply |= 0x22;
// Check for TRK00*
- if ((m_current_floppy != NULL) && (!m_current_floppy->trk00_r()))
+ if ((m_current_floppy != nullptr) && (!m_current_floppy->trk00_r()))
reply |= HDC_DS_TRK00;
}
else
{
if ((m_output1_latch & 0xe0)!=0)
{
- if (m_current_harddisk != NULL)
+ if (m_current_harddisk != nullptr)
{
if (m_current_harddisk->ready_r()==ASSERT_LINE)
{
@@ -678,14 +678,14 @@ WRITE8_MEMBER( myarc_hfdc_device::auxbus_out )
m_output2_latch = data;
// Output the step pulse to the selected floppy drive
- if (m_current_floppy != NULL)
+ if (m_current_floppy != nullptr)
{
m_current_floppy->ss_w(data & 0x01);
m_current_floppy->dir_w((data & 0x20)==0);
m_current_floppy->stp_w((data & 0x10)==0);
}
- if (m_current_harddisk != NULL)
+ if (m_current_harddisk != nullptr)
{
// Dir = 0 -> outward
m_current_harddisk->direction_in_w((data & 0x20)? ASSERT_LINE : CLEAR_LINE);
@@ -722,7 +722,7 @@ void myarc_hfdc_device::connect_floppy_unit(int index)
// READY is asserted when DSKx = 1
// The controller fetches the state with the auxbus access
if (TRACE_LINES) logerror("%s: Connect index callback DSK%d\n", tag(), index+1);
- if (m_current_floppy != NULL)
+ if (m_current_floppy != nullptr)
m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(myarc_hfdc_device::floppy_index_callback), this));
else
logerror("%s: Connection to DSK%d failed because no drive is connected\n", tag(), index+1);
@@ -746,7 +746,7 @@ void myarc_hfdc_device::connect_harddisk_unit(int index)
m_current_harddisk = m_harddisk_unit[index];
if (TRACE_LINES) logerror("%s: Connect index callback WDS%d\n", tag(), index+1);
- if (m_current_harddisk != NULL)
+ if (m_current_harddisk != nullptr)
{
m_current_harddisk->setup_index_pulse_cb(mfm_harddisk_device::index_pulse_cb(FUNC(myarc_hfdc_device::harddisk_index_callback), this));
m_current_harddisk->setup_ready_cb(mfm_harddisk_device::ready_cb(FUNC(myarc_hfdc_device::harddisk_ready_callback), this));
@@ -765,21 +765,21 @@ void myarc_hfdc_device::disconnect_floppy_drives()
{
if (TRACE_LINES) logerror("%s: Unselect floppy drives\n", tag());
// Disconnect current floppy
- if (m_current_floppy != NULL)
+ if (m_current_floppy != nullptr)
{
m_current_floppy->setup_index_pulse_cb(floppy_image_device::index_pulse_cb());
- m_current_floppy = NULL;
+ m_current_floppy = nullptr;
}
}
void myarc_hfdc_device::disconnect_hard_drives()
{
if (TRACE_LINES) logerror("%s: Unselect hard drives\n", tag());
- if (m_current_harddisk != NULL)
+ if (m_current_harddisk != nullptr)
{
m_current_harddisk->setup_index_pulse_cb(mfm_harddisk_device::index_pulse_cb());
m_current_harddisk->setup_seek_complete_cb(mfm_harddisk_device::seek_complete_cb());
- m_current_harddisk = NULL;
+ m_current_harddisk = nullptr;
}
}
@@ -802,8 +802,8 @@ void myarc_hfdc_device::set_floppy_motors_running(bool run)
}
// Set all motors
- for (int i=0; i < 4; i++)
- if (m_floppy_unit[i] != NULL) m_floppy_unit[i]->mon_w((run)? 0 : 1);
+ for (auto & elem : m_floppy_unit)
+ if (elem != nullptr) elem->mon_w((run)? 0 : 1);
}
/*
@@ -871,8 +871,8 @@ void myarc_hfdc_device::device_start()
m_buffer_ram = memregion(BUFFER)->base();
m_motor_on_timer = timer_alloc(MOTOR_TIMER);
// The HFDC does not use READY; it has on-board RAM for DMA
- m_current_floppy = NULL;
- m_current_harddisk = NULL;
+ m_current_floppy = nullptr;
+ m_current_harddisk = nullptr;
}
void myarc_hfdc_device::device_reset()
@@ -913,7 +913,7 @@ void myarc_hfdc_device::device_reset()
for (int i=0; i < 4; i++)
{
- if (m_floppy_unit[i] != NULL)
+ if (m_floppy_unit[i] != nullptr)
logerror("%s: FD connector %d with %s\n", tag(), i+1, m_floppy_unit[i]->name());
else
logerror("%s: FD connector %d has no floppy attached\n", tag(), i+1);
@@ -921,7 +921,7 @@ void myarc_hfdc_device::device_reset()
for (int i=0; i < 3; i++)
{
- if (m_harddisk_unit[i] != NULL)
+ if (m_harddisk_unit[i] != nullptr)
logerror("%s: HD connector %d with %s\n", tag(), i+1, m_harddisk_unit[i]->name());
else
logerror("%s: HD connector %d has no drive attached\n", tag(), i+1);
@@ -936,13 +936,13 @@ void myarc_hfdc_device::device_config_complete()
{
for (int i=0; i < 3; i++)
{
- m_floppy_unit[i] = NULL;
- m_harddisk_unit[i] = NULL;
+ m_floppy_unit[i] = nullptr;
+ m_harddisk_unit[i] = nullptr;
}
- m_floppy_unit[3] = NULL;
+ m_floppy_unit[3] = nullptr;
// Seems to be null when doing a "-listslots"
- if (subdevice("f1")!=NULL)
+ if (subdevice("f1")!=nullptr)
{
m_floppy_unit[0] = static_cast<floppy_connector*>(subdevice("f1"))->get_device();
m_floppy_unit[1] = static_cast<floppy_connector*>(subdevice("f2"))->get_device();
@@ -1040,15 +1040,15 @@ MACHINE_CONFIG_FRAGMENT( ti99_hfdc )
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("f2", hfdc_floppies, "525dd", myarc_hfdc_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("f3", hfdc_floppies, NULL, myarc_hfdc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("f3", hfdc_floppies, nullptr, myarc_hfdc_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("f4", hfdc_floppies, NULL, myarc_hfdc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("f4", hfdc_floppies, nullptr, myarc_hfdc_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
// NB: Hard disks don't go without image (other than floppy drives)
- MCFG_MFM_HARDDISK_CONN_ADD("h1", hfdc_harddisks, NULL, MFM_BYTE, 3000, 20, MFMHD_GEN_FORMAT)
- MCFG_MFM_HARDDISK_CONN_ADD("h2", hfdc_harddisks, NULL, MFM_BYTE, 2000, 20, MFMHD_GEN_FORMAT)
- MCFG_MFM_HARDDISK_CONN_ADD("h3", hfdc_harddisks, NULL, MFM_BYTE, 2000, 20, MFMHD_GEN_FORMAT)
+ MCFG_MFM_HARDDISK_CONN_ADD("h1", hfdc_harddisks, nullptr, MFM_BYTE, 3000, 20, MFMHD_GEN_FORMAT)
+ MCFG_MFM_HARDDISK_CONN_ADD("h2", hfdc_harddisks, nullptr, MFM_BYTE, 2000, 20, MFMHD_GEN_FORMAT)
+ MCFG_MFM_HARDDISK_CONN_ADD("h3", hfdc_harddisks, nullptr, MFM_BYTE, 2000, 20, MFMHD_GEN_FORMAT)
MCFG_DEVICE_ADD(CLOCK_TAG, MM58274C, 0)
MCFG_MM58274C_MODE24(1) // 24 hour
@@ -1059,7 +1059,7 @@ ROM_START( ti99_hfdc )
ROM_REGION(0x4000, DSRROM, 0)
ROM_LOAD("hfdc.bin", 0x0000, 0x4000, CRC(66fbe0ed) SHA1(11df2ecef51de6f543e4eaf8b2529d3e65d0bd59)) /* HFDC disk DSR ROM */
ROM_REGION(0x8000, BUFFER, 0) /* HFDC RAM buffer 32 KiB */
- ROM_FILL(0x0000, 0x8000, 0x00)
+ ROM_FILL(0x0000, 0x8000, nullptr)
ROM_END
diff --git a/src/devices/bus/ti99_peb/horizon.cpp b/src/devices/bus/ti99_peb/horizon.cpp
index b44d009186c..42e12ab4c6c 100644
--- a/src/devices/bus/ti99_peb/horizon.cpp
+++ b/src/devices/bus/ti99_peb/horizon.cpp
@@ -432,9 +432,9 @@ INPUT_PORTS_END
ROM_START( horizon )
ROM_REGION(MAXRAM_SIZE, NVRAMREGION, 0)
- ROM_FILL(0x0000, MAXRAM_SIZE, 0x00)
+ ROM_FILL(0x0000, MAXRAM_SIZE, nullptr)
ROM_REGION(0x8000, RAMREGION, 0)
- ROM_FILL(0x0000, 0x8000, 0x00)
+ ROM_FILL(0x0000, 0x8000, nullptr)
ROM_END
const rom_entry *horizon_ramdisk_device::device_rom_region() const
diff --git a/src/devices/bus/ti99_peb/memex.cpp b/src/devices/bus/ti99_peb/memex.cpp
index 7fdf4dba607..4f1bbd56a0f 100644
--- a/src/devices/bus/ti99_peb/memex.cpp
+++ b/src/devices/bus/ti99_peb/memex.cpp
@@ -125,9 +125,9 @@ void geneve_memex_device::device_reset()
{
UINT8 dips = ioport("MEMEXDIPS")->read();
if (VERBOSE>5) LOG("geneve: memex dips = %02x\n", dips);
- for (int i=0; i < 8; i++)
+ for (auto & elem : m_dip_switch)
{
- m_dip_switch[i] = ((dips & 0x01)!=0x00);
+ elem = ((dips & 0x01)!=0x00);
dips = dips >> 1;
}
}
@@ -162,7 +162,7 @@ INPUT_PORTS_END
ROM_START( memex )
ROM_REGION(MEMEX_SIZE, RAMREGION, 0)
- ROM_FILL(0x000000, MEMEX_SIZE, 0x00)
+ ROM_FILL(0x000000, MEMEX_SIZE, nullptr)
ROM_END
ioport_constructor geneve_memex_device::device_input_ports() const
diff --git a/src/devices/bus/ti99_peb/myarcmem.cpp b/src/devices/bus/ti99_peb/myarcmem.cpp
index 159152ddef5..0fec80a4ca7 100644
--- a/src/devices/bus/ti99_peb/myarcmem.cpp
+++ b/src/devices/bus/ti99_peb/myarcmem.cpp
@@ -177,7 +177,7 @@ ROM_START( myarc_exp )
ROM_REGION(0x2000, DSRROM, 0)
ROM_LOAD("myarc512k_xb2.bin", 0x0000, 0x2000, CRC(41fbb96d) SHA1(4dc7fdfa46842957bcbb0cf2c37764e4bb6d877a)) /* DSR for Ramdisk etc. */
ROM_REGION(0x80000, RAMREGION, 0)
- ROM_FILL(0x0000, 0x80000, 0x00)
+ ROM_FILL(0x0000, 0x80000, nullptr)
ROM_END
void myarc_memory_expansion_device::device_start()
diff --git a/src/devices/bus/ti99_peb/pcode.cpp b/src/devices/bus/ti99_peb/pcode.cpp
index 9baff162ac7..e16baa7145c 100644
--- a/src/devices/bus/ti99_peb/pcode.cpp
+++ b/src/devices/bus/ti99_peb/pcode.cpp
@@ -107,7 +107,7 @@ READ8Z_MEMBER( ti_pcode_card_device::readz )
// GROM access
if ((offset & GROMMASK)==GROMREAD)
{
- for (int i=0; i < 8; i++) m_grom[i]->readz(space, offset, value, mem_mask);
+ for (auto & elem : m_grom) elem->readz(space, offset, value, mem_mask);
if (VERBOSE>5) LOG("ti99_pcode: read from grom %04x: %02x\n", offset&0xffff, *value);
}
else
@@ -148,7 +148,7 @@ WRITE8_MEMBER( ti_pcode_card_device::write )
// 0101 1111 1111 11x0
if ((offset & GROMMASK) == GROMWRITE)
{
- for (int i=0; i < 8; i++) m_grom[i]->write(space, offset, data, mem_mask);
+ for (auto & elem : m_grom) elem->write(space, offset, data, mem_mask);
}
}
}
diff --git a/src/devices/bus/ti99_peb/peribox.cpp b/src/devices/bus/ti99_peb/peribox.cpp
index 966f0221c4d..f91622742d1 100644
--- a/src/devices/bus/ti99_peb/peribox.cpp
+++ b/src/devices/bus/ti99_peb/peribox.cpp
@@ -222,7 +222,7 @@ peribox_device::peribox_device(const machine_config &mconfig, const char *tag, d
m_console_intb(*this),
m_datamux_ready(*this), m_inta_flag(0), m_intb_flag(0), m_ready_flag(0)
{
- for (int i=2; i <= 8; i++) m_slot[i] = NULL;
+ for (int i=2; i <= 8; i++) m_slot[i] = nullptr;
// The address prefix is actually created by the "Flex cable interface"
// which sits in slot 1.
m_address_prefix = 0x70000;
@@ -237,14 +237,14 @@ peribox_device::peribox_device(const machine_config &mconfig, device_type type,
m_console_intb(*this),
m_datamux_ready(*this), m_inta_flag(0), m_intb_flag(0), m_ready_flag(0), m_address_prefix(0)
{
- for (int i=2; i <= 8; i++) m_slot[i] = NULL;
+ for (int i=2; i <= 8; i++) m_slot[i] = nullptr;
}
READ8Z_MEMBER(peribox_device::readz)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=NULL) m_slot[i]->readz(space, offset | m_address_prefix, value, mem_mask);
+ if (m_slot[i]!=nullptr) m_slot[i]->readz(space, offset | m_address_prefix, value, mem_mask);
}
}
@@ -252,7 +252,7 @@ WRITE8_MEMBER(peribox_device::write)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=NULL) m_slot[i]->write(space, offset | m_address_prefix, data, mem_mask);
+ if (m_slot[i]!=nullptr) m_slot[i]->write(space, offset | m_address_prefix, data, mem_mask);
}
}
@@ -260,7 +260,7 @@ SETADDRESS_DBIN_MEMBER(peribox_device::setaddress_dbin)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=NULL) m_slot[i]->setaddress_dbin(space, offset | m_address_prefix, state);
+ if (m_slot[i]!=nullptr) m_slot[i]->setaddress_dbin(space, offset | m_address_prefix, state);
}
}
@@ -268,7 +268,7 @@ READ8Z_MEMBER(peribox_device::crureadz)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=NULL) m_slot[i]->crureadz(space, offset, value);
+ if (m_slot[i]!=nullptr) m_slot[i]->crureadz(space, offset, value);
}
}
@@ -276,7 +276,7 @@ WRITE8_MEMBER(peribox_device::cruwrite)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=NULL) m_slot[i]->cruwrite(space, offset, data);
+ if (m_slot[i]!=nullptr) m_slot[i]->cruwrite(space, offset, data);
}
}
@@ -288,7 +288,7 @@ WRITE_LINE_MEMBER(peribox_device::senila)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=NULL) m_slot[i]->senila(state);
+ if (m_slot[i]!=nullptr) m_slot[i]->senila(state);
}
}
@@ -296,7 +296,7 @@ WRITE_LINE_MEMBER(peribox_device::senilb)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=NULL) m_slot[i]->senilb(state);
+ if (m_slot[i]!=nullptr) m_slot[i]->senilb(state);
}
}
@@ -313,7 +313,7 @@ void peribox_device::set_genmod(bool set)
{
for (int i=2; i <= 8; i++)
{
- if (m_slot[i]!=NULL) m_slot[i]->set_genmod(set);
+ if (m_slot[i]!=nullptr) m_slot[i]->set_genmod(set);
}
}
@@ -381,7 +381,7 @@ void peribox_device::device_start(void)
logerror("%s: AMA/B/C address prefix set to %05x\n", tag(), m_address_prefix);
for (int i=2; i < 9; i++)
{
- logerror("%s: Slot %d = %s\n", tag(), i, (m_slot[i] != NULL)? m_slot[i]->m_card->tag() : "EMPTY");
+ logerror("%s: Slot %d = %s\n", tag(), i, (m_slot[i] != nullptr)? m_slot[i]->m_card->tag() : "EMPTY");
}
}
}
@@ -670,15 +670,15 @@ void peribox_slot_device::device_config_complete()
m_slotnumber = get_index_from_tagname();
device_t *carddev = first_subdevice();
peribox_device *peb = static_cast<peribox_device*>(owner());
- if (carddev != NULL)
+ if (carddev != nullptr)
{
peb->set_slot_loaded(m_slotnumber, this);
m_card = static_cast<ti_expansion_card_device*>(carddev);
}
else
{
- peb->set_slot_loaded(m_slotnumber, NULL);
- m_card = NULL;
+ peb->set_slot_loaded(m_slotnumber, nullptr);
+ m_card = nullptr;
}
}
diff --git a/src/devices/bus/ti99_peb/samsmem.cpp b/src/devices/bus/ti99_peb/samsmem.cpp
index 9c22aaa36d1..4f8cd48189c 100644
--- a/src/devices/bus/ti99_peb/samsmem.cpp
+++ b/src/devices/bus/ti99_peb/samsmem.cpp
@@ -107,7 +107,7 @@ WRITE8_MEMBER(sams_memory_expansion_device::cruwrite)
ROM_START( sams_card )
ROM_REGION(0x100000, RAMREGION, 0)
- ROM_FILL(0x0000, 0x100000, 0x00)
+ ROM_FILL(0x0000, 0x100000, nullptr)
ROM_END
void sams_memory_expansion_device::device_start()
@@ -122,7 +122,7 @@ void sams_memory_expansion_device::device_reset()
// Resetting values
m_map_mode = false;
m_access_mapper = false;
- for (int i=0; i < 16; i++) m_mapper[i] = 0;
+ for (auto & elem : m_mapper) elem = 0;
}
const rom_entry *sams_memory_expansion_device::device_rom_region() const
diff --git a/src/devices/bus/ti99_peb/ti_32kmem.cpp b/src/devices/bus/ti99_peb/ti_32kmem.cpp
index 9e4a2b82349..487847b82d8 100644
--- a/src/devices/bus/ti99_peb/ti_32kmem.cpp
+++ b/src/devices/bus/ti99_peb/ti_32kmem.cpp
@@ -107,7 +107,7 @@ void ti_32k_expcard_device::device_start(void)
ROM_START( ti_exp_32k )
ROM_REGION(0x8000, RAMREGION, 0)
- ROM_FILL(0x0000, 0x8000, 0x00)
+ ROM_FILL(0x0000, 0x8000, nullptr)
ROM_END
const rom_entry *ti_32k_expcard_device::device_rom_region() const
diff --git a/src/devices/bus/ti99_peb/ti_fdc.cpp b/src/devices/bus/ti99_peb/ti_fdc.cpp
index de7dab8148b..82585c424ce 100644
--- a/src/devices/bus/ti99_peb/ti_fdc.cpp
+++ b/src/devices/bus/ti99_peb/ti_fdc.cpp
@@ -258,7 +258,7 @@ WRITE8_MEMBER(ti_fdc_device::cruwrite)
// Select side of disk (bit 7)
m_SIDSEL = (data==1)? ASSERT_LINE : CLEAR_LINE;
if (TRACE_CRU) logerror("tifdc: set side (bit 7) = %d\n", data);
- if (m_current_floppy != NULL) m_current_floppy->ss_w(data);
+ if (m_current_floppy != nullptr) m_current_floppy->ss_w(data);
break;
default:
@@ -273,7 +273,7 @@ void ti_fdc_device::set_drive()
switch (m_DSEL)
{
case 0:
- m_current_floppy = NULL;
+ m_current_floppy = nullptr;
if (TRACE_CRU) logerror("tifdc: all drives deselected\n");
break;
case 1:
@@ -333,8 +333,8 @@ void ti_fdc_device::set_floppy_motors_running(bool run)
m_fd1771->set_force_ready(run);
// Set all motors
- for (int i=0; i < 3; i++)
- if (m_floppy[i] != NULL) m_floppy[i]->mon_w((run)? 0 : 1);
+ for (auto & elem : m_floppy)
+ if (elem != nullptr) elem->mon_w((run)? 0 : 1);
// The motor-on line also connects to the wait state logic
operate_ready_line();
@@ -378,7 +378,7 @@ void ti_fdc_device::device_reset()
for (int i=0; i < 3; i++)
{
- if (m_floppy[i] != NULL)
+ if (m_floppy[i] != nullptr)
logerror("tifdc: Connector %d with %s\n", i, m_floppy[i]->name());
else
logerror("tifdc: No floppy attached to connector %d\n", i);
@@ -390,9 +390,9 @@ void ti_fdc_device::device_reset()
void ti_fdc_device::device_config_complete()
{
// Seems to be null when doing a "-listslots"
- if (subdevice("0")!=NULL) m_floppy[0] = static_cast<floppy_image_device*>(subdevice("0")->first_subdevice());
- if (subdevice("1")!=NULL) m_floppy[1] = static_cast<floppy_image_device*>(subdevice("1")->first_subdevice());
- if (subdevice("2")!=NULL) m_floppy[2] = static_cast<floppy_image_device*>(subdevice("2")->first_subdevice());
+ if (subdevice("0")!=nullptr) m_floppy[0] = static_cast<floppy_image_device*>(subdevice("0")->first_subdevice());
+ if (subdevice("1")!=nullptr) m_floppy[1] = static_cast<floppy_image_device*>(subdevice("1")->first_subdevice());
+ if (subdevice("2")!=nullptr) m_floppy[2] = static_cast<floppy_image_device*>(subdevice("2")->first_subdevice());
}
FLOPPY_FORMATS_MEMBER(ti_fdc_device::floppy_formats)
@@ -412,7 +412,7 @@ MACHINE_CONFIG_FRAGMENT( ti_fdc )
MCFG_FLOPPY_DRIVE_SOUND(true)
MCFG_FLOPPY_DRIVE_ADD("1", tifdc_floppies, "525dd", ti_fdc_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("2", tifdc_floppies, NULL, ti_fdc_device::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("2", tifdc_floppies, nullptr, ti_fdc_device::floppy_formats)
MCFG_FLOPPY_DRIVE_SOUND(true)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/ti99_peb/ti_rs232.cpp b/src/devices/bus/ti99_peb/ti_rs232.cpp
index b55399e207a..af23d59a445 100644
--- a/src/devices/bus/ti99_peb/ti_rs232.cpp
+++ b/src/devices/bus/ti99_peb/ti_rs232.cpp
@@ -176,7 +176,7 @@ int ti_rs232_attached_device::get_index_from_tagname()
*/
bool ti_rs232_attached_device::call_load()
{
- tms9902_device* tms9902 = NULL;
+ tms9902_device* tms9902 = nullptr;
// ti_rs232_pio_device* card = static_cast<ti_rs232_pio_device*>(owner());
int devnumber = get_index_from_tagname();
@@ -206,7 +206,7 @@ bool ti_rs232_attached_device::call_load()
void ti_rs232_attached_device::call_unload()
{
- tms9902_device* tms9902 = NULL;
+ tms9902_device* tms9902 = nullptr;
int devnumber = get_index_from_tagname();
if (devnumber==0)
@@ -1032,8 +1032,8 @@ void ti_rs232_pio_device::device_start()
void ti_rs232_pio_device::device_stop()
{
- if (m_recvbuf[0] != NULL) global_free_array(m_recvbuf[0]);
- if (m_recvbuf[1] != NULL) global_free_array(m_recvbuf[1]);
+ if (m_recvbuf[0] != nullptr) global_free_array(m_recvbuf[0]);
+ if (m_recvbuf[1] != nullptr) global_free_array(m_recvbuf[1]);
}
void ti_rs232_pio_device::device_reset()
diff --git a/src/devices/bus/ti99_peb/ti_rs232.h b/src/devices/bus/ti99_peb/ti_rs232.h
index 7c75e208d65..516cd2cde1a 100644
--- a/src/devices/bus/ti99_peb/ti_rs232.h
+++ b/src/devices/bus/ti99_peb/ti_rs232.h
@@ -128,7 +128,7 @@ public:
bool is_reset_on_load() const { return false; }
const char *image_interface() const { return ""; }
const char *file_extensions() const { return ""; }
- const option_guide *create_option_guide() const { return NULL; }
+ const option_guide *create_option_guide() const { return nullptr; }
protected:
virtual void device_start(void);
@@ -156,7 +156,7 @@ public:
bool is_reset_on_load() const { return false; }
const char *image_interface() const { return ""; }
const char *file_extensions() const { return ""; }
- const option_guide *create_option_guide() const { return NULL; }
+ const option_guide *create_option_guide() const { return nullptr; }
protected:
virtual void device_start(void);
diff --git a/src/devices/bus/ti99_peb/tn_ide.cpp b/src/devices/bus/ti99_peb/tn_ide.cpp
index f9e16d8eef7..917eb6ff1c8 100644
--- a/src/devices/bus/ti99_peb/tn_ide.cpp
+++ b/src/devices/bus/ti99_peb/tn_ide.cpp
@@ -336,13 +336,13 @@ void nouspikel_ide_interface_device::device_reset()
MACHINE_CONFIG_FRAGMENT( tn_ide )
MCFG_DEVICE_ADD( "ide_rtc", RTC65271, 0 )
MCFG_RTC65271_INTERRUPT_CB(WRITELINE(nouspikel_ide_interface_device, clock_interrupt_callback))
- MCFG_ATA_INTERFACE_ADD( "ata", ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD( "ata", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(nouspikel_ide_interface_device, ide_interrupt_callback))
MACHINE_CONFIG_END
ROM_START( tn_ide )
ROM_REGION(0x80000, BUFFER_TAG, 0) /* RAM buffer 512 KiB */
- ROM_FILL(0x0000, 0x80000, 0x00)
+ ROM_FILL(0x0000, 0x80000, nullptr)
ROM_END
INPUT_PORTS_START( tn_ide )
diff --git a/src/devices/bus/ti99x/990_dk.cpp b/src/devices/bus/ti99x/990_dk.cpp
index 058d3f7665f..16fd5920d7c 100644
--- a/src/devices/bus/ti99x/990_dk.cpp
+++ b/src/devices/bus/ti99x/990_dk.cpp
@@ -874,12 +874,12 @@ void fd800_legacy_device::device_start(void)
logerror("fd800: start\n");
m_int_line.resolve();
- for (int i=0; i<MAX_FLOPPIES; i++)
+ for (auto & elem : m_drv)
{
// m_drv[i].img = floppy_get_device(machine(), i);
- m_drv[i].phys_cylinder = -1;
- m_drv[i].log_cylinder[0] = m_drv[i].log_cylinder[1] = -1;
- m_drv[i].seclen = 64;
+ elem.phys_cylinder = -1;
+ elem.log_cylinder[0] = elem.log_cylinder[1] = -1;
+ elem.seclen = 64;
}
}
diff --git a/src/devices/bus/ti99x/990_hd.cpp b/src/devices/bus/ti99x/990_hd.cpp
index fa0cd00646b..99ad509d39f 100644
--- a/src/devices/bus/ti99x/990_hd.cpp
+++ b/src/devices/bus/ti99x/990_hd.cpp
@@ -196,7 +196,7 @@ DEVICE_IMAGE_LOAD_MEMBER( ti990_hdc_device, ti990_hd )
/* set file descriptor */
d->format = format_old;
- d->hd_handle = NULL;
+ d->hd_handle = nullptr;
/* use custom image header. */
/* to convert old header-less images to this format, insert a 16-byte
@@ -220,7 +220,7 @@ DEVICE_IMAGE_LOAD_MEMBER( ti990_hdc_device, ti990_hd )
if (d->bytes_per_sector > MAX_SECTOR_SIZE)
{
d->format = format_mame;
- d->hd_handle = NULL;
+ d->hd_handle = nullptr;
d->wp = 1;
d->unsafe = 1;
return IMAGE_INIT_FAIL;
@@ -247,7 +247,7 @@ DEVICE_IMAGE_UNLOAD_MEMBER( ti990_hdc_device, ti990_hd )
d = &m_d[id];
d->format = format_mame; /* don't care */
- d->hd_handle = NULL;
+ d->hd_handle = nullptr;
d->wp = 1;
d->unsafe = 1;
@@ -265,7 +265,7 @@ int ti990_hdc_device::is_unit_loaded(int unit)
switch (m_d[unit].format)
{
case format_mame:
- reply = (m_d[unit].hd_handle != NULL);
+ reply = (m_d[unit].hd_handle != nullptr);
break;
case format_old:
@@ -995,7 +995,7 @@ void ti990_hdc_device::device_start()
for (i=0; i<MAX_DISK_UNIT; i++)
{
m_d[i].format = format_mame;
- m_d[i].hd_handle = NULL;
+ m_d[i].hd_handle = nullptr;
m_d[i].wp = 1;
m_d[i].unsafe = 1;
}
diff --git a/src/devices/bus/ti99x/990_tap.cpp b/src/devices/bus/ti99x/990_tap.cpp
index 20ca2333f7b..978931d35de 100644
--- a/src/devices/bus/ti99x/990_tap.cpp
+++ b/src/devices/bus/ti99x/990_tap.cpp
@@ -902,9 +902,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "tap"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
diff --git a/src/devices/bus/ti99x/998board.cpp b/src/devices/bus/ti99x/998board.cpp
index 21efa853f28..d59313bc57c 100644
--- a/src/devices/bus/ti99x/998board.cpp
+++ b/src/devices/bus/ti99x/998board.cpp
@@ -485,10 +485,10 @@ bool mainboard8_device::access_logical_r(address_space& space, offs_t offset, UI
{
bool found = false;
logically_addressed_device *ldev = m_logcomp.first();
- bus8z_device *bdev = NULL;
+ bus8z_device *bdev = nullptr;
if (TRACE_MEM) logerror("%s: offset=%04x; CRUS=%d, PTGEN=%d\n", tag(), offset, m_CRUS? 1:0, m_PTGE? 0:1);
- while (ldev != NULL)
+ while (ldev != nullptr)
{
if (TRACE_MEM) logerror("%s: checking node=%s\n", tag(), ldev->m_config->name);
// Check the mode
@@ -531,9 +531,9 @@ bool mainboard8_device::access_logical_w(address_space& space, offs_t offset, UI
{
bool found = false;
logically_addressed_device *ldev = m_logcomp.first();
- bus8z_device *bdev = NULL;
+ bus8z_device *bdev = nullptr;
- while (ldev != NULL)
+ while (ldev != nullptr)
{
// Check the mode
if (((ldev->m_config->mode == NATIVE) && (m_CRUS==false))
@@ -573,9 +573,9 @@ bool mainboard8_device::access_logical_w(address_space& space, offs_t offset, UI
void mainboard8_device::access_physical_r( address_space& space, offs_t pas_address, UINT8 *value, UINT8 mem_mask )
{
physically_addressed_device *pdev = m_physcomp.first();
- bus8z_device *bdev = NULL;
+ bus8z_device *bdev = nullptr;
- while (pdev != NULL)
+ while (pdev != nullptr)
{
if ((pas_address & pdev->m_config->address_mask)==pdev->m_config->select_pattern)
{
@@ -621,9 +621,9 @@ void mainboard8_device::access_physical_r( address_space& space, offs_t pas_addr
void mainboard8_device::access_physical_w( address_space& space, offs_t pas_address, UINT8 data, UINT8 mem_mask )
{
physically_addressed_device *pdev = m_physcomp.first();
- bus8z_device *bdev = NULL;
+ bus8z_device *bdev = nullptr;
- while (pdev != NULL)
+ while (pdev != nullptr)
{
if ((pas_address & pdev->m_config->address_mask)==(pdev->m_config->select_pattern | pdev->m_config->write_select))
{
@@ -706,18 +706,18 @@ void mainboard8_device::device_start()
// Now building the list of active devices at this mapper.
// Coyping partly from datamux.c.
- if ( entry != NULL )
+ if ( entry != nullptr )
{
bool done = false;
for (int i=0; !done; i++)
{
- if (entry[i].name == NULL)
+ if (entry[i].name == nullptr)
{
done = true;
}
else
{
- device_t *dev = NULL;
+ device_t *dev = nullptr;
mapper8_device_kind kind = MAP8_UNDEF;
for (int j=1; (j < 8) && (kind == MAP8_UNDEF); j++)
@@ -731,17 +731,17 @@ void mainboard8_device::device_start()
kind = MAP8_DEV;
dev = machine().device(entry[i].name);
}
- if (kind != MAP8_DEV || dev != NULL)
+ if (kind != MAP8_DEV || dev != nullptr)
{
if (entry[i].mode != PHYSIC)
{
- logically_addressed_device *ad = new logically_addressed_device(kind, (device_t*)dev, entry[i]);
+ auto ad = new logically_addressed_device(kind, (device_t*)dev, entry[i]);
m_logcomp.append(*ad);
if (TRACE_CONFIG) logerror("%s: Device %s mounted into logical address space.\n", tag(), entry[i].name);
}
else
{
- physically_addressed_device *ad = new physically_addressed_device(kind, (device_t*)dev, entry[i]);
+ auto ad = new physically_addressed_device(kind, (device_t*)dev, entry[i]);
m_physcomp.append(*ad);
if (TRACE_CONFIG) logerror("%s: Device %s mounted into physical address space.\n", tag(), entry[i].name);
}
@@ -761,7 +761,7 @@ void mainboard8_device::device_start()
m_PTGE = false;
// Clean mapper
- for (int i=0; i < 16; i++) m_pas_offset[i] = 0;
+ for (auto & elem : m_pas_offset) elem = 0;
}
void mainboard8_device::device_reset()
@@ -773,7 +773,7 @@ void mainboard8_device::device_reset()
m_hexbus_selected = false;
// Clean mapper
- for (int i=0; i < 16; i++) m_pas_offset[i] = 0;
+ for (auto & elem : m_pas_offset) elem = 0;
m_ready(ASSERT_LINE);
}
diff --git a/src/devices/bus/ti99x/datamux.cpp b/src/devices/bus/ti99x/datamux.cpp
index 78fada91e28..a9b60f30c47 100644
--- a/src/devices/bus/ti99x/datamux.cpp
+++ b/src/devices/bus/ti99x/datamux.cpp
@@ -94,7 +94,7 @@ void ti99_datamux_device::read_all(address_space& space, UINT16 addr, UINT8 *tar
attached_device *dev = m_devices.first();
// Reading the odd address first (addr+1)
- while (dev != NULL)
+ while (dev != nullptr)
{
if (dev->m_config->write_select != 0xffff) // write-only
{
@@ -114,7 +114,7 @@ void ti99_datamux_device::read_all(address_space& space, UINT16 addr, UINT8 *tar
void ti99_datamux_device::write_all(address_space& space, UINT16 addr, UINT8 value)
{
attached_device *dev = m_devices.first();
- while (dev != NULL)
+ while (dev != nullptr)
{
if ((addr & dev->m_config->address_mask)==(dev->m_config->select | dev->m_config->write_select))
{
@@ -128,7 +128,7 @@ void ti99_datamux_device::write_all(address_space& space, UINT16 addr, UINT8 val
void ti99_datamux_device::setaddress_all(address_space& space, UINT16 addr)
{
attached_device *dev = m_devices.first();
- while (dev != NULL)
+ while (dev != nullptr)
{
if ((addr & dev->m_config->address_mask)==(dev->m_config->select | dev->m_config->write_select))
{
@@ -386,7 +386,7 @@ WRITE_LINE_MEMBER( ti99_datamux_device::ready_line )
void ti99_datamux_device::device_start(void)
{
- m_ram16b = NULL;
+ m_ram16b = nullptr;
m_muxready = ASSERT_LINE;
m_ready.resolve();
}
@@ -409,7 +409,7 @@ void ti99_datamux_device::device_reset(void)
m_use32k = (ioport("RAM")->read()==1);
// better use a region?
- if (m_ram16b==NULL)
+ if (m_ram16b==nullptr)
{
m_ram16b = global_alloc_array_clear(UINT16, 32768/2);
}
@@ -418,12 +418,12 @@ void ti99_datamux_device::device_reset(void)
// We allow for turning off devices according to configuration switch settings.
// In particular, the HSGPL card cannot function unless the console GROMs are
// removed.
- if ( list != NULL )
+ if ( list != nullptr )
{
bool done = false;
for (int i=0; !done; i++)
{
- if (list[i].name == NULL)
+ if (list[i].name == nullptr)
{
done = true;
}
@@ -431,7 +431,7 @@ void ti99_datamux_device::device_reset(void)
{
UINT32 set = 0;
bool active_device = true;
- if (list[i].setting!=NULL)
+ if (list[i].setting!=nullptr)
{
set = ioport(list[i].setting)->read();
active_device = ((set & list[i].set)==list[i].set) && ((set & list[i].unset)==0);
@@ -439,9 +439,9 @@ void ti99_datamux_device::device_reset(void)
if (active_device)
{
device_t *dev = machine().device(list[i].name);
- if (dev != NULL)
+ if (dev != nullptr)
{
- attached_device *ad = new attached_device(dev, list[i]);
+ auto ad = new attached_device(dev, list[i]);
m_devices.append(*ad);
if (TRACE_SETUP) logerror("datamux: Device %s mounted at index %d.\n", list[i].name, i);
}
diff --git a/src/devices/bus/ti99x/genboard.cpp b/src/devices/bus/ti99x/genboard.cpp
index 62832d809a4..1817aad95a2 100644
--- a/src/devices/bus/ti99x/genboard.cpp
+++ b/src/devices/bus/ti99x/genboard.cpp
@@ -209,7 +209,7 @@ geneve_mapper_device::geneve_mapper_device(const machine_config &mconfig, const
: device_t(mconfig, GENEVE_MAPPER, "Geneve Gate Array", tag, owner, clock, "geneve_mapper", __FILE__), m_gromwaddr_LSB(false), m_gromraddr_LSB(false), m_grom_address(0), m_video_waitstates(false), m_extra_waitstates(false), m_ready_asserted(false), m_read_mode(false), m_debug_no_ws(false), m_geneve_mode(false), m_direct_mode(false), m_cartridge_size(0), m_cartridge_secondpage(false), m_cartridge6_writable(false), m_cartridge7_writable(false), m_turbo(false), m_genmod(false), m_timode(false), m_pfm_mode(0), m_pfm_bank(0), m_pfm_output_enable(false), m_sram_mask(0), m_sram_val(0),
m_ready(*this), m_waitcount(0), m_ext_waitcount(0), m_clock(nullptr), m_cpu(nullptr), m_pfm512(nullptr), m_pfm512a(nullptr), m_keyboard(nullptr), m_video(nullptr), m_peribox(nullptr), m_sound(nullptr), m_sram(nullptr), m_dram(nullptr)
{
- m_eprom = NULL;
+ m_eprom = nullptr;
}
INPUT_CHANGED_MEMBER( geneve_mapper_device::settings_changed )
@@ -1386,7 +1386,7 @@ void geneve_mapper_device::device_reset()
m_pfm_output_enable = true;
// Clear map
- for (int i=0; i < 8; i++) m_map[i] = 0;
+ for (auto & elem : m_map) elem = 0;
m_genmod = false;
diff --git a/src/devices/bus/ti99x/grom.cpp b/src/devices/bus/ti99x/grom.cpp
index 3d7d53f43c6..1ecb0168d80 100644
--- a/src/devices/bus/ti99x/grom.cpp
+++ b/src/devices/bus/ti99x/grom.cpp
@@ -246,7 +246,7 @@ void ti99_grom_device::device_start(void)
const ti99grom_config *conf = reinterpret_cast<const ti99grom_config *>(static_config());
m_memptr = owner()->memregion(conf->regionname)->base();
- assert (m_memptr!=NULL);
+ assert (m_memptr!=nullptr);
m_memptr += conf->offset_reg;
m_size = conf->size;
diff --git a/src/devices/bus/ti99x/gromport.cpp b/src/devices/bus/ti99x/gromport.cpp
index 8d815f20d13..3104260b94d 100644
--- a/src/devices/bus/ti99x/gromport.cpp
+++ b/src/devices/bus/ti99x/gromport.cpp
@@ -146,25 +146,25 @@ gromport_device::gromport_device(const machine_config &mconfig, const char *tag,
/* Only called for addresses 6000-7fff and GROM addresses (see datamux config) */
READ8Z_MEMBER(gromport_device::readz)
{
- if (m_connector != NULL)
+ if (m_connector != nullptr)
m_connector->readz(space, offset, value);
}
WRITE8_MEMBER(gromport_device::write)
{
- if (m_connector != NULL)
+ if (m_connector != nullptr)
m_connector->write(space, offset, data);
}
READ8Z_MEMBER(gromport_device::crureadz)
{
- if (m_connector != NULL)
+ if (m_connector != nullptr)
m_connector->crureadz(space, offset, value);
}
WRITE8_MEMBER(gromport_device::cruwrite)
{
- if (m_connector != NULL)
+ if (m_connector != nullptr)
m_connector->cruwrite(space, offset, data);
}
@@ -250,7 +250,7 @@ const device_type GROMPORT_GK = &device_creator<gkracker_device>;
ti99_cartridge_connector_device::ti99_cartridge_connector_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)
: bus8z_device(mconfig, type, name, tag, owner, clock, shortname, source),
- m_gromport(NULL)
+ m_gromport(nullptr)
{
}
@@ -276,7 +276,7 @@ UINT16 ti99_cartridge_connector_device::grom_mask()
single_conn_device::single_conn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: ti99_cartridge_connector_device(mconfig, GROMPORT_SINGLE, "Standard cartridge connector", tag, owner, clock, "single", __FILE__),
- m_cartridge(NULL)
+ m_cartridge(nullptr)
{
}
@@ -448,7 +448,7 @@ void multi_conn_device::insert(int index, ti99_cartridge_device* cart)
void multi_conn_device::remove(int index)
{
if (TRACE_CHANGE) logerror("%s: Remove slot %d\n", tag(), index);
- m_cartridge[index] = NULL;
+ m_cartridge[index] = nullptr;
}
READ8Z_MEMBER(multi_conn_device::readz)
@@ -462,7 +462,7 @@ READ8Z_MEMBER(multi_conn_device::readz)
{
for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++)
{
- if (m_cartridge[i] != NULL)
+ if (m_cartridge[i] != nullptr)
{
UINT8 newval = *value;
m_cartridge[i]->readz(space, offset, &newval, mem_mask);
@@ -475,7 +475,7 @@ READ8Z_MEMBER(multi_conn_device::readz)
}
else
{
- if (slot < NUMBER_OF_CARTRIDGE_SLOTS && m_cartridge[slot] != NULL)
+ if (slot < NUMBER_OF_CARTRIDGE_SLOTS && m_cartridge[slot] != nullptr)
{
m_cartridge[slot]->readz(space, offset, value, mem_mask);
}
@@ -490,17 +490,17 @@ WRITE8_MEMBER(multi_conn_device::write)
// We don't have GRAM cartridges, anyway, so it's just used for setting the address.
if ((offset & grom_mask()) == grom_base())
{
- for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++)
+ for (auto & elem : m_cartridge)
{
- if (m_cartridge[i] != NULL)
+ if (elem != nullptr)
{
- m_cartridge[i]->write(space, offset, data, mem_mask);
+ elem->write(space, offset, data, mem_mask);
}
}
}
else
{
- if (slot < NUMBER_OF_CARTRIDGE_SLOTS && m_cartridge[slot] != NULL)
+ if (slot < NUMBER_OF_CARTRIDGE_SLOTS && m_cartridge[slot] != nullptr)
{
// logerror("%s: try it on slot %d\n", tag(), slot);
m_cartridge[slot]->write(space, offset, data, mem_mask);
@@ -515,7 +515,7 @@ READ8Z_MEMBER(multi_conn_device::crureadz)
if (slot >= NUMBER_OF_CARTRIDGE_SLOTS)
return;
- if (m_cartridge[slot] != NULL)
+ if (m_cartridge[slot] != nullptr)
{
m_cartridge[slot]->crureadz(space, offset, value);
}
@@ -529,7 +529,7 @@ WRITE8_MEMBER(multi_conn_device::cruwrite)
if (slot >= NUMBER_OF_CARTRIDGE_SLOTS)
return;
- if (m_cartridge[slot] != NULL)
+ if (m_cartridge[slot] != nullptr)
{
m_cartridge[slot]->cruwrite(space, offset, data);
}
@@ -539,9 +539,9 @@ void multi_conn_device::device_start()
{
m_next_free_slot = 0;
m_active_slot = 0;
- for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++)
+ for (auto & elem : m_cartridge)
{
- m_cartridge[i] = NULL;
+ elem = nullptr;
}
}
@@ -698,10 +698,10 @@ gkracker_device::gkracker_device(const machine_config &mconfig, const char *tag,
device_nvram_interface(mconfig, *this),
m_ram_page(0),
m_grom_address(0),
- m_ram_ptr(NULL),
- m_grom_ptr(NULL),
+ m_ram_ptr(nullptr),
+ m_grom_ptr(nullptr),
m_waddr_LSB(false),
- m_cartridge(NULL)
+ m_cartridge(nullptr)
{
}
@@ -755,7 +755,7 @@ READ8Z_MEMBER(gkracker_device::readz)
// but only if it has GROMs
bool guest_has_grom = false;
- if (m_cartridge != NULL)
+ if (m_cartridge != nullptr)
{
guest_has_grom = m_cartridge->has_grom();
// Note that we only have ONE real cartridge and the GK;
@@ -777,7 +777,7 @@ READ8Z_MEMBER(gkracker_device::readz)
}
else
{
- if (m_cartridge != NULL)
+ if (m_cartridge != nullptr)
{
// Read from the guest cartridge.
m_cartridge->readz(space, offset, value, mem_mask);
@@ -812,7 +812,7 @@ READ8Z_MEMBER(gkracker_device::readz)
WRITE8_MEMBER(gkracker_device::write)
{
// write to the guest cartridge if present
- if (m_cartridge != NULL)
+ if (m_cartridge != nullptr)
{
m_cartridge->write(space, offset, data, mem_mask);
}
@@ -864,7 +864,7 @@ WRITE8_MEMBER(gkracker_device::write)
m_ram_ptr[m_grom_address] = data;
break;
default:
- if (m_gk_switch[1]==GK_NORMAL && m_cartridge == NULL)
+ if (m_gk_switch[1]==GK_NORMAL && m_cartridge == nullptr)
m_ram_ptr[m_grom_address] = data;
break;
}
@@ -880,7 +880,7 @@ WRITE8_MEMBER(gkracker_device::write)
// 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 == NULL)
+ if (m_cartridge == nullptr)
{
if (m_gk_switch[1] == GK_OFF) return; // just don't do anything
switch (m_gk_switch[4])
@@ -906,12 +906,12 @@ WRITE8_MEMBER(gkracker_device::write)
READ8Z_MEMBER( gkracker_device::crureadz )
{
- if (m_cartridge != NULL) m_cartridge->crureadz(space, offset, value);
+ if (m_cartridge != nullptr) m_cartridge->crureadz(space, offset, value);
}
WRITE8_MEMBER( gkracker_device::cruwrite )
{
- if (m_cartridge != NULL) m_cartridge->cruwrite(space, offset, data);
+ if (m_cartridge != nullptr) m_cartridge->cruwrite(space, offset, data);
}
INPUT_CHANGED_MEMBER( gkracker_device::gk_changed )
@@ -932,7 +932,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());
- m_cartridge = NULL;
+ m_cartridge = nullptr;
}
void gkracker_device::gk_install_menu(const char* menutext, int len, int ptr, int next, int start)
@@ -996,7 +996,7 @@ void gkracker_device::device_start()
{
m_ram_ptr = memregion(GKRACKER_NVRAM_TAG)->base();
m_grom_ptr = memregion(GKRACKER_ROM_TAG)->base();
- m_cartridge = NULL;
+ m_cartridge = nullptr;
for (int i=1; i < 6; i++) m_gk_switch[i] = 0;
}
@@ -1106,7 +1106,7 @@ static const pcb_type pcbdefs[] =
{ PCB_PAGED377, "paged377" },
{ PCB_PAGEDCRU, "pagedcru" },
{ PCB_GROMEMU, "gromemu" },
- { 0, NULL}
+ { 0, nullptr}
};
// Softlists do not support the cartridges with RAM yet
@@ -1115,7 +1115,7 @@ static const pcb_type sw_pcbdefs[] =
{ PCB_STANDARD, "standard" },
{ PCB_PAGED, "paged" },
{ PCB_GROMEMU, "gromemu" },
- { 0, NULL}
+ { 0, nullptr}
};
ti99_cartridge_device::ti99_cartridge_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -1124,9 +1124,9 @@ ti99_cartridge_device::ti99_cartridge_device(const machine_config &mconfig, cons
m_softlist(false),
m_pcbtype(0),
m_slot(0),
- m_pcb(NULL),
- m_connector(NULL),
- m_rpk(NULL)
+ m_pcb(nullptr),
+ m_connector(nullptr),
+ m_rpk(nullptr)
{
}
@@ -1142,12 +1142,12 @@ void ti99_cartridge_device::prepare_cartridge()
// Initialize some values.
m_pcb->m_rom_page = 0;
- m_pcb->m_rom_ptr = NULL;
+ m_pcb->m_rom_ptr = nullptr;
m_pcb->m_ram_size = 0;
- m_pcb->m_ram_ptr = NULL;
+ m_pcb->m_ram_ptr = nullptr;
m_pcb->m_ram_page = 0;
- for (int i=0; i < 5; i++) m_pcb->m_grom[i] = NULL;
+ 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);
@@ -1258,7 +1258,7 @@ bool ti99_cartridge_device::call_load()
}
else
{
- rpk_reader *reader = new rpk_reader(pcbdefs);
+ auto reader = new rpk_reader(pcbdefs);
try
{
m_rpk = reader->open(machine().options(), filename(), machine().system().name);
@@ -1267,7 +1267,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());
- m_rpk = NULL;
+ m_rpk = nullptr;
m_err = IMAGE_ERROR_INVALIDIMAGE;
return true;
}
@@ -1328,14 +1328,14 @@ bool ti99_cartridge_device::call_load()
void ti99_cartridge_device::call_unload()
{
if (TRACE_CHANGE) logerror("%s: Unload\n", tag());
- if (m_rpk != NULL)
+ if (m_rpk != nullptr)
{
m_rpk->close(); // will write NVRAM contents
delete m_rpk;
}
delete m_pcb;
- m_pcb = NULL;
+ m_pcb = nullptr;
m_connector->remove(m_slot);
}
@@ -1349,28 +1349,28 @@ bool ti99_cartridge_device::call_softlist_load(software_list_device &swlist, con
if (TRACE_CONFIG) logerror("%s: swlist = %s, swname = %s\n", tag(), swlist.list_name(), swname);
load_software_part_region(*this, swlist, swname, start_entry);
m_softlist = true;
- m_rpk = NULL;
+ m_rpk = nullptr;
return true;
}
READ8Z_MEMBER(ti99_cartridge_device::readz)
{
- if (m_pcb != NULL) m_pcb->readz(space, offset, value);
+ if (m_pcb != nullptr) m_pcb->readz(space, offset, value);
}
WRITE8_MEMBER(ti99_cartridge_device::write)
{
- if (m_pcb != NULL) m_pcb->write(space, offset, data);
+ if (m_pcb != nullptr) m_pcb->write(space, offset, data);
}
READ8Z_MEMBER(ti99_cartridge_device::crureadz)
{
- if (m_pcb != NULL) m_pcb->crureadz(space, offset, value);
+ if (m_pcb != nullptr) m_pcb->crureadz(space, offset, value);
}
WRITE8_MEMBER(ti99_cartridge_device::cruwrite)
{
- if (m_pcb != NULL) m_pcb->cruwrite(space, offset, data);
+ if (m_pcb != nullptr) m_pcb->cruwrite(space, offset, data);
}
WRITE_LINE_MEMBER( ti99_cartridge_device::ready_line )
@@ -1474,22 +1474,22 @@ void ti99_cartridge_pcb::set_cartridge(ti99_cartridge_device *cart)
READ8Z_MEMBER(ti99_cartridge_pcb::gromreadz)
{
- for (int i=0; i < 5; i++)
+ for (auto & elem : m_grom)
{
- if (m_grom[i] != NULL)
+ if (elem != nullptr)
{
- m_grom[i]->readz(space, offset, value, mem_mask);
+ elem->readz(space, offset, value, mem_mask);
}
}
}
WRITE8_MEMBER(ti99_cartridge_pcb::gromwrite)
{
- for (int i=0; i < 5; i++)
+ for (auto & elem : m_grom)
{
- if (m_grom[i] != NULL)
+ if (elem != nullptr)
{
- m_grom[i]->write(space, offset, data, mem_mask);
+ elem->write(space, offset, data, mem_mask);
}
}
}
@@ -1500,7 +1500,7 @@ READ8Z_MEMBER(ti99_cartridge_pcb::readz)
gromreadz(space, offset, value, mem_mask);
else
{
- if (m_rom_ptr!=NULL)
+ if (m_rom_ptr!=nullptr)
{
// For TI-99/8 we should plan for 16K cartridges. However, none was ever produced.
// Well, forget about that.
@@ -1581,7 +1581,7 @@ READ8Z_MEMBER(ti99_minimem_cartridge::readz)
{
if ((offset & 0x1000)==0x0000)
{
- if (m_rom_ptr!=NULL) // Super-Minimem seems to have no ROM
+ if (m_rom_ptr!=nullptr) // Super-Minimem seems to have no ROM
{
*value = m_rom_ptr[offset & 0x0fff];
}
@@ -1636,7 +1636,7 @@ READ8Z_MEMBER(ti99_super_cartridge::readz)
gromreadz(space, offset, value, mem_mask);
else
{
- if (m_ram_ptr != NULL)
+ if (m_ram_ptr != nullptr)
{
*value = m_ram_ptr[(m_ram_page << 13) | (offset & 0x1fff)];
}
@@ -1726,12 +1726,12 @@ READ8Z_MEMBER(ti99_mbx_cartridge::readz)
// This is the RAM area which overrides any ROM. There is no
// known banking behavior for the RAM, so we must assume that
// there is only one bank.
- if (m_ram_ptr != NULL)
+ if (m_ram_ptr != nullptr)
*value = m_ram_ptr[offset & 0x03ff];
}
else
{
- if (m_rom_ptr!=NULL)
+ if (m_rom_ptr!=nullptr)
*value = m_rom_ptr[(offset & 0x1fff) | (m_rom_page<<13)];
}
}
@@ -1752,7 +1752,7 @@ WRITE8_MEMBER(ti99_mbx_cartridge::write)
if ((offset & 0x1c00)==0x0c00)
{
- if (m_ram_ptr == NULL) return;
+ if (m_ram_ptr == nullptr) return;
m_ram_ptr[offset & 0x03ff] = data;
}
}
@@ -1992,7 +1992,7 @@ READ8Z_MEMBER(ti99_gromemu_cartridge::readz)
gromemureadz(space, offset, value, mem_mask);
else
{
- if (m_ram_ptr != NULL)
+ if (m_ram_ptr != nullptr)
{
// Variant of the cartridge which emulates MiniMemory. We don't introduce
// another type for this single cartridge.
@@ -2002,7 +2002,7 @@ READ8Z_MEMBER(ti99_gromemu_cartridge::readz)
}
}
- if (m_rom_ptr == NULL) return;
+ if (m_rom_ptr == nullptr) return;
*value = m_rom_ptr[(offset & 0x1fff) | (m_rom_page << 13)];
}
}
@@ -2014,7 +2014,7 @@ WRITE8_MEMBER(ti99_gromemu_cartridge::write)
gromemuwrite(space, offset, data, mem_mask);
else {
- if (m_ram_ptr != NULL)
+ if (m_ram_ptr != nullptr)
{
// Lines for Super-Minimem; see above
if ((offset & 0x1fff)==0x1000) {
@@ -2142,7 +2142,7 @@ rpk::~rpk()
UINT8* rpk::get_contents_of_socket(const char *socket_name)
{
rpk_socket *socket = m_sockets.find(socket_name);
- if (socket==NULL) return NULL;
+ if (socket==nullptr) return nullptr;
return socket->get_contents();
}
@@ -2152,7 +2152,7 @@ UINT8* rpk::get_contents_of_socket(const char *socket_name)
int rpk::get_resource_length(const char *socket_name)
{
rpk_socket *socket = m_sockets.find(socket_name);
- if (socket==NULL) return 0;
+ if (socket==nullptr) return 0;
return socket->get_content_length();
}
@@ -2170,7 +2170,7 @@ void rpk::close()
{
// Save the NVRAM contents
rpk_socket *socket = m_sockets.first();
- while (socket != NULL)
+ while (socket != nullptr)
{
if (socket->persistent_ram())
{
@@ -2187,12 +2187,12 @@ void rpk::close()
***************************************************************/
rpk_socket::rpk_socket(const char* id, int length, UINT8* contents, const char *pathname)
-: m_id(id), m_length(length), m_next(NULL), m_contents(contents), m_pathname(pathname)
+: m_id(id), m_length(length), m_next(nullptr), m_contents(contents), m_pathname(pathname)
{
}
rpk_socket::rpk_socket(const char* id, int length, UINT8* contents)
-: m_id(id), m_length(length), m_next(NULL), m_contents(contents), m_pathname(NULL)
+: m_id(id), m_length(length), m_next(nullptr), m_contents(contents), m_pathname(nullptr)
{
}
@@ -2202,7 +2202,7 @@ rpk_socket::rpk_socket(const char* id, int length, UINT8* contents)
const zip_file_header* rpk_reader::find_file(zip_file *zip, const char *filename, UINT32 crc)
{
const zip_file_header *header;
- for (header = zip_file_first_file(zip); header != NULL; header = zip_file_next_file(zip))
+ for (header = zip_file_first_file(zip); header != nullptr; header = zip_file_next_file(zip))
{
// We don't check for CRC == 0.
if (crc != 0)
@@ -2220,7 +2220,7 @@ const zip_file_header* rpk_reader::find_file(zip_file *zip, const char *filename
}
}
}
- return NULL;
+ return nullptr;
}
/*
@@ -2238,30 +2238,30 @@ rpk_socket* rpk_reader::load_rom_resource(zip_file* zip, xml_data_node* rom_reso
const zip_file_header *header;
// find the file attribute (required)
- file = xml_get_attribute_string(rom_resource_node, "file", NULL);
- if (file == NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<rom> must have a 'file' attribute");
+ file = xml_get_attribute_string(rom_resource_node, "file", nullptr);
+ if (file == nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<rom> must have a 'file' attribute");
//if (TRACE_RPK) logerror("gromport/RPK: Loading ROM contents for socket '%s' from file %s\n", socketname, file);
// check for crc
- crcstr = xml_get_attribute_string(rom_resource_node, "crc", NULL);
- if (crcstr==NULL)
+ crcstr = xml_get_attribute_string(rom_resource_node, "crc", nullptr);
+ if (crcstr==nullptr)
{
// no CRC, just find the file in the RPK
header = find_file(zip, file, 0);
}
else
{
- crc = strtoul(crcstr, NULL, 16);
+ crc = strtoul(crcstr, nullptr, 16);
header = find_file(zip, file, crc);
}
- if (header == NULL) throw rpk_exception(RPK_INVALID_FILE_REF, "File not found or CRC check failed");
+ if (header == nullptr) throw rpk_exception(RPK_INVALID_FILE_REF, "File not found or CRC check failed");
length = header->uncompressed_length;
// Allocate storage
contents = global_alloc_array_clear(UINT8, length);
- if (contents==NULL) throw rpk_exception(RPK_OUT_OF_MEMORY);
+ if (contents==nullptr) throw rpk_exception(RPK_OUT_OF_MEMORY);
// and unzip file from the zip file
ziperr = zip_file_decompress(zip, contents, length);
@@ -2272,8 +2272,8 @@ rpk_socket* rpk_reader::load_rom_resource(zip_file* zip, xml_data_node* rom_reso
}
// check for sha1
- sha1 = xml_get_attribute_string(rom_resource_node, "sha1", NULL);
- if (sha1 != NULL)
+ sha1 = xml_get_attribute_string(rom_resource_node, "sha1", nullptr);
+ if (sha1 != nullptr)
{
hash_collection actual_hashes;
actual_hashes.compute((const UINT8 *)contents, length, hash_collection::HASH_TYPES_CRC_SHA1);
@@ -2301,8 +2301,8 @@ rpk_socket* rpk_reader::load_ram_resource(emu_options &options, xml_data_node* r
UINT8* contents;
// find the length attribute
- length_string = xml_get_attribute_string(ram_resource_node, "length", NULL);
- if (length_string == NULL) throw rpk_exception(RPK_MISSING_RAM_LENGTH);
+ length_string = xml_get_attribute_string(ram_resource_node, "length", nullptr);
+ if (length_string == nullptr) throw rpk_exception(RPK_MISSING_RAM_LENGTH);
// parse it
char suffix = '\0';
@@ -2327,23 +2327,23 @@ rpk_socket* rpk_reader::load_ram_resource(emu_options &options, xml_data_node* r
// Allocate memory for this resource
contents = global_alloc_array_clear(UINT8, length);
- if (contents==NULL) throw rpk_exception(RPK_OUT_OF_MEMORY);
+ if (contents==nullptr) throw rpk_exception(RPK_OUT_OF_MEMORY);
//if (TRACE_RPK) logerror("gromport/RPK: Allocating RAM buffer (%d bytes) for socket '%s'\n", length, socketname);
- ram_pname = NULL;
+ ram_pname = nullptr;
// That's it for pure RAM. Now check whether the RAM is "persistent", i.e. NVRAM.
// In that case we must load it from the NVRAM directory.
// The file name is given in the RPK file; the subdirectory is the system name.
- ram_type = xml_get_attribute_string(ram_resource_node, "type", NULL);
- if (ram_type != NULL)
+ ram_type = xml_get_attribute_string(ram_resource_node, "type", nullptr);
+ if (ram_type != nullptr)
{
if (strcmp(ram_type, "persistent")==0)
{
// Get the file name (required if persistent)
- ram_filename = xml_get_attribute_string(ram_resource_node, "file", NULL);
- if (ram_filename==NULL)
+ ram_filename = xml_get_attribute_string(ram_resource_node, "file", nullptr);
+ if (ram_filename==nullptr)
{
global_free_array(contents);
throw rpk_exception(RPK_INVALID_RAM_SPEC, "<ram type='persistent'> must have a 'file' attribute");
@@ -2379,7 +2379,7 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy
zip_file* zipfile;
std::vector<char> layout_text;
- xml_data_node *layout_xml = NULL;
+ xml_data_node *layout_xml = nullptr;
xml_data_node *romset_node;
xml_data_node *configuration_node;
xml_data_node *resources_node;
@@ -2391,7 +2391,7 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy
int i;
- rpk *newrpk = new rpk(options, system_name);
+ auto newrpk = new rpk(options, system_name);
try
{
@@ -2401,7 +2401,7 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy
/* find the layout.xml file */
header = find_file(zipfile, "layout.xml", 0);
- if (header == NULL) throw rpk_exception(RPK_MISSING_LAYOUT);
+ if (header == nullptr) throw rpk_exception(RPK_MISSING_LAYOUT);
/* reserve space for the layout file contents (+1 for the termination) */
layout_text.resize(header->uncompressed_length + 1);
@@ -2417,30 +2417,30 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy
layout_text[header->uncompressed_length] = '\0'; // Null-terminate
/* parse the layout text */
- layout_xml = xml_string_read(&layout_text[0], NULL);
- if (layout_xml == NULL) throw rpk_exception(RPK_XML_ERROR);
+ layout_xml = xml_string_read(&layout_text[0], nullptr);
+ if (layout_xml == nullptr) throw rpk_exception(RPK_XML_ERROR);
// Now we work within the XML tree
// romset is the root node
romset_node = xml_get_sibling(layout_xml->child, "romset");
- if (romset_node==NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "document element must be <romset>");
+ if (romset_node==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "document element must be <romset>");
// resources is a child of romset
resources_node = xml_get_sibling(romset_node->child, "resources");
- if (resources_node==NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<romset> must have a <resources> child");
+ if (resources_node==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<romset> must have a <resources> child");
// configuration is a child of romset; we're actually interested in ...
configuration_node = xml_get_sibling(romset_node->child, "configuration");
- if (configuration_node==NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<romset> must have a <configuration> child");
+ if (configuration_node==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<romset> must have a <configuration> child");
// ... pcb, which is a child of configuration
pcb_node = xml_get_sibling(configuration_node->child, "pcb");
- if (pcb_node==NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<configuration> must have a <pcb> child");
+ if (pcb_node==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<configuration> must have a <pcb> child");
// We'll try to find the PCB type on the provided type list.
- pcb_type = xml_get_attribute_string(pcb_node, "type", NULL);
- if (pcb_type==NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<pcb> must have a 'type' attribute");
+ pcb_type = xml_get_attribute_string(pcb_node, "type", nullptr);
+ if (pcb_type==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<pcb> must have a 'type' attribute");
//if (TRACE_RPK) logerror("gromport/RPK: Cartridge says it has PCB type '%s'\n", pcb_type);
i=0;
@@ -2457,20 +2457,20 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy
if (m_types[i].id==0) throw rpk_exception(RPK_UNKNOWN_PCB_TYPE);
// Find the sockets and load their respective resource
- for (socket_node = pcb_node->child; socket_node != NULL; socket_node = socket_node->next)
+ for (socket_node = pcb_node->child; socket_node != nullptr; socket_node = socket_node->next)
{
if (strcmp(socket_node->name, "socket")!=0) throw rpk_exception(RPK_INVALID_LAYOUT, "<pcb> element has only <socket> children");
- id = xml_get_attribute_string(socket_node, "id", NULL);
- if (id == NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "<socket> must have an 'id' attribute");
+ id = xml_get_attribute_string(socket_node, "id", nullptr);
+ if (id == nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<socket> must have an 'id' attribute");
uses_name = xml_get_attribute_string(socket_node, "uses", nullptr);
if (uses_name == nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "<socket> must have a 'uses' attribute");
bool found = false;
// Locate the resource node
- for (resource_node = resources_node->child; resource_node != NULL; resource_node = resource_node->next)
+ for (resource_node = resources_node->child; resource_node != nullptr; resource_node = resource_node->next)
{
- resource_name = xml_get_attribute_string(resource_node, "id", NULL);
- if (resource_name == NULL) throw rpk_exception(RPK_INVALID_LAYOUT, "resource node must have an 'id' attribute");
+ resource_name = xml_get_attribute_string(resource_node, "id", nullptr);
+ if (resource_name == nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "resource node must have an 'id' attribute");
if (strcmp(resource_name, uses_name)==0)
{
@@ -2498,15 +2498,15 @@ rpk* rpk_reader::open(emu_options &options, const char *filename, const char *sy
catch (rpk_exception &exp)
{
newrpk->close();
- if (layout_xml != NULL) xml_file_free(layout_xml);
- if (zipfile != NULL) zip_file_close(zipfile);
+ if (layout_xml != nullptr) xml_file_free(layout_xml);
+ if (zipfile != nullptr) zip_file_close(zipfile);
// rethrow the exception
throw exp;
}
- if (layout_xml != NULL) xml_file_free(layout_xml);
- if (zipfile != NULL) zip_file_close(zipfile);
+ if (layout_xml != nullptr) xml_file_free(layout_xml);
+ if (zipfile != nullptr) zip_file_close(zipfile);
return newrpk;
}
diff --git a/src/devices/bus/ti99x/gromport.h b/src/devices/bus/ti99x/gromport.h
index a0fd7aa0a56..b4d3b9c27c5 100644
--- a/src/devices/bus/ti99x/gromport.h
+++ b/src/devices/bus/ti99x/gromport.h
@@ -80,7 +80,7 @@ public:
DECLARE_WRITE8_MEMBER(cruwrite);
DECLARE_WRITE_LINE_MEMBER(ready_line);
- bool is_available() { return m_pcb != NULL; }
+ bool is_available() { return m_pcb != nullptr; }
bool has_grom();
void set_slot(int i);
UINT16 grom_base();
@@ -108,7 +108,7 @@ protected:
bool is_reset_on_load() const { return false; }
const char *image_interface() const { return "ti99_cart"; }
const char *file_extensions() const { return "rpk"; }
- const option_guide *create_option_guide() const { return NULL; }
+ const option_guide *create_option_guide() const { return nullptr; }
private:
bool m_softlist;
@@ -439,9 +439,9 @@ public:
const char* id() { return m_id; }
int get_content_length() { return m_length; }
UINT8* get_contents() { return m_contents; }
- bool persistent_ram() { return m_pathname != NULL; }
+ bool persistent_ram() { return m_pathname != nullptr; }
const char* get_pathname() { return m_pathname; }
- void cleanup() { if (m_contents != NULL) global_free_array(m_contents); }
+ void cleanup() { if (m_contents != nullptr) global_free_array(m_contents); }
private:
const char* m_id;
@@ -530,12 +530,12 @@ static const char error_text[16][30] =
class rpk_exception
{
public:
- rpk_exception(rpk_open_error value): m_err(value), m_detail(NULL) { };
+ rpk_exception(rpk_open_error value): m_err(value), m_detail(nullptr) { };
rpk_exception(rpk_open_error value, const char* detail): m_err(value), m_detail(detail) { };
const char* to_string()
{
- if (m_detail==NULL) return error_text[(int)m_err];
+ if (m_detail==nullptr) return error_text[(int)m_err];
std::string errormsg = std::string(error_text[(int)m_err]).append(": ").append(m_detail);
return core_strdup(errormsg.c_str());
}
diff --git a/src/devices/bus/tvc/hbf.cpp b/src/devices/bus/tvc/hbf.cpp
index b527c0ba896..8fd354a18c4 100644
--- a/src/devices/bus/tvc/hbf.cpp
+++ b/src/devices/bus/tvc/hbf.cpp
@@ -161,7 +161,7 @@ WRITE8_MEMBER(tvc_hbf_device::io_write)
// bit 5 DDEN
// bit 6 floppy motor
// bit 7 side select
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = subdevice<floppy_connector>("fdc:0")->get_device();
if (BIT(data, 1)) floppy = subdevice<floppy_connector>("fdc:1")->get_device();
diff --git a/src/devices/bus/vboy/slot.cpp b/src/devices/bus/vboy/slot.cpp
index 87e0130deda..88ef2ce7a2f 100644
--- a/src/devices/bus/vboy/slot.cpp
+++ b/src/devices/bus/vboy/slot.cpp
@@ -27,7 +27,7 @@ const device_type VBOY_CART_SLOT = &device_creator<vboy_cart_slot_device>;
device_vboy_cart_interface::device_vboy_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),
m_rom_mask(0)
{
@@ -48,7 +48,7 @@ device_vboy_cart_interface::~device_vboy_cart_interface()
void device_vboy_cart_interface::rom_alloc(UINT32 size, const char *tag)
{
- if (m_rom == NULL)
+ if (m_rom == nullptr)
{
m_rom = (UINT32 *)device().machine().memory().region_alloc(std::string(tag).append(VBOYSLOT_ROM_REGION_TAG).c_str(), size, 4, ENDIANNESS_LITTLE)->base();
m_rom_size = size/4;
@@ -132,10 +132,10 @@ static const vboy_slot slot_list[] =
static int vboy_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -163,8 +163,8 @@ bool vboy_cart_slot_device::call_load()
if (m_cart)
{
UINT8 *ROM;
- UINT32 len = (software_entry() == NULL) ? length() : get_software_region_length("rom");
- bool has_eeprom = (software_entry() != NULL) && get_software_region("eeprom");
+ UINT32 len = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
+ bool has_eeprom = (software_entry() != nullptr) && get_software_region("eeprom");
if (len > 0x200000)
{
@@ -180,7 +180,7 @@ bool vboy_cart_slot_device::call_load()
ROM = (UINT8 *)m_cart->get_rom_base();
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(ROM, len);
else
memcpy(ROM, get_software_region("rom"), len);
@@ -189,7 +189,7 @@ bool vboy_cart_slot_device::call_load()
if (len < 0x100000) { memcpy(ROM + 0x080000, ROM, 0x080000); }
if (len < 0x200000) { memcpy(ROM + 0x100000, ROM, 0x100000); }
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
m_type = vboy_get_pcb_id("vb_rom");
else
{
diff --git a/src/devices/bus/vboy/slot.h b/src/devices/bus/vboy/slot.h
index e865eece213..fea483bbd7f 100644
--- a/src/devices/bus/vboy/slot.h
+++ b/src/devices/bus/vboy/slot.h
@@ -79,7 +79,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 1; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "vboy_cart"; }
virtual const char *file_extensions() const { return "vb,bin"; }
diff --git a/src/devices/bus/vc4000/slot.cpp b/src/devices/bus/vc4000/slot.cpp
index 8bf34687c9a..ecfc63b42dd 100644
--- a/src/devices/bus/vc4000/slot.cpp
+++ b/src/devices/bus/vc4000/slot.cpp
@@ -28,7 +28,7 @@ const device_type H21_CART_SLOT = &device_creator<h21_cart_slot_device>;
device_vc4000_cart_interface::device_vc4000_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)
{
}
@@ -48,7 +48,7 @@ device_vc4000_cart_interface::~device_vc4000_cart_interface()
void device_vc4000_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(VC4000SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -145,10 +145,10 @@ static const vc4000_slot slot_list[] =
static int vc4000_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -156,10 +156,10 @@ static int vc4000_get_pcb_id(const char *slot)
static const char *vc4000_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "std";
@@ -174,7 +174,7 @@ bool vc4000_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
if (size > 0x1800)
{
@@ -184,12 +184,12 @@ bool vc4000_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);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
m_type = VC4000_STD;
// attempt to identify the non-standard types
diff --git a/src/devices/bus/vc4000/slot.h b/src/devices/bus/vc4000/slot.h
index 975586024fb..e7b3b1a8a91 100644
--- a/src/devices/bus/vc4000/slot.h
+++ b/src/devices/bus/vc4000/slot.h
@@ -80,7 +80,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "vc4000_cart"; }
virtual const char *file_extensions() const { return "bin,rom"; }
diff --git a/src/devices/bus/vcs/dpc.cpp b/src/devices/bus/vcs/dpc.cpp
index 87a2ee34424..fac776fabb1 100644
--- a/src/devices/bus/vcs/dpc.cpp
+++ b/src/devices/bus/vcs/dpc.cpp
@@ -55,11 +55,11 @@ void dpc_device::device_start()
void dpc_device::device_reset()
{
- for (int data_fetcher = 0; data_fetcher < 8; data_fetcher++)
+ for (auto & elem : m_df)
{
- m_df[data_fetcher].osc_clk = 0;
- m_df[data_fetcher].flag = 0;
- m_df[data_fetcher].music_mode = 0;
+ elem.osc_clk = 0;
+ elem.flag = 0;
+ elem.music_mode = 0;
}
m_oscillator->adjust(attotime::from_hz(18400), 0, attotime::from_hz(18400));
diff --git a/src/devices/bus/vcs/vcs_slot.cpp b/src/devices/bus/vcs/vcs_slot.cpp
index 0295c0d7d7d..caa46ef358b 100755
--- a/src/devices/bus/vcs/vcs_slot.cpp
+++ b/src/devices/bus/vcs/vcs_slot.cpp
@@ -31,7 +31,7 @@ const device_type VCS_CART_SLOT = &device_creator<vcs_cart_slot_device>;
device_vcs_cart_interface::device_vcs_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)
{
}
@@ -51,7 +51,7 @@ device_vcs_cart_interface::~device_vcs_cart_interface()
void device_vcs_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(A26SLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -162,10 +162,10 @@ static const vcs_slot slot_list[] =
static int vcs_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -173,10 +173,10 @@ static int vcs_get_pcb_id(const char *slot)
static const char *vcs_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "a26_4k";
@@ -189,7 +189,7 @@ bool vcs_cart_slot_device::call_load()
UINT8 *ROM;
UINT32 len;
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
len = get_software_region_length("rom");
else
len = length();
@@ -219,13 +219,13 @@ bool vcs_cart_slot_device::call_load()
m_cart->rom_alloc(len, tag());
ROM = m_cart->get_rom_base();
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
const char *pcb_name;
bool has_ram = get_software_region("ram") ? TRUE : FALSE;
memcpy(ROM, get_software_region("rom"), len);
- if ((pcb_name = get_feature("slot")) != NULL)
+ if ((pcb_name = get_feature("slot")) != nullptr)
m_type = vcs_get_pcb_id(pcb_name);
else
{
@@ -671,9 +671,9 @@ int vcs_cart_slot_device::detect_super_chip(UINT8 *cart, UINT32 len)
{
for (int i = 0; i < len - sizeof signatures[0]; i++)
{
- for (int j = 0; j < (sizeof signatures/sizeof signatures[0]); j++)
+ for (auto & signature : signatures)
{
- if (!memcmp(&cart[i], &signatures[j], sizeof signatures[0]))
+ if (!memcmp(&cart[i], &signature, sizeof signatures[0]))
{
return 1;
}
diff --git a/src/devices/bus/vcs/vcs_slot.h b/src/devices/bus/vcs/vcs_slot.h
index 154c08fdd5b..ce774e826c0 100755
--- a/src/devices/bus/vcs/vcs_slot.h
+++ b/src/devices/bus/vcs/vcs_slot.h
@@ -107,7 +107,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 1; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "a2600_cart"; }
virtual const char *file_extensions() const { return "bin,a26"; }
diff --git a/src/devices/bus/vcs_ctrl/ctrl.h b/src/devices/bus/vcs_ctrl/ctrl.h
index 50f817a2a01..b23671b7cb3 100644
--- a/src/devices/bus/vcs_ctrl/ctrl.h
+++ b/src/devices/bus/vcs_ctrl/ctrl.h
@@ -97,7 +97,7 @@ public:
void joy_w( UINT8 data ) { if ( exists() ) m_device->vcs_joy_w( data ); }
DECLARE_WRITE8_MEMBER( joy_w );
- bool exists() { return m_device != NULL; }
+ bool exists() { return m_device != nullptr; }
bool has_pot_x() { return exists() && m_device->has_pot_x(); }
bool has_pot_y() { return exists() && m_device->has_pot_y(); }
diff --git a/src/devices/bus/vectrex/slot.cpp b/src/devices/bus/vectrex/slot.cpp
index 0d29be505cd..a7322b0b994 100644
--- a/src/devices/bus/vectrex/slot.cpp
+++ b/src/devices/bus/vectrex/slot.cpp
@@ -27,7 +27,7 @@ const device_type VECTREX_CART_SLOT = &device_creator<vectrex_cart_slot_device>;
device_vectrex_cart_interface::device_vectrex_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_vectrex_cart_interface::~device_vectrex_cart_interface()
void device_vectrex_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(VECSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -135,10 +135,10 @@ static int vectrex_get_pcb_id(const char *slot)
static const char *vectrex_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "vec_rom";
@@ -152,7 +152,7 @@ bool vectrex_cart_slot_device::call_load()
{
if (m_cart)
{
- UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
UINT8 *ROM;
if (size > 0x10000)
@@ -164,7 +164,7 @@ bool vectrex_cart_slot_device::call_load()
m_cart->rom_alloc((size < 0x1000) ? 0x1000 : size, tag());
ROM = m_cart->get_rom_base();
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(ROM, size);
else
memcpy(ROM, get_software_region("rom"), size);
diff --git a/src/devices/bus/vectrex/slot.h b/src/devices/bus/vectrex/slot.h
index e2f5d3cdbe5..5a5a7d795eb 100644
--- a/src/devices/bus/vectrex/slot.h
+++ b/src/devices/bus/vectrex/slot.h
@@ -79,7 +79,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "vectrex_cart"; }
virtual const char *file_extensions() const { return "bin,gam,vec"; }
diff --git a/src/devices/bus/vic10/exp.cpp b/src/devices/bus/vic10/exp.cpp
index 911ae63b881..23c20e6b93f 100644
--- a/src/devices/bus/vic10/exp.cpp
+++ b/src/devices/bus/vic10/exp.cpp
@@ -115,7 +115,7 @@ bool vic10_expansion_slot_device::call_load()
{
size_t size = 0;
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
size = length();
@@ -141,8 +141,8 @@ bool vic10_expansion_slot_device::call_load()
if (cbm_crt_read_header(m_file, &roml_size, &romh_size, &exrom, &game))
{
- UINT8 *roml = NULL;
- UINT8 *romh = NULL;
+ UINT8 *roml = nullptr;
+ UINT8 *romh = nullptr;
m_card->m_lorom.allocate(roml_size);
m_card->m_uprom.allocate(romh_size);
@@ -205,7 +205,7 @@ void vic10_expansion_slot_device::get_default_card_software(std::string &result)
UINT8 vic10_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->vic10_cd_r(space, offset, data, lorom, uprom, exram);
}
@@ -220,14 +220,14 @@ UINT8 vic10_expansion_slot_device::cd_r(address_space &space, offs_t offset, UIN
void vic10_expansion_slot_device::cd_w(address_space &space, offs_t offset, UINT8 data, int lorom, int uprom, int exram)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->vic10_cd_w(space, offset, data, lorom, uprom, exram);
}
}
-READ_LINE_MEMBER( vic10_expansion_slot_device::p0_r ) { int state = 0; if (m_card != NULL) state = m_card->vic10_p0_r(); return state; }
-WRITE_LINE_MEMBER( vic10_expansion_slot_device::p0_w ) { if (m_card != NULL) m_card->vic10_p0_w(state); }
+READ_LINE_MEMBER( vic10_expansion_slot_device::p0_r ) { int state = 0; if (m_card != nullptr) state = m_card->vic10_p0_r(); return state; }
+WRITE_LINE_MEMBER( vic10_expansion_slot_device::p0_w ) { if (m_card != nullptr) m_card->vic10_p0_w(state); }
//-------------------------------------------------
diff --git a/src/devices/bus/vic10/exp.h b/src/devices/bus/vic10/exp.h
index 26e5f6c1e45..4d39dcc0b9a 100644
--- a/src/devices/bus/vic10/exp.h
+++ b/src/devices/bus/vic10/exp.h
@@ -131,7 +131,7 @@ protected:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "vic10_cart"; }
virtual const char *file_extensions() const { return "80,e0"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/vic20/exp.cpp b/src/devices/bus/vic20/exp.cpp
index bb29967c910..42907bbb0d9 100644
--- a/src/devices/bus/vic20/exp.cpp
+++ b/src/devices/bus/vic20/exp.cpp
@@ -111,7 +111,7 @@ bool vic20_expansion_slot_device::call_load()
{
if (m_card)
{
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
if (!core_stricmp(filetype(), "20")) fread(m_card->m_blk1, 0x2000);
else if (!core_stricmp(filetype(), "40")) fread(m_card->m_blk2, 0x2000);
@@ -179,7 +179,7 @@ void vic20_expansion_slot_device::get_default_card_software(std::string &result)
UINT8 vic20_expansion_slot_device::cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->vic20_cd_r(space, offset, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
}
@@ -194,7 +194,7 @@ UINT8 vic20_expansion_slot_device::cd_r(address_space &space, offs_t offset, UIN
void vic20_expansion_slot_device::cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->vic20_cd_w(space, offset, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
}
diff --git a/src/devices/bus/vic20/exp.h b/src/devices/bus/vic20/exp.h
index 8dfd840fa22..c613977d2e8 100644
--- a/src/devices/bus/vic20/exp.h
+++ b/src/devices/bus/vic20/exp.h
@@ -122,7 +122,7 @@ protected:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "vic1001_cart"; }
virtual const char *file_extensions() const { return "20,40,60,70,a0,b0,crt"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/vic20/std.cpp b/src/devices/bus/vic20/std.cpp
index 4757470b093..fe02022f2be 100644
--- a/src/devices/bus/vic20/std.cpp
+++ b/src/devices/bus/vic20/std.cpp
@@ -48,19 +48,19 @@ void vic20_standard_cartridge_device::device_start()
UINT8 vic20_standard_cartridge_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
{
- if (!blk1 && (m_blk1 != NULL))
+ if (!blk1 && (m_blk1 != nullptr))
{
data = m_blk1[offset];
}
- else if (!blk2 && (m_blk2 != NULL))
+ else if (!blk2 && (m_blk2 != nullptr))
{
data = m_blk2[offset];
}
- else if (!blk3 && (m_blk3 != NULL))
+ else if (!blk3 && (m_blk3 != nullptr))
{
data = m_blk3[offset];
}
- else if (!blk5 && (m_blk5 != NULL))
+ else if (!blk5 && (m_blk5 != nullptr))
{
data = m_blk5[offset];
}
diff --git a/src/devices/bus/vic20/vic1010.cpp b/src/devices/bus/vic20/vic1010.cpp
index 98fd3552afa..5aa981edb5a 100644
--- a/src/devices/bus/vic20/vic1010.cpp
+++ b/src/devices/bus/vic20/vic1010.cpp
@@ -86,9 +86,9 @@ void vic1010_device::device_start()
void vic1010_device::device_reset()
{
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- m_expansion_slot[i]->reset();
+ elem->reset();
}
}
@@ -99,9 +99,9 @@ void vic1010_device::device_reset()
UINT8 vic1010_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
{
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto elem : m_expansion_slot)
{
- UINT8 slot_data = m_expansion_slot[i]->cd_r(space, offset, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
+ UINT8 slot_data = elem->cd_r(space, offset, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
if (data != slot_data)
{
@@ -119,8 +119,8 @@ UINT8 vic1010_device::vic20_cd_r(address_space &space, offs_t offset, UINT8 data
void vic1010_device::vic20_cd_w(address_space &space, offs_t offset, UINT8 data, int ram1, int ram2, int ram3, int blk1, int blk2, int blk3, int blk5, int io2, int io3)
{
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- m_expansion_slot[i]->cd_w(space, offset, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
+ elem->cd_w(space, offset, data, ram1, ram2, ram3, blk1, blk2, blk3, blk5, io2, io3);
}
}
diff --git a/src/devices/bus/vic20/vic1011.cpp b/src/devices/bus/vic20/vic1011.cpp
index 402a44f41df..0b0d30f97f5 100644
--- a/src/devices/bus/vic20/vic1011.cpp
+++ b/src/devices/bus/vic20/vic1011.cpp
@@ -30,7 +30,7 @@ const device_type VIC1011 = &device_creator<vic1011_device>;
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( vic1011 )
- 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(DEVICE_SELF, vic1011_device, output_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_h)) MCFG_DEVCB_XOR(1)
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(DEVICE_SELF, vic1011_device, output_k)) MCFG_DEVCB_XOR(1)
diff --git a/src/devices/bus/vic20/vic1112.cpp b/src/devices/bus/vic20/vic1112.cpp
index e0ee8cd91a6..9ccb180aa6a 100644
--- a/src/devices/bus/vic20/vic1112.cpp
+++ b/src/devices/bus/vic20/vic1112.cpp
@@ -109,7 +109,7 @@ static MACHINE_CONFIG_FRAGMENT( vic1112 )
MCFG_VIA6522_CB2_HANDLER(DEVWRITELINE(IEEE488_TAG, ieee488_device, eoi_w))
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(vic1112_device, via1_irq_w))
- MCFG_CBM_IEEE488_ADD(NULL)
+ MCFG_CBM_IEEE488_ADD(nullptr)
MCFG_IEEE488_SRQ_CALLBACK(DEVWRITELINE(M6522_1_TAG, via6522_device, write_cb1))
MACHINE_CONFIG_END
diff --git a/src/devices/bus/vidbrain/exp.cpp b/src/devices/bus/vidbrain/exp.cpp
index f6ad31c791a..a100e4eeebe 100644
--- a/src/devices/bus/vidbrain/exp.cpp
+++ b/src/devices/bus/vidbrain/exp.cpp
@@ -118,7 +118,7 @@ bool videobrain_expansion_slot_device::call_load()
{
size_t size = 0;
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
size = length();
@@ -168,7 +168,7 @@ UINT8 videobrain_expansion_slot_device::bo_r(address_space &space, offs_t offset
{
UINT8 data = 0;
- if (m_cart != NULL)
+ if (m_cart != nullptr)
{
data = m_cart->videobrain_bo_r(space, offset, cs1, cs2);
}
@@ -183,7 +183,7 @@ UINT8 videobrain_expansion_slot_device::bo_r(address_space &space, offs_t offset
void videobrain_expansion_slot_device::bo_w(address_space &space, offs_t offset, UINT8 data, int cs1, int cs2)
{
- if (m_cart != NULL)
+ if (m_cart != nullptr)
{
m_cart->videobrain_bo_w(space, offset, data, cs1, cs2);
}
diff --git a/src/devices/bus/vidbrain/exp.h b/src/devices/bus/vidbrain/exp.h
index 8e6064dbc94..c6f12a227f4 100644
--- a/src/devices/bus/vidbrain/exp.h
+++ b/src/devices/bus/vidbrain/exp.h
@@ -147,7 +147,7 @@ protected:
virtual bool is_reset_on_load() const { return 1; }
virtual const char *image_interface() const { return "vidbrain_cart"; }
virtual const char *file_extensions() const { return "bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/bus/vip/byteio.cpp b/src/devices/bus/vip/byteio.cpp
index fb8dda396de..871a60138f4 100644
--- a/src/devices/bus/vip/byteio.cpp
+++ b/src/devices/bus/vip/byteio.cpp
@@ -71,11 +71,11 @@ void vip_byteio_port_device::device_reset()
}
-UINT8 vip_byteio_port_device::in_r() { UINT8 data = 0xff; if (m_cart != NULL) data = m_cart->vip_in_r(); return data; }
-void vip_byteio_port_device::out_w(UINT8 data) { if (m_cart != NULL) m_cart->vip_out_w(data); }
-READ_LINE_MEMBER( vip_byteio_port_device::ef3_r ) { int state = CLEAR_LINE; if (m_cart != NULL) state = m_cart->vip_ef3_r(); return state; }
-READ_LINE_MEMBER( vip_byteio_port_device::ef4_r ) { int state = CLEAR_LINE; if (m_cart != NULL) state = m_cart->vip_ef4_r(); return state; }
-WRITE_LINE_MEMBER( vip_byteio_port_device::q_w ) { if (m_cart != NULL) m_cart->vip_q_w(state); }
+UINT8 vip_byteio_port_device::in_r() { UINT8 data = 0xff; if (m_cart != nullptr) data = m_cart->vip_in_r(); return data; }
+void vip_byteio_port_device::out_w(UINT8 data) { if (m_cart != nullptr) m_cart->vip_out_w(data); }
+READ_LINE_MEMBER( vip_byteio_port_device::ef3_r ) { int state = CLEAR_LINE; if (m_cart != nullptr) state = m_cart->vip_ef3_r(); return state; }
+READ_LINE_MEMBER( vip_byteio_port_device::ef4_r ) { int state = CLEAR_LINE; if (m_cart != nullptr) state = m_cart->vip_ef4_r(); return state; }
+WRITE_LINE_MEMBER( vip_byteio_port_device::q_w ) { if (m_cart != nullptr) m_cart->vip_q_w(state); }
//-------------------------------------------------
diff --git a/src/devices/bus/vip/exp.cpp b/src/devices/bus/vip/exp.cpp
index 24d5d8bc06a..59db0c4844d 100644
--- a/src/devices/bus/vip/exp.cpp
+++ b/src/devices/bus/vip/exp.cpp
@@ -83,7 +83,7 @@ UINT8 vip_expansion_slot_device::program_r(address_space &space, offs_t offset,
{
UINT8 data = 0;
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->vip_program_r(space, offset, cs, cdef, minh);
}
@@ -98,7 +98,7 @@ UINT8 vip_expansion_slot_device::program_r(address_space &space, offs_t offset,
void vip_expansion_slot_device::program_w(address_space &space, offs_t offset, UINT8 data, int cdef, int *minh)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->vip_program_w(space, offset, data, cdef, minh);
}
@@ -113,7 +113,7 @@ UINT8 vip_expansion_slot_device::io_r(address_space &space, offs_t offset)
{
UINT8 data = 0;
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->vip_io_r(space, offset);
}
@@ -128,7 +128,7 @@ UINT8 vip_expansion_slot_device::io_r(address_space &space, offs_t offset)
void vip_expansion_slot_device::io_w(address_space &space, offs_t offset, UINT8 data)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->vip_io_w(space, offset, data);
}
@@ -143,7 +143,7 @@ UINT8 vip_expansion_slot_device::dma_r(address_space &space, offs_t offset)
{
UINT8 data = 0;
- if (m_card != NULL)
+ if (m_card != nullptr)
{
data = m_card->vip_dma_r(space, offset);
}
@@ -158,7 +158,7 @@ UINT8 vip_expansion_slot_device::dma_r(address_space &space, offs_t offset)
void vip_expansion_slot_device::dma_w(address_space &space, offs_t offset, UINT8 data)
{
- if (m_card != NULL)
+ if (m_card != nullptr)
{
m_card->vip_dma_w(space, offset, data);
}
@@ -173,7 +173,7 @@ UINT32 vip_expansion_slot_device::screen_update(screen_device &screen, bitmap_rg
{
bool value = false;
- if (m_card != NULL)
+ if (m_card != nullptr)
{
value = m_card->vip_screen_update(screen, bitmap, cliprect);
}
@@ -181,12 +181,12 @@ UINT32 vip_expansion_slot_device::screen_update(screen_device &screen, bitmap_rg
return value;
}
-READ_LINE_MEMBER( vip_expansion_slot_device::ef1_r ) { int state = CLEAR_LINE; if (m_card != NULL) state = m_card->vip_ef1_r(); return state; }
-READ_LINE_MEMBER( vip_expansion_slot_device::ef3_r ) { int state = CLEAR_LINE; if (m_card != NULL) state = m_card->vip_ef3_r(); return state; }
-READ_LINE_MEMBER( vip_expansion_slot_device::ef4_r ) { int state = CLEAR_LINE; if (m_card != NULL) state = m_card->vip_ef4_r(); return state; }
-void vip_expansion_slot_device::sc_w(int data) { if (m_card != NULL) m_card->vip_sc_w(data); }
-WRITE_LINE_MEMBER( vip_expansion_slot_device::q_w ) { if (m_card != NULL) m_card->vip_q_w(state); }
-WRITE_LINE_MEMBER( vip_expansion_slot_device::run_w ) { if (m_card != NULL) m_card->vip_run_w(state); }
+READ_LINE_MEMBER( vip_expansion_slot_device::ef1_r ) { int state = CLEAR_LINE; if (m_card != nullptr) state = m_card->vip_ef1_r(); return state; }
+READ_LINE_MEMBER( vip_expansion_slot_device::ef3_r ) { int state = CLEAR_LINE; if (m_card != nullptr) state = m_card->vip_ef3_r(); return state; }
+READ_LINE_MEMBER( vip_expansion_slot_device::ef4_r ) { int state = CLEAR_LINE; if (m_card != nullptr) state = m_card->vip_ef4_r(); return state; }
+void vip_expansion_slot_device::sc_w(int data) { if (m_card != nullptr) m_card->vip_sc_w(data); }
+WRITE_LINE_MEMBER( vip_expansion_slot_device::q_w ) { if (m_card != nullptr) m_card->vip_q_w(state); }
+WRITE_LINE_MEMBER( vip_expansion_slot_device::run_w ) { if (m_card != nullptr) m_card->vip_run_w(state); }
diff --git a/src/devices/bus/vip/vp575.cpp b/src/devices/bus/vip/vp575.cpp
index c7801e9c414..680a2a14369 100644
--- a/src/devices/bus/vip/vp575.cpp
+++ b/src/devices/bus/vip/vp575.cpp
@@ -45,27 +45,27 @@ void vp575_device::update_interrupts()
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( vp575 )
- MCFG_VIP_EXPANSION_SLOT_ADD("exp1", XTAL_3_52128MHz/2, vip_expansion_cards, NULL)
+ MCFG_VIP_EXPANSION_SLOT_ADD("exp1", XTAL_3_52128MHz/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(vp575_device, exp1_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(vp575_device, exp1_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(vp575_device, exp1_dma_in_w))
- MCFG_VIP_EXPANSION_SLOT_ADD("exp2", XTAL_3_52128MHz/2, vip_expansion_cards, NULL)
+ MCFG_VIP_EXPANSION_SLOT_ADD("exp2", XTAL_3_52128MHz/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(vp575_device, exp2_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(vp575_device, exp2_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(vp575_device, exp2_dma_in_w))
- MCFG_VIP_EXPANSION_SLOT_ADD("exp3", XTAL_3_52128MHz/2, vip_expansion_cards, NULL)
+ MCFG_VIP_EXPANSION_SLOT_ADD("exp3", XTAL_3_52128MHz/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(vp575_device, exp3_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(vp575_device, exp3_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(vp575_device, exp3_dma_in_w))
- MCFG_VIP_EXPANSION_SLOT_ADD("exp4", XTAL_3_52128MHz/2, vip_expansion_cards, NULL)
+ MCFG_VIP_EXPANSION_SLOT_ADD("exp4", XTAL_3_52128MHz/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(vp575_device, exp4_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(vp575_device, exp4_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(vp575_device, exp4_dma_in_w))
- MCFG_VIP_EXPANSION_SLOT_ADD("exp5", XTAL_3_52128MHz/2, vip_expansion_cards, NULL)
+ MCFG_VIP_EXPANSION_SLOT_ADD("exp5", XTAL_3_52128MHz/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(vp575_device, exp5_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(vp575_device, exp5_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(vp575_device, exp5_dma_in_w))
@@ -128,9 +128,9 @@ UINT8 vp575_device::vip_program_r(address_space &space, offs_t offset, int cs, i
{
UINT8 data = 0xff;
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- data &= m_expansion_slot[i]->program_r(space, offset, cs, cdef, minh);
+ data &= elem->program_r(space, offset, cs, cdef, minh);
}
return data;
@@ -143,9 +143,9 @@ UINT8 vp575_device::vip_program_r(address_space &space, offs_t offset, int cs, i
void vp575_device::vip_program_w(address_space &space, offs_t offset, UINT8 data, int cdef, int *minh)
{
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- m_expansion_slot[i]->program_w(space, offset, data, cdef, minh);
+ elem->program_w(space, offset, data, cdef, minh);
}
}
@@ -158,9 +158,9 @@ UINT8 vp575_device::vip_io_r(address_space &space, offs_t offset)
{
UINT8 data = 0xff;
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- data &= m_expansion_slot[i]->io_r(space, offset);
+ data &= elem->io_r(space, offset);
}
return data;
@@ -173,9 +173,9 @@ UINT8 vp575_device::vip_io_r(address_space &space, offs_t offset)
void vp575_device::vip_io_w(address_space &space, offs_t offset, UINT8 data)
{
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- m_expansion_slot[i]->io_w(space, offset, data);
+ elem->io_w(space, offset, data);
}
}
@@ -188,9 +188,9 @@ UINT8 vp575_device::vip_dma_r(address_space &space, offs_t offset)
{
UINT8 data = 0xff;
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- data &= m_expansion_slot[i]->dma_r(space, offset);
+ data &= elem->dma_r(space, offset);
}
return data;
@@ -203,9 +203,9 @@ UINT8 vp575_device::vip_dma_r(address_space &space, offs_t offset)
void vp575_device::vip_dma_w(address_space &space, offs_t offset, UINT8 data)
{
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- m_expansion_slot[i]->dma_w(space, offset, data);
+ elem->dma_w(space, offset, data);
}
}
@@ -218,9 +218,9 @@ UINT32 vp575_device::vip_screen_update(screen_device &screen, bitmap_rgb32 &bitm
{
UINT32 data = 0;
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- data |= m_expansion_slot[i]->screen_update(screen, bitmap, cliprect);
+ data |= elem->screen_update(screen, bitmap, cliprect);
}
return data;
@@ -235,9 +235,9 @@ int vp575_device::vip_ef1_r()
{
int state = CLEAR_LINE;
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- state |= m_expansion_slot[i]->ef1_r();
+ state |= elem->ef1_r();
}
return state;
@@ -252,9 +252,9 @@ int vp575_device::vip_ef3_r()
{
int state = CLEAR_LINE;
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- state |= m_expansion_slot[i]->ef3_r();
+ state |= elem->ef3_r();
}
return state;
@@ -269,9 +269,9 @@ int vp575_device::vip_ef4_r()
{
int state = CLEAR_LINE;
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- state |= m_expansion_slot[i]->ef4_r();
+ state |= elem->ef4_r();
}
return state;
@@ -284,9 +284,9 @@ int vp575_device::vip_ef4_r()
void vp575_device::vip_sc_w(int data)
{
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- m_expansion_slot[i]->sc_w(data);
+ elem->sc_w(data);
}
}
@@ -297,9 +297,9 @@ void vp575_device::vip_sc_w(int data)
void vp575_device::vip_q_w(int state)
{
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- m_expansion_slot[i]->q_w(state);
+ elem->q_w(state);
}
}
@@ -310,8 +310,8 @@ void vp575_device::vip_q_w(int state)
void vp575_device::vip_run_w(int state)
{
- for (int i = 0; i < MAX_SLOTS; i++)
+ for (auto & elem : m_expansion_slot)
{
- m_expansion_slot[i]->run_w(state);
+ elem->run_w(state);
}
}
diff --git a/src/devices/bus/vtech/ioexp/ioexp.cpp b/src/devices/bus/vtech/ioexp/ioexp.cpp
index 3028ffd5226..55671583558 100644
--- a/src/devices/bus/vtech/ioexp/ioexp.cpp
+++ b/src/devices/bus/vtech/ioexp/ioexp.cpp
@@ -29,8 +29,8 @@ const device_type IOEXP_SLOT = &device_creator<ioexp_slot_device>;
ioexp_slot_device::ioexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, IOEXP_SLOT, "Peripheral Expansion Slot", tag, owner, clock, "ioexp_slot", __FILE__),
device_slot_interface(mconfig, *this),
- m_io(NULL),
- m_cart(NULL)
+ m_io(nullptr),
+ m_cart(nullptr)
{
}
diff --git a/src/devices/bus/vtech/memexp/floppy.cpp b/src/devices/bus/vtech/memexp/floppy.cpp
index a72b19fde62..afe88fce06a 100644
--- a/src/devices/bus/vtech/memexp/floppy.cpp
+++ b/src/devices/bus/vtech/memexp/floppy.cpp
@@ -115,7 +115,7 @@ void floppy_controller_device::device_reset()
m_slot->m_io->install_device(0x10, 0x1f, *this, &floppy_controller_device::map);
m_latch = 0x00;
- m_floppy = NULL;
+ m_floppy = nullptr;
m_current_cyl = 0;
m_shifter = 0x00;
m_latching_inverter = false;
@@ -141,7 +141,7 @@ WRITE8_MEMBER(floppy_controller_device::latch_w)
UINT8 diff = m_latch ^ data;
m_latch = data;
- floppy_image_device *newflop = NULL;
+ floppy_image_device *newflop = nullptr;
if(m_latch & 0x10)
newflop = m_floppy0->get_device();
else if(m_latch & 0x80)
diff --git a/src/devices/bus/vtech/memexp/memexp.cpp b/src/devices/bus/vtech/memexp/memexp.cpp
index d41b2d073b7..5b547103645 100644
--- a/src/devices/bus/vtech/memexp/memexp.cpp
+++ b/src/devices/bus/vtech/memexp/memexp.cpp
@@ -29,9 +29,9 @@ const device_type MEMEXP_SLOT = &device_creator<memexp_slot_device>;
memexp_slot_device::memexp_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, MEMEXP_SLOT, "Memory Expansion Slot", tag, owner, clock, "memexp_slot", __FILE__),
device_slot_interface(mconfig, *this),
- m_program(NULL),
- m_io(NULL),
- m_cart(NULL),
+ m_program(nullptr),
+ m_io(nullptr),
+ m_cart(nullptr),
m_int_handler(*this),
m_nmi_handler(*this),
m_reset_handler(*this)
diff --git a/src/devices/bus/vtech/memexp/rs232.cpp b/src/devices/bus/vtech/memexp/rs232.cpp
index bd74662c9f5..42e281151b1 100644
--- a/src/devices/bus/vtech/memexp/rs232.cpp
+++ b/src/devices/bus/vtech/memexp/rs232.cpp
@@ -35,7 +35,7 @@ const rom_entry *rs232_interface_device::device_rom_region() const
//-------------------------------------------------
static MACHINE_CONFIG_FRAGMENT( rs232 )
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(rs232_interface_device, rs232_rx_w))
MACHINE_CONFIG_END
diff --git a/src/devices/bus/wangpc/rtc.cpp b/src/devices/bus/wangpc/rtc.cpp
index 2f2ea7a073f..f8a436af0c8 100644
--- a/src/devices/bus/wangpc/rtc.cpp
+++ b/src/devices/bus/wangpc/rtc.cpp
@@ -95,7 +95,7 @@ static const z80_daisy_config wangpc_rtc_daisy_chain[] =
{ Z80SIO_TAG },
{ Z80CTC_0_TAG },
{ Z80CTC_1_TAG },
- { NULL }
+ { nullptr }
};
//-------------------------------------------------
diff --git a/src/devices/bus/wswan/slot.cpp b/src/devices/bus/wswan/slot.cpp
index f5efc58ad32..749f82596e1 100644
--- a/src/devices/bus/wswan/slot.cpp
+++ b/src/devices/bus/wswan/slot.cpp
@@ -27,7 +27,7 @@ const device_type WS_CART_SLOT = &device_creator<ws_cart_slot_device>;
device_ws_cart_interface::device_ws_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),
m_bank_mask(0),
m_has_rtc(false),
@@ -50,7 +50,7 @@ device_ws_cart_interface::~device_ws_cart_interface()
void device_ws_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(WSSLOT_ROM_REGION_TAG).c_str(), size, 1, ENDIANNESS_LITTLE)->base();
m_rom_size = size;
@@ -135,10 +135,10 @@ static const ws_slot slot_list[] =
static int ws_get_pcb_id(const char *slot)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (!core_stricmp(slot_list[i].slot_option, slot))
- return slot_list[i].pcb_id;
+ if (!core_stricmp(elem.slot_option, slot))
+ return elem.pcb_id;
}
return 0;
@@ -146,10 +146,10 @@ static int ws_get_pcb_id(const char *slot)
static const char *ws_get_slot(int type)
{
- for (int i = 0; i < ARRAY_LENGTH(slot_list); i++)
+ for (auto & elem : slot_list)
{
- if (slot_list[i].pcb_id == type)
- return slot_list[i].slot_option;
+ if (elem.pcb_id == type)
+ return elem.slot_option;
}
return "std";
@@ -165,18 +165,18 @@ bool ws_cart_slot_device::call_load()
if (m_cart)
{
UINT8 *ROM;
- UINT32 size = (software_entry() == NULL) ? length() : get_software_region_length("rom");
+ UINT32 size = (software_entry() == nullptr) ? length() : get_software_region_length("rom");
UINT32 nvram_size = 0;
m_cart->rom_alloc(size, tag());
ROM = m_cart->get_rom_base();
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
fread(ROM, size);
else
memcpy(ROM, get_software_region("rom"), size);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
int chunks = size / 0x10000;
// get cart type and nvram length
diff --git a/src/devices/bus/wswan/slot.h b/src/devices/bus/wswan/slot.h
index 87ac47a2a97..621b2192901 100644
--- a/src/devices/bus/wswan/slot.h
+++ b/src/devices/bus/wswan/slot.h
@@ -91,7 +91,7 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 1; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual const char *image_interface() const { return "wswan_cart"; }
virtual const char *file_extensions() const { return "ws,wsc,bin"; }
diff --git a/src/devices/bus/z88/z88.cpp b/src/devices/bus/z88/z88.cpp
index 66b784129a7..2cbc97c53dd 100644
--- a/src/devices/bus/z88/z88.cpp
+++ b/src/devices/bus/z88/z88.cpp
@@ -124,9 +124,9 @@ bool z88cart_slot_device::call_load()
offs_t read_length = 0;
UINT8 *cart_base = m_cart->get_cart_base();
- if (cart_base != NULL)
+ if (cart_base != nullptr)
{
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
read_length = length();
fread(cart_base + (m_cart->get_cart_size() - read_length), read_length);
diff --git a/src/devices/bus/z88/z88.h b/src/devices/bus/z88/z88.h
index bcba1671941..aab70382445 100644
--- a/src/devices/bus/z88/z88.h
+++ b/src/devices/bus/z88/z88.h
@@ -70,7 +70,7 @@ public:
// reading and writing
virtual DECLARE_READ8_MEMBER(read) { return 0xff; }
virtual DECLARE_WRITE8_MEMBER(write) { }
- virtual UINT8* get_cart_base() { return NULL; }
+ virtual UINT8* get_cart_base() { return nullptr; }
virtual UINT32 get_cart_size() { return 0; }
};
@@ -106,7 +106,7 @@ public:
virtual bool is_reset_on_load() const { return 0; }
virtual const char *image_interface() const { return "z88_cart"; }
virtual const char *file_extensions() const { return "epr,bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// slot interface overrides
virtual void get_default_card_software(std::string &result);
diff --git a/src/devices/cpu/8x300/8x300.h b/src/devices/cpu/8x300/8x300.h
index 274f161c889..64529bad9e6 100644
--- a/src/devices/cpu/8x300/8x300.h
+++ b/src/devices/cpu/8x300/8x300.h
@@ -61,7 +61,7 @@ protected:
{
case AS_PROGRAM: return &m_program_config;
case AS_IO: return &m_io_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/adsp2100/adsp2100.cpp b/src/devices/cpu/adsp2100/adsp2100.cpp
index 8142a6a7a34..e0e38ef3264 100644
--- a/src/devices/cpu/adsp2100/adsp2100.cpp
+++ b/src/devices/cpu/adsp2100/adsp2100.cpp
@@ -410,7 +410,7 @@ void adsp21xx_device::device_start()
m_program = &space(AS_PROGRAM);
m_direct = &m_program->direct();
m_data = &space(AS_DATA);
- m_io = has_space(AS_IO) ? &space(AS_IO) : NULL;
+ m_io = has_space(AS_IO) ? &space(AS_IO) : nullptr;
// "core"
save_item(NAME(m_core.ax0.u));
@@ -646,14 +646,14 @@ const address_space_config *adsp2100_device::memory_space_config(address_spacenu
{
return (spacenum == AS_PROGRAM) ? &m_program_config :
(spacenum == AS_DATA) ? &m_data_config :
- NULL;
+ nullptr;
}
const address_space_config *adsp2101_device::memory_space_config(address_spacenum spacenum) const
{
return (spacenum == AS_PROGRAM) ? &m_program_config :
(spacenum == AS_DATA) ? &m_data_config :
- NULL;
+ nullptr;
}
const address_space_config *adsp2181_device::memory_space_config(address_spacenum spacenum) const
@@ -661,7 +661,7 @@ const address_space_config *adsp2181_device::memory_space_config(address_spacenu
return (spacenum == AS_PROGRAM) ? &m_program_config :
(spacenum == AS_DATA) ? &m_data_config :
(spacenum == AS_IO) ? &m_io_config :
- NULL;
+ nullptr;
}
diff --git a/src/devices/cpu/alph8201/8201dasm.cpp b/src/devices/cpu/alph8201/8201dasm.cpp
index 76581fe0ab0..6f4b816990b 100644
--- a/src/devices/cpu/alph8201/8201dasm.cpp
+++ b/src/devices/cpu/alph8201/8201dasm.cpp
@@ -268,7 +268,7 @@ static const char *const Formats[] = {
FMT("1111_1101", "CLR A"), // FD :
FMT("1111_1110", "LD A,(IX0+A)"), // FE :
FMT("1111_1111", "RET"), // FF :
- NULL
+ nullptr
};
#define MAX_OPS ((ARRAY_LENGTH(Formats) - 1) / PTRS_PER_FORMAT)
@@ -294,7 +294,7 @@ static void InitDasm8201(void)
char chr , type;
int pmask , pdown;
- for(i=0;(p=Formats[i*2])!=NULL;i++)
+ for(i=0;(p=Formats[i*2])!=nullptr;i++)
{
mask = 0;
bits = 0;
@@ -339,7 +339,7 @@ static void InitDasm8201(void)
if( (*p) )
Op[i].type |= 0x10;
/* number of param */
- if( (p=strchr(Op[i].fmt,'%'))!=NULL )
+ if( (p=strchr(Op[i].fmt,'%'))!=nullptr )
{
Op[i].type |= 0x01; /* single param */
if(strchr(p+1,'%') )
diff --git a/src/devices/cpu/alph8201/alph8201.h b/src/devices/cpu/alph8201/alph8201.h
index 73b90974d83..904279026c9 100644
--- a/src/devices/cpu/alph8201/alph8201.h
+++ b/src/devices/cpu/alph8201/alph8201.h
@@ -70,7 +70,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/alto2/a2curt.cpp b/src/devices/cpu/alto2/a2curt.cpp
index 1225a5d62d5..bc934afef45 100644
--- a/src/devices/cpu/alto2/a2curt.cpp
+++ b/src/devices/cpu/alto2/a2curt.cpp
@@ -67,9 +67,9 @@ void alto2_cpu_device::activate_curt()
/** @brief initialize the cursor task F1 and F2 functions */
void alto2_cpu_device::init_curt(int task)
{
- set_f1(task, f1_block, &alto2_cpu_device::f1_early_curt_block, 0);
- set_f2(task, f2_curt_load_xpreg, 0, &alto2_cpu_device::f2_late_load_xpreg);
- set_f2(task, f2_curt_load_csr, 0, &alto2_cpu_device::f2_late_load_csr);
+ set_f1(task, f1_block, &alto2_cpu_device::f1_early_curt_block, nullptr);
+ set_f2(task, f2_curt_load_xpreg, nullptr, &alto2_cpu_device::f2_late_load_xpreg);
+ set_f2(task, f2_curt_load_csr, nullptr, &alto2_cpu_device::f2_late_load_csr);
m_active_callback[task] = &alto2_cpu_device::activate_curt;
}
diff --git a/src/devices/cpu/alto2/a2dht.cpp b/src/devices/cpu/alto2/a2dht.cpp
index 3ed8450a5dd..2f9aef63906 100644
--- a/src/devices/cpu/alto2/a2dht.cpp
+++ b/src/devices/cpu/alto2/a2dht.cpp
@@ -49,9 +49,9 @@ void alto2_cpu_device::activate_dht()
*/
void alto2_cpu_device::init_dht(int task)
{
- set_f1(task, f1_block, &alto2_cpu_device::f1_early_dht_block, 0);
- set_f2(task, f2_dht_evenfield, 0, &alto2_cpu_device::f2_late_evenfield);
- set_f2(task, f2_dht_setmode, 0, &alto2_cpu_device::f2_late_dht_setmode);
+ set_f1(task, f1_block, &alto2_cpu_device::f1_early_dht_block, nullptr);
+ set_f2(task, f2_dht_evenfield, nullptr, &alto2_cpu_device::f2_late_evenfield);
+ set_f2(task, f2_dht_setmode, nullptr, &alto2_cpu_device::f2_late_dht_setmode);
m_active_callback[task] = &alto2_cpu_device::activate_dht;
}
diff --git a/src/devices/cpu/alto2/a2disk.cpp b/src/devices/cpu/alto2/a2disk.cpp
index 4ca564c0bd2..8075ae3ed39 100644
--- a/src/devices/cpu/alto2/a2disk.cpp
+++ b/src/devices/cpu/alto2/a2disk.cpp
@@ -1026,7 +1026,7 @@ void alto2_cpu_device::f1_late_strobe()
LOG((this,LOG_DISK,1," STROBE (SENDADR:1)\n"));
/* Set the STROBON flag and start the STROBON monoflop */
m_dsk.strobe = 1;
- disk_strobon(0,
+ disk_strobon(nullptr,
4 * GET_KADDR_CYLINDER(m_dsk.kaddr) +
2 * GET_KADDR_RESTORE(m_dsk.kaddr) +
m_dsk.drive);
diff --git a/src/devices/cpu/alto2/a2disp.cpp b/src/devices/cpu/alto2/a2disp.cpp
index 7391e506146..82b0e083cf8 100644
--- a/src/devices/cpu/alto2/a2disp.cpp
+++ b/src/devices/cpu/alto2/a2disp.cpp
@@ -35,7 +35,7 @@
static const prom_load_t pl_displ_a38 =
{
"displ.a38",
- 0,
+ nullptr,
"fd30beb7",
"65e4a19ba4ff748d525122128c514abedd55d866",
/* size */ 0400,
@@ -123,7 +123,7 @@ static const prom_load_t pl_displ_a38 =
static const prom_load_t pl_displ_a63 =
{
"displ.a63",
- 0,
+ nullptr,
"82a20d60",
"39d90703568be5419ada950e112d99227873fdea",
/* size */ 0040,
@@ -166,7 +166,7 @@ static const prom_load_t pl_displ_a63 =
static const prom_load_t pl_displ_a66 =
{
"displ.a66",
- 0,
+ nullptr,
"9f91aad9",
"69b1d4c71f4e18103112e8601850c2654e9265cf",
/* size */ 0400,
diff --git a/src/devices/cpu/alto2/a2dvt.cpp b/src/devices/cpu/alto2/a2dvt.cpp
index 8704ad0d53d..ad019b6b07b 100644
--- a/src/devices/cpu/alto2/a2dvt.cpp
+++ b/src/devices/cpu/alto2/a2dvt.cpp
@@ -30,8 +30,8 @@ void alto2_cpu_device::activate_dvt()
*/
void alto2_cpu_device::init_dvt(int task)
{
- set_f1(task, f1_block, &alto2_cpu_device::f1_early_dvt_block, 0);
- set_f2(task, f2_dvt_evenfield, 0, &alto2_cpu_device::f2_late_evenfield);
+ set_f1(task, f1_block, &alto2_cpu_device::f1_early_dvt_block, nullptr);
+ set_f2(task, f2_dvt_evenfield, nullptr, &alto2_cpu_device::f2_late_evenfield);
m_active_callback[task] = &alto2_cpu_device::activate_dvt;
}
diff --git a/src/devices/cpu/alto2/a2dwt.cpp b/src/devices/cpu/alto2/a2dwt.cpp
index b5fd716617c..3c6867b9f05 100644
--- a/src/devices/cpu/alto2/a2dwt.cpp
+++ b/src/devices/cpu/alto2/a2dwt.cpp
@@ -44,8 +44,8 @@ void alto2_cpu_device::f2_late_dwt_load_ddr()
void alto2_cpu_device::init_dwt(int task)
{
- set_f1(task, f1_block, &alto2_cpu_device::f1_early_dwt_block, 0);
- set_f2(task, f2_dwt_load_ddr, 0, &alto2_cpu_device::f2_late_dwt_load_ddr);
+ set_f1(task, f1_block, &alto2_cpu_device::f1_early_dwt_block, nullptr);
+ set_f2(task, f2_dwt_load_ddr, nullptr, &alto2_cpu_device::f2_late_dwt_load_ddr);
}
void alto2_cpu_device::exit_dwt()
diff --git a/src/devices/cpu/alto2/a2emu.cpp b/src/devices/cpu/alto2/a2emu.cpp
index 57f6e4ece76..75fe6588d67 100644
--- a/src/devices/cpu/alto2/a2emu.cpp
+++ b/src/devices/cpu/alto2/a2emu.cpp
@@ -657,26 +657,26 @@ void alto2_cpu_device::init_emu(int task)
init_ram(task);
- set_bs(task, bs_emu_read_sreg, &alto2_cpu_device::bs_early_read_sreg, 0);
+ set_bs(task, bs_emu_read_sreg, &alto2_cpu_device::bs_early_read_sreg, nullptr);
set_bs(task, bs_emu_load_sreg, &alto2_cpu_device::bs_early_load_sreg, &alto2_cpu_device::bs_late_load_sreg);
- set_bs(task, bs_disp, &alto2_cpu_device::bs_early_emu_disp, 0);
-
- set_f1(task, f1_block, &alto2_cpu_device::f1_early_emu_block, 0); // catch the emulator task trying to block (wrong branch)
- set_f1(task, f1_emu_swmode, 0, &alto2_cpu_device::f1_late_swmode);
- set_f1(task, f1_emu_wrtram, 0, &alto2_cpu_device::f1_late_wrtram);
- set_f1(task, f1_emu_rdram, 0, &alto2_cpu_device::f1_late_rdram);
- set_f1(task, f1_emu_load_rmr, 0, &alto2_cpu_device::f1_late_emu_load_rmr);
- set_f1(task, f1_task_14, 0, 0); // F1 014 is undefined (?)
- set_f1(task, f1_emu_load_esrb, 0, &alto2_cpu_device::f1_late_emu_load_esrb);
- set_f1(task, f1_emu_rsnf, &alto2_cpu_device::f1_early_rsnf, 0);
- set_f1(task, f1_emu_startf, &alto2_cpu_device::f1_early_startf, 0);
-
- set_f2(task, f2_emu_busodd, 0, &alto2_cpu_device::f2_late_busodd);
- set_f2(task, f2_emu_magic, 0, &alto2_cpu_device::f2_late_magic);
+ set_bs(task, bs_disp, &alto2_cpu_device::bs_early_emu_disp, nullptr);
+
+ set_f1(task, f1_block, &alto2_cpu_device::f1_early_emu_block, nullptr); // catch the emulator task trying to block (wrong branch)
+ set_f1(task, f1_emu_swmode, nullptr, &alto2_cpu_device::f1_late_swmode);
+ set_f1(task, f1_emu_wrtram, nullptr, &alto2_cpu_device::f1_late_wrtram);
+ set_f1(task, f1_emu_rdram, nullptr, &alto2_cpu_device::f1_late_rdram);
+ set_f1(task, f1_emu_load_rmr, nullptr, &alto2_cpu_device::f1_late_emu_load_rmr);
+ set_f1(task, f1_task_14, nullptr, nullptr); // F1 014 is undefined (?)
+ set_f1(task, f1_emu_load_esrb, nullptr, &alto2_cpu_device::f1_late_emu_load_esrb);
+ set_f1(task, f1_emu_rsnf, &alto2_cpu_device::f1_early_rsnf, nullptr);
+ set_f1(task, f1_emu_startf, &alto2_cpu_device::f1_early_startf, nullptr);
+
+ set_f2(task, f2_emu_busodd, nullptr, &alto2_cpu_device::f2_late_busodd);
+ set_f2(task, f2_emu_magic, nullptr, &alto2_cpu_device::f2_late_magic);
set_f2(task, f2_emu_load_dns, &alto2_cpu_device::f2_early_load_dns, &alto2_cpu_device::f2_late_load_dns);
- set_f2(task, f2_emu_acdest, &alto2_cpu_device::f2_early_acdest, 0);
- set_f2(task, f2_emu_load_ir, 0, &alto2_cpu_device::f2_late_load_ir);
- set_f2(task, f2_emu_idisp, 0, &alto2_cpu_device::f2_late_idisp);
+ set_f2(task, f2_emu_acdest, &alto2_cpu_device::f2_early_acdest, nullptr);
+ set_f2(task, f2_emu_load_ir, nullptr, &alto2_cpu_device::f2_late_load_ir);
+ set_f2(task, f2_emu_idisp, nullptr, &alto2_cpu_device::f2_late_idisp);
set_f2(task, f2_emu_acsource, &alto2_cpu_device::f2_early_acsource, &alto2_cpu_device::f2_late_acsource);
}
diff --git a/src/devices/cpu/alto2/a2ether.cpp b/src/devices/cpu/alto2/a2ether.cpp
index 314da97cc7a..e93d2473980 100644
--- a/src/devices/cpu/alto2/a2ether.cpp
+++ b/src/devices/cpu/alto2/a2ether.cpp
@@ -245,7 +245,7 @@ static void dump_packet(device_t *device, const char* name, const UINT16 *src, s
*/
void alto2_cpu_device::eth_wakeup()
{
- register int st = m_eth.status;
+ int st = m_eth.status;
LOG((this,LOG_ETH,0,"IBUSY=%d OBUSY=%d ", GET_ETH_IBUSY(st), GET_ETH_OBUSY(st)));
UINT8 busy = GET_ETH_IBUSY(st) | GET_ETH_OBUSY(st);
if (0 == busy) {
diff --git a/src/devices/cpu/alto2/a2hw.cpp b/src/devices/cpu/alto2/a2hw.cpp
index 8e2dd031e64..4ece160d206 100644
--- a/src/devices/cpu/alto2/a2hw.cpp
+++ b/src/devices/cpu/alto2/a2hw.cpp
@@ -362,7 +362,7 @@ WRITE16_MEMBER( alto2_cpu_device::utilout_w )
static const prom_load_t pl_madr_a64 =
{
"madr.a64",
- 0,
+ nullptr,
"a66b0eda",
"4d9088f592caa3299e90966b17765be74e523144",
/* size */ 0400,
@@ -379,7 +379,7 @@ static const prom_load_t pl_madr_a64 =
static const prom_load_t pl_madr_a65 =
{
"madr.a65",
- 0,
+ nullptr,
"ba37febd",
"82e9db1cb65f451755295f0d179e6f8fe3349d4d",
/* size */ 0400,
diff --git a/src/devices/cpu/alto2/a2ksec.cpp b/src/devices/cpu/alto2/a2ksec.cpp
index fe8990b9707..9e288aeead9 100644
--- a/src/devices/cpu/alto2/a2ksec.cpp
+++ b/src/devices/cpu/alto2/a2ksec.cpp
@@ -17,28 +17,28 @@ void alto2_cpu_device::f1_early_ksec_block()
//! disk sector task slot initialization
void alto2_cpu_device::init_ksec(int task)
{
- set_bs(task, bs_ksec_read_kstat, &alto2_cpu_device::bs_early_read_kstat, 0);
- set_bs(task, bs_ksec_read_kdata, &alto2_cpu_device::bs_early_read_kdata, 0);
-
- set_f1(task, f1_block, &alto2_cpu_device::f1_early_ksec_block, 0);
-
- set_f1(task, f1_task_10, 0, 0);
- set_f1(task, f1_ksec_strobe, 0, &alto2_cpu_device::f1_late_strobe);
- set_f1(task, f1_ksec_load_kstat, 0, &alto2_cpu_device::f1_late_load_kstat);
- set_f1(task, f1_ksec_increcno, 0, &alto2_cpu_device::f1_late_increcno);
- set_f1(task, f1_ksec_clrstat, 0, &alto2_cpu_device::f1_late_clrstat);
- set_f1(task, f1_ksec_load_kcom, 0, &alto2_cpu_device::f1_late_load_kcom);
- set_f1(task, f1_ksec_load_kadr, 0, &alto2_cpu_device::f1_late_load_kadr);
- set_f1(task, f1_ksec_load_kdata, 0, &alto2_cpu_device::f1_late_load_kdata);
-
- set_f2(task, f2_ksec_init, 0, &alto2_cpu_device::f2_late_init);
- set_f2(task, f2_ksec_rwc, 0, &alto2_cpu_device::f2_late_rwc);
- set_f2(task, f2_ksec_recno, 0, &alto2_cpu_device::f2_late_recno);
- set_f2(task, f2_ksec_xfrdat, 0, &alto2_cpu_device::f2_late_xfrdat);
- set_f2(task, f2_ksec_swrnrdy, 0, &alto2_cpu_device::f2_late_swrnrdy);
- set_f2(task, f2_ksec_nfer, 0, &alto2_cpu_device::f2_late_nfer);
- set_f2(task, f2_ksec_strobon, 0, &alto2_cpu_device::f2_late_strobon);
- set_f2(task, f2_task_17, 0, 0);
+ set_bs(task, bs_ksec_read_kstat, &alto2_cpu_device::bs_early_read_kstat, nullptr);
+ set_bs(task, bs_ksec_read_kdata, &alto2_cpu_device::bs_early_read_kdata, nullptr);
+
+ set_f1(task, f1_block, &alto2_cpu_device::f1_early_ksec_block, nullptr);
+
+ set_f1(task, f1_task_10, nullptr, nullptr);
+ set_f1(task, f1_ksec_strobe, nullptr, &alto2_cpu_device::f1_late_strobe);
+ set_f1(task, f1_ksec_load_kstat, nullptr, &alto2_cpu_device::f1_late_load_kstat);
+ set_f1(task, f1_ksec_increcno, nullptr, &alto2_cpu_device::f1_late_increcno);
+ set_f1(task, f1_ksec_clrstat, nullptr, &alto2_cpu_device::f1_late_clrstat);
+ set_f1(task, f1_ksec_load_kcom, nullptr, &alto2_cpu_device::f1_late_load_kcom);
+ set_f1(task, f1_ksec_load_kadr, nullptr, &alto2_cpu_device::f1_late_load_kadr);
+ set_f1(task, f1_ksec_load_kdata, nullptr, &alto2_cpu_device::f1_late_load_kdata);
+
+ set_f2(task, f2_ksec_init, nullptr, &alto2_cpu_device::f2_late_init);
+ set_f2(task, f2_ksec_rwc, nullptr, &alto2_cpu_device::f2_late_rwc);
+ set_f2(task, f2_ksec_recno, nullptr, &alto2_cpu_device::f2_late_recno);
+ set_f2(task, f2_ksec_xfrdat, nullptr, &alto2_cpu_device::f2_late_xfrdat);
+ set_f2(task, f2_ksec_swrnrdy, nullptr, &alto2_cpu_device::f2_late_swrnrdy);
+ set_f2(task, f2_ksec_nfer, nullptr, &alto2_cpu_device::f2_late_nfer);
+ set_f2(task, f2_ksec_strobon, nullptr, &alto2_cpu_device::f2_late_strobon);
+ set_f2(task, f2_task_17, nullptr, nullptr);
m_task_wakeup |= 1 << task;
}
diff --git a/src/devices/cpu/alto2/a2kwd.cpp b/src/devices/cpu/alto2/a2kwd.cpp
index 5ed7a75dfd3..f93343e908b 100644
--- a/src/devices/cpu/alto2/a2kwd.cpp
+++ b/src/devices/cpu/alto2/a2kwd.cpp
@@ -17,28 +17,28 @@ void alto2_cpu_device::f1_early_kwd_block()
//! disk word task slot initialization
void alto2_cpu_device::init_kwd(int task)
{
- set_bs(task, bs_kwd_read_kstat, &alto2_cpu_device::bs_early_read_kstat, 0);
- set_bs(task, bs_kwd_read_kdata, &alto2_cpu_device::bs_early_read_kdata, 0);
+ set_bs(task, bs_kwd_read_kstat, &alto2_cpu_device::bs_early_read_kstat, nullptr);
+ set_bs(task, bs_kwd_read_kdata, &alto2_cpu_device::bs_early_read_kdata, nullptr);
- set_f1(task, f1_block, &alto2_cpu_device::f1_early_kwd_block, 0);
+ set_f1(task, f1_block, &alto2_cpu_device::f1_early_kwd_block, nullptr);
- set_f1(task, f1_task_10, 0, 0);
- set_f1(task, f1_kwd_strobe, 0, &alto2_cpu_device::f1_late_strobe);
- set_f1(task, f1_kwd_load_kstat, 0, &alto2_cpu_device::f1_late_load_kstat);
- set_f1(task, f1_kwd_increcno, 0, &alto2_cpu_device::f1_late_increcno);
- set_f1(task, f1_kwd_clrstat, 0, &alto2_cpu_device::f1_late_clrstat);
- set_f1(task, f1_kwd_load_kcom, 0, &alto2_cpu_device::f1_late_load_kcom);
- set_f1(task, f1_kwd_load_kadr, 0, &alto2_cpu_device::f1_late_load_kadr);
- set_f1(task, f1_kwd_load_kdata, 0, &alto2_cpu_device::f1_late_load_kdata);
+ set_f1(task, f1_task_10, nullptr, nullptr);
+ set_f1(task, f1_kwd_strobe, nullptr, &alto2_cpu_device::f1_late_strobe);
+ set_f1(task, f1_kwd_load_kstat, nullptr, &alto2_cpu_device::f1_late_load_kstat);
+ set_f1(task, f1_kwd_increcno, nullptr, &alto2_cpu_device::f1_late_increcno);
+ set_f1(task, f1_kwd_clrstat, nullptr, &alto2_cpu_device::f1_late_clrstat);
+ set_f1(task, f1_kwd_load_kcom, nullptr, &alto2_cpu_device::f1_late_load_kcom);
+ set_f1(task, f1_kwd_load_kadr, nullptr, &alto2_cpu_device::f1_late_load_kadr);
+ set_f1(task, f1_kwd_load_kdata, nullptr, &alto2_cpu_device::f1_late_load_kdata);
- set_f2(task, f2_kwd_init, 0, &alto2_cpu_device::f2_late_init);
- set_f2(task, f2_kwd_rwc, 0, &alto2_cpu_device::f2_late_rwc);
- set_f2(task, f2_kwd_recno, 0, &alto2_cpu_device::f2_late_recno);
- set_f2(task, f2_kwd_xfrdat, 0, &alto2_cpu_device::f2_late_xfrdat);
- set_f2(task, f2_kwd_swrnrdy, 0, &alto2_cpu_device::f2_late_swrnrdy);
- set_f2(task, f2_kwd_nfer, 0, &alto2_cpu_device::f2_late_nfer);
- set_f2(task, f2_kwd_strobon, 0, &alto2_cpu_device::f2_late_strobon);
- set_f2(task, f2_task_17, 0, 0);
+ set_f2(task, f2_kwd_init, nullptr, &alto2_cpu_device::f2_late_init);
+ set_f2(task, f2_kwd_rwc, nullptr, &alto2_cpu_device::f2_late_rwc);
+ set_f2(task, f2_kwd_recno, nullptr, &alto2_cpu_device::f2_late_recno);
+ set_f2(task, f2_kwd_xfrdat, nullptr, &alto2_cpu_device::f2_late_xfrdat);
+ set_f2(task, f2_kwd_swrnrdy, nullptr, &alto2_cpu_device::f2_late_swrnrdy);
+ set_f2(task, f2_kwd_nfer, nullptr, &alto2_cpu_device::f2_late_nfer);
+ set_f2(task, f2_kwd_strobon, nullptr, &alto2_cpu_device::f2_late_strobon);
+ set_f2(task, f2_task_17, nullptr, nullptr);
}
void alto2_cpu_device::exit_kwd()
diff --git a/src/devices/cpu/alto2/a2mem.cpp b/src/devices/cpu/alto2/a2mem.cpp
index 84b41e784d8..9d07ed0dd13 100644
--- a/src/devices/cpu/alto2/a2mem.cpp
+++ b/src/devices/cpu/alto2/a2mem.cpp
@@ -326,29 +326,29 @@ static const int hamming_lut[64] = {
*/
UINT32 alto2_cpu_device::hamming_code(int write, UINT32 dw_addr, UINT32 dw_data)
{
- register UINT8 hpb = write ? 0 : m_mem.hpb[dw_addr];
- register UINT8 hc_0_a;
- register UINT8 hc_0b1;
- register UINT8 hc_1_a;
- register UINT8 hc_2_a;
- register UINT8 hc_2_b;
- register UINT8 hc_0;
- register UINT8 hc_1;
- register UINT8 hc_2;
- register UINT8 h_0_2;
- register UINT8 hc_3_a;
- register UINT8 hc_3_4;
- register UINT8 hcpa;
- register UINT8 hc_4_a;
- register UINT8 hc_3;
- register UINT8 hc_4;
- register UINT8 hc_5;
- register UINT8 hcpb;
- register UINT8 perr;
- register UINT8 pca;
- register UINT8 pcb;
- register UINT8 pc;
- register int syndrome;
+ UINT8 hpb = write ? 0 : m_mem.hpb[dw_addr];
+ UINT8 hc_0_a;
+ UINT8 hc_0b1;
+ UINT8 hc_1_a;
+ UINT8 hc_2_a;
+ UINT8 hc_2_b;
+ UINT8 hc_0;
+ UINT8 hc_1;
+ UINT8 hc_2;
+ UINT8 h_0_2;
+ UINT8 hc_3_a;
+ UINT8 hc_3_4;
+ UINT8 hcpa;
+ UINT8 hc_4_a;
+ UINT8 hc_3;
+ UINT8 hc_4;
+ UINT8 hc_5;
+ UINT8 hcpb;
+ UINT8 perr;
+ UINT8 pca;
+ UINT8 pcb;
+ UINT8 pc;
+ int syndrome;
/* a75: WD01 WD04 WD08 WD11 WD15 WD19 WD23 WD26 WD30 --- HC(0)A */
hc_0_a = parity_odd (dw_data & A75);
diff --git a/src/devices/cpu/alto2/a2mouse.cpp b/src/devices/cpu/alto2/a2mouse.cpp
index 0844d45de6d..410811ed315 100644
--- a/src/devices/cpu/alto2/a2mouse.cpp
+++ b/src/devices/cpu/alto2/a2mouse.cpp
@@ -212,7 +212,7 @@ INPUT_CHANGED_MEMBER( alto2_cpu_device::mouse_button_2 )
static const prom_load_t pl_madr_a32 =
{
"madr.a32",
- 0,
+ nullptr,
"a0e3b4a7",
"24e50afdeb637a6a8588f8d3a3493c9188b8da2c",
/* size */ 0400,
diff --git a/src/devices/cpu/alto2/a2mrt.cpp b/src/devices/cpu/alto2/a2mrt.cpp
index 921eb35ad69..92a7aa6333a 100644
--- a/src/devices/cpu/alto2/a2mrt.cpp
+++ b/src/devices/cpu/alto2/a2mrt.cpp
@@ -29,7 +29,7 @@ void alto2_cpu_device::activate_mrt()
//! memory refresh task slots initialization
void alto2_cpu_device::init_mrt(int task)
{
- set_f1(task, f1_block, &alto2_cpu_device::f1_early_mrt_block, 0);
+ set_f1(task, f1_block, &alto2_cpu_device::f1_early_mrt_block, nullptr);
/* auto block */
m_active_callback[task] = &alto2_cpu_device::activate_mrt;
}
diff --git a/src/devices/cpu/alto2/a2ram.cpp b/src/devices/cpu/alto2/a2ram.cpp
index 0f133c2dfd6..425f3f60634 100644
--- a/src/devices/cpu/alto2/a2ram.cpp
+++ b/src/devices/cpu/alto2/a2ram.cpp
@@ -411,16 +411,16 @@ void alto2_cpu_device::init_ram(int task)
{
m_ram_related[task] = true;
- set_bs(task, bs_ram_read_slocation, &alto2_cpu_device::bs_early_read_sreg, 0);
+ set_bs(task, bs_ram_read_slocation, &alto2_cpu_device::bs_early_read_sreg, nullptr);
set_bs(task, bs_ram_load_slocation, &alto2_cpu_device::bs_early_load_sreg, &alto2_cpu_device::bs_late_load_sreg);
- set_f1(task, f1_ram_swmode, 0, &alto2_cpu_device::f1_late_swmode);
- set_f1(task, f1_ram_wrtram, 0, &alto2_cpu_device::f1_late_wrtram);
- set_f1(task, f1_ram_rdram, 0, &alto2_cpu_device::f1_late_rdram);
+ set_f1(task, f1_ram_swmode, nullptr, &alto2_cpu_device::f1_late_swmode);
+ set_f1(task, f1_ram_wrtram, nullptr, &alto2_cpu_device::f1_late_wrtram);
+ set_f1(task, f1_ram_rdram, nullptr, &alto2_cpu_device::f1_late_rdram);
#if (ALTO2_UCODE_RAM_PAGES == 3)
set_f1(task, f1_ram_load_rmr, 0, &alto2_cpu_device::f1_late_load_rmr);
#else // ALTO2_UCODE_RAM_PAGES != 3
- set_f1(task, f1_ram_load_srb, 0, &alto2_cpu_device::f1_late_load_srb);
+ set_f1(task, f1_ram_load_srb, nullptr, &alto2_cpu_device::f1_late_load_srb);
#endif
}
diff --git a/src/devices/cpu/alto2/a2roms.cpp b/src/devices/cpu/alto2/a2roms.cpp
index 1b859aa07aa..aa457024f78 100644
--- a/src/devices/cpu/alto2/a2roms.cpp
+++ b/src/devices/cpu/alto2/a2roms.cpp
@@ -50,7 +50,7 @@ static UINT32 log2_u32(UINT32 val)
*/
static UINT32 map_lines(const UINT8 *map, int lines, UINT32 val)
{
- if (NULL == map)
+ if (nullptr == map)
return val;
UINT32 res = 0;
@@ -105,7 +105,7 @@ static void write_type_and_xor(void *base, int type, UINT32 addr, UINT32 dand, U
*/
UINT8* prom_load(running_machine& machine, const prom_load_t* prom, const UINT8* src, int pages, int segments)
{
- void* array = 0;
+ void* array = nullptr;
size_t type = prom->type;
size_t size = prom->size;
#if DEBUG_PROM_LOAD
diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp
index 1e02302e2b4..65ba3d90312 100644
--- a/src/devices/cpu/alto2/alto2cpu.cpp
+++ b/src/devices/cpu/alto2/alto2cpu.cpp
@@ -1725,14 +1725,14 @@ void alto2_cpu_device::f1_early_task()
{
#if USE_PRIO_F9318
/* Doesn't work yet */
- register f9318_in_t wakeup_hi;
- register f9318_out_t u1;
- register f9318_in_t wakeup_lo;
- register f9318_out_t u2;
- register int addr = 017;
- register int rdct1, rdct2, rdct4, rdct8;
- register int ct1, ct2, ct4, ct8;
- register int wakeup, ct;
+ f9318_in_t wakeup_hi;
+ f9318_out_t u1;
+ f9318_in_t wakeup_lo;
+ f9318_out_t u2;
+ int addr = 017;
+ int rdct1, rdct2, rdct4, rdct8;
+ int ct1, ct2, ct4, ct8;
+ int wakeup, ct;
LOG((this,LOG_CPU,2, " TASK %02o:%s\n", m_task, task_name(m_task)));
@@ -2024,8 +2024,8 @@ void alto2_cpu_device::f2_late_load_md()
#if 1
UINT32 alto2_cpu_device::alu_74181(UINT32 a, UINT32 b, UINT8 smc)
{
- register UINT32 f;
- register const UINT32 cout = 1 << 16;
+ UINT32 f;
+ const UINT32 cout = 1 << 16;
switch (smc & A10_ALUIN) {
case SMC(0,0,0,0, 0, 0): // 0000: A + 1
diff --git a/src/devices/cpu/am29000/am29000.h b/src/devices/cpu/am29000/am29000.h
index c47d87fd7ce..091e7e32b04 100644
--- a/src/devices/cpu/am29000/am29000.h
+++ b/src/devices/cpu/am29000/am29000.h
@@ -457,7 +457,7 @@ protected:
case AS_PROGRAM: return &m_program_config;
case AS_IO: return &m_io_config;
case AS_DATA: return &m_data_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/amis2000/amis2000.h b/src/devices/cpu/amis2000/amis2000.h
index d04127eec16..47841e439dd 100644
--- a/src/devices/cpu/amis2000/amis2000.h
+++ b/src/devices/cpu/amis2000/amis2000.h
@@ -51,7 +51,7 @@ public:
, m_bu_bits(bu_bits)
, m_callstack_bits(callstack_bits)
, m_callstack_depth(callstack_depth)
- , m_7seg_table(NULL)
+ , m_7seg_table(nullptr)
, m_read_k(*this)
, m_read_i(*this)
, m_read_d(*this)
@@ -83,7 +83,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
diff --git a/src/devices/cpu/amis2000/amis2000op.cpp b/src/devices/cpu/amis2000/amis2000op.cpp
index 02f23ebed0a..3a172590bf3 100644
--- a/src/devices/cpu/amis2000/amis2000op.cpp
+++ b/src/devices/cpu/amis2000/amis2000op.cpp
@@ -222,7 +222,7 @@ void amis2000_base_device::op_disn()
// 0-F digits in bit order [DP]abcdefg
0x7e, 0x30, 0x6d, 0x79, 0x33, 0x5b, 0x5f, 0x70, 0x7f, 0x7b, 0x77, 0x1f, 0x4e, 0x3d, 0x4f, 0x47
};
- const UINT8 *ptr = (m_7seg_table != NULL) ? m_7seg_table : lut_segment_decoder;
+ const UINT8 *ptr = (m_7seg_table != nullptr) ? m_7seg_table : lut_segment_decoder;
m_d = ptr[m_acc] | (m_carry ? 0x80 : 0x00);
d_latch_out(true);
}
diff --git a/src/devices/cpu/apexc/apexc.h b/src/devices/cpu/apexc/apexc.h
index 538d903ab44..56b98c89de7 100644
--- a/src/devices/cpu/apexc/apexc.h
+++ b/src/devices/cpu/apexc/apexc.h
@@ -39,7 +39,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/arc/arc.h b/src/devices/cpu/arc/arc.h
index 80ed03280bc..dcc3ead6688 100644
--- a/src/devices/cpu/arc/arc.h
+++ b/src/devices/cpu/arc/arc.h
@@ -31,7 +31,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/arcompact/arcompact.cpp b/src/devices/cpu/arcompact/arcompact.cpp
index dca1bf9fd91..7c56a774601 100644
--- a/src/devices/cpu/arcompact/arcompact.cpp
+++ b/src/devices/cpu/arcompact/arcompact.cpp
@@ -175,8 +175,8 @@ void arcompact_device::device_reset()
m_delayactive = 0;
m_delayjump = 0x00000000;
- for (int i = 0; i < 0x40; i++)
- m_regs[i] = 0;
+ for (auto & elem : m_regs)
+ elem = 0;
m_status32 = 0;
m_LP_START = 0;
diff --git a/src/devices/cpu/arcompact/arcompact.h b/src/devices/cpu/arcompact/arcompact.h
index 09f1cf708c2..2a537b736aa 100644
--- a/src/devices/cpu/arcompact/arcompact.h
+++ b/src/devices/cpu/arcompact/arcompact.h
@@ -86,7 +86,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp
index 8d9b420486d..aa07ddcfecb 100644
--- a/src/devices/cpu/arm/arm.cpp
+++ b/src/devices/cpu/arm/arm.cpp
@@ -318,13 +318,13 @@ void arm_cpu_device::SetModeRegister( int mode, int rIndex, UINT32 value )
void arm_cpu_device::device_reset()
{
- for ( int i = 0; i < 27; i++ )
+ for (auto & elem : m_sArmRegister)
{
- m_sArmRegister[i] = 0;
+ elem = 0;
}
- for ( int i = 0; i < 16; i++ )
+ for (auto & elem : m_coproRegister)
{
- m_coproRegister[i] = 0;
+ elem = 0;
}
m_pendingIrq = 0;
m_pendingFiq = 0;
@@ -604,7 +604,7 @@ void arm_cpu_device::HandleMemSingle( UINT32 insn )
/* Fetch the offset */
if (insn & INSN_I)
{
- off = decodeShift(insn, NULL);
+ off = decodeShift(insn, nullptr);
}
else
{
@@ -821,7 +821,7 @@ void arm_cpu_device::HandleALU( UINT32 insn )
}
else
{
- op2 = decodeShift(insn, (insn & INSN_S) ? &sc : NULL);
+ op2 = decodeShift(insn, (insn & INSN_S) ? &sc : nullptr);
if (!(insn & INSN_S))
sc=0;
diff --git a/src/devices/cpu/arm/arm.h b/src/devices/cpu/arm/arm.h
index 824ac1b69db..2b33429f715 100644
--- a/src/devices/cpu/arm/arm.h
+++ b/src/devices/cpu/arm/arm.h
@@ -58,7 +58,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/arm7/arm7.h b/src/devices/cpu/arm7/arm7.h
index d2802b6e50e..615d8d41023 100644
--- a/src/devices/cpu/arm7/arm7.h
+++ b/src/devices/cpu/arm7/arm7.h
@@ -66,7 +66,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address);
// device_state_interface overrides
diff --git a/src/devices/cpu/arm7/arm7drc.inc b/src/devices/cpu/arm7/arm7drc.inc
index d31eee5a632..46c3aba570b 100644
--- a/src/devices/cpu/arm7/arm7drc.inc
+++ b/src/devices/cpu/arm7/arm7drc.inc
@@ -81,7 +81,7 @@ INLINE UINT32 epc(const opcode_desc *desc)
INLINE void alloc_handle(drcuml_state *drcuml, uml::code_handle **handleptr, const char *name)
{
- if (*handleptr == NULL)
+ if (*handleptr == nullptr)
*handleptr = drcuml->handle_alloc(name);
}
@@ -133,7 +133,7 @@ void arm7_cpu_device::arm7_drc_init()
/* allocate enough space for the cache and the core */
cache = auto_alloc(machine(), drc_cache(CACHE_SIZE));
- if (cache == NULL)
+ if (cache == nullptr)
fatalerror("Unable to allocate cache of size %d\n", (UINT32)(CACHE_SIZE));
/* allocate the implementation-specific state from the full cache */
@@ -302,8 +302,8 @@ void arm7_cpu_device::code_flush_cache()
static_generate_entry_point();
static_generate_nocode_handler();
static_generate_out_of_cycles();
- static_generate_tlb_translate(NULL); // TODO FIXME
- static_generate_detect_fault(NULL); // TODO FIXME
+ static_generate_tlb_translate(nullptr); // TODO FIXME
+ static_generate_detect_fault(nullptr); // TODO FIXME
//static_generate_tlb_mismatch();
/* add subroutines for memory accesses */
@@ -337,7 +337,7 @@ void arm7_cpu_device::code_compile_block(UINT8 mode, offs_t pc)
/* get a description of this sequence */
// TODO FIXME
- const opcode_desc *desclist = NULL; //m_impstate.drcfe->describe_code(pc); // TODO
+ const opcode_desc *desclist = nullptr; //m_impstate.drcfe->describe_code(pc); // TODO
// if (drcuml->logging() || drcuml->logging_native())
// log_opcode_desc(drcuml, desclist, 0);
@@ -351,7 +351,7 @@ void arm7_cpu_device::code_compile_block(UINT8 mode, offs_t pc)
drcuml_block *block = drcuml->begin_block(4096);
/* loop until we get through all instruction sequences */
- for (const opcode_desc *seqhead = desclist; seqhead != NULL; seqhead = seqlast->next())
+ for (const opcode_desc *seqhead = desclist; seqhead != nullptr; seqhead = seqlast->next())
{
const opcode_desc *curdesc;
UINT32 nextpc;
@@ -361,10 +361,10 @@ void arm7_cpu_device::code_compile_block(UINT8 mode, offs_t pc)
block->append_comment("-------------------------"); // comment
/* determine the last instruction in this sequence */
- for (seqlast = seqhead; seqlast != NULL; seqlast = seqlast->next())
+ for (seqlast = seqhead; seqlast != nullptr; seqlast = seqlast->next())
if (seqlast->flags & OPFLAG_END_SEQUENCE)
break;
- assert(seqlast != NULL);
+ assert(seqlast != nullptr);
/* if we don't have a hash for this mode/pc, or if we are overriding all, add one */
if (override || !drcuml->hash_exists(mode, seqhead->pc))
@@ -388,7 +388,7 @@ void arm7_cpu_device::code_compile_block(UINT8 mode, offs_t pc)
}
/* validate this code block if we're not pointing into ROM */
- if (m_program->get_write_ptr(seqhead->physpc) != NULL)
+ if (m_program->get_write_ptr(seqhead->physpc) != nullptr)
generate_checksum_block(block, &compiler, seqhead, seqlast);
/* label this instruction, if it may be jumped to locally */
@@ -414,7 +414,7 @@ void arm7_cpu_device::code_compile_block(UINT8 mode, offs_t pc)
/*if (seqlast->flags & OPFLAG_CAN_CHANGE_MODES)
UML_HASHJMP(block, uml::mem(&m_impstate.mode), nextpc, *m_impstate.nocode);
// hashjmp <mode>,nextpc,nocode
- else*/ if (seqlast->next() == NULL || seqlast->next()->pc != nextpc)
+ else*/ if (seqlast->next() == nullptr || seqlast->next()->pc != nextpc)
UML_HASHJMP(block, m_impstate.mode, nextpc, *m_impstate.nocode);
// hashjmp <mode>,nextpc,nocode
}
@@ -1051,7 +1051,7 @@ void arm7_cpu_device::static_generate_memory_accessor(int size, bool istlb, bool
{
for (int ramnum = 0; ramnum < ARM7_MAX_FASTRAM; ramnum++)
{
- if (m_impstate.fastram[ramnum].base != NULL && (!iswrite || !m_impstate.fastram[ramnum].readonly))
+ if (m_impstate.fastram[ramnum].base != nullptr && (!iswrite || !m_impstate.fastram[ramnum].readonly))
{
void *fastbase = (UINT8 *)m_impstate.fastram[ramnum].base - m_impstate.fastram[ramnum].start;
UINT32 skip = label++;
@@ -1198,7 +1198,7 @@ void arm7_cpu_device::generate_checksum_block(drcuml_block *block, compiler_stat
}
/* loose verify or single instruction: just compare and fail */
- if (!(m_impstate.drcoptions & ARM7DRC_STRICT_VERIFY) || seqhead->next() == NULL)
+ if (!(m_impstate.drcoptions & ARM7DRC_STRICT_VERIFY) || seqhead->next() == nullptr)
{
if (!(seqhead->flags & OPFLAG_VIRTUAL_NOOP))
{
@@ -1206,7 +1206,7 @@ void arm7_cpu_device::generate_checksum_block(drcuml_block *block, compiler_stat
void *base = m_direct->read_ptr(seqhead->physpc);
UML_LOAD(block, uml::I0, base, 0, uml::SIZE_DWORD, uml::SCALE_x4); // load i0,base,0,dword
- if (seqhead->delay.first() != NULL && seqhead->physpc != seqhead->delay.first()->physpc)
+ if (seqhead->delay.first() != nullptr && seqhead->physpc != seqhead->delay.first()->physpc)
{
base = m_direct->read_ptr(seqhead->delay.first()->physpc);
UML_LOAD(block, uml::I1, base, 0, uml::SIZE_DWORD, uml::SCALE_x4); // load i1,base,dword
@@ -1235,7 +1235,7 @@ void arm7_cpu_device::generate_checksum_block(drcuml_block *block, compiler_stat
UML_ADD(block, uml::I0, uml::I0, uml::I1); // add i0,i0,i1
sum += curdesc->opptr.l[0];
- if (curdesc->delay.first() != NULL && (curdesc == seqlast || (curdesc->next() != NULL && curdesc->next()->physpc != curdesc->delay.first()->physpc)))
+ if (curdesc->delay.first() != nullptr && (curdesc == seqlast || (curdesc->next() != nullptr && curdesc->next()->physpc != curdesc->delay.first()->physpc)))
{
base = m_direct->read_ptr(curdesc->delay.first()->physpc);
UML_LOAD(block, uml::I1, base, 0, uml::SIZE_DWORD, uml::SCALE_x4); // load i1,base,dword
diff --git a/src/devices/cpu/arm7/arm7ops.cpp b/src/devices/cpu/arm7/arm7ops.cpp
index 9b96ca9054c..07dd3c2e75c 100644
--- a/src/devices/cpu/arm7/arm7ops.cpp
+++ b/src/devices/cpu/arm7/arm7ops.cpp
@@ -408,7 +408,7 @@ void arm7_cpu_device::HandleMemSingle(UINT32 insn)
if (insn & INSN_I)
{
/* Register Shift */
- off = decodeShift(insn, NULL);
+ off = decodeShift(insn, nullptr);
}
else
{
@@ -956,7 +956,7 @@ void arm7_cpu_device::HandleALU(UINT32 insn)
/* Op2 = Register Value */
else
{
- op2 = decodeShift(insn, (insn & INSN_S) ? &sc : NULL);
+ op2 = decodeShift(insn, (insn & INSN_S) ? &sc : nullptr);
// LD TODO sc will always be 0 if this applies
if (!(insn & INSN_S))
diff --git a/src/devices/cpu/arm7/lpc210x.cpp b/src/devices/cpu/arm7/lpc210x.cpp
index 61b7a50f592..1d6acac4c79 100644
--- a/src/devices/cpu/arm7/lpc210x.cpp
+++ b/src/devices/cpu/arm7/lpc210x.cpp
@@ -70,7 +70,7 @@ const address_space_config *lpc210x_device::memory_space_config(address_spacenum
switch(spacenum)
{
case AS_PROGRAM: return &m_program_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/asap/asap.cpp b/src/devices/cpu/asap/asap.cpp
index 21133e46975..9f36eb6116f 100644
--- a/src/devices/cpu/asap/asap.cpp
+++ b/src/devices/cpu/asap/asap.cpp
@@ -151,8 +151,8 @@ asap_device::asap_device(const machine_config &mconfig, const char *tag, device_
m_nextpc(0),
m_irq_state(0),
m_icount(0),
- m_program(NULL),
- m_direct(NULL)
+ m_program(nullptr),
+ m_direct(nullptr)
{
// initialize the src2val table to contain immediates for low values
for (int i = 0; i < REGBASE; i++)
@@ -238,7 +238,7 @@ void asap_device::device_reset()
const address_space_config *asap_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : NULL;
+ return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
}
diff --git a/src/devices/cpu/avr8/avr8.cpp b/src/devices/cpu/avr8/avr8.cpp
index 063526ff472..a1e755a29b8 100644
--- a/src/devices/cpu/avr8/avr8.cpp
+++ b/src/devices/cpu/avr8/avr8.cpp
@@ -638,8 +638,8 @@ avr8_device::avr8_device(const machine_config &mconfig, const char *name, const
m_program_config("program", ENDIANNESS_LITTLE, 8, 22),
m_data_config("data", ENDIANNESS_LITTLE, 8, 16, 0, internal_map),
m_io_config("io", ENDIANNESS_LITTLE, 8, 4),
- m_eeprom_tag(NULL),
- m_eeprom(NULL),
+ m_eeprom_tag(nullptr),
+ m_eeprom(nullptr),
m_cpu_type(cpu_type),
m_lfuses(0x62),
m_hfuses(0x99),
@@ -855,9 +855,9 @@ void avr8_device::device_reset()
logerror("AVR Boot loader section size: %d words\n", m_boot_size);
}
- for (int i = 0; i < 0x200; i++)
+ for (auto & elem : m_r)
{
- m_r[i] = 0;
+ elem = 0;
}
m_spi_active = false;
@@ -896,7 +896,7 @@ const address_space_config *avr8_device::memory_space_config(address_spacenum sp
{
return &m_io_config;
}
- return NULL;
+ return nullptr;
}
@@ -1315,8 +1315,8 @@ void avr8_device::timer1_tick()
// Cache things in array form to avoid a compare+branch inside a potentially high-frequency timer
//UINT8 compare_mode[2] = { (m_r[AVR8_REGIDX_TCCR1A] & AVR8_TCCR1A_COM1A_MASK) >> AVR8_TCCR1A_COM1A_SHIFT,
//(m_r[AVR8_REGIDX_TCCR1A] & AVR8_TCCR1A_COM1B_MASK) >> AVR8_TCCR1A_COM1B_SHIFT };
- UINT16 ocr1[2] = { (m_r[AVR8_REGIDX_OCR1AH] << 8) | m_r[AVR8_REGIDX_OCR1AL],
- (m_r[AVR8_REGIDX_OCR1BH] << 8) | m_r[AVR8_REGIDX_OCR1BL] };
+ UINT16 ocr1[2] = { static_cast<UINT16>((m_r[AVR8_REGIDX_OCR1AH] << 8) | m_r[AVR8_REGIDX_OCR1AL]),
+ static_cast<UINT16>((m_r[AVR8_REGIDX_OCR1BH] << 8) | m_r[AVR8_REGIDX_OCR1BL]) };
UINT8 ocf1[2] = { (1 << AVR8_TIFR1_OCF1A_SHIFT), (1 << AVR8_TIFR1_OCF1B_SHIFT) };
UINT8 int1[2] = { AVR8_INTIDX_OCF1A, AVR8_INTIDX_OCF1B };
INT32 increment = m_timer_increment[1];
@@ -1711,8 +1711,8 @@ void avr8_device::timer4_tick()
// Cache things in array form to avoid a compare+branch inside a potentially high-frequency timer
//UINT8 compare_mode[2] = { (m_r[AVR8_REGIDX_TCCR1A] & AVR8_TCCR1A_COM1A_MASK) >> AVR8_TCCR1A_COM1A_SHIFT,
//(m_r[AVR8_REGIDX_TCCR1A] & AVR8_TCCR1A_COM1B_MASK) >> AVR8_TCCR1A_COM1B_SHIFT };
- UINT16 ocr4[2] = { (m_r[AVR8_REGIDX_OCR4AH] << 8) | m_r[AVR8_REGIDX_OCR4AL],
- (m_r[AVR8_REGIDX_OCR4BH] << 8) | m_r[AVR8_REGIDX_OCR4BL] };
+ UINT16 ocr4[2] = { static_cast<UINT16>((m_r[AVR8_REGIDX_OCR4AH] << 8) | m_r[AVR8_REGIDX_OCR4AL]),
+ static_cast<UINT16>((m_r[AVR8_REGIDX_OCR4BH] << 8) | m_r[AVR8_REGIDX_OCR4BL]) };
//TODO UINT8 ocf4[2] = { (1 << AVR8_TIFR4_OCF4A_SHIFT), (1 << AVR8_TIFR4_OCF4B_SHIFT) };
//TODO UINT8 int4[2] = { AVR8_INTIDX_OCF4A, AVR8_INTIDX_OCF4B };
INT32 increment = m_timer_increment[4];
diff --git a/src/devices/cpu/ccpu/ccpu.h b/src/devices/cpu/ccpu/ccpu.h
index 96a0fac344a..150be19ba5e 100644
--- a/src/devices/cpu/ccpu/ccpu.h
+++ b/src/devices/cpu/ccpu/ccpu.h
@@ -77,7 +77,7 @@ protected:
case AS_PROGRAM: return &m_program_config;
case AS_IO: return &m_io_config;
case AS_DATA: return &m_data_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/cop400/cop400.cpp b/src/devices/cpu/cop400/cop400.cpp
index eca60705b2c..9f68a8c0545 100644
--- a/src/devices/cpu/cop400/cop400.cpp
+++ b/src/devices/cpu/cop400/cop400.cpp
@@ -229,7 +229,7 @@ cop400_cpu_device::cop400_cpu_device(const machine_config &mconfig, device_type
}
cop401_cpu_device::cop401_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : cop400_cpu_device(mconfig, COP401, "COP401", tag, owner, clock, "cop401", __FILE__, 9, 5, COP410_FEATURE, 0xf, 0xf, 0, false, false, NULL, ADDRESS_MAP_NAME(data_32b))
+ : cop400_cpu_device(mconfig, COP401, "COP401", tag, owner, clock, "cop401", __FILE__, 9, 5, COP410_FEATURE, 0xf, 0xf, 0, false, false, nullptr, ADDRESS_MAP_NAME(data_32b))
{
}
@@ -244,7 +244,7 @@ cop411_cpu_device::cop411_cpu_device(const machine_config &mconfig, const char *
}
cop402_cpu_device::cop402_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : cop400_cpu_device(mconfig, COP402, "COP402", tag, owner, clock, "cop402", __FILE__, 10, 6, COP420_FEATURE, 0xf, 0xf, 0xf, true, true, NULL, ADDRESS_MAP_NAME(data_64b))
+ : cop400_cpu_device(mconfig, COP402, "COP402", tag, owner, clock, "cop402", __FILE__, 10, 6, COP420_FEATURE, 0xf, 0xf, 0xf, true, true, nullptr, ADDRESS_MAP_NAME(data_64b))
{
}
@@ -264,7 +264,7 @@ cop422_cpu_device::cop422_cpu_device(const machine_config &mconfig, const char *
}
cop404_cpu_device::cop404_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : cop400_cpu_device(mconfig, COP404, "COP404", tag, owner, clock, "cop404", __FILE__, 11, 7, COP444_FEATURE, 0xf, 0xf, 0xf, true, true, NULL, ADDRESS_MAP_NAME(data_128b))
+ : cop400_cpu_device(mconfig, COP404, "COP404", tag, owner, clock, "cop404", __FILE__, 11, 7, COP444_FEATURE, 0xf, 0xf, 0xf, true, true, nullptr, ADDRESS_MAP_NAME(data_128b))
{
}
@@ -955,7 +955,7 @@ void cop400_cpu_device::device_start()
/* allocate counter timer */
- m_counter_timer = NULL;
+ m_counter_timer = nullptr;
if (m_has_counter)
{
m_counter_timer = timer_alloc(TIMER_COUNTER);
@@ -964,7 +964,7 @@ void cop400_cpu_device::device_start()
/* allocate IN latch timer */
- m_inil_timer = NULL;
+ m_inil_timer = nullptr;
if (m_has_inil)
{
m_inil_timer = timer_alloc(TIMER_INIL);
@@ -973,7 +973,7 @@ void cop400_cpu_device::device_start()
/* allocate Microbus timer */
- m_microbus_timer = NULL;
+ m_microbus_timer = nullptr;
if (m_microbus == COP400_MICROBUS_ENABLED)
{
m_microbus_timer = timer_alloc(TIMER_MICROBUS);
diff --git a/src/devices/cpu/cop400/cop400.h b/src/devices/cpu/cop400/cop400.h
index aba03516d39..7c911d4e0d5 100644
--- a/src/devices/cpu/cop400/cop400.h
+++ b/src/devices/cpu/cop400/cop400.h
@@ -164,7 +164,7 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL );
+ return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr );
}
// device_state_interface overrides
diff --git a/src/devices/cpu/cosmac/cosmac.cpp b/src/devices/cpu/cosmac/cosmac.cpp
index f011e37a47a..73170762cbf 100644
--- a/src/devices/cpu/cosmac/cosmac.cpp
+++ b/src/devices/cpu/cosmac/cosmac.cpp
@@ -288,12 +288,12 @@ cosmac_device::cosmac_device(const machine_config &mconfig, device_type type, co
m_irq(CLEAR_LINE),
m_dmain(CLEAR_LINE),
m_dmaout(CLEAR_LINE),
- m_program(NULL),
- m_io(NULL),
- m_direct(NULL)
+ m_program(nullptr),
+ m_io(nullptr),
+ m_direct(nullptr)
{
- for (int i = 0; i < 4; i++)
- m_ef[i] = CLEAR_LINE;
+ for (auto & elem : m_ef)
+ elem = CLEAR_LINE;
}
@@ -419,7 +419,7 @@ const address_space_config *cosmac_device::memory_space_config(address_spacenum
return &m_io_config;
default:
- return NULL;
+ return nullptr;
}
}
diff --git a/src/devices/cpu/cp1610/1610dasm.cpp b/src/devices/cpu/cp1610/1610dasm.cpp
index 0035e9b78a5..83b2ef018e0 100644
--- a/src/devices/cpu/cp1610/1610dasm.cpp
+++ b/src/devices/cpu/cp1610/1610dasm.cpp
@@ -6,7 +6,7 @@
CPU_DISASSEMBLE( cp1610 )
{
- UINT16 oprom16[4]={ (oprom[0] << 8) | oprom[1], (oprom[2] << 8) | oprom[3], (oprom[4] << 8) | oprom[5], (oprom[6] << 8) | oprom[7] };
+ UINT16 oprom16[4]={ static_cast<UINT16>((oprom[0] << 8) | oprom[1]), static_cast<UINT16>((oprom[2] << 8) | oprom[3]), static_cast<UINT16>((oprom[4] << 8) | oprom[5]), static_cast<UINT16>((oprom[6] << 8) | oprom[7]) };
UINT16 op = oprom16[0]; UINT16 subop;
UINT16 ea, ea1, ea2;
unsigned size = 1;
diff --git a/src/devices/cpu/cp1610/cp1610.h b/src/devices/cpu/cp1610/cp1610.h
index d3d7c9a78a4..3517fa8fe07 100644
--- a/src/devices/cpu/cp1610/cp1610.h
+++ b/src/devices/cpu/cp1610/cp1610.h
@@ -53,7 +53,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
index 592184146b2..0582c9a2679 100644
--- a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
+++ b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
@@ -79,7 +79,7 @@ cquestsnd_cpu_device::cquestsnd_cpu_device(const machine_config &mconfig, const
: cpu_device(mconfig, CQUESTSND, "Cube Quest Sound CPU", tag, owner, clock, "cquestsnd", __FILE__)
, m_program_config("program", ENDIANNESS_BIG, 64, 8, -3)
, m_dac_w(*this)
- , m_sound_region_tag(NULL)
+ , m_sound_region_tag(nullptr)
{
}
@@ -168,7 +168,7 @@ READ16_MEMBER( cquestrot_cpu_device::rotram_r )
void cquestsnd_cpu_device::device_start()
{
m_dac_w.resolve_safe();
- assert(m_sound_region_tag != NULL);
+ assert(m_sound_region_tag != nullptr);
m_sound_data = (UINT16*)machine().root_device().memregion(m_sound_region_tag)->base();
m_program = &space(AS_PROGRAM);
diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.h b/src/devices/cpu/cubeqcpu/cubeqcpu.h
index 4befd97d662..72371a8fb0d 100644
--- a/src/devices/cpu/cubeqcpu/cubeqcpu.h
+++ b/src/devices/cpu/cubeqcpu/cubeqcpu.h
@@ -161,7 +161,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 8; }
@@ -229,7 +229,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
@@ -313,7 +313,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/drcbec.cpp b/src/devices/cpu/drcbec.cpp
index d3e1538c1ba..5b494c947f3 100644
--- a/src/devices/cpu/drcbec.cpp
+++ b/src/devices/cpu/drcbec.cpp
@@ -313,7 +313,7 @@ void drcbe_c::reset()
{
// reset our hash tables
m_hash.reset();
- m_hash.set_default_codeptr(NULL);
+ m_hash.set_default_codeptr(nullptr);
}
@@ -330,7 +330,7 @@ void drcbe_c::generate(drcuml_block &block, const instruction *instlist, UINT32
// begin codegen; fail if we can't
drccodeptr *cachetop = m_cache.begin_codegen(numinst * sizeof(drcbec_instruction) * 4);
- if (cachetop == NULL)
+ if (cachetop == nullptr)
block.abort();
// compute the base by aligning the cache top to an even multiple of drcbec_instruction
@@ -528,7 +528,7 @@ int drcbe_c::execute(code_handle &entry)
case MAKE_OPCODE_SHORT(OP_HASHJMP, 4, 0): // HASHJMP mode,pc,handle
sp = 0;
newinst = (const drcbec_instruction *)m_hash.get_codeptr(PARAM0, PARAM1);
- if (newinst == NULL)
+ if (newinst == nullptr)
{
assert(sp < ARRAY_LENGTH(callstack));
m_state.exp = PARAM1;
diff --git a/src/devices/cpu/drcbeut.cpp b/src/devices/cpu/drcbeut.cpp
index 4df863c8fb5..3bd0edac4a1 100644
--- a/src/devices/cpu/drcbeut.cpp
+++ b/src/devices/cpu/drcbeut.cpp
@@ -33,7 +33,7 @@ using namespace uml;
drc_hash_table::drc_hash_table(drc_cache &cache, UINT32 modes, UINT8 addrbits, UINT8 ignorebits)
: m_cache(cache),
m_modes(modes),
- m_nocodeptr(NULL),
+ m_nocodeptr(nullptr),
m_l1bits((addrbits - ignorebits) / 2),
m_l2bits((addrbits - ignorebits) - m_l1bits),
m_l1shift(ignorebits + m_l2bits),
@@ -41,8 +41,8 @@ drc_hash_table::drc_hash_table(drc_cache &cache, UINT32 modes, UINT8 addrbits, U
m_l1mask((1 << m_l1bits) - 1),
m_l2mask((1 << m_l2bits) - 1),
m_base(reinterpret_cast<drccodeptr ***>(cache.alloc(modes * sizeof(**m_base)))),
- m_emptyl1(NULL),
- m_emptyl2(NULL)
+ m_emptyl1(nullptr),
+ m_emptyl2(nullptr)
{
reset();
}
@@ -57,7 +57,7 @@ bool drc_hash_table::reset()
{
// allocate an empty l2 hash table
m_emptyl2 = (drccodeptr *)m_cache.alloc_temporary(sizeof(drccodeptr) << m_l2bits);
- if (m_emptyl2 == NULL)
+ if (m_emptyl2 == nullptr)
return false;
// populate it with pointers to the recompile_exit code
@@ -66,7 +66,7 @@ bool drc_hash_table::reset()
// allocate an empty l1 hash table
m_emptyl1 = (drccodeptr **)m_cache.alloc_temporary(sizeof(drccodeptr *) << m_l1bits);
- if (m_emptyl1 == NULL)
+ if (m_emptyl1 == nullptr)
return false;
// populate it with pointers to the empty l2 table
@@ -98,7 +98,7 @@ void drc_hash_table::block_begin(drcuml_block &block, const uml::instruction *in
assert(inst.numparams() == 2);
// if we fail to allocate, we must abort the block
- if (!set_codeptr(inst.param(0).immediate(), inst.param(1).immediate(), NULL))
+ if (!set_codeptr(inst.param(0).immediate(), inst.param(1).immediate(), nullptr))
block.abort();
}
@@ -164,7 +164,7 @@ bool drc_hash_table::set_codeptr(UINT32 mode, UINT32 pc, drccodeptr code)
if (m_base[mode] == m_emptyl1)
{
drccodeptr **newtable = (drccodeptr **)m_cache.alloc_temporary(sizeof(drccodeptr *) << m_l1bits);
- if (newtable == NULL)
+ if (newtable == nullptr)
return false;
memcpy(newtable, m_emptyl1, sizeof(drccodeptr *) << m_l1bits);
m_base[mode] = newtable;
@@ -175,7 +175,7 @@ bool drc_hash_table::set_codeptr(UINT32 mode, UINT32 pc, drccodeptr code)
if (m_base[mode][l1] == m_emptyl2)
{
drccodeptr *newtable = (drccodeptr *)m_cache.alloc_temporary(sizeof(drccodeptr) << m_l2bits);
- if (newtable == NULL)
+ if (newtable == nullptr)
return false;
memcpy(newtable, m_emptyl2, sizeof(drccodeptr) << m_l2bits);
m_base[mode][l1] = newtable;
@@ -225,7 +225,7 @@ void drc_map_variables::block_begin(drcuml_block &block)
{
// release any remaining live entries
map_entry *entry;
- while ((entry = m_entry_list.detach_head()) != NULL)
+ while ((entry = m_entry_list.detach_head()) != nullptr)
m_cache.dealloc(entry, sizeof(*entry));
// reset the variable values
@@ -240,12 +240,12 @@ void drc_map_variables::block_begin(drcuml_block &block)
void drc_map_variables::block_end(drcuml_block &block)
{
// only process if we have data
- if (m_entry_list.first() == NULL)
+ if (m_entry_list.first() == nullptr)
return;
// begin "code generation" aligned to an 8-byte boundary
drccodeptr *top = m_cache.begin_codegen(sizeof(UINT64) + sizeof(UINT32) + 2 * sizeof(UINT32) * m_entry_list.count());
- if (top == NULL)
+ if (top == nullptr)
block.abort();
UINT32 *dest = (UINT32 *)(((FPTR)*top + 7) & ~7);
@@ -261,7 +261,7 @@ void drc_map_variables::block_end(drcuml_block &block)
// now iterate over entries and store them
UINT32 curvalue[MAPVAR_COUNT] = { 0 };
bool changed[MAPVAR_COUNT] = { false };
- for (map_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next())
+ for (map_entry *entry = m_entry_list.first(); entry != nullptr; entry = entry->next())
{
// update the current value of the variable and detect changes
if (curvalue[entry->m_mapvar] != entry->m_newval)
@@ -271,7 +271,7 @@ void drc_map_variables::block_end(drcuml_block &block)
}
// if the next code pointer is different, or if we're at the end, flush changes
- if (entry->next() == NULL || entry->next()->m_codeptr != entry->m_codeptr)
+ if (entry->next() == nullptr || entry->next()->m_codeptr != entry->m_codeptr)
{
// build a mask of changed variables
int numchanged = 0;
@@ -331,7 +331,7 @@ void drc_map_variables::set_value(drccodeptr codebase, UINT32 mapvar, UINT32 new
// allocate a new entry and fill it in
map_entry *entry = (map_entry *)m_cache.alloc(sizeof(*entry));
- entry->m_next = NULL;
+ entry->m_next = nullptr;
entry->m_codeptr = codebase;
entry->m_mapvar = mapvar - MAPVAR_M0;
entry->m_newval = newvalue;
@@ -474,7 +474,7 @@ void drc_label_list::block_end(drcuml_block &block)
// free all of the pending fixup requests
label_fixup *fixup;
- while ((fixup = m_fixup_list.detach_head()) != NULL)
+ while ((fixup = m_fixup_list.detach_head()) != nullptr)
m_cache.dealloc(fixup, sizeof(*fixup));
// make sure the label list is clear, and fatalerror if we missed anything
@@ -493,7 +493,7 @@ drccodeptr drc_label_list::get_codeptr(uml::code_label label, drc_label_fixup_de
label_entry *curlabel = find_or_allocate(label);
// if no code pointer, request an OOB callback
- if (curlabel->m_codeptr == NULL && !callback.isnull())
+ if (curlabel->m_codeptr == nullptr && !callback.isnull())
{
label_fixup *fixup = reinterpret_cast<label_fixup *>(m_cache.alloc(sizeof(*fixup)));
fixup->m_callback = callback;
@@ -514,7 +514,7 @@ void drc_label_list::set_codeptr(uml::code_label label, drccodeptr codeptr)
{
// set the code pointer
label_entry *curlabel = find_or_allocate(label);
- assert(curlabel->m_codeptr == NULL);
+ assert(curlabel->m_codeptr == nullptr);
curlabel->m_codeptr = codeptr;
}
@@ -528,10 +528,10 @@ void drc_label_list::reset(bool fatal_on_leftovers)
{
// loop until out of labels
label_entry *curlabel;
- while ((curlabel = m_list.detach_head()) != NULL)
+ while ((curlabel = m_list.detach_head()) != nullptr)
{
// fatal if we were a leftover
- if (fatal_on_leftovers && curlabel->m_codeptr == NULL)
+ if (fatal_on_leftovers && curlabel->m_codeptr == nullptr)
fatalerror("Label %08X never defined!\n", curlabel->m_label.label());
// free the label
@@ -549,16 +549,16 @@ drc_label_list::label_entry *drc_label_list::find_or_allocate(uml::code_label la
{
// find the label, or else allocate a new one
label_entry *curlabel;
- for (curlabel = m_list.first(); curlabel != NULL; curlabel = curlabel->next())
+ for (curlabel = m_list.first(); curlabel != nullptr; curlabel = curlabel->next())
if (curlabel->m_label == label)
break;
// if none found, allocate
- if (curlabel == NULL)
+ if (curlabel == nullptr)
{
curlabel = (label_entry *)m_cache.alloc(sizeof(*curlabel));
curlabel->m_label = label;
- curlabel->m_codeptr = NULL;
+ curlabel->m_codeptr = nullptr;
m_list.append(*curlabel);
}
return curlabel;
diff --git a/src/devices/cpu/drcbex64.cpp b/src/devices/cpu/drcbex64.cpp
index 64f2dd89bf0..b14e4cd189d 100644
--- a/src/devices/cpu/drcbex64.cpp
+++ b/src/devices/cpu/drcbex64.cpp
@@ -586,14 +586,14 @@ drcbe_x64::drcbe_x64(drcuml_state &drcuml, device_t &device, drc_cache &cache, U
m_hash(cache, modes, addrbits, ignorebits),
m_map(cache, 0),
m_labels(cache),
- m_log(NULL),
+ m_log(nullptr),
m_sse41(false),
m_absmask32((UINT32 *)cache.alloc_near(16*2 + 15)),
- m_absmask64(NULL),
+ m_absmask64(nullptr),
m_rbpvalue(cache.near() + 0x80),
- m_entry(NULL),
- m_exit(NULL),
- m_nocode(NULL),
+ m_entry(nullptr),
+ m_exit(nullptr),
+ m_nocode(nullptr),
m_fixup_label(FUNC(drcbe_x64::fixup_label), this),
m_fixup_exception(FUNC(drcbe_x64::fixup_exception), this),
m_near(*(near_state *)cache.alloc_near(sizeof(m_near)))
@@ -648,8 +648,8 @@ drcbe_x64::drcbe_x64(drcuml_state &drcuml, device_t &device, drc_cache &cache, U
}
// build the opcode table (static but it doesn't hurt to regenerate it)
- for (int opnum = 0; opnum < ARRAY_LENGTH(s_opcode_table_source); opnum++)
- s_opcode_table[s_opcode_table_source[opnum].opcode] = s_opcode_table_source[opnum].func;
+ for (auto & elem : s_opcode_table_source)
+ s_opcode_table[elem.opcode] = elem.func;
// create the log
if (device.machine().options().drc_log_native())
@@ -667,7 +667,7 @@ drcbe_x64::drcbe_x64(drcuml_state &drcuml, device_t &device, drc_cache &cache, U
drcbe_x64::~drcbe_x64()
{
// free the log context
- if (m_log != NULL)
+ if (m_log != nullptr)
x86log_free_context(m_log);
}
@@ -679,12 +679,12 @@ drcbe_x64::~drcbe_x64()
void drcbe_x64::reset()
{
// output a note to the log
- if (m_log != NULL)
+ if (m_log != nullptr)
x86log_printf(m_log, "\n\n===========\nCACHE RESET\n===========\n\n");
// generate a little bit of glue code to set up the environment
drccodeptr *cachetop = m_cache.begin_codegen(500);
- if (cachetop == NULL)
+ if (cachetop == nullptr)
fatalerror("Out of cache space after a reset!\n");
x86code *dst = (x86code *)*cachetop;
@@ -718,7 +718,7 @@ void drcbe_x64::reset()
emit_mov_m64_r64(dst, MABS(&m_near.stacksave), REG_RSP); // mov [stacksave],rsp
emit_stmxcsr_m32(dst, MABS(&m_near.ssemode)); // stmxcsr [ssemode]
emit_jmp_r64(dst, REG_PARAM2); // jmp param2
- if (m_log != NULL)
+ if (m_log != nullptr)
x86log_disasm_code_range(m_log, "entry_point", (x86code *)m_entry, dst);
// generate an exit point
@@ -735,13 +735,13 @@ void drcbe_x64::reset()
emit_pop_r64(dst, REG_RSI); // pop rsi
emit_pop_r64(dst, REG_RBX); // pop rbx
emit_ret(dst); // ret
- if (m_log != NULL)
+ if (m_log != nullptr)
x86log_disasm_code_range(m_log, "exit_point", m_exit, dst);
// generate a no code point
m_nocode = dst;
emit_ret(dst); // ret
- if (m_log != NULL)
+ if (m_log != nullptr)
x86log_disasm_code_range(m_log, "nocode", m_nocode, dst);
// finish up codegen
@@ -779,7 +779,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
// begin codegen; fail if we can't
drccodeptr *cachetop = m_cache.begin_codegen(numinst * 8 * 4);
- if (cachetop == NULL)
+ if (cachetop == nullptr)
block.abort();
// compute the base by aligning the cache top to a cache line (assumed to be 64 bytes)
@@ -788,14 +788,14 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
// generate code
std::string tempstring;
- const char *blockname = NULL;
+ const char *blockname = nullptr;
for (int inum = 0; inum < numinst; inum++)
{
const instruction &inst = instlist[inum];
assert(inst.opcode() < ARRAY_LENGTH(s_opcode_table));
// add a comment
- if (m_log != NULL)
+ if (m_log != nullptr)
{
std::string dasm;
inst.disasm(dasm, &m_drcuml);
@@ -803,7 +803,7 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
}
// extract a blockname
- if (blockname == NULL)
+ if (blockname == nullptr)
{
if (inst.opcode() == OP_HANDLE)
blockname = inst.param(0).handle().string();
@@ -820,8 +820,8 @@ void drcbe_x64::generate(drcuml_block &block, const instruction *instlist, UINT3
m_cache.end_codegen();
// log it
- if (m_log != NULL)
- x86log_disasm_code_range(m_log, (blockname == NULL) ? "Unknown block" : blockname, base, m_cache.top());
+ if (m_log != nullptr)
+ x86log_disasm_code_range(m_log, (blockname == nullptr) ? "Unknown block" : blockname, base, m_cache.top());
// tell all of our utility objects that the block is finished
m_hash.block_end(block);
@@ -2603,7 +2603,7 @@ void drcbe_x64::fixup_exception(drccodeptr *codeptr, void *param1, void *param2)
// push the original return address on the stack
emit_lea_r64_m64(dst, REG_RAX, MABS(src)); // lea rax,[return]
emit_push_r64(dst, REG_RAX); // push rax
- if (*targetptr != NULL)
+ if (*targetptr != nullptr)
emit_jmp(dst, *targetptr); // jmp *targetptr
else
emit_jmp_m64(dst, MABS(targetptr)); // jmp [targetptr]
@@ -2767,7 +2767,7 @@ void drcbe_x64::op_debug(x86code *&dst, const instruction &inst)
// test and branch
emit_mov_r64_imm(dst, REG_RAX, (FPTR)&m_device.machine().debug_flags); // mov rax,&debug_flags
emit_test_m32_imm(dst, MBD(REG_RAX, 0), DEBUG_FLAG_CALL_HOOK); // test [debug_flags],DEBUG_FLAG_CALL_HOOK
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
emit_jcc_short_link(dst, x64emit::COND_Z, skip); // jz skip
// push the parameter
@@ -2910,7 +2910,7 @@ void drcbe_x64::op_jmp(x86code *&dst, const instruction &inst)
// look up the jump target and jump there
x86code *jmptarget = (x86code *)m_labels.get_codeptr(labelp.label(), m_fixup_label, dst);
- if (jmptarget == NULL)
+ if (jmptarget == nullptr)
jmptarget = dst + 0x7ffffff0;
if (inst.condition() == uml::COND_ALWAYS)
emit_jmp(dst, jmptarget); // jmp target
@@ -2943,7 +2943,7 @@ void drcbe_x64::op_exh(x86code *&dst, const instruction &inst)
if (inst.condition() == uml::COND_ALWAYS)
{
emit_mov_m32_p32(dst, MABS(&m_state.exp), exp); // mov [exp],exp
- if (*targetptr != NULL)
+ if (*targetptr != nullptr)
emit_call(dst, *targetptr); // call *targetptr
else
emit_call_m64(dst, MABS(targetptr)); // call [targetptr]
@@ -2977,12 +2977,12 @@ void drcbe_x64::op_callh(x86code *&dst, const instruction &inst)
drccodeptr *targetptr = handp.handle().codeptr_addr();
// skip if conditional
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
// jump through the handle; directly if a normal jump
- if (*targetptr != NULL)
+ if (*targetptr != nullptr)
emit_call(dst, *targetptr); // call *targetptr
else
emit_call_m64(dst, MABS(targetptr)); // call [targetptr]
@@ -3006,7 +3006,7 @@ void drcbe_x64::op_ret(x86code *&dst, const instruction &inst)
assert(inst.numparams() == 0);
// skip if conditional
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
@@ -3037,7 +3037,7 @@ void drcbe_x64::op_callc(x86code *&dst, const instruction &inst)
be_parameter paramp(*this, inst.param(1), PTYPE_M);
// skip if conditional
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
@@ -4010,7 +4010,7 @@ void drcbe_x64::op_mov(x86code *&dst, const instruction &inst)
int dstreg = dstp.select_register(REG_EAX);
// always start with a jmp
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
@@ -4029,7 +4029,7 @@ void drcbe_x64::op_mov(x86code *&dst, const instruction &inst)
else if (inst.condition() != 0 && dstp.is_int_register() && srcp.is_memory())
{
dst = savedst;
- skip.target = NULL;
+ skip.target = nullptr;
emit_cmovcc_r32_m32(dst, X86_CONDITION(inst.condition()), dstp.ireg(), MABS(srcp.memory()));
// cmovcc dstp,[srcp]
}
@@ -4038,7 +4038,7 @@ void drcbe_x64::op_mov(x86code *&dst, const instruction &inst)
else if (inst.condition() != 0 && dstp.is_int_register() && srcp.is_int_register())
{
dst = savedst;
- skip.target = NULL;
+ skip.target = nullptr;
emit_cmovcc_r32_r32(dst, X86_CONDITION(inst.condition()), dstp.ireg(), srcp.ireg());
// cmovcc dstp,srcp
}
@@ -4066,7 +4066,7 @@ void drcbe_x64::op_mov(x86code *&dst, const instruction &inst)
else if (inst.condition() != 0 && dstp.is_int_register() && srcp.is_memory())
{
dst = savedst;
- skip.target = NULL;
+ skip.target = nullptr;
emit_cmovcc_r64_m64(dst, X86_CONDITION(inst.condition()), dstp.ireg(), MABS(srcp.memory()));
// cmovcc dstp,[srcp]
}
@@ -4075,7 +4075,7 @@ void drcbe_x64::op_mov(x86code *&dst, const instruction &inst)
else if (inst.condition() != 0 && dstp.is_int_register() && srcp.is_int_register())
{
dst = savedst;
- skip.target = NULL;
+ skip.target = nullptr;
emit_cmovcc_r64_r64(dst, X86_CONDITION(inst.condition()), dstp.ireg(), srcp.ireg());
// cmovcc dstp,srcp
}
@@ -4089,7 +4089,7 @@ void drcbe_x64::op_mov(x86code *&dst, const instruction &inst)
}
// resolve the jump
- if (skip.target != NULL)
+ if (skip.target != nullptr)
resolve_link(dst, skip);
}
@@ -5944,7 +5944,7 @@ void drcbe_x64::op_fmov(x86code *&dst, const instruction &inst)
int dstreg = dstp.select_register(REG_XMM0);
// always start with a jmp
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
diff --git a/src/devices/cpu/drcbex64.h b/src/devices/cpu/drcbex64.h
index 6b6cf729b64..b78174949a0 100644
--- a/src/devices/cpu/drcbex64.h
+++ b/src/devices/cpu/drcbex64.h
@@ -41,7 +41,7 @@ public:
virtual void generate(drcuml_block &block, const uml::instruction *instlist, UINT32 numinst);
virtual bool hash_exists(UINT32 mode, UINT32 pc);
virtual void get_info(drcbe_info &info);
- virtual bool logging() const { return m_log != NULL; }
+ virtual bool logging() const { return m_log != nullptr; }
private:
// a be_parameter is similar to a uml::parameter but maps to native registers/memory
diff --git a/src/devices/cpu/drcbex86.cpp b/src/devices/cpu/drcbex86.cpp
index b52ece2b0cc..846d054bf14 100644
--- a/src/devices/cpu/drcbex86.cpp
+++ b/src/devices/cpu/drcbex86.cpp
@@ -507,25 +507,25 @@ drcbe_x86::drcbe_x86(drcuml_state &drcuml, device_t &device, drc_cache &cache, U
m_hash(cache, modes, addrbits, ignorebits),
m_map(cache, 0),
m_labels(cache),
- m_log(NULL),
+ m_log(nullptr),
m_logged_common(false),
m_sse3(false),
- m_entry(NULL),
- m_exit(NULL),
- m_nocode(NULL),
- m_save(NULL),
- m_restore(NULL),
+ m_entry(nullptr),
+ m_exit(nullptr),
+ m_nocode(nullptr),
+ m_save(nullptr),
+ m_restore(nullptr),
m_last_lower_reg(REG_NONE),
- m_last_lower_pc(NULL),
- m_last_lower_addr(NULL),
+ m_last_lower_pc(nullptr),
+ m_last_lower_addr(nullptr),
m_last_upper_reg(REG_NONE),
- m_last_upper_pc(NULL),
- m_last_upper_addr(NULL),
+ m_last_upper_pc(nullptr),
+ m_last_upper_addr(nullptr),
m_fptemp(0),
m_fpumode(0),
m_fmodesave(0),
- m_stacksave(0),
- m_hashstacksave(0),
+ m_stacksave(nullptr),
+ m_hashstacksave(nullptr),
m_reslo(0),
m_reshi(0),
m_fixup_label(FUNC(drcbe_x86::fixup_label), this),
@@ -562,8 +562,8 @@ drcbe_x86::drcbe_x86(drcuml_state &drcuml, device_t &device, drc_cache &cache, U
}
// build the opcode table (static but it doesn't hurt to regenerate it)
- for (int opnum = 0; opnum < ARRAY_LENGTH(s_opcode_table_source); opnum++)
- s_opcode_table[s_opcode_table_source[opnum].opcode] = s_opcode_table_source[opnum].func;
+ for (auto & elem : s_opcode_table_source)
+ s_opcode_table[elem.opcode] = elem.func;
// create the log
if (device.machine().options().drc_log_native())
@@ -581,7 +581,7 @@ drcbe_x86::drcbe_x86(drcuml_state &drcuml, device_t &device, drc_cache &cache, U
drcbe_x86::~drcbe_x86()
{
// free the log context
- if (m_log != NULL)
+ if (m_log != nullptr)
x86log_free_context(m_log);
}
@@ -593,12 +593,12 @@ drcbe_x86::~drcbe_x86()
void drcbe_x86::reset()
{
// output a note to the log
- if (m_log != NULL)
+ if (m_log != nullptr)
x86log_printf(m_log, "\n\n===========\nCACHE RESET\n===========\n\n");
// generate a little bit of glue code to set up the environment
drccodeptr *cachetop = m_cache.begin_codegen(500);
- if (cachetop == NULL)
+ if (cachetop == nullptr)
fatalerror("Out of cache space after a reset!\n");
x86code *dst = (x86code *)*cachetop;
@@ -628,7 +628,7 @@ void drcbe_x86::reset()
emit_mov_m32_r32(dst, MABS(&m_stacksave), REG_ESP); // mov [stacksave],esp
emit_fstcw_m16(dst, MABS(&m_fpumode)); // fstcw [fpumode]
emit_jmp_r32(dst, REG_EAX); // jmp eax
- if (m_log != NULL && !m_logged_common)
+ if (m_log != nullptr && !m_logged_common)
x86log_disasm_code_range(m_log, "entry_point", (x86code *)m_entry, dst);
// generate an exit point
@@ -641,13 +641,13 @@ void drcbe_x86::reset()
emit_pop_r32(dst, REG_ESI); // pop esi
emit_pop_r32(dst, REG_EBX); // pop ebx
emit_ret(dst); // ret
- if (m_log != NULL && !m_logged_common)
+ if (m_log != nullptr && !m_logged_common)
x86log_disasm_code_range(m_log, "exit_point", m_exit, dst);
// generate a no code point
m_nocode = dst;
emit_ret(dst); // ret
- if (m_log != NULL && !m_logged_common)
+ if (m_log != nullptr && !m_logged_common)
x86log_disasm_code_range(m_log, "nocode", m_nocode, dst);
// generate a save subroutine
@@ -663,8 +663,8 @@ void drcbe_x86::reset()
emit_mov_m32_r32(dst, MBD(REG_ECX, offsetof(drcuml_machine_state, exp)), REG_EAX); // mov state->exp,eax
for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.r); regnum++)
{
- FPTR regoffsl = (FPTR)&((drcuml_machine_state *)NULL)->r[regnum].w.l;
- FPTR regoffsh = (FPTR)&((drcuml_machine_state *)NULL)->r[regnum].w.h;
+ FPTR regoffsl = (FPTR)&((drcuml_machine_state *)nullptr)->r[regnum].w.l;
+ FPTR regoffsh = (FPTR)&((drcuml_machine_state *)nullptr)->r[regnum].w.h;
if (int_register_map[regnum] != 0)
emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsl), int_register_map[regnum]);
else
@@ -677,23 +677,23 @@ void drcbe_x86::reset()
}
for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.f); regnum++)
{
- FPTR regoffsl = (FPTR)&((drcuml_machine_state *)NULL)->f[regnum].s.l;
- FPTR regoffsh = (FPTR)&((drcuml_machine_state *)NULL)->f[regnum].s.h;
+ FPTR regoffsl = (FPTR)&((drcuml_machine_state *)nullptr)->f[regnum].s.l;
+ FPTR regoffsh = (FPTR)&((drcuml_machine_state *)nullptr)->f[regnum].s.h;
emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.f[regnum].s.l));
emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsl), REG_EAX);
emit_mov_r32_m32(dst, REG_EAX, MABS(&m_state.f[regnum].s.h));
emit_mov_m32_r32(dst, MBD(REG_ECX, regoffsh), REG_EAX);
}
emit_ret(dst); // ret
- if (m_log != NULL && !m_logged_common)
+ if (m_log != nullptr && !m_logged_common)
x86log_disasm_code_range(m_log, "save", m_save, dst);
// generate a restore subroutine
m_restore = dst;
for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.r); regnum++)
{
- FPTR regoffsl = (FPTR)&((drcuml_machine_state *)NULL)->r[regnum].w.l;
- FPTR regoffsh = (FPTR)&((drcuml_machine_state *)NULL)->r[regnum].w.h;
+ FPTR regoffsl = (FPTR)&((drcuml_machine_state *)nullptr)->r[regnum].w.l;
+ FPTR regoffsh = (FPTR)&((drcuml_machine_state *)nullptr)->r[regnum].w.h;
if (int_register_map[regnum] != 0)
emit_mov_r32_m32(dst, int_register_map[regnum], MBD(REG_ECX, regoffsl));
else
@@ -706,8 +706,8 @@ void drcbe_x86::reset()
}
for (int regnum = 0; regnum < ARRAY_LENGTH(m_state.f); regnum++)
{
- FPTR regoffsl = (FPTR)&((drcuml_machine_state *)NULL)->f[regnum].s.l;
- FPTR regoffsh = (FPTR)&((drcuml_machine_state *)NULL)->f[regnum].s.h;
+ FPTR regoffsl = (FPTR)&((drcuml_machine_state *)nullptr)->f[regnum].s.l;
+ FPTR regoffsh = (FPTR)&((drcuml_machine_state *)nullptr)->f[regnum].s.h;
emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ECX, regoffsl));
emit_mov_m32_r32(dst, MABS(&m_state.f[regnum].s.l), REG_EAX);
emit_mov_r32_m32(dst, REG_EAX, MBD(REG_ECX, regoffsh));
@@ -723,7 +723,7 @@ void drcbe_x86::reset()
emit_push_m32(dst, MABSI(flags_unmap, REG_EAX, 4)); // push flags_unmap[eax*4]
emit_popf(dst); // popf
emit_ret(dst); // ret
- if (m_log != NULL && !m_logged_common)
+ if (m_log != nullptr && !m_logged_common)
x86log_disasm_code_range(m_log, "restore", m_restore, dst);
// finish up codegen
@@ -762,7 +762,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
// begin codegen; fail if we can't
drccodeptr *cachetop = m_cache.begin_codegen(numinst * 8 * 4);
- if (cachetop == NULL)
+ if (cachetop == nullptr)
block.abort();
// compute the base by aligning the cache top to a cache line (assumed to be 64 bytes)
@@ -771,14 +771,14 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
// generate code
std::string tempstring;
- const char *blockname = NULL;
+ const char *blockname = nullptr;
for (int inum = 0; inum < numinst; inum++)
{
const instruction &inst = instlist[inum];
assert(inst.opcode() < ARRAY_LENGTH(s_opcode_table));
// add a comment
- if (m_log != NULL)
+ if (m_log != nullptr)
{
std::string dasm;
inst.disasm(dasm, &m_drcuml);
@@ -786,7 +786,7 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
}
// extract a blockname
- if (blockname == NULL)
+ if (blockname == nullptr)
{
if (inst.opcode() == OP_HANDLE)
blockname = inst.param(0).handle().string();
@@ -803,8 +803,8 @@ void drcbe_x86::generate(drcuml_block &block, const instruction *instlist, UINT3
m_cache.end_codegen();
// log it
- if (m_log != NULL)
- x86log_disasm_code_range(m_log, (blockname == NULL) ? "Unknown block" : blockname, base, m_cache.top());
+ if (m_log != nullptr)
+ x86log_disasm_code_range(m_log, (blockname == nullptr) ? "Unknown block" : blockname, base, m_cache.top());
// tell all of our utility objects that the block is finished
m_hash.block_end(block);
@@ -2839,7 +2839,7 @@ void drcbe_x86::fixup_exception(drccodeptr *codeptr, void *param1, void *param2)
// push the original return address on the stack
emit_push_imm(dst, (FPTR)src); // push <return>
- if (*targetptr != NULL)
+ if (*targetptr != nullptr)
emit_jmp(dst, *targetptr); // jmp *targetptr
else
emit_jmp_m32(dst, MABS(targetptr)); // jmp [targetptr]
@@ -2995,7 +2995,7 @@ void drcbe_x86::op_debug(x86code *&dst, const instruction &inst)
// test and branch
emit_test_m32_imm(dst, MABS(&m_device.machine().debug_flags), DEBUG_FLAG_CALL_HOOK); // test [debug_flags],DEBUG_FLAG_CALL_HOOK
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
emit_jcc_short_link(dst, x86emit::COND_Z, skip); // jz skip
// push the parameter
@@ -3163,7 +3163,7 @@ void drcbe_x86::op_exh(x86code *&dst, const instruction &inst)
if (inst.condition() == uml::COND_ALWAYS)
{
emit_mov_m32_p32(dst, MABS(&m_state.exp), exp); // mov [exp],exp
- if (*targetptr != NULL)
+ if (*targetptr != nullptr)
emit_call(dst, *targetptr); // call *targetptr
else
emit_call_m32(dst, MABS(targetptr)); // call [targetptr]
@@ -3172,7 +3172,7 @@ void drcbe_x86::op_exh(x86code *&dst, const instruction &inst)
// otherwise, jump to an out-of-band handler
else
{
- emit_jcc(dst, X86_CONDITION(inst.condition()), 0); // jcc exception
+ emit_jcc(dst, X86_CONDITION(inst.condition()), nullptr); // jcc exception
m_cache.request_oob_codegen(m_fixup_exception, dst, &const_cast<instruction &>(inst));
}
}
@@ -3197,12 +3197,12 @@ void drcbe_x86::op_callh(x86code *&dst, const instruction &inst)
drccodeptr *targetptr = handp.handle().codeptr_addr();
// skip if conditional
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
// jump through the handle; directly if a normal jump
- if (*targetptr != NULL)
+ if (*targetptr != nullptr)
emit_call(dst, *targetptr); // call *targetptr
else
emit_call_m32(dst, MABS(targetptr)); // call [targetptr]
@@ -3226,7 +3226,7 @@ void drcbe_x86::op_ret(x86code *&dst, const instruction &inst)
assert(inst.numparams() == 0);
// skip if conditional
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
@@ -3257,7 +3257,7 @@ void drcbe_x86::op_callc(x86code *&dst, const instruction &inst)
be_parameter paramp(*this, inst.param(1), PTYPE_M);
// skip if conditional
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
@@ -4200,7 +4200,7 @@ void drcbe_x86::op_mov(x86code *&dst, const instruction &inst)
int dstreg = dstp.select_register(REG_EAX);
// always start with a jmp
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
@@ -4219,7 +4219,7 @@ void drcbe_x86::op_mov(x86code *&dst, const instruction &inst)
else if (inst.condition() != uml::COND_ALWAYS && dstp.is_int_register() && srcp.is_memory())
{
dst = savedst;
- skip.target = NULL;
+ skip.target = nullptr;
emit_cmovcc_r32_m32(dst, X86_CONDITION(inst.condition()), dstp.ireg(), MABS(srcp.memory()));
// cmovcc dstp,[srcp]
}
@@ -4228,7 +4228,7 @@ void drcbe_x86::op_mov(x86code *&dst, const instruction &inst)
else if (inst.condition() != uml::COND_ALWAYS && dstp.is_int_register() && srcp.is_int_register())
{
dst = savedst;
- skip.target = NULL;
+ skip.target = nullptr;
emit_cmovcc_r32_r32(dst, X86_CONDITION(inst.condition()), dstp.ireg(), srcp.ireg());
// cmovcc dstp,srcp
}
@@ -4268,7 +4268,7 @@ void drcbe_x86::op_mov(x86code *&dst, const instruction &inst)
}
// resolve the jump
- if (skip.target != NULL)
+ if (skip.target != nullptr)
track_resolve_link(dst, skip);
}
@@ -6016,7 +6016,7 @@ void drcbe_x86::op_fmov(x86code *&dst, const instruction &inst)
be_parameter srcp(*this, inst.param(1), PTYPE_MF);
// always start with a jmp
- emit_link skip = { 0 };
+ emit_link skip = { nullptr };
if (inst.condition() != uml::COND_ALWAYS)
emit_jcc_short_link(dst, X86_NOT_CONDITION(inst.condition()), skip); // jcc skip
@@ -6029,7 +6029,7 @@ void drcbe_x86::op_fmov(x86code *&dst, const instruction &inst)
emit_mov_m32_r32(dst, MABS(dstp.memory(4)), REG_EDX); // mov [dstp + 4],edx
// resolve the jump
- if (skip.target != NULL)
+ if (skip.target != nullptr)
track_resolve_link(dst, skip); // skip:
}
diff --git a/src/devices/cpu/drcbex86.h b/src/devices/cpu/drcbex86.h
index 3c3af63d0d0..12731c34e83 100644
--- a/src/devices/cpu/drcbex86.h
+++ b/src/devices/cpu/drcbex86.h
@@ -41,7 +41,7 @@ public:
virtual void generate(drcuml_block &block, const uml::instruction *instlist, UINT32 numinst);
virtual bool hash_exists(UINT32 mode, UINT32 pc);
virtual void get_info(drcbe_info &info);
- virtual bool logging() const { return m_log != NULL; }
+ virtual bool logging() const { return m_log != nullptr; }
private:
// a be_parameter is similar to a uml::parameter but maps to native registers/memory
diff --git a/src/devices/cpu/drccache.cpp b/src/devices/cpu/drccache.cpp
index 74a0116aa97..ea4cbbbd558 100644
--- a/src/devices/cpu/drccache.cpp
+++ b/src/devices/cpu/drccache.cpp
@@ -37,7 +37,7 @@ drc_cache::drc_cache(size_t bytes)
m_base(m_near + NEAR_CACHE_SIZE),
m_top(m_base),
m_end(m_near + bytes),
- m_codegen(0),
+ m_codegen(nullptr),
m_size(bytes)
{
memset(m_free, 0, sizeof(m_free));
@@ -64,7 +64,7 @@ drc_cache::~drc_cache()
void drc_cache::flush()
{
// can't flush in the middle of codegen
- assert(m_codegen == NULL);
+ assert(m_codegen == nullptr);
// just reset the top back to the base and re-seed
m_top = m_base;
@@ -85,7 +85,7 @@ void *drc_cache::alloc(size_t bytes)
{
free_link **linkptr = &m_free[(bytes + CACHE_ALIGNMENT - 1) / CACHE_ALIGNMENT];
free_link *link = *linkptr;
- if (link != NULL)
+ if (link != nullptr)
{
*linkptr = link->m_next;
return link;
@@ -95,7 +95,7 @@ void *drc_cache::alloc(size_t bytes)
// if no space, we just fail
drccodeptr ptr = (drccodeptr)ALIGN_PTR_DOWN(m_end - bytes);
if (m_top > ptr)
- return NULL;
+ return nullptr;
// otherwise update the end of the cache
m_end = ptr;
@@ -117,7 +117,7 @@ void *drc_cache::alloc_near(size_t bytes)
{
free_link **linkptr = &m_nearfree[(bytes + CACHE_ALIGNMENT - 1) / CACHE_ALIGNMENT];
free_link *link = *linkptr;
- if (link != NULL)
+ if (link != nullptr)
{
*linkptr = link->m_next;
return link;
@@ -127,7 +127,7 @@ void *drc_cache::alloc_near(size_t bytes)
// if no space, we just fail
drccodeptr ptr = (drccodeptr)ALIGN_PTR_UP(m_neartop);
if (ptr + bytes > m_base)
- return NULL;
+ return nullptr;
// otherwise update the top of the near part of the cache
m_neartop = ptr + bytes;
@@ -143,12 +143,12 @@ void *drc_cache::alloc_near(size_t bytes)
void *drc_cache::alloc_temporary(size_t bytes)
{
// can't allocate in the middle of codegen
- assert(m_codegen == NULL);
+ assert(m_codegen == nullptr);
// if no space, we just fail
drccodeptr ptr = m_top;
if (ptr + bytes >= m_end)
- return NULL;
+ return nullptr;
// otherwise, update the cache top
m_top = (drccodeptr)ALIGN_PTR_UP(ptr + bytes);
@@ -187,13 +187,13 @@ void drc_cache::dealloc(void *memory, size_t bytes)
drccodeptr *drc_cache::begin_codegen(UINT32 reserve_bytes)
{
// can't restart in the middle of codegen
- assert(m_codegen == NULL);
- assert(m_ooblist.first() == NULL);
+ assert(m_codegen == nullptr);
+ assert(m_ooblist.first() == nullptr);
// if still no space, we just fail
drccodeptr ptr = m_top;
if (ptr + reserve_bytes >= m_end)
- return NULL;
+ return nullptr;
// otherwise, return a pointer to the cache top
m_codegen = m_top;
@@ -211,7 +211,7 @@ drccodeptr drc_cache::end_codegen()
// run the OOB handlers
oob_handler *oob;
- while ((oob = m_ooblist.detach_head()) != NULL)
+ while ((oob = m_ooblist.detach_head()) != nullptr)
{
// call the callback
oob->m_callback(&m_top, oob->m_param1, oob->m_param2);
@@ -223,7 +223,7 @@ drccodeptr drc_cache::end_codegen()
// update the cache top
m_top = (drccodeptr)ALIGN_PTR_UP(m_top);
- m_codegen = NULL;
+ m_codegen = nullptr;
return result;
}
@@ -236,11 +236,11 @@ drccodeptr drc_cache::end_codegen()
void drc_cache::request_oob_codegen(drc_oob_delegate callback, void *param1, void *param2)
{
- assert(m_codegen != NULL);
+ assert(m_codegen != nullptr);
// pull an item from the free list
oob_handler *oob = (oob_handler *)alloc(sizeof(*oob));
- assert(oob != NULL);
+ assert(oob != nullptr);
// fill it in
oob->m_callback = callback;
diff --git a/src/devices/cpu/drccache.h b/src/devices/cpu/drccache.h
index cf5a41e41dd..129a54e6936 100644
--- a/src/devices/cpu/drccache.h
+++ b/src/devices/cpu/drccache.h
@@ -53,7 +53,7 @@ public:
// pointer checking
bool contains_pointer(const void *ptr) const { return ((const drccodeptr)ptr >= m_near && (const drccodeptr)ptr < m_near + m_size); }
bool contains_near_pointer(const void *ptr) const { return ((const drccodeptr)ptr >= m_near && (const drccodeptr)ptr < m_neartop); }
- bool generating_code() const { return (m_codegen != NULL); }
+ bool generating_code() const { return (m_codegen != nullptr); }
// memory management
void flush();
@@ -65,7 +65,7 @@ public:
// codegen helpers
drccodeptr *begin_codegen(UINT32 reserve_bytes);
drccodeptr end_codegen();
- void request_oob_codegen(drc_oob_delegate callback, void *param1 = NULL, void *param2 = NULL);
+ void request_oob_codegen(drc_oob_delegate callback, void *param1 = nullptr, void *param2 = nullptr);
private:
// largest block of code that can be generated at once
diff --git a/src/devices/cpu/drcfe.cpp b/src/devices/cpu/drcfe.cpp
index f3746b22dc0..6d2bd09cddf 100644
--- a/src/devices/cpu/drcfe.cpp
+++ b/src/devices/cpu/drcfe.cpp
@@ -55,7 +55,7 @@ drc_frontend::drc_frontend(device_t &cpu, UINT32 window_start, UINT32 window_end
m_cpudevice(downcast<cpu_device &>(cpu)),
m_program(m_cpudevice.space(AS_PROGRAM)),
m_pageshift(m_cpudevice.space_config(AS_PROGRAM)->m_page_shift),
- m_desc_array(window_end + window_start + 2, 0)
+ m_desc_array(window_end + window_start + 2, nullptr)
{
}
@@ -97,7 +97,7 @@ const opcode_desc *drc_frontend::describe_code(offs_t startpc)
// if we've already hit this PC, just mark it a branch target and continue
pc_stack_entry *curstack = --pcstackptr;
opcode_desc *curdesc = m_desc_array[curstack->targetpc - minpc];
- if (curdesc != NULL)
+ if (curdesc != nullptr)
{
curdesc->flags |= OPFLAG_IS_BRANCH_TARGET;
@@ -110,7 +110,7 @@ const opcode_desc *drc_frontend::describe_code(offs_t startpc)
}
// loop until we exit the block
- for (offs_t curpc = curstack->targetpc; curpc >= minpc && curpc < maxpc && m_desc_array[curpc - minpc] == NULL; curpc += m_desc_array[curpc - minpc]->length)
+ for (offs_t curpc = curstack->targetpc; curpc >= minpc && curpc < maxpc && m_desc_array[curpc - minpc] == nullptr; curpc += m_desc_array[curpc - minpc]->length)
{
// allocate a new description and describe this instruction
m_desc_array[curpc - minpc] = curdesc = describe_one(curpc, curdesc);
@@ -160,8 +160,8 @@ opcode_desc *drc_frontend::describe_one(offs_t curpc, const opcode_desc *prevdes
{
// initialize the description
opcode_desc *desc = m_desc_allocator.alloc();
- desc->m_next = NULL;
- desc->branch = NULL;
+ desc->m_next = nullptr;
+ desc->branch = nullptr;
desc->delay.reset();
desc->pc = curpc;
desc->physpc = curpc;
@@ -200,7 +200,7 @@ opcode_desc *drc_frontend::describe_one(offs_t curpc, const opcode_desc *prevdes
{
// recursively describe the next instruction
opcode_desc *delaydesc = describe_one(delaypc, prev);
- if (delaydesc == NULL)
+ if (delaydesc == nullptr)
break;
desc->delay.append(*delaydesc);
prev = desc;
@@ -233,16 +233,16 @@ void drc_frontend::build_sequence(int start, int end, UINT32 endflag)
int seqstart = -1;
int skipsleft = 0;
for (int descnum = start; descnum < end; descnum++)
- if (m_desc_array[descnum] != NULL)
+ if (m_desc_array[descnum] != nullptr)
{
// determine the next instruction, taking skips into account
opcode_desc *curdesc = m_desc_array[descnum];
int nextdescnum = descnum + curdesc->length;
- opcode_desc *nextdesc = (nextdescnum < end) ? m_desc_array[nextdescnum] : NULL;
- for (UINT8 skipnum = 0; skipnum < curdesc->skipslots && nextdesc != NULL; skipnum++)
+ opcode_desc *nextdesc = (nextdescnum < end) ? m_desc_array[nextdescnum] : nullptr;
+ for (UINT8 skipnum = 0; skipnum < curdesc->skipslots && nextdesc != nullptr; skipnum++)
{
nextdescnum = nextdescnum + nextdesc->length;
- nextdesc = (nextdescnum < end) ? m_desc_array[nextdescnum] : NULL;
+ nextdesc = (nextdescnum < end) ? m_desc_array[nextdescnum] : nullptr;
}
// start a new sequence if we aren't already in the middle of one
@@ -254,7 +254,7 @@ void drc_frontend::build_sequence(int start, int end, UINT32 endflag)
}
// if we are the last instruction, indicate end-of-sequence and redispatch
- if (nextdesc == NULL)
+ if (nextdesc == nullptr)
{
curdesc->flags |= OPFLAG_END_SEQUENCE;
if (endflag != OPFLAG_RETURN_TO_START || nextdescnum == end)
@@ -266,11 +266,11 @@ void drc_frontend::build_sequence(int start, int end, UINT32 endflag)
{
// if there are instructions between us and the next instruction, we must end our sequence here
int scandescnum;
- opcode_desc *scandesc = NULL;
+ opcode_desc *scandesc = nullptr;
for (scandescnum = descnum + 1; scandescnum < end; scandescnum++)
{
scandesc = m_desc_array[scandescnum];
- if (scandesc != NULL || scandesc == nextdesc)
+ if (scandesc != nullptr || scandesc == nextdesc)
break;
}
if (scandesc != nextdesc)
@@ -294,7 +294,7 @@ void drc_frontend::build_sequence(int start, int end, UINT32 endflag)
UINT32 reqmask[4] = { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff };
if (seqstart != -1)
for (int backdesc = descnum; backdesc != seqstart - 1; backdesc--)
- if (m_desc_array[backdesc] != NULL)
+ if (m_desc_array[backdesc] != nullptr)
accumulate_required_backwards(*m_desc_array[backdesc], reqmask);
// reset the register states
@@ -334,7 +334,7 @@ void drc_frontend::build_sequence(int start, int end, UINT32 endflag)
void drc_frontend::accumulate_required_backwards(opcode_desc &desc, UINT32 *reqmask)
{
// recursively handle delay slots
- if (desc.delay.first() != NULL)
+ if (desc.delay.first() != nullptr)
accumulate_required_backwards(*desc.delay.first(), reqmask);
// if this is a branch, we have to reset our requests
@@ -370,7 +370,7 @@ void drc_frontend::accumulate_required_backwards(opcode_desc &desc, UINT32 *reqm
void drc_frontend::release_descriptions()
{
// release all delay slots first
- for (opcode_desc *curdesc = m_desc_live_list.first(); curdesc != NULL; curdesc = curdesc->next())
+ for (opcode_desc *curdesc = m_desc_live_list.first(); curdesc != nullptr; curdesc = curdesc->next())
m_desc_allocator.reclaim_all(curdesc->delay);
// reclaim all the descriptors
diff --git a/src/devices/cpu/drcuml.cpp b/src/devices/cpu/drcuml.cpp
index b7e3c3e0045..a835cb01bda 100644
--- a/src/devices/cpu/drcuml.cpp
+++ b/src/devices/cpu/drcuml.cpp
@@ -124,7 +124,7 @@ drcuml_state::drcuml_state(device_t &device, drc_cache &cache, UINT32 flags, int
m_beintf(device.machine().options().drc_use_c() ?
*static_cast<drcbe_interface *>(auto_alloc(device.machine(), drcbe_c(*this, device, cache, flags, modes, addrbits, ignorebits))) :
*static_cast<drcbe_interface *>(auto_alloc(device.machine(), drcbe_native(*this, device, cache, flags, modes, addrbits, ignorebits)))),
- m_umllog(NULL)
+ m_umllog(nullptr)
{
// if we're to log, create the logfile
if (device.machine().options().drc_log_uml())
@@ -145,7 +145,7 @@ drcuml_state::~drcuml_state()
auto_free(m_device.machine(), &m_beintf);
// close any files
- if (m_umllog != NULL)
+ if (m_umllog != nullptr)
fclose(m_umllog);
}
@@ -164,8 +164,8 @@ void drcuml_state::reset()
m_cache.flush();
// reset all handle code pointers
- for (code_handle *handle = m_handlelist.first(); handle != NULL; handle = handle->next())
- *handle->m_code = NULL;
+ for (code_handle *handle = m_handlelist.first(); handle != nullptr; handle = handle->next())
+ *handle->m_code = nullptr;
// call the backend to reset
m_beintf.reset();
@@ -195,13 +195,13 @@ void drcuml_state::reset()
drcuml_block *drcuml_state::begin_block(UINT32 maxinst)
{
// find an inactive block that matches our qualifications
- drcuml_block *bestblock = NULL;
- for (drcuml_block *block = m_blocklist.first(); block != NULL; block = block->next())
- if (!block->inuse() && block->maxinst() >= maxinst && (bestblock == NULL || block->maxinst() < bestblock->maxinst()))
+ drcuml_block *bestblock = nullptr;
+ for (drcuml_block *block = m_blocklist.first(); block != nullptr; block = block->next())
+ if (!block->inuse() && block->maxinst() >= maxinst && (bestblock == nullptr || block->maxinst() < bestblock->maxinst()))
bestblock = block;
// if we failed to find one, allocate a new one
- if (bestblock == NULL)
+ if (bestblock == nullptr)
bestblock = &m_blocklist.append(*global_alloc(drcuml_block(*this, maxinst * 3/2)));
// start the block
@@ -243,21 +243,21 @@ const char *drcuml_state::symbol_find(void *base, UINT32 *offset)
drccodeptr search = drccodeptr(base);
// simple linear search
- for (symbol *cursym = m_symlist.first(); cursym != NULL; cursym = cursym->next())
+ for (symbol *cursym = m_symlist.first(); cursym != nullptr; cursym = cursym->next())
if (search >= cursym->m_base && search < cursym->m_base + cursym->m_length)
{
// if no offset pointer, only match perfectly
- if (offset == NULL && search != cursym->m_base)
+ if (offset == nullptr && search != cursym->m_base)
continue;
// return the offset and name
- if (offset != NULL)
+ if (offset != nullptr)
*offset = search - cursym->m_base;
return cursym->m_name.c_str();
}
// not found; return NULL
- return NULL;
+ return nullptr;
}
@@ -269,7 +269,7 @@ const char *drcuml_state::symbol_find(void *base, UINT32 *offset)
void drcuml_state::log_printf(const char *format, ...)
{
// if we have a file, print to it
- if (m_umllog != NULL)
+ if (m_umllog != nullptr)
{
va_list va;
@@ -293,7 +293,7 @@ void drcuml_state::log_printf(const char *format, ...)
drcuml_block::drcuml_block(drcuml_state &drcuml, UINT32 maxinst)
: m_drcuml(drcuml),
- m_next(NULL),
+ m_next(nullptr),
m_nextinst(0),
m_maxinst(maxinst * 3/2),
m_inst(m_maxinst),
@@ -394,7 +394,7 @@ void drcuml_block::append_comment(const char *format, ...)
// allocate space in the cache to hold the comment
char *comment = (char *)m_drcuml.cache().alloc_temporary(temp.length() + 1);
- if (comment == NULL)
+ if (comment == nullptr)
return;
strcpy(comment, temp.c_str());
@@ -504,7 +504,7 @@ void drcuml_block::disassemble()
while (firstcomment <= instnum)
{
const char *text = get_comment_text(m_inst[firstcomment++], comment);
- if (text != NULL)
+ if (text != nullptr)
m_drcuml.log_printf("\t%50s; %s\n", "", text);
}
firstcomment = -1;
@@ -533,7 +533,7 @@ const char *drcuml_block::get_comment_text(const instruction &inst, std::string
}
// everything else is NULL
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/cpu/drcuml.h b/src/devices/cpu/drcuml.h
index 10652a224cc..cb24396c655 100644
--- a/src/devices/cpu/drcuml.h
+++ b/src/devices/cpu/drcuml.h
@@ -189,10 +189,10 @@ public:
// symbol management
void symbol_add(void *base, UINT32 length, const char *name);
- const char *symbol_find(void *base, UINT32 *offset = NULL);
+ const char *symbol_find(void *base, UINT32 *offset = nullptr);
// logging
- bool logging() const { return (m_umllog != NULL); }
+ bool logging() const { return (m_umllog != nullptr); }
void log_printf(const char *format, ...) ATTR_PRINTF(2,3);
void log_flush() { if (logging()) fflush(m_umllog); }
bool logging_native() const { return m_beintf.logging(); }
@@ -206,7 +206,7 @@ private:
// construction/destruction
symbol(void *base, UINT32 length, const char *name)
- : m_next(NULL),
+ : m_next(nullptr),
m_base(drccodeptr(base)),
m_length(length),
m_name(name) { }
diff --git a/src/devices/cpu/dsp16/dsp16.cpp b/src/devices/cpu/dsp16/dsp16.cpp
index 9f1de0c79f6..f7b68e50d75 100644
--- a/src/devices/cpu/dsp16/dsp16.cpp
+++ b/src/devices/cpu/dsp16/dsp16.cpp
@@ -72,9 +72,9 @@ dsp16_device::dsp16_device(const machine_config &mconfig, const char *tag, devic
m_cacheEnd(CACHE_INVALID),
m_cacheRedoNextPC(CACHE_INVALID),
m_cacheIterations(0),
- m_program(NULL),
- m_data(NULL),
- m_direct(NULL),
+ m_program(nullptr),
+ m_data(nullptr),
+ m_direct(nullptr),
m_icount(0)
{
// Allocate & setup
@@ -205,7 +205,7 @@ const address_space_config *dsp16_device::memory_space_config(address_spacenum s
{
return (spacenum == AS_PROGRAM) ? &m_program_config :
(spacenum == AS_DATA) ? &m_data_config :
- NULL;
+ nullptr;
}
diff --git a/src/devices/cpu/dsp16/dsp16ops.inc b/src/devices/cpu/dsp16/dsp16ops.inc
index d63fe9d3f99..23d8797e64d 100644
--- a/src/devices/cpu/dsp16/dsp16ops.inc
+++ b/src/devices/cpu/dsp16/dsp16ops.inc
@@ -141,9 +141,9 @@ void* dsp16_device::registerFromRImmediateField(const UINT8& R)
case 0x06: return (void*)&m_r2;
case 0x07: return (void*)&m_r3;
- default: return NULL;
+ default: return nullptr;
}
- return NULL;
+ return nullptr;
}
@@ -180,9 +180,9 @@ void* dsp16_device::registerFromRTable(const UINT8 &R)
case 0x1d: return (void*)&m_pdx0;
case 0x1e: return (void*)&m_pdx1;
- default: return NULL;
+ default: return nullptr;
}
- return NULL;
+ return nullptr;
}
@@ -195,7 +195,7 @@ void dsp16_device::executeF1Field(const UINT8& F1, const UINT8& D, const UINT8&
// implementation details (page 3-9)
// Where is are the results going?
- UINT64* destinationReg = NULL;
+ UINT64* destinationReg = nullptr;
switch (D)
{
case 0x00: destinationReg = &m_a0; break;
@@ -204,7 +204,7 @@ void dsp16_device::executeF1Field(const UINT8& F1, const UINT8& D, const UINT8&
}
// Which source is being used?
- UINT64* sourceReg = NULL;
+ UINT64* sourceReg = nullptr;
switch (S)
{
case 0x00: sourceReg = &m_a0; break;
@@ -377,7 +377,7 @@ void dsp16_device::executeF1Field(const UINT8& F1, const UINT8& D, const UINT8&
UINT16* dsp16_device::registerFromYFieldUpper(const UINT8& Y)
{
- UINT16* destinationReg = NULL;
+ UINT16* destinationReg = nullptr;
const UINT8 N = (Y & 0x0c) >> 2;
switch (N)
{
@@ -605,7 +605,7 @@ void dsp16_device::execute_one(const UINT16& op, UINT8& cycles, UINT8& pcAdvance
const UINT8 aT = (op & 0x0400) >> 10;
const UINT8 F1 = (op & 0x01e0) >> 5;
executeF1Field(F1, !aT, S);
- UINT64* destinationReg = NULL;
+ UINT64* destinationReg = nullptr;
switch(aT)
{
case 0: destinationReg = &m_a1; break;
@@ -783,7 +783,7 @@ void dsp16_device::execute_one(const UINT16& op, UINT8& cycles, UINT8& pcAdvance
// aT = R : (page 3-30)
const UINT8 R = (op & 0x03f0) >> 4;
const UINT8 aT = (op & 0x0400) >> 10;
- UINT64* destinationReg = NULL;
+ UINT64* destinationReg = nullptr;
switch(aT)
{
case 0: destinationReg = &m_a1; break;
diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp
index 8d7600cba80..a8e65846559 100644
--- a/src/devices/cpu/dsp32/dsp32.cpp
+++ b/src/devices/cpu/dsp32/dsp32.cpp
@@ -173,8 +173,8 @@ dsp32c_device::dsp32c_device(const machine_config &mconfig, const char *tag, dev
m_icount(0),
m_lastpins(0),
m_ppc(0),
- m_program(NULL),
- m_direct(NULL),
+ m_program(nullptr),
+ m_direct(nullptr),
m_output_pins_changed(*this)
{
// set our instruction counter
@@ -308,7 +308,7 @@ void dsp32c_device::device_reset()
const address_space_config *dsp32c_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : NULL;
+ return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
}
diff --git a/src/devices/cpu/dsp56k/dsp56k.h b/src/devices/cpu/dsp56k/dsp56k.h
index fc461dbcb16..4ce06916298 100644
--- a/src/devices/cpu/dsp56k/dsp56k.h
+++ b/src/devices/cpu/dsp56k/dsp56k.h
@@ -230,7 +230,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr ); }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/dsp56k/dsp56ops.inc b/src/devices/cpu/dsp56k/dsp56ops.inc
index 4656fed2c43..27cbbd315fa 100644
--- a/src/devices/cpu/dsp56k/dsp56ops.inc
+++ b/src/devices/cpu/dsp56k/dsp56ops.inc
@@ -252,7 +252,7 @@ static void execute_one(dsp56k_core* cpustate)
/* Dual X Memory Data Read : 011m mKKK .rr. .... : A-142*/
if ((op & 0xe000) == 0x6000)
{
- typed_pointer d_register = {NULL, DT_BYTE};
+ typed_pointer d_register = {nullptr, DT_BYTE};
/* Quote: (MOVE, MAC(R), MPY(R), ADD, SUB, TFR) */
UINT16 op_byte = op & 0x00ff;
@@ -342,7 +342,7 @@ static void execute_one(dsp56k_core* cpustate)
int parallelType = -1;
UINT16 op_byte = 0x0000;
- typed_pointer d_register = {NULL, DT_BYTE};
+ typed_pointer d_register = {nullptr, DT_BYTE};
UINT64 prev_accum_value = U64(0x0000000000000000);
/* Note: it's important that NPDM comes before RtRDM here */
@@ -1118,15 +1118,15 @@ static size_t dsp56k_op_addsub_2(dsp56k_core* cpustate, const UINT16 op_byte, ty
{
UINT64 useVal = 0;
UINT8 op_type = OP_OTHER;
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_uuuuF_table(cpustate, BITS(op_byte,0x0017), BITS(op_byte,0x0008), op_type, &S, &D);
/* If you gave an invalid operation type, presume it's a nop and move on with the parallel move */
if (op_type == OP_OTHER)
{
- d_register->addr = NULL;
+ d_register->addr = nullptr;
d_register->data_type = DT_BYTE;
cycles += 2;
return 1;
@@ -1172,9 +1172,9 @@ static size_t dsp56k_op_mac_1(dsp56k_core* cpustate, const UINT16 op_byte, typed
INT32 s1 = 0;
INT32 s2 = 0;
- void* D = NULL;
- void* S1 = NULL;
- void* S2 = NULL;
+ void* D = nullptr;
+ void* S1 = nullptr;
+ void* S2 = nullptr;
decode_QQF_table(cpustate, BITS(op_byte,0x0003), BITS(op_byte,0x0008), &S1, &S2, &D);
@@ -1238,9 +1238,9 @@ static size_t dsp56k_op_mpy_1(dsp56k_core* cpustate, const UINT16 op_byte, typed
INT32 s1 = 0;
INT32 s2 = 0;
- void* D = NULL;
- void* S1 = NULL;
- void* S2 = NULL;
+ void* D = nullptr;
+ void* S1 = nullptr;
+ void* S2 = nullptr;
decode_QQF_table(cpustate, BITS(op_byte,0x0003), BITS(op_byte,0x0008), &S1, &S2, &D);
@@ -1303,8 +1303,8 @@ static size_t dsp56k_op_mac_2(dsp56k_core* cpustate, const UINT16 op_byte, UINT8
/* CLR : .... .... 0000 F001 : A-60 */
static size_t dsp56k_op_clr(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer D = {NULL, DT_LONG_WORD};
- typed_pointer clear = {NULL, DT_LONG_WORD};
+ typed_pointer D = {nullptr, DT_LONG_WORD};
+ typed_pointer clear = {nullptr, DT_LONG_WORD};
UINT64 clear_val = U64(0x0000000000000000);
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
@@ -1336,8 +1336,8 @@ static size_t dsp56k_op_add(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
{
UINT64 addVal = 0;
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_JJJF_table(cpustate, BITS(op_byte,0x0007),BITS(op_byte,0x0008), &S, &D);
*p_accum = *((UINT64*)D.addr);
@@ -1375,7 +1375,7 @@ static size_t dsp56k_op_move(dsp56k_core* cpustate, const UINT16 op_byte, typed_
/* Equivalent to a nop with a parallel move */
/* These can't be used later. Hopefully compilers would pick this up. */
*p_accum = 0;
- d_register->addr = NULL;
+ d_register->addr = nullptr;
d_register->data_type = DT_BYTE;
/* S L E U N Z V C */
@@ -1388,8 +1388,8 @@ static size_t dsp56k_op_move(dsp56k_core* cpustate, const UINT16 op_byte, typed_
/* TFR : .... .... 0001 FJJJ : A-212 */
static size_t dsp56k_op_tfr(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_JJJF_table(cpustate, BITS(op_byte,0x0007),BITS(op_byte,0x0008), &S, &D);
@@ -1410,7 +1410,7 @@ static size_t dsp56k_op_tfr(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
/* RND : .... .... 0010 F000 : A-188 */
static size_t dsp56k_op_rnd(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
@@ -1438,7 +1438,7 @@ static size_t dsp56k_op_rnd(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
/* TST : .... .... 0010 F001 : A-218 */
static size_t dsp56k_op_tst(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer D = {NULL, DT_LONG_WORD};
+ typed_pointer D = {nullptr, DT_LONG_WORD};
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
@@ -1462,7 +1462,7 @@ static size_t dsp56k_op_tst(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
/* INC : .... .... 0010 F010 : A-104 */
static size_t dsp56k_op_inc(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
/* Save some data for the parallel move */
@@ -1494,7 +1494,7 @@ static size_t dsp56k_op_inc24(dsp56k_core* cpustate, const UINT16 op_byte, typed
{
UINT32 workBits24;
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
/* Save some data for the parallel move */
@@ -1527,8 +1527,8 @@ static size_t dsp56k_op_inc24(dsp56k_core* cpustate, const UINT16 op_byte, typed
/* OR : .... .... 0010 F1JJ : A-176 */
static size_t dsp56k_op_or(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_JJF_table(cpustate, BITS(op_byte,0x0003), BITS(op_byte,0x0008), &S, &D);
@@ -1555,7 +1555,7 @@ static size_t dsp56k_op_or(dsp56k_core* cpustate, const UINT16 op_byte, typed_po
/* ASR : .... .... 0011 F000 : A-32 */
static size_t dsp56k_op_asr(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
*p_accum = *((UINT64*)D.addr);
@@ -1598,7 +1598,7 @@ static size_t dsp56k_op_asl(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
/* LSR : .... .... 0011 F010 : A-120 */
static size_t dsp56k_op_lsr(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
*p_accum = *((UINT64*)D.addr);
@@ -1659,8 +1659,8 @@ static size_t dsp56k_op_subl(dsp56k_core* cpustate, const UINT16 op_byte, typed_
static size_t dsp56k_op_sub(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
UINT64 useVal = 0;
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_JJJF_table(cpustate, BITS(op_byte,0x0007), BITS(op_byte,0x0008), &S, &D);
@@ -1721,8 +1721,8 @@ static size_t dsp56k_op_cmp(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
UINT64 cmpVal = 0;
UINT64 result = 0;
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_JJJF_table(cpustate, BITS(op_byte,0x0007),BITS(op_byte,0x0008), &S, &D);
@@ -1773,7 +1773,7 @@ static size_t dsp56k_op_neg(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
/* NOT : .... .... 0110 F001 : A-174 */
static size_t dsp56k_op_not(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
*p_accum = *((UINT64*)D.addr);
@@ -1808,7 +1808,7 @@ static size_t dsp56k_op_dec24(dsp56k_core* cpustate, const UINT16 op_byte, typed
{
UINT32 workBits24;
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
/* Save some data for the parallel move */
@@ -1839,8 +1839,8 @@ static size_t dsp56k_op_dec24(dsp56k_core* cpustate, const UINT16 op_byte, typed
/* AND : .... .... 0110 F1JJ : A-24 */
static size_t dsp56k_op_and(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_JJF_table(cpustate, BITS(op_byte,0x0003), BITS(op_byte,0x0008), &S, &D);
@@ -1868,7 +1868,7 @@ static size_t dsp56k_op_and(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
static size_t dsp56k_op_abs(dsp56k_core* cpustate, const UINT16 op_byte, typed_pointer* d_register, UINT64* p_accum, UINT8* cycles)
{
INT64 opD = 0;
- typed_pointer D = {NULL, DT_LONG_WORD};
+ typed_pointer D = {nullptr, DT_LONG_WORD};
decode_F_table(cpustate, BITS(op_byte,0x0008), &D);
@@ -1932,8 +1932,8 @@ static size_t dsp56k_op_cmpm(dsp56k_core* cpustate, const UINT16 op_byte, typed_
INT64 absD;
INT64 absResult;
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_JJJF_table(cpustate, BITS(op_byte,0x0007),BITS(op_byte,0x0008), &S, &D);
@@ -1996,9 +1996,9 @@ static size_t dsp56k_op_mpy(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
INT32 s1 = 0;
INT32 s2 = 0;
- void* D = NULL;
- void* S1 = NULL;
- void* S2 = NULL;
+ void* D = nullptr;
+ void* S1 = nullptr;
+ void* S2 = nullptr;
decode_QQQF_table(cpustate, BITS(op_byte,0x0007), BITS(op_byte,0x0008), &S1, &S2, &D);
@@ -2045,9 +2045,9 @@ static size_t dsp56k_op_mac(dsp56k_core* cpustate, const UINT16 op_byte, typed_p
INT32 s1 = 0;
INT32 s2 = 0;
- void* D = NULL;
- void* S1 = NULL;
- void* S2 = NULL;
+ void* D = nullptr;
+ void* S1 = nullptr;
+ void* S2 = nullptr;
decode_QQQF_table(cpustate, BITS(op_byte,0x0007), BITS(op_byte,0x0008), &S1, &S2, &D);
@@ -2103,9 +2103,9 @@ static size_t dsp56k_op_macr(dsp56k_core* cpustate, const UINT16 op_byte, typed_
INT32 s1 = 0;
INT32 s2 = 0;
- void* D = NULL;
- void* S1 = NULL;
- void* S2 = NULL;
+ void* D = nullptr;
+ void* S1 = nullptr;
+ void* S2 = nullptr;
decode_QQQF_table(cpustate, BITS(op_byte,0x0007), BITS(op_byte,0x0008), &S1, &S2, &D);
@@ -2208,7 +2208,7 @@ static size_t dsp56k_op_andi(dsp56k_core* cpustate, const UINT16 op, UINT8* cycl
static size_t dsp56k_op_asl4(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
UINT64 p_accum = 0;
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op,0x0008), &D);
p_accum = *((UINT64*)D.addr);
@@ -2235,7 +2235,7 @@ static size_t dsp56k_op_asl4(dsp56k_core* cpustate, const UINT16 op, UINT8* cycl
static size_t dsp56k_op_asr4(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
UINT64 p_accum = 0;
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op,0x0008), &D);
p_accum = *((UINT64*)D.addr);
@@ -2266,7 +2266,7 @@ static size_t dsp56k_op_asr4(dsp56k_core* cpustate, const UINT16 op, UINT8* cycl
static size_t dsp56k_op_asr16(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
UINT64 backupVal;
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_F_table(cpustate, BITS(op,0x0008), &D);
@@ -2301,7 +2301,7 @@ static size_t dsp56k_op_bfop(dsp56k_core* cpustate, const UINT16 op, const UINT1
UINT16 workAddr = 0x0000;
UINT16 workingWord = 0x0000;
UINT16 previousValue = 0x0000;
- typed_pointer tempTP = { NULL, DT_BYTE };
+ typed_pointer tempTP = { nullptr, DT_BYTE };
UINT16 iVal = op2 & 0x00ff;
decode_BBB_bitmask(cpustate, BITS(op2,0xe000), &iVal);
@@ -2364,8 +2364,8 @@ static size_t dsp56k_op_bfop_1(dsp56k_core* cpustate, const UINT16 op, const UIN
UINT16 workAddr = 0x0000;
UINT16 workingWord = 0x0000;
UINT16 previousValue = 0x0000;
- typed_pointer R = { NULL, DT_BYTE };
- typed_pointer tempTP = { NULL, DT_BYTE };
+ typed_pointer R = { nullptr, DT_BYTE };
+ typed_pointer tempTP = { nullptr, DT_BYTE };
UINT16 iVal = op2 & 0x00ff;
decode_BBB_bitmask(cpustate, BITS(op2,0xe000), &iVal);
@@ -2431,7 +2431,7 @@ static size_t dsp56k_op_bfop_2(dsp56k_core* cpustate, const UINT16 op, const UIN
UINT16 previousValue = 0x0000;
UINT16 iVal = op2 & 0x00ff;
- typed_pointer S = { NULL, DT_BYTE };
+ typed_pointer S = { nullptr, DT_BYTE };
decode_BBB_bitmask(cpustate, BITS(op2,0xe000), &iVal);
decode_DDDDD_table(cpustate, BITS(op,0x001f), &S);
@@ -2724,8 +2724,8 @@ static size_t dsp56k_op_debugcc(dsp56k_core* cpustate, const UINT16 op, UINT8* c
static size_t dsp56k_op_div(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
/* WARNING : THIS DOES NOT WORK. IT DOESN'T EVEN TRY !!! */
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_DDF_table(cpustate, BITS(op,0x0003), BITS(op,0x0008), &S, &D);
@@ -2744,9 +2744,9 @@ static size_t dsp56k_op_dmac(dsp56k_core* cpustate, const UINT16 op, UINT8* cycl
UINT8 ss = 0;
INT64 result = 0;
- void* D = NULL;
- void* S1 = NULL;
- void* S2 = NULL;
+ void* D = nullptr;
+ void* S1 = nullptr;
+ void* S2 = nullptr;
decode_QQF_special_table(cpustate, BITS(op,0x0003), BITS(op,0x0008), &S1, &S2, &D);
@@ -2853,7 +2853,7 @@ static size_t dsp56k_op_do_2(dsp56k_core* cpustate, const UINT16 op, const UINT1
{
UINT8 retSize = 0;
UINT16 lValue = 0x0000;
- typed_pointer S = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
decode_DDDDD_table(cpustate, BITS(op,0x001f), &S);
/* TODO: Does not properly shift-limit sources A&B - Fix per the docs. */
@@ -2975,9 +2975,9 @@ static size_t dsp56k_op_imac(dsp56k_core* cpustate, const UINT16 op, UINT8* cycl
INT32 s1 = 0;
INT32 s2 = 0;
- void* D = NULL;
- void* S1 = NULL;
- void* S2 = NULL;
+ void* D = nullptr;
+ void* S1 = nullptr;
+ void* S2 = nullptr;
decode_QQQF_table(cpustate, BITS(op,0x0007), BITS(op,0x0008), &S1, &S2, &D);
@@ -3061,7 +3061,7 @@ static size_t dsp56k_op_jmp(dsp56k_core* cpustate, const UINT16 op, const UINT16
/* JMP : 0000 0001 0010 01RR : A-110 */
static size_t dsp56k_op_jmp_1(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
- typed_pointer R = { NULL, DT_BYTE };
+ typed_pointer R = { nullptr, DT_BYTE };
decode_RR_table(cpustate, BITS(op,0x0003), &R);
cpustate->ppc = PC;
@@ -3173,9 +3173,9 @@ static size_t dsp56k_op_jsr_2(dsp56k_core* cpustate, const UINT16 op, UINT8* cyc
static size_t dsp56k_op_lea(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
UINT16 ea = 0;
- UINT16 *rX = NULL;
- UINT16 *nX = NULL;
- typed_pointer D = {NULL, DT_BYTE};
+ UINT16 *rX = nullptr;
+ UINT16 *nX = nullptr;
+ typed_pointer D = {nullptr, DT_BYTE};
decode_TT_table(cpustate, BITS(op,0x0030), &D);
/* TODO: change the execute_mm_functions to return values. Maybe */
@@ -3219,9 +3219,9 @@ static size_t dsp56k_op_macsuuu(dsp56k_core* cpustate, const UINT16 op, UINT8* c
UINT8 s = 0;
INT64 result = 0;
- void* D = NULL;
- void* S1 = NULL;
- void* S2 = NULL;
+ void* D = nullptr;
+ void* S1 = nullptr;
+ void* S2 = nullptr;
decode_QQF_special_table(cpustate, BITS(op,0x0003), BITS(op,0x0008), &S1, &S2, &D);
@@ -3271,8 +3271,8 @@ static size_t dsp56k_op_move_2(dsp56k_core* cpustate, const UINT16 op, const UIN
static size_t dsp56k_op_movec(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
UINT8 W;
- typed_pointer R = { NULL, DT_BYTE };
- typed_pointer SD = { NULL, DT_BYTE };
+ typed_pointer R = { nullptr, DT_BYTE };
+ typed_pointer SD = { nullptr, DT_BYTE };
W = BITS(op,0x0400);
decode_DDDDD_table(cpustate, BITS(op,0x03e0), &SD);
@@ -3314,7 +3314,7 @@ static size_t dsp56k_op_movec_1(dsp56k_core* cpustate, const UINT16 op, UINT8* c
{
UINT8 W;
UINT16 memOffset;
- typed_pointer SD = {NULL, DT_BYTE};
+ typed_pointer SD = {nullptr, DT_BYTE};
W = BITS(op,0x0400);
decode_DDDDD_table(cpustate, BITS(op,0x03e0), &SD);
@@ -3355,8 +3355,8 @@ static size_t dsp56k_op_movec_2(dsp56k_core* cpustate, const UINT16 op, UINT8* c
{
UINT8 W;
UINT16 memOffset;
- typed_pointer SD = {NULL, DT_BYTE};
- typed_pointer XMemOffset = {NULL, DT_BYTE};
+ typed_pointer SD = {nullptr, DT_BYTE};
+ typed_pointer XMemOffset = {nullptr, DT_BYTE};
W = BITS(op,0x0400);
decode_Z_table(cpustate, BITS(op,0x0008), &XMemOffset);
@@ -3400,7 +3400,7 @@ static size_t dsp56k_op_movec_3(dsp56k_core* cpustate, const UINT16 op, const UI
{
UINT8 W;
UINT8 t;
- typed_pointer SD = { NULL, DT_BYTE };
+ typed_pointer SD = { nullptr, DT_BYTE };
W = BITS(op,0x0400);
t = BITS(op,0x0008);
@@ -3456,8 +3456,8 @@ static size_t dsp56k_op_movec_3(dsp56k_core* cpustate, const UINT16 op, const UI
/* MOVE(C) : 0010 10dd dddD DDDD : A-144 */
static size_t dsp56k_op_movec_4(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_DDDDD_table(cpustate, BITS(op,0x03e0), &S);
decode_DDDDD_table(cpustate, BITS(op,0x001f), &D);
@@ -3485,7 +3485,7 @@ static size_t dsp56k_op_movec_5(dsp56k_core* cpustate, const UINT16 op, const UI
INT8 xx;
UINT8 W;
UINT16 memOffset;
- typed_pointer SD = { NULL, DT_BYTE };
+ typed_pointer SD = { nullptr, DT_BYTE };
xx = (INT8)(op & 0x00ff);
W = BITS(op2,0x0400);
@@ -3526,8 +3526,8 @@ static size_t dsp56k_op_movec_5(dsp56k_core* cpustate, const UINT16 op, const UI
/* MOVE(I) : 0010 00DD BBBB BBBB : A-150 */
static size_t dsp56k_op_movei(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
- typed_pointer D = {NULL, DT_BYTE};
- typed_pointer immTP = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
+ typed_pointer immTP = {nullptr, DT_BYTE};
/* Typecasting to INT16 sign-extends the BBBBBBBB operand */
UINT16 immediateSignExtended = (INT16)(op & 0x00ff);
@@ -3548,8 +3548,8 @@ static size_t dsp56k_op_movei(dsp56k_core* cpustate, const UINT16 op, UINT8* cyc
static size_t dsp56k_op_movem(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
UINT8 W;
- typed_pointer R = { NULL, DT_BYTE };
- typed_pointer SD = { NULL, DT_BYTE };
+ typed_pointer R = { nullptr, DT_BYTE };
+ typed_pointer SD = { nullptr, DT_BYTE };
W = BITS(op,0x0100);
decode_RR_table(cpustate, BITS(op,0x00c0), &R);
@@ -3601,7 +3601,7 @@ static size_t dsp56k_op_movep(dsp56k_core* cpustate, const UINT16 op, UINT8* cyc
{
UINT16 W;
UINT16 pp;
- typed_pointer SD = {NULL, DT_BYTE};
+ typed_pointer SD = {nullptr, DT_BYTE};
decode_HH_table(cpustate, BITS(op,0x00c0), &SD);
/* TODO: Special cases for A & B */
@@ -3641,7 +3641,7 @@ static size_t dsp56k_op_movep_1(dsp56k_core* cpustate, const UINT16 op, UINT8* c
UINT16 W;
UINT16 pp;
- typed_pointer SD = {NULL, DT_BYTE};
+ typed_pointer SD = {nullptr, DT_BYTE};
decode_RR_table(cpustate, BITS(op,0x00c0), &SD);
pp = op & 0x001f;
@@ -3690,9 +3690,9 @@ static size_t dsp56k_op_mpysuuu(dsp56k_core* cpustate, const UINT16 op, UINT8* c
UINT8 s = 0;
INT64 result = 0;
- void* D = NULL;
- void* S1 = NULL;
- void* S2 = NULL;
+ void* D = nullptr;
+ void* S1 = nullptr;
+ void* S2 = nullptr;
decode_QQF_special_table(cpustate, BITS(op,0x0003), BITS(op,0x0008), &S1, &S2, &D);
@@ -3807,7 +3807,7 @@ static size_t dsp56k_op_rep_2(dsp56k_core* cpustate, const UINT16 op, UINT8* cyc
{
/* TODO: This is non-interruptable, probably have to turn off interrupts here */
UINT16 repValue;
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_DDDDD_table(cpustate, BITS(op,0x001f), &D);
/* TODO: handle special A&B source cases */
@@ -3924,10 +3924,10 @@ static size_t dsp56k_op_tcc(dsp56k_core* cpustate, const UINT16 op, UINT8* cycle
if (shouldTransfer)
{
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
typed_pointer S2 = {&R0, DT_WORD};
- typed_pointer D2 = {NULL, DT_BYTE};
+ typed_pointer D2 = {nullptr, DT_BYTE};
decode_h0hF_table(cpustate, BITS(op,0x0007),BITS(op,0x0008), &S, &D);
SetDestinationValue(S, D);
@@ -3946,8 +3946,8 @@ static size_t dsp56k_op_tcc(dsp56k_core* cpustate, const UINT16 op, UINT8* cycle
/* TFR(2) : 0001 0101 0000 F00J : A-214 */
static size_t dsp56k_op_tfr2(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_JF_table(cpustate, BITS(op,0x0001), BITS(op,0x0008), &S, &D);
@@ -3971,7 +3971,7 @@ static size_t dsp56k_op_tfr3(dsp56k_core* cpustate, const UINT16 op, UINT8* cycl
/* TST(2) : 0001 0101 0001 -1DD : A-220 */
static size_t dsp56k_op_tst2(dsp56k_core* cpustate, const UINT16 op, UINT8* cycles)
{
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_DD_table(cpustate, BITS(op,0x0003), &D);
/* S L E U N Z V C */
@@ -4175,7 +4175,7 @@ static void decode_HHH_table(dsp56k_core* cpustate, UINT16 HHH, typed_pointer* r
static void decode_IIII_table(dsp56k_core* cpustate, UINT16 IIII, typed_pointer* src_ret, typed_pointer* dst_ret, void *working)
{
- void *opposite = 0x00 ;
+ void *opposite = nullptr ;
if (working == &A) opposite = &B ;
else opposite = &A ;
@@ -4254,7 +4254,7 @@ static void decode_JF_table(dsp56k_core* cpustate, UINT16 J, UINT16 F, typed_poi
static void decode_KKK_table(dsp56k_core* cpustate, UINT16 KKK, typed_pointer* dst_ret1, typed_pointer* dst_ret2, void* working)
{
- void *opposite = 0x00 ;
+ void *opposite = nullptr ;
if (working == &A) opposite = &B ;
else opposite = &A ;
@@ -4360,8 +4360,8 @@ static void decode_uuuuF_table(dsp56k_core* cpustate, UINT16 uuuu, UINT16 F, UIN
/* Unknown uuuuFs have been seen in the wild */
add_sub_other = OP_OTHER;
- src_ret->addr = NULL; src_ret->data_type = DT_BYTE;
- dst_ret->addr = NULL; dst_ret->data_type = DT_BYTE;
+ src_ret->addr = nullptr; src_ret->data_type = DT_BYTE;
+ dst_ret->addr = nullptr; dst_ret->data_type = DT_BYTE;
switch(switchVal)
{
@@ -4440,8 +4440,8 @@ static void decode_Z_table(dsp56k_core* cpustate, UINT16 Z, typed_pointer* ret)
static void execute_m_table(dsp56k_core* cpustate, int x, UINT16 m)
{
- UINT16 *rX = 0x00 ;
- UINT16 *nX = 0x00 ;
+ UINT16 *rX = nullptr ;
+ UINT16 *nX = nullptr ;
switch(x)
{
@@ -4460,8 +4460,8 @@ static void execute_m_table(dsp56k_core* cpustate, int x, UINT16 m)
static void execute_mm_table(dsp56k_core* cpustate, UINT16 rnum, UINT16 mm)
{
- UINT16 *rX = NULL;
- UINT16 *nX = NULL;
+ UINT16 *rX = nullptr;
+ UINT16 *nX = nullptr;
switch(rnum)
{
@@ -4482,8 +4482,8 @@ static void execute_mm_table(dsp56k_core* cpustate, UINT16 rnum, UINT16 mm)
static void execute_MM_table(dsp56k_core* cpustate, UINT16 rnum, UINT16 MM)
{
- UINT16 *rX = 0x00 ;
- UINT16 *nX = 0x00 ;
+ UINT16 *rX = nullptr ;
+ UINT16 *nX = nullptr ;
switch(rnum)
{
@@ -4505,8 +4505,8 @@ static void execute_MM_table(dsp56k_core* cpustate, UINT16 rnum, UINT16 MM)
/* Returns R value */
static UINT16 execute_q_table(dsp56k_core* cpustate, int RR, UINT16 q)
{
- UINT16 *rX = 0x0000;
- UINT16 *nX = 0x0000;
+ UINT16 *rX = nullptr;
+ UINT16 *nX = nullptr;
switch(RR)
{
@@ -4529,8 +4529,8 @@ static UINT16 execute_q_table(dsp56k_core* cpustate, int RR, UINT16 q)
static void execute_z_table(dsp56k_core* cpustate, int RR, UINT16 z)
{
- UINT16 *rX = 0x00;
- UINT16 *nX = 0x00;
+ UINT16 *rX = nullptr;
+ UINT16 *nX = nullptr;
switch(RR)
{
@@ -4643,8 +4643,8 @@ static void dsp56k_process_rep(dsp56k_core* cpustate, size_t repSize)
/* Register to Register Data Move : 0100 IIII .... .... : A-132 */
static void execute_register_to_register_data_move(dsp56k_core* cpustate, const UINT16 op, typed_pointer* d_register, UINT64* prev_accum_value)
{
- typed_pointer S = {NULL, DT_BYTE};
- typed_pointer D = {NULL, DT_BYTE};
+ typed_pointer S = {nullptr, DT_BYTE};
+ typed_pointer D = {nullptr, DT_BYTE};
decode_IIII_table(cpustate, BITS(op,0x0f00), &S, &D, d_register->addr);
@@ -4672,8 +4672,8 @@ static void execute_address_register_update(dsp56k_core* cpustate, const UINT16
static void execute_x_memory_data_move(dsp56k_core* cpustate, const UINT16 op, typed_pointer* d_register, UINT64* prev_accum_value)
{
UINT16 W;
- typed_pointer R = {NULL, DT_BYTE};
- typed_pointer SD = {NULL, DT_BYTE};
+ typed_pointer R = {nullptr, DT_BYTE};
+ typed_pointer SD = {nullptr, DT_BYTE};
W = BITS(op,0x0100);
decode_HHH_table(cpustate, BITS(op,0x0e00), &SD);
@@ -4716,8 +4716,8 @@ static void execute_x_memory_data_move(dsp56k_core* cpustate, const UINT16 op, t
static void execute_x_memory_data_move2(dsp56k_core* cpustate, const UINT16 op, typed_pointer* d_register)
{
UINT16 W;
- UINT16* mem_offset = NULL;
- typed_pointer SD = {NULL, DT_BYTE};
+ UINT16* mem_offset = nullptr;
+ typed_pointer SD = {nullptr, DT_BYTE};
W = BITS(op,0x0100);
decode_HHH_table(cpustate, BITS(op,0x0e000), &SD);
@@ -4747,7 +4747,7 @@ static void execute_x_memory_data_move_with_short_displacement(dsp56k_core* cpus
INT8 xx;
UINT8 W;
UINT16 memOffset;
- typed_pointer SD = { NULL, DT_BYTE };
+ typed_pointer SD = { nullptr, DT_BYTE };
xx = (INT8)(op & 0x00ff);
W = BITS(op2,0x0100);
@@ -4777,9 +4777,9 @@ static void execute_dual_x_memory_data_read(dsp56k_core* cpustate, const UINT16
typed_pointer tempV;
UINT16 srcVal1 = 0x0000;
UINT16 srcVal2 = 0x0000;
- typed_pointer R = {NULL, DT_BYTE};
- typed_pointer D1 = {NULL, DT_BYTE};
- typed_pointer D2 = {NULL, DT_BYTE};
+ typed_pointer R = {nullptr, DT_BYTE};
+ typed_pointer D1 = {nullptr, DT_BYTE};
+ typed_pointer D2 = {nullptr, DT_BYTE};
decode_RR_table(cpustate, BITS(op,0x0060), &R);
decode_KKK_table(cpustate, BITS(op,0x0700), &D1, &D2, d_register->addr);
diff --git a/src/devices/cpu/dsp56k/inst.cpp b/src/devices/cpu/dsp56k/inst.cpp
index b9c3b4b313c..9eb06bb7327 100644
--- a/src/devices/cpu/dsp56k/inst.cpp
+++ b/src/devices/cpu/dsp56k/inst.cpp
@@ -26,7 +26,7 @@ std::unique_ptr<Instruction> Instruction::decodeInstruction(const Opcode* opc,
if ((w0 & 0xff00) == 0x0500)
{
// Avoid "05-- 05--" recursion
- if (shifted) return NULL;
+ if (shifted) return nullptr;
std::unique_ptr<Instruction> op = decodeInstruction(opc, w0, w1, true);
if (op)
@@ -779,7 +779,7 @@ std::unique_ptr<Instruction> Instruction::decodeInstruction(const Opcode* opc,
return std::make_unique<Shfr>(opc, w0, w1);
}
- return NULL;
+ return nullptr;
}
}
diff --git a/src/devices/cpu/dsp56k/pmove.cpp b/src/devices/cpu/dsp56k/pmove.cpp
index cb7562d2973..681acd4dcf6 100644
--- a/src/devices/cpu/dsp56k/pmove.cpp
+++ b/src/devices/cpu/dsp56k/pmove.cpp
@@ -32,7 +32,7 @@ std::unique_ptr<ParallelMove> ParallelMove::decodeParallelMove(const Opcode* opc
/* No Parallel Data Move : 0100 1010 .... .... : A-131 */
if ((w0 & 0xff00) == 0x4a00)
{
- return NULL;
+ return nullptr;
}
/* Register to Register Data Move : 0100 IIII .... .... : A-133 */
else if ((w0 & 0xf000) == 0x4000)
diff --git a/src/devices/cpu/e0c6200/e0c6200.h b/src/devices/cpu/e0c6200/e0c6200.h
index d32fc6c7b6c..7962ff6c16b 100644
--- a/src/devices/cpu/e0c6200/e0c6200.h
+++ b/src/devices/cpu/e0c6200/e0c6200.h
@@ -38,7 +38,7 @@ protected:
virtual void do_interrupt();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }
diff --git a/src/devices/cpu/e0c6200/e0c6s46.cpp b/src/devices/cpu/e0c6200/e0c6s46.cpp
index 66f4cb9855a..4dc37fa11fe 100644
--- a/src/devices/cpu/e0c6200/e0c6s46.cpp
+++ b/src/devices/cpu/e0c6200/e0c6s46.cpp
@@ -601,7 +601,7 @@ UINT32 e0c6s46_device::screen_update(screen_device &screen, bitmap_ind16 &bitmap
int seg = offset / 2;
int com = bank * 8 + (offset & 1) * 4 + c;
- if (m_pixel_update_handler != NULL)
+ if (m_pixel_update_handler != nullptr)
m_pixel_update_handler(*this, bitmap, cliprect, m_lcd_contrast, seg, com, pixel);
else if (cliprect.contains(seg, com))
bitmap.pix16(com, seg) = pixel;
diff --git a/src/devices/cpu/e132xs/e132xs.cpp b/src/devices/cpu/e132xs/e132xs.cpp
index a8f9f9075a8..95622ee095a 100644
--- a/src/devices/cpu/e132xs/e132xs.cpp
+++ b/src/devices/cpu/e132xs/e132xs.cpp
@@ -835,7 +835,7 @@ static const INT32 immediate_values[32] =
{
0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15,
- 16, 0, 0, 0, 32, 64, 128, 0x80000000,
+ 16, 0, 0, 0, 32, 64, 128, static_cast<INT32>(0x80000000),
-8, -7, -6, -5, -4, -3, -2, -1
};
@@ -1839,7 +1839,7 @@ const address_space_config *hyperstone_device::memory_space_config(address_space
{
return &m_io_config;
}
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/cpu/es5510/es5510.cpp b/src/devices/cpu/es5510/es5510.cpp
index 77b88b5d861..16a1396f77a 100644
--- a/src/devices/cpu/es5510/es5510.cpp
+++ b/src/devices/cpu/es5510/es5510.cpp
@@ -207,7 +207,7 @@ static inline const char * REGNAME(UINT8 r) {
case 254: return "MAX";
case 255: return "ZERO";
}
- return NULL;
+ return nullptr;
}
static inline char * DESCRIBE_REG(char *s, UINT8 r, const char *name) {
@@ -570,7 +570,7 @@ void es5510_device::device_reset() {
}
const address_space_config *es5510_device::memory_space_config(address_spacenum spacenum) const {
- return 0;
+ return nullptr;
}
UINT64 es5510_device::execute_clocks_to_cycles(UINT64 clocks) const {
@@ -613,7 +613,7 @@ void es5510_device::list_program(void(p)(const char *, ...)) {
}
for (addr = 0; addr < 0xa0; addr++) {
- DESCRIBE_INSTR(buf, instr[addr], gpr[addr], NULL, NULL, NULL, NULL);
+ DESCRIBE_INSTR(buf, instr[addr], gpr[addr], nullptr, nullptr, nullptr, nullptr);
UINT64 inst = instr[addr];
UINT8 aReg = (UINT8)((inst >> 16) & 0xff);
UINT8 bReg = (UINT8)((inst >> 24) & 0xff);
diff --git a/src/devices/cpu/esrip/esrip.cpp b/src/devices/cpu/esrip/esrip.cpp
index 07abb25d053..4a1b27b62de 100644
--- a/src/devices/cpu/esrip/esrip.cpp
+++ b/src/devices/cpu/esrip/esrip.cpp
@@ -341,7 +341,7 @@ const address_space_config *esrip_device::memory_space_config(address_spacenum s
{
return &m_program_config;
}
- return NULL;
+ return nullptr;
}
@@ -1696,7 +1696,7 @@ esrip_device::esrip_device(const machine_config &mconfig, const char *tag, devic
m_fdt_r(*this),
m_fdt_w(*this),
m_status_in(*this),
- m_lbrm_prom(NULL)
+ m_lbrm_prom(nullptr)
{
// build the opcode table
for (int op = 0; op < 24; op++)
diff --git a/src/devices/cpu/f8/f8.h b/src/devices/cpu/f8/f8.h
index a478cf137b1..14f36d63675 100644
--- a/src/devices/cpu/f8/f8.h
+++ b/src/devices/cpu/f8/f8.h
@@ -48,7 +48,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/g65816/g65816.cpp b/src/devices/cpu/g65816/g65816.cpp
index 03e7320eb89..8373ddbeecf 100644
--- a/src/devices/cpu/g65816/g65816.cpp
+++ b/src/devices/cpu/g65816/g65816.cpp
@@ -737,7 +737,7 @@ void g65816_device::g65816_set_sp(unsigned val)
unsigned g65816_device::g65816_get_reg(int regnum)
{
/* Set the function tables to emulation mode if the FTABLE is NULL */
- if( FTABLE_GET_REG == NULL )
+ if( FTABLE_GET_REG == nullptr )
g65816i_set_execution_mode(EXECUTION_MODE_E);
return (this->*FTABLE_GET_REG)(regnum);
@@ -813,11 +813,11 @@ void g65816_device::device_start()
m_wrdiv = 0;
m_dvdd = 0;
m_rddiv = 0;
- m_opcodes = NULL;
- m_get_reg = NULL;
- m_set_reg = NULL;
- m_set_line = NULL;
- m_execute = NULL;
+ m_opcodes = nullptr;
+ m_get_reg = nullptr;
+ m_set_reg = nullptr;
+ m_set_line = nullptr;
+ m_execute = nullptr;
m_debugger_temp = 0;
m_program = &space(AS_PROGRAM);
diff --git a/src/devices/cpu/g65816/g65816.h b/src/devices/cpu/g65816/g65816.h
index 19b76fb3d31..070a4cadb58 100644
--- a/src/devices/cpu/g65816/g65816.h
+++ b/src/devices/cpu/g65816/g65816.h
@@ -60,7 +60,7 @@ class g65816_device : public cpu_device
public:
// construction/destruction
g65816_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- g65816_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, int cpu_type, address_map_constructor internal = NULL);
+ g65816_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, int cpu_type, address_map_constructor internal = nullptr);
void set_read_vector_callback(read8_delegate read_vector);
@@ -77,7 +77,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp
index f92e0520a12..d1be228e732 100644
--- a/src/devices/cpu/h6280/h6280.cpp
+++ b/src/devices/cpu/h6280/h6280.cpp
@@ -263,9 +263,9 @@ void h6280_device::device_start()
m_icount = 0;
/* clear pending interrupts */
- for (int i = 0; i < 3; i++)
+ for (auto & elem : m_irq_state)
{
- m_irq_state[i] = CLEAR_LINE;
+ elem = CLEAR_LINE;
}
m_nmi_state = CLEAR_LINE;
}
diff --git a/src/devices/cpu/h6280/h6280.h b/src/devices/cpu/h6280/h6280.h
index dccf221abf7..5d3d9bfda43 100644
--- a/src/devices/cpu/h6280/h6280.h
+++ b/src/devices/cpu/h6280/h6280.h
@@ -89,7 +89,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address);
// device_disasm_interface overrides
diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp
index 79a803c1a5c..2692dc4372c 100644
--- a/src/devices/cpu/h8/h8.cpp
+++ b/src/devices/cpu/h8/h8.cpp
@@ -189,7 +189,7 @@ const address_space_config *h8_device::memory_space_config(address_spacenum spac
{
return
spacenum == AS_PROGRAM ? &program_config :
- spacenum == AS_IO ? &io_config : NULL;
+ spacenum == AS_IO ? &io_config : nullptr;
}
diff --git a/src/devices/cpu/h8/h8_timer16.cpp b/src/devices/cpu/h8/h8_timer16.cpp
index 2785e9b3ab8..fd4e47a13a2 100644
--- a/src/devices/cpu/h8/h8_timer16.cpp
+++ b/src/devices/cpu/h8/h8_timer16.cpp
@@ -15,7 +15,7 @@ h8_timer16_channel_device::h8_timer16_channel_device(const machine_config &mconf
cpu(*this, "^^"), chained_timer(nullptr), intc(nullptr), intc_tag(nullptr), tier_mask(0), tgr_count(0), tbr_count(0), tgr_clearing(0), tcr(0), tier(0), ier(0), isr(0), clock_type(0),
clock_divider(0), tcnt(0), last_clock_update(0), event_time(0), phase(0), counter_cycle(0), counter_incrementing(false), channel_active(false)
{
- chain_tag = NULL;
+ chain_tag = nullptr;
}
h8_timer16_channel_device::h8_timer16_channel_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) :
@@ -23,7 +23,7 @@ h8_timer16_channel_device::h8_timer16_channel_device(const machine_config &mconf
cpu(*this, "^^"), chained_timer(nullptr), intc(nullptr), intc_tag(nullptr), tier_mask(0), tgr_count(0), tbr_count(0), tgr_clearing(0), tcr(0), tier(0), ier(0), isr(0), clock_type(0),
clock_divider(0), tcnt(0), last_clock_update(0), event_time(0), phase(0), counter_cycle(0), counter_incrementing(false), channel_active(false)
{
- chain_tag = NULL;
+ chain_tag = nullptr;
}
void h8_timer16_channel_device::set_info(int _tgr_count, int _tbr_count, const char *intc, int irq_base)
diff --git a/src/devices/cpu/h8/h8_timer8.cpp b/src/devices/cpu/h8/h8_timer8.cpp
index 1359885d34f..29e156edfee 100644
--- a/src/devices/cpu/h8/h8_timer8.cpp
+++ b/src/devices/cpu/h8/h8_timer8.cpp
@@ -26,7 +26,7 @@ void h8_timer8_channel_device::set_info(const char *intc, int _irq_ca, int _irq_
irq_ca = _irq_ca;
irq_cb = _irq_cb;
irq_v = _irq_v;
- chain_tag = NULL;
+ chain_tag = nullptr;
chain_type = STOPPED;
has_adte = false;
has_ice = false;
@@ -179,7 +179,7 @@ void h8_timer8_channel_device::device_start()
if(chain_tag)
chained_timer = siblingdevice<h8_timer8_channel_device>(chain_tag);
else
- chained_timer = NULL;
+ chained_timer = nullptr;
}
void h8_timer8_channel_device::device_reset()
@@ -278,16 +278,16 @@ void h8_timer8_channel_device::recalc_event(UINT64 cur_time)
event_delay = counter_cycle;
}
- for(int i=0; i<2; i++) {
+ for(auto & elem : tcor) {
UINT32 new_delay = 0xffffffff;
- if(tcor[i] > tcnt) {
- if(tcnt >= counter_cycle || tcor[i] <= counter_cycle)
- new_delay = tcor[i] - tcnt;
- } else if(tcor[i] <= counter_cycle) {
+ if(elem > tcnt) {
+ if(tcnt >= counter_cycle || elem <= counter_cycle)
+ new_delay = elem - tcnt;
+ } else if(elem <= counter_cycle) {
if(tcnt < counter_cycle)
- new_delay = (counter_cycle - tcnt) + tcor[i];
+ new_delay = (counter_cycle - tcnt) + elem;
else
- new_delay = (0x100 - tcnt) + tcor[i];
+ new_delay = (0x100 - tcnt) + elem;
}
if(event_delay > new_delay)
event_delay = new_delay;
diff --git a/src/devices/cpu/hcd62121/hcd62121.cpp b/src/devices/cpu/hcd62121/hcd62121.cpp
index 4371edc8407..692297048c0 100644
--- a/src/devices/cpu/hcd62121/hcd62121.cpp
+++ b/src/devices/cpu/hcd62121/hcd62121.cpp
@@ -493,9 +493,9 @@ void hcd62121_cpu_device::device_reset()
m_f = 0;
m_dsize = 0;
- for( int i = 0; i < 0x80; i++ )
+ for(auto & elem : m_reg)
{
- m_reg[i] = 0;
+ elem = 0;
}
}
diff --git a/src/devices/cpu/hcd62121/hcd62121.h b/src/devices/cpu/hcd62121/hcd62121.h
index feaa1bf6533..a6f7d8cc31e 100644
--- a/src/devices/cpu/hcd62121/hcd62121.h
+++ b/src/devices/cpu/hcd62121/hcd62121.h
@@ -51,7 +51,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/hd61700/hd61700.cpp b/src/devices/cpu/hd61700/hd61700.cpp
index 30cf3f6a425..777a23de894 100644
--- a/src/devices/cpu/hd61700/hd61700.cpp
+++ b/src/devices/cpu/hd61700/hd61700.cpp
@@ -215,8 +215,8 @@ void hd61700_cpu_device::device_reset()
memset(m_reg16bit, 0, sizeof(m_reg16bit));
memset(m_regmain, 0, sizeof(m_regmain));
- for (int i=0;i<6; i++)
- m_lines_status[i] = CLEAR_LINE;
+ for (auto & elem : m_lines_status)
+ elem = CLEAR_LINE;
}
diff --git a/src/devices/cpu/hd61700/hd61700.h b/src/devices/cpu/hd61700/hd61700.h
index d903b8ecff7..671cfa8bcfc 100644
--- a/src/devices/cpu/hd61700/hd61700.h
+++ b/src/devices/cpu/hd61700/hd61700.h
@@ -95,7 +95,7 @@ protected:
void state_string_export(const device_state_entry &entry, std::string &str);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
diff --git a/src/devices/cpu/hmcs40/hmcs40.h b/src/devices/cpu/hmcs40/hmcs40.h
index c7862ec76b5..27a95f644d5 100644
--- a/src/devices/cpu/hmcs40/hmcs40.h
+++ b/src/devices/cpu/hmcs40/hmcs40.h
@@ -169,7 +169,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }
diff --git a/src/devices/cpu/hphybrid/hphybrid.h b/src/devices/cpu/hphybrid/hphybrid.h
index 7683cce28b6..dd7aeeb2ae0 100644
--- a/src/devices/cpu/hphybrid/hphybrid.h
+++ b/src/devices/cpu/hphybrid/hphybrid.h
@@ -86,7 +86,7 @@ protected:
UINT16 execute_one_sub(UINT16 opcode);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/hphybrid/hphybrid_dasm.cpp b/src/devices/cpu/hphybrid/hphybrid_dasm.cpp
index e9eddf49a96..2f4d1f9ef40 100644
--- a/src/devices/cpu/hphybrid/hphybrid_dasm.cpp
+++ b/src/devices/cpu/hphybrid/hphybrid_dasm.cpp
@@ -257,7 +257,7 @@ static const dis_entry_t dis_table[] = {
{0xff78 , 0x7970 , "WBC" , param_reg_id , 0 },
{0xff78 , 0x7978 , "WBD" , param_reg_id , 0 },
// *** END ***
- {0 , 0 , NULL , NULL , 0 }
+ {0 , 0 , nullptr , nullptr , 0 }
};
CPU_DISASSEMBLE(hp_hybrid)
diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp
index 9f6b218ed9e..9017ffbaea7 100644
--- a/src/devices/cpu/i386/i386.cpp
+++ b/src/devices/cpu/i386/i386.cpp
@@ -209,7 +209,7 @@ void i386_device::i386_set_descriptor_accessed(UINT16 selector)
base = m_gdtr.base;
addr = base + (selector & ~7) + 5;
- i386_translate_address(TRANSLATE_READ, &addr, NULL);
+ i386_translate_address(TRANSLATE_READ, &addr, nullptr);
rights = m_program->read_byte(addr);
// Should a fault be thrown if the table is read only?
m_program->write_byte(addr, rights | 1);
@@ -221,7 +221,7 @@ void i386_device::i386_load_segment_descriptor(int segment )
{
if (!V8086_MODE)
{
- i386_load_protected_mode_segment(&m_sreg[segment], NULL );
+ i386_load_protected_mode_segment(&m_sreg[segment], nullptr );
if(m_sreg[segment].selector)
i386_set_descriptor_accessed(m_sreg[segment].selector);
}
@@ -479,7 +479,7 @@ void i386_device::i386_check_sreg_validity(int reg)
memset(&desc, 0, sizeof(desc));
desc.selector = selector;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
RPL = selector & 0x03;
@@ -564,7 +564,7 @@ void i386_device::i386_sreg_load(UINT16 selector, UINT8 reg, bool *fault)
memset(&stack, 0, sizeof(stack));
stack.selector = selector;
- i386_load_protected_mode_segment(&stack,NULL);
+ i386_load_protected_mode_segment(&stack,nullptr);
DPL = (stack.flags >> 5) & 0x03;
if((selector & ~0x0003) == 0)
@@ -623,7 +623,7 @@ void i386_device::i386_sreg_load(UINT16 selector, UINT8 reg, bool *fault)
memset(&desc, 0, sizeof(desc));
desc.selector = selector;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
DPL = (desc.flags >> 5) & 0x03;
if(selector & 0x0004) // LDT
@@ -785,7 +785,7 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level)
/* Task gate */
memset(&desc, 0, sizeof(desc));
desc.selector = segment;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
if(segment & 0x04)
{
logerror("IRQ: Task gate: TSS is not in the GDT.\n");
@@ -822,7 +822,7 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level)
/* Interrupt or Trap gate */
memset(&desc, 0, sizeof(desc));
desc.selector = segment;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
CPL = m_CPL; // current privilege level
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
// RPL = segment & 0x03; // requested privilege level
@@ -872,7 +872,7 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level)
/* Check new stack segment in TSS */
memset(&stack, 0, sizeof(stack));
stack.selector = i386_get_stack_segment(DPL);
- i386_load_protected_mode_segment(&stack,NULL);
+ i386_load_protected_mode_segment(&stack,nullptr);
oldSS = m_sreg[SS].selector;
if(flags & 0x0008)
oldESP = REG32(ESP);
@@ -948,7 +948,7 @@ void i386_device::i386_trap(int irq, int irq_gate, int trap_level)
WRITE_TEST(stack.base+newESP-1);
/* Load new stack segment descriptor */
m_sreg[SS].selector = stack.selector;
- i386_load_protected_mode_segment(&m_sreg[SS],NULL);
+ i386_load_protected_mode_segment(&m_sreg[SS],nullptr);
i386_set_descriptor_accessed(stack.selector);
REG32(ESP) = newESP;
if(V8086_MODE)
@@ -1148,7 +1148,7 @@ void i386_device::i286_task_switch(UINT16 selector, UINT8 nested)
m_task.segment = selector;
memset(&seg, 0, sizeof(seg));
seg.selector = m_task.segment;
- i386_load_protected_mode_segment(&seg,NULL);
+ i386_load_protected_mode_segment(&seg,nullptr);
m_task.limit = seg.limit;
m_task.base = seg.base;
m_task.flags = seg.flags;
@@ -1160,7 +1160,7 @@ void i386_device::i286_task_switch(UINT16 selector, UINT8 nested)
tss = m_task.base;
m_ldtr.segment = READ16(tss+0x2a) & 0xffff;
seg.selector = m_ldtr.segment;
- i386_load_protected_mode_segment(&seg,NULL);
+ i386_load_protected_mode_segment(&seg,nullptr);
m_ldtr.limit = seg.limit;
m_ldtr.base = seg.base;
m_ldtr.flags = seg.flags;
@@ -1259,7 +1259,7 @@ void i386_device::i386_task_switch(UINT16 selector, UINT8 nested)
m_task.segment = selector;
memset(&seg, 0, sizeof(seg));
seg.selector = m_task.segment;
- i386_load_protected_mode_segment(&seg,NULL);
+ i386_load_protected_mode_segment(&seg,nullptr);
m_task.limit = seg.limit;
m_task.base = seg.base;
m_task.flags = seg.flags;
@@ -1271,7 +1271,7 @@ void i386_device::i386_task_switch(UINT16 selector, UINT8 nested)
tss = m_task.base;
m_ldtr.segment = READ32(tss+0x60) & 0xffff;
seg.selector = m_ldtr.segment;
- i386_load_protected_mode_segment(&seg,NULL);
+ i386_load_protected_mode_segment(&seg,nullptr);
m_ldtr.limit = seg.limit;
m_ldtr.base = seg.base;
m_ldtr.flags = seg.flags;
@@ -1379,7 +1379,7 @@ void i386_device::i386_protected_mode_jump(UINT16 seg, UINT32 off, int indirect,
/* Determine segment type */
memset(&desc, 0, sizeof(desc));
desc.selector = segment;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
CPL = m_CPL; // current privilege level
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
RPL = segment & 0x03; // requested privilege level
@@ -1437,7 +1437,7 @@ void i386_device::i386_protected_mode_jump(UINT16 seg, UINT32 off, int indirect,
logerror("JMP: Available 386 TSS at %08x\n",m_pc);
memset(&desc, 0, sizeof(desc));
desc.selector = segment;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
if(DPL < CPL)
{
@@ -1505,7 +1505,7 @@ void i386_device::i386_protected_mode_jump(UINT16 seg, UINT32 off, int indirect,
}
}
desc.selector = call_gate.selector;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
DPL = (desc.flags >> 5) & 0x03;
if((desc.flags & 0x0018) != 0x18)
{
@@ -1564,7 +1564,7 @@ void i386_device::i386_protected_mode_jump(UINT16 seg, UINT32 off, int indirect,
}
/* Check the TSS that the task gate points to */
desc.selector = call_gate.selector;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
RPL = call_gate.selector & 0x03; // requested privilege level
if(call_gate.selector & 0x04)
@@ -1649,7 +1649,7 @@ void i386_device::i386_protected_mode_call(UINT16 seg, UINT32 off, int indirect,
/* Determine segment type */
memset(&desc, 0, sizeof(desc));
desc.selector = selector;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
CPL = m_CPL; // current privilege level
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
RPL = selector & 0x03; // requested privilege level
@@ -1794,7 +1794,7 @@ void i386_device::i386_protected_mode_call(UINT16 seg, UINT32 off, int indirect,
FAULT(FAULT_GP,desc.selector & ~0x03) // #GP(selector)
}
}
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
if((desc.flags & 0x0018) != 0x18)
{
logerror("CALL: Call gate: Segment is not a code segment.\n");
@@ -1820,7 +1820,7 @@ void i386_device::i386_protected_mode_call(UINT16 seg, UINT32 off, int indirect,
/* Check new SS segment for privilege level from TSS */
memset(&stack, 0, sizeof(stack));
stack.selector = i386_get_stack_segment(DPL);
- i386_load_protected_mode_segment(&stack,NULL);
+ i386_load_protected_mode_segment(&stack,nullptr);
if((stack.selector & ~0x03) == 0)
{
logerror("CALL: Call gate: TSS selector is null\n");
@@ -1926,7 +1926,7 @@ void i386_device::i386_protected_mode_call(UINT16 seg, UINT32 off, int indirect,
memset(&temp, 0, sizeof(temp));
temp.selector = oldSS;
- i386_load_protected_mode_segment(&temp,NULL);
+ i386_load_protected_mode_segment(&temp,nullptr);
/* copy parameters from old stack to new stack */
for(x=(gate.dword_count & 0x1f)-1;x>=0;x--)
{
@@ -1993,7 +1993,7 @@ void i386_device::i386_protected_mode_call(UINT16 seg, UINT32 off, int indirect,
}
/* Check the TSS that the task gate points to */
desc.selector = gate.selector;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
if(gate.selector & 0x04)
{
logerror("CALL: Task Gate: TSS is not global.\n");
@@ -2087,7 +2087,7 @@ void i386_device::i386_protected_mode_retf(UINT8 count, UINT8 operand32)
memset(&desc, 0, sizeof(desc));
desc.selector = newCS;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
CPL = m_CPL; // current privilege level
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
RPL = newCS & 0x03;
@@ -2267,7 +2267,7 @@ void i386_device::i386_protected_mode_retf(UINT8 count, UINT8 operand32)
/* Check SS selector and descriptor */
desc.selector = newSS;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
if((newSS & ~0x07) == 0)
{
@@ -2405,7 +2405,7 @@ void i386_device::i386_protected_mode_iret(int operand32)
}
memset(&desc, 0, sizeof(desc));
desc.selector = task;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
if((desc.flags & 0x001f) != 0x000b)
{
logerror("IRET (%08x): Task return: Back-linked TSS is not a busy TSS.\n",m_pc);
@@ -2525,7 +2525,7 @@ void i386_device::i386_protected_mode_iret(int operand32)
}
memset(&desc, 0, sizeof(desc));
desc.selector = newCS;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
RPL = newCS & 0x03;
if((desc.flags & 0x0018) != 0x0018)
@@ -2586,7 +2586,7 @@ void i386_device::i386_protected_mode_iret(int operand32)
/* return to outer privilege level */
memset(&desc, 0, sizeof(desc));
desc.selector = newCS;
- i386_load_protected_mode_segment(&desc,NULL);
+ i386_load_protected_mode_segment(&desc,nullptr);
DPL = (desc.flags >> 5) & 0x03; // descriptor privilege level
RPL = newCS & 0x03;
if(operand32 == 0)
@@ -2669,7 +2669,7 @@ void i386_device::i386_protected_mode_iret(int operand32)
}
memset(&stack, 0, sizeof(stack));
stack.selector = newSS;
- i386_load_protected_mode_segment(&stack,NULL);
+ i386_load_protected_mode_segment(&stack,nullptr);
DPL = (stack.flags >> 5) & 0x03;
if((newSS & ~0x03) == 0)
{
@@ -2999,7 +2999,7 @@ UINT8 i386_device::read8_debug(UINT32 ea, UINT8 *data)
{
UINT32 address = ea;
- if(!i386_translate_address(TRANSLATE_DEBUG_MASK,&address,NULL))
+ if(!i386_translate_address(TRANSLATE_DEBUG_MASK,&address,nullptr))
return 0;
address &= m_a20_mask;
@@ -3134,7 +3134,7 @@ UINT64 i386_device::debug_virttophys(symbol_table &table, int params, const UINT
{
UINT32 result = param[0];
- if(!i386_translate_address(TRANSLATE_DEBUG_MASK,&result,NULL))
+ if(!i386_translate_address(TRANSLATE_DEBUG_MASK,&result,nullptr))
return 0;
return result;
}
@@ -3962,7 +3962,7 @@ bool i386_device::memory_translate(address_spacenum spacenum, int intention, off
{
bool ret = true;
if(spacenum == AS_PROGRAM)
- ret = i386_translate_address(intention, &address, NULL);
+ ret = i386_translate_address(intention, &address, nullptr);
address &= m_a20_mask;
return ret;
}
diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h
index 237001be9ac..a6271a2dc3a 100644
--- a/src/devices/cpu/i386/i386.h
+++ b/src/devices/cpu/i386/i386.h
@@ -52,7 +52,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address);
// device_state_interface overrides
diff --git a/src/devices/cpu/i386/i386op16.inc b/src/devices/cpu/i386/i386op16.inc
index 9456f8931b2..c7ce16553b0 100644
--- a/src/devices/cpu/i386/i386op16.inc
+++ b/src/devices/cpu/i386/i386op16.inc
@@ -1165,7 +1165,7 @@ void i386_device::i386_jmp_abs16() // Opcode 0xea
void i386_device::i386_lea16() // Opcode 0x8d
{
UINT8 modrm = FETCH();
- UINT32 ea = GetNonTranslatedEA(modrm,NULL);
+ UINT32 ea = GetNonTranslatedEA(modrm,nullptr);
STORE_REG16(modrm, ea);
CYCLES(CYCLES_LEA);
}
@@ -3173,7 +3173,7 @@ void i386_device::i386_group0F00_16() // Opcode 0x0f 00
}
memset(&seg, 0, sizeof(seg));
seg.selector = m_ldtr.segment;
- i386_load_protected_mode_segment(&seg,NULL);
+ i386_load_protected_mode_segment(&seg,nullptr);
m_ldtr.limit = seg.limit;
m_ldtr.base = seg.base;
m_ldtr.flags = seg.flags;
@@ -3200,10 +3200,10 @@ void i386_device::i386_group0F00_16() // Opcode 0x0f 00
}
memset(&seg, 0, sizeof(seg));
seg.selector = m_task.segment;
- i386_load_protected_mode_segment(&seg,NULL);
+ i386_load_protected_mode_segment(&seg,nullptr);
UINT32 addr = ((seg.selector & 4) ? m_ldtr.base : m_gdtr.base) + (seg.selector & ~7) + 5;
- i386_translate_address(TRANSLATE_READ, &addr, NULL);
+ i386_translate_address(TRANSLATE_READ, &addr, nullptr);
m_program->write_byte(addr, (seg.flags & 0xff) | 2);
m_task.limit = seg.limit;
@@ -3230,7 +3230,7 @@ void i386_device::i386_group0F00_16() // Opcode 0x0f 00
}
memset(&seg, 0, sizeof(seg));
seg.selector = address;
- result = i386_load_protected_mode_segment(&seg,NULL);
+ result = i386_load_protected_mode_segment(&seg,nullptr);
// check if the segment is a code or data segment (not a special segment type, like a TSS, gate, LDT...)
if(!(seg.flags & 0x10))
result = 0;
@@ -3278,7 +3278,7 @@ void i386_device::i386_group0F00_16() // Opcode 0x0f 00
}
memset(&seg, 0, sizeof(seg));
seg.selector = address;
- result = i386_load_protected_mode_segment(&seg,NULL);
+ result = i386_load_protected_mode_segment(&seg,nullptr);
// check if the segment is a code or data segment (not a special segment type, like a TSS, gate, LDT...)
if(!(seg.flags & 0x10))
result = 0;
@@ -3564,7 +3564,7 @@ void i386_device::i386_lar_r16_rm16() // Opcode 0x0f 0x02
}
else
{
- if(!i386_load_protected_mode_segment(&seg,NULL))
+ if(!i386_load_protected_mode_segment(&seg,nullptr))
{
SetZF(0);
return;
@@ -3629,7 +3629,7 @@ void i386_device::i386_lsl_r16_rm16() // Opcode 0x0f 0x03
else
{
UINT8 type;
- if(!i386_load_protected_mode_segment(&seg,NULL))
+ if(!i386_load_protected_mode_segment(&seg,nullptr))
{
SetZF(0);
return;
@@ -3747,7 +3747,7 @@ bool i386_device::i386_load_far_pointer16(int s)
UINT32 ea = GetEA(modrm,0);
STORE_REG16(modrm, READ16(ea + 0));
selector = READ16(ea + 2);
- i386_sreg_load(selector,s,NULL);
+ i386_sreg_load(selector,s,nullptr);
}
return true;
}
diff --git a/src/devices/cpu/i386/i386op32.inc b/src/devices/cpu/i386/i386op32.inc
index 96b3baddb1c..af5358e4bff 100644
--- a/src/devices/cpu/i386/i386op32.inc
+++ b/src/devices/cpu/i386/i386op32.inc
@@ -1007,7 +1007,7 @@ void i386_device::i386_jmp_abs32() // Opcode 0xea
void i386_device::i386_lea32() // Opcode 0x8d
{
UINT8 modrm = FETCH();
- UINT32 ea = GetNonTranslatedEA(modrm,NULL);
+ UINT32 ea = GetNonTranslatedEA(modrm,nullptr);
if (!m_address_size)
{
ea &= 0xffff;
@@ -2979,7 +2979,7 @@ void i386_device::i386_group0F00_32() // Opcode 0x0f 00
}
memset(&seg, 0, sizeof(seg));
seg.selector = m_ldtr.segment;
- i386_load_protected_mode_segment(&seg,NULL);
+ i386_load_protected_mode_segment(&seg,nullptr);
m_ldtr.limit = seg.limit;
m_ldtr.base = seg.base;
m_ldtr.flags = seg.flags;
@@ -3006,10 +3006,10 @@ void i386_device::i386_group0F00_32() // Opcode 0x0f 00
}
memset(&seg, 0, sizeof(seg));
seg.selector = m_task.segment;
- i386_load_protected_mode_segment(&seg,NULL);
+ i386_load_protected_mode_segment(&seg,nullptr);
UINT32 addr = ((seg.selector & 4) ? m_ldtr.base : m_gdtr.base) + (seg.selector & ~7) + 5;
- i386_translate_address(TRANSLATE_READ, &addr, NULL);
+ i386_translate_address(TRANSLATE_READ, &addr, nullptr);
m_program->write_byte(addr, (seg.flags & 0xff) | 2);
m_task.limit = seg.limit;
@@ -3035,7 +3035,7 @@ void i386_device::i386_group0F00_32() // Opcode 0x0f 00
}
memset(&seg, 0, sizeof(seg));
seg.selector = address;
- result = i386_load_protected_mode_segment(&seg,NULL);
+ result = i386_load_protected_mode_segment(&seg,nullptr);
// check if the segment is a code or data segment (not a special segment type, like a TSS, gate, LDT...)
if(!(seg.flags & 0x10))
result = 0;
@@ -3082,7 +3082,7 @@ void i386_device::i386_group0F00_32() // Opcode 0x0f 00
}
memset(&seg, 0, sizeof(seg));
seg.selector = address;
- result = i386_load_protected_mode_segment(&seg,NULL);
+ result = i386_load_protected_mode_segment(&seg,nullptr);
// check if the segment is a code or data segment (not a special segment type, like a TSS, gate, LDT...)
if(!(seg.flags & 0x10))
result = 0;
@@ -3434,7 +3434,7 @@ void i386_device::i386_lsl_r32_rm32() // Opcode 0x0f 0x03
else
{
UINT8 type;
- if(!i386_load_protected_mode_segment(&seg,NULL))
+ if(!i386_load_protected_mode_segment(&seg,nullptr))
{
SetZF(0);
return;
@@ -3550,7 +3550,7 @@ void i386_device::i386_load_far_pointer32(int s)
UINT32 ea = GetEA(modrm,0);
STORE_REG32(modrm, READ32(ea + 0));
selector = READ16(ea + 4);
- i386_sreg_load(selector,s,NULL);
+ i386_sreg_load(selector,s,nullptr);
}
}
diff --git a/src/devices/cpu/i386/i386ops.inc b/src/devices/cpu/i386/i386ops.inc
index 291c493233b..dc237c98469 100644
--- a/src/devices/cpu/i386/i386ops.inc
+++ b/src/devices/cpu/i386/i386ops.inc
@@ -1094,7 +1094,7 @@ void i386_device::i386_repeat(int invert_flag)
UINT32 count;
INT32 cycle_base = 0, cycle_adjustment = 0;
UINT8 prefix_flag=1;
- UINT8 *flag = NULL;
+ UINT8 *flag = nullptr;
do {
@@ -1162,7 +1162,7 @@ void i386_device::i386_repeat(int invert_flag)
// TODO: cycle count
cycle_base = 8;
cycle_adjustment = -4;
- flag = NULL;
+ flag = nullptr;
break;
case 0x6e:
@@ -1171,7 +1171,7 @@ void i386_device::i386_repeat(int invert_flag)
// TODO: cycle count
cycle_base = 8;
cycle_adjustment = -4;
- flag = NULL;
+ flag = nullptr;
break;
case 0xa4:
@@ -1179,7 +1179,7 @@ void i386_device::i386_repeat(int invert_flag)
/* MOVSB, MOVSW, MOVSD */
cycle_base = 8;
cycle_adjustment = -4;
- flag = NULL;
+ flag = nullptr;
break;
case 0xa6:
@@ -1195,7 +1195,7 @@ void i386_device::i386_repeat(int invert_flag)
/* LODSB, LODSW, LODSD */
cycle_base = 5;
cycle_adjustment = 1;
- flag = NULL;
+ flag = nullptr;
break;
case 0xaa:
@@ -1203,7 +1203,7 @@ void i386_device::i386_repeat(int invert_flag)
/* STOSB, STOSW, STOSD */
cycle_base = 5;
cycle_adjustment = 0;
- flag = NULL;
+ flag = nullptr;
break;
case 0xae:
diff --git a/src/devices/cpu/i386/pentops.inc b/src/devices/cpu/i386/pentops.inc
index 34dad95afda..ab89208314d 100644
--- a/src/devices/cpu/i386/pentops.inc
+++ b/src/devices/cpu/i386/pentops.inc
@@ -2165,7 +2165,7 @@ void i386_device::i386_cyrix_rsldt() // Opcode 0f 7b
memset(&seg, 0, sizeof(seg));
seg.selector = READ16(ea + 8);
- i386_load_protected_mode_segment(&seg,NULL);
+ i386_load_protected_mode_segment(&seg,nullptr);
m_ldtr.limit = limit;
m_ldtr.base = base;
m_ldtr.flags = flags;
@@ -2870,7 +2870,7 @@ void i386_device::sse_group_0fae() // Opcode 0f ae
WRITE32(ea, m_mxcsr);
break;
case 7: // clflush m8
- GetNonTranslatedEA(modm, NULL);
+ GetNonTranslatedEA(modm, nullptr);
break;
default:
report_invalid_modrm("sse_group_0fae", modm);
diff --git a/src/devices/cpu/i4004/i4004.h b/src/devices/cpu/i4004/i4004.h
index 956218f3723..97b360e6d22 100644
--- a/src/devices/cpu/i4004/i4004.h
+++ b/src/devices/cpu/i4004/i4004.h
@@ -50,7 +50,7 @@ protected:
case AS_PROGRAM: return &m_program_config;
case AS_IO: return &m_io_config;
case AS_DATA: return &m_data_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/i8008/i8008.cpp b/src/devices/cpu/i8008/i8008.cpp
index 9527185339a..319e6ccd56b 100644
--- a/src/devices/cpu/i8008/i8008.cpp
+++ b/src/devices/cpu/i8008/i8008.cpp
@@ -37,8 +37,8 @@ i8008_device::i8008_device(const machine_config &mconfig, const char *tag, devic
: cpu_device(mconfig, I8008, "i8008", tag, owner, clock, "i8008", __FILE__),
m_program_config("program", ENDIANNESS_LITTLE, 8, 14),
m_io_config("io", ENDIANNESS_LITTLE, 8, 8),
- m_program(0),
- m_direct(0)
+ m_program(nullptr),
+ m_direct(nullptr)
{
// set our instruction counter
m_icountptr = &m_icount;
@@ -143,7 +143,7 @@ const address_space_config *i8008_device::memory_space_config(address_spacenum s
{
return (spacenum == AS_PROGRAM) ? &m_program_config :
(spacenum == AS_IO) ? &m_io_config :
- NULL;
+ nullptr;
}
//-------------------------------------------------
diff --git a/src/devices/cpu/i8085/i8085.h b/src/devices/cpu/i8085/i8085.h
index 97f856117a2..85a66c9da02 100644
--- a/src/devices/cpu/i8085/i8085.h
+++ b/src/devices/cpu/i8085/i8085.h
@@ -82,7 +82,7 @@ protected:
virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 2); }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/i8089/i8089.cpp b/src/devices/cpu/i8089/i8089.cpp
index e2aa5e74712..7e4c09485a8 100644
--- a/src/devices/cpu/i8089/i8089.cpp
+++ b/src/devices/cpu/i8089/i8089.cpp
@@ -139,7 +139,7 @@ const address_space_config *i8089_device::memory_space_config(address_spacenum s
{
case AS_PROGRAM: return &m_program_config;
case AS_IO: return &m_io_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/i8089/i8089_channel.cpp b/src/devices/cpu/i8089/i8089_channel.cpp
index fe7666ac17c..932d59ff229 100644
--- a/src/devices/cpu/i8089/i8089_channel.cpp
+++ b/src/devices/cpu/i8089/i8089_channel.cpp
@@ -51,7 +51,7 @@ const device_type I8089_CHANNEL = &device_creator<i8089_channel>;
i8089_channel::i8089_channel(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, I8089_CHANNEL, "Intel 8089 I/O Channel", tag, owner, clock, "i8089_channel", __FILE__),
m_write_sintr(*this),
- m_iop(NULL),
+ m_iop(nullptr),
m_icount(0),
m_xfer_pending(false),
m_dma_value(0),
@@ -96,10 +96,10 @@ void i8089_channel::device_reset()
m_xfer_pending = false;
// initialize registers
- for (int i = 0; i < ARRAY_LENGTH(m_r); i++)
+ for (auto & elem : m_r)
{
- m_r[i].w = 0;
- m_r[i].t = 0;
+ elem.w = 0;
+ elem.t = 0;
}
m_prio = PRIO_IDLE;
}
diff --git a/src/devices/cpu/i8089/i8089_dasm.cpp b/src/devices/cpu/i8089/i8089_dasm.cpp
index d1f62621f3c..f0e9489e78c 100644
--- a/src/devices/cpu/i8089/i8089_dasm.cpp
+++ b/src/devices/cpu/i8089/i8089_dasm.cpp
@@ -353,7 +353,7 @@ private:
{
offset();
- i8089_instruction *tmp = new i8089_instruction(m_pc, m_oprom + m_pc);
+ auto tmp = new i8089_instruction(m_pc, m_oprom + m_pc);
m_pc += tmp->length();
if (m_w == 0)
@@ -439,7 +439,7 @@ const char *i8089_instruction::m_reg[] =
CPU_DISASSEMBLE( i8089 )
{
- i8089_instruction *i = new i8089_instruction(pc, oprom);
+ auto i = new i8089_instruction(pc, oprom);
strcpy(buffer, i->buffer());
offs_t result = i->length() | i->flags();
delete(i);
diff --git a/src/devices/cpu/i86/i186.cpp b/src/devices/cpu/i86/i186.cpp
index 072d70a95bb..7d30f5b9771 100644
--- a/src/devices/cpu/i86/i186.cpp
+++ b/src/devices/cpu/i86/i186.cpp
@@ -636,19 +636,19 @@ void i80186_cpu_device::device_reset()
m_intr.ext_state = 0x00;
m_reloc = 0x20ff;
- for (int i = 0; i < ARRAY_LENGTH(m_dma); i++)
+ for (auto & elem : m_dma)
{
- m_dma[i].drq_state = false;
- m_dma[i].control = 0;
+ elem.drq_state = false;
+ elem.control = 0;
}
- for (int i = 0; i < ARRAY_LENGTH(m_timer); i++)
+ for (auto & elem : m_timer)
{
- m_timer[i].control = 0;
- m_timer[i].maxA = 0;
- m_timer[i].maxB = 0;
- m_timer[i].active_count = false;
- m_timer[i].count = 0;
+ elem.control = 0;
+ elem.maxA = 0;
+ elem.maxB = 0;
+ elem.active_count = false;
+ elem.count = 0;
}
}
@@ -1071,10 +1071,10 @@ void i80186_cpu_device::inc_timer(int which)
if (t->control & 2)
{
if (t->count == (t->active_count ? t->maxB : t->maxA))
- device_timer(*t->int_timer, which, which, NULL);
+ device_timer(*t->int_timer, which, which, nullptr);
}
else if (t->count == t->maxA)
- device_timer(*t->int_timer, which, which, NULL);
+ device_timer(*t->int_timer, which, which, nullptr);
}
void i80186_cpu_device::internal_timer_update(int which, int new_count, int new_maxA, int new_maxB, int new_control)
diff --git a/src/devices/cpu/i86/i186.h b/src/devices/cpu/i86/i186.h
index af7302e729a..91eb7cda668 100644
--- a/src/devices/cpu/i86/i186.h
+++ b/src/devices/cpu/i86/i186.h
@@ -32,7 +32,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(int3_w) { external_int(3, state); }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
protected:
// device_execute_interface overrides
diff --git a/src/devices/cpu/i86/i286.h b/src/devices/cpu/i86/i286.h
index 64a0355bf6b..fa4a26d3022 100644
--- a/src/devices/cpu/i86/i286.h
+++ b/src/devices/cpu/i86/i286.h
@@ -67,7 +67,7 @@ public:
i80286_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
typedef delegate<UINT32 (bool)> a20_cb;
static void static_set_a20_callback(device_t &device, a20_cb object) { downcast<i80286_cpu_device &>(device).m_a20_callback = object; }
diff --git a/src/devices/cpu/i86/i86.h b/src/devices/cpu/i86/i86.h
index 6e48fecd71e..fbf475b97b7 100644
--- a/src/devices/cpu/i86/i86.h
+++ b/src/devices/cpu/i86/i86.h
@@ -345,7 +345,7 @@ public:
i8086_cpu_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, int data_bus_size);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
protected:
virtual void execute_run();
diff --git a/src/devices/cpu/i860/i860.h b/src/devices/cpu/i860/i860.h
index 1079d46b479..1d59f6fe826 100644
--- a/src/devices/cpu/i860/i860.h
+++ b/src/devices/cpu/i860/i860.h
@@ -73,7 +73,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_export(const device_state_entry &entry);
diff --git a/src/devices/cpu/i860/i860dec.inc b/src/devices/cpu/i860/i860dec.inc
index d0943c9e5a6..216d96a8a93 100644
--- a/src/devices/cpu/i860/i860dec.inc
+++ b/src/devices/cpu/i860/i860dec.inc
@@ -1342,7 +1342,7 @@ void i860_cpu_device::insn_pstd (UINT32 insn)
UINT32 fdest = get_fdest (insn);
UINT32 eff = 0;
int auto_inc = (insn & 1);
- UINT8 *bebuf = 0;
+ UINT8 *bebuf = nullptr;
int pm = GET_PSR_PM ();
int i;
UINT32 wmask;
@@ -4066,7 +4066,7 @@ const i860_cpu_device::decode_tbl_t i860_cpu_device::decode_tbl[64] = {
{ &i860_cpu_device::insn_stx, DEC_DECODED}, /* st.b isrc1ni,#const(isrc2). */
{ &i860_cpu_device::insn_ldx, DEC_DECODED}, /* ld.{s,l} isrc1(isrc2),idest. */
{ &i860_cpu_device::insn_ldx, DEC_DECODED}, /* ld.{s,l} #const(isrc2),idest. */
- { 0, 0},
+ { nullptr, 0},
{ &i860_cpu_device::insn_stx, DEC_DECODED}, /* st.{s,l} isrc1ni,#const(isrc2),idest.*/
{ &i860_cpu_device::insn_fldy, DEC_DECODED}, /* fld.{l,d,q} isrc1(isrc2)[++],fdest. */
{ &i860_cpu_device::insn_fldy, DEC_DECODED}, /* fld.{l,d,q} #const(isrc2)[++],fdest. */
@@ -4078,8 +4078,8 @@ const i860_cpu_device::decode_tbl_t i860_cpu_device::decode_tbl[64] = {
{ &i860_cpu_device::insn_pstd, DEC_DECODED}, /* pst.d fdest,#const(isrc2)[++]. */
{ &i860_cpu_device::insn_bri, DEC_DECODED}, /* bri isrc1ni. */
{ &i860_cpu_device::insn_trap, DEC_DECODED}, /* trap isrc1ni,isrc2,idest. */
- { 0, DEC_MORE}, /* FP ESCAPE FORMAT, more decode. */
- { 0, DEC_MORE}, /* CORE ESCAPE FORMAT, more decode. */
+ { nullptr, DEC_MORE}, /* FP ESCAPE FORMAT, more decode. */
+ { nullptr, DEC_MORE}, /* CORE ESCAPE FORMAT, more decode. */
{ &i860_cpu_device::insn_btne, DEC_DECODED}, /* btne isrc1,isrc2,sbroff. */
{ &i860_cpu_device::insn_btne_imm, DEC_DECODED}, /* btne #const,isrc2,sbroff. */
{ &i860_cpu_device::insn_bte, DEC_DECODED}, /* bte isrc1,isrc2,sbroff. */
@@ -4110,33 +4110,33 @@ const i860_cpu_device::decode_tbl_t i860_cpu_device::decode_tbl[64] = {
{ &i860_cpu_device::insn_shra_imm, DEC_DECODED}, /* shra #const,isrc2,idest. */
{ &i860_cpu_device::insn_and, DEC_DECODED}, /* and isrc1,isrc2,idest. */
{ &i860_cpu_device::insn_and_imm, DEC_DECODED}, /* and #const,isrc2,idest. */
- { 0, 0},
+ { nullptr, 0},
{ &i860_cpu_device::insn_andh_imm, DEC_DECODED}, /* andh #const,isrc2,idest. */
{ &i860_cpu_device::insn_andnot, DEC_DECODED}, /* andnot isrc1,isrc2,idest. */
{ &i860_cpu_device::insn_andnot_imm, DEC_DECODED}, /* andnot #const,isrc2,idest. */
- { 0, 0},
+ { nullptr, 0},
{ &i860_cpu_device::insn_andnoth_imm, DEC_DECODED}, /* andnoth #const,isrc2,idest. */
{ &i860_cpu_device::insn_or, DEC_DECODED}, /* or isrc1,isrc2,idest. */
{ &i860_cpu_device::insn_or_imm, DEC_DECODED}, /* or #const,isrc2,idest. */
- { 0, 0},
+ { nullptr, 0},
{ &i860_cpu_device::insn_orh_imm, DEC_DECODED}, /* orh #const,isrc2,idest. */
{ &i860_cpu_device::insn_xor, DEC_DECODED}, /* xor isrc1,isrc2,idest. */
{ &i860_cpu_device::insn_xor_imm, DEC_DECODED}, /* xor #const,isrc2,idest. */
- { 0, 0},
+ { nullptr, 0},
{ &i860_cpu_device::insn_xorh_imm, DEC_DECODED}, /* xorh #const,isrc2,idest. */
};
/* Second-level decode table (i.e., for the 3 core escape opcode bits). */
const i860_cpu_device::decode_tbl_t i860_cpu_device::core_esc_decode_tbl[8] = {
- { 0, 0},
- { 0, 0}, /* lock (FIXME: unimplemented). */
+ { nullptr, 0},
+ { nullptr, 0}, /* lock (FIXME: unimplemented). */
{ &i860_cpu_device::insn_calli, DEC_DECODED}, /* calli isrc1ni. */
- { 0, 0},
+ { nullptr, 0},
{ &i860_cpu_device::insn_intovr, DEC_DECODED}, /* intovr. */
- { 0, 0},
- { 0, 0},
- { 0, 0}, /* unlock (FIXME: unimplemented). */
+ { nullptr, 0},
+ { nullptr, 0},
+ { nullptr, 0}, /* unlock (FIXME: unimplemented). */
};
@@ -4184,97 +4184,97 @@ const i860_cpu_device::decode_tbl_t i860_cpu_device::fp_decode_tbl[128] = {
{ &i860_cpu_device::insn_frcp, DEC_DECODED}, /* 0x22 frcp.{ss,sd,dd} */
{ &i860_cpu_device::insn_frsqr, DEC_DECODED}, /* 0x23 frsqr.{ss,sd,dd} */
{ &i860_cpu_device::insn_fmul, DEC_DECODED}, /* 0x24 pfmul3.dd */
- { 0, 0}, /* 0x25 */
- { 0, 0}, /* 0x26 */
- { 0, 0}, /* 0x27 */
- { 0, 0}, /* 0x28 */
- { 0, 0}, /* 0x29 */
- { 0, 0}, /* 0x2A */
- { 0, 0}, /* 0x2B */
- { 0, 0}, /* 0x2C */
- { 0, 0}, /* 0x2D */
- { 0, 0}, /* 0x2E */
- { 0, 0}, /* 0x2F */
+ { nullptr, 0}, /* 0x25 */
+ { nullptr, 0}, /* 0x26 */
+ { nullptr, 0}, /* 0x27 */
+ { nullptr, 0}, /* 0x28 */
+ { nullptr, 0}, /* 0x29 */
+ { nullptr, 0}, /* 0x2A */
+ { nullptr, 0}, /* 0x2B */
+ { nullptr, 0}, /* 0x2C */
+ { nullptr, 0}, /* 0x2D */
+ { nullptr, 0}, /* 0x2E */
+ { nullptr, 0}, /* 0x2F */
{ &i860_cpu_device::insn_fadd_sub, DEC_DECODED}, /* 0x30, [p]fadd.{ss,sd,dd} */
{ &i860_cpu_device::insn_fadd_sub, DEC_DECODED}, /* 0x31, [p]fsub.{ss,sd,dd} */
- { 0, 0}, /* 0x32, [p]fix.{ss,sd,dd} FIXME: nyi. */
+ { nullptr, 0}, /* 0x32, [p]fix.{ss,sd,dd} FIXME: nyi. */
{ &i860_cpu_device::insn_famov, DEC_DECODED}, /* 0x33, [p]famov.{ss,sd,ds,dd} */
{ &i860_cpu_device::insn_fcmp, DEC_DECODED}, /* 0x34, pf{gt,le}.{ss,dd} */
{ &i860_cpu_device::insn_fcmp, DEC_DECODED}, /* 0x35, pfeq.{ss,dd} */
- { 0, 0}, /* 0x36 */
- { 0, 0}, /* 0x37 */
- { 0, 0}, /* 0x38 */
- { 0, 0}, /* 0x39 */
+ { nullptr, 0}, /* 0x36 */
+ { nullptr, 0}, /* 0x37 */
+ { nullptr, 0}, /* 0x38 */
+ { nullptr, 0}, /* 0x39 */
{ &i860_cpu_device::insn_ftrunc, DEC_DECODED}, /* 0x3A, [p]ftrunc.{ss,sd,dd} */
- { 0, 0}, /* 0x3B */
- { 0, 0}, /* 0x3C */
- { 0, 0}, /* 0x3D */
- { 0, 0}, /* 0x3E */
- { 0, 0}, /* 0x3F */
+ { nullptr, 0}, /* 0x3B */
+ { nullptr, 0}, /* 0x3C */
+ { nullptr, 0}, /* 0x3D */
+ { nullptr, 0}, /* 0x3E */
+ { nullptr, 0}, /* 0x3F */
{ &i860_cpu_device::insn_fxfr, DEC_DECODED}, /* 0x40, fxfr */
- { 0, 0}, /* 0x41 */
- { 0, 0}, /* 0x42 */
- { 0, 0}, /* 0x43 */
- { 0, 0}, /* 0x44 */
- { 0, 0}, /* 0x45 */
- { 0, 0}, /* 0x46 */
- { 0, 0}, /* 0x47 */
- { 0, 0}, /* 0x48 */
+ { nullptr, 0}, /* 0x41 */
+ { nullptr, 0}, /* 0x42 */
+ { nullptr, 0}, /* 0x43 */
+ { nullptr, 0}, /* 0x44 */
+ { nullptr, 0}, /* 0x45 */
+ { nullptr, 0}, /* 0x46 */
+ { nullptr, 0}, /* 0x47 */
+ { nullptr, 0}, /* 0x48 */
{ &i860_cpu_device::insn_fiadd_sub, DEC_DECODED}, /* 0x49, [p]fiadd.{ss,dd} */
- { 0, 0}, /* 0x4A */
- { 0, 0}, /* 0x4B */
- { 0, 0}, /* 0x4C */
+ { nullptr, 0}, /* 0x4A */
+ { nullptr, 0}, /* 0x4B */
+ { nullptr, 0}, /* 0x4C */
{ &i860_cpu_device::insn_fiadd_sub, DEC_DECODED}, /* 0x4D, [p]fisub.{ss,dd} */
- { 0, 0}, /* 0x4E */
- { 0, 0}, /* 0x4F */
+ { nullptr, 0}, /* 0x4E */
+ { nullptr, 0}, /* 0x4F */
{ &i860_cpu_device::insn_faddp, DEC_DECODED}, /* 0x50, [p]faddp */
{ &i860_cpu_device::insn_faddz, DEC_DECODED}, /* 0x51, [p]faddz */
- { 0, 0}, /* 0x52 */
- { 0, 0}, /* 0x53 */
- { 0, 0}, /* 0x54 */
- { 0, 0}, /* 0x55 */
- { 0, 0}, /* 0x56 */
+ { nullptr, 0}, /* 0x52 */
+ { nullptr, 0}, /* 0x53 */
+ { nullptr, 0}, /* 0x54 */
+ { nullptr, 0}, /* 0x55 */
+ { nullptr, 0}, /* 0x56 */
{ &i860_cpu_device::insn_fzchk, DEC_DECODED}, /* 0x57, [p]fzchkl */
- { 0, 0}, /* 0x58 */
- { 0, 0}, /* 0x59 */
+ { nullptr, 0}, /* 0x58 */
+ { nullptr, 0}, /* 0x59 */
{ &i860_cpu_device::insn_form, DEC_DECODED}, /* 0x5A, [p]form.dd */
- { 0, 0}, /* 0x5B */
- { 0, 0}, /* 0x5C */
- { 0, 0}, /* 0x5D */
- { 0, 0}, /* 0x5E */
+ { nullptr, 0}, /* 0x5B */
+ { nullptr, 0}, /* 0x5C */
+ { nullptr, 0}, /* 0x5D */
+ { nullptr, 0}, /* 0x5E */
{ &i860_cpu_device::insn_fzchk, DEC_DECODED}, /* 0x5F, [p]fzchks */
- { 0, 0}, /* 0x60 */
- { 0, 0}, /* 0x61 */
- { 0, 0}, /* 0x62 */
- { 0, 0}, /* 0x63 */
- { 0, 0}, /* 0x64 */
- { 0, 0}, /* 0x65 */
- { 0, 0}, /* 0x66 */
- { 0, 0}, /* 0x67 */
- { 0, 0}, /* 0x68 */
- { 0, 0}, /* 0x69 */
- { 0, 0}, /* 0x6A */
- { 0, 0}, /* 0x6B */
- { 0, 0}, /* 0x6C */
- { 0, 0}, /* 0x6D */
- { 0, 0}, /* 0x6E */
- { 0, 0}, /* 0x6F */
- { 0, 0}, /* 0x70 */
- { 0, 0}, /* 0x71 */
- { 0, 0}, /* 0x72 */
- { 0, 0}, /* 0x73 */
- { 0, 0}, /* 0x74 */
- { 0, 0}, /* 0x75 */
- { 0, 0}, /* 0x76 */
- { 0, 0}, /* 0x77 */
- { 0, 0}, /* 0x78 */
- { 0, 0}, /* 0x79 */
- { 0, 0}, /* 0x7A */
- { 0, 0}, /* 0x7B */
- { 0, 0}, /* 0x7C */
- { 0, 0}, /* 0x7D */
- { 0, 0}, /* 0x7E */
- { 0, 0}, /* 0x7F */
+ { nullptr, 0}, /* 0x60 */
+ { nullptr, 0}, /* 0x61 */
+ { nullptr, 0}, /* 0x62 */
+ { nullptr, 0}, /* 0x63 */
+ { nullptr, 0}, /* 0x64 */
+ { nullptr, 0}, /* 0x65 */
+ { nullptr, 0}, /* 0x66 */
+ { nullptr, 0}, /* 0x67 */
+ { nullptr, 0}, /* 0x68 */
+ { nullptr, 0}, /* 0x69 */
+ { nullptr, 0}, /* 0x6A */
+ { nullptr, 0}, /* 0x6B */
+ { nullptr, 0}, /* 0x6C */
+ { nullptr, 0}, /* 0x6D */
+ { nullptr, 0}, /* 0x6E */
+ { nullptr, 0}, /* 0x6F */
+ { nullptr, 0}, /* 0x70 */
+ { nullptr, 0}, /* 0x71 */
+ { nullptr, 0}, /* 0x72 */
+ { nullptr, 0}, /* 0x73 */
+ { nullptr, 0}, /* 0x74 */
+ { nullptr, 0}, /* 0x75 */
+ { nullptr, 0}, /* 0x76 */
+ { nullptr, 0}, /* 0x77 */
+ { nullptr, 0}, /* 0x78 */
+ { nullptr, 0}, /* 0x79 */
+ { nullptr, 0}, /* 0x7A */
+ { nullptr, 0}, /* 0x7B */
+ { nullptr, 0}, /* 0x7C */
+ { nullptr, 0}, /* 0x7D */
+ { nullptr, 0}, /* 0x7E */
+ { nullptr, 0}, /* 0x7F */
};
diff --git a/src/devices/cpu/i860/i860dis.cpp b/src/devices/cpu/i860/i860dis.cpp
index 1c72a9f474d..b158221ddc8 100644
--- a/src/devices/cpu/i860/i860dis.cpp
+++ b/src/devices/cpu/i860/i860dis.cpp
@@ -398,7 +398,7 @@ static const decode_tbl_t decode_tbl[64] =
{ int_stx, DEC_DECODED, "st." }, /* st.b isrc1ni,#const(isrc2). */
{ int_ldx, DEC_DECODED, "ld." }, /* ld.{s,l} isrc1(isrc2),idest. */
{ int_ldx, DEC_DECODED, "ld." }, /* ld.{s,l} #const(isrc2),idest. */
- { 0, 0 , 0 },
+ { nullptr, 0 , nullptr },
{ int_stx, DEC_DECODED, "st." }, /* st.{s,l} isrc1ni,#const(isrc2),idest.*/
{ int_fldst, DEC_DECODED, "fld." }, /* fld.{l,d,q} isrc1(isrc2)[++],fdest. */
{ int_fldst, DEC_DECODED, "fld." }, /* fld.{l,d,q} #const(isrc2)[++],fdest. */
@@ -410,8 +410,8 @@ static const decode_tbl_t decode_tbl[64] =
{ int_fldst, DEC_DECODED, "pstd." }, /* pst.d fdest,#const(isrc2)[++]. */
{ int_1, DEC_DECODED, "bri" }, /* bri isrc1ni. */
{ int_12d, DEC_DECODED, "trap" }, /* trap isrc1ni,isrc2,idest. */
- { 0, DEC_MORE, 0 }, /* FP ESCAPE FORMAT, more decode. */
- { 0, DEC_MORE, 0 }, /* CORE ESCAPE FORMAT, more decode. */
+ { nullptr, DEC_MORE, nullptr }, /* FP ESCAPE FORMAT, more decode. */
+ { nullptr, DEC_MORE, nullptr }, /* CORE ESCAPE FORMAT, more decode. */
{ int_12S, DEC_DECODED, "btne" }, /* btne isrc1,isrc2,sbroff. */
{ int_i2S, DEC_DECODED, "btne" }, /* btne #const,isrc2,sbroff. */
{ int_12S, DEC_DECODED, "bte" }, /* bte isrc1,isrc2,sbroff. */
@@ -442,19 +442,19 @@ static const decode_tbl_t decode_tbl[64] =
{ int_i2d, DEC_DECODED, "shra" }, /* shra #const,isrc2,idest. */
{ int_12d, DEC_DECODED, "and" }, /* and isrc1,isrc2,idest. */
{ int_i2d, DEC_DECODED, "and" }, /* and #const,isrc2,idest. */
- { 0, 0 , 0 },
+ { nullptr, 0 , nullptr },
{ int_i2d, DEC_DECODED, "andh" }, /* andh #const,isrc2,idest. */
{ int_12d, DEC_DECODED, "andnot" }, /* andnot isrc1,isrc2,idest. */
{ int_i2d, DEC_DECODED, "andnot" }, /* andnot #const,isrc2,idest. */
- { 0, 0 , 0 },
+ { nullptr, 0 , nullptr },
{ int_i2d, DEC_DECODED, "andnoth" }, /* andnoth #const,isrc2,idest.*/
{ int_12d, DEC_DECODED, "or" }, /* or isrc1,isrc2,idest. */
{ int_i2d, DEC_DECODED, "or" }, /* or #const,isrc2,idest. */
- { 0, 0 , 0 },
+ { nullptr, 0 , nullptr },
{ int_i2d, DEC_DECODED, "orh" }, /* orh #const,isrc2,idest. */
{ int_12d, DEC_DECODED, "xor" }, /* xor isrc1,isrc2,idest. */
{ int_i2d, DEC_DECODED, "xor" }, /* xor #const,isrc2,idest. */
- { 0, 0 , 0 },
+ { nullptr, 0 , nullptr },
{ int_i2d, DEC_DECODED, "xorh" }, /* xorh #const,isrc2,idest. */
};
@@ -462,13 +462,13 @@ static const decode_tbl_t decode_tbl[64] =
/* Second-level decode table (i.e., for the 3 core escape opcode bits). */
static const decode_tbl_t core_esc_decode_tbl[8] =
{
- { 0, 0 , 0 },
+ { nullptr, 0 , nullptr },
{ int_0, DEC_DECODED, "lock" }, /* lock. */
{ int_1, DEC_DECODED, "calli" }, /* calli isrc1ni. */
- { 0, 0 , 0 },
+ { nullptr, 0 , nullptr },
{ int_0, DEC_DECODED, "intovr" }, /* intovr. */
- { 0, 0 , 0 },
- { 0, 0 , 0 },
+ { nullptr, 0 , nullptr },
+ { nullptr, 0 , nullptr },
{ int_0, DEC_DECODED, "unlock" }, /* unlock. */
};
@@ -518,97 +518,97 @@ static const decode_tbl_t fp_decode_tbl[128] =
{ flop_2d, DEC_DECODED, "frcp." }, /* 0x22 frcp.{ss,sd,dd} */
{ flop_2d, DEC_DECODED, "frsqr." }, /* 0x23 frsqr.{ss,sd,dd} */
{ flop_12d, DEC_DECODED, "pfmul3.dd" }, /* 0x24 pfmul3.dd */
- { 0, 0 , 0 }, /* 0x25 */
- { 0, 0 , 0 }, /* 0x26 */
- { 0, 0 , 0 }, /* 0x27 */
- { 0, 0 , 0 }, /* 0x28 */
- { 0, 0 , 0 }, /* 0x29 */
- { 0, 0 , 0 }, /* 0x2A */
- { 0, 0 , 0 }, /* 0x2B */
- { 0, 0 , 0 }, /* 0x2C */
- { 0, 0 , 0 }, /* 0x2D */
- { 0, 0 , 0 }, /* 0x2E */
- { 0, 0 , 0 }, /* 0x2F */
+ { nullptr, 0 , nullptr }, /* 0x25 */
+ { nullptr, 0 , nullptr }, /* 0x26 */
+ { nullptr, 0 , nullptr }, /* 0x27 */
+ { nullptr, 0 , nullptr }, /* 0x28 */
+ { nullptr, 0 , nullptr }, /* 0x29 */
+ { nullptr, 0 , nullptr }, /* 0x2A */
+ { nullptr, 0 , nullptr }, /* 0x2B */
+ { nullptr, 0 , nullptr }, /* 0x2C */
+ { nullptr, 0 , nullptr }, /* 0x2D */
+ { nullptr, 0 , nullptr }, /* 0x2E */
+ { nullptr, 0 , nullptr }, /* 0x2F */
{ flop_12d, DEC_DECODED, "fadd." }, /* 0x30, [p]fadd.{ss,sd,dd} */
{ flop_12d, DEC_DECODED, "fsub." }, /* 0x31, [p]fsub.{ss,sd,dd} */
{ flop_1d, DEC_DECODED, "fix." }, /* 0x32, [p]fix.{ss,sd,dd} */
{ flop_1d, DEC_DECODED, "famov." }, /* 0x33, [p]famov.{ss,sd,ds,dd} */
{ flop_12d, DEC_DECODED, "f{gt,le}" }, /* 0x34, pf{gt,le}.{ss,dd} */
{ flop_12d, DEC_DECODED, "feq." }, /* 0x35, pfeq.{ss,dd} */
- { 0, 0 , 0 }, /* 0x36 */
- { 0, 0 , 0 }, /* 0x37 */
- { 0, 0 , 0 }, /* 0x38 */
- { 0, 0 , 0 }, /* 0x39 */
+ { nullptr, 0 , nullptr }, /* 0x36 */
+ { nullptr, 0 , nullptr }, /* 0x37 */
+ { nullptr, 0 , nullptr }, /* 0x38 */
+ { nullptr, 0 , nullptr }, /* 0x39 */
{ flop_1d, DEC_DECODED, "ftrunc." }, /* 0x3A, [p]ftrunc.{ss,sd,dd} */
- { 0, 0 , 0 }, /* 0x3B */
- { 0, 0 , 0 }, /* 0x3C */
- { 0, 0 , 0 }, /* 0x3D */
- { 0, 0 , 0 }, /* 0x3E */
- { 0, 0 , 0 }, /* 0x3F */
+ { nullptr, 0 , nullptr }, /* 0x3B */
+ { nullptr, 0 , nullptr }, /* 0x3C */
+ { nullptr, 0 , nullptr }, /* 0x3D */
+ { nullptr, 0 , nullptr }, /* 0x3E */
+ { nullptr, 0 , nullptr }, /* 0x3F */
{ flop_fxfr, DEC_DECODED, "fxfr" }, /* 0x40, fxfr fsrc1,idest. */
- { 0, 0 , 0 }, /* 0x41 */
- { 0, 0 , 0 }, /* 0x42 */
- { 0, 0 , 0 }, /* 0x43 */
- { 0, 0 , 0 }, /* 0x44 */
- { 0, 0 , 0 }, /* 0x45 */
- { 0, 0 , 0 }, /* 0x46 */
- { 0, 0 , 0 }, /* 0x47 */
- { 0, 0 , 0 }, /* 0x48 */
+ { nullptr, 0 , nullptr }, /* 0x41 */
+ { nullptr, 0 , nullptr }, /* 0x42 */
+ { nullptr, 0 , nullptr }, /* 0x43 */
+ { nullptr, 0 , nullptr }, /* 0x44 */
+ { nullptr, 0 , nullptr }, /* 0x45 */
+ { nullptr, 0 , nullptr }, /* 0x46 */
+ { nullptr, 0 , nullptr }, /* 0x47 */
+ { nullptr, 0 , nullptr }, /* 0x48 */
{ flop_12d, DEC_DECODED, "fiadd." }, /* 0x49, [p]fiadd.{ss,dd} */
- { 0, 0 , 0 }, /* 0x4A */
- { 0, 0 , 0 }, /* 0x4B */
- { 0, 0 , 0 }, /* 0x4C */
+ { nullptr, 0 , nullptr }, /* 0x4A */
+ { nullptr, 0 , nullptr }, /* 0x4B */
+ { nullptr, 0 , nullptr }, /* 0x4C */
{ flop_12d, DEC_DECODED, "fisub." }, /* 0x4D, [p]fisub.{ss,dd} */
- { 0, 0 , 0 }, /* 0x4E */
- { 0, 0 , 0 }, /* 0x4F */
+ { nullptr, 0 , nullptr }, /* 0x4E */
+ { nullptr, 0 , nullptr }, /* 0x4F */
{ flop_12d, DEC_DECODED, "faddp" }, /* 0x50, [p]faddp */
{ flop_12d, DEC_DECODED, "faddz" }, /* 0x51, [p]faddz */
- { 0, 0 , 0 }, /* 0x52 */
- { 0, 0 , 0 }, /* 0x53 */
- { 0, 0 , 0 }, /* 0x54 */
- { 0, 0 , 0 }, /* 0x55 */
- { 0, 0 , 0 }, /* 0x56 */
+ { nullptr, 0 , nullptr }, /* 0x52 */
+ { nullptr, 0 , nullptr }, /* 0x53 */
+ { nullptr, 0 , nullptr }, /* 0x54 */
+ { nullptr, 0 , nullptr }, /* 0x55 */
+ { nullptr, 0 , nullptr }, /* 0x56 */
{ flop_12d, DEC_DECODED, "fzchkl" }, /* 0x57, [p]fzchkl */
- { 0, 0 , 0 }, /* 0x58 */
- { 0, 0 , 0 }, /* 0x59 */
+ { nullptr, 0 , nullptr }, /* 0x58 */
+ { nullptr, 0 , nullptr }, /* 0x59 */
{ flop_1d, DEC_DECODED, "form" }, /* 0x5A, [p]form.dd */
- { 0, 0 , 0 }, /* 0x5B */
- { 0, 0 , 0 }, /* 0x5C */
- { 0, 0 , 0 }, /* 0x5D */
- { 0, 0 , 0 }, /* 0x5E */
+ { nullptr, 0 , nullptr }, /* 0x5B */
+ { nullptr, 0 , nullptr }, /* 0x5C */
+ { nullptr, 0 , nullptr }, /* 0x5D */
+ { nullptr, 0 , nullptr }, /* 0x5E */
{ flop_12d, DEC_DECODED, "fzchks" }, /* 0x5F, [p]fzchks */
- { 0, 0 , 0 }, /* 0x60 */
- { 0, 0 , 0 }, /* 0x61 */
- { 0, 0 , 0 }, /* 0x62 */
- { 0, 0 , 0 }, /* 0x63 */
- { 0, 0 , 0 }, /* 0x64 */
- { 0, 0 , 0 }, /* 0x65 */
- { 0, 0 , 0 }, /* 0x66 */
- { 0, 0 , 0 }, /* 0x67 */
- { 0, 0 , 0 }, /* 0x68 */
- { 0, 0 , 0 }, /* 0x69 */
- { 0, 0 , 0 }, /* 0x6A */
- { 0, 0 , 0 }, /* 0x6B */
- { 0, 0 , 0 }, /* 0x6C */
- { 0, 0 , 0 }, /* 0x6D */
- { 0, 0 , 0 }, /* 0x6E */
- { 0, 0 , 0 }, /* 0x6F */
- { 0, 0 , 0 }, /* 0x70 */
- { 0, 0 , 0 }, /* 0x71 */
- { 0, 0 , 0 }, /* 0x72 */
- { 0, 0 , 0 }, /* 0x73 */
- { 0, 0 , 0 }, /* 0x74 */
- { 0, 0 , 0 }, /* 0x75 */
- { 0, 0 , 0 }, /* 0x76 */
- { 0, 0 , 0 }, /* 0x77 */
- { 0, 0 , 0 }, /* 0x78 */
- { 0, 0 , 0 }, /* 0x79 */
- { 0, 0 , 0 }, /* 0x7A */
- { 0, 0 , 0 }, /* 0x7B */
- { 0, 0 , 0 }, /* 0x7C */
- { 0, 0 , 0 }, /* 0x7D */
- { 0, 0 , 0 }, /* 0x7E */
- { 0, 0 , 0 }, /* 0x7F */
+ { nullptr, 0 , nullptr }, /* 0x60 */
+ { nullptr, 0 , nullptr }, /* 0x61 */
+ { nullptr, 0 , nullptr }, /* 0x62 */
+ { nullptr, 0 , nullptr }, /* 0x63 */
+ { nullptr, 0 , nullptr }, /* 0x64 */
+ { nullptr, 0 , nullptr }, /* 0x65 */
+ { nullptr, 0 , nullptr }, /* 0x66 */
+ { nullptr, 0 , nullptr }, /* 0x67 */
+ { nullptr, 0 , nullptr }, /* 0x68 */
+ { nullptr, 0 , nullptr }, /* 0x69 */
+ { nullptr, 0 , nullptr }, /* 0x6A */
+ { nullptr, 0 , nullptr }, /* 0x6B */
+ { nullptr, 0 , nullptr }, /* 0x6C */
+ { nullptr, 0 , nullptr }, /* 0x6D */
+ { nullptr, 0 , nullptr }, /* 0x6E */
+ { nullptr, 0 , nullptr }, /* 0x6F */
+ { nullptr, 0 , nullptr }, /* 0x70 */
+ { nullptr, 0 , nullptr }, /* 0x71 */
+ { nullptr, 0 , nullptr }, /* 0x72 */
+ { nullptr, 0 , nullptr }, /* 0x73 */
+ { nullptr, 0 , nullptr }, /* 0x74 */
+ { nullptr, 0 , nullptr }, /* 0x75 */
+ { nullptr, 0 , nullptr }, /* 0x76 */
+ { nullptr, 0 , nullptr }, /* 0x77 */
+ { nullptr, 0 , nullptr }, /* 0x78 */
+ { nullptr, 0 , nullptr }, /* 0x79 */
+ { nullptr, 0 , nullptr }, /* 0x7A */
+ { nullptr, 0 , nullptr }, /* 0x7B */
+ { nullptr, 0 , nullptr }, /* 0x7C */
+ { nullptr, 0 , nullptr }, /* 0x7D */
+ { nullptr, 0 , nullptr }, /* 0x7E */
+ { nullptr, 0 , nullptr }, /* 0x7F */
};
diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp
index 031ab5e1833..d2bb39e709c 100644
--- a/src/devices/cpu/i960/i960.cpp
+++ b/src/devices/cpu/i960/i960.cpp
@@ -1582,7 +1582,7 @@ void i960_cpu_device::execute_op(UINT32 opcode)
switch((opcode >> 7) & 0xf) {
case 0x1: // movre
{
- UINT32 *src=0, *dst=0;
+ UINT32 *src=nullptr, *dst=nullptr;
m_icount -= 8;
diff --git a/src/devices/cpu/i960/i960.h b/src/devices/cpu/i960/i960.h
index 7251a091fd0..f50823b435f 100644
--- a/src/devices/cpu/i960/i960.h
+++ b/src/devices/cpu/i960/i960.h
@@ -92,7 +92,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/ie15/ie15.cpp b/src/devices/cpu/ie15/ie15.cpp
index 5cef25764a6..95851497236 100644
--- a/src/devices/cpu/ie15/ie15.cpp
+++ b/src/devices/cpu/ie15/ie15.cpp
@@ -32,8 +32,8 @@ ie15_device::ie15_device(const machine_config &mconfig, const char *tag, device_
: cpu_device(mconfig, IE15, "ie15", tag, owner, clock, "ie15_cpu", __FILE__),
m_program_config("program", ENDIANNESS_LITTLE, 8, 14),
m_io_config("io", ENDIANNESS_LITTLE, 8, 8), m_A(0), m_CF(0), m_ZF(0), m_RF(0), m_flags(0),
- m_program(0), m_io(nullptr),
- m_direct(0)
+ m_program(nullptr), m_io(nullptr),
+ m_direct(nullptr)
{
// set our instruction counter
m_icountptr = &m_icount;
@@ -91,7 +91,7 @@ const address_space_config *ie15_device::memory_space_config(address_spacenum sp
{
return (spacenum == AS_PROGRAM) ? &m_program_config :
(spacenum == AS_IO) ? &m_io_config :
- NULL;
+ nullptr;
}
//-------------------------------------------------
@@ -174,7 +174,7 @@ UINT32 ie15_device::disasm_max_opcode_bytes() const
offs_t ie15_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options)
{
extern CPU_DISASSEMBLE( ie15 );
- return CPU_DISASSEMBLE_NAME(ie15)(NULL, buffer, pc, oprom, opram, 0);
+ return CPU_DISASSEMBLE_NAME(ie15)(nullptr, buffer, pc, oprom, opram, 0);
}
//**************************************************************************
diff --git a/src/devices/cpu/jaguar/jaguar.cpp b/src/devices/cpu/jaguar/jaguar.cpp
index 976ab4f5983..0a3d1e92741 100644
--- a/src/devices/cpu/jaguar/jaguar.cpp
+++ b/src/devices/cpu/jaguar/jaguar.cpp
@@ -285,8 +285,8 @@ void jaguar_cpu_device::init_tables()
/* if we're not the first, skip */
if (table_refcount++ != 0)
{
- assert(mirror_table != NULL);
- assert(condition_table != NULL);
+ assert(mirror_table != nullptr);
+ assert(condition_table != nullptr);
return;
}
@@ -440,13 +440,13 @@ jaguar_cpu_device::~jaguar_cpu_device()
if (--table_refcount != 0)
return;
- if (mirror_table != NULL)
+ if (mirror_table != nullptr)
global_free_array(mirror_table);
- mirror_table = NULL;
+ mirror_table = nullptr;
- if (condition_table != NULL)
+ if (condition_table != nullptr)
global_free_array(condition_table);
- condition_table = NULL;
+ condition_table = nullptr;
}
diff --git a/src/devices/cpu/jaguar/jaguar.h b/src/devices/cpu/jaguar/jaguar.h
index 5139158861b..bfea55cd935 100644
--- a/src/devices/cpu/jaguar/jaguar.h
+++ b/src/devices/cpu/jaguar/jaguar.h
@@ -124,7 +124,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/lc8670/lc8670.cpp b/src/devices/cpu/lc8670/lc8670.cpp
index 9abb2121a66..c7af2b69546 100644
--- a/src/devices/cpu/lc8670/lc8670.cpp
+++ b/src/devices/cpu/lc8670/lc8670.cpp
@@ -396,7 +396,7 @@ const address_space_config * lc8670_cpu_device::memory_space_config(address_spac
return (spacenum == AS_PROGRAM) ? &m_program_config :
(spacenum == AS_DATA) ? &m_data_config :
(spacenum == AS_IO) ? &m_io_config :
- NULL;
+ nullptr;
}
//-------------------------------------------------
diff --git a/src/devices/cpu/lh5801/5801dasm.cpp b/src/devices/cpu/lh5801/5801dasm.cpp
index b622bda9de6..bef5fb4df4b 100644
--- a/src/devices/cpu/lh5801/5801dasm.cpp
+++ b/src/devices/cpu/lh5801/5801dasm.cpp
@@ -46,7 +46,7 @@ enum Regs
};
static const char *const RegNames[]= {
- 0, "A", "XL", "XH", "X", "YL", "YH", "Y", "UL", "UH", "U", "P", "S"
+ nullptr, "A", "XL", "XH", "X", "YL", "YH", "Y", "UL", "UH", "U", "P", "S"
};
#if defined(SEC)
@@ -89,7 +89,7 @@ enum Ins
};
static const char *const InsNames[]={
- "ILL", "ILL", 0, "NOP",
+ "ILL", "ILL", nullptr, "NOP",
"LDA", "STA", "LDI", "LDX", "STX",
"LDE", "SDE", "LIN", "SIN",
"TIN",
diff --git a/src/devices/cpu/lh5801/lh5801.h b/src/devices/cpu/lh5801/lh5801.h
index e5c6aa74690..6147f334ba4 100644
--- a/src/devices/cpu/lh5801/lh5801.h
+++ b/src/devices/cpu/lh5801/lh5801.h
@@ -87,7 +87,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/lr35902/lr35902.h b/src/devices/cpu/lr35902/lr35902.h
index 509f06e77f5..ecbeeeb4e1d 100644
--- a/src/devices/cpu/lr35902/lr35902.h
+++ b/src/devices/cpu/lr35902/lr35902.h
@@ -67,7 +67,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/lr35902/lr35902d.cpp b/src/devices/cpu/lr35902/lr35902d.cpp
index cf6d61bd7d6..8fe9bf8977a 100644
--- a/src/devices/cpu/lr35902/lr35902d.cpp
+++ b/src/devices/cpu/lr35902/lr35902d.cpp
@@ -120,22 +120,22 @@ static const lr35902dasm mnemonic_cb[256] = {
};
static const lr35902dasm mnemonic_main[256]= {
- {zNOP,0}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"},
- {zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,0},
+ {zNOP,nullptr}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"},
+ {zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,nullptr},
{zLD,"(W),sp"}, {zADD,"hl,bc"}, {zLD,"a,(bc)"}, {zDEC,"bc"},
- {zINC,"c"}, {zDEC,"c"}, {zLD,"c,B"}, {zRRCA,0},
- {zSTOP,0}, {zLD,"de,N"}, {zLD,"(de),a"}, {zINC,"de"},
- {zINC,"d"}, {zDEC,"d"}, {zLD,"d,B"}, {zRLA,0},
+ {zINC,"c"}, {zDEC,"c"}, {zLD,"c,B"}, {zRRCA,nullptr},
+ {zSTOP,nullptr}, {zLD,"de,N"}, {zLD,"(de),a"}, {zINC,"de"},
+ {zINC,"d"}, {zDEC,"d"}, {zLD,"d,B"}, {zRLA,nullptr},
{zJR,"O"}, {zADD,"hl,de"}, {zLD,"a,(de)"}, {zDEC,"de"},
- {zINC,"e"}, {zDEC,"e"}, {zLD,"e,B"}, {zRRA,0},
+ {zINC,"e"}, {zDEC,"e"}, {zLD,"e,B"}, {zRRA,nullptr},
{zJR,"nz,O"}, {zLD,"hl,N"}, {zLD,"(hl+),a"},{zINC,"hl"},
- {zINC,"h"}, {zDEC,"h"}, {zLD,"h,B"}, {zDAA,0},
+ {zINC,"h"}, {zDEC,"h"}, {zLD,"h,B"}, {zDAA,nullptr},
{zJR,"z,O"}, {zADD,"hl,hl"}, {zLD,"a,(hl+)"},{zDEC,"hl"},
- {zINC,"l"}, {zDEC,"l"}, {zLD,"l,B"}, {zCPL,0},
+ {zINC,"l"}, {zDEC,"l"}, {zLD,"l,B"}, {zCPL,nullptr},
{zJR,"nc,O"}, {zLD,"sp,N"}, {zLD,"(hl-),a"},{zINC,"sp"},
- {zINC,"(hl)"}, {zDEC,"(hl)"}, {zLD,"(hl),B"}, {zSCF,0},
+ {zINC,"(hl)"}, {zDEC,"(hl)"}, {zLD,"(hl),B"}, {zSCF,nullptr},
{zJR,"c,O"}, {zADD,"hl,sp"}, {zLD,"a,(hl-)"},{zDEC,"sp"},
- {zINC,"a"}, {zDEC,"a"}, {zLD,"a,B"}, {zCCF,0},
+ {zINC,"a"}, {zDEC,"a"}, {zLD,"a,B"}, {zCCF,nullptr},
{zLD,"b,b"}, {zLD,"b,c"}, {zLD,"b,d"}, {zLD,"b,e"},
{zLD,"b,h"}, {zLD,"b,l"}, {zLD,"b,(hl)"}, {zLD,"b,a"},
{zLD,"c,b"}, {zLD,"c,c"}, {zLD,"c,d"}, {zLD,"c,e"},
@@ -149,7 +149,7 @@ static const lr35902dasm mnemonic_main[256]= {
{zLD,"l,b"}, {zLD,"l,c"}, {zLD,"l,d"}, {zLD,"l,e"},
{zLD,"l,h"}, {zLD,"l,l"}, {zLD,"l,(hl)"}, {zLD,"l,a"},
{zLD,"(hl),b"}, {zLD,"(hl),c"}, {zLD,"(hl),d"}, {zLD,"(hl),e"},
- {zLD,"(hl),h"}, {zLD,"(hl),l"}, {zHLT,0}, {zLD,"(hl),a"},
+ {zLD,"(hl),h"}, {zLD,"(hl),l"}, {zHLT,nullptr}, {zLD,"(hl),a"},
{zLD,"a,b"}, {zLD,"a,c"}, {zLD,"a,d"}, {zLD,"a,e"},
{zLD,"a,h"}, {zLD,"a,l"}, {zLD,"a,(hl)"}, {zLD,"a,a"},
{zADD,"a,b"}, {zADD,"a,c"}, {zADD,"a,d"}, {zADD,"a,e"},
@@ -170,19 +170,19 @@ static const lr35902dasm mnemonic_main[256]= {
{zCP,"h"}, {zCP,"l"}, {zCP,"(hl)"}, {zCP,"a"},
{zRET,"nz"}, {zPOP,"bc"}, {zJP,"nz,A"}, {zJP,"A"},
{zCALL,"nz,A"}, {zPUSH,"bc"}, {zADD,"a,B"}, {zRST,"V"},
- {zRET,"z"}, {zRET,0}, {zJP,"z,A"}, {zDB,"cb"},
+ {zRET,"z"}, {zRET,nullptr}, {zJP,"z,A"}, {zDB,"cb"},
{zCALL,"z,A"}, {zCALL,"A"}, {zADC,"a,B"}, {zRST,"V"},
{zRET,"nc"}, {zPOP,"de"}, {zJP,"nc,A"}, {zDB,"d3"},
{zCALL,"nc,A"}, {zPUSH,"de"}, {zSUB,"B"}, {zRST,"V"},
- {zRET,"c"}, {zRETI,0}, {zJP,"c,A"}, {zDB,"db"},
+ {zRET,"c"}, {zRETI,nullptr}, {zJP,"c,A"}, {zDB,"db"},
{zCALL,"c,A"}, {zDB,"dd"}, {zSBC,"a,B"}, {zRST,"V"},
{zLD,"(F),a"}, {zPOP,"hl"}, {zLD,"(C),a"}, {zDB,"e3"},
{zDB,"e4"}, {zPUSH,"hl"}, {zAND,"B"}, {zRST,"V"},
{zADD,"SP,B"}, {zJP,"(hl)"}, {zLD,"(W),a"}, {zDB,"eb"},
{zDB,"ec"}, {zDB,"ed"}, {zXOR,"B"}, {zRST,"V"},
- {zLD,"a,(F)"}, {zPOP,"af"}, {zLD,"a,(C)"}, {zDI,0},
+ {zLD,"a,(F)"}, {zPOP,"af"}, {zLD,"a,(C)"}, {zDI,nullptr},
{zDB,"f4"}, {zPUSH,"af"}, {zOR,"B"}, {zRST,"V"},
- {zLD,"hl,sp+B"},{zLD,"sp,hl"}, {zLD,"a,(W)"}, {zEI,0},
+ {zLD,"hl,sp+B"},{zLD,"sp,hl"}, {zLD,"a,(W)"}, {zEI,nullptr},
{zDB,"fc"}, {zDB,"fd"}, {zCP,"B"}, {zRST,"V"}
};
diff --git a/src/devices/cpu/lr35902/opc_cb.inc b/src/devices/cpu/lr35902/opc_cb.inc
index ace58d019e7..19470be9f3c 100644
--- a/src/devices/cpu/lr35902/opc_cb.inc
+++ b/src/devices/cpu/lr35902/opc_cb.inc
@@ -2,7 +2,7 @@
// copyright-holders:Wilbert Pol
#define RLC_8BIT(x) \
{ \
- register UINT8 f; \
+ UINT8 f; \
(x)=(UINT8)(((x)<<1)|((x)>>7)); \
if( (x)&1 ) \
f=FLAG_C; \
@@ -15,7 +15,7 @@
#define RL_8BIT(x) \
{ \
- register UINT8 r; \
+ UINT8 r; \
r=((x)&0x80)?FLAG_C:0; \
(x)=(UINT8)(((x)<<1)|((m_F&FLAG_C)?1:0)); \
if( (x)==0 ) \
@@ -25,7 +25,7 @@
#define RRC_8BIT(x) \
{ \
- register UINT8 f; \
+ UINT8 f; \
(x)=(UINT8)(((x)>>1)|((x)<<7)); \
if( (x)&0x80 ) \
f=FLAG_C; \
@@ -38,7 +38,7 @@
#define RR_8BIT(x) \
{ \
- register UINT8 r; \
+ UINT8 r; \
r=((x)&1)?FLAG_C:0; \
(x)=(UINT8)(((x)>>1)|((m_F&FLAG_C)?0x80:0)); \
if( (x)==0 ) \
@@ -48,7 +48,7 @@
#define SLA_8BIT(x) \
{ \
- register UINT8 f; \
+ UINT8 f; \
if( (x)&0x80 ) \
f=FLAG_C; \
else \
@@ -61,7 +61,7 @@
#define SRA_8BIT(x) \
{ \
- register UINT8 f; \
+ UINT8 f; \
if( (x)&1 ) \
f=FLAG_C; \
else \
@@ -82,7 +82,7 @@
#define SRL_8BIT(x) \
{ \
- register UINT8 f; \
+ UINT8 f; \
if( (x)&1 ) \
f=FLAG_C; \
else \
diff --git a/src/devices/cpu/lr35902/opc_main.inc b/src/devices/cpu/lr35902/opc_main.inc
index c551bb3d351..a02c36130ca 100644
--- a/src/devices/cpu/lr35902/opc_main.inc
+++ b/src/devices/cpu/lr35902/opc_main.inc
@@ -2,7 +2,7 @@
// copyright-holders:Wilbert Pol
#define INC_8BIT(x) \
{ \
- register UINT8 r,f; \
+ UINT8 r,f; \
x++; \
r=(x); \
f=(UINT8)(m_F&FLAG_C); \
@@ -13,7 +13,7 @@
#define DEC_8BIT(x) \
{ \
- register UINT8 r,f; \
+ UINT8 r,f; \
x--; \
r=(x); \
f=(UINT8)((m_F&FLAG_C)|FLAG_N); \
@@ -24,22 +24,22 @@
#define INC_16BIT(x,y) \
{ \
- register UINT16 r = x << 8 | y; \
+ UINT16 r = x << 8 | y; \
if (++y == 0) x++; \
m_incdec16_func(r << 16 | x << 8 | y); \
}
#define DEC_16BIT(x,y) \
{ \
- register UINT16 r = x << 8 | y; \
+ UINT16 r = x << 8 | y; \
if (--y == 0xff) x--; \
m_incdec16_func(r << 16 | x << 8 | y); \
}
#define ADD_HL_RR(x) \
{ \
- register UINT32 r1,r2; \
- register UINT8 f; \
+ UINT32 r1,r2; \
+ UINT8 f; \
r1=((m_H<<8)|m_L)+(x); \
r2=(((m_H<<8)|m_L)&0xFFF)+((x)&0xFFF); \
f=(UINT8)(m_F&FLAG_Z); \
@@ -52,8 +52,8 @@
#define ADD_A_X(x) \
{ \
- register UINT16 r1,r2; \
- register UINT8 f; \
+ UINT16 r1,r2; \
+ UINT8 f; \
r1=(UINT16)((m_A&0xF)+((x)&0xF)); \
r2=(UINT16)(m_A+(x)); \
m_A=(UINT8)r2; \
@@ -66,8 +66,8 @@
#define SUB_A_X(x) \
{ \
- register UINT16 r1,r2; \
- register UINT8 f; \
+ UINT16 r1,r2; \
+ UINT8 f; \
r1=(UINT16)((m_A&0xF)-((x)&0xF)); \
r2=(UINT16)(m_A-(x)); \
m_A=(UINT8)r2; \
@@ -80,8 +80,8 @@
#define CP_A_X(x) \
{ \
- register UINT16 r1,r2; \
- register UINT8 f; \
+ UINT16 r1,r2; \
+ UINT8 f; \
r1=(UINT16)((m_A&0xF)-((x)&0xF)); \
r2=(UINT16)(m_A-(x)); \
if( ((UINT8)r2)==0 ) f=FLAG_N|FLAG_Z; \
@@ -93,8 +93,8 @@
#define SBC_A_X(x) \
{ \
- register UINT16 r1,r2; \
- register UINT8 f; \
+ UINT16 r1,r2; \
+ UINT8 f; \
r1=(UINT16)((m_A&0xF)-((x)&0xF)-((m_F&FLAG_C)?1:0)); \
r2=(UINT16)(m_A-(x)-((m_F&FLAG_C)?1:0)); \
m_A=(UINT8)r2; \
@@ -107,8 +107,8 @@
#define ADC_A_X(x) \
{ \
- register UINT16 r1,r2; \
- register UINT8 f; \
+ UINT16 r1,r2; \
+ UINT8 f; \
r1=(UINT16)((m_A&0xF)+((x)&0xF)+((m_F&FLAG_C)?1:0)); \
r2=(UINT16)(m_A+(x)+((m_F&FLAG_C)?1:0)); \
if( (m_A=(UINT8)r2)==0 ) f=FLAG_Z; \
@@ -431,7 +431,7 @@ case 0x33: /* INC SP */
case 0x34: /* INC (HL) */
{
UINT16 addr = ( m_H << 8 ) | m_L;
- register UINT8 r, f;
+ UINT8 r, f;
f = (UINT8) (m_F & FLAG_C);
r = mem_read_byte( addr );
@@ -450,7 +450,7 @@ case 0x34: /* INC (HL) */
case 0x35: /* DEC (HL) */
{
UINT16 addr = ( m_H << 8 ) | m_L;
- register UINT8 r, f;
+ UINT8 r, f;
f = (UINT8) ((m_F & FLAG_C) | FLAG_N);
r = mem_read_byte( addr );
@@ -1293,7 +1293,7 @@ case 0xE8: /* ADD SP,n8 */
*/
{
- register INT32 n;
+ INT32 n;
n = (INT8) mem_read_byte( m_PC++ );
@@ -1380,7 +1380,7 @@ case 0xF8: /* LD HL,SP+n8 */
*/
{
- register INT32 n;
+ INT32 n;
n = (INT8) mem_read_byte( m_PC++ );
diff --git a/src/devices/cpu/m37710/m37710.h b/src/devices/cpu/m37710/m37710.h
index 3bcc57ae68d..993fcafd54a 100644
--- a/src/devices/cpu/m37710/m37710.h
+++ b/src/devices/cpu/m37710/m37710.h
@@ -112,7 +112,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/m6502/deco16.cpp b/src/devices/cpu/m6502/deco16.cpp
index b354176969d..b0651e97171 100644
--- a/src/devices/cpu/m6502/deco16.cpp
+++ b/src/devices/cpu/m6502/deco16.cpp
@@ -17,7 +17,7 @@ const device_type DECO16 = &device_creator<deco16_device>;
deco16_device::deco16_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
m6502_device(mconfig, DECO16, "DECO16", tag, owner, clock, "deco16", __FILE__),
- io(NULL),
+ io(nullptr),
io_config("io", ENDIANNESS_LITTLE, 8, 16)
{
}
@@ -46,8 +46,8 @@ const address_space_config *deco16_device::memory_space_config(address_spacenum
{
case AS_PROGRAM: return &program_config;
case AS_IO: return &io_config;
- case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &sprogram_config : NULL;
- default: return NULL;
+ case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &sprogram_config : nullptr;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/m6502/m3745x.cpp b/src/devices/cpu/m6502/m3745x.cpp
index 9a2a4872646..a7f40fa7ada 100644
--- a/src/devices/cpu/m6502/m3745x.cpp
+++ b/src/devices/cpu/m6502/m3745x.cpp
@@ -90,7 +90,7 @@ void m3745x_device::device_start()
for (int i = 0; i < NUM_TIMERS; i++)
{
- m_timers[i] = timer_alloc(i, NULL);
+ m_timers[i] = timer_alloc(i, nullptr);
}
m740_device::device_start();
@@ -123,9 +123,9 @@ void m3745x_device::device_reset()
SP = 0x01ff; // we have the "traditional" stack in page 1, not 0 like some M740 derivatives
- for (int i = 0; i < NUM_TIMERS; i++)
+ for (auto & elem : m_timers)
{
- m_timers[i]->adjust(attotime::never);
+ elem->adjust(attotime::never);
}
// all ports reset to input on startup
diff --git a/src/devices/cpu/m6502/m3745x.h b/src/devices/cpu/m6502/m3745x.h
index d7d24c80880..ae2df6f209a 100644
--- a/src/devices/cpu/m6502/m3745x.h
+++ b/src/devices/cpu/m6502/m3745x.h
@@ -125,7 +125,7 @@ protected:
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
virtual void execute_set_input(int inputnum, int state);
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
void send_port(address_space &space, UINT8 offset, UINT8 data);
UINT8 read_port(UINT8 offset);
diff --git a/src/devices/cpu/m6502/m5074x.cpp b/src/devices/cpu/m6502/m5074x.cpp
index 07a5f3b510d..965e8866467 100644
--- a/src/devices/cpu/m6502/m5074x.cpp
+++ b/src/devices/cpu/m6502/m5074x.cpp
@@ -81,7 +81,7 @@ void m5074x_device::device_start()
for (int i = 0; i < NUM_TIMERS; i++)
{
- m_timers[i] = timer_alloc(i, NULL);
+ m_timers[i] = timer_alloc(i, nullptr);
}
m740_device::device_start();
diff --git a/src/devices/cpu/m6502/m5074x.h b/src/devices/cpu/m6502/m5074x.h
index 10f0aa06df5..87cf9d0be7b 100644
--- a/src/devices/cpu/m6502/m5074x.h
+++ b/src/devices/cpu/m6502/m5074x.h
@@ -101,7 +101,7 @@ protected:
virtual void device_reset();
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
virtual void execute_set_input(int inputnum, int state);
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
void send_port(address_space &space, UINT8 offset, UINT8 data);
UINT8 read_port(UINT8 offset);
diff --git a/src/devices/cpu/m6502/m6502.cpp b/src/devices/cpu/m6502/m6502.cpp
index 4fdc480a18c..eae369f4960 100644
--- a/src/devices/cpu/m6502/m6502.cpp
+++ b/src/devices/cpu/m6502/m6502.cpp
@@ -412,8 +412,8 @@ const address_space_config *m6502_device::memory_space_config(address_spacenum s
switch(spacenum)
{
case AS_PROGRAM: return &program_config;
- case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &sprogram_config : NULL;
- default: return NULL;
+ case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &sprogram_config : nullptr;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/m6502/n2a03.cpp b/src/devices/cpu/m6502/n2a03.cpp
index 910431b6ce1..f168995ce5f 100644
--- a/src/devices/cpu/m6502/n2a03.cpp
+++ b/src/devices/cpu/m6502/n2a03.cpp
@@ -121,8 +121,8 @@ const address_space_config *n2a03_device::memory_space_config(address_spacenum s
switch(spacenum)
{
case AS_PROGRAM: return &m_program_config;
- case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &sprogram_config : NULL;
- default: return NULL;
+ case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &sprogram_config : nullptr;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/m6800/m6800.cpp b/src/devices/cpu/m6800/m6800.cpp
index 46a7cc4a99a..302ba478445 100644
--- a/src/devices/cpu/m6800/m6800.cpp
+++ b/src/devices/cpu/m6800/m6800.cpp
@@ -632,9 +632,9 @@ const address_space_config *m6800_cpu_device::memory_space_config(address_spacen
switch(spacenum)
{
case AS_PROGRAM: return &m_program_config;
- case AS_IO: return m_has_io ? &m_io_config : NULL;
- case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_decrypted_opcodes_config : NULL;
- default: return NULL;
+ case AS_IO: return m_has_io ? &m_io_config : nullptr;
+ case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_decrypted_opcodes_config : nullptr;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/m6800/m6800.h b/src/devices/cpu/m6800/m6800.h
index af02be492d8..abbd1373a19 100644
--- a/src/devices/cpu/m6800/m6800.h
+++ b/src/devices/cpu/m6800/m6800.h
@@ -58,7 +58,7 @@ public:
// construction/destruction
m6800_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- m6800_cpu_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, bool has_io, int clock_divider, const m6800_cpu_device::op_func *insn, const UINT8 *cycles, address_map_constructor internal = NULL);
+ m6800_cpu_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, bool has_io, int clock_divider, const m6800_cpu_device::op_func *insn, const UINT8 *cycles, address_map_constructor internal = nullptr);
// static configuration helpers
template<class _Object> static devcb_base &set_out_sc2_func(device_t &device, _Object object) { return downcast<m6800_cpu_device &>(device).m_out_sc2_func.set_callback(object); }
@@ -433,7 +433,7 @@ class m6801_cpu_device : public m6800_cpu_device
{
public:
m6801_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- m6801_cpu_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, const m6800_cpu_device::op_func *insn, const UINT8 *cycles, address_map_constructor internal = NULL);
+ m6801_cpu_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, const m6800_cpu_device::op_func *insn, const UINT8 *cycles, address_map_constructor internal = nullptr);
void m6801_clock_serial();
diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp
index 7a655316a31..a8f52a6cdcd 100644
--- a/src/devices/cpu/m68000/m68kcpu.cpp
+++ b/src/devices/cpu/m68000/m68kcpu.cpp
@@ -2335,12 +2335,12 @@ void m68000_base_device::clear_all()
{
cpu_type= 0;
// dasm_type= 0;
- for (int i=0;i<16;i++)
- dar[i]= 0;
+ for (auto & elem : dar)
+ elem= 0;
ppc= 0;
pc= 0;
- for (int i=0;i<7;i++)
- sp[i]= 0;
+ for (auto & elem : sp)
+ elem= 0;
vbr= 0;
sfc= 0;
dfc= 0;
@@ -2400,11 +2400,11 @@ void m68000_base_device::clear_all()
virq_state = 0;
nmi_pending = 0;
- cyc_instruction = 0;
- cyc_exception = 0;
+ cyc_instruction = nullptr;
+ cyc_exception = nullptr;
int_ack_callback = device_irq_acknowledge_delegate();
- program = 0;
+ program = nullptr;
opcode_xor = 0;
// readimm16 = 0;
@@ -2415,8 +2415,8 @@ void m68000_base_device::clear_all()
// write16 = 0;
// write32 = 0;
- m_space = 0;
- m_direct = 0;
+ m_space = nullptr;
+ m_direct = nullptr;
iotemp = 0;
@@ -2455,7 +2455,7 @@ void m68000_base_device::clear_all()
ic_valid[i] = false;
}
- internal = 0;
+ internal = nullptr;
}
@@ -2512,8 +2512,8 @@ const address_space_config *m68000_base_device::memory_space_config(address_spac
switch(spacenum)
{
case AS_PROGRAM: return &m_program_config;
- case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_oprogram_config : NULL;
- default: return NULL;
+ case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_oprogram_config : nullptr;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/m68000/m68kdasm.cpp b/src/devices/cpu/m68000/m68kdasm.cpp
index e82d5c7111a..c48d128bc40 100644
--- a/src/devices/cpu/m68000/m68kdasm.cpp
+++ b/src/devices/cpu/m68000/m68kdasm.cpp
@@ -3719,7 +3719,7 @@ static const opcode_struct g_opcode_info[] =
{d68851_p001 , 0xffc0, 0xf040, 0x000},
{d68040_fbcc_16 , 0xffc0, 0xf280, 0x000},
{d68040_fbcc_32 , 0xffc0, 0xf2c0, 0x000},
- {0, 0, 0, 0}
+ {nullptr, 0, 0, 0}
};
/* Check if opcode is using a valid ea mode */
@@ -3801,7 +3801,7 @@ static void build_opcode_table(void)
g_instruction_table[i] = d68000_illegal; /* default to illegal */
opcode = i;
/* search through opcode info for a match */
- for(ostruct = opcode_info;ostruct->opcode_handler != 0;ostruct++)
+ for(ostruct = opcode_info;ostruct->opcode_handler != nullptr;ostruct++)
{
/* match opcode mask and allowed ea modes */
if((opcode & ostruct->mask) == ostruct->match)
@@ -3896,7 +3896,7 @@ unsigned int m68k_disassemble_raw(char* str_buff, unsigned int pc, const unsigne
g_rawop = opdata;
g_rawbasepc = pc;
result = m68k_disassemble(str_buff, pc, cpu_type);
- g_rawop = NULL;
+ g_rawop = nullptr;
return result;
}
diff --git a/src/devices/cpu/m68000/m68kmake.cpp b/src/devices/cpu/m68000/m68kmake.cpp
index 6a3642c4b1d..9b732dbec59 100644
--- a/src/devices/cpu/m68000/m68kmake.cpp
+++ b/src/devices/cpu/m68000/m68kmake.cpp
@@ -261,9 +261,9 @@ static void read_insert(char* insert);
static char g_input_filename[M68K_MAX_PATH];
/* File handles */
-static FILE* g_input_file = NULL;
-static FILE* g_prototype_file = NULL;
-static FILE* g_table_file = NULL;
+static FILE* g_input_file = nullptr;
+static FILE* g_prototype_file = nullptr;
+static FILE* g_table_file = nullptr;
static int g_num_functions = 0; /* Number of functions processed */
static int g_num_primitives = 0; /* Number of function primitives read */
@@ -601,7 +601,7 @@ static int fgetline(char* buff, int nchars, FILE* file)
{
int length;
- if(fgets(buff, nchars, file) == NULL)
+ if(fgets(buff, nchars, file) == nullptr)
return -1;
if(buff[0] == '\r')
memmove(buff, buff + 1, nchars - 1);
@@ -670,7 +670,7 @@ static opcode_struct* find_opcode(char* name, int size, char* spec_proc, char* s
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(name, op->name) == 0 &&
(size == op->size) &&
@@ -678,7 +678,7 @@ static opcode_struct* find_opcode(char* name, int size, char* spec_proc, char* s
strcmp(spec_ea, op->spec_ea) == 0)
return op;
}
- return NULL;
+ return nullptr;
}
#ifdef UNUSED_FUNCTION
@@ -701,7 +701,7 @@ static int extract_opcode_info(char* src, char* name, int* size, char* spec_proc
{
char* ptr = strstr(src, ID_OPHANDLER_NAME);
- if(ptr == NULL)
+ if(ptr == nullptr)
return 0;
ptr += strlen(ID_OPHANDLER_NAME) + 1;
@@ -713,7 +713,7 @@ static int extract_opcode_info(char* src, char* name, int* size, char* spec_proc
*size = atoi(ptr);
ptr = strstr(ptr, ",");
- if(ptr == NULL) return 0;
+ if(ptr == nullptr) return 0;
ptr++;
ptr += skip_spaces(ptr);
@@ -755,7 +755,7 @@ static void write_body(FILE* filep, body_struct* body, replace_struct* replace)
{
strcpy(output, body->body[i]);
/* Check for the base directive header */
- if(strstr(output, ID_BASE) != NULL)
+ if(strstr(output, ID_BASE) != nullptr)
{
/* Search for any text we need to replace */
found = 0;
@@ -1014,7 +1014,7 @@ static void process_opcode_handlers(FILE* filep)
{
/* Find the first line of the function */
func_name[0] = 0;
- while(strstr(func_name, ID_OPHANDLER_NAME) == NULL)
+ while(strstr(func_name, ID_OPHANDLER_NAME) == nullptr)
{
if(strcmp(func_name, ID_INPUT_SEPARATOR) == 0)
{
@@ -1049,7 +1049,7 @@ static void process_opcode_handlers(FILE* filep)
/* Find the corresponding table entry */
opinfo = find_opcode(oper_name, oper_size, oper_spec_proc, oper_spec_ea);
- if(opinfo == NULL)
+ if(opinfo == nullptr)
error_exit("Unable to find matching table entry for %s", func_name);
replace->length = 0;
@@ -1174,9 +1174,9 @@ static void read_insert(char* insert)
char* ptr = insert;
char* overflow = insert + MAX_INSERT_LENGTH - MAX_LINE_LENGTH;
int length;
- char* first_blank = NULL;
+ char* first_blank = nullptr;
- first_blank = NULL;
+ first_blank = nullptr;
/* Skip any leading blank lines */
for(length = 0;length == 0;length = fgetline(ptr, MAX_LINE_LENGTH, g_input_file))
@@ -1205,11 +1205,11 @@ static void read_insert(char* insert)
/* keep track in case there are trailing blanks */
if(length == 0)
{
- if(first_blank == NULL)
+ if(first_blank == nullptr)
first_blank = ptr;
}
else
- first_blank = NULL;
+ first_blank = nullptr;
/* Advance and append newline */
ptr += length;
@@ -1269,14 +1269,14 @@ int main(int argc, char *argv[])
/* Open the files we need */
sprintf(filename, "%s/%s", output_path, FILENAME_PROTOTYPE);
- if((g_prototype_file = fopen(filename, "wt")) == NULL)
+ if((g_prototype_file = fopen(filename, "wt")) == nullptr)
perror_exit("Unable to create prototype file (%s)\n", filename);
sprintf(filename, "%s/%s", output_path, FILENAME_TABLE);
- if((g_table_file = fopen(filename, "wt")) == NULL)
+ if((g_table_file = fopen(filename, "wt")) == nullptr)
perror_exit("Unable to create table file (%s)\n", filename);
- if((g_input_file=fopen(g_input_filename, "rt")) == NULL)
+ if((g_input_file=fopen(g_input_filename, "rt")) == nullptr)
perror_exit("can't open %s for input", g_input_filename);
diff --git a/src/devices/cpu/m68000/m68kops.cpp b/src/devices/cpu/m68000/m68kops.cpp
index d64d1c1d300..40c4a78cecf 100644
--- a/src/devices/cpu/m68000/m68kops.cpp
+++ b/src/devices/cpu/m68000/m68kops.cpp
@@ -34758,7 +34758,7 @@ static const opcode_handler_struct m68k_opcode_handler_table[] =
{m68000_base_device_ops::m68k_op_bfset_32_al, 0xffff, 0xeef9, {255, 255, 24, 24, 24, 24, 20}},
{m68000_base_device_ops::m68k_op_bfins_32_aw, 0xffff, 0xeff8, {255, 255, 21, 21, 21, 21, 17}},
{m68000_base_device_ops::m68k_op_bfins_32_al, 0xffff, 0xeff9, {255, 255, 21, 21, 21, 21, 17}},
- {0, 0, 0, {0, 0, 0, 0, 0}}
+ {nullptr, 0, 0, {0, 0, 0, 0, 0}}
};
diff --git a/src/devices/cpu/m6805/m6805.cpp b/src/devices/cpu/m6805/m6805.cpp
index f6de7d06351..d3905118b48 100644
--- a/src/devices/cpu/m6805/m6805.cpp
+++ b/src/devices/cpu/m6805/m6805.cpp
@@ -484,7 +484,7 @@ const address_space_config *m6805_base_device::memory_space_config(address_space
{
return &m_program_config;
}
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/cpu/m6809/hd6309.cpp b/src/devices/cpu/m6809/hd6309.cpp
index f0d504e5b83..712c6bcf45e 100644
--- a/src/devices/cpu/m6809/hd6309.cpp
+++ b/src/devices/cpu/m6809/hd6309.cpp
@@ -213,8 +213,8 @@ void hd6309_device::device_pre_save()
void hd6309_device::device_post_load()
{
- m_reg8 = NULL;
- m_reg16 = NULL;
+ m_reg8 = nullptr;
+ m_reg16 = nullptr;
switch(m_reg)
{
diff --git a/src/devices/cpu/m6809/m6809.cpp b/src/devices/cpu/m6809/m6809.cpp
index d69b0417453..f9669765db4 100644
--- a/src/devices/cpu/m6809/m6809.cpp
+++ b/src/devices/cpu/m6809/m6809.cpp
@@ -116,7 +116,7 @@ m6809_base_device::m6809_base_device(const machine_config &mconfig, const char *
m_sprogram_config("decrypted_opcodes", ENDIANNESS_BIG, 8, 16),
m_clock_divider(divider)
{
- m_mintf = NULL;
+ m_mintf = nullptr;
}
@@ -161,8 +161,8 @@ void m6809_base_device::device_start()
m_y.w = 0;
m_dp = 0;
m_reg = 0;
- m_reg8 = NULL;
- m_reg16 = NULL;
+ m_reg8 = nullptr;
+ m_reg16 = nullptr;
// setup regtable
save_item(NAME(m_pc.w));
@@ -251,8 +251,8 @@ void m6809_base_device::device_pre_save()
void m6809_base_device::device_post_load()
{
- m_reg8 = NULL;
- m_reg16 = NULL;
+ m_reg8 = nullptr;
+ m_reg16 = nullptr;
switch(m_reg)
{
@@ -292,8 +292,8 @@ const address_space_config *m6809_base_device::memory_space_config(address_space
switch(spacenum)
{
case AS_PROGRAM: return &m_program_config;
- case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_sprogram_config : NULL;
- default: return NULL;
+ case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_sprogram_config : nullptr;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/m6809/m6809.h b/src/devices/cpu/m6809/m6809.h
index 595585cd098..ad914e4abc5 100644
--- a/src/devices/cpu/m6809/m6809.h
+++ b/src/devices/cpu/m6809/m6809.h
@@ -223,11 +223,11 @@ protected:
void set_b() { m_addressing_mode = ADDRESSING_MODE_REGISTER_B; }
void set_d() { m_addressing_mode = ADDRESSING_MODE_REGISTER_D; }
void set_imm() { m_addressing_mode = ADDRESSING_MODE_IMMEDIATE; }
- void set_regop8(UINT8 &reg) { m_reg8 = &reg; m_reg16 = NULL; }
- void set_regop16(PAIR16 &reg) { m_reg16 = &reg; m_reg8 = NULL; }
- UINT8 &regop8() { assert(m_reg8 != NULL); return *m_reg8; }
- PAIR16 &regop16() { assert(m_reg16 != NULL); return *m_reg16; }
- bool is_register_register_op_16_bit() { return m_reg16 != NULL; }
+ void set_regop8(UINT8 &reg) { m_reg8 = &reg; m_reg16 = nullptr; }
+ void set_regop16(PAIR16 &reg) { m_reg16 = &reg; m_reg8 = nullptr; }
+ UINT8 &regop8() { assert(m_reg8 != nullptr); return *m_reg8; }
+ PAIR16 &regop16() { assert(m_reg16 != nullptr); return *m_reg16; }
+ bool is_register_register_op_16_bit() { return m_reg16 != nullptr; }
bool add8_sets_h() { return true; }
bool hd6309_native_mode() { return false; }
diff --git a/src/devices/cpu/mb86233/mb86233.h b/src/devices/cpu/mb86233/mb86233.h
index a52f419e66d..0c25d152749 100644
--- a/src/devices/cpu/mb86233/mb86233.h
+++ b/src/devices/cpu/mb86233/mb86233.h
@@ -71,7 +71,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/mb86235/mb86235.h b/src/devices/cpu/mb86235/mb86235.h
index f7fc4e51bf1..a38a7e264ea 100644
--- a/src/devices/cpu/mb86235/mb86235.h
+++ b/src/devices/cpu/mb86235/mb86235.h
@@ -39,7 +39,7 @@ protected:
//virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/mb88xx/mb88xx.cpp b/src/devices/cpu/mb88xx/mb88xx.cpp
index 0508bfad1d4..5d8ca5f7e09 100644
--- a/src/devices/cpu/mb88xx/mb88xx.cpp
+++ b/src/devices/cpu/mb88xx/mb88xx.cpp
@@ -114,7 +114,7 @@ mb88_cpu_device::mb88_cpu_device(const machine_config &mconfig, const char *tag,
, m_program_config("program", ENDIANNESS_BIG, 8, 11, 0)
, m_data_config("data", ENDIANNESS_BIG, 8, 7, 0)
, m_io_config("io", ENDIANNESS_BIG, 8, 3, 0)
- , m_PLA(NULL)
+ , m_PLA(nullptr)
{
}
@@ -124,7 +124,7 @@ mb88_cpu_device::mb88_cpu_device(const machine_config &mconfig, device_type type
, m_program_config("program", ENDIANNESS_BIG, 8, program_width, 0, ( (program_width == 9) ? ADDRESS_MAP_NAME(program_9bit) : (program_width == 10) ? ADDRESS_MAP_NAME(program_10bit) : ADDRESS_MAP_NAME(program_11bit) ) )
, m_data_config("data", ENDIANNESS_BIG, 8, data_width, 0, ( (data_width == 4) ? ADDRESS_MAP_NAME(data_4bit) : (data_width == 5) ? ADDRESS_MAP_NAME(data_5bit) : (data_width == 6) ? ADDRESS_MAP_NAME(data_6bit) : ADDRESS_MAP_NAME(data_7bit) ) )
, m_io_config("io", ENDIANNESS_BIG, 8, 3, 0)
- , m_PLA(NULL)
+ , m_PLA(nullptr)
{
}
diff --git a/src/devices/cpu/mb88xx/mb88xx.h b/src/devices/cpu/mb88xx/mb88xx.h
index 3603d9dfc91..31dab7e288b 100644
--- a/src/devices/cpu/mb88xx/mb88xx.h
+++ b/src/devices/cpu/mb88xx/mb88xx.h
@@ -87,7 +87,7 @@ protected:
virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 6); }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ) ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ) ); }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/mc68hc11/mc68hc11.h b/src/devices/cpu/mc68hc11/mc68hc11.h
index 6098cebdfe4..7f03ffd3da1 100644
--- a/src/devices/cpu/mc68hc11/mc68hc11.h
+++ b/src/devices/cpu/mc68hc11/mc68hc11.h
@@ -66,7 +66,7 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL );
+ return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr );
}
// device_state_interface overrides
diff --git a/src/devices/cpu/mcs48/mcs48.cpp b/src/devices/cpu/mcs48/mcs48.cpp
index a24cf72f0d6..0f7a72f0f89 100644
--- a/src/devices/cpu/mcs48/mcs48.cpp
+++ b/src/devices/cpu/mcs48/mcs48.cpp
@@ -204,7 +204,7 @@ ADDRESS_MAP_END
mcs48_cpu_device::mcs48_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int rom_size, int ram_size, UINT8 feature_mask)
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
, m_program_config("program", ENDIANNESS_LITTLE, 8, 12, 0
- , ( ( rom_size == 1024 ) ? ADDRESS_MAP_NAME(program_10bit) : ( ( rom_size == 2048 ) ? ADDRESS_MAP_NAME(program_11bit) : ( ( rom_size == 4096 ) ? ADDRESS_MAP_NAME(program_12bit) : NULL ) ) ))
+ , ( ( rom_size == 1024 ) ? ADDRESS_MAP_NAME(program_10bit) : ( ( rom_size == 2048 ) ? ADDRESS_MAP_NAME(program_11bit) : ( ( rom_size == 4096 ) ? ADDRESS_MAP_NAME(program_12bit) : nullptr ) ) ))
, m_data_config("data", ENDIANNESS_LITTLE, 8, ( ( ram_size == 64 ) ? 6 : ( ( ram_size == 128 ) ? 7 : 8 ) ), 0
, ( ( ram_size == 64 ) ? ADDRESS_MAP_NAME(data_6bit) : ( ( ram_size == 128 ) ? ADDRESS_MAP_NAME(data_7bit) : ADDRESS_MAP_NAME(data_8bit) ) ))
, m_io_config("io", ENDIANNESS_LITTLE, 8, 9, 0)
diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h
index a8184bcbd34..ed994d1030e 100644
--- a/src/devices/cpu/mcs48/mcs48.h
+++ b/src/devices/cpu/mcs48/mcs48.h
@@ -130,34 +130,34 @@ public:
protected:
// device-level overrides
- virtual void device_start();
- virtual void device_reset();
+ virtual void device_start() override;
+ virtual void device_reset() override;
// device_execute_interface overrides
- virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const { return (clocks + 15 - 1) / 15; }
- virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 15); }
- virtual UINT32 execute_min_cycles() const { return 1; }
- virtual UINT32 execute_max_cycles() const { return 3; }
- virtual UINT32 execute_input_lines() const { return 2; }
- virtual UINT32 execute_default_irq_vector() const { return MCS48_INPUT_IRQ; }
- virtual void execute_run();
- virtual void execute_set_input(int inputnum, int state);
+ virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const override { return (clocks + 15 - 1) / 15; }
+ virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const override { return (cycles * 15); }
+ virtual UINT32 execute_min_cycles() const override { return 1; }
+ virtual UINT32 execute_max_cycles() const override { return 3; }
+ virtual UINT32 execute_input_lines() const override { return 2; }
+ virtual UINT32 execute_default_irq_vector() const override { return MCS48_INPUT_IRQ; }
+ virtual void execute_run() override;
+ 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
+ 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 : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) );
+ return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) );
}
// device_state_interface overrides
- virtual void state_import(const device_state_entry &entry);
- virtual void state_export(const device_state_entry &entry);
- void state_string_export(const device_state_entry &entry, std::string &str);
+ virtual void state_import(const device_state_entry &entry) override;
+ virtual void state_export(const device_state_entry &entry) override;
+ void state_string_export(const device_state_entry &entry, std::string &str) override;
// device_disasm_interface overrides
- virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
- virtual UINT32 disasm_max_opcode_bytes() const { return 2; }
- virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
+ virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
+ virtual UINT32 disasm_max_opcode_bytes() const override { return 2; }
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
protected:
address_space_config m_program_config;
@@ -487,8 +487,8 @@ public:
protected:
// device_execute_interface overrides
- virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const { return (clocks + 30 - 1) / 30; }
- virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 30); }
+ virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const override { return (clocks + 30 - 1) / 30; }
+ virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const override { return (cycles * 30); }
};
class i8022_device : public mcs48_cpu_device
@@ -499,8 +499,8 @@ public:
protected:
// device_execute_interface overrides
- virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const { return (clocks + 30 - 1) / 30; }
- virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 30); }
+ virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const override { return (clocks + 30 - 1) / 30; }
+ virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const override { return (cycles * 30); }
};
class i8035_device : public mcs48_cpu_device
@@ -599,7 +599,7 @@ public:
DECLARE_WRITE8_MEMBER(upi41_master_w);
protected:
- virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
TIMER_CALLBACK_MEMBER( master_callback );
};
diff --git a/src/devices/cpu/mcs51/mcs51.cpp b/src/devices/cpu/mcs51/mcs51.cpp
index 3b791f2b78c..0fc5d9449be 100644
--- a/src/devices/cpu/mcs51/mcs51.cpp
+++ b/src/devices/cpu/mcs51/mcs51.cpp
@@ -263,9 +263,9 @@ ADDRESS_MAP_END
mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, int program_width, int data_width, UINT8 features)
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
, m_program_config("program", ENDIANNESS_LITTLE, 8, 16, 0
- , ( ( program_width == 12 ) ? ADDRESS_MAP_NAME(program_12bit) : ( ( program_width == 13 ) ? ADDRESS_MAP_NAME(program_13bit) : NULL ) ))
+ , ( ( program_width == 12 ) ? ADDRESS_MAP_NAME(program_12bit) : ( ( program_width == 13 ) ? ADDRESS_MAP_NAME(program_13bit) : nullptr ) ))
, m_data_config("data", ENDIANNESS_LITTLE, 8, 9, 0
- , ( ( data_width == 7 ) ? ADDRESS_MAP_NAME(data_7bit) : ( ( data_width == 8 ) ? ADDRESS_MAP_NAME(data_8bit) : NULL ) ))
+ , ( ( data_width == 7 ) ? ADDRESS_MAP_NAME(data_7bit) : ( ( data_width == 8 ) ? ADDRESS_MAP_NAME(data_8bit) : nullptr ) ))
, m_io_config("io", ENDIANNESS_LITTLE, 8, 18, 0)
, m_pc(0)
, m_features(features)
@@ -279,8 +279,8 @@ mcs51_cpu_device::mcs51_cpu_device(const machine_config &mconfig, device_type ty
/* default to standard cmos interfacing */
- for (int i=0; i < ARRAY_LENGTH(m_forced_inputs); i++)
- m_forced_inputs[i] = 0;
+ for (auto & elem : m_forced_inputs)
+ elem = 0;
}
diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h
index e8effbbd950..f3ac520da4b 100644
--- a/src/devices/cpu/mcs51/mcs51.h
+++ b/src/devices/cpu/mcs51/mcs51.h
@@ -103,7 +103,7 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) );
+ return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) );
}
// device_state_interface overrides
diff --git a/src/devices/cpu/mcs51/mcs51dasm.cpp b/src/devices/cpu/mcs51/mcs51dasm.cpp
index 9c0758c4e35..7e95aac2af6 100644
--- a/src/devices/cpu/mcs51/mcs51dasm.cpp
+++ b/src/devices/cpu/mcs51/mcs51dasm.cpp
@@ -277,7 +277,7 @@ static const char *get_data_address( const char **mem_names, UINT8 arg )
static int whichbuf;
char *buffer = &buffer_array[++whichbuf % 4][0];
- if (mem_names[arg] == NULL)
+ if (mem_names[arg] == nullptr)
sprintf(buffer,"$%02X",arg);
else
sprintf(buffer,"%s", mem_names[arg]);
@@ -298,9 +298,9 @@ static const char *get_bit_address( const char **mem_names, UINT8 arg )
}
else
{
- if (mem_names[arg | 0x100] == NULL)
+ if (mem_names[arg | 0x100] == nullptr)
{
- if (mem_names[arg & 0xf8] == NULL)
+ if (mem_names[arg & 0xf8] == nullptr)
sprintf(buffer,"$%02X.%d", arg & 0xf8, arg & 0x07);
else
sprintf(buffer,"%s.%d", mem_names[arg & 0xf8], arg & 0x07);
diff --git a/src/devices/cpu/mcs96/i8x9x.cpp b/src/devices/cpu/mcs96/i8x9x.cpp
index 90f2ff8c84b..f235cf90c28 100644
--- a/src/devices/cpu/mcs96/i8x9x.cpp
+++ b/src/devices/cpu/mcs96/i8x9x.cpp
@@ -25,7 +25,7 @@ offs_t i8x9x_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op
const address_space_config *i8x9x_device::memory_space_config(address_spacenum spacenum) const
{
- return spacenum == AS_PROGRAM ? &program_config : spacenum == AS_IO ? &io_config : NULL;
+ return spacenum == AS_PROGRAM ? &program_config : spacenum == AS_IO ? &io_config : nullptr;
}
void i8x9x_device::device_start()
diff --git a/src/devices/cpu/mcs96/mcs96.cpp b/src/devices/cpu/mcs96/mcs96.cpp
index dd60db99aa8..8c52a8c029d 100644
--- a/src/devices/cpu/mcs96/mcs96.cpp
+++ b/src/devices/cpu/mcs96/mcs96.cpp
@@ -117,7 +117,7 @@ void mcs96_device::execute_set_input(int inputnum, int state)
const address_space_config *mcs96_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_PROGRAM) ? &program_config : NULL;
+ return (spacenum == AS_PROGRAM) ? &program_config : nullptr;
}
void mcs96_device::state_import(const device_state_entry &entry)
diff --git a/src/devices/cpu/melps4/melps4.h b/src/devices/cpu/melps4/melps4.h
index 329ea035b13..b6d3c050c91 100644
--- a/src/devices/cpu/melps4/melps4.h
+++ b/src/devices/cpu/melps4/melps4.h
@@ -155,7 +155,7 @@ protected:
virtual void execute_one();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 2; }
diff --git a/src/devices/cpu/minx/minx.h b/src/devices/cpu/minx/minx.h
index 836b76026cc..0c39d6e20c2 100644
--- a/src/devices/cpu/minx/minx.h
+++ b/src/devices/cpu/minx/minx.h
@@ -33,7 +33,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp
index ab210440d9d..ed95f09d418 100644
--- a/src/devices/cpu/mips/mips3.cpp
+++ b/src/devices/cpu/mips/mips3.cpp
@@ -124,7 +124,7 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
, m_program_config("program", endianness, 32, 32, 0, 32, MIPS3_MIN_PAGE_SHIFT)
, m_flavor(flavor)
- , m_core(NULL)
+ , m_core(nullptr)
, m_ppc(0)
, m_nextpc(0)
, m_pcbase(0)
@@ -134,7 +134,7 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons
, m_ll_value(0)
, m_lld_value(0)
, m_badcop_value(0)
- , m_tlb_table(NULL)
+ , m_tlb_table(nullptr)
, m_lwl(endianness == ENDIANNESS_BIG ? &mips3_device::lwl_be : &mips3_device::lwl_le)
, m_lwr(endianness == ENDIANNESS_BIG ? &mips3_device::lwr_be : &mips3_device::lwr_le)
, m_swl(endianness == ENDIANNESS_BIG ? &mips3_device::swl_be : &mips3_device::swl_le)
@@ -151,42 +151,42 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons
, m_word_xor(m_bigendian ? WORD_XOR_BE(0) : WORD_XOR_LE(0))
, c_icache_size(0)
, c_dcache_size(0)
- , m_vtlb(NULL)
+ , m_vtlb(nullptr)
, m_fastram_select(0)
, m_debugger_temp(0)
, m_cache(CACHE_SIZE + sizeof(internal_mips3_state))
- , m_drcuml(NULL)
- , m_drcfe(NULL)
+ , m_drcuml(nullptr)
+ , m_drcfe(nullptr)
, m_drcoptions(0)
, m_cache_dirty(0)
- , m_entry(NULL)
- , m_nocode(NULL)
- , m_out_of_cycles(NULL)
- , m_tlb_mismatch(NULL)
+ , m_entry(nullptr)
+ , m_nocode(nullptr)
+ , m_out_of_cycles(nullptr)
+ , m_tlb_mismatch(nullptr)
, m_hotspot_select(0)
{
memset(m_fpmode, 0, sizeof(m_fpmode));
for (int i = 0; i < 3; i++)
{
- m_read8[i] = NULL;
- m_write8[i] = NULL;
- m_read16[i] = NULL;
- m_write16[i] = NULL;
- m_read32[i] = NULL;
- m_read32mask[i] = NULL;
- m_write32[i] = NULL;
- m_write32mask[i] = NULL;
- m_read64[i] = NULL;
- m_read64mask[i] = NULL;
- m_write64[i] = NULL;
- m_write64mask[i] = NULL;
+ m_read8[i] = nullptr;
+ m_write8[i] = nullptr;
+ m_read16[i] = nullptr;
+ m_write16[i] = nullptr;
+ m_read32[i] = nullptr;
+ m_read32mask[i] = nullptr;
+ m_write32[i] = nullptr;
+ m_write32mask[i] = nullptr;
+ m_read64[i] = nullptr;
+ m_read64mask[i] = nullptr;
+ m_write64[i] = nullptr;
+ m_write64mask[i] = nullptr;
}
for (int i = 0; i < 18; i++)
{
- m_exception[i] = NULL;
- m_exception_norecover[i] = NULL;
+ m_exception[i] = nullptr;
+ m_exception_norecover[i] = nullptr;
}
memset(m_fastram, 0, sizeof(m_fastram));
memset(m_hotspot, 0, sizeof(m_hotspot));
@@ -195,21 +195,21 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons
void mips3_device::device_stop()
{
- if (m_vtlb != NULL)
+ if (m_vtlb != nullptr)
{
vtlb_free(m_vtlb);
- m_vtlb = NULL;
+ m_vtlb = nullptr;
}
- if (m_drcfe != NULL)
+ if (m_drcfe != nullptr)
{
auto_free(machine(), m_drcfe);
- m_drcfe = NULL;
+ m_drcfe = nullptr;
}
- if (m_drcuml != NULL)
+ if (m_drcuml != nullptr)
{
auto_free(machine(), m_drcuml);
- m_drcuml = NULL;
+ m_drcuml = nullptr;
}
}
diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h
index 64675741a41..8e3c2212688 100644
--- a/src/devices/cpu/mips/mips3.h
+++ b/src/devices/cpu/mips/mips3.h
@@ -298,7 +298,7 @@ protected:
virtual void execute_burn(INT32 cycles) { m_totalcycles += cycles; }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address);
// device_state_interface overrides
diff --git a/src/devices/cpu/mips/mips3drc.cpp b/src/devices/cpu/mips/mips3drc.cpp
index 22af8e16063..3c7d3bbba2d 100644
--- a/src/devices/cpu/mips/mips3drc.cpp
+++ b/src/devices/cpu/mips/mips3drc.cpp
@@ -104,7 +104,7 @@ INLINE UINT32 epc(const opcode_desc *desc)
INLINE void alloc_handle(drcuml_state *drcuml, code_handle **handleptr, const char *name)
{
- if (*handleptr == NULL)
+ if (*handleptr == nullptr)
*handleptr = drcuml->handle_alloc(name);
}
@@ -164,7 +164,7 @@ void mips3_device::clear_fastram(UINT32 select_start)
m_fastram[i].start = 0;
m_fastram[i].end = 0;
m_fastram[i].readonly = false;
- m_fastram[i].base = NULL;
+ m_fastram[i].base = nullptr;
}
m_fastram_select=select_start;
}
@@ -304,7 +304,7 @@ void mips3_device::code_compile_block(UINT8 mode, offs_t pc)
block = drcuml->begin_block(4096);
/* loop until we get through all instruction sequences */
- for (seqhead = desclist; seqhead != NULL; seqhead = seqlast->next())
+ for (seqhead = desclist; seqhead != nullptr; seqhead = seqlast->next())
{
const opcode_desc *curdesc;
UINT32 nextpc;
@@ -314,10 +314,10 @@ void mips3_device::code_compile_block(UINT8 mode, offs_t pc)
block->append_comment("-------------------------"); // comment
/* determine the last instruction in this sequence */
- for (seqlast = seqhead; seqlast != NULL; seqlast = seqlast->next())
+ for (seqlast = seqhead; seqlast != nullptr; seqlast = seqlast->next())
if (seqlast->flags & OPFLAG_END_SEQUENCE)
break;
- assert(seqlast != NULL);
+ assert(seqlast != nullptr);
/* if we don't have a hash for this mode/pc, or if we are overriding all, add one */
if (override || !drcuml->hash_exists(mode, seqhead->pc))
@@ -341,7 +341,7 @@ void mips3_device::code_compile_block(UINT8 mode, offs_t pc)
}
/* validate this code block if we're not pointing into ROM */
- if (m_program->get_write_ptr(seqhead->physpc) != NULL)
+ if (m_program->get_write_ptr(seqhead->physpc) != nullptr)
generate_checksum_block(block, &compiler, seqhead, seqlast);
/* label this instruction, if it may be jumped to locally */
@@ -367,7 +367,7 @@ void mips3_device::code_compile_block(UINT8 mode, offs_t pc)
if (seqlast->flags & OPFLAG_CAN_CHANGE_MODES)
UML_HASHJMP(block, mem(&m_core->mode), nextpc, *m_nocode);
// hashjmp <mode>,nextpc,nocode
- else if (seqlast->next() == NULL || seqlast->next()->pc != nextpc)
+ else if (seqlast->next() == nullptr || seqlast->next()->pc != nextpc)
UML_HASHJMP(block, m_core->mode, nextpc, *m_nocode);
// hashjmp <mode>,nextpc,nocode
}
@@ -846,7 +846,7 @@ void mips3_device::static_generate_memory_accessor(int mode, int size, int iswri
if ((machine().debug_flags & DEBUG_FLAG_ENABLED) == 0)
for (ramnum = 0; ramnum < MIPS3_MAX_FASTRAM; ramnum++)
- if (m_fastram[ramnum].base != NULL && (!iswrite || !m_fastram[ramnum].readonly))
+ if (m_fastram[ramnum].base != nullptr && (!iswrite || !m_fastram[ramnum].readonly))
{
void *fastbase = (UINT8 *)m_fastram[ramnum].base - m_fastram[ramnum].start;
UINT32 skip = label++;
@@ -1090,7 +1090,7 @@ void mips3_device::generate_checksum_block(drcuml_block *block, compiler_state *
block->append_comment("[Validation for %08X]", seqhead->pc); // comment
/* loose verify or single instruction: just compare and fail */
- if (!(m_drcoptions & MIPS3DRC_STRICT_VERIFY) || seqhead->next() == NULL)
+ if (!(m_drcoptions & MIPS3DRC_STRICT_VERIFY) || seqhead->next() == nullptr)
{
if (!(seqhead->flags & OPFLAG_VIRTUAL_NOOP))
{
@@ -1098,10 +1098,10 @@ void mips3_device::generate_checksum_block(drcuml_block *block, compiler_state *
void *base = m_direct->read_ptr(seqhead->physpc);
UML_LOAD(block, I0, base, 0, SIZE_DWORD, SCALE_x4); // load i0,base,0,dword
- if (seqhead->delay.first() != NULL && seqhead->physpc != seqhead->delay.first()->physpc)
+ if (seqhead->delay.first() != nullptr && seqhead->physpc != seqhead->delay.first()->physpc)
{
base = m_direct->read_ptr(seqhead->delay.first()->physpc);
- assert(base != NULL);
+ assert(base != nullptr);
UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword
UML_ADD(block, I0, I0, I1); // add i0,i0,i1
@@ -1134,15 +1134,15 @@ void mips3_device::generate_checksum_block(drcuml_block *block, compiler_state *
if (!(curdesc->flags & OPFLAG_VIRTUAL_NOOP))
{
base = m_direct->read_ptr(curdesc->physpc);
- assert(base != NULL);
+ assert(base != nullptr);
UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword
UML_ADD(block, I0, I0, I1); // add i0,i0,i1
sum += curdesc->opptr.l[0];
- if (curdesc->delay.first() != NULL && (curdesc == seqlast || (curdesc->next() != NULL && curdesc->next()->physpc != curdesc->delay.first()->physpc)))
+ if (curdesc->delay.first() != nullptr && (curdesc == seqlast || (curdesc->next() != nullptr && curdesc->next()->physpc != curdesc->delay.first()->physpc)))
{
base = m_direct->read_ptr(curdesc->delay.first()->physpc);
- assert(base != NULL);
+ assert(base != nullptr);
UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword
UML_ADD(block, I0, I0, I1); // add i0,i0,i1
sum += curdesc->delay.first()->opptr.l[0];
@@ -1298,7 +1298,7 @@ void mips3_device::generate_delay_slot_and_branch(drcuml_block *block, compiler_
}
/* compile the delay slot using temporary compiler state */
- assert(desc->delay.first() != NULL);
+ assert(desc->delay.first() != nullptr);
generate_sequence_instruction(block, &compiler_temp, desc->delay.first()); // <next instruction>
/* update the cycles and jump through the hash table to the target */
@@ -3232,7 +3232,7 @@ void mips3_device::log_register_list(drcuml_state *drcuml, const char *string, c
if (reglist[0] & REGFLAG_R(regnum))
{
drcuml->log_printf("%sr%d", (count++ == 0) ? "" : ",", regnum);
- if (regnostarlist != NULL && !(regnostarlist[0] & REGFLAG_R(regnum)))
+ if (regnostarlist != nullptr && !(regnostarlist[0] & REGFLAG_R(regnum)))
drcuml->log_printf("*");
}
@@ -3240,26 +3240,26 @@ void mips3_device::log_register_list(drcuml_state *drcuml, const char *string, c
if (reglist[1] & REGFLAG_CPR1(regnum))
{
drcuml->log_printf("%sfr%d", (count++ == 0) ? "" : ",", regnum);
- if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_CPR1(regnum)))
+ if (regnostarlist != nullptr && !(regnostarlist[1] & REGFLAG_CPR1(regnum)))
drcuml->log_printf("*");
}
if (reglist[2] & REGFLAG_LO)
{
drcuml->log_printf("%slo", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[2] & REGFLAG_LO))
+ if (regnostarlist != nullptr && !(regnostarlist[2] & REGFLAG_LO))
drcuml->log_printf("*");
}
if (reglist[2] & REGFLAG_HI)
{
drcuml->log_printf("%shi", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[2] & REGFLAG_HI))
+ if (regnostarlist != nullptr && !(regnostarlist[2] & REGFLAG_HI))
drcuml->log_printf("*");
}
if (reglist[2] & REGFLAG_FCC)
{
drcuml->log_printf("%sfcc", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[2] & REGFLAG_FCC))
+ if (regnostarlist != nullptr && !(regnostarlist[2] & REGFLAG_FCC))
drcuml->log_printf("*");
}
@@ -3278,7 +3278,7 @@ void mips3_device::log_opcode_desc(drcuml_state *drcuml, const opcode_desc *desc
drcuml->log_printf("\nDescriptor list @ %08X\n", desclist->pc);
/* output each descriptor */
- for ( ; desclist != NULL; desclist = desclist->next())
+ for ( ; desclist != nullptr; desclist = desclist->next())
{
char buffer[100];
@@ -3295,12 +3295,12 @@ void mips3_device::log_opcode_desc(drcuml_state *drcuml, const opcode_desc *desc
drcuml->log_printf("%08X [%08X] t:%08X f:%s: %-30s", desclist->pc, desclist->physpc, desclist->targetpc, log_desc_flags_to_string(desclist->flags), buffer);
/* output register states */
- log_register_list(drcuml, "use", desclist->regin, NULL);
+ log_register_list(drcuml, "use", desclist->regin, nullptr);
log_register_list(drcuml, "mod", desclist->regout, desclist->regreq);
drcuml->log_printf("\n");
/* if we have a delay slot, output it recursively */
- if (desclist->delay.first() != NULL)
+ if (desclist->delay.first() != nullptr)
log_opcode_desc(drcuml, desclist->delay.first(), indent + 1);
/* at the end of a sequence add a dividing line */
diff --git a/src/devices/cpu/mips/r3000.cpp b/src/devices/cpu/mips/r3000.cpp
index 1b64e05799c..b53afb83d29 100644
--- a/src/devices/cpu/mips/r3000.cpp
+++ b/src/devices/cpu/mips/r3000.cpp
@@ -128,8 +128,8 @@ r3000_device::r3000_device(const machine_config &mconfig, device_type type, cons
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source),
m_program_config_be("program", ENDIANNESS_BIG, 32, 29),
m_program_config_le("program", ENDIANNESS_LITTLE, 32, 29),
- m_program(NULL),
- m_direct(NULL),
+ m_program(nullptr),
+ m_direct(nullptr),
m_chip_type(chiptype),
m_hasfpu(false),
m_endianness(ENDIANNESS_BIG),
@@ -399,7 +399,7 @@ const address_space_config *r3000_device::memory_space_config(address_spacenum s
if (spacenum == AS_PROGRAM)
return (m_endianness == ENDIANNESS_BIG) ? &m_program_config_be : &m_program_config_le;
else
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/cpu/mn10200/mn10200.h b/src/devices/cpu/mn10200/mn10200.h
index a36b841221f..7be4fec9da1 100644
--- a/src/devices/cpu/mn10200/mn10200.h
+++ b/src/devices/cpu/mn10200/mn10200.h
@@ -85,7 +85,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/nec/nec.h b/src/devices/cpu/nec/nec.h
index d1a674c7fc2..69644b6b6f9 100644
--- a/src/devices/cpu/nec/nec.h
+++ b/src/devices/cpu/nec/nec.h
@@ -39,7 +39,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/nec/necdasm.cpp b/src/devices/cpu/nec/necdasm.cpp
index 726ada18247..594bef384ed 100644
--- a/src/devices/cpu/nec/necdasm.cpp
+++ b/src/devices/cpu/nec/necdasm.cpp
@@ -1599,5 +1599,5 @@ int necv_dasm_one(char *buffer, UINT32 eip, const UINT8 *oprom, const UINT8 *dec
CPU_DISASSEMBLE( nec )
{
- return necv_dasm_one(buffer, pc, oprom, NULL);
+ return necv_dasm_one(buffer, pc, oprom, nullptr);
}
diff --git a/src/devices/cpu/nec/v25.cpp b/src/devices/cpu/nec/v25.cpp
index 384043c8f9c..8612c5f8760 100644
--- a/src/devices/cpu/nec/v25.cpp
+++ b/src/devices/cpu/nec/v25.cpp
@@ -58,7 +58,7 @@ v25_common_device::v25_common_device(const machine_config &mconfig, device_type
, m_prefetch_size(prefetch_size)
, m_prefetch_cycles(prefetch_cycles)
, m_chip_type(chip_type)
- , m_v25v35_decryptiontable(NULL)
+ , m_v25v35_decryptiontable(nullptr)
{
}
diff --git a/src/devices/cpu/nec/v25.h b/src/devices/cpu/nec/v25.h
index 41d55cc4fb8..bba375223a9 100644
--- a/src/devices/cpu/nec/v25.h
+++ b/src/devices/cpu/nec/v25.h
@@ -56,7 +56,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/pdp1/pdp1.cpp b/src/devices/cpu/pdp1/pdp1.cpp
index bb7beee4128..b36e7242967 100644
--- a/src/devices/cpu/pdp1/pdp1.cpp
+++ b/src/devices/cpu/pdp1/pdp1.cpp
@@ -392,7 +392,7 @@ void pdp1_device::device_config_complete()
{
// inherit a copy of the static data
const pdp1_reset_param_t *intf = reinterpret_cast<const pdp1_reset_param_t *>(static_config());
- if (intf != NULL)
+ if (intf != nullptr)
*static_cast<pdp1_reset_param_t *>(this) = *intf;
// or initialize to defaults if none provided
@@ -404,9 +404,9 @@ void pdp1_device::device_config_complete()
hw_mul_div = 0;
type_20_sbs = 0;
- for (int i = 0; i < 64; i++)
+ for (auto & elem : extern_iot)
{
- memset(&extern_iot[i], 0, sizeof(extern_iot[i]));
+ memset(&elem, 0, sizeof(elem));
}
}
}
diff --git a/src/devices/cpu/pdp1/pdp1.h b/src/devices/cpu/pdp1/pdp1.h
index f4d1281aa07..de771bc0756 100644
--- a/src/devices/cpu/pdp1/pdp1.h
+++ b/src/devices/cpu/pdp1/pdp1.h
@@ -102,7 +102,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/pdp1/tx0.cpp b/src/devices/cpu/pdp1/tx0.cpp
index c0ad2e9de3c..3a4fd7f1fb1 100644
--- a/src/devices/cpu/pdp1/tx0.cpp
+++ b/src/devices/cpu/pdp1/tx0.cpp
@@ -116,9 +116,9 @@ void tx0_device::device_start()
m_pf = 0;
m_tbr = 0;
m_tac = 0;
- for ( int i = 0; i < 16; i++ )
+ for (auto & elem : m_tss)
{
- m_tss[i] = 0;
+ elem = 0;
}
m_cm_sel = 0;
m_lr_sel = 0;
diff --git a/src/devices/cpu/pdp1/tx0.h b/src/devices/cpu/pdp1/tx0.h
index e88172bc8ff..6ac17936fbf 100644
--- a/src/devices/cpu/pdp1/tx0.h
+++ b/src/devices/cpu/pdp1/tx0.h
@@ -65,7 +65,7 @@ protected:
virtual UINT32 execute_max_cycles() const { return 3; }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 4; }
diff --git a/src/devices/cpu/pic16c5x/16c5xdsm.cpp b/src/devices/cpu/pic16c5x/16c5xdsm.cpp
index 45ff3154ec1..d3fdab5af8d 100644
--- a/src/devices/cpu/pic16c5x/16c5xdsm.cpp
+++ b/src/devices/cpu/pic16c5x/16c5xdsm.cpp
@@ -83,7 +83,7 @@ static const char *const PIC16C5xFormats[] = {
FMT("1101kkkkkkkk", "iorlw %K"),
FMT("1110kkkkkkkk", "andlw %K"),
FMT("1111kkkkkkkk", "xorlw %K"),
- NULL
+ nullptr
};
#define MAX_OPS ((ARRAY_LENGTH(PIC16C5xFormats) - 1) / PTRS_PER_FORMAT)
diff --git a/src/devices/cpu/pic16c5x/pic16c5x.h b/src/devices/cpu/pic16c5x/pic16c5x.h
index 5f45ca3bf33..f57c68e7e46 100644
--- a/src/devices/cpu/pic16c5x/pic16c5x.h
+++ b/src/devices/cpu/pic16c5x/pic16c5x.h
@@ -111,7 +111,7 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL );
+ return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr );
}
// device_state_interface overrides
diff --git a/src/devices/cpu/pic16c62x/16c62xdsm.cpp b/src/devices/cpu/pic16c62x/16c62xdsm.cpp
index 5bdd824dc16..bd1772f764b 100644
--- a/src/devices/cpu/pic16c62x/16c62xdsm.cpp
+++ b/src/devices/cpu/pic16c62x/16c62xdsm.cpp
@@ -93,7 +93,7 @@ static const char *const PIC16C62xFormats[] = {
FMT("111010kkkkkkkk", "xorlw %K"),
FMT("11110xkkkkkkkk", "sublw %K"),
FMT("11111xkkkkkkkk", "addlw %K"),
- NULL
+ nullptr
};
#define MAX_OPS ((ARRAY_LENGTH(PIC16C62xFormats) - 1) / PTRS_PER_FORMAT)
diff --git a/src/devices/cpu/pic16c62x/pic16c62x.cpp b/src/devices/cpu/pic16c62x/pic16c62x.cpp
index 2a38bcd5f93..2bbbd9f3439 100644
--- a/src/devices/cpu/pic16c62x/pic16c62x.cpp
+++ b/src/devices/cpu/pic16c62x/pic16c62x.cpp
@@ -105,11 +105,11 @@ static ADDRESS_MAP_START( pic16c62xa_ram, AS_DATA, 8, pic16c62x_device )
AM_RANGE(0x00, 0x06) AM_RAM
AM_RANGE(0x0a, 0x0c) AM_RAM
AM_RANGE(0x1f, 0x6f) AM_RAM
- AM_RANGE(0x70, 0x7f) AM_RAM AM_SHARE(0)
+ AM_RANGE(0x70, 0x7f) AM_RAM AM_SHARE(nullptr)
AM_RANGE(0x80, 0x86) AM_RAM
AM_RANGE(0x8a, 0x8e) AM_RAM
AM_RANGE(0x9f, 0xbf) AM_RAM
- AM_RANGE(0xf0, 0xff) AM_RAM AM_SHARE(0)
+ AM_RANGE(0xf0, 0xff) AM_RAM AM_SHARE(nullptr)
ADDRESS_MAP_END
@@ -808,7 +808,7 @@ const pic16c62x_device::pic16c62x_instruction pic16c62x_device::s_instructiontab
{(char *)"00000001100100", &pic16c62x_device::clrwdt, 1},
{(char *)"00000001100010", &pic16c62x_device::option, 1}, // deprecated
{(char *)"00000001100fff", &pic16c62x_device::tris, 1}, // deprecated
- {NULL, NULL, 0}
+ {nullptr, nullptr, 0}
};
/***********************************************************************
diff --git a/src/devices/cpu/pic16c62x/pic16c62x.h b/src/devices/cpu/pic16c62x/pic16c62x.h
index f7ac6fd43ae..0e0ecc8f5e6 100644
--- a/src/devices/cpu/pic16c62x/pic16c62x.h
+++ b/src/devices/cpu/pic16c62x/pic16c62x.h
@@ -82,7 +82,7 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) );
+ return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) );
}
// device_state_interface overrides
diff --git a/src/devices/cpu/powerpc/ppc.h b/src/devices/cpu/powerpc/ppc.h
index 73bcb0b470b..a683f1f5fd4 100644
--- a/src/devices/cpu/powerpc/ppc.h
+++ b/src/devices/cpu/powerpc/ppc.h
@@ -249,30 +249,30 @@ public:
protected:
// device-level overrides
- virtual void device_start();
- virtual void device_reset();
- virtual void device_stop();
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_stop() override;
// device_execute_interface overrides
- virtual UINT32 execute_min_cycles() const { return 1; }
- virtual UINT32 execute_max_cycles() const { return 40; }
- virtual UINT32 execute_input_lines() const { return 1; }
- virtual void execute_run();
- virtual void execute_set_input(int inputnum, int state);
+ virtual UINT32 execute_min_cycles() const override { return 1; }
+ virtual UINT32 execute_max_cycles() const override { return 40; }
+ virtual UINT32 execute_input_lines() const override { return 1; }
+ virtual void execute_run() override;
+ 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 { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
- virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address);
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
// device_state_interface overrides
- virtual void state_export(const device_state_entry &entry);
- virtual void state_import(const device_state_entry &entry);
- virtual void state_string_export(const device_state_entry &entry, std::string &str);
+ virtual void state_export(const device_state_entry &entry) override;
+ virtual void state_import(const device_state_entry &entry) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
// device_disasm_interface overrides
- virtual UINT32 disasm_min_opcode_bytes() const { return 4; }
- virtual UINT32 disasm_max_opcode_bytes() const { return 4; }
- virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
+ virtual UINT32 disasm_min_opcode_bytes() const override { return 4; }
+ virtual UINT32 disasm_max_opcode_bytes() const override { return 4; }
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
/* exception types */
enum
@@ -770,8 +770,8 @@ public:
DECLARE_WRITE8_MEMBER( ppc4xx_spu_w );
protected:
- virtual UINT32 execute_input_lines() const { return 5; }
- virtual void execute_set_input(int inputnum, int state);
+ virtual UINT32 execute_input_lines() const override { return 5; }
+ virtual void execute_set_input(int inputnum, int state) override;
};
diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp
index a98872029ec..bd95e60fc2a 100644
--- a/src/devices/cpu/powerpc/ppccom.cpp
+++ b/src/devices/cpu/powerpc/ppccom.cpp
@@ -211,15 +211,15 @@ ppc_device::ppc_device(const machine_config &mconfig, device_type type, const ch
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, __FILE__)
, m_program_config("program", ENDIANNESS_BIG, data_bits, address_bits, 0, internal_map)
, c_bus_frequency(0)
- , m_core(NULL)
+ , m_core(nullptr)
, m_bus_freq_multiplier(1)
- , m_vtlb(NULL)
+ , m_vtlb(nullptr)
, m_flavor(flavor)
, m_cap(cap)
, m_tb_divisor(tb_divisor)
, m_cache(CACHE_SIZE + sizeof(internal_ppc_state))
- , m_drcuml(NULL)
- , m_drcfe(NULL)
+ , m_drcuml(nullptr)
+ , m_drcfe(nullptr)
, m_drcoptions(0)
{
m_program_config.m_logaddr_width = 32;
@@ -237,37 +237,37 @@ ppc_device::ppc_device(const machine_config &mconfig, device_type type, const ch
//}
ppc603_device::ppc603_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ppc_device(mconfig, PPC603, "PowerPC 603", tag, owner, clock, "ppc603", 32, 64, PPC_MODEL_603, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, NULL)
+ : ppc_device(mconfig, PPC603, "PowerPC 603", tag, owner, clock, "ppc603", 32, 64, PPC_MODEL_603, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, nullptr)
{
}
ppc603e_device::ppc603e_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ppc_device(mconfig, PPC603E, "PowerPC 603e", tag, owner, clock, "ppc603e", 32, 64, PPC_MODEL_603E, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, NULL)
+ : ppc_device(mconfig, PPC603E, "PowerPC 603e", tag, owner, clock, "ppc603e", 32, 64, PPC_MODEL_603E, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, nullptr)
{
}
ppc603r_device::ppc603r_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ppc_device(mconfig, PPC603R, "PowerPC 603R", tag, owner, clock, "ppc603r", 32, 64, PPC_MODEL_603R, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, NULL)
+ : ppc_device(mconfig, PPC603R, "PowerPC 603R", tag, owner, clock, "ppc603r", 32, 64, PPC_MODEL_603R, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, nullptr)
{
}
ppc602_device::ppc602_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ppc_device(mconfig, PPC602, "PowerPC 602", tag, owner, clock, "ppc602", 32, 64, PPC_MODEL_602, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, NULL)
+ : ppc_device(mconfig, PPC602, "PowerPC 602", tag, owner, clock, "ppc602", 32, 64, PPC_MODEL_602, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4, nullptr)
{
}
mpc8240_device::mpc8240_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ppc_device(mconfig, MPC8240, "PowerPC MPC8240", tag, owner, clock, "mpc8240", 32, 64, PPC_MODEL_MPC8240, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4/* unknown */, NULL)
+ : ppc_device(mconfig, MPC8240, "PowerPC MPC8240", tag, owner, clock, "mpc8240", 32, 64, PPC_MODEL_MPC8240, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_603_MMU, 4/* unknown */, nullptr)
{
}
ppc601_device::ppc601_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ppc_device(mconfig, PPC601, "PowerPC 601", tag, owner, clock, "ppc601", 32, 64, PPC_MODEL_601, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_MFIOC | PPCCAP_601BAT, 0/* no TB */, NULL)
+ : ppc_device(mconfig, PPC601, "PowerPC 601", tag, owner, clock, "ppc601", 32, 64, PPC_MODEL_601, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_MFIOC | PPCCAP_601BAT, 0/* no TB */, nullptr)
{
}
ppc604_device::ppc604_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
- : ppc_device(mconfig, PPC604, "PowerPC 604", tag, owner, clock, "ppc604", 32, 64, PPC_MODEL_604, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_604_MMU, 4, NULL)
+ : ppc_device(mconfig, PPC604, "PowerPC 604", tag, owner, clock, "ppc604", 32, 64, PPC_MODEL_604, PPCCAP_OEA | PPCCAP_VEA | PPCCAP_FPU | PPCCAP_MISALIGNED | PPCCAP_604_MMU, 4, nullptr)
{
}
@@ -557,11 +557,11 @@ void ppc_device::device_start()
m_core = (internal_ppc_state *)m_cache.alloc_near(sizeof(internal_ppc_state));
memset(m_core, 0, sizeof(internal_ppc_state));
- m_entry = NULL;
- m_nocode = NULL;
- m_out_of_cycles = NULL;
- m_tlb_mismatch = NULL;
- m_swap_tgpr = NULL;
+ m_entry = nullptr;
+ m_nocode = nullptr;
+ m_out_of_cycles = nullptr;
+ m_tlb_mismatch = nullptr;
+ m_swap_tgpr = nullptr;
memset(m_lsw, 0, sizeof(m_lsw));
memset(m_stsw, 0, sizeof(m_stsw));
memset(m_read8, 0, sizeof(m_read8));
@@ -1148,9 +1148,9 @@ void ppc_device::state_string_export(const device_state_entry &entry, std::strin
void ppc_device::device_stop()
{
- if (m_vtlb != NULL)
+ if (m_vtlb != nullptr)
vtlb_free(m_vtlb);
- m_vtlb = NULL;
+ m_vtlb = nullptr;
/* clean up the DRC */
auto_free(machine(), m_drcfe);
@@ -1176,7 +1176,7 @@ void ppc_device::device_reset()
m_dec_zero_cycles = total_cycles();
if (m_tb_divisor)
{
- decrementer_int_callback(NULL, 0);
+ decrementer_int_callback(nullptr, 0);
}
}
@@ -1408,7 +1408,7 @@ UINT32 ppc_device::ppccom_translate_address_internal(int intention, offs_t &addr
UINT32 *ptegptr = (UINT32 *)m_program->get_read_ptr(ptegaddr);
/* should only have valid memory here, but make sure */
- if (ptegptr != NULL)
+ if (ptegptr != nullptr)
{
UINT32 targetupper = 0x80000000 | ((segreg & 0xffffff) << 7) | (hashnum << 6) | ((address >> 22) & 0x3f);
int ptenum;
@@ -1794,9 +1794,9 @@ void ppc_device::ppccom_execute_mtspr()
case SPR4XX_TCR:
m_core->spr[SPR4XX_TCR] = m_core->param1 | (oldval & PPC4XX_TCR_WRC_MASK);
if ((oldval ^ m_core->spr[SPR4XX_TCR]) & PPC4XX_TCR_FIE)
- ppc4xx_fit_callback(NULL, FALSE);
+ ppc4xx_fit_callback(nullptr, FALSE);
if ((oldval ^ m_core->spr[SPR4XX_TCR]) & PPC4XX_TCR_PIE)
- ppc4xx_pit_callback(NULL, FALSE);
+ ppc4xx_pit_callback(nullptr, FALSE);
return;
/* timer status register */
@@ -1809,7 +1809,7 @@ void ppc_device::ppccom_execute_mtspr()
case SPR4XX_PIT:
m_core->spr[SPR4XX_PIT] = m_core->param1;
m_pit_reload = m_core->param1;
- ppc4xx_pit_callback(NULL, FALSE);
+ ppc4xx_pit_callback(nullptr, FALSE);
return;
/* timebase */
diff --git a/src/devices/cpu/powerpc/ppcdrc.cpp b/src/devices/cpu/powerpc/ppcdrc.cpp
index 088eab855aa..57b6290a191 100644
--- a/src/devices/cpu/powerpc/ppcdrc.cpp
+++ b/src/devices/cpu/powerpc/ppcdrc.cpp
@@ -106,7 +106,7 @@ extern offs_t ppc_dasm_one(char *buffer, UINT32 pc, UINT32 op);
inline void ppc_device::alloc_handle(drcuml_state *drcuml, code_handle **handleptr, const char *name)
{
- if (*handleptr == NULL)
+ if (*handleptr == nullptr)
*handleptr = drcuml->handle_alloc(name);
}
@@ -324,21 +324,21 @@ void ppc_device::code_flush_cache()
/* add subroutines for memory accesses */
for (int mode = 0; mode < 8; mode++)
{
- static_generate_memory_accessor(mode, 1, FALSE, FALSE, "read8", m_read8[mode], NULL);
- static_generate_memory_accessor(mode, 1, TRUE, FALSE, "write8", m_write8[mode], NULL);
- static_generate_memory_accessor(mode, 2, FALSE, TRUE, "read16mask", m_read16mask[mode], NULL);
+ static_generate_memory_accessor(mode, 1, FALSE, FALSE, "read8", m_read8[mode], nullptr);
+ static_generate_memory_accessor(mode, 1, TRUE, FALSE, "write8", m_write8[mode], nullptr);
+ static_generate_memory_accessor(mode, 2, FALSE, TRUE, "read16mask", m_read16mask[mode], nullptr);
static_generate_memory_accessor(mode, 2, FALSE, FALSE, "read16", m_read16[mode], m_read16mask[mode]);
- static_generate_memory_accessor(mode, 2, TRUE, TRUE, "write16mask", m_write16mask[mode], NULL);
+ static_generate_memory_accessor(mode, 2, TRUE, TRUE, "write16mask", m_write16mask[mode], nullptr);
static_generate_memory_accessor(mode, 2, TRUE, FALSE, "write16", m_write16[mode], m_write16mask[mode]);
- static_generate_memory_accessor(mode, 4, FALSE, TRUE, "read32mask", m_read32mask[mode], NULL);
- static_generate_memory_accessor(mode, 4, FALSE, FALSE, "read32align", m_read32align[mode], NULL);
+ static_generate_memory_accessor(mode, 4, FALSE, TRUE, "read32mask", m_read32mask[mode], nullptr);
+ static_generate_memory_accessor(mode, 4, FALSE, FALSE, "read32align", m_read32align[mode], nullptr);
static_generate_memory_accessor(mode, 4, FALSE, FALSE, "read32", m_read32[mode], m_read32mask[mode]);
- static_generate_memory_accessor(mode, 4, TRUE, TRUE, "write32mask", m_write32mask[mode], NULL);
- static_generate_memory_accessor(mode, 4, TRUE, FALSE, "write32align",m_write32align[mode],NULL);
+ static_generate_memory_accessor(mode, 4, TRUE, TRUE, "write32mask", m_write32mask[mode], nullptr);
+ static_generate_memory_accessor(mode, 4, TRUE, FALSE, "write32align",m_write32align[mode],nullptr);
static_generate_memory_accessor(mode, 4, TRUE, FALSE, "write32", m_write32[mode], m_write32mask[mode]);
- static_generate_memory_accessor(mode, 8, FALSE, TRUE, "read64mask", m_read64mask[mode], NULL);
+ static_generate_memory_accessor(mode, 8, FALSE, TRUE, "read64mask", m_read64mask[mode], nullptr);
static_generate_memory_accessor(mode, 8, FALSE, FALSE, "read64", m_read64[mode], m_read64mask[mode]);
- static_generate_memory_accessor(mode, 8, TRUE, TRUE, "write64mask", m_write64mask[mode], NULL);
+ static_generate_memory_accessor(mode, 8, TRUE, TRUE, "write64mask", m_write64mask[mode], nullptr);
static_generate_memory_accessor(mode, 8, TRUE, FALSE, "write64", m_write64[mode], m_write64mask[mode]);
static_generate_lsw_entries(mode);
static_generate_stsw_entries(mode);
@@ -380,7 +380,7 @@ void ppc_device::code_compile_block(UINT8 mode, offs_t pc)
block = m_drcuml->begin_block(4096);
/* loop until we get through all instruction sequences */
- for (seqhead = desclist; seqhead != NULL; seqhead = seqlast->next())
+ for (seqhead = desclist; seqhead != nullptr; seqhead = seqlast->next())
{
const opcode_desc *curdesc;
UINT32 nextpc;
@@ -390,10 +390,10 @@ void ppc_device::code_compile_block(UINT8 mode, offs_t pc)
block->append_comment("-------------------------"); // comment
/* determine the last instruction in this sequence */
- for (seqlast = seqhead; seqlast != NULL; seqlast = seqlast->next())
+ for (seqlast = seqhead; seqlast != nullptr; seqlast = seqlast->next())
if (seqlast->flags & OPFLAG_END_SEQUENCE)
break;
- assert(seqlast != NULL);
+ assert(seqlast != nullptr);
/* if we don't have a hash for this mode/pc, or if we are overriding all, add one */
if (override || !m_drcuml->hash_exists(mode, seqhead->pc))
@@ -417,7 +417,7 @@ void ppc_device::code_compile_block(UINT8 mode, offs_t pc)
}
/* validate this code block if we're not pointing into ROM */
- if (m_program->get_write_ptr(seqhead->physpc) != NULL)
+ if (m_program->get_write_ptr(seqhead->physpc) != nullptr)
generate_checksum_block(block, &compiler, seqhead, seqlast); // <checksum>
/* label this instruction, if it may be jumped to locally */
@@ -442,7 +442,7 @@ void ppc_device::code_compile_block(UINT8 mode, offs_t pc)
/* if the last instruction can change modes, use a variable mode; otherwise, assume the same mode */
if (seqlast->flags & OPFLAG_CAN_CHANGE_MODES)
UML_HASHJMP(block, mem(&m_core->mode), nextpc, *m_nocode);// hashjmp <mode>,nextpc,nocode
- else if (seqlast->next() == NULL || seqlast->next()->pc != nextpc)
+ else if (seqlast->next() == nullptr || seqlast->next()->pc != nextpc)
UML_HASHJMP(block, m_core->mode, nextpc, *m_nocode);// hashjmp <mode>,nextpc,nocode
}
@@ -988,7 +988,7 @@ void ppc_device::static_generate_memory_accessor(int mode, int size, int iswrite
if (!ismasked && size != 1)
{
/* in little-endian mode, anything misaligned generates an exception */
- if ((mode & MODE_LITTLE_ENDIAN) || masked == NULL || !(m_cap & PPCCAP_MISALIGNED))
+ if ((mode & MODE_LITTLE_ENDIAN) || masked == nullptr || !(m_cap & PPCCAP_MISALIGNED))
{
UML_TEST(block, I0, size - 1); // test i0,size-1
UML_JMPc(block, COND_NZ, alignex = label++); // jmp alignex,nz
@@ -1033,7 +1033,7 @@ void ppc_device::static_generate_memory_accessor(int mode, int size, int iswrite
if ((machine().debug_flags & DEBUG_FLAG_ENABLED) != 0)
for (ramnum = 0; ramnum < PPC_MAX_FASTRAM; ramnum++)
- if (m_fastram[ramnum].base != NULL && (!iswrite || !m_fastram[ramnum].readonly))
+ if (m_fastram[ramnum].base != nullptr && (!iswrite || !m_fastram[ramnum].readonly))
{
void *fastbase = (UINT8 *)m_fastram[ramnum].base - m_fastram[ramnum].start;
UINT32 skip = label++;
@@ -1591,7 +1591,7 @@ void ppc_device::generate_checksum_block(drcuml_block *block, compiler_state *co
block->append_comment("[Validation for %08X]", seqhead->pc); // comment
/* loose verify or single instruction: just compare and fail */
- if (!(m_drcoptions & PPCDRC_STRICT_VERIFY) || seqhead->next() == NULL)
+ if (!(m_drcoptions & PPCDRC_STRICT_VERIFY) || seqhead->next() == nullptr)
{
if (!(seqhead->flags & OPFLAG_VIRTUAL_NOOP))
{
@@ -3797,7 +3797,7 @@ void ppc_device::log_register_list(drcuml_state *drcuml, const char *string, con
if (reglist[0] & REGFLAG_R(regnum))
{
drcuml->log_printf("%sr%d", (count++ == 0) ? "" : ",", regnum);
- if (regnostarlist != NULL && !(regnostarlist[0] & REGFLAG_R(regnum)))
+ if (regnostarlist != nullptr && !(regnostarlist[0] & REGFLAG_R(regnum)))
drcuml->log_printf("*");
}
@@ -3805,17 +3805,17 @@ void ppc_device::log_register_list(drcuml_state *drcuml, const char *string, con
if (reglist[1] & REGFLAG_FR(regnum))
{
drcuml->log_printf("%sfr%d", (count++ == 0) ? "" : ",", regnum);
- if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_FR(regnum)))
+ if (regnostarlist != nullptr && !(regnostarlist[1] & REGFLAG_FR(regnum)))
drcuml->log_printf("*");
}
for (regnum = 0; regnum < 8; regnum++)
if (reglist[2] & REGFLAG_CR(regnum))
{
- if ((reglist[2] & REGFLAG_CR(regnum)) == REGFLAG_CR(regnum) && (regnostarlist == NULL || (regnostarlist[2] & REGFLAG_CR(regnum)) == REGFLAG_CR(regnum)))
+ if ((reglist[2] & REGFLAG_CR(regnum)) == REGFLAG_CR(regnum) && (regnostarlist == nullptr || (regnostarlist[2] & REGFLAG_CR(regnum)) == REGFLAG_CR(regnum)))
{
drcuml->log_printf("%scr%d", (count++ == 0) ? "" : ",", regnum);
- if (regnostarlist != NULL && !(regnostarlist[2] & REGFLAG_CR(regnum)))
+ if (regnostarlist != nullptr && !(regnostarlist[2] & REGFLAG_CR(regnum)))
drcuml->log_printf("*");
}
else
@@ -3824,7 +3824,7 @@ void ppc_device::log_register_list(drcuml_state *drcuml, const char *string, con
if (reglist[2] & REGFLAG_CR_BIT(regnum * 4 + crnum))
{
drcuml->log_printf("%scr%d[%s]", (count++ == 0) ? "" : ",", regnum, crtext[crnum]);
- if (regnostarlist != NULL && !(regnostarlist[2] & REGFLAG_CR_BIT(regnum * 4 + crnum)))
+ if (regnostarlist != nullptr && !(regnostarlist[2] & REGFLAG_CR_BIT(regnum * 4 + crnum)))
drcuml->log_printf("*");
}
}
@@ -3833,37 +3833,37 @@ void ppc_device::log_register_list(drcuml_state *drcuml, const char *string, con
if (reglist[3] & REGFLAG_XER_CA)
{
drcuml->log_printf("%sxer_ca", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[3] & REGFLAG_XER_CA))
+ if (regnostarlist != nullptr && !(regnostarlist[3] & REGFLAG_XER_CA))
drcuml->log_printf("*");
}
if (reglist[3] & REGFLAG_XER_OV)
{
drcuml->log_printf("%sxer_ov", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[3] & REGFLAG_XER_OV))
+ if (regnostarlist != nullptr && !(regnostarlist[3] & REGFLAG_XER_OV))
drcuml->log_printf("*");
}
if (reglist[3] & REGFLAG_XER_SO)
{
drcuml->log_printf("%sxer_so", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[3] & REGFLAG_XER_SO))
+ if (regnostarlist != nullptr && !(regnostarlist[3] & REGFLAG_XER_SO))
drcuml->log_printf("*");
}
if (reglist[3] & REGFLAG_XER_COUNT)
{
drcuml->log_printf("%sxer_count", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[3] & REGFLAG_XER_COUNT))
+ if (regnostarlist != nullptr && !(regnostarlist[3] & REGFLAG_XER_COUNT))
drcuml->log_printf("*");
}
if (reglist[3] & REGFLAG_CTR)
{
drcuml->log_printf("%sctr", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[3] & REGFLAG_CTR))
+ if (regnostarlist != nullptr && !(regnostarlist[3] & REGFLAG_CTR))
drcuml->log_printf("*");
}
if (reglist[3] & REGFLAG_LR)
{
drcuml->log_printf("%slr", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[3] & REGFLAG_LR))
+ if (regnostarlist != nullptr && !(regnostarlist[3] & REGFLAG_LR))
drcuml->log_printf("*");
}
@@ -3871,7 +3871,7 @@ void ppc_device::log_register_list(drcuml_state *drcuml, const char *string, con
if (reglist[3] & REGFLAG_FPSCR(regnum))
{
drcuml->log_printf("%sfpscr%d", (count++ == 0) ? "" : ",", regnum);
- if (regnostarlist != NULL && !(regnostarlist[3] & REGFLAG_FPSCR(regnum)))
+ if (regnostarlist != nullptr && !(regnostarlist[3] & REGFLAG_FPSCR(regnum)))
drcuml->log_printf("*");
}
@@ -3890,7 +3890,7 @@ void ppc_device::log_opcode_desc(drcuml_state *drcuml, const opcode_desc *descli
drcuml->log_printf("\nDescriptor list @ %08X\n", desclist->pc);
/* output each descriptor */
- for ( ; desclist != NULL; desclist = desclist->next())
+ for ( ; desclist != nullptr; desclist = desclist->next())
{
char buffer[100];
@@ -3908,12 +3908,12 @@ void ppc_device::log_opcode_desc(drcuml_state *drcuml, const opcode_desc *descli
drcuml->log_printf("%08X [%08X] t:%08X f:%s: %-30s", desclist->pc, desclist->physpc, desclist->targetpc, log_desc_flags_to_string(desclist->flags), buffer);
/* output register states */
- log_register_list(drcuml, "use", desclist->regin, NULL);
+ log_register_list(drcuml, "use", desclist->regin, nullptr);
log_register_list(drcuml, "mod", desclist->regout, desclist->regreq);
drcuml->log_printf("\n");
/* if we have a delay slot, output it recursively */
- if (desclist->delay.first() != NULL)
+ if (desclist->delay.first() != nullptr)
log_opcode_desc(drcuml, desclist->delay.first(), indent + 1);
/* at the end of a sequence add a dividing line */
diff --git a/src/devices/cpu/powerpc/ppcfe.cpp b/src/devices/cpu/powerpc/ppcfe.cpp
index 8ba5a90eb4e..2ebf682ed4c 100644
--- a/src/devices/cpu/powerpc/ppcfe.cpp
+++ b/src/devices/cpu/powerpc/ppcfe.cpp
@@ -152,7 +152,7 @@ bool ppc_frontend::describe(opcode_desc &desc, const opcode_desc *prev)
{
CR_BIT_USED(desc, G_BI(op));
// branch folding
- if (prev == NULL || prev->regout[2] == 0)
+ if (prev == nullptr || prev->regout[2] == 0)
desc.cycles = 0;
}
if (!(G_BO(op) & 0x04))
@@ -372,7 +372,7 @@ bool ppc_frontend::describe_13(UINT32 op, opcode_desc &desc, const opcode_desc *
CR_USED(desc, G_CRFS(op));
CR_MODIFIED(desc, G_CRFD(op));
// CR logical folding
- if (prev == NULL || prev->regout[2] == 0)
+ if (prev == nullptr || prev->regout[2] == 0)
desc.cycles = 0;
return true;
@@ -406,7 +406,7 @@ bool ppc_frontend::describe_13(UINT32 op, opcode_desc &desc, const opcode_desc *
CR_BIT_USED(desc, G_CRBB(op));
CR_BIT_MODIFIED(desc, G_CRBD(op));
// CR logical folding
- if (prev == NULL || prev->regout[2] == 0)
+ if (prev == nullptr || prev->regout[2] == 0)
desc.cycles = 0;
return true;
diff --git a/src/devices/cpu/pps4/pps4.h b/src/devices/cpu/pps4/pps4.h
index 8c115745cbb..233d9e12f95 100644
--- a/src/devices/cpu/pps4/pps4.h
+++ b/src/devices/cpu/pps4/pps4.h
@@ -58,7 +58,7 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) );
+ return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) );
}
// device_state_interface overrides
diff --git a/src/devices/cpu/pps4/pps4dasm.cpp b/src/devices/cpu/pps4/pps4dasm.cpp
index 4ee5079ee91..cc7f3f488ae 100644
--- a/src/devices/cpu/pps4/pps4dasm.cpp
+++ b/src/devices/cpu/pps4/pps4dasm.cpp
@@ -373,7 +373,7 @@ CPU_DISASSEMBLE( pps4 )
unsigned PC = pc;
UINT8 op = OP(pc++);
UINT32 tok = table[op];
- char *dst = 0;
+ char *dst = nullptr;
if (0 == (tok & t_MASK)) {
sprintf(buffer, "%s", token_str[tok & t_MASK]);
diff --git a/src/devices/cpu/psx/psx.cpp b/src/devices/cpu/psx/psx.cpp
index a262c9bd42c..f98c6fccc8f 100644
--- a/src/devices/cpu/psx/psx.cpp
+++ b/src/devices/cpu/psx/psx.cpp
@@ -745,7 +745,7 @@ static const struct
{ 0xc0, 0x1a, "sys_c0_1a()" },
{ 0xc0, 0x1b, "KernelRedirect(int flag)" },
{ 0xc0, 0x1c, "PatchA0Table()" },
- { 0x00, 0x00, NULL }
+ { 0x00, 0x00, nullptr }
};
UINT32 psxcpu_device::log_bioscall_parameter( int parm )
@@ -878,17 +878,17 @@ void psxcpu_device::log_bioscall()
}
}
- while( bioscalls[ bioscall ].prototype != NULL &&
+ while( bioscalls[ bioscall ].prototype != nullptr &&
( bioscalls[ bioscall ].address != address ||
bioscalls[ bioscall ].operation != operation ) )
{
bioscall++;
}
- if( bioscalls[ bioscall ].prototype != NULL )
+ if( bioscalls[ bioscall ].prototype != nullptr )
{
const char *prototype = bioscalls[ bioscall ].prototype;
- const char *parmstart = NULL;
+ const char *parmstart = nullptr;
int parm = 0;
int parmlen = -1;
int brackets = 0;
@@ -958,7 +958,7 @@ void psxcpu_device::log_bioscall()
if( parm > 0 )
{
UINT32 format = log_bioscall_parameter( parm - 1 );
- const char *parmstr = NULL;
+ const char *parmstr = nullptr;
int percent = 0;
for( ;; )
@@ -1002,7 +1002,7 @@ void psxcpu_device::log_bioscall()
}
}
- if( parmstr != NULL )
+ if( parmstr != nullptr )
{
if( parm > 0 )
{
@@ -1012,7 +1012,7 @@ void psxcpu_device::log_bioscall()
strcpy( &buf[ pos ], parmstr );
pos += strlen( parmstr );
- parmstr = NULL;
+ parmstr = nullptr;
parm++;
}
diff --git a/src/devices/cpu/psx/psx.h b/src/devices/cpu/psx/psx.h
index 21b6d8adc55..03d1ea40508 100644
--- a/src/devices/cpu/psx/psx.h
+++ b/src/devices/cpu/psx/psx.h
@@ -219,7 +219,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/psx/psxdasm.cpp b/src/devices/cpu/psx/psxdasm.cpp
index dabb4da9413..94d960b94a3 100644
--- a/src/devices/cpu/psx/psxdasm.cpp
+++ b/src/devices/cpu/psx/psxdasm.cpp
@@ -126,7 +126,7 @@ static char *effective_address( psxcpu_state *state, UINT32 pc, UINT32 op )
{
static char s_address[ 20 ];
- if( state != NULL && state->pc() == pc )
+ if( state != nullptr && state->pc() == pc )
{
sprintf( s_address, "%s(%s) ; 0x%08x", make_signed_hex_str_16( INS_IMMEDIATE( op ) ), s_cpugenreg[ INS_RS( op ) ],
(UINT32)( state->r( INS_RS( op ) ) + (INT16)INS_IMMEDIATE( op ) ) );
@@ -139,7 +139,7 @@ static char *effective_address( psxcpu_state *state, UINT32 pc, UINT32 op )
static UINT32 relative_address( psxcpu_state *state, UINT32 pc, UINT32 op )
{
UINT32 nextpc = pc + 4;
- if( state != NULL && state->pc() == pc && state->delayr() == PSXCPU_DELAYR_PC )
+ if( state != nullptr && state->pc() == pc && state->delayr() == PSXCPU_DELAYR_PC )
{
nextpc = state->delayv();
}
@@ -150,7 +150,7 @@ static UINT32 relative_address( psxcpu_state *state, UINT32 pc, UINT32 op )
static UINT32 jump_address( psxcpu_state *state, UINT32 pc, UINT32 op )
{
UINT32 nextpc = pc + 4;
- if( state != NULL && state->pc() == pc && state->delayr() == PSXCPU_DELAYR_PC )
+ if( state != nullptr && state->pc() == pc && state->delayr() == PSXCPU_DELAYR_PC )
{
nextpc = state->delayv();
}
@@ -676,5 +676,5 @@ unsigned DasmPSXCPU( psxcpu_state *state, char *buffer, UINT32 pc, const UINT8 *
CPU_DISASSEMBLE( psxcpu_generic )
{
- return DasmPSXCPU( NULL, buffer, pc, opram );
+ return DasmPSXCPU( nullptr, buffer, pc, opram );
}
diff --git a/src/devices/cpu/rsp/rsp.cpp b/src/devices/cpu/rsp/rsp.cpp
index 6419282a598..c8cbbfe24d1 100644
--- a/src/devices/cpu/rsp/rsp.cpp
+++ b/src/devices/cpu/rsp/rsp.cpp
@@ -102,36 +102,36 @@ rsp_device::rsp_device(const machine_config &mconfig, const char *tag, device_t
: cpu_device(mconfig, RSP, "RSP", tag, owner, clock, "rsp", __FILE__)
, m_program_config("program", ENDIANNESS_BIG, 32, 32)
, m_cache(CACHE_SIZE + sizeof(internal_rsp_state))
- , m_drcuml(NULL)
+ , m_drcuml(nullptr)
// , m_drcuml(*this, m_cache, 0, 8, 32, 2)
- , m_drcfe(NULL)
+ , m_drcfe(nullptr)
, m_drcoptions(0)
, m_cache_dirty(TRUE)
, m_numcycles(0)
- , m_format(NULL)
+ , m_format(nullptr)
, m_arg2(0)
, m_arg3(0)
- , m_entry(NULL)
- , m_nocode(NULL)
- , m_out_of_cycles(NULL)
- , m_read8(NULL)
- , m_write8(NULL)
- , m_read16(NULL)
- , m_write16(NULL)
- , m_read32(NULL)
- , m_write32(NULL)
- , m_rsp_state(NULL)
- , m_exec_output(NULL)
+ , m_entry(nullptr)
+ , m_nocode(nullptr)
+ , m_out_of_cycles(nullptr)
+ , m_read8(nullptr)
+ , m_write8(nullptr)
+ , m_read16(nullptr)
+ , m_write16(nullptr)
+ , m_read32(nullptr)
+ , m_write32(nullptr)
+ , m_rsp_state(nullptr)
+ , m_exec_output(nullptr)
, m_sr(0)
, m_step_count(0)
, m_ppc(0)
, m_nextpc(0)
- , m_dmem32(NULL)
- , m_dmem16(NULL)
- , m_dmem8(NULL)
- , m_imem32(NULL)
- , m_imem16(NULL)
- , m_imem8(NULL)
+ , m_dmem32(nullptr)
+ , m_dmem16(nullptr)
+ , m_dmem8(nullptr)
+ , m_imem32(nullptr)
+ , m_imem16(nullptr)
+ , m_imem8(nullptr)
, m_debugger_temp(0)
, m_dp_reg_r_func(*this)
, m_dp_reg_w_func(*this)
@@ -595,7 +595,7 @@ void rsp_device::device_stop()
if (m_exec_output)
fclose(m_exec_output);
- m_exec_output = NULL;
+ m_exec_output = nullptr;
/* clean up the DRC */
if (m_drcuml)
diff --git a/src/devices/cpu/rsp/rsp.h b/src/devices/cpu/rsp/rsp.h
index 6bc588c2f01..3864efcda2c 100644
--- a/src/devices/cpu/rsp/rsp.h
+++ b/src/devices/cpu/rsp/rsp.h
@@ -180,7 +180,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) { }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/rsp/rspcp2.cpp b/src/devices/cpu/rsp/rspcp2.cpp
index ab6afed4cbc..fe6d3b243e8 100644
--- a/src/devices/cpu/rsp/rspcp2.cpp
+++ b/src/devices/cpu/rsp/rspcp2.cpp
@@ -725,10 +725,10 @@ void rsp_cop2::init()
void rsp_cop2::start()
{
- for(int regIdx = 0; regIdx < 32; regIdx++ )
+ for(auto & elem : m_v)
{
- m_v[regIdx].d[0] = 0;
- m_v[regIdx].d[1] = 0;
+ elem.d[0] = 0;
+ elem.d[1] = 0;
}
CLEAR_CARRY_FLAGS();
@@ -740,9 +740,9 @@ void rsp_cop2::start()
m_reciprocal_high = 0;
// Accumulators do not power on to a random state
- for(int accumIdx = 0; accumIdx < 8; accumIdx++ )
+ for(auto & elem : m_accum)
{
- m_accum[accumIdx].q = 0;
+ elem.q = 0;
}
}
diff --git a/src/devices/cpu/rsp/rspdrc.cpp b/src/devices/cpu/rsp/rspdrc.cpp
index fc8710d5afd..b89d6ca1d7e 100644
--- a/src/devices/cpu/rsp/rspdrc.cpp
+++ b/src/devices/cpu/rsp/rspdrc.cpp
@@ -77,7 +77,7 @@ INLINE UINT32 epc(const opcode_desc *desc)
INLINE void alloc_handle(drcuml_state *drcuml, code_handle **handleptr, const char *name)
{
- if (*handleptr == NULL)
+ if (*handleptr == nullptr)
*handleptr = drcuml->handle_alloc(name);
}
@@ -371,7 +371,7 @@ void rsp_device::code_compile_block(offs_t pc)
block = drcuml->begin_block(4096);
/* loop until we get through all instruction sequences */
- for (seqhead = desclist; seqhead != NULL; seqhead = seqlast->next())
+ for (seqhead = desclist; seqhead != nullptr; seqhead = seqlast->next())
{
const opcode_desc *curdesc;
UINT32 nextpc;
@@ -381,10 +381,10 @@ void rsp_device::code_compile_block(offs_t pc)
block->append_comment("-------------------------"); // comment
/* determine the last instruction in this sequence */
- for (seqlast = seqhead; seqlast != NULL; seqlast = seqlast->next())
+ for (seqlast = seqhead; seqlast != nullptr; seqlast = seqlast->next())
if (seqlast->flags & OPFLAG_END_SEQUENCE)
break;
- assert(seqlast != NULL);
+ assert(seqlast != nullptr);
/* if we don't have a hash for this mode/pc, or if we are overriding all, add one */
if (override || !drcuml->hash_exists(0, seqhead->pc))
@@ -408,7 +408,7 @@ void rsp_device::code_compile_block(offs_t pc)
}
/* validate this code block if we're not pointing into ROM */
- if (m_program->get_write_ptr(seqhead->physpc) != NULL)
+ if (m_program->get_write_ptr(seqhead->physpc) != nullptr)
generate_checksum_block(block, &compiler, seqhead, seqlast);
/* label this instruction, if it may be jumped to locally */
@@ -431,7 +431,7 @@ void rsp_device::code_compile_block(offs_t pc)
generate_update_cycles(block, &compiler, nextpc, TRUE); // <subtract cycles>
/* if the last instruction can change modes, use a variable mode; otherwise, assume the same mode */
- if (seqlast->next() == NULL || seqlast->next()->pc != nextpc)
+ if (seqlast->next() == nullptr || seqlast->next()->pc != nextpc)
UML_HASHJMP(block, 0, nextpc, *m_nocode); // hashjmp <mode>,nextpc,nocode
}
@@ -663,7 +663,7 @@ void rsp_device::generate_checksum_block(drcuml_block *block, compiler_state *co
block->append_comment("[Validation for %08X]", seqhead->pc | 0x1000); // comment
}
/* loose verify or single instruction: just compare and fail */
- if (!(m_drcoptions & RSPDRC_STRICT_VERIFY) || seqhead->next() == NULL)
+ if (!(m_drcoptions & RSPDRC_STRICT_VERIFY) || seqhead->next() == nullptr)
{
if (!(seqhead->flags & OPFLAG_VIRTUAL_NOOP))
{
@@ -671,10 +671,10 @@ void rsp_device::generate_checksum_block(drcuml_block *block, compiler_state *co
void *base = m_direct->read_ptr(seqhead->physpc | 0x1000);
UML_LOAD(block, I0, base, 0, SIZE_DWORD, SCALE_x4); // load i0,base,0,dword
- if (seqhead->delay.first() != NULL && seqhead->physpc != seqhead->delay.first()->physpc)
+ if (seqhead->delay.first() != nullptr && seqhead->physpc != seqhead->delay.first()->physpc)
{
base = m_direct->read_ptr(seqhead->delay.first()->physpc | 0x1000);
- assert(base != NULL);
+ assert(base != nullptr);
UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword
UML_ADD(block, I0, I0, I1); // add i0,i0,i1
@@ -697,15 +697,15 @@ void rsp_device::generate_checksum_block(drcuml_block *block, compiler_state *co
if (!(curdesc->flags & OPFLAG_VIRTUAL_NOOP))
{
base = m_direct->read_ptr(curdesc->physpc | 0x1000);
- assert(base != NULL);
+ assert(base != nullptr);
UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword
UML_ADD(block, I0, I0, I1); // add i0,i0,i1
sum += curdesc->opptr.l[0];
- if (curdesc->delay.first() != NULL && (curdesc == seqlast || (curdesc->next() != NULL && curdesc->next()->physpc != curdesc->delay.first()->physpc)))
+ if (curdesc->delay.first() != nullptr && (curdesc == seqlast || (curdesc->next() != nullptr && curdesc->next()->physpc != curdesc->delay.first()->physpc)))
{
base = m_direct->read_ptr(curdesc->delay.first()->physpc | 0x1000);
- assert(base != NULL);
+ assert(base != nullptr);
UML_LOAD(block, I1, base, 0, SIZE_DWORD, SCALE_x4); // load i1,base,dword
UML_ADD(block, I0, I0, I1); // add i0,i0,i1
@@ -819,7 +819,7 @@ void rsp_device::generate_delay_slot_and_branch(drcuml_block *block, compiler_st
}
/* compile the delay slot using temporary compiler state */
- assert(desc->delay.first() != NULL);
+ assert(desc->delay.first() != nullptr);
generate_sequence_instruction(block, &compiler_temp, desc->delay.first()); // <next instruction>
generate_branch(block, compiler, desc);
diff --git a/src/devices/cpu/s2650/2650dasm.cpp b/src/devices/cpu/s2650/2650dasm.cpp
index 6a6f9b1a00c..a7bd56d406d 100644
--- a/src/devices/cpu/s2650/2650dasm.cpp
+++ b/src/devices/cpu/s2650/2650dasm.cpp
@@ -43,12 +43,12 @@ static const int rel[0x100] = {
};
typedef char* (*callback) (int addr);
-static callback find_symbol = 0;
+static callback find_symbol = nullptr;
static char *SYM(int addr)
{
static char buff[8+1];
- char * s = NULL;
+ char * s = nullptr;
if (find_symbol) s = (*find_symbol)(addr);
if (s) return s;
diff --git a/src/devices/cpu/s2650/s2650.h b/src/devices/cpu/s2650/s2650.h
index e9a0a01c3b9..7d6bee8dd14 100644
--- a/src/devices/cpu/s2650/s2650.h
+++ b/src/devices/cpu/s2650/s2650.h
@@ -56,7 +56,7 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL );
+ return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr );
}
// device_state_interface overrides
diff --git a/src/devices/cpu/saturn/saturn.h b/src/devices/cpu/saturn/saturn.h
index 836f832cbf6..4ea6a6249ed 100644
--- a/src/devices/cpu/saturn/saturn.h
+++ b/src/devices/cpu/saturn/saturn.h
@@ -101,7 +101,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/saturn/saturnds.cpp b/src/devices/cpu/saturn/saturnds.cpp
index 1dc6eb3d622..5b6adcf0c24 100644
--- a/src/devices/cpu/saturn/saturnds.cpp
+++ b/src/devices/cpu/saturn/saturnds.cpp
@@ -37,7 +37,7 @@ static const char *const adr_b[]=
{ P, WP, XS, X, S, M, B, W };
static const char *const adr_af[]=
-{ P, WP, XS, X, S, M, B, W, 0, 0, 0, 0, 0, 0, 0, A };
+{ P, WP, XS, X, S, M, B, W, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, A };
static const char *const adr_a[]=
{ P, WP, XS, X, S, M, B, W };
@@ -590,7 +590,7 @@ static const char *field_2_string(int adr_enum)
case FieldW: return W;
case FieldA: return A;
}
- return 0;
+ return nullptr;
}
static const OPCODE opcodes[][0x10]= {
diff --git a/src/devices/cpu/sc61860/sc61860.h b/src/devices/cpu/sc61860/sc61860.h
index e34197f83f9..e92fa2d4d78 100644
--- a/src/devices/cpu/sc61860/sc61860.h
+++ b/src/devices/cpu/sc61860/sc61860.h
@@ -101,7 +101,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/sc61860/scdasm.cpp b/src/devices/cpu/sc61860/scdasm.cpp
index 047ba7fae30..ad35c1f2f1b 100644
--- a/src/devices/cpu/sc61860/scdasm.cpp
+++ b/src/devices/cpu/sc61860/scdasm.cpp
@@ -92,15 +92,15 @@ static const struct { const char *mnemonic; Adr adr; } table[]={
{ "MVWD", Imp }, { "EXWD", Imp }, { "MVBD", Imp }, { "EXBD", Imp },
{ "SRW", Imp }, { "SLW", Imp }, { "FILM", Imp }, { "FILD", Imp },
- { "LDP", Imp }, { "LPQ", Imp }, { "LPR", Imp }, { 0, Ill },
+ { "LDP", Imp }, { "LPQ", Imp }, { "LPR", Imp }, { nullptr, Ill },
{ "IXL", Imp }, { "DXL", Imp }, { "IYS", Imp }, { "DYS", Imp },
{ "JRNZP", RelP}, { "JRNZM", RelM}, { "JRNCP", RelP}, { "JRNCM", RelM},
- { "JRP", RelP}, { "JRM", RelM}, { 0, Ill }, { "LOOP", RelM},
+ { "JRP", RelP}, { "JRM", RelM}, { nullptr, Ill }, { "LOOP", RelM},
- { "STP", Imp }, { "STQ", Imp }, { "STR", Imp }, { 0, Ill },
- { "PUSH", Imp }, { "DATA", Imp }, { 0, Ill }, { "RTN", Imp },
+ { "STP", Imp }, { "STQ", Imp }, { "STR", Imp }, { nullptr, Ill },
+ { "PUSH", Imp }, { "DATA", Imp }, { nullptr, Ill }, { "RTN", Imp },
{ "JRZP", RelP}, { "JRZM", RelM}, { "JRCP", RelP}, { "JRCM", RelM},
- { 0, Ill }, { 0, Ill }, { 0, Ill }, { 0, Ill },
+ { nullptr, Ill }, { nullptr, Ill }, { nullptr, Ill }, { nullptr, Ill },
{ "INCI", Imp }, { "DECI", Imp }, { "INCA", Imp }, { "DECA", Imp },
{ "ADM", Imp }, { "SBM", Imp }, { "ANMA", Imp }, { "ORMA", Imp },
@@ -110,46 +110,46 @@ static const struct { const char *mnemonic; Adr adr; } table[]={
{ "INCP", Imp }, { "DECP", Imp }, { "STD", Imp }, { "MVDM", Imp },
{ "READM",/*mvmp*/ Imp }, { "MVMD", Imp }, { "READ"/*ldpc*/, Imp }, { "LDD", Imp },
{ "SWP", Imp }, { "LDM", Imp }, { "SL", Imp }, { "POP", Imp },
- { 0, Ill }, { "OUTA", Imp }, { 0, Ill }, { "OUTF", Imp },
+ { nullptr, Ill }, { "OUTA", Imp }, { nullptr, Ill }, { "OUTF", Imp },
{ "ANIM", Imm }, { "ORIM", Imm }, { "TSIM", Imm }, { "CPIM", Imm },
{ "ANIA", Imm }, { "ORIA", Imm }, { "TSIA", Imm }, { "CPIA", Imm },
- { 0, Ill }, { "ETC", Etc }, { 0, Ill }, { "TEST", Imm },
- { 0, Ill }, { 0, Ill }, { 0, Ill }, { "IPXH"/*CDN,lxp*/, Imp },
+ { nullptr, Ill }, { "ETC", Etc }, { nullptr, Ill }, { "TEST", Imm },
+ { nullptr, Ill }, { nullptr, Ill }, { nullptr, Ill }, { "IPXH"/*CDN,lxp*/, Imp },
- { "ADIM", Imm }, { "SBIM", Imm }, { 0, Ill }, { 0, Ill },
- { "ADIA", Imm }, { "SBIA", Imm }, { 0, Ill }, { 0, Ill },
- { "CALL", Abs }, { "JP", Abs }, { "PTC", Ptc }, { 0, Ill },
+ { "ADIM", Imm }, { "SBIM", Imm }, { nullptr, Ill }, { nullptr, Ill },
+ { "ADIA", Imm }, { "SBIA", Imm }, { nullptr, Ill }, { nullptr, Ill },
+ { "CALL", Abs }, { "JP", Abs }, { "PTC", Ptc }, { nullptr, Ill },
{ "JPNZ", Abs }, { "JPNC", Abs }, { "JPZ", Abs }, { "JPC", Abs },
- { "LP", Lp }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ { "LP", Lp }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
{ "INCJ", Imp }, { "DECJ", Imp }, { "INCB", Imp }, { "DECB", Imp },
- { "ACDM", Imp }, { "SBCM", Imp }, { 0, Ill }, { "CPMA", Imp },
+ { "ACDM", Imp }, { "SBCM", Imp }, { nullptr, Ill }, { "CPMA", Imp },
{ "INCL", Imp }, { "DECL", Imp }, { "INCW", Imp }, { "DECW", Imp },
- { "INB", Imp }, { 0, Ill }, { "NOPT", Imp }, { 0, Ill },
+ { "INB", Imp }, { nullptr, Ill }, { "NOPT", Imp }, { nullptr, Ill },
- { "SC", Imp }, { "RC", Imp }, { "SR", Imp }, { 0, Ill },
- { "ANID", Imm }, { "ORID", Imm }, { "TSID", Imm }, { 0, Ill },
- { "LEAVE", Imp }, { 0, Ill }, { "EXAB", Imp }, { "EXAM", Imp },
- { 0, Ill }, { "OUTB", Imp }, { 0, Ill }, { "OUTC", Imp },
+ { "SC", Imp }, { "RC", Imp }, { "SR", Imp }, { nullptr, Ill },
+ { "ANID", Imm }, { "ORID", Imm }, { "TSID", Imm }, { nullptr, Ill },
+ { "LEAVE", Imp }, { nullptr, Ill }, { "EXAB", Imp }, { "EXAM", Imp },
+ { nullptr, Ill }, { "OUTB", Imp }, { nullptr, Ill }, { "OUTC", Imp },
- { "CAL", Imp }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ { "CAL", Imp }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
- { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 }, { 0 },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
+ { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr }, { nullptr },
};
CPU_DISASSEMBLE( sc61860 )
diff --git a/src/devices/cpu/scmp/scmp.h b/src/devices/cpu/scmp/scmp.h
index 86590f93546..c415ff3ad44 100644
--- a/src/devices/cpu/scmp/scmp.h
+++ b/src/devices/cpu/scmp/scmp.h
@@ -53,7 +53,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/score/score.cpp b/src/devices/cpu/score/score.cpp
index a8e3dd210fc..f949efe7453 100644
--- a/src/devices/cpu/score/score.cpp
+++ b/src/devices/cpu/score/score.cpp
@@ -157,7 +157,7 @@ void score7_cpu_device::state_string_export(const device_state_entry &entry, std
const address_space_config * score7_cpu_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config: NULL;
+ return (spacenum == AS_PROGRAM) ? &m_program_config: nullptr;
}
diff --git a/src/devices/cpu/scudsp/scudsp.h b/src/devices/cpu/scudsp/scudsp.h
index ac46450a9d4..39e002f7473 100644
--- a/src/devices/cpu/scudsp/scudsp.h
+++ b/src/devices/cpu/scudsp/scudsp.h
@@ -93,7 +93,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/se3208/se3208.cpp b/src/devices/cpu/se3208/se3208.cpp
index 36a26cd603b..b37a8e09f5f 100644
--- a/src/devices/cpu/se3208/se3208.cpp
+++ b/src/devices/cpu/se3208/se3208.cpp
@@ -1715,9 +1715,9 @@ void se3208_device::BuildTable(void)
void se3208_device::device_reset()
{
- for ( int i = 0; i < 8; i++ )
+ for (auto & elem : m_R)
{
- m_R[i] = 0;
+ elem = 0;
}
m_SP = 0;
m_ER = 0;
diff --git a/src/devices/cpu/se3208/se3208.h b/src/devices/cpu/se3208/se3208.h
index 696d53affa8..ef6b1f811f1 100644
--- a/src/devices/cpu/se3208/se3208.h
+++ b/src/devices/cpu/se3208/se3208.h
@@ -29,7 +29,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/sh2/sh2.cpp b/src/devices/cpu/sh2/sh2.cpp
index e48a5197265..7cd45505c9b 100644
--- a/src/devices/cpu/sh2/sh2.cpp
+++ b/src/devices/cpu/sh2/sh2.cpp
@@ -176,21 +176,21 @@ sh2_device::sh2_device(const machine_config &mconfig, const char *tag, device_t
, m_is_slave(0)
, m_cpu_type(CPU_TYPE_SH2)
, m_cache(CACHE_SIZE + sizeof(internal_sh2_state))
- , m_drcuml(NULL)
+ , m_drcuml(nullptr)
// , m_drcuml(*this, m_cache, 0, 1, 32, 1)
- , m_drcfe(NULL)
+ , m_drcfe(nullptr)
, m_drcoptions(0)
- , m_sh2_state(NULL)
- , m_entry(NULL)
- , m_read8(NULL)
- , m_write8(NULL)
- , m_read16(NULL)
- , m_write16(NULL)
- , m_read32(NULL)
- , m_write32(NULL)
- , m_interrupt(NULL)
- , m_nocode(NULL)
- , m_out_of_cycles(NULL)
+ , m_sh2_state(nullptr)
+ , m_entry(nullptr)
+ , m_read8(nullptr)
+ , m_write8(nullptr)
+ , m_read16(nullptr)
+ , m_write16(nullptr)
+ , m_read32(nullptr)
+ , m_write32(nullptr)
+ , m_interrupt(nullptr)
+ , m_nocode(nullptr)
+ , m_out_of_cycles(nullptr)
, m_debugger_temp(0)
{
m_isdrc = (mconfig.options().drc() && !mconfig.m_force_no_drc) ? true : false;
@@ -214,21 +214,21 @@ sh2_device::sh2_device(const machine_config &mconfig, device_type type, const ch
, m_is_slave(0)
, m_cpu_type(cpu_type)
, m_cache(CACHE_SIZE + sizeof(internal_sh2_state))
- , m_drcuml(NULL)
+ , m_drcuml(nullptr)
// , m_drcuml(*this, m_cache, 0, 1, 32, 1)
- , m_drcfe(NULL)
+ , m_drcfe(nullptr)
, m_drcoptions(0)
- , m_sh2_state(NULL)
- , m_entry(NULL)
- , m_read8(NULL)
- , m_write8(NULL)
- , m_read16(NULL)
- , m_write16(NULL)
- , m_read32(NULL)
- , m_write32(NULL)
- , m_interrupt(NULL)
- , m_nocode(NULL)
- , m_out_of_cycles(NULL)
+ , m_sh2_state(nullptr)
+ , m_entry(nullptr)
+ , m_read8(nullptr)
+ , m_write8(nullptr)
+ , m_read16(nullptr)
+ , m_write16(nullptr)
+ , m_read32(nullptr)
+ , m_write32(nullptr)
+ , m_interrupt(nullptr)
+ , m_nocode(nullptr)
+ , m_out_of_cycles(nullptr)
{
m_isdrc = (mconfig.options().drc() && !mconfig.m_force_no_drc) ? true : false;
}
@@ -248,8 +248,8 @@ const address_space_config *sh2_device::memory_space_config(address_spacenum spa
switch(spacenum)
{
case AS_PROGRAM: return &m_program_config;
- case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_decrypted_program_config : NULL;
- default: return NULL;
+ case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_decrypted_program_config : nullptr;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/sh2/sh2drc.cpp b/src/devices/cpu/sh2/sh2drc.cpp
index 4069f3287c7..6f112eb0db5 100644
--- a/src/devices/cpu/sh2/sh2drc.cpp
+++ b/src/devices/cpu/sh2/sh2drc.cpp
@@ -75,7 +75,7 @@ UINT32 sh2_device::epc(const opcode_desc *desc)
void sh2_device::alloc_handle(drcuml_state *drcuml, code_handle **handleptr, const char *name)
{
- if (*handleptr == NULL)
+ if (*handleptr == nullptr)
*handleptr = drcuml->handle_alloc(name);
}
@@ -688,7 +688,7 @@ void sh2_device::code_compile_block(UINT8 mode, offs_t pc)
block = drcuml->begin_block(4096);
/* loop until we get through all instruction sequences */
- for (seqhead = desclist; seqhead != NULL; seqhead = seqlast->next())
+ for (seqhead = desclist; seqhead != nullptr; seqhead = seqlast->next())
{
const opcode_desc *curdesc;
UINT32 nextpc;
@@ -698,10 +698,10 @@ void sh2_device::code_compile_block(UINT8 mode, offs_t pc)
block->append_comment("-------------------------"); // comment
/* determine the last instruction in this sequence */
- for (seqlast = seqhead; seqlast != NULL; seqlast = seqlast->next())
+ for (seqlast = seqhead; seqlast != nullptr; seqlast = seqlast->next())
if (seqlast->flags & OPFLAG_END_SEQUENCE)
break;
- assert(seqlast != NULL);
+ assert(seqlast != nullptr);
/* if we don't have a hash for this mode/pc, or if we are overriding all, add one */
if (override || !drcuml->hash_exists(mode, seqhead->pc))
@@ -725,7 +725,7 @@ void sh2_device::code_compile_block(UINT8 mode, offs_t pc)
}
/* validate this code block if we're not pointing into ROM */
- if (m_program->get_write_ptr(seqhead->physpc) != NULL)
+ if (m_program->get_write_ptr(seqhead->physpc) != nullptr)
generate_checksum_block(block, &compiler, seqhead, seqlast);
/* label this instruction, if it may be jumped to locally */
@@ -755,7 +755,7 @@ void sh2_device::code_compile_block(UINT8 mode, offs_t pc)
generate_update_cycles(block, &compiler, nextpc, TRUE); // <subtract cycles>
/* SH2 has no modes */
- if (seqlast->next() == NULL || seqlast->next()->pc != nextpc)
+ if (seqlast->next() == nullptr || seqlast->next()->pc != nextpc)
{
UML_HASHJMP(block, 0, nextpc, *m_nocode);
}
@@ -935,20 +935,20 @@ void sh2_device::static_generate_memory_accessor(int size, int iswrite, const ch
UML_LABEL(block, label++); // label:
- for (int ramnum = 0; ramnum < SH2_MAX_FASTRAM; ramnum++)
+ for (auto & elem : m_fastram)
{
- if (m_fastram[ramnum].base != NULL && (!iswrite || !m_fastram[ramnum].readonly))
+ if (elem.base != nullptr && (!iswrite || !elem.readonly))
{
- void *fastbase = (UINT8 *)m_fastram[ramnum].base - m_fastram[ramnum].start;
+ void *fastbase = (UINT8 *)elem.base - elem.start;
UINT32 skip = label++;
- if (m_fastram[ramnum].end != 0xffffffff)
+ if (elem.end != 0xffffffff)
{
- UML_CMP(block, I0, m_fastram[ramnum].end); // cmp i0,end
+ UML_CMP(block, I0, elem.end); // cmp i0,end
UML_JMPc(block, COND_A, skip); // ja skip
}
- if (m_fastram[ramnum].start != 0x00000000)
+ if (elem.start != 0x00000000)
{
- UML_CMP(block, I0, m_fastram[ramnum].start);// cmp i0,fastram_start
+ UML_CMP(block, I0, elem.start);// cmp i0,fastram_start
UML_JMPc(block, COND_B, skip); // jb skip
}
@@ -1109,7 +1109,7 @@ void sh2_device::log_register_list(drcuml_state *drcuml, const char *string, con
if (reglist[0] & REGFLAG_R(regnum))
{
drcuml->log_printf("%sr%d", (count++ == 0) ? "" : ",", regnum);
- if (regnostarlist != NULL && !(regnostarlist[0] & REGFLAG_R(regnum)))
+ if (regnostarlist != nullptr && !(regnostarlist[0] & REGFLAG_R(regnum)))
drcuml->log_printf("*");
}
}
@@ -1117,42 +1117,42 @@ void sh2_device::log_register_list(drcuml_state *drcuml, const char *string, con
if (reglist[1] & REGFLAG_PR)
{
drcuml->log_printf("%spr", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_PR))
+ if (regnostarlist != nullptr && !(regnostarlist[1] & REGFLAG_PR))
drcuml->log_printf("*");
}
if (reglist[1] & REGFLAG_SR)
{
drcuml->log_printf("%ssr", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_SR))
+ if (regnostarlist != nullptr && !(regnostarlist[1] & REGFLAG_SR))
drcuml->log_printf("*");
}
if (reglist[1] & REGFLAG_MACL)
{
drcuml->log_printf("%smacl", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_MACL))
+ if (regnostarlist != nullptr && !(regnostarlist[1] & REGFLAG_MACL))
drcuml->log_printf("*");
}
if (reglist[1] & REGFLAG_MACH)
{
drcuml->log_printf("%smach", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_MACH))
+ if (regnostarlist != nullptr && !(regnostarlist[1] & REGFLAG_MACH))
drcuml->log_printf("*");
}
if (reglist[1] & REGFLAG_GBR)
{
drcuml->log_printf("%sgbr", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_GBR))
+ if (regnostarlist != nullptr && !(regnostarlist[1] & REGFLAG_GBR))
drcuml->log_printf("*");
}
if (reglist[1] & REGFLAG_VBR)
{
drcuml->log_printf("%svbr", (count++ == 0) ? "" : ",");
- if (regnostarlist != NULL && !(regnostarlist[1] & REGFLAG_VBR))
+ if (regnostarlist != nullptr && !(regnostarlist[1] & REGFLAG_VBR))
drcuml->log_printf("*");
}
@@ -1170,7 +1170,7 @@ void sh2_device::log_opcode_desc(drcuml_state *drcuml, const opcode_desc *descli
drcuml->log_printf("\nDescriptor list @ %08X\n", desclist->pc);
/* output each descriptor */
- for ( ; desclist != NULL; desclist = desclist->next())
+ for ( ; desclist != nullptr; desclist = desclist->next())
{
char buffer[100];
@@ -1187,12 +1187,12 @@ void sh2_device::log_opcode_desc(drcuml_state *drcuml, const opcode_desc *descli
drcuml->log_printf("%08X [%08X] t:%08X f:%s: %-30s", desclist->pc, desclist->physpc, desclist->targetpc, log_desc_flags_to_string(desclist->flags), buffer);
/* output register states */
- log_register_list(drcuml, "use", desclist->regin, NULL);
+ log_register_list(drcuml, "use", desclist->regin, nullptr);
log_register_list(drcuml, "mod", desclist->regout, desclist->regreq);
drcuml->log_printf("\n");
/* if we have a delay slot, output it recursively */
- if (desclist->delay.first() != NULL)
+ if (desclist->delay.first() != nullptr)
log_opcode_desc(drcuml, desclist->delay.first(), indent + 1);
/* at the end of a sequence add a dividing line */
@@ -1306,7 +1306,7 @@ void sh2_device::generate_checksum_block(drcuml_block *block, compiler_state *co
block->append_comment("[Validation for %08X]", seqhead->pc); // comment
/* loose verify or single instruction: just compare and fail */
- if (!(m_drcoptions & SH2DRC_STRICT_VERIFY) || seqhead->next() == NULL)
+ if (!(m_drcoptions & SH2DRC_STRICT_VERIFY) || seqhead->next() == nullptr)
{
if (!(seqhead->flags & OPFLAG_VIRTUAL_NOOP))
{
@@ -1444,7 +1444,7 @@ void sh2_device::generate_delay_slot(drcuml_block *block, compiler_state *compil
compiler_state compiler_temp = *compiler;
/* compile the delay slot using temporary compiler state */
- assert(desc->delay.first() != NULL);
+ assert(desc->delay.first() != nullptr);
generate_sequence_instruction(block, &compiler_temp, desc->delay.first(), ovrpc); // <next instruction>
/* update the label */
diff --git a/src/devices/cpu/sh4/sh4.h b/src/devices/cpu/sh4/sh4.h
index 2078d1e6435..c2d493bd6e2 100644
--- a/src/devices/cpu/sh4/sh4.h
+++ b/src/devices/cpu/sh4/sh4.h
@@ -215,7 +215,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : nullptr); }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/sharc/sharc.cpp b/src/devices/cpu/sharc/sharc.cpp
index 702f36ebe4c..bee241441ca 100644
--- a/src/devices/cpu/sharc/sharc.cpp
+++ b/src/devices/cpu/sharc/sharc.cpp
@@ -326,19 +326,19 @@ void adsp21062_device::device_start()
m_delayed_iop_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(adsp21062_device::sharc_iop_delayed_write_callback), this));
- for (int i=0; i < 12; i++)
+ for (auto & elem : m_dma_op)
{
- m_dma_op[i].src = 0;
- m_dma_op[i].dst = 0;
- m_dma_op[i].chain_ptr = 0;
- m_dma_op[i].src_modifier = 0;
- m_dma_op[i].dst_modifier = 0;
- m_dma_op[i].src_count = 0;
- m_dma_op[i].dst_count = 0;
- m_dma_op[i].pmode = 0;
- m_dma_op[i].chained_direction = 0;
- m_dma_op[i].active = false;
- m_dma_op[i].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(adsp21062_device::sharc_dma_callback), this));
+ elem.src = 0;
+ elem.dst = 0;
+ elem.chain_ptr = 0;
+ elem.src_modifier = 0;
+ elem.dst_modifier = 0;
+ elem.src_count = 0;
+ elem.dst_count = 0;
+ elem.pmode = 0;
+ elem.chained_direction = 0;
+ elem.active = false;
+ elem.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(adsp21062_device::sharc_dma_callback), this));
}
for (int i=0; i < 16; i++)
@@ -348,9 +348,9 @@ void adsp21062_device::device_start()
}
m_mrf = 0;
m_mrb = 0;
- for (int i=0; i < 32; i++)
+ for (auto & elem : m_pcstack)
{
- m_pcstack[i] = 0;
+ elem = 0;
}
for (int i=0; i < 6; i++)
{
@@ -368,17 +368,17 @@ void adsp21062_device::device_start()
m_dag1_alt.i[i] = m_dag1_alt.m[i] = m_dag1_alt.b[i] = m_dag1_alt.l[i] = 0;
m_dag2_alt.i[i] = m_dag2_alt.m[i] = m_dag2_alt.b[i] = m_dag2_alt.l[i] = 0;
}
- for (int i=0; i < 12; i++)
+ for (auto & elem : m_dma)
{
- m_dma[i].control = 0;
- m_dma[i].int_index = 0;
- m_dma[i].int_modifier = 0;
- m_dma[i].int_count = 0;
- m_dma[i].chain_ptr = 0;
- m_dma[i].gen_purpose = 0;
- m_dma[i].ext_index = 0;
- m_dma[i].ext_modifier = 0;
- m_dma[i].ext_count = 0;
+ elem.control = 0;
+ elem.int_index = 0;
+ elem.int_modifier = 0;
+ elem.int_count = 0;
+ elem.chain_ptr = 0;
+ elem.gen_purpose = 0;
+ elem.ext_index = 0;
+ elem.ext_modifier = 0;
+ elem.ext_count = 0;
}
m_mode1 = 0;
m_mode2 = 0;
@@ -391,10 +391,10 @@ void adsp21062_device::device_start()
m_flag[0] = m_flag[1] = m_flag[2] = m_flag[3] = 0;
m_syscon = 0;
m_sysstat = 0;
- for (int i=0; i < 5; i++)
+ for (auto & elem : m_status_stack)
{
- m_status_stack[i].mode1 = 0;
- m_status_stack[i].astat = 0;
+ elem.mode1 = 0;
+ elem.astat = 0;
}
m_status_stkp = 0;
m_px = 0;
diff --git a/src/devices/cpu/sharc/sharc.h b/src/devices/cpu/sharc/sharc.h
index 52f6d91ecd9..9823cccc931 100644
--- a/src/devices/cpu/sharc/sharc.h
+++ b/src/devices/cpu/sharc/sharc.h
@@ -104,7 +104,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
virtual bool memory_read(address_spacenum spacenum, offs_t offset, int size, UINT64 &value);
virtual bool memory_readop(offs_t offset, int size, UINT64 &value);
diff --git a/src/devices/cpu/sharc/sharcops.inc b/src/devices/cpu/sharc/sharcops.inc
index f36454f1805..5d3f70b7c04 100644
--- a/src/devices/cpu/sharc/sharcops.inc
+++ b/src/devices/cpu/sharc/sharcops.inc
@@ -2761,7 +2761,7 @@ void adsp21062_device::sharcop_unimplemented()
{
extern CPU_DISASSEMBLE(sharc);
char dasm[1000];
- CPU_DISASSEMBLE_NAME(sharc)(NULL, dasm, m_pc, NULL, NULL, 0);
+ CPU_DISASSEMBLE_NAME(sharc)(nullptr, dasm, m_pc, nullptr, nullptr, 0);
osd_printf_debug("SHARC: %08X: %s\n", m_pc, dasm);
fatalerror("SHARC: Unimplemented opcode %04X%08X at %08X\n", (UINT16)(m_opcode >> 32), (UINT32)(m_opcode), m_pc);
}
diff --git a/src/devices/cpu/sm510/sm510.cpp b/src/devices/cpu/sm510/sm510.cpp
index ef4f704590b..9f6b7beee30 100644
--- a/src/devices/cpu/sm510/sm510.cpp
+++ b/src/devices/cpu/sm510/sm510.cpp
@@ -166,7 +166,7 @@ void sm510_base_device::device_reset()
inline UINT16 sm510_base_device::get_lcd_row(int column, UINT8* ram)
{
// output 0 if lcd blackpate/bleeder is off, or in case row doesn't exist
- if (ram == NULL || m_bc || !m_bp)
+ if (ram == nullptr || m_bc || !m_bp)
return 0;
UINT16 rowdata = 0;
diff --git a/src/devices/cpu/sm510/sm510.h b/src/devices/cpu/sm510/sm510.h
index 8dd7446b884..dbedc0a1d8b 100644
--- a/src/devices/cpu/sm510/sm510.h
+++ b/src/devices/cpu/sm510/sm510.h
@@ -112,7 +112,7 @@ protected:
virtual void execute_one() { } // -> child class
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
diff --git a/src/devices/cpu/sm510/sm510d.cpp b/src/devices/cpu/sm510/sm510d.cpp
index 70e6b2c8ed6..2ab48984ee0 100644
--- a/src/devices/cpu/sm510/sm510d.cpp
+++ b/src/devices/cpu/sm510/sm510d.cpp
@@ -169,7 +169,7 @@ static const UINT8 sm510_mnemonic[0x100] =
CPU_DISASSEMBLE(sm510)
{
- return sm510_common_disasm(sm510_mnemonic, NULL, buffer, pc, oprom, opram);
+ return sm510_common_disasm(sm510_mnemonic, nullptr, buffer, pc, oprom, opram);
}
diff --git a/src/devices/cpu/sm8500/sm8500.cpp b/src/devices/cpu/sm8500/sm8500.cpp
index 13b32447714..11fc61132fc 100644
--- a/src/devices/cpu/sm8500/sm8500.cpp
+++ b/src/devices/cpu/sm8500/sm8500.cpp
@@ -198,9 +198,9 @@ void sm8500_cpu_device::state_string_export(const device_state_entry &entry, std
void sm8500_cpu_device::device_reset()
{
- for ( int i = 0; i < 0x108; i++ )
+ for (auto & elem : m_register_ram)
{
- m_register_ram[i] = 0;
+ elem = 0;
}
m_PC = 0x1020;
diff --git a/src/devices/cpu/sm8500/sm8500.h b/src/devices/cpu/sm8500/sm8500.h
index 7cd7df8f6f4..50d1d08d9e3 100644
--- a/src/devices/cpu/sm8500/sm8500.h
+++ b/src/devices/cpu/sm8500/sm8500.h
@@ -68,7 +68,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/spc700/spc700.h b/src/devices/cpu/spc700/spc700.h
index 7177e2a6534..cc99d750cf1 100644
--- a/src/devices/cpu/spc700/spc700.h
+++ b/src/devices/cpu/spc700/spc700.h
@@ -25,7 +25,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/ssem/ssem.cpp b/src/devices/cpu/ssem/ssem.cpp
index 0b2af498b95..10ac5471e4d 100644
--- a/src/devices/cpu/ssem/ssem.cpp
+++ b/src/devices/cpu/ssem/ssem.cpp
@@ -140,7 +140,7 @@ const address_space_config *ssem_device::memory_space_config(address_spacenum sp
{
return &m_program_config;
}
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/cpu/ssp1601/ssp1601.cpp b/src/devices/cpu/ssp1601/ssp1601.cpp
index fb15aa3d84e..945eb7d4499 100644
--- a/src/devices/cpu/ssp1601/ssp1601.cpp
+++ b/src/devices/cpu/ssp1601/ssp1601.cpp
@@ -347,7 +347,7 @@ UINT32 ssp1601_device::ptr1_read_(int ri, int isj2, int modi3)
{
//int t = (op&3) | ((op>>6)&4) | ((op<<1)&0x18);
UINT32 mask, add = 0, t = ri | isj2 | modi3;
- unsigned char *rp = NULL;
+ unsigned char *rp = nullptr;
switch (t)
{
// mod=0 (00)
@@ -504,9 +504,9 @@ void ssp1601_device::device_start()
m_r[i] = 0;
}
memset( m_RAM, 0, sizeof(m_RAM));
- for ( int i = 0; i < 6; i++ )
+ for (auto & elem : m_stack)
{
- m_stack[i] = 0;
+ elem = 0;
}
m_ppc.d = 0;
m_g_cycles = 0;
diff --git a/src/devices/cpu/ssp1601/ssp1601.h b/src/devices/cpu/ssp1601/ssp1601.h
index ef400cac42b..3370ccffc46 100644
--- a/src/devices/cpu/ssp1601/ssp1601.h
+++ b/src/devices/cpu/ssp1601/ssp1601.h
@@ -37,7 +37,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/superfx/superfx.cpp b/src/devices/cpu/superfx/superfx.cpp
index ecdae33a1b0..eb5f04278d3 100644
--- a/src/devices/cpu/superfx/superfx.cpp
+++ b/src/devices/cpu/superfx/superfx.cpp
@@ -573,9 +573,9 @@ void superfx_device::add_clocks(INT32 clocks)
void superfx_device::device_start()
{
- for(int i = 0; i < 16; i++)
+ for(auto & elem : m_r)
{
- m_r[i] = 0;
+ elem = 0;
}
m_sfr = 0;
diff --git a/src/devices/cpu/superfx/superfx.h b/src/devices/cpu/superfx/superfx.h
index 8c3a8b3d2bd..9c18b07d375 100644
--- a/src/devices/cpu/superfx/superfx.h
+++ b/src/devices/cpu/superfx/superfx.h
@@ -117,7 +117,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/t11/t11.h b/src/devices/cpu/t11/t11.h
index 45c4ca86c5f..2641f5d36ec 100644
--- a/src/devices/cpu/t11/t11.h
+++ b/src/devices/cpu/t11/t11.h
@@ -56,7 +56,7 @@ protected:
virtual UINT32 execute_default_irq_vector() const { return -1; };
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/tlcs90/tlcs90.cpp b/src/devices/cpu/tlcs90/tlcs90.cpp
index 1e3d5dde80a..aec1191f4ae 100644
--- a/src/devices/cpu/tlcs90/tlcs90.cpp
+++ b/src/devices/cpu/tlcs90/tlcs90.cpp
@@ -983,7 +983,7 @@ const char *tlcs90_device::internal_registers_names(UINT16 x)
int ir = x - T90_IOBASE;
if ( ir >= 0 && ir < ARRAY_LENGTH(ir_names) )
return ir_names[ir];
- return NULL;
+ return nullptr;
}
int tlcs90_device::sprint_arg(char *buffer, UINT32 pc, const char *pre, const e_mode mode, const UINT16 r, const UINT16 rb)
{
@@ -2496,7 +2496,7 @@ TIMER_CALLBACK_MEMBER( tlcs90_device::t90_timer4_callback )
// Overflow
- if ( m_timer_value == 0 )
+ if ( m_timer_value == nullptr )
{
// logerror("CPU Timer 4 overflow\n");
}
diff --git a/src/devices/cpu/tlcs90/tlcs90.h b/src/devices/cpu/tlcs90/tlcs90.h
index 5e379cb4425..017abfb3485 100644
--- a/src/devices/cpu/tlcs90/tlcs90.h
+++ b/src/devices/cpu/tlcs90/tlcs90.h
@@ -48,7 +48,7 @@ protected:
virtual void execute_burn(INT32 cycles);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/tlcs900/900tbl.inc b/src/devices/cpu/tlcs900/900tbl.inc
index 2e66f1cf6c9..551e27770c4 100644
--- a/src/devices/cpu/tlcs900/900tbl.inc
+++ b/src/devices/cpu/tlcs900/900tbl.inc
@@ -5470,7 +5470,7 @@ void tlcs900h_device::_B8()
void tlcs900h_device::_C0()
{
const tlcs900inst *inst;
- UINT32 *reg = NULL;
+ UINT32 *reg = nullptr;
switch ( m_op & 0x07 )
{
@@ -5599,7 +5599,7 @@ void tlcs900h_device::oC8()
void tlcs900h_device::_D0()
{
const tlcs900inst *inst;
- UINT32 *reg = NULL;
+ UINT32 *reg = nullptr;
switch ( m_op & 0x07 )
{
@@ -5726,7 +5726,7 @@ void tlcs900h_device::oD8()
void tlcs900h_device::_E0()
{
const tlcs900inst *inst;
- UINT32 *reg = NULL;
+ UINT32 *reg = nullptr;
switch ( m_op & 0x07 )
{
@@ -5851,7 +5851,7 @@ void tlcs900h_device::_E8()
void tlcs900h_device::_F0()
{
const tlcs900inst *inst;
- UINT32 *reg = NULL;
+ UINT32 *reg = nullptr;
switch ( m_op & 0x07 )
{
diff --git a/src/devices/cpu/tlcs900/tlcs900.h b/src/devices/cpu/tlcs900/tlcs900.h
index e8235ae5cb5..507d559d297 100644
--- a/src/devices/cpu/tlcs900/tlcs900.h
+++ b/src/devices/cpu/tlcs900/tlcs900.h
@@ -68,7 +68,7 @@ protected:
// device_memory_interface overrides
virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : NULL;
+ return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
}
// device_state_interface overrides
diff --git a/src/devices/cpu/tms0980/tms0980.cpp b/src/devices/cpu/tms0980/tms0980.cpp
index e487564ef23..3cb9f2a0800 100644
--- a/src/devices/cpu/tms0980/tms0980.cpp
+++ b/src/devices/cpu/tms0980/tms0980.cpp
@@ -887,7 +887,7 @@ void tms0980_cpu_device::read_opcode()
void tms1xxx_cpu_device::write_o_output(UINT8 index)
{
// a hardcoded table is supported if the output pla is unknown
- m_o = (m_output_pla_table == NULL) ? m_opla->read(index) : m_output_pla_table[index];
+ m_o = (m_output_pla_table == nullptr) ? m_opla->read(index) : m_output_pla_table[index];
m_write_o(0, m_o & m_o_mask, 0xffff);
}
diff --git a/src/devices/cpu/tms0980/tms0980.h b/src/devices/cpu/tms0980/tms0980.h
index 7101a614e2f..cf21e0564fd 100644
--- a/src/devices/cpu/tms0980/tms0980.h
+++ b/src/devices/cpu/tms0980/tms0980.h
@@ -105,7 +105,7 @@ public:
, m_pc_bits(pc_bits)
, m_byte_bits(byte_bits)
, m_x_bits(x_bits)
- , m_output_pla_table(NULL)
+ , m_output_pla_table(nullptr)
, m_read_k(*this)
, m_write_o(*this)
, m_write_r(*this)
@@ -131,7 +131,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
diff --git a/src/devices/cpu/tms32010/32010dsm.cpp b/src/devices/cpu/tms32010/32010dsm.cpp
index a4c0fd5294c..b228de9693e 100644
--- a/src/devices/cpu/tms32010/32010dsm.cpp
+++ b/src/devices/cpu/tms32010/32010dsm.cpp
@@ -153,7 +153,7 @@ static const char *const TMS32010Formats[] = {
FMT("1111110100000000bbbbbbbbbbbbbbbb", "bgez %B"),
FMT("1111111000000000bbbbbbbbbbbbbbbb", "bnz %B"),
FMT("1111111100000000bbbbbbbbbbbbbbbb", "bz %B"),
- NULL
+ nullptr
};
#define MAX_OPS ((ARRAY_LENGTH(TMS32010Formats) - 1) / PTRS_PER_FORMAT)
diff --git a/src/devices/cpu/tms32010/tms32010.h b/src/devices/cpu/tms32010/tms32010.h
index 6059d1efa57..a5ea27871be 100644
--- a/src/devices/cpu/tms32010/tms32010.h
+++ b/src/devices/cpu/tms32010/tms32010.h
@@ -69,7 +69,7 @@ protected:
virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const { return (cycles * 4); }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) ); }
// device_state_interface overrides
void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/tms32025/32025dsm.cpp b/src/devices/cpu/tms32025/32025dsm.cpp
index d266c468d65..d87fc55e6cf 100644
--- a/src/devices/cpu/tms32025/32025dsm.cpp
+++ b/src/devices/cpu/tms32025/32025dsm.cpp
@@ -313,7 +313,7 @@ static const char *const TMS32025Formats[] = {
FMT("111111011mmmnnnnbbbbbbbbbbbbbbbb", "blkd %B,%M%N"),
FMT("111111101mmmnnnnbbbbbbbbbbbbbbbb", "call %B %M%N"), /* FExx */
FMT("111111111mmmnnnnbbbbbbbbbbbbbbbb", "b %B %M%N"), /* FFxx */
- NULL
+ nullptr
};
#define MAX_OPS ((ARRAY_LENGTH(TMS32025Formats) - 1) / PTRS_PER_FORMAT)
diff --git a/src/devices/cpu/tms32025/tms32025.cpp b/src/devices/cpu/tms32025/tms32025.cpp
index 9acc4a31f8c..e9226c86165 100644
--- a/src/devices/cpu/tms32025/tms32025.cpp
+++ b/src/devices/cpu/tms32025/tms32025.cpp
@@ -799,14 +799,14 @@ void tms32025_device::cnfd() /** next two fetches need to use previous CNF valu
CLR1(CNF0_REG);
m_datamap[4] = &m_intRAM[0x200]; /* B0 */
m_datamap[5] = &m_intRAM[0x280]; /* B0 */
- m_pgmmap[510] = NULL;
- m_pgmmap[511] = NULL;
+ m_pgmmap[510] = nullptr;
+ m_pgmmap[511] = nullptr;
}
void tms32025_device::cnfp() /** next two fetches need to use previous CNF value ! **/
{
SET1(CNF0_REG);
- m_datamap[4] = NULL; /* B0 */
- m_datamap[5] = NULL; /* B0 */
+ m_datamap[4] = nullptr; /* B0 */
+ m_datamap[5] = nullptr; /* B0 */
m_pgmmap[510] = &m_intRAM[0x200];
m_pgmmap[511] = &m_intRAM[0x280];
}
@@ -827,25 +827,25 @@ void tms32025_device::conf() /** Need to reconfigure the memory blocks */
m_datamap[13] = &m_intRAM[0x680]; /* B3 */
m_datamap[14] = &m_intRAM[0x700]; /* B3 */
m_datamap[15] = &m_intRAM[0x780]; /* B3 */
- m_pgmmap[500] = NULL;
- m_pgmmap[501] = NULL;
- m_pgmmap[502] = NULL;
- m_pgmmap[503] = NULL;
- m_pgmmap[504] = NULL;
- m_pgmmap[505] = NULL;
- m_pgmmap[506] = NULL;
- m_pgmmap[507] = NULL;
- m_pgmmap[508] = NULL;
- m_pgmmap[509] = NULL;
- m_pgmmap[510] = NULL;
- m_pgmmap[511] = NULL;
+ m_pgmmap[500] = nullptr;
+ m_pgmmap[501] = nullptr;
+ m_pgmmap[502] = nullptr;
+ m_pgmmap[503] = nullptr;
+ m_pgmmap[504] = nullptr;
+ m_pgmmap[505] = nullptr;
+ m_pgmmap[506] = nullptr;
+ m_pgmmap[507] = nullptr;
+ m_pgmmap[508] = nullptr;
+ m_pgmmap[509] = nullptr;
+ m_pgmmap[510] = nullptr;
+ m_pgmmap[511] = nullptr;
break;
case 01: CLR1(CNF1_REG); SET1(CNF0_REG);
- m_datamap[4] = NULL;
- m_datamap[5] = NULL;
- m_datamap[6] = NULL;
- m_datamap[7] = NULL;
+ m_datamap[4] = nullptr;
+ m_datamap[5] = nullptr;
+ m_datamap[6] = nullptr;
+ m_datamap[7] = nullptr;
m_datamap[8] = &m_intRAM[0x400]; /* B1 */
m_datamap[9] = &m_intRAM[0x480]; /* B1 */
m_datamap[10] = &m_intRAM[0x500]; /* B1 */
@@ -858,25 +858,25 @@ void tms32025_device::conf() /** Need to reconfigure the memory blocks */
m_pgmmap[501] = &m_intRAM[0x280]; /* B0 */
m_pgmmap[502] = &m_intRAM[0x300]; /* B0 */
m_pgmmap[503] = &m_intRAM[0x380]; /* B0 */
- m_pgmmap[504] = NULL;
- m_pgmmap[505] = NULL;
- m_pgmmap[506] = NULL;
- m_pgmmap[507] = NULL;
- m_pgmmap[508] = NULL;
- m_pgmmap[509] = NULL;
- m_pgmmap[510] = NULL;
- m_pgmmap[511] = NULL;
+ m_pgmmap[504] = nullptr;
+ m_pgmmap[505] = nullptr;
+ m_pgmmap[506] = nullptr;
+ m_pgmmap[507] = nullptr;
+ m_pgmmap[508] = nullptr;
+ m_pgmmap[509] = nullptr;
+ m_pgmmap[510] = nullptr;
+ m_pgmmap[511] = nullptr;
break;
case 02: SET1(CNF1_REG); CLR1(CNF0_REG);
- m_datamap[4] = NULL;
- m_datamap[5] = NULL;
- m_datamap[6] = NULL;
- m_datamap[7] = NULL;
- m_datamap[8] = NULL;
- m_datamap[9] = NULL;
- m_datamap[10] = NULL;
- m_datamap[11] = NULL;
+ m_datamap[4] = nullptr;
+ m_datamap[5] = nullptr;
+ m_datamap[6] = nullptr;
+ m_datamap[7] = nullptr;
+ m_datamap[8] = nullptr;
+ m_datamap[9] = nullptr;
+ m_datamap[10] = nullptr;
+ m_datamap[11] = nullptr;
m_datamap[12] = &m_intRAM[0x600]; /* B3 */
m_datamap[13] = &m_intRAM[0x680]; /* B3 */
m_datamap[14] = &m_intRAM[0x700]; /* B3 */
@@ -889,25 +889,25 @@ void tms32025_device::conf() /** Need to reconfigure the memory blocks */
m_pgmmap[505] = &m_intRAM[0x480]; /* B1 */
m_pgmmap[506] = &m_intRAM[0x500]; /* B1 */
m_pgmmap[507] = &m_intRAM[0x580]; /* B1 */
- m_pgmmap[508] = NULL;
- m_pgmmap[509] = NULL;
- m_pgmmap[510] = NULL;
- m_pgmmap[511] = NULL;
+ m_pgmmap[508] = nullptr;
+ m_pgmmap[509] = nullptr;
+ m_pgmmap[510] = nullptr;
+ m_pgmmap[511] = nullptr;
break;
case 03: SET1(CNF1_REG); SET1(CNF0_REG);
- m_datamap[4] = NULL;
- m_datamap[5] = NULL;
- m_datamap[6] = NULL;
- m_datamap[7] = NULL;
- m_datamap[8] = NULL;
- m_datamap[9] = NULL;
- m_datamap[10] = NULL;
- m_datamap[11] = NULL;
- m_datamap[12] = NULL;
- m_datamap[13] = NULL;
- m_datamap[14] = NULL;
- m_datamap[15] = NULL;
+ m_datamap[4] = nullptr;
+ m_datamap[5] = nullptr;
+ m_datamap[6] = nullptr;
+ m_datamap[7] = nullptr;
+ m_datamap[8] = nullptr;
+ m_datamap[9] = nullptr;
+ m_datamap[10] = nullptr;
+ m_datamap[11] = nullptr;
+ m_datamap[12] = nullptr;
+ m_datamap[13] = nullptr;
+ m_datamap[14] = nullptr;
+ m_datamap[15] = nullptr;
m_pgmmap[500] = &m_intRAM[0x200]; /* B0 */
m_pgmmap[501] = &m_intRAM[0x280]; /* B0 */
m_pgmmap[502] = &m_intRAM[0x300]; /* B0 */
@@ -2187,7 +2187,7 @@ bool tms32025_device::memory_readop(offs_t offset, int size, UINT64 &value)
****************************************************************************/
bool tms32025_device::memory_read(address_spacenum spacenum, offs_t offset, int size, UINT64 &value)
{
- void *ptr = NULL;
+ void *ptr = nullptr;
UINT64 temp = 0;
switch (spacenum)
@@ -2239,7 +2239,7 @@ bool tms32025_device::memory_read(address_spacenum spacenum, offs_t offset, int
****************************************************************************/
bool tms32025_device::memory_write(address_spacenum spacenum, offs_t offset, int size, UINT64 value)
{
- void *ptr = NULL;
+ void *ptr = nullptr;
switch (spacenum)
{
diff --git a/src/devices/cpu/tms32025/tms32025.h b/src/devices/cpu/tms32025/tms32025.h
index 5992012d08e..05743ddc9f1 100644
--- a/src/devices/cpu/tms32025/tms32025.h
+++ b/src/devices/cpu/tms32025/tms32025.h
@@ -89,7 +89,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ) ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) ); }
virtual bool memory_read(address_spacenum spacenum, offs_t offset, int size, UINT64 &value);
virtual bool memory_write(address_spacenum spacenum, offs_t offset, int size, UINT64 value);
virtual bool memory_readop(offs_t offset, int size, UINT64 &value);
diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp
index 9bfe152b1e0..d391285f314 100644
--- a/src/devices/cpu/tms32031/tms32031.cpp
+++ b/src/devices/cpu/tms32031/tms32031.cpp
@@ -262,8 +262,8 @@ tms3203x_device::tms3203x_device(const machine_config &mconfig, device_type type
m_irq_pending(false),
m_is_idling(false),
m_icount(0),
- m_program(0),
- m_direct(0),
+ m_program(nullptr),
+ m_direct(nullptr),
m_mcbl_mode(false),
m_xf0_cb(*this),
m_xf1_cb(*this),
@@ -468,7 +468,7 @@ void tms3203x_device::device_reset()
const address_space_config *tms3203x_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : NULL;
+ return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
}
diff --git a/src/devices/cpu/tms32051/tms32051.h b/src/devices/cpu/tms32051/tms32051.h
index 43c1008d79c..1b81ae4eef5 100644
--- a/src/devices/cpu/tms32051/tms32051.h
+++ b/src/devices/cpu/tms32051/tms32051.h
@@ -75,7 +75,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
virtual bool memory_read(address_spacenum spacenum, offs_t offset, int size, UINT64 &value);
// device_disasm_interface overrides
diff --git a/src/devices/cpu/tms32082/tms32082.h b/src/devices/cpu/tms32082/tms32082.h
index 494f1580504..019a2d0bf2c 100644
--- a/src/devices/cpu/tms32082/tms32082.h
+++ b/src/devices/cpu/tms32082/tms32082.h
@@ -90,7 +90,7 @@ protected:
switch (spacenum)
{
case AS_PROGRAM: return &m_program_config;
- default: return NULL;
+ default: return nullptr;
}
}
@@ -183,7 +183,7 @@ protected:
switch (spacenum)
{
case AS_PROGRAM: return &m_program_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/tms34010/34010gfx.inc b/src/devices/cpu/tms34010/34010gfx.inc
index ce29ba91ab0..8a56f5f87d1 100644
--- a/src/devices/cpu/tms34010/34010gfx.inc
+++ b/src/devices/cpu/tms34010/34010gfx.inc
@@ -1820,7 +1820,7 @@ void FUNCTION_NAME(tms340x0_device::fill)(int dst_is_linear)
if (!dst_is_linear)
{
dstxy = DADDR_XY();
- m_gfxcycles += 2 + apply_window("FILL", 0, NULL, &dstxy, &dx, &dy);
+ m_gfxcycles += 2 + apply_window("FILL", 0, nullptr, &dstxy, &dx, &dy);
daddr = DXYTOL(dstxy);
}
else
diff --git a/src/devices/cpu/tms34010/tms34010.cpp b/src/devices/cpu/tms34010/tms34010.cpp
index 32b15b13cd7..3fffd1c03c5 100644
--- a/src/devices/cpu/tms34010/tms34010.cpp
+++ b/src/devices/cpu/tms34010/tms34010.cpp
@@ -627,10 +627,10 @@ void tms340x0_device::device_reset()
{
m_ppc = 0;
m_st = 0;
- m_pixel_write = NULL;
- m_pixel_read = NULL;
- m_raster_op = NULL;
- m_pixel_op = NULL;
+ m_pixel_write = nullptr;
+ m_pixel_read = nullptr;
+ m_raster_op = nullptr;
+ m_pixel_op = nullptr;
m_pixel_op_timing = 0;
m_convsp = 0;
m_convdp = 0;
@@ -812,14 +812,14 @@ void tms340x0_device::set_pixel_function()
const tms340x0_device::raster_op_func tms340x0_device::s_raster_ops[32] =
{
- NULL, &tms340x0_device::raster_op_1 , &tms340x0_device::raster_op_2 , &tms340x0_device::raster_op_3,
+ nullptr, &tms340x0_device::raster_op_1 , &tms340x0_device::raster_op_2 , &tms340x0_device::raster_op_3,
&tms340x0_device::raster_op_4 , &tms340x0_device::raster_op_5 , &tms340x0_device::raster_op_6 , &tms340x0_device::raster_op_7,
&tms340x0_device::raster_op_8 , &tms340x0_device::raster_op_9 , &tms340x0_device::raster_op_10, &tms340x0_device::raster_op_11,
&tms340x0_device::raster_op_12, &tms340x0_device::raster_op_13, &tms340x0_device::raster_op_14, &tms340x0_device::raster_op_15,
&tms340x0_device::raster_op_16, &tms340x0_device::raster_op_17, &tms340x0_device::raster_op_18, &tms340x0_device::raster_op_19,
- &tms340x0_device::raster_op_20, &tms340x0_device::raster_op_21, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
+ &tms340x0_device::raster_op_20, &tms340x0_device::raster_op_21, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
};
@@ -861,7 +861,7 @@ TIMER_CALLBACK_MEMBER( tms340x0_device::scanline_callback )
if (enabled && vcount == SMART_IOREG(DPYINT))
{
/* generate the display interrupt signal */
- internal_interrupt_callback(NULL, TMS34010_DI);
+ internal_interrupt_callback(nullptr, TMS34010_DI);
}
/* at the start of VBLANK, load the starting display address */
diff --git a/src/devices/cpu/tms34010/tms34010.h b/src/devices/cpu/tms34010/tms34010.h
index 70d453cda6e..1e28b8102db 100644
--- a/src/devices/cpu/tms34010/tms34010.h
+++ b/src/devices/cpu/tms34010/tms34010.h
@@ -279,7 +279,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str);
diff --git a/src/devices/cpu/tms57002/tms57002.cpp b/src/devices/cpu/tms57002/tms57002.cpp
index aa12de85d4f..f05b4cad4f1 100644
--- a/src/devices/cpu/tms57002/tms57002.cpp
+++ b/src/devices/cpu/tms57002/tms57002.cpp
@@ -912,6 +912,6 @@ const address_space_config *tms57002_device::memory_space_config(address_spacenu
switch(spacenum) {
case AS_PROGRAM: return &program_config;
case AS_DATA: return &data_config;
- default: return 0;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/tms7000/tms7000.h b/src/devices/cpu/tms7000/tms7000.h
index 92effc0d079..54c1acfb0a3 100644
--- a/src/devices/cpu/tms7000/tms7000.h
+++ b/src/devices/cpu/tms7000/tms7000.h
@@ -77,7 +77,7 @@ protected:
virtual void execute_set_input(int extline, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/tms9900/9900dasm.cpp b/src/devices/cpu/tms9900/9900dasm.cpp
index 5daf4a88310..2e2883611c2 100644
--- a/src/devices/cpu/tms9900/9900dasm.cpp
+++ b/src/devices/cpu/tms9900/9900dasm.cpp
@@ -213,7 +213,7 @@ static const description_t descriptions[144+3+1] =
{ "liim", format_liim,/*ps_tms9940*/0 }, { "dca", format_6, /*ps_tms9940*/0 },
{ "dcs", format_6, /*ps_tms9940*/0 },
- { NULL, illegal, ps_any }
+ { nullptr, illegal, ps_any }
};
@@ -484,11 +484,11 @@ unsigned Dasm9900 (char *buffer, unsigned pc, int model_id, const UINT8 *oprom,
format = descriptions[opc].format;
/* bl and blwp instructions are subroutines */
- if (mnemonic != NULL && mnemonic[0] == 'b' && mnemonic[1] == 'l')
+ if (mnemonic != nullptr && mnemonic[0] == 'b' && mnemonic[1] == 'l')
dasmflags = DASMFLAG_STEP_OVER;
/* b *r11 and rtwp are returns */
- else if (opc == 0x045b || (mnemonic != NULL && strcmp(mnemonic, "rtwp") == 0))
+ else if (opc == 0x045b || (mnemonic != nullptr && strcmp(mnemonic, "rtwp") == 0))
dasmflags = DASMFLAG_STEP_OUT;
switch (format)
diff --git a/src/devices/cpu/tms9900/ti990_10.cpp b/src/devices/cpu/tms9900/ti990_10.cpp
index b6cd8d32d41..c336d5e689a 100644
--- a/src/devices/cpu/tms9900/ti990_10.cpp
+++ b/src/devices/cpu/tms9900/ti990_10.cpp
@@ -45,8 +45,8 @@ ti990_10_device::ti990_10_device(const machine_config &mconfig, const char *tag,
: cpu_device(mconfig, TI990_10, "TI990/10 CPU", tag, owner, clock, "ti990_10_cpu", __FILE__),
m_program_config("program", ENDIANNESS_BIG, 16, 16),
m_io_config("cru", ENDIANNESS_BIG, 8, 12),
- m_prgspace(NULL),
- m_cru(NULL)
+ m_prgspace(nullptr),
+ m_cru(nullptr)
{
}
@@ -92,7 +92,7 @@ const address_space_config *ti990_10_device::memory_space_config(address_spacenu
return &m_io_config;
default:
- return NULL;
+ return nullptr;
}
}
diff --git a/src/devices/cpu/tms9900/tms9900.cpp b/src/devices/cpu/tms9900/tms9900.cpp
index 0029d9cf392..71f177809eb 100644
--- a/src/devices/cpu/tms9900/tms9900.cpp
+++ b/src/devices/cpu/tms9900/tms9900.cpp
@@ -172,8 +172,8 @@ tms99xx_device::tms99xx_device(const machine_config &mconfig, device_type type,
: cpu_device(mconfig, type, name, tag, owner, clock, shortname, source),
m_program_config("program", ENDIANNESS_BIG, databus_width, prg_addr_bits),
m_io_config("cru", ENDIANNESS_BIG, 8, cru_addr_bits),
- m_prgspace(NULL),
- m_cru(NULL),
+ m_prgspace(nullptr),
+ m_cru(nullptr),
m_prgaddr_mask((1<<prg_addr_bits)-1),
m_cruaddr_mask((1<<cru_addr_bits)-1),
m_clock_out_line(*this),
@@ -234,14 +234,14 @@ void tms99xx_device::device_start()
build_command_lookup_table();
- m_program = NULL;
+ m_program = nullptr;
}
void tms99xx_device::device_stop()
{
int k = 0;
if (TRACE_SETUP) logerror("tms99xx: Deleting lookup tables\n");
- while (m_lotables[k]!=NULL) delete[] m_lotables[k++];
+ while (m_lotables[k]!=nullptr) delete[] m_lotables[k++];
}
/*
@@ -398,7 +398,7 @@ const address_space_config *tms99xx_device::memory_space_config(address_spacenum
return &m_io_config;
default:
- return NULL;
+ return nullptr;
}
}
@@ -1053,8 +1053,8 @@ void tms99xx_device::build_command_lookup_table()
lookup_entry* table = m_command_lookup_table;
for (int j=0; j < 16; j++)
{
- table[j].entry = NULL;
- table[j].next_digit = NULL;
+ table[j].entry = nullptr;
+ table[j].next_digit = nullptr;
}
do
@@ -1069,15 +1069,15 @@ void tms99xx_device::build_command_lookup_table()
while (bitcount < format_mask_len[inst->format])
{
// Descend
- if (table[cmdindex].next_digit == NULL)
+ if (table[cmdindex].next_digit == nullptr)
{
if (TRACE_SETUP) logerror("tms99xx: create new table at bitcount=%d for index=%d\n", bitcount, cmdindex);
table[cmdindex].next_digit = new lookup_entry[16];
m_lotables[k++] = table[cmdindex].next_digit;
for (int j=0; j < 16; j++)
{
- table[cmdindex].next_digit[j].next_digit = NULL;
- table[cmdindex].next_digit[j].entry = NULL;
+ table[cmdindex].next_digit[j].next_digit = nullptr;
+ table[cmdindex].next_digit[j].entry = nullptr;
}
}
else
@@ -1107,7 +1107,7 @@ void tms99xx_device::build_command_lookup_table()
i++;
} while (inst->opcode != 0xf000);
- m_lotables[k++] = NULL;
+ m_lotables[k++] = nullptr;
if (TRACE_SETUP) logerror("tms99xx: Allocated %d tables\n", k);
}
@@ -1155,7 +1155,7 @@ void tms99xx_device::execute_run()
do
{
// Only when last instruction has completed
- if (m_program == NULL)
+ if (m_program == nullptr)
{
if (m_load_state)
{
@@ -1175,7 +1175,7 @@ void tms99xx_device::execute_run()
}
}
- if (m_program == NULL && m_idle_state)
+ if (m_program == nullptr && m_idle_state)
{
if (TRACE_WAIT) logerror("tms99xx: idle state\n");
pulse_clock(1);
@@ -1191,7 +1191,7 @@ void tms99xx_device::execute_run()
// A HOLD request is signalled through the input line HOLD.
// The hold state will be entered with the next non-memory access cycle.
if (m_hold_state &&
- (m_program==NULL ||
+ (m_program==nullptr ||
(m_program[MPC] != IAQ &&
m_program[MPC] != MEMORY_READ && m_program[MPC] != MEMORY_WRITE &&
m_program[MPC] != REG_READ && m_program[MPC] != REG_WRITE)))
@@ -1217,7 +1217,7 @@ void tms99xx_device::execute_run()
set_wait_state(false);
m_check_ready = false;
- if (m_program==NULL) m_op = IAQ;
+ if (m_program==nullptr) m_op = IAQ;
else
{
m_op = m_program[MPC];
@@ -1417,7 +1417,7 @@ void tms99xx_device::decode(UINT16 inst)
{
index = (opcode >> 12) & 0x000f;
if (TRACE_MICRO) logerror("tms99xx: Check next hex digit of instruction %x\n", index);
- if (table[index].next_digit != NULL)
+ if (table[index].next_digit != nullptr)
{
table = table[index].next_digit;
opcode = opcode << 4;
@@ -1425,14 +1425,14 @@ void tms99xx_device::decode(UINT16 inst)
else complete = true;
}
decoded = table[index].entry;
- if (decoded == NULL)
+ if (decoded == nullptr)
{
// not found
logerror("tms99xx: Illegal opcode %04x\n", inst);
IR = 0;
// This will cause another instruction acquisition in the next machine cycle
// with an asserted IAQ line (can be used to indicate this illegal opcode detection).
- m_program = NULL;
+ m_program = nullptr;
}
else
{
@@ -1661,7 +1661,7 @@ void tms99xx_device::command_completed()
if (cycles > 0 && cycles < 10000) logerror(" %d cycles", cycles);
logerror("\n");
}
- m_program = NULL;
+ m_program = nullptr;
}
/*
diff --git a/src/devices/cpu/tms9900/tms9995.cpp b/src/devices/cpu/tms9900/tms9995.cpp
index ae9248fd82d..e40cfd94280 100644
--- a/src/devices/cpu/tms9900/tms9995.cpp
+++ b/src/devices/cpu/tms9900/tms9995.cpp
@@ -183,8 +183,8 @@ tms9995_device::tms9995_device(const machine_config &mconfig, const char *tag, d
PC_debug(0),
m_program_config("program", ENDIANNESS_BIG, 8, 16),
m_io_config("cru", ENDIANNESS_BIG, 8, 16),
- m_prgspace(NULL),
- m_cru(NULL),
+ m_prgspace(nullptr),
+ m_cru(nullptr),
m_external_operation(*this),
m_iaq_line(*this),
m_clock_out_line(*this),
@@ -205,8 +205,8 @@ tms9995_device::tms9995_device(const machine_config &mconfig, device_type type,
PC_debug(0),
m_program_config("program", ENDIANNESS_BIG, 8, 16),
m_io_config("cru", ENDIANNESS_BIG, 8, 16),
- m_prgspace(NULL),
- m_cru(NULL),
+ m_prgspace(nullptr),
+ m_cru(nullptr),
m_external_operation(*this),
m_iaq_line(*this),
m_clock_out_line(*this),
@@ -276,7 +276,7 @@ void tms9995_device::device_stop()
{
int k = 0;
if (TRACE_CONFIG) logerror("%s: Deleting lookup tables\n", tag());
- while (m_lotables[k]!=NULL) delete[] m_lotables[k++];
+ while (m_lotables[k]!=nullptr) delete[] m_lotables[k++];
}
/*
@@ -446,7 +446,7 @@ const address_space_config *tms9995_device::memory_space_config(address_spacenum
return &m_io_config;
default:
- return NULL;
+ return nullptr;
}
}
@@ -1142,8 +1142,8 @@ void tms9995_device::build_command_lookup_table()
lookup_entry* table = m_command_lookup_table;
for (int j=0; j < 16; j++)
{
- table[j].entry = NULL;
- table[j].next_digit = NULL;
+ table[j].entry = nullptr;
+ table[j].next_digit = nullptr;
}
do
@@ -1158,15 +1158,15 @@ void tms9995_device::build_command_lookup_table()
while (bitcount < format_mask_len[inst->format])
{
// Descend
- if (table[cmdindex].next_digit == NULL)
+ if (table[cmdindex].next_digit == nullptr)
{
if (TRACE_EMU) logerror("tms9995: create new table at bitcount=%d for index=%d\n", bitcount, cmdindex);
table[cmdindex].next_digit = new lookup_entry[16];
m_lotables[k++] = table[cmdindex].next_digit;
for (int j=0; j < 16; j++)
{
- table[cmdindex].next_digit[j].next_digit = NULL;
- table[cmdindex].next_digit[j].entry = NULL;
+ table[cmdindex].next_digit[j].next_digit = nullptr;
+ table[cmdindex].next_digit[j].entry = nullptr;
}
}
else
@@ -1196,7 +1196,7 @@ void tms9995_device::build_command_lookup_table()
i++;
} while (inst->opcode != 0xf000);
- m_lotables[k++] = NULL;
+ m_lotables[k++] = nullptr;
if (TRACE_EMU) logerror("tms9995: Allocated %d tables\n", k);
}
@@ -1401,7 +1401,7 @@ void tms9995_device::decode(UINT16 inst)
{
index = (opcode >> 12) & 0x000f;
if (TRACE_EMU) logerror("tms9995: Check next hex digit of instruction %x\n", index);
- if (table[index].next_digit != NULL)
+ if (table[index].next_digit != nullptr)
{
table = table[index].next_digit;
opcode = opcode << 4;
@@ -1409,7 +1409,7 @@ void tms9995_device::decode(UINT16 inst)
else complete = true;
}
decoded = table[index].entry;
- if (decoded == NULL)
+ if (decoded == nullptr)
{
// not found
logerror("tms9995: Undefined opcode %04x at logical address %04x, will trigger MID\n", inst, PC);
diff --git a/src/devices/cpu/ucom4/ucom4.h b/src/devices/cpu/ucom4/ucom4.h
index 9b0651b6703..2df6d529274 100644
--- a/src/devices/cpu/ucom4/ucom4.h
+++ b/src/devices/cpu/ucom4/ucom4.h
@@ -150,7 +150,7 @@ protected:
virtual void execute_run();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
// device_disasm_interface overrides
virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
diff --git a/src/devices/cpu/uml.cpp b/src/devices/cpu/uml.cpp
index f7b0584431f..e01b34cdcb6 100644
--- a/src/devices/cpu/uml.cpp
+++ b/src/devices/cpu/uml.cpp
@@ -256,12 +256,12 @@ inline UINT64 rol64(UINT64 source, UINT8 count)
uml::code_handle::code_handle(drcuml_state &drcuml, const char *name)
: m_code(reinterpret_cast<drccodeptr *>(drcuml.cache().alloc_near(sizeof(drccodeptr)))),
m_string(name),
- m_next(NULL),
+ m_next(nullptr),
m_drcuml(drcuml)
{
- if (m_code == NULL)
+ if (m_code == nullptr)
throw std::bad_alloc();
- *m_code = NULL;
+ *m_code = nullptr;
}
@@ -271,7 +271,7 @@ uml::code_handle::code_handle(drcuml_state &drcuml, const char *name)
void uml::code_handle::set_codeptr(drccodeptr code)
{
- assert(*m_code == NULL);
+ assert(*m_code == nullptr);
assert_in_cache(m_drcuml.cache(), code);
*m_code = code;
}
@@ -972,7 +972,7 @@ const char *uml::instruction::disasm(std::string &buffer, drcuml_state *drcuml)
UINT32 symoffset;
// symbol
- if (drcuml != NULL && (symbol = drcuml->symbol_find(param.memory(), &symoffset)) != NULL)
+ if (drcuml != nullptr && (symbol = drcuml->symbol_find(param.memory(), &symoffset)) != nullptr)
{
if (symoffset == 0)
strcatprintf(buffer, "[%s]", symbol);
@@ -981,7 +981,7 @@ const char *uml::instruction::disasm(std::string &buffer, drcuml_state *drcuml)
}
// cache memory
- else if (drcuml != NULL && drcuml->cache().contains_pointer(param.memory()))
+ else if (drcuml != nullptr && drcuml->cache().contains_pointer(param.memory()))
strcatprintf(buffer, "[+$%X]", (UINT32)(FPTR)((drccodeptr)param.memory() - drcuml->cache().near()));
// general memory
diff --git a/src/devices/cpu/uml.h b/src/devices/cpu/uml.h
index 96960bd910e..6086320cf99 100644
--- a/src/devices/cpu/uml.h
+++ b/src/devices/cpu/uml.h
@@ -409,7 +409,7 @@ namespace uml
void set_mapvar(int paramnum, UINT32 value) { assert(paramnum < m_numparams); assert(m_param[paramnum].is_mapvar()); m_param[paramnum] = value; }
// misc
- const char *disasm(std::string &str, drcuml_state *drcuml = NULL) const;
+ const char *disasm(std::string &str, drcuml_state *drcuml = nullptr) const;
UINT8 input_flags() const;
UINT8 output_flags() const;
UINT8 modified_flags() const;
diff --git a/src/devices/cpu/unsp/unsp.h b/src/devices/cpu/unsp/unsp.h
index 219b1f6b9b0..61e6f05e685 100644
--- a/src/devices/cpu/unsp/unsp.h
+++ b/src/devices/cpu/unsp/unsp.h
@@ -68,7 +68,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/upd7725/upd7725.cpp b/src/devices/cpu/upd7725/upd7725.cpp
index a9754d52f65..5820d6fe4e0 100644
--- a/src/devices/cpu/upd7725/upd7725.cpp
+++ b/src/devices/cpu/upd7725/upd7725.cpp
@@ -29,9 +29,9 @@ necdsp_device::necdsp_device(const machine_config &mconfig, device_type type, co
m_program_config("program", ENDIANNESS_BIG, 32, abits, -2), // data bus width, address bus width, -2 means DWORD-addressable
m_data_config("data", ENDIANNESS_BIG, 16, dbits, -1), m_icount(0), // -1 for WORD-addressable
m_irq(0),
- m_program(NULL),
- m_data(NULL),
- m_direct(NULL),
+ m_program(nullptr),
+ m_data(nullptr),
+ m_direct(nullptr),
m_in_int_cb(*this),
//m_in_si_cb(*this),
//m_in_sck_cb(*this),
@@ -139,9 +139,9 @@ void necdsp_device::device_start()
void necdsp_device::device_reset()
{
- for (unsigned i = 0; i < 2048; i++)
+ for (auto & elem : dataRAM)
{
- dataRAM[i] = 0x0000;
+ elem = 0x0000;
}
regs.pc = 0x0000;
diff --git a/src/devices/cpu/upd7810/upd7810.h b/src/devices/cpu/upd7810/upd7810.h
index cdea4f376b8..8b0feb79347 100644
--- a/src/devices/cpu/upd7810/upd7810.h
+++ b/src/devices/cpu/upd7810/upd7810.h
@@ -167,7 +167,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/upd7810/upd7810_dasm.cpp b/src/devices/cpu/upd7810/upd7810_dasm.cpp
index 63e7291ff5e..a203a218462 100644
--- a/src/devices/cpu/upd7810/upd7810_dasm.cpp
+++ b/src/devices/cpu/upd7810/upd7810_dasm.cpp
@@ -380,70 +380,70 @@ static const char *const token[] =
/* prefix 48 */
static const struct dasm_s dasm48_7810[256] =
{
- {illegal,0 }, /* 00: 0100 1000 0000 0000 */
+ {illegal,nullptr }, /* 00: 0100 1000 0000 0000 */
{SLRC,"A" }, /* 01: 0100 1000 0000 0001 */
{SLRC,"B" }, /* 02: 0100 1000 0000 0010 */
{SLRC,"C" }, /* 03: 0100 1000 0000 0011 */
- {illegal,0 }, /* 04: 0100 1000 0000 0100 */
+ {illegal,nullptr }, /* 04: 0100 1000 0000 0100 */
{SLLC,"A" }, /* 05: 0100 1000 0000 0101 */
{SLLC,"B" }, /* 06: 0100 1000 0000 0110 */
{SLLC,"C" }, /* 07: 0100 1000 0000 0111 */
{SK,"NV" }, /* 08: 0100 1000 0000 1000 */
- {illegal,0 }, /* 09: 0100 1000 0000 1001 */
+ {illegal,nullptr }, /* 09: 0100 1000 0000 1001 */
{SK,"CY" }, /* 0a: 0100 1000 0000 1010 */
{SK,"HC" }, /* 0b: 0100 1000 0000 1011 */
{SK,"Z" }, /* 0c: 0100 1000 0000 1100 */
- {illegal,0 }, /* 0d: 0100 1000 0000 1101 */
- {illegal,0 }, /* 0e: 0100 1000 0000 1110 */
- {illegal,0 }, /* 0f: 0100 1000 0000 1111 */
-
- {illegal,0 }, /* 10: 0100 1000 0001 0000 */
- {illegal,0 }, /* 11: 0100 1000 0001 0001 */
- {illegal,0 }, /* 12: 0100 1000 0001 0010 */
- {illegal,0 }, /* 13: 0100 1000 0001 0011 */
- {illegal,0 }, /* 14: 0100 1000 0001 0100 */
- {illegal,0 }, /* 15: 0100 1000 0001 0101 */
- {illegal,0 }, /* 16: 0100 1000 0001 0110 */
- {illegal,0 }, /* 17: 0100 1000 0001 0111 */
+ {illegal,nullptr }, /* 0d: 0100 1000 0000 1101 */
+ {illegal,nullptr }, /* 0e: 0100 1000 0000 1110 */
+ {illegal,nullptr }, /* 0f: 0100 1000 0000 1111 */
+
+ {illegal,nullptr }, /* 10: 0100 1000 0001 0000 */
+ {illegal,nullptr }, /* 11: 0100 1000 0001 0001 */
+ {illegal,nullptr }, /* 12: 0100 1000 0001 0010 */
+ {illegal,nullptr }, /* 13: 0100 1000 0001 0011 */
+ {illegal,nullptr }, /* 14: 0100 1000 0001 0100 */
+ {illegal,nullptr }, /* 15: 0100 1000 0001 0101 */
+ {illegal,nullptr }, /* 16: 0100 1000 0001 0110 */
+ {illegal,nullptr }, /* 17: 0100 1000 0001 0111 */
{SKN,"NV" }, /* 18: 0100 1000 0001 1000 */
- {illegal,0 }, /* 19: 0100 1000 0001 1001 */
+ {illegal,nullptr }, /* 19: 0100 1000 0001 1001 */
{SKN,"CY" }, /* 1a: 0100 1000 0001 1010 */
{SKN,"HC" }, /* 1b: 0100 1000 0001 1011 */
{SKN,"Z" }, /* 1c: 0100 1000 0001 1100 */
- {illegal,0 }, /* 1d: 0100 1000 0001 1101 */
- {illegal,0 }, /* 1e: 0100 1000 0001 1110 */
- {illegal,0 }, /* 1f: 0100 1000 0001 1111 */
+ {illegal,nullptr }, /* 1d: 0100 1000 0001 1101 */
+ {illegal,nullptr }, /* 1e: 0100 1000 0001 1110 */
+ {illegal,nullptr }, /* 1f: 0100 1000 0001 1111 */
- {illegal,0 }, /* 20: 0100 1000 0010 0000 */
+ {illegal,nullptr }, /* 20: 0100 1000 0010 0000 */
{SLR,"A" }, /* 21: 0100 1000 0010 0001 */
{SLR,"B" }, /* 22: 0100 1000 0010 0010 */
{SLR,"C" }, /* 23: 0100 1000 0010 0011 */
- {illegal,0 }, /* 24: 0100 1000 0010 0100 */
+ {illegal,nullptr }, /* 24: 0100 1000 0010 0100 */
{SLL,"A" }, /* 25: 0100 1000 0010 0101 */
{SLL,"B" }, /* 26: 0100 1000 0010 0110 */
{SLL,"C" }, /* 27: 0100 1000 0010 0111 */
- {JEA,0 }, /* 28: 0100 1000 0010 1000 */
- {CALB,0 }, /* 29: 0100 1000 0010 1001 */
- {CLC,0 }, /* 2a: 0100 1000 0010 1010 */
- {STC,0 }, /* 2b: 0100 1000 0010 1011 */
- {illegal,0 }, /* 2c: 0100 1000 0010 1100 */
+ {JEA,nullptr }, /* 28: 0100 1000 0010 1000 */
+ {CALB,nullptr }, /* 29: 0100 1000 0010 1001 */
+ {CLC,nullptr }, /* 2a: 0100 1000 0010 1010 */
+ {STC,nullptr }, /* 2b: 0100 1000 0010 1011 */
+ {illegal,nullptr }, /* 2c: 0100 1000 0010 1100 */
{MUL,"A" }, /* 2d: 0100 1000 0010 1101 */
{MUL,"B" }, /* 2e: 0100 1000 0010 1110 */
{MUL,"C" }, /* 2f: 0100 1000 0010 1111 */
- {illegal,0 }, /* 30: 0100 1000 0011 0000 */
+ {illegal,nullptr }, /* 30: 0100 1000 0011 0000 */
{RLR,"A" }, /* 31: 0100 1000 0011 0001 */
{RLR,"B" }, /* 32: 0100 1000 0011 0010 */
{RLR,"C" }, /* 33: 0100 1000 0011 0011 */
- {illegal,0 }, /* 34: 0100 1000 0011 0100 */
+ {illegal,nullptr }, /* 34: 0100 1000 0011 0100 */
{RLL,"A" }, /* 35: 0100 1000 0011 0101 */
{RLL,"B" }, /* 36: 0100 1000 0011 0110 */
{RLL,"C" }, /* 37: 0100 1000 0011 0111 */
- {RLD,0 }, /* 38: 0100 1000 0011 1000 */
- {RRD,0 }, /* 39: 0100 1000 0011 1001 */
- {NEGA,0 }, /* 3a: 0100 1000 0011 1010 */
- {HALT,0 }, /* 3b: 0100 1000 0011 1011 */
- {illegal,0 }, /* 3c: 0100 1000 0011 1100 */
+ {RLD,nullptr }, /* 38: 0100 1000 0011 1000 */
+ {RRD,nullptr }, /* 39: 0100 1000 0011 1001 */
+ {NEGA,nullptr }, /* 3a: 0100 1000 0011 1010 */
+ {HALT,nullptr }, /* 3b: 0100 1000 0011 1011 */
+ {illegal,nullptr }, /* 3c: 0100 1000 0011 1100 */
{DIV,"A" }, /* 3d: 0100 1000 0011 1101 */
{DIV,"B" }, /* 3e: 0100 1000 0011 1110 */
{DIV,"C" }, /* 3f: 0100 1000 0011 1111 */
@@ -461,26 +461,26 @@ static const struct dasm_s dasm48_7810[256] =
{SKIT,"FST" }, /* 4a: 0100 1000 0100 1010 */
{SKIT,"ER" }, /* 4b: 0100 1000 0100 1011 */
{SKIT,"OV" }, /* 4c: 0100 1000 0100 1100 */
- {illegal,0 }, /* 4d: 0100 1000 0100 1101 */
- {illegal,0 }, /* 4e: 0100 1000 0100 1110 */
- {illegal,0 }, /* 4f: 0100 1000 0100 1111 */
+ {illegal,nullptr }, /* 4d: 0100 1000 0100 1101 */
+ {illegal,nullptr }, /* 4e: 0100 1000 0100 1110 */
+ {illegal,nullptr }, /* 4f: 0100 1000 0100 1111 */
{SKIT,"AN4" }, /* 50: 0100 1000 0101 0000 */
{SKIT,"AN5" }, /* 51: 0100 1000 0101 0001 */
{SKIT,"AN6" }, /* 52: 0100 1000 0101 0010 */
{SKIT,"AN7" }, /* 53: 0100 1000 0101 0011 */
{SKIT,"SB" }, /* 54: 0100 1000 0101 0100 */
- {illegal,0 }, /* 55: 0100 1000 0101 0101 */
- {illegal,0 }, /* 56: 0100 1000 0101 0110 */
- {illegal,0 }, /* 57: 0100 1000 0101 0111 */
- {illegal,0 }, /* 58: 0100 1000 0101 1000 */
- {illegal,0 }, /* 59: 0100 1000 0101 1001 */
- {illegal,0 }, /* 5a: 0100 1000 0101 1010 */
- {illegal,0 }, /* 5b: 0100 1000 0101 1011 */
- {illegal,0 }, /* 5c: 0100 1000 0101 1100 */
- {illegal,0 }, /* 5d: 0100 1000 0101 1101 */
- {illegal,0 }, /* 5e: 0100 1000 0101 1110 */
- {illegal,0 }, /* 5f: 0100 1000 0101 1111 */
+ {illegal,nullptr }, /* 55: 0100 1000 0101 0101 */
+ {illegal,nullptr }, /* 56: 0100 1000 0101 0110 */
+ {illegal,nullptr }, /* 57: 0100 1000 0101 0111 */
+ {illegal,nullptr }, /* 58: 0100 1000 0101 1000 */
+ {illegal,nullptr }, /* 59: 0100 1000 0101 1001 */
+ {illegal,nullptr }, /* 5a: 0100 1000 0101 1010 */
+ {illegal,nullptr }, /* 5b: 0100 1000 0101 1011 */
+ {illegal,nullptr }, /* 5c: 0100 1000 0101 1100 */
+ {illegal,nullptr }, /* 5d: 0100 1000 0101 1101 */
+ {illegal,nullptr }, /* 5e: 0100 1000 0101 1110 */
+ {illegal,nullptr }, /* 5f: 0100 1000 0101 1111 */
{SKNIT,"NMI" }, /* 60: 0100 1000 0110 0000 */
{SKNIT,"FT0" }, /* 61: 0100 1000 0110 0001 */
@@ -495,55 +495,55 @@ static const struct dasm_s dasm48_7810[256] =
{SKNIT,"FST" }, /* 6a: 0100 1000 0110 1010 */
{SKNIT,"ER" }, /* 6b: 0100 1000 0110 1011 */
{SKNIT,"OV" }, /* 6c: 0100 1000 0110 1100 */
- {illegal,0 }, /* 6d: 0100 1000 0110 1101 */
- {illegal,0 }, /* 6e: 0100 1000 0110 1110 */
- {illegal,0 }, /* 6f: 0100 1000 0110 1111 */
+ {illegal,nullptr }, /* 6d: 0100 1000 0110 1101 */
+ {illegal,nullptr }, /* 6e: 0100 1000 0110 1110 */
+ {illegal,nullptr }, /* 6f: 0100 1000 0110 1111 */
{SKNIT,"AN4" }, /* 70: 0100 1000 0111 0000 */
{SKNIT,"AN5" }, /* 71: 0100 1000 0111 0001 */
{SKNIT,"AN6" }, /* 72: 0100 1000 0111 0010 */
{SKNIT,"AN7" }, /* 73: 0100 1000 0111 0011 */
{SKNIT,"SB" }, /* 74: 0100 1000 0111 0100 */
- {illegal,0 }, /* 75: 0100 1000 0111 0101 */
- {illegal,0 }, /* 76: 0100 1000 0111 0110 */
- {illegal,0 }, /* 77: 0100 1000 0111 0111 */
- {illegal,0 }, /* 78: 0100 1000 0111 1000 */
- {illegal,0 }, /* 79: 0100 1000 0111 1001 */
- {illegal,0 }, /* 7a: 0100 1000 0111 1010 */
- {illegal,0 }, /* 7b: 0100 1000 0111 1011 */
- {illegal,0 }, /* 7c: 0100 1000 0111 1100 */
- {illegal,0 }, /* 7d: 0100 1000 0111 1101 */
- {illegal,0 }, /* 7e: 0100 1000 0111 1110 */
- {illegal,0 }, /* 7f: 0100 1000 0111 1111 */
-
- {illegal,0 }, /* 80: 0100 1000 1000 0000 */
- {illegal,0 }, /* 81: 0100 1000 1000 0001 */
+ {illegal,nullptr }, /* 75: 0100 1000 0111 0101 */
+ {illegal,nullptr }, /* 76: 0100 1000 0111 0110 */
+ {illegal,nullptr }, /* 77: 0100 1000 0111 0111 */
+ {illegal,nullptr }, /* 78: 0100 1000 0111 1000 */
+ {illegal,nullptr }, /* 79: 0100 1000 0111 1001 */
+ {illegal,nullptr }, /* 7a: 0100 1000 0111 1010 */
+ {illegal,nullptr }, /* 7b: 0100 1000 0111 1011 */
+ {illegal,nullptr }, /* 7c: 0100 1000 0111 1100 */
+ {illegal,nullptr }, /* 7d: 0100 1000 0111 1101 */
+ {illegal,nullptr }, /* 7e: 0100 1000 0111 1110 */
+ {illegal,nullptr }, /* 7f: 0100 1000 0111 1111 */
+
+ {illegal,nullptr }, /* 80: 0100 1000 1000 0000 */
+ {illegal,nullptr }, /* 81: 0100 1000 1000 0001 */
{LDEAX,"(DE)" }, /* 82: 0100 1000 1000 0010 */
{LDEAX,"(HL)" }, /* 83: 0100 1000 1000 0011 */
{LDEAX,"(DE++)" }, /* 84: 0100 1000 1000 0100 */
{LDEAX,"(HL++)" }, /* 85: 0100 1000 1000 0101 */
- {illegal,0 }, /* 86: 0100 1000 1000 0110 */
- {illegal,0 }, /* 87: 0100 1000 1000 0111 */
- {illegal,0 }, /* 88: 0100 1000 1000 1000 */
- {illegal,0 }, /* 89: 0100 1000 1000 1001 */
- {illegal,0 }, /* 8a: 0100 1000 1000 1010 */
+ {illegal,nullptr }, /* 86: 0100 1000 1000 0110 */
+ {illegal,nullptr }, /* 87: 0100 1000 1000 0111 */
+ {illegal,nullptr }, /* 88: 0100 1000 1000 1000 */
+ {illegal,nullptr }, /* 89: 0100 1000 1000 1001 */
+ {illegal,nullptr }, /* 8a: 0100 1000 1000 1010 */
{LDEAX,"(DE+%b)"}, /* 8b: 0100 1000 1000 1011 xxxx xxxx */
{LDEAX,"(HL+A)" }, /* 8c: 0100 1000 1000 1100 */
{LDEAX,"(HL+B)" }, /* 8d: 0100 1000 1000 1101 */
{LDEAX,"(HL+EA)"}, /* 8e: 0100 1000 1000 1110 */
{LDEAX,"(HL+%b)"}, /* 8f: 0100 1000 1000 1111 xxxx xxxx */
- {illegal,0 }, /* 90: 0100 1000 1000 0000 */
- {illegal,0 }, /* 91: 0100 1000 1000 0001 */
+ {illegal,nullptr }, /* 90: 0100 1000 1000 0000 */
+ {illegal,nullptr }, /* 91: 0100 1000 1000 0001 */
{STEAX,"(DE)" }, /* 92: 0100 1000 1000 0010 */
{STEAX,"(HL)" }, /* 93: 0100 1000 1000 0011 */
{STEAX,"(DE++)" }, /* 94: 0100 1000 1000 0100 */
{STEAX,"(HL++)" }, /* 95: 0100 1000 1000 0101 */
- {illegal,0 }, /* 96: 0100 1000 1000 0110 */
- {illegal,0 }, /* 97: 0100 1000 1000 0111 */
- {illegal,0 }, /* 98: 0100 1000 1000 1000 */
- {illegal,0 }, /* 99: 0100 1000 1000 1001 */
- {illegal,0 }, /* 9a: 0100 1000 1000 1010 */
+ {illegal,nullptr }, /* 96: 0100 1000 1000 0110 */
+ {illegal,nullptr }, /* 97: 0100 1000 1000 0111 */
+ {illegal,nullptr }, /* 98: 0100 1000 1000 1000 */
+ {illegal,nullptr }, /* 99: 0100 1000 1000 1001 */
+ {illegal,nullptr }, /* 9a: 0100 1000 1000 1010 */
{STEAX,"(DE+%b)"}, /* 9b: 0100 1000 1000 1011 xxxx xxxx */
{STEAX,"(HL+A)" }, /* 9c: 0100 1000 1000 1100 */
{STEAX,"(HL+B)" }, /* 9d: 0100 1000 1000 1101 */
@@ -551,174 +551,174 @@ static const struct dasm_s dasm48_7810[256] =
{STEAX,"(HL+%b)"}, /* 9f: 0100 1000 1000 1111 xxxx xxxx */
{DSLR,"EA" }, /* a0: 0100 1000 1010 0000 */
- {illegal,0 }, /* a1: 0100 1000 1010 0001 */
- {illegal,0 }, /* a2: 0100 1000 1010 0010 */
- {illegal,0 }, /* a3: 0100 1000 1010 0011 */
+ {illegal,nullptr }, /* a1: 0100 1000 1010 0001 */
+ {illegal,nullptr }, /* a2: 0100 1000 1010 0010 */
+ {illegal,nullptr }, /* a3: 0100 1000 1010 0011 */
{DSLL,"EA" }, /* a4: 0100 1000 1010 0100 */
- {illegal,0 }, /* a5: 0100 1000 1010 0101 */
- {illegal,0 }, /* a6: 0100 1000 1010 0110 */
- {illegal,0 }, /* a7: 0100 1000 1010 0111 */
- {TABLE,0 }, /* a8: 0100 1000 1010 1000 */
- {illegal,0 }, /* a9: 0100 1000 1010 1001 */
- {illegal,0 }, /* aa: 0100 1000 1010 1010 */
- {illegal,0 }, /* ab: 0100 1000 1010 1011 */
- {illegal,0 }, /* ac: 0100 1000 1010 1100 */
- {illegal,0 }, /* ad: 0100 1000 1010 1101 */
- {illegal,0 }, /* ae: 0100 1000 1010 1110 */
- {illegal,0 }, /* af: 0100 1000 1010 1111 */
+ {illegal,nullptr }, /* a5: 0100 1000 1010 0101 */
+ {illegal,nullptr }, /* a6: 0100 1000 1010 0110 */
+ {illegal,nullptr }, /* a7: 0100 1000 1010 0111 */
+ {TABLE,nullptr }, /* a8: 0100 1000 1010 1000 */
+ {illegal,nullptr }, /* a9: 0100 1000 1010 1001 */
+ {illegal,nullptr }, /* aa: 0100 1000 1010 1010 */
+ {illegal,nullptr }, /* ab: 0100 1000 1010 1011 */
+ {illegal,nullptr }, /* ac: 0100 1000 1010 1100 */
+ {illegal,nullptr }, /* ad: 0100 1000 1010 1101 */
+ {illegal,nullptr }, /* ae: 0100 1000 1010 1110 */
+ {illegal,nullptr }, /* af: 0100 1000 1010 1111 */
{DRLR,"EA" }, /* b0: 0100 1000 1011 0000 */
- {illegal,0 }, /* b1: 0100 1000 1011 0001 */
- {illegal,0 }, /* b2: 0100 1000 1011 0010 */
- {illegal,0 }, /* b3: 0100 1000 1011 0011 */
+ {illegal,nullptr }, /* b1: 0100 1000 1011 0001 */
+ {illegal,nullptr }, /* b2: 0100 1000 1011 0010 */
+ {illegal,nullptr }, /* b3: 0100 1000 1011 0011 */
{DRLL,"EA" }, /* b4: 0100 1000 1011 0100 */
- {illegal,0 }, /* b5: 0100 1000 1011 0101 */
- {illegal,0 }, /* b6: 0100 1000 1011 0110 */
- {illegal,0 }, /* b7: 0100 1000 1011 0111 */
- {illegal,0 }, /* b8: 0100 1000 1011 1000 */
- {illegal,0 }, /* b9: 0100 1000 1011 1001 */
- {illegal,0 }, /* ba: 0100 1000 1011 1010 */
- {STOP,0 }, /* bb: 0100 1000 1011 1011 */ /* 7810 */
- {illegal,0 }, /* bc: 0100 1000 1011 1100 */
- {illegal,0 }, /* bd: 0100 1000 1011 1101 */
- {illegal,0 }, /* be: 0100 1000 1011 1110 */
- {illegal,0 }, /* bf: 0100 1000 1011 1111 */
+ {illegal,nullptr }, /* b5: 0100 1000 1011 0101 */
+ {illegal,nullptr }, /* b6: 0100 1000 1011 0110 */
+ {illegal,nullptr }, /* b7: 0100 1000 1011 0111 */
+ {illegal,nullptr }, /* b8: 0100 1000 1011 1000 */
+ {illegal,nullptr }, /* b9: 0100 1000 1011 1001 */
+ {illegal,nullptr }, /* ba: 0100 1000 1011 1010 */
+ {STOP,nullptr }, /* bb: 0100 1000 1011 1011 */ /* 7810 */
+ {illegal,nullptr }, /* bc: 0100 1000 1011 1100 */
+ {illegal,nullptr }, /* bd: 0100 1000 1011 1101 */
+ {illegal,nullptr }, /* be: 0100 1000 1011 1110 */
+ {illegal,nullptr }, /* bf: 0100 1000 1011 1111 */
{DMOV,"EA,ECNT" }, /* c0: 0100 1000 1100 0000 */
{DMOV,"EA,ECPT" }, /* c1: 0100 1000 1100 0001 */ /* 7810 */
- {illegal,0 }, /* c2: 0100 1000 1100 0010 */
- {illegal,0 }, /* c3: 0100 1000 1100 0011 */
- {illegal,0 }, /* c4: 0100 1000 1100 0100 */
- {illegal,0 }, /* c5: 0100 1000 1100 0101 */
- {illegal,0 }, /* c6: 0100 1000 1100 0110 */
- {illegal,0 }, /* c7: 0100 1000 1100 0111 */
- {illegal,0 }, /* c8: 0100 1000 1100 1000 */
- {illegal,0 }, /* c9: 0100 1000 1100 1001 */
- {illegal,0 }, /* ca: 0100 1000 1100 1010 */
- {illegal,0 }, /* cb: 0100 1000 1100 1011 */
- {illegal,0 }, /* cc: 0100 1000 1100 1100 */
- {illegal,0 }, /* cd: 0100 1000 1100 1101 */
- {illegal,0 }, /* ce: 0100 1000 1100 1110 */
- {illegal,0 }, /* cf: 0100 1000 1100 1111 */
-
- {illegal,0 }, /* d0: 0100 1000 1101 0000 */
- {illegal,0 }, /* d1: 0100 1000 1101 0001 */
+ {illegal,nullptr }, /* c2: 0100 1000 1100 0010 */
+ {illegal,nullptr }, /* c3: 0100 1000 1100 0011 */
+ {illegal,nullptr }, /* c4: 0100 1000 1100 0100 */
+ {illegal,nullptr }, /* c5: 0100 1000 1100 0101 */
+ {illegal,nullptr }, /* c6: 0100 1000 1100 0110 */
+ {illegal,nullptr }, /* c7: 0100 1000 1100 0111 */
+ {illegal,nullptr }, /* c8: 0100 1000 1100 1000 */
+ {illegal,nullptr }, /* c9: 0100 1000 1100 1001 */
+ {illegal,nullptr }, /* ca: 0100 1000 1100 1010 */
+ {illegal,nullptr }, /* cb: 0100 1000 1100 1011 */
+ {illegal,nullptr }, /* cc: 0100 1000 1100 1100 */
+ {illegal,nullptr }, /* cd: 0100 1000 1100 1101 */
+ {illegal,nullptr }, /* ce: 0100 1000 1100 1110 */
+ {illegal,nullptr }, /* cf: 0100 1000 1100 1111 */
+
+ {illegal,nullptr }, /* d0: 0100 1000 1101 0000 */
+ {illegal,nullptr }, /* d1: 0100 1000 1101 0001 */
{DMOV,"ETM0,EA" }, /* d2: 0100 1000 1101 0010 */
{DMOV,"ETM1,EA" }, /* d3: 0100 1000 1101 0011 */
- {illegal,0 }, /* d4: 0100 1000 1101 0100 */
- {illegal,0 }, /* d5: 0100 1000 1101 0101 */
- {illegal,0 }, /* d6: 0100 1000 1101 0110 */
- {illegal,0 }, /* d7: 0100 1000 1101 0111 */
- {illegal,0 }, /* d8: 0100 1000 1101 1000 */
- {illegal,0 }, /* d9: 0100 1000 1101 1001 */
- {illegal,0 }, /* da: 0100 1000 1101 1010 */
- {illegal,0 }, /* db: 0100 1000 1101 1011 */
- {illegal,0 }, /* dc: 0100 1000 1101 1100 */
- {illegal,0 }, /* dd: 0100 1000 1101 1101 */
- {illegal,0 }, /* de: 0100 1000 1101 1110 */
- {illegal,0 }, /* df: 0100 1000 1101 1111 */
-
- {illegal,0 }, /* e0: 0100 1000 1110 0000 */
- {illegal,0 }, /* e1: 0100 1000 1110 0001 */
- {illegal,0 }, /* e2: 0100 1000 1110 0010 */
- {illegal,0 }, /* e3: 0100 1000 1110 0011 */
- {illegal,0 }, /* e4: 0100 1000 1110 0100 */
- {illegal,0 }, /* e5: 0100 1000 1110 0101 */
- {illegal,0 }, /* e6: 0100 1000 1110 0110 */
- {illegal,0 }, /* e7: 0100 1000 1110 0111 */
- {illegal,0 }, /* e8: 0100 1000 1110 1000 */
- {illegal,0 }, /* e9: 0100 1000 1110 1001 */
- {illegal,0 }, /* ea: 0100 1000 1110 1010 */
- {illegal,0 }, /* eb: 0100 1000 1110 1011 */
- {illegal,0 }, /* ec: 0100 1000 1110 1100 */
- {illegal,0 }, /* ed: 0100 1000 1110 1101 */
- {illegal,0 }, /* ee: 0100 1000 1110 1110 */
- {illegal,0 }, /* ef: 0100 1000 1110 1111 */
-
- {illegal,0 }, /* f0: 0100 1000 1111 0000 */
- {illegal,0 }, /* f1: 0100 1000 1111 0001 */
- {illegal,0 }, /* f2: 0100 1000 1111 0010 */
- {illegal,0 }, /* f3: 0100 1000 1111 0011 */
- {illegal,0 }, /* f4: 0100 1000 1111 0100 */
- {illegal,0 }, /* f5: 0100 1000 1111 0101 */
- {illegal,0 }, /* f6: 0100 1000 1111 0110 */
- {illegal,0 }, /* f7: 0100 1000 1111 0111 */
- {illegal,0 }, /* f8: 0100 1000 1111 1000 */
- {illegal,0 }, /* f9: 0100 1000 1111 1001 */
- {illegal,0 }, /* fa: 0100 1000 1111 1010 */
- {illegal,0 }, /* fb: 0100 1000 1111 1011 */
- {illegal,0 }, /* fc: 0100 1000 1111 1100 */
- {illegal,0 }, /* fd: 0100 1000 1111 1101 */
- {illegal,0 }, /* fe: 0100 1000 1111 1110 */
- {illegal,0 } /* ff: 0100 1000 1111 1111 */
+ {illegal,nullptr }, /* d4: 0100 1000 1101 0100 */
+ {illegal,nullptr }, /* d5: 0100 1000 1101 0101 */
+ {illegal,nullptr }, /* d6: 0100 1000 1101 0110 */
+ {illegal,nullptr }, /* d7: 0100 1000 1101 0111 */
+ {illegal,nullptr }, /* d8: 0100 1000 1101 1000 */
+ {illegal,nullptr }, /* d9: 0100 1000 1101 1001 */
+ {illegal,nullptr }, /* da: 0100 1000 1101 1010 */
+ {illegal,nullptr }, /* db: 0100 1000 1101 1011 */
+ {illegal,nullptr }, /* dc: 0100 1000 1101 1100 */
+ {illegal,nullptr }, /* dd: 0100 1000 1101 1101 */
+ {illegal,nullptr }, /* de: 0100 1000 1101 1110 */
+ {illegal,nullptr }, /* df: 0100 1000 1101 1111 */
+
+ {illegal,nullptr }, /* e0: 0100 1000 1110 0000 */
+ {illegal,nullptr }, /* e1: 0100 1000 1110 0001 */
+ {illegal,nullptr }, /* e2: 0100 1000 1110 0010 */
+ {illegal,nullptr }, /* e3: 0100 1000 1110 0011 */
+ {illegal,nullptr }, /* e4: 0100 1000 1110 0100 */
+ {illegal,nullptr }, /* e5: 0100 1000 1110 0101 */
+ {illegal,nullptr }, /* e6: 0100 1000 1110 0110 */
+ {illegal,nullptr }, /* e7: 0100 1000 1110 0111 */
+ {illegal,nullptr }, /* e8: 0100 1000 1110 1000 */
+ {illegal,nullptr }, /* e9: 0100 1000 1110 1001 */
+ {illegal,nullptr }, /* ea: 0100 1000 1110 1010 */
+ {illegal,nullptr }, /* eb: 0100 1000 1110 1011 */
+ {illegal,nullptr }, /* ec: 0100 1000 1110 1100 */
+ {illegal,nullptr }, /* ed: 0100 1000 1110 1101 */
+ {illegal,nullptr }, /* ee: 0100 1000 1110 1110 */
+ {illegal,nullptr }, /* ef: 0100 1000 1110 1111 */
+
+ {illegal,nullptr }, /* f0: 0100 1000 1111 0000 */
+ {illegal,nullptr }, /* f1: 0100 1000 1111 0001 */
+ {illegal,nullptr }, /* f2: 0100 1000 1111 0010 */
+ {illegal,nullptr }, /* f3: 0100 1000 1111 0011 */
+ {illegal,nullptr }, /* f4: 0100 1000 1111 0100 */
+ {illegal,nullptr }, /* f5: 0100 1000 1111 0101 */
+ {illegal,nullptr }, /* f6: 0100 1000 1111 0110 */
+ {illegal,nullptr }, /* f7: 0100 1000 1111 0111 */
+ {illegal,nullptr }, /* f8: 0100 1000 1111 1000 */
+ {illegal,nullptr }, /* f9: 0100 1000 1111 1001 */
+ {illegal,nullptr }, /* fa: 0100 1000 1111 1010 */
+ {illegal,nullptr }, /* fb: 0100 1000 1111 1011 */
+ {illegal,nullptr }, /* fc: 0100 1000 1111 1100 */
+ {illegal,nullptr }, /* fd: 0100 1000 1111 1101 */
+ {illegal,nullptr }, /* fe: 0100 1000 1111 1110 */
+ {illegal,nullptr } /* ff: 0100 1000 1111 1111 */
};
static const struct dasm_s dasm48_7807[256] =
{
- {illegal,0 }, /* 00: 0100 1000 0000 0000 */
+ {illegal,nullptr }, /* 00: 0100 1000 0000 0000 */
{SLRC,"A" }, /* 01: 0100 1000 0000 0001 */
{SLRC,"B" }, /* 02: 0100 1000 0000 0010 */
{SLRC,"C" }, /* 03: 0100 1000 0000 0011 */
- {illegal,0 }, /* 04: 0100 1000 0000 0100 */
+ {illegal,nullptr }, /* 04: 0100 1000 0000 0100 */
{SLLC,"A" }, /* 05: 0100 1000 0000 0101 */
{SLLC,"B" }, /* 06: 0100 1000 0000 0110 */
{SLLC,"C" }, /* 07: 0100 1000 0000 0111 */
{SK,"NV" }, /* 08: 0100 1000 0000 1000 */
- {illegal,0 }, /* 09: 0100 1000 0000 1001 */
+ {illegal,nullptr }, /* 09: 0100 1000 0000 1001 */
{SK,"CY" }, /* 0a: 0100 1000 0000 1010 */
{SK,"HC" }, /* 0b: 0100 1000 0000 1011 */
{SK,"Z" }, /* 0c: 0100 1000 0000 1100 */
- {illegal,0 }, /* 0d: 0100 1000 0000 1101 */
- {illegal,0 }, /* 0e: 0100 1000 0000 1110 */
- {illegal,0 }, /* 0f: 0100 1000 0000 1111 */
-
- {illegal,0 }, /* 10: 0100 1000 0001 0000 */
- {illegal,0 }, /* 11: 0100 1000 0001 0001 */
- {illegal,0 }, /* 12: 0100 1000 0001 0010 */
- {illegal,0 }, /* 13: 0100 1000 0001 0011 */
- {illegal,0 }, /* 14: 0100 1000 0001 0100 */
- {illegal,0 }, /* 15: 0100 1000 0001 0101 */
- {illegal,0 }, /* 16: 0100 1000 0001 0110 */
- {illegal,0 }, /* 17: 0100 1000 0001 0111 */
+ {illegal,nullptr }, /* 0d: 0100 1000 0000 1101 */
+ {illegal,nullptr }, /* 0e: 0100 1000 0000 1110 */
+ {illegal,nullptr }, /* 0f: 0100 1000 0000 1111 */
+
+ {illegal,nullptr }, /* 10: 0100 1000 0001 0000 */
+ {illegal,nullptr }, /* 11: 0100 1000 0001 0001 */
+ {illegal,nullptr }, /* 12: 0100 1000 0001 0010 */
+ {illegal,nullptr }, /* 13: 0100 1000 0001 0011 */
+ {illegal,nullptr }, /* 14: 0100 1000 0001 0100 */
+ {illegal,nullptr }, /* 15: 0100 1000 0001 0101 */
+ {illegal,nullptr }, /* 16: 0100 1000 0001 0110 */
+ {illegal,nullptr }, /* 17: 0100 1000 0001 0111 */
{SKN,"NV" }, /* 18: 0100 1000 0001 1000 */
- {illegal,0 }, /* 19: 0100 1000 0001 1001 */
+ {illegal,nullptr }, /* 19: 0100 1000 0001 1001 */
{SKN,"CY" }, /* 1a: 0100 1000 0001 1010 */
{SKN,"HC" }, /* 1b: 0100 1000 0001 1011 */
{SKN,"Z" }, /* 1c: 0100 1000 0001 1100 */
- {illegal,0 }, /* 1d: 0100 1000 0001 1101 */
- {illegal,0 }, /* 1e: 0100 1000 0001 1110 */
- {illegal,0 }, /* 1f: 0100 1000 0001 1111 */
+ {illegal,nullptr }, /* 1d: 0100 1000 0001 1101 */
+ {illegal,nullptr }, /* 1e: 0100 1000 0001 1110 */
+ {illegal,nullptr }, /* 1f: 0100 1000 0001 1111 */
- {illegal,0 }, /* 20: 0100 1000 0010 0000 */
+ {illegal,nullptr }, /* 20: 0100 1000 0010 0000 */
{SLR,"A" }, /* 21: 0100 1000 0010 0001 */
{SLR,"B" }, /* 22: 0100 1000 0010 0010 */
{SLR,"C" }, /* 23: 0100 1000 0010 0011 */
- {illegal,0 }, /* 24: 0100 1000 0010 0100 */
+ {illegal,nullptr }, /* 24: 0100 1000 0010 0100 */
{SLL,"A" }, /* 25: 0100 1000 0010 0101 */
{SLL,"B" }, /* 26: 0100 1000 0010 0110 */
{SLL,"C" }, /* 27: 0100 1000 0010 0111 */
- {JEA,0 }, /* 28: 0100 1000 0010 1000 */
- {CALB,0 }, /* 29: 0100 1000 0010 1001 */
- {CLC,0 }, /* 2a: 0100 1000 0010 1010 */
- {STC,0 }, /* 2b: 0100 1000 0010 1011 */
- {illegal,0 }, /* 2c: 0100 1000 0010 1100 */
+ {JEA,nullptr }, /* 28: 0100 1000 0010 1000 */
+ {CALB,nullptr }, /* 29: 0100 1000 0010 1001 */
+ {CLC,nullptr }, /* 2a: 0100 1000 0010 1010 */
+ {STC,nullptr }, /* 2b: 0100 1000 0010 1011 */
+ {illegal,nullptr }, /* 2c: 0100 1000 0010 1100 */
{MUL,"A" }, /* 2d: 0100 1000 0010 1101 */
{MUL,"B" }, /* 2e: 0100 1000 0010 1110 */
{MUL,"C" }, /* 2f: 0100 1000 0010 1111 */
- {illegal,0 }, /* 30: 0100 1000 0011 0000 */
+ {illegal,nullptr }, /* 30: 0100 1000 0011 0000 */
{RLR,"A" }, /* 31: 0100 1000 0011 0001 */
{RLR,"B" }, /* 32: 0100 1000 0011 0010 */
{RLR,"C" }, /* 33: 0100 1000 0011 0011 */
- {illegal,0 }, /* 34: 0100 1000 0011 0100 */
+ {illegal,nullptr }, /* 34: 0100 1000 0011 0100 */
{RLL,"A" }, /* 35: 0100 1000 0011 0101 */
{RLL,"B" }, /* 36: 0100 1000 0011 0110 */
{RLL,"C" }, /* 37: 0100 1000 0011 0111 */
- {RLD,0 }, /* 38: 0100 1000 0011 1000 */
- {RRD,0 }, /* 39: 0100 1000 0011 1001 */
- {NEGA,0 }, /* 3a: 0100 1000 0011 1010 */
- {HALT,0 }, /* 3b: 0100 1000 0011 1011 */
- {illegal,0 }, /* 3c: 0100 1000 0011 1100 */
+ {RLD,nullptr }, /* 38: 0100 1000 0011 1000 */
+ {RRD,nullptr }, /* 39: 0100 1000 0011 1001 */
+ {NEGA,nullptr }, /* 3a: 0100 1000 0011 1010 */
+ {HALT,nullptr }, /* 3b: 0100 1000 0011 1011 */
+ {illegal,nullptr }, /* 3c: 0100 1000 0011 1100 */
{DIV,"A" }, /* 3d: 0100 1000 0011 1101 */
{DIV,"B" }, /* 3e: 0100 1000 0011 1110 */
{DIV,"C" }, /* 3f: 0100 1000 0011 1111 */
@@ -736,26 +736,26 @@ static const struct dasm_s dasm48_7807[256] =
{SKIT,"FST" }, /* 4a: 0100 1000 0100 1010 */
{SKIT,"ER" }, /* 4b: 0100 1000 0100 1011 */
{SKIT,"OV" }, /* 4c: 0100 1000 0100 1100 */
- {illegal,0 }, /* 4d: 0100 1000 0100 1101 */
- {illegal,0 }, /* 4e: 0100 1000 0100 1110 */
- {illegal,0 }, /* 4f: 0100 1000 0100 1111 */
+ {illegal,nullptr }, /* 4d: 0100 1000 0100 1101 */
+ {illegal,nullptr }, /* 4e: 0100 1000 0100 1110 */
+ {illegal,nullptr }, /* 4f: 0100 1000 0100 1111 */
{SKIT,"AN4" }, /* 50: 0100 1000 0101 0000 */
{SKIT,"AN5" }, /* 51: 0100 1000 0101 0001 */
{SKIT,"AN6" }, /* 52: 0100 1000 0101 0010 */
{SKIT,"AN7" }, /* 53: 0100 1000 0101 0011 */
{SKIT,"SB" }, /* 54: 0100 1000 0101 0100 */
- {illegal,0 }, /* 55: 0100 1000 0101 0101 */
- {illegal,0 }, /* 56: 0100 1000 0101 0110 */
- {illegal,0 }, /* 57: 0100 1000 0101 0111 */
- {illegal,0 }, /* 58: 0100 1000 0101 1000 */
- {illegal,0 }, /* 59: 0100 1000 0101 1001 */
- {illegal,0 }, /* 5a: 0100 1000 0101 1010 */
- {illegal,0 }, /* 5b: 0100 1000 0101 1011 */
- {illegal,0 }, /* 5c: 0100 1000 0101 1100 */
- {illegal,0 }, /* 5d: 0100 1000 0101 1101 */
- {illegal,0 }, /* 5e: 0100 1000 0101 1110 */
- {illegal,0 }, /* 5f: 0100 1000 0101 1111 */
+ {illegal,nullptr }, /* 55: 0100 1000 0101 0101 */
+ {illegal,nullptr }, /* 56: 0100 1000 0101 0110 */
+ {illegal,nullptr }, /* 57: 0100 1000 0101 0111 */
+ {illegal,nullptr }, /* 58: 0100 1000 0101 1000 */
+ {illegal,nullptr }, /* 59: 0100 1000 0101 1001 */
+ {illegal,nullptr }, /* 5a: 0100 1000 0101 1010 */
+ {illegal,nullptr }, /* 5b: 0100 1000 0101 1011 */
+ {illegal,nullptr }, /* 5c: 0100 1000 0101 1100 */
+ {illegal,nullptr }, /* 5d: 0100 1000 0101 1101 */
+ {illegal,nullptr }, /* 5e: 0100 1000 0101 1110 */
+ {illegal,nullptr }, /* 5f: 0100 1000 0101 1111 */
{SKNIT,"NMI" }, /* 60: 0100 1000 0110 0000 */
{SKNIT,"FT0" }, /* 61: 0100 1000 0110 0001 */
@@ -770,55 +770,55 @@ static const struct dasm_s dasm48_7807[256] =
{SKNIT,"FST" }, /* 6a: 0100 1000 0110 1010 */
{SKNIT,"ER" }, /* 6b: 0100 1000 0110 1011 */
{SKNIT,"OV" }, /* 6c: 0100 1000 0110 1100 */
- {illegal,0 }, /* 6d: 0100 1000 0110 1101 */
- {illegal,0 }, /* 6e: 0100 1000 0110 1110 */
- {illegal,0 }, /* 6f: 0100 1000 0110 1111 */
+ {illegal,nullptr }, /* 6d: 0100 1000 0110 1101 */
+ {illegal,nullptr }, /* 6e: 0100 1000 0110 1110 */
+ {illegal,nullptr }, /* 6f: 0100 1000 0110 1111 */
{SKNIT,"AN4" }, /* 70: 0100 1000 0111 0000 */
{SKNIT,"AN5" }, /* 71: 0100 1000 0111 0001 */
{SKNIT,"AN6" }, /* 72: 0100 1000 0111 0010 */
{SKNIT,"AN7" }, /* 73: 0100 1000 0111 0011 */
{SKNIT,"SB" }, /* 74: 0100 1000 0111 0100 */
- {illegal,0 }, /* 75: 0100 1000 0111 0101 */
- {illegal,0 }, /* 76: 0100 1000 0111 0110 */
- {illegal,0 }, /* 77: 0100 1000 0111 0111 */
- {illegal,0 }, /* 78: 0100 1000 0111 1000 */
- {illegal,0 }, /* 79: 0100 1000 0111 1001 */
- {illegal,0 }, /* 7a: 0100 1000 0111 1010 */
- {illegal,0 }, /* 7b: 0100 1000 0111 1011 */
- {illegal,0 }, /* 7c: 0100 1000 0111 1100 */
- {illegal,0 }, /* 7d: 0100 1000 0111 1101 */
- {illegal,0 }, /* 7e: 0100 1000 0111 1110 */
- {illegal,0 }, /* 7f: 0100 1000 0111 1111 */
-
- {illegal,0 }, /* 80: 0100 1000 1000 0000 */
- {illegal,0 }, /* 81: 0100 1000 1000 0001 */
+ {illegal,nullptr }, /* 75: 0100 1000 0111 0101 */
+ {illegal,nullptr }, /* 76: 0100 1000 0111 0110 */
+ {illegal,nullptr }, /* 77: 0100 1000 0111 0111 */
+ {illegal,nullptr }, /* 78: 0100 1000 0111 1000 */
+ {illegal,nullptr }, /* 79: 0100 1000 0111 1001 */
+ {illegal,nullptr }, /* 7a: 0100 1000 0111 1010 */
+ {illegal,nullptr }, /* 7b: 0100 1000 0111 1011 */
+ {illegal,nullptr }, /* 7c: 0100 1000 0111 1100 */
+ {illegal,nullptr }, /* 7d: 0100 1000 0111 1101 */
+ {illegal,nullptr }, /* 7e: 0100 1000 0111 1110 */
+ {illegal,nullptr }, /* 7f: 0100 1000 0111 1111 */
+
+ {illegal,nullptr }, /* 80: 0100 1000 1000 0000 */
+ {illegal,nullptr }, /* 81: 0100 1000 1000 0001 */
{LDEAX,"(DE)" }, /* 82: 0100 1000 1000 0010 */
{LDEAX,"(HL)" }, /* 83: 0100 1000 1000 0011 */
{LDEAX,"(DE++)" }, /* 84: 0100 1000 1000 0100 */
{LDEAX,"(HL++)" }, /* 85: 0100 1000 1000 0101 */
- {illegal,0 }, /* 86: 0100 1000 1000 0110 */
- {illegal,0 }, /* 87: 0100 1000 1000 0111 */
- {illegal,0 }, /* 88: 0100 1000 1000 1000 */
- {illegal,0 }, /* 89: 0100 1000 1000 1001 */
- {illegal,0 }, /* 8a: 0100 1000 1000 1010 */
+ {illegal,nullptr }, /* 86: 0100 1000 1000 0110 */
+ {illegal,nullptr }, /* 87: 0100 1000 1000 0111 */
+ {illegal,nullptr }, /* 88: 0100 1000 1000 1000 */
+ {illegal,nullptr }, /* 89: 0100 1000 1000 1001 */
+ {illegal,nullptr }, /* 8a: 0100 1000 1000 1010 */
{LDEAX,"(DE+%b)"}, /* 8b: 0100 1000 1000 1011 xxxx xxxx */
{LDEAX,"(HL+A)" }, /* 8c: 0100 1000 1000 1100 */
{LDEAX,"(HL+B)" }, /* 8d: 0100 1000 1000 1101 */
{LDEAX,"(HL+EA)"}, /* 8e: 0100 1000 1000 1110 */
{LDEAX,"(HL+%b)"}, /* 8f: 0100 1000 1000 1111 xxxx xxxx */
- {illegal,0 }, /* 90: 0100 1000 1000 0000 */
- {illegal,0 }, /* 91: 0100 1000 1000 0001 */
+ {illegal,nullptr }, /* 90: 0100 1000 1000 0000 */
+ {illegal,nullptr }, /* 91: 0100 1000 1000 0001 */
{STEAX,"(DE)" }, /* 92: 0100 1000 1000 0010 */
{STEAX,"(HL)" }, /* 93: 0100 1000 1000 0011 */
{STEAX,"(DE++)" }, /* 94: 0100 1000 1000 0100 */
{STEAX,"(HL++)" }, /* 95: 0100 1000 1000 0101 */
- {illegal,0 }, /* 96: 0100 1000 1000 0110 */
- {illegal,0 }, /* 97: 0100 1000 1000 0111 */
- {illegal,0 }, /* 98: 0100 1000 1000 1000 */
- {illegal,0 }, /* 99: 0100 1000 1000 1001 */
- {illegal,0 }, /* 9a: 0100 1000 1000 1010 */
+ {illegal,nullptr }, /* 96: 0100 1000 1000 0110 */
+ {illegal,nullptr }, /* 97: 0100 1000 1000 0111 */
+ {illegal,nullptr }, /* 98: 0100 1000 1000 1000 */
+ {illegal,nullptr }, /* 99: 0100 1000 1000 1001 */
+ {illegal,nullptr }, /* 9a: 0100 1000 1000 1010 */
{STEAX,"(DE+%b)"}, /* 9b: 0100 1000 1000 1011 xxxx xxxx */
{STEAX,"(HL+A)" }, /* 9c: 0100 1000 1000 1100 */
{STEAX,"(HL+B)" }, /* 9d: 0100 1000 1000 1101 */
@@ -826,871 +826,871 @@ static const struct dasm_s dasm48_7807[256] =
{STEAX,"(HL+%b)"}, /* 9f: 0100 1000 1000 1111 xxxx xxxx */
{DSLR,"EA" }, /* a0: 0100 1000 1010 0000 */
- {illegal,0 }, /* a1: 0100 1000 1010 0001 */
- {illegal,0 }, /* a2: 0100 1000 1010 0010 */
- {illegal,0 }, /* a3: 0100 1000 1010 0011 */
+ {illegal,nullptr }, /* a1: 0100 1000 1010 0001 */
+ {illegal,nullptr }, /* a2: 0100 1000 1010 0010 */
+ {illegal,nullptr }, /* a3: 0100 1000 1010 0011 */
{DSLL,"EA" }, /* a4: 0100 1000 1010 0100 */
- {illegal,0 }, /* a5: 0100 1000 1010 0101 */
- {illegal,0 }, /* a6: 0100 1000 1010 0110 */
- {illegal,0 }, /* a7: 0100 1000 1010 0111 */
- {TABLE,0 }, /* a8: 0100 1000 1010 1000 */
- {illegal,0 }, /* a9: 0100 1000 1010 1001 */
- {CMC,0 }, /* aa: 0100 1000 1010 1010 */ /* 7807 */
- {illegal,0 }, /* ab: 0100 1000 1010 1011 */
- {EXA,0 }, /* ac: 0100 1000 1010 1100 */ /* 7807 */
- {EXR,0 }, /* ad: 0100 1000 1010 1101 */ /* 7807 */
- {EXH,0 }, /* ae: 0100 1000 1010 1110 */ /* 7807 */
- {EXX,0 }, /* af: 0100 1000 1010 1111 */ /* 7807 */
+ {illegal,nullptr }, /* a5: 0100 1000 1010 0101 */
+ {illegal,nullptr }, /* a6: 0100 1000 1010 0110 */
+ {illegal,nullptr }, /* a7: 0100 1000 1010 0111 */
+ {TABLE,nullptr }, /* a8: 0100 1000 1010 1000 */
+ {illegal,nullptr }, /* a9: 0100 1000 1010 1001 */
+ {CMC,nullptr }, /* aa: 0100 1000 1010 1010 */ /* 7807 */
+ {illegal,nullptr }, /* ab: 0100 1000 1010 1011 */
+ {EXA,nullptr }, /* ac: 0100 1000 1010 1100 */ /* 7807 */
+ {EXR,nullptr }, /* ad: 0100 1000 1010 1101 */ /* 7807 */
+ {EXH,nullptr }, /* ae: 0100 1000 1010 1110 */ /* 7807 */
+ {EXX,nullptr }, /* af: 0100 1000 1010 1111 */ /* 7807 */
{DRLR,"EA" }, /* b0: 0100 1000 1011 0000 */
- {illegal,0 }, /* b1: 0100 1000 1011 0001 */
- {illegal,0 }, /* b2: 0100 1000 1011 0010 */
- {illegal,0 }, /* b3: 0100 1000 1011 0011 */
+ {illegal,nullptr }, /* b1: 0100 1000 1011 0001 */
+ {illegal,nullptr }, /* b2: 0100 1000 1011 0010 */
+ {illegal,nullptr }, /* b3: 0100 1000 1011 0011 */
{DRLL,"EA" }, /* b4: 0100 1000 1011 0100 */
- {illegal,0 }, /* b5: 0100 1000 1011 0101 */
- {illegal,0 }, /* b6: 0100 1000 1011 0110 */
- {illegal,0 }, /* b7: 0100 1000 1011 0111 */
- {illegal,0 }, /* b8: 0100 1000 1011 1000 */
- {illegal,0 }, /* b9: 0100 1000 1011 1001 */
- {illegal,0 }, /* ba: 0100 1000 1011 1010 */
- {illegal,0 }, /* bb: 0100 1000 1011 1011 */
- {illegal,0 }, /* bc: 0100 1000 1011 1100 */
- {illegal,0 }, /* bd: 0100 1000 1011 1101 */
- {illegal,0 }, /* be: 0100 1000 1011 1110 */
- {illegal,0 }, /* bf: 0100 1000 1011 1111 */
+ {illegal,nullptr }, /* b5: 0100 1000 1011 0101 */
+ {illegal,nullptr }, /* b6: 0100 1000 1011 0110 */
+ {illegal,nullptr }, /* b7: 0100 1000 1011 0111 */
+ {illegal,nullptr }, /* b8: 0100 1000 1011 1000 */
+ {illegal,nullptr }, /* b9: 0100 1000 1011 1001 */
+ {illegal,nullptr }, /* ba: 0100 1000 1011 1010 */
+ {illegal,nullptr }, /* bb: 0100 1000 1011 1011 */
+ {illegal,nullptr }, /* bc: 0100 1000 1011 1100 */
+ {illegal,nullptr }, /* bd: 0100 1000 1011 1101 */
+ {illegal,nullptr }, /* be: 0100 1000 1011 1110 */
+ {illegal,nullptr }, /* bf: 0100 1000 1011 1111 */
{DMOV,"EA,ECNT" }, /* c0: 0100 1000 1100 0000 */
{DMOV,"EA,ECPT0"}, /* c1: 0100 1000 1100 0001 */ /* 7807 */
{DMOV,"EA,ECPT1"}, /* c2: 0100 1000 1100 0010 */ /* 7807 */
- {illegal,0 }, /* c3: 0100 1000 1100 0011 */
- {illegal,0 }, /* c4: 0100 1000 1100 0100 */
- {illegal,0 }, /* c5: 0100 1000 1100 0101 */
- {illegal,0 }, /* c6: 0100 1000 1100 0110 */
- {illegal,0 }, /* c7: 0100 1000 1100 0111 */
- {illegal,0 }, /* c8: 0100 1000 1100 1000 */
- {illegal,0 }, /* c9: 0100 1000 1100 1001 */
- {illegal,0 }, /* ca: 0100 1000 1100 1010 */
- {illegal,0 }, /* cb: 0100 1000 1100 1011 */
- {illegal,0 }, /* cc: 0100 1000 1100 1100 */
- {illegal,0 }, /* cd: 0100 1000 1100 1101 */
- {illegal,0 }, /* ce: 0100 1000 1100 1110 */
- {illegal,0 }, /* cf: 0100 1000 1100 1111 */
-
- {illegal,0 }, /* d0: 0100 1000 1101 0000 */
- {illegal,0 }, /* d1: 0100 1000 1101 0001 */
+ {illegal,nullptr }, /* c3: 0100 1000 1100 0011 */
+ {illegal,nullptr }, /* c4: 0100 1000 1100 0100 */
+ {illegal,nullptr }, /* c5: 0100 1000 1100 0101 */
+ {illegal,nullptr }, /* c6: 0100 1000 1100 0110 */
+ {illegal,nullptr }, /* c7: 0100 1000 1100 0111 */
+ {illegal,nullptr }, /* c8: 0100 1000 1100 1000 */
+ {illegal,nullptr }, /* c9: 0100 1000 1100 1001 */
+ {illegal,nullptr }, /* ca: 0100 1000 1100 1010 */
+ {illegal,nullptr }, /* cb: 0100 1000 1100 1011 */
+ {illegal,nullptr }, /* cc: 0100 1000 1100 1100 */
+ {illegal,nullptr }, /* cd: 0100 1000 1100 1101 */
+ {illegal,nullptr }, /* ce: 0100 1000 1100 1110 */
+ {illegal,nullptr }, /* cf: 0100 1000 1100 1111 */
+
+ {illegal,nullptr }, /* d0: 0100 1000 1101 0000 */
+ {illegal,nullptr }, /* d1: 0100 1000 1101 0001 */
{DMOV,"ETM0,EA" }, /* d2: 0100 1000 1101 0010 */
{DMOV,"ETM1,EA" }, /* d3: 0100 1000 1101 0011 */
- {illegal,0 }, /* d4: 0100 1000 1101 0100 */
- {illegal,0 }, /* d5: 0100 1000 1101 0101 */
- {illegal,0 }, /* d6: 0100 1000 1101 0110 */
- {illegal,0 }, /* d7: 0100 1000 1101 0111 */
- {illegal,0 }, /* d8: 0100 1000 1101 1000 */
- {illegal,0 }, /* d9: 0100 1000 1101 1001 */
- {illegal,0 }, /* da: 0100 1000 1101 1010 */
- {illegal,0 }, /* db: 0100 1000 1101 1011 */
- {illegal,0 }, /* dc: 0100 1000 1101 1100 */
- {illegal,0 }, /* dd: 0100 1000 1101 1101 */
- {illegal,0 }, /* de: 0100 1000 1101 1110 */
- {illegal,0 }, /* df: 0100 1000 1101 1111 */
-
- {illegal,0 }, /* e0: 0100 1000 1110 0000 */
- {illegal,0 }, /* e1: 0100 1000 1110 0001 */
- {illegal,0 }, /* e2: 0100 1000 1110 0010 */
- {illegal,0 }, /* e3: 0100 1000 1110 0011 */
- {illegal,0 }, /* e4: 0100 1000 1110 0100 */
- {illegal,0 }, /* e5: 0100 1000 1110 0101 */
- {illegal,0 }, /* e6: 0100 1000 1110 0110 */
- {illegal,0 }, /* e7: 0100 1000 1110 0111 */
- {illegal,0 }, /* e8: 0100 1000 1110 1000 */
- {illegal,0 }, /* e9: 0100 1000 1110 1001 */
- {illegal,0 }, /* ea: 0100 1000 1110 1010 */
- {illegal,0 }, /* eb: 0100 1000 1110 1011 */
- {illegal,0 }, /* ec: 0100 1000 1110 1100 */
- {illegal,0 }, /* ed: 0100 1000 1110 1101 */
- {illegal,0 }, /* ee: 0100 1000 1110 1110 */
- {illegal,0 }, /* ef: 0100 1000 1110 1111 */
-
- {illegal,0 }, /* f0: 0100 1000 1111 0000 */
- {illegal,0 }, /* f1: 0100 1000 1111 0001 */
- {illegal,0 }, /* f2: 0100 1000 1111 0010 */
- {illegal,0 }, /* f3: 0100 1000 1111 0011 */
- {illegal,0 }, /* f4: 0100 1000 1111 0100 */
- {illegal,0 }, /* f5: 0100 1000 1111 0101 */
- {illegal,0 }, /* f6: 0100 1000 1111 0110 */
- {illegal,0 }, /* f7: 0100 1000 1111 0111 */
- {illegal,0 }, /* f8: 0100 1000 1111 1000 */
- {illegal,0 }, /* f9: 0100 1000 1111 1001 */
- {illegal,0 }, /* fa: 0100 1000 1111 1010 */
- {illegal,0 }, /* fb: 0100 1000 1111 1011 */
- {illegal,0 }, /* fc: 0100 1000 1111 1100 */
- {illegal,0 }, /* fd: 0100 1000 1111 1101 */
- {illegal,0 }, /* fe: 0100 1000 1111 1110 */
- {illegal,0 } /* ff: 0100 1000 1111 1111 */
+ {illegal,nullptr }, /* d4: 0100 1000 1101 0100 */
+ {illegal,nullptr }, /* d5: 0100 1000 1101 0101 */
+ {illegal,nullptr }, /* d6: 0100 1000 1101 0110 */
+ {illegal,nullptr }, /* d7: 0100 1000 1101 0111 */
+ {illegal,nullptr }, /* d8: 0100 1000 1101 1000 */
+ {illegal,nullptr }, /* d9: 0100 1000 1101 1001 */
+ {illegal,nullptr }, /* da: 0100 1000 1101 1010 */
+ {illegal,nullptr }, /* db: 0100 1000 1101 1011 */
+ {illegal,nullptr }, /* dc: 0100 1000 1101 1100 */
+ {illegal,nullptr }, /* dd: 0100 1000 1101 1101 */
+ {illegal,nullptr }, /* de: 0100 1000 1101 1110 */
+ {illegal,nullptr }, /* df: 0100 1000 1101 1111 */
+
+ {illegal,nullptr }, /* e0: 0100 1000 1110 0000 */
+ {illegal,nullptr }, /* e1: 0100 1000 1110 0001 */
+ {illegal,nullptr }, /* e2: 0100 1000 1110 0010 */
+ {illegal,nullptr }, /* e3: 0100 1000 1110 0011 */
+ {illegal,nullptr }, /* e4: 0100 1000 1110 0100 */
+ {illegal,nullptr }, /* e5: 0100 1000 1110 0101 */
+ {illegal,nullptr }, /* e6: 0100 1000 1110 0110 */
+ {illegal,nullptr }, /* e7: 0100 1000 1110 0111 */
+ {illegal,nullptr }, /* e8: 0100 1000 1110 1000 */
+ {illegal,nullptr }, /* e9: 0100 1000 1110 1001 */
+ {illegal,nullptr }, /* ea: 0100 1000 1110 1010 */
+ {illegal,nullptr }, /* eb: 0100 1000 1110 1011 */
+ {illegal,nullptr }, /* ec: 0100 1000 1110 1100 */
+ {illegal,nullptr }, /* ed: 0100 1000 1110 1101 */
+ {illegal,nullptr }, /* ee: 0100 1000 1110 1110 */
+ {illegal,nullptr }, /* ef: 0100 1000 1110 1111 */
+
+ {illegal,nullptr }, /* f0: 0100 1000 1111 0000 */
+ {illegal,nullptr }, /* f1: 0100 1000 1111 0001 */
+ {illegal,nullptr }, /* f2: 0100 1000 1111 0010 */
+ {illegal,nullptr }, /* f3: 0100 1000 1111 0011 */
+ {illegal,nullptr }, /* f4: 0100 1000 1111 0100 */
+ {illegal,nullptr }, /* f5: 0100 1000 1111 0101 */
+ {illegal,nullptr }, /* f6: 0100 1000 1111 0110 */
+ {illegal,nullptr }, /* f7: 0100 1000 1111 0111 */
+ {illegal,nullptr }, /* f8: 0100 1000 1111 1000 */
+ {illegal,nullptr }, /* f9: 0100 1000 1111 1001 */
+ {illegal,nullptr }, /* fa: 0100 1000 1111 1010 */
+ {illegal,nullptr }, /* fb: 0100 1000 1111 1011 */
+ {illegal,nullptr }, /* fc: 0100 1000 1111 1100 */
+ {illegal,nullptr }, /* fd: 0100 1000 1111 1101 */
+ {illegal,nullptr }, /* fe: 0100 1000 1111 1110 */
+ {illegal,nullptr } /* ff: 0100 1000 1111 1111 */
};
/* prefix 4C */
static const struct dasm_s dasm4C_7810[256] =
{
- {illegal,0 }, /* 00: 0100 1100 0000 0000 */
- {illegal,0 }, /* 01: 0100 1100 0000 0001 */
- {illegal,0 }, /* 02: 0100 1100 0000 0010 */
- {illegal,0 }, /* 03: 0100 1100 0000 0011 */
- {illegal,0 }, /* 04: 0100 1100 0000 0100 */
- {illegal,0 }, /* 05: 0100 1100 0000 0101 */
- {illegal,0 }, /* 06: 0100 1100 0000 0110 */
- {illegal,0 }, /* 07: 0100 1100 0000 0111 */
- {illegal,0 }, /* 08: 0100 1100 0000 1000 */
- {illegal,0 }, /* 09: 0100 1100 0000 1001 */
- {illegal,0 }, /* 0a: 0100 1100 0000 1010 */
- {illegal,0 }, /* 0b: 0100 1100 0000 1011 */
- {illegal,0 }, /* 0c: 0100 1100 0000 1100 */
- {illegal,0 }, /* 0d: 0100 1100 0000 1101 */
- {illegal,0 }, /* 0e: 0100 1100 0000 1110 */
- {illegal,0 }, /* 0f: 0100 1100 0000 1111 */
-
- {illegal,0 }, /* 10: 0100 1100 0001 0000 */
- {illegal,0 }, /* 11: 0100 1100 0001 0001 */
- {illegal,0 }, /* 12: 0100 1100 0001 0010 */
- {illegal,0 }, /* 13: 0100 1100 0001 0011 */
- {illegal,0 }, /* 14: 0100 1100 0001 0100 */
- {illegal,0 }, /* 15: 0100 1100 0001 0101 */
- {illegal,0 }, /* 16: 0100 1100 0001 0110 */
- {illegal,0 }, /* 17: 0100 1100 0001 0111 */
- {illegal,0 }, /* 18: 0100 1100 0001 1000 */
- {illegal,0 }, /* 19: 0100 1100 0001 1001 */
- {illegal,0 }, /* 1a: 0100 1100 0001 1010 */
- {illegal,0 }, /* 1b: 0100 1100 0001 1011 */
- {illegal,0 }, /* 1c: 0100 1100 0001 1100 */
- {illegal,0 }, /* 1d: 0100 1100 0001 1101 */
- {illegal,0 }, /* 1e: 0100 1100 0001 1110 */
- {illegal,0 }, /* 1f: 0100 1100 0001 1111 */
-
- {illegal,0 }, /* 20: 0100 1100 0010 0000 */
- {illegal,0 }, /* 21: 0100 1100 0010 0001 */
- {illegal,0 }, /* 22: 0100 1100 0010 0010 */
- {illegal,0 }, /* 23: 0100 1100 0010 0011 */
- {illegal,0 }, /* 24: 0100 1100 0010 0100 */
- {illegal,0 }, /* 25: 0100 1100 0010 0101 */
- {illegal,0 }, /* 26: 0100 1100 0010 0110 */
- {illegal,0 }, /* 27: 0100 1100 0010 0111 */
- {illegal,0 }, /* 28: 0100 1100 0010 1000 */
- {illegal,0 }, /* 29: 0100 1100 0010 1001 */
- {illegal,0 }, /* 2a: 0100 1100 0010 1010 */
- {illegal,0 }, /* 2b: 0100 1100 0010 1011 */
- {illegal,0 }, /* 2c: 0100 1100 0010 1100 */
- {illegal,0 }, /* 2d: 0100 1100 0010 1101 */
- {illegal,0 }, /* 2e: 0100 1100 0010 1110 */
- {illegal,0 }, /* 2f: 0100 1100 0010 1111 */
-
- {illegal,0 }, /* 30: 0100 1100 0011 0000 */
- {illegal,0 }, /* 31: 0100 1100 0011 0001 */
- {illegal,0 }, /* 32: 0100 1100 0011 0010 */
- {illegal,0 }, /* 33: 0100 1100 0011 0011 */
- {illegal,0 }, /* 34: 0100 1100 0011 0100 */
- {illegal,0 }, /* 35: 0100 1100 0011 0101 */
- {illegal,0 }, /* 36: 0100 1100 0011 0110 */
- {illegal,0 }, /* 37: 0100 1100 0011 0111 */
- {illegal,0 }, /* 38: 0100 1100 0011 1000 */
- {illegal,0 }, /* 39: 0100 1100 0011 1001 */
- {illegal,0 }, /* 3a: 0100 1100 0011 1010 */
- {illegal,0 }, /* 3b: 0100 1100 0011 1011 */
- {illegal,0 }, /* 3c: 0100 1100 0011 1100 */
- {illegal,0 }, /* 3d: 0100 1100 0011 1101 */
- {illegal,0 }, /* 3e: 0100 1100 0011 1110 */
- {illegal,0 }, /* 3f: 0100 1100 0011 1111 */
-
- {illegal,0 }, /* 40: 0100 1100 0100 0000 */
- {illegal,0 }, /* 41: 0100 1100 0100 0001 */
- {illegal,0 }, /* 42: 0100 1100 0100 0010 */
- {illegal,0 }, /* 43: 0100 1100 0100 0011 */
- {illegal,0 }, /* 44: 0100 1100 0100 0100 */
- {illegal,0 }, /* 45: 0100 1100 0100 0101 */
- {illegal,0 }, /* 46: 0100 1100 0100 0110 */
- {illegal,0 }, /* 47: 0100 1100 0100 0111 */
- {illegal,0 }, /* 48: 0100 1100 0100 1000 */
- {illegal,0 }, /* 49: 0100 1100 0100 1001 */
- {illegal,0 }, /* 4a: 0100 1100 0100 1010 */
- {illegal,0 }, /* 4b: 0100 1100 0100 1011 */
- {illegal,0 }, /* 4c: 0100 1100 0100 1100 */
- {illegal,0 }, /* 4d: 0100 1100 0100 1101 */
- {illegal,0 }, /* 4e: 0100 1100 0100 1110 */
- {illegal,0 }, /* 4f: 0100 1100 0100 1111 */
-
- {illegal,0 }, /* 50: 0100 1100 0101 0000 */
- {illegal,0 }, /* 51: 0100 1100 0101 0001 */
- {illegal,0 }, /* 52: 0100 1100 0101 0010 */
- {illegal,0 }, /* 53: 0100 1100 0101 0011 */
- {illegal,0 }, /* 54: 0100 1100 0101 0100 */
- {illegal,0 }, /* 55: 0100 1100 0101 0101 */
- {illegal,0 }, /* 56: 0100 1100 0101 0110 */
- {illegal,0 }, /* 57: 0100 1100 0101 0111 */
- {illegal,0 }, /* 58: 0100 1100 0101 1000 */
- {illegal,0 }, /* 59: 0100 1100 0101 1001 */
- {illegal,0 }, /* 5a: 0100 1100 0101 1010 */
- {illegal,0 }, /* 5b: 0100 1100 0101 1011 */
- {illegal,0 }, /* 5c: 0100 1100 0101 1100 */
- {illegal,0 }, /* 5d: 0100 1100 0101 1101 */
- {illegal,0 }, /* 5e: 0100 1100 0101 1110 */
- {illegal,0 }, /* 5f: 0100 1100 0101 1111 */
-
- {illegal,0 }, /* 60: 0100 1100 0110 0000 */
- {illegal,0 }, /* 61: 0100 1100 0110 0001 */
- {illegal,0 }, /* 62: 0100 1100 0110 0010 */
- {illegal,0 }, /* 63: 0100 1100 0110 0011 */
- {illegal,0 }, /* 64: 0100 1100 0110 0100 */
- {illegal,0 }, /* 65: 0100 1100 0110 0101 */
- {illegal,0 }, /* 66: 0100 1100 0110 0110 */
- {illegal,0 }, /* 67: 0100 1100 0110 0111 */
- {illegal,0 }, /* 68: 0100 1100 0110 1000 */
- {illegal,0 }, /* 69: 0100 1100 0110 1001 */
- {illegal,0 }, /* 6a: 0100 1100 0110 1010 */
- {illegal,0 }, /* 6b: 0100 1100 0110 1011 */
- {illegal,0 }, /* 6c: 0100 1100 0110 1100 */
- {illegal,0 }, /* 6d: 0100 1100 0110 1101 */
- {illegal,0 }, /* 6e: 0100 1100 0110 1110 */
- {illegal,0 }, /* 6f: 0100 1100 0110 1111 */
-
- {illegal,0 }, /* 70: 0100 1100 0111 0000 */
- {illegal,0 }, /* 71: 0100 1100 0111 0001 */
- {illegal,0 }, /* 72: 0100 1100 0111 0010 */
- {illegal,0 }, /* 73: 0100 1100 0111 0011 */
- {illegal,0 }, /* 74: 0100 1100 0111 0100 */
- {illegal,0 }, /* 75: 0100 1100 0111 0101 */
- {illegal,0 }, /* 76: 0100 1100 0111 0110 */
- {illegal,0 }, /* 77: 0100 1100 0111 0111 */
- {illegal,0 }, /* 78: 0100 1100 0111 1000 */
- {illegal,0 }, /* 79: 0100 1100 0111 1001 */
- {illegal,0 }, /* 7a: 0100 1100 0111 1010 */
- {illegal,0 }, /* 7b: 0100 1100 0111 1011 */
- {illegal,0 }, /* 7c: 0100 1100 0111 1100 */
- {illegal,0 }, /* 7d: 0100 1100 0111 1101 */
- {illegal,0 }, /* 7e: 0100 1100 0111 1110 */
- {illegal,0 }, /* 7f: 0100 1100 0111 1111 */
-
- {illegal,0 }, /* 80: 0100 1100 1000 0000 */
- {illegal,0 }, /* 81: 0100 1100 1000 0001 */
- {illegal,0 }, /* 82: 0100 1100 1000 0010 */
- {illegal,0 }, /* 83: 0100 1100 1000 0011 */
- {illegal,0 }, /* 84: 0100 1100 1000 0100 */
- {illegal,0 }, /* 85: 0100 1100 1000 0101 */
- {illegal,0 }, /* 86: 0100 1100 1000 0110 */
- {illegal,0 }, /* 87: 0100 1100 1000 0111 */
- {illegal,0 }, /* 88: 0100 1100 1000 1000 */
- {illegal,0 }, /* 89: 0100 1100 1000 1001 */
- {illegal,0 }, /* 8a: 0100 1100 1000 1010 */
- {illegal,0 }, /* 8b: 0100 1100 1000 1011 */
- {illegal,0 }, /* 8c: 0100 1100 1000 1100 */
- {illegal,0 }, /* 8d: 0100 1100 1000 1101 */
- {illegal,0 }, /* 8e: 0100 1100 1000 1110 */
- {illegal,0 }, /* 8f: 0100 1100 1000 1111 */
-
- {illegal,0 }, /* 90: 0100 1100 1001 0000 */
- {illegal,0 }, /* 91: 0100 1100 1001 0001 */
- {illegal,0 }, /* 92: 0100 1100 1001 0010 */
- {illegal,0 }, /* 93: 0100 1100 1001 0011 */
- {illegal,0 }, /* 94: 0100 1100 1001 0100 */
- {illegal,0 }, /* 95: 0100 1100 1001 0101 */
- {illegal,0 }, /* 96: 0100 1100 1001 0110 */
- {illegal,0 }, /* 97: 0100 1100 1001 0111 */
- {illegal,0 }, /* 98: 0100 1100 1001 1000 */
- {illegal,0 }, /* 99: 0100 1100 1001 1001 */
- {illegal,0 }, /* 9a: 0100 1100 1001 1010 */
- {illegal,0 }, /* 9b: 0100 1100 1001 1011 */
- {illegal,0 }, /* 9c: 0100 1100 1001 1100 */
- {illegal,0 }, /* 9d: 0100 1100 1001 1101 */
- {illegal,0 }, /* 9e: 0100 1100 1001 1110 */
- {illegal,0 }, /* 9f: 0100 1100 1001 1111 */
-
- {illegal,0 }, /* a0: 0100 1100 1010 0000 */
- {illegal,0 }, /* a1: 0100 1100 1010 0001 */
- {illegal,0 }, /* a2: 0100 1100 1010 0010 */
- {illegal,0 }, /* a3: 0100 1100 1010 0011 */
- {illegal,0 }, /* a4: 0100 1100 1010 0100 */
- {illegal,0 }, /* a5: 0100 1100 1010 0101 */
- {illegal,0 }, /* a6: 0100 1100 1010 0110 */
- {illegal,0 }, /* a7: 0100 1100 1010 0111 */
- {illegal,0 }, /* a8: 0100 1100 1010 1000 */
- {illegal,0 }, /* a9: 0100 1100 1010 1001 */
- {illegal,0 }, /* aa: 0100 1100 1010 1010 */
- {illegal,0 }, /* ab: 0100 1100 1010 1011 */
- {illegal,0 }, /* ac: 0100 1100 1010 1100 */
- {illegal,0 }, /* ad: 0100 1100 1010 1101 */
- {illegal,0 }, /* ae: 0100 1100 1010 1110 */
- {illegal,0 }, /* af: 0100 1100 1010 1111 */
-
- {illegal,0 }, /* b0: 0100 1100 1011 0000 */
- {illegal,0 }, /* b1: 0100 1100 1011 0001 */
- {illegal,0 }, /* b2: 0100 1100 1011 0010 */
- {illegal,0 }, /* b3: 0100 1100 1011 0011 */
- {illegal,0 }, /* b4: 0100 1100 1011 0100 */
- {illegal,0 }, /* b5: 0100 1100 1011 0101 */
- {illegal,0 }, /* b6: 0100 1100 1011 0110 */
- {illegal,0 }, /* b7: 0100 1100 1011 0111 */
- {illegal,0 }, /* b8: 0100 1100 1011 1000 */
- {illegal,0 }, /* b9: 0100 1100 1011 1001 */
- {illegal,0 }, /* ba: 0100 1100 1011 1010 */
- {illegal,0 }, /* bb: 0100 1100 1011 1011 */
- {illegal,0 }, /* bc: 0100 1100 1011 1100 */
- {illegal,0 }, /* bd: 0100 1100 1011 1101 */
- {illegal,0 }, /* be: 0100 1100 1011 1110 */
- {illegal,0 }, /* bf: 0100 1100 1011 1111 */
+ {illegal,nullptr }, /* 00: 0100 1100 0000 0000 */
+ {illegal,nullptr }, /* 01: 0100 1100 0000 0001 */
+ {illegal,nullptr }, /* 02: 0100 1100 0000 0010 */
+ {illegal,nullptr }, /* 03: 0100 1100 0000 0011 */
+ {illegal,nullptr }, /* 04: 0100 1100 0000 0100 */
+ {illegal,nullptr }, /* 05: 0100 1100 0000 0101 */
+ {illegal,nullptr }, /* 06: 0100 1100 0000 0110 */
+ {illegal,nullptr }, /* 07: 0100 1100 0000 0111 */
+ {illegal,nullptr }, /* 08: 0100 1100 0000 1000 */
+ {illegal,nullptr }, /* 09: 0100 1100 0000 1001 */
+ {illegal,nullptr }, /* 0a: 0100 1100 0000 1010 */
+ {illegal,nullptr }, /* 0b: 0100 1100 0000 1011 */
+ {illegal,nullptr }, /* 0c: 0100 1100 0000 1100 */
+ {illegal,nullptr }, /* 0d: 0100 1100 0000 1101 */
+ {illegal,nullptr }, /* 0e: 0100 1100 0000 1110 */
+ {illegal,nullptr }, /* 0f: 0100 1100 0000 1111 */
+
+ {illegal,nullptr }, /* 10: 0100 1100 0001 0000 */
+ {illegal,nullptr }, /* 11: 0100 1100 0001 0001 */
+ {illegal,nullptr }, /* 12: 0100 1100 0001 0010 */
+ {illegal,nullptr }, /* 13: 0100 1100 0001 0011 */
+ {illegal,nullptr }, /* 14: 0100 1100 0001 0100 */
+ {illegal,nullptr }, /* 15: 0100 1100 0001 0101 */
+ {illegal,nullptr }, /* 16: 0100 1100 0001 0110 */
+ {illegal,nullptr }, /* 17: 0100 1100 0001 0111 */
+ {illegal,nullptr }, /* 18: 0100 1100 0001 1000 */
+ {illegal,nullptr }, /* 19: 0100 1100 0001 1001 */
+ {illegal,nullptr }, /* 1a: 0100 1100 0001 1010 */
+ {illegal,nullptr }, /* 1b: 0100 1100 0001 1011 */
+ {illegal,nullptr }, /* 1c: 0100 1100 0001 1100 */
+ {illegal,nullptr }, /* 1d: 0100 1100 0001 1101 */
+ {illegal,nullptr }, /* 1e: 0100 1100 0001 1110 */
+ {illegal,nullptr }, /* 1f: 0100 1100 0001 1111 */
+
+ {illegal,nullptr }, /* 20: 0100 1100 0010 0000 */
+ {illegal,nullptr }, /* 21: 0100 1100 0010 0001 */
+ {illegal,nullptr }, /* 22: 0100 1100 0010 0010 */
+ {illegal,nullptr }, /* 23: 0100 1100 0010 0011 */
+ {illegal,nullptr }, /* 24: 0100 1100 0010 0100 */
+ {illegal,nullptr }, /* 25: 0100 1100 0010 0101 */
+ {illegal,nullptr }, /* 26: 0100 1100 0010 0110 */
+ {illegal,nullptr }, /* 27: 0100 1100 0010 0111 */
+ {illegal,nullptr }, /* 28: 0100 1100 0010 1000 */
+ {illegal,nullptr }, /* 29: 0100 1100 0010 1001 */
+ {illegal,nullptr }, /* 2a: 0100 1100 0010 1010 */
+ {illegal,nullptr }, /* 2b: 0100 1100 0010 1011 */
+ {illegal,nullptr }, /* 2c: 0100 1100 0010 1100 */
+ {illegal,nullptr }, /* 2d: 0100 1100 0010 1101 */
+ {illegal,nullptr }, /* 2e: 0100 1100 0010 1110 */
+ {illegal,nullptr }, /* 2f: 0100 1100 0010 1111 */
+
+ {illegal,nullptr }, /* 30: 0100 1100 0011 0000 */
+ {illegal,nullptr }, /* 31: 0100 1100 0011 0001 */
+ {illegal,nullptr }, /* 32: 0100 1100 0011 0010 */
+ {illegal,nullptr }, /* 33: 0100 1100 0011 0011 */
+ {illegal,nullptr }, /* 34: 0100 1100 0011 0100 */
+ {illegal,nullptr }, /* 35: 0100 1100 0011 0101 */
+ {illegal,nullptr }, /* 36: 0100 1100 0011 0110 */
+ {illegal,nullptr }, /* 37: 0100 1100 0011 0111 */
+ {illegal,nullptr }, /* 38: 0100 1100 0011 1000 */
+ {illegal,nullptr }, /* 39: 0100 1100 0011 1001 */
+ {illegal,nullptr }, /* 3a: 0100 1100 0011 1010 */
+ {illegal,nullptr }, /* 3b: 0100 1100 0011 1011 */
+ {illegal,nullptr }, /* 3c: 0100 1100 0011 1100 */
+ {illegal,nullptr }, /* 3d: 0100 1100 0011 1101 */
+ {illegal,nullptr }, /* 3e: 0100 1100 0011 1110 */
+ {illegal,nullptr }, /* 3f: 0100 1100 0011 1111 */
+
+ {illegal,nullptr }, /* 40: 0100 1100 0100 0000 */
+ {illegal,nullptr }, /* 41: 0100 1100 0100 0001 */
+ {illegal,nullptr }, /* 42: 0100 1100 0100 0010 */
+ {illegal,nullptr }, /* 43: 0100 1100 0100 0011 */
+ {illegal,nullptr }, /* 44: 0100 1100 0100 0100 */
+ {illegal,nullptr }, /* 45: 0100 1100 0100 0101 */
+ {illegal,nullptr }, /* 46: 0100 1100 0100 0110 */
+ {illegal,nullptr }, /* 47: 0100 1100 0100 0111 */
+ {illegal,nullptr }, /* 48: 0100 1100 0100 1000 */
+ {illegal,nullptr }, /* 49: 0100 1100 0100 1001 */
+ {illegal,nullptr }, /* 4a: 0100 1100 0100 1010 */
+ {illegal,nullptr }, /* 4b: 0100 1100 0100 1011 */
+ {illegal,nullptr }, /* 4c: 0100 1100 0100 1100 */
+ {illegal,nullptr }, /* 4d: 0100 1100 0100 1101 */
+ {illegal,nullptr }, /* 4e: 0100 1100 0100 1110 */
+ {illegal,nullptr }, /* 4f: 0100 1100 0100 1111 */
+
+ {illegal,nullptr }, /* 50: 0100 1100 0101 0000 */
+ {illegal,nullptr }, /* 51: 0100 1100 0101 0001 */
+ {illegal,nullptr }, /* 52: 0100 1100 0101 0010 */
+ {illegal,nullptr }, /* 53: 0100 1100 0101 0011 */
+ {illegal,nullptr }, /* 54: 0100 1100 0101 0100 */
+ {illegal,nullptr }, /* 55: 0100 1100 0101 0101 */
+ {illegal,nullptr }, /* 56: 0100 1100 0101 0110 */
+ {illegal,nullptr }, /* 57: 0100 1100 0101 0111 */
+ {illegal,nullptr }, /* 58: 0100 1100 0101 1000 */
+ {illegal,nullptr }, /* 59: 0100 1100 0101 1001 */
+ {illegal,nullptr }, /* 5a: 0100 1100 0101 1010 */
+ {illegal,nullptr }, /* 5b: 0100 1100 0101 1011 */
+ {illegal,nullptr }, /* 5c: 0100 1100 0101 1100 */
+ {illegal,nullptr }, /* 5d: 0100 1100 0101 1101 */
+ {illegal,nullptr }, /* 5e: 0100 1100 0101 1110 */
+ {illegal,nullptr }, /* 5f: 0100 1100 0101 1111 */
+
+ {illegal,nullptr }, /* 60: 0100 1100 0110 0000 */
+ {illegal,nullptr }, /* 61: 0100 1100 0110 0001 */
+ {illegal,nullptr }, /* 62: 0100 1100 0110 0010 */
+ {illegal,nullptr }, /* 63: 0100 1100 0110 0011 */
+ {illegal,nullptr }, /* 64: 0100 1100 0110 0100 */
+ {illegal,nullptr }, /* 65: 0100 1100 0110 0101 */
+ {illegal,nullptr }, /* 66: 0100 1100 0110 0110 */
+ {illegal,nullptr }, /* 67: 0100 1100 0110 0111 */
+ {illegal,nullptr }, /* 68: 0100 1100 0110 1000 */
+ {illegal,nullptr }, /* 69: 0100 1100 0110 1001 */
+ {illegal,nullptr }, /* 6a: 0100 1100 0110 1010 */
+ {illegal,nullptr }, /* 6b: 0100 1100 0110 1011 */
+ {illegal,nullptr }, /* 6c: 0100 1100 0110 1100 */
+ {illegal,nullptr }, /* 6d: 0100 1100 0110 1101 */
+ {illegal,nullptr }, /* 6e: 0100 1100 0110 1110 */
+ {illegal,nullptr }, /* 6f: 0100 1100 0110 1111 */
+
+ {illegal,nullptr }, /* 70: 0100 1100 0111 0000 */
+ {illegal,nullptr }, /* 71: 0100 1100 0111 0001 */
+ {illegal,nullptr }, /* 72: 0100 1100 0111 0010 */
+ {illegal,nullptr }, /* 73: 0100 1100 0111 0011 */
+ {illegal,nullptr }, /* 74: 0100 1100 0111 0100 */
+ {illegal,nullptr }, /* 75: 0100 1100 0111 0101 */
+ {illegal,nullptr }, /* 76: 0100 1100 0111 0110 */
+ {illegal,nullptr }, /* 77: 0100 1100 0111 0111 */
+ {illegal,nullptr }, /* 78: 0100 1100 0111 1000 */
+ {illegal,nullptr }, /* 79: 0100 1100 0111 1001 */
+ {illegal,nullptr }, /* 7a: 0100 1100 0111 1010 */
+ {illegal,nullptr }, /* 7b: 0100 1100 0111 1011 */
+ {illegal,nullptr }, /* 7c: 0100 1100 0111 1100 */
+ {illegal,nullptr }, /* 7d: 0100 1100 0111 1101 */
+ {illegal,nullptr }, /* 7e: 0100 1100 0111 1110 */
+ {illegal,nullptr }, /* 7f: 0100 1100 0111 1111 */
+
+ {illegal,nullptr }, /* 80: 0100 1100 1000 0000 */
+ {illegal,nullptr }, /* 81: 0100 1100 1000 0001 */
+ {illegal,nullptr }, /* 82: 0100 1100 1000 0010 */
+ {illegal,nullptr }, /* 83: 0100 1100 1000 0011 */
+ {illegal,nullptr }, /* 84: 0100 1100 1000 0100 */
+ {illegal,nullptr }, /* 85: 0100 1100 1000 0101 */
+ {illegal,nullptr }, /* 86: 0100 1100 1000 0110 */
+ {illegal,nullptr }, /* 87: 0100 1100 1000 0111 */
+ {illegal,nullptr }, /* 88: 0100 1100 1000 1000 */
+ {illegal,nullptr }, /* 89: 0100 1100 1000 1001 */
+ {illegal,nullptr }, /* 8a: 0100 1100 1000 1010 */
+ {illegal,nullptr }, /* 8b: 0100 1100 1000 1011 */
+ {illegal,nullptr }, /* 8c: 0100 1100 1000 1100 */
+ {illegal,nullptr }, /* 8d: 0100 1100 1000 1101 */
+ {illegal,nullptr }, /* 8e: 0100 1100 1000 1110 */
+ {illegal,nullptr }, /* 8f: 0100 1100 1000 1111 */
+
+ {illegal,nullptr }, /* 90: 0100 1100 1001 0000 */
+ {illegal,nullptr }, /* 91: 0100 1100 1001 0001 */
+ {illegal,nullptr }, /* 92: 0100 1100 1001 0010 */
+ {illegal,nullptr }, /* 93: 0100 1100 1001 0011 */
+ {illegal,nullptr }, /* 94: 0100 1100 1001 0100 */
+ {illegal,nullptr }, /* 95: 0100 1100 1001 0101 */
+ {illegal,nullptr }, /* 96: 0100 1100 1001 0110 */
+ {illegal,nullptr }, /* 97: 0100 1100 1001 0111 */
+ {illegal,nullptr }, /* 98: 0100 1100 1001 1000 */
+ {illegal,nullptr }, /* 99: 0100 1100 1001 1001 */
+ {illegal,nullptr }, /* 9a: 0100 1100 1001 1010 */
+ {illegal,nullptr }, /* 9b: 0100 1100 1001 1011 */
+ {illegal,nullptr }, /* 9c: 0100 1100 1001 1100 */
+ {illegal,nullptr }, /* 9d: 0100 1100 1001 1101 */
+ {illegal,nullptr }, /* 9e: 0100 1100 1001 1110 */
+ {illegal,nullptr }, /* 9f: 0100 1100 1001 1111 */
+
+ {illegal,nullptr }, /* a0: 0100 1100 1010 0000 */
+ {illegal,nullptr }, /* a1: 0100 1100 1010 0001 */
+ {illegal,nullptr }, /* a2: 0100 1100 1010 0010 */
+ {illegal,nullptr }, /* a3: 0100 1100 1010 0011 */
+ {illegal,nullptr }, /* a4: 0100 1100 1010 0100 */
+ {illegal,nullptr }, /* a5: 0100 1100 1010 0101 */
+ {illegal,nullptr }, /* a6: 0100 1100 1010 0110 */
+ {illegal,nullptr }, /* a7: 0100 1100 1010 0111 */
+ {illegal,nullptr }, /* a8: 0100 1100 1010 1000 */
+ {illegal,nullptr }, /* a9: 0100 1100 1010 1001 */
+ {illegal,nullptr }, /* aa: 0100 1100 1010 1010 */
+ {illegal,nullptr }, /* ab: 0100 1100 1010 1011 */
+ {illegal,nullptr }, /* ac: 0100 1100 1010 1100 */
+ {illegal,nullptr }, /* ad: 0100 1100 1010 1101 */
+ {illegal,nullptr }, /* ae: 0100 1100 1010 1110 */
+ {illegal,nullptr }, /* af: 0100 1100 1010 1111 */
+
+ {illegal,nullptr }, /* b0: 0100 1100 1011 0000 */
+ {illegal,nullptr }, /* b1: 0100 1100 1011 0001 */
+ {illegal,nullptr }, /* b2: 0100 1100 1011 0010 */
+ {illegal,nullptr }, /* b3: 0100 1100 1011 0011 */
+ {illegal,nullptr }, /* b4: 0100 1100 1011 0100 */
+ {illegal,nullptr }, /* b5: 0100 1100 1011 0101 */
+ {illegal,nullptr }, /* b6: 0100 1100 1011 0110 */
+ {illegal,nullptr }, /* b7: 0100 1100 1011 0111 */
+ {illegal,nullptr }, /* b8: 0100 1100 1011 1000 */
+ {illegal,nullptr }, /* b9: 0100 1100 1011 1001 */
+ {illegal,nullptr }, /* ba: 0100 1100 1011 1010 */
+ {illegal,nullptr }, /* bb: 0100 1100 1011 1011 */
+ {illegal,nullptr }, /* bc: 0100 1100 1011 1100 */
+ {illegal,nullptr }, /* bd: 0100 1100 1011 1101 */
+ {illegal,nullptr }, /* be: 0100 1100 1011 1110 */
+ {illegal,nullptr }, /* bf: 0100 1100 1011 1111 */
{MOV,"A,PA" }, /* c0: 0100 1100 1100 0000 */
{MOV,"A,PB" }, /* c1: 0100 1100 1100 0001 */
{MOV,"A,PC" }, /* c2: 0100 1100 1100 0010 */
{MOV,"A,PD" }, /* c3: 0100 1100 1100 0011 */
- {illegal,0 }, /* c4: 0100 1100 1100 0100 */
+ {illegal,nullptr }, /* c4: 0100 1100 1100 0100 */
{MOV,"A,PF" }, /* c5: 0100 1100 1100 0101 */
{MOV,"A,MKH" }, /* c6: 0100 1100 1100 0110 */
{MOV,"A,MKL" }, /* c7: 0100 1100 1100 0111 */
{MOV,"A,ANM" }, /* c8: 0100 1100 1100 1000 */ /* 7810 */
{MOV,"A,SMH" }, /* c9: 0100 1100 1100 1001 */
- {illegal,0 }, /* ca: 0100 1100 1100 1010 */
+ {illegal,nullptr }, /* ca: 0100 1100 1100 1010 */
{MOV,"A,EOM" }, /* cb: 0100 1100 1100 1011 */
- {illegal,0 }, /* cc: 0100 1100 1100 1100 */
+ {illegal,nullptr }, /* cc: 0100 1100 1100 1100 */
{MOV,"A,TMM" }, /* cd: 0100 1100 1100 1101 */
- {illegal,0 }, /* ce: 0100 1100 1100 1110 */
- {illegal,0 }, /* cf: 0100 1100 1100 1111 */
-
- {illegal,0 }, /* d0: 0100 1100 1101 0000 */
- {illegal,0 }, /* d1: 0100 1100 1101 0001 */
- {illegal,0 }, /* d2: 0100 1100 1101 0010 */
- {illegal,0 }, /* d3: 0100 1100 1101 0011 */
- {illegal,0 }, /* d4: 0100 1100 1101 0100 */
- {illegal,0 }, /* d5: 0100 1100 1101 0101 */
- {illegal,0 }, /* d6: 0100 1100 1101 0110 */
- {illegal,0 }, /* d7: 0100 1100 1101 0111 */
- {illegal,0 }, /* d8: 0100 1100 1101 1000 */
+ {illegal,nullptr }, /* ce: 0100 1100 1100 1110 */
+ {illegal,nullptr }, /* cf: 0100 1100 1100 1111 */
+
+ {illegal,nullptr }, /* d0: 0100 1100 1101 0000 */
+ {illegal,nullptr }, /* d1: 0100 1100 1101 0001 */
+ {illegal,nullptr }, /* d2: 0100 1100 1101 0010 */
+ {illegal,nullptr }, /* d3: 0100 1100 1101 0011 */
+ {illegal,nullptr }, /* d4: 0100 1100 1101 0100 */
+ {illegal,nullptr }, /* d5: 0100 1100 1101 0101 */
+ {illegal,nullptr }, /* d6: 0100 1100 1101 0110 */
+ {illegal,nullptr }, /* d7: 0100 1100 1101 0111 */
+ {illegal,nullptr }, /* d8: 0100 1100 1101 1000 */
{MOV,"A,RXB" }, /* d9: 0100 1100 1101 1001 */
- {illegal,0 }, /* da: 0100 1100 1101 1010 */
- {illegal,0 }, /* db: 0100 1100 1101 1011 */
- {illegal,0 }, /* dc: 0100 1100 1101 1100 */
- {illegal,0 }, /* dd: 0100 1100 1101 1101 */
- {illegal,0 }, /* de: 0100 1100 1101 1110 */
- {illegal,0 }, /* df: 0100 1100 1101 1111 */
+ {illegal,nullptr }, /* da: 0100 1100 1101 1010 */
+ {illegal,nullptr }, /* db: 0100 1100 1101 1011 */
+ {illegal,nullptr }, /* dc: 0100 1100 1101 1100 */
+ {illegal,nullptr }, /* dd: 0100 1100 1101 1101 */
+ {illegal,nullptr }, /* de: 0100 1100 1101 1110 */
+ {illegal,nullptr }, /* df: 0100 1100 1101 1111 */
{MOV,"A,CR0" }, /* e0: 0100 1100 1110 0000 */ /* 7810 */
{MOV,"A,CR1" }, /* e1: 0100 1100 1110 0001 */ /* 7810 */
{MOV,"A,CR2" }, /* e2: 0100 1100 1110 0010 */ /* 7810 */
{MOV,"A,CR3" }, /* e3: 0100 1100 1110 0011 */ /* 7810 */
- {illegal,0 }, /* e4: 0100 1100 1110 0100 */
- {illegal,0 }, /* e5: 0100 1100 1110 0101 */
- {illegal,0 }, /* e6: 0100 1100 1110 0110 */
- {illegal,0 }, /* e7: 0100 1100 1110 0111 */
- {illegal,0 }, /* e8: 0100 1100 1110 1000 */
- {illegal,0 }, /* e9: 0100 1100 1110 1001 */
- {illegal,0 }, /* ea: 0100 1100 1110 1010 */
- {illegal,0 }, /* eb: 0100 1100 1110 1011 */
- {illegal,0 }, /* ec: 0100 1100 1110 1100 */
- {illegal,0 }, /* ed: 0100 1100 1110 1101 */
- {illegal,0 }, /* ee: 0100 1100 1110 1110 */
- {illegal,0 }, /* ef: 0100 1100 1110 1111 */
-
- {illegal,0 }, /* f0: 0100 1100 1111 0000 */
- {illegal,0 }, /* f1: 0100 1100 1111 0001 */
- {illegal,0 }, /* f2: 0100 1100 1111 0010 */
- {illegal,0 }, /* f3: 0100 1100 1111 0011 */
- {illegal,0 }, /* f4: 0100 1100 1111 0100 */
- {illegal,0 }, /* f5: 0100 1100 1111 0101 */
- {illegal,0 }, /* f6: 0100 1100 1111 0110 */
- {illegal,0 }, /* f7: 0100 1100 1111 0111 */
- {illegal,0 }, /* f8: 0100 1100 1111 1000 */
- {illegal,0 }, /* f9: 0100 1100 1111 1001 */
- {illegal,0 }, /* fa: 0100 1100 1111 1010 */
- {illegal,0 }, /* fb: 0100 1100 1111 1011 */
- {illegal,0 }, /* fc: 0100 1100 1111 1100 */
- {illegal,0 }, /* fd: 0100 1100 1111 1101 */
- {illegal,0 }, /* fe: 0100 1100 1111 1110 */
- {illegal,0 } /* ff: 0100 1100 1111 1111 */
+ {illegal,nullptr }, /* e4: 0100 1100 1110 0100 */
+ {illegal,nullptr }, /* e5: 0100 1100 1110 0101 */
+ {illegal,nullptr }, /* e6: 0100 1100 1110 0110 */
+ {illegal,nullptr }, /* e7: 0100 1100 1110 0111 */
+ {illegal,nullptr }, /* e8: 0100 1100 1110 1000 */
+ {illegal,nullptr }, /* e9: 0100 1100 1110 1001 */
+ {illegal,nullptr }, /* ea: 0100 1100 1110 1010 */
+ {illegal,nullptr }, /* eb: 0100 1100 1110 1011 */
+ {illegal,nullptr }, /* ec: 0100 1100 1110 1100 */
+ {illegal,nullptr }, /* ed: 0100 1100 1110 1101 */
+ {illegal,nullptr }, /* ee: 0100 1100 1110 1110 */
+ {illegal,nullptr }, /* ef: 0100 1100 1110 1111 */
+
+ {illegal,nullptr }, /* f0: 0100 1100 1111 0000 */
+ {illegal,nullptr }, /* f1: 0100 1100 1111 0001 */
+ {illegal,nullptr }, /* f2: 0100 1100 1111 0010 */
+ {illegal,nullptr }, /* f3: 0100 1100 1111 0011 */
+ {illegal,nullptr }, /* f4: 0100 1100 1111 0100 */
+ {illegal,nullptr }, /* f5: 0100 1100 1111 0101 */
+ {illegal,nullptr }, /* f6: 0100 1100 1111 0110 */
+ {illegal,nullptr }, /* f7: 0100 1100 1111 0111 */
+ {illegal,nullptr }, /* f8: 0100 1100 1111 1000 */
+ {illegal,nullptr }, /* f9: 0100 1100 1111 1001 */
+ {illegal,nullptr }, /* fa: 0100 1100 1111 1010 */
+ {illegal,nullptr }, /* fb: 0100 1100 1111 1011 */
+ {illegal,nullptr }, /* fc: 0100 1100 1111 1100 */
+ {illegal,nullptr }, /* fd: 0100 1100 1111 1101 */
+ {illegal,nullptr }, /* fe: 0100 1100 1111 1110 */
+ {illegal,nullptr } /* ff: 0100 1100 1111 1111 */
};
static const struct dasm_s dasm4C_7807[256] =
{
- {illegal,0 }, /* 00: 0100 1100 0000 0000 */
- {illegal,0 }, /* 01: 0100 1100 0000 0001 */
- {illegal,0 }, /* 02: 0100 1100 0000 0010 */
- {illegal,0 }, /* 03: 0100 1100 0000 0011 */
- {illegal,0 }, /* 04: 0100 1100 0000 0100 */
- {illegal,0 }, /* 05: 0100 1100 0000 0101 */
- {illegal,0 }, /* 06: 0100 1100 0000 0110 */
- {illegal,0 }, /* 07: 0100 1100 0000 0111 */
- {illegal,0 }, /* 08: 0100 1100 0000 1000 */
- {illegal,0 }, /* 09: 0100 1100 0000 1001 */
- {illegal,0 }, /* 0a: 0100 1100 0000 1010 */
- {illegal,0 }, /* 0b: 0100 1100 0000 1011 */
- {illegal,0 }, /* 0c: 0100 1100 0000 1100 */
- {illegal,0 }, /* 0d: 0100 1100 0000 1101 */
- {illegal,0 }, /* 0e: 0100 1100 0000 1110 */
- {illegal,0 }, /* 0f: 0100 1100 0000 1111 */
-
- {illegal,0 }, /* 10: 0100 1100 0001 0000 */
- {illegal,0 }, /* 11: 0100 1100 0001 0001 */
- {illegal,0 }, /* 12: 0100 1100 0001 0010 */
- {illegal,0 }, /* 13: 0100 1100 0001 0011 */
- {illegal,0 }, /* 14: 0100 1100 0001 0100 */
- {illegal,0 }, /* 15: 0100 1100 0001 0101 */
- {illegal,0 }, /* 16: 0100 1100 0001 0110 */
- {illegal,0 }, /* 17: 0100 1100 0001 0111 */
- {illegal,0 }, /* 18: 0100 1100 0001 1000 */
- {illegal,0 }, /* 19: 0100 1100 0001 1001 */
- {illegal,0 }, /* 1a: 0100 1100 0001 1010 */
- {illegal,0 }, /* 1b: 0100 1100 0001 1011 */
- {illegal,0 }, /* 1c: 0100 1100 0001 1100 */
- {illegal,0 }, /* 1d: 0100 1100 0001 1101 */
- {illegal,0 }, /* 1e: 0100 1100 0001 1110 */
- {illegal,0 }, /* 1f: 0100 1100 0001 1111 */
-
- {illegal,0 }, /* 20: 0100 1100 0010 0000 */
- {illegal,0 }, /* 21: 0100 1100 0010 0001 */
- {illegal,0 }, /* 22: 0100 1100 0010 0010 */
- {illegal,0 }, /* 23: 0100 1100 0010 0011 */
- {illegal,0 }, /* 24: 0100 1100 0010 0100 */
- {illegal,0 }, /* 25: 0100 1100 0010 0101 */
- {illegal,0 }, /* 26: 0100 1100 0010 0110 */
- {illegal,0 }, /* 27: 0100 1100 0010 0111 */
- {illegal,0 }, /* 28: 0100 1100 0010 1000 */
- {illegal,0 }, /* 29: 0100 1100 0010 1001 */
- {illegal,0 }, /* 2a: 0100 1100 0010 1010 */
- {illegal,0 }, /* 2b: 0100 1100 0010 1011 */
- {illegal,0 }, /* 2c: 0100 1100 0010 1100 */
- {illegal,0 }, /* 2d: 0100 1100 0010 1101 */
- {illegal,0 }, /* 2e: 0100 1100 0010 1110 */
- {illegal,0 }, /* 2f: 0100 1100 0010 1111 */
-
- {illegal,0 }, /* 30: 0100 1100 0011 0000 */
- {illegal,0 }, /* 31: 0100 1100 0011 0001 */
- {illegal,0 }, /* 32: 0100 1100 0011 0010 */
- {illegal,0 }, /* 33: 0100 1100 0011 0011 */
- {illegal,0 }, /* 34: 0100 1100 0011 0100 */
- {illegal,0 }, /* 35: 0100 1100 0011 0101 */
- {illegal,0 }, /* 36: 0100 1100 0011 0110 */
- {illegal,0 }, /* 37: 0100 1100 0011 0111 */
- {illegal,0 }, /* 38: 0100 1100 0011 1000 */
- {illegal,0 }, /* 39: 0100 1100 0011 1001 */
- {illegal,0 }, /* 3a: 0100 1100 0011 1010 */
- {illegal,0 }, /* 3b: 0100 1100 0011 1011 */
- {illegal,0 }, /* 3c: 0100 1100 0011 1100 */
- {illegal,0 }, /* 3d: 0100 1100 0011 1101 */
- {illegal,0 }, /* 3e: 0100 1100 0011 1110 */
- {illegal,0 }, /* 3f: 0100 1100 0011 1111 */
-
- {illegal,0 }, /* 40: 0100 1100 0100 0000 */
- {illegal,0 }, /* 41: 0100 1100 0100 0001 */
- {illegal,0 }, /* 42: 0100 1100 0100 0010 */
- {illegal,0 }, /* 43: 0100 1100 0100 0011 */
- {illegal,0 }, /* 44: 0100 1100 0100 0100 */
- {illegal,0 }, /* 45: 0100 1100 0100 0101 */
- {illegal,0 }, /* 46: 0100 1100 0100 0110 */
- {illegal,0 }, /* 47: 0100 1100 0100 0111 */
- {illegal,0 }, /* 48: 0100 1100 0100 1000 */
- {illegal,0 }, /* 49: 0100 1100 0100 1001 */
- {illegal,0 }, /* 4a: 0100 1100 0100 1010 */
- {illegal,0 }, /* 4b: 0100 1100 0100 1011 */
- {illegal,0 }, /* 4c: 0100 1100 0100 1100 */
- {illegal,0 }, /* 4d: 0100 1100 0100 1101 */
- {illegal,0 }, /* 4e: 0100 1100 0100 1110 */
- {illegal,0 }, /* 4f: 0100 1100 0100 1111 */
-
- {illegal,0 }, /* 50: 0100 1100 0101 0000 */
- {illegal,0 }, /* 51: 0100 1100 0101 0001 */
- {illegal,0 }, /* 52: 0100 1100 0101 0010 */
- {illegal,0 }, /* 53: 0100 1100 0101 0011 */
- {illegal,0 }, /* 54: 0100 1100 0101 0100 */
- {illegal,0 }, /* 55: 0100 1100 0101 0101 */
- {illegal,0 }, /* 56: 0100 1100 0101 0110 */
- {illegal,0 }, /* 57: 0100 1100 0101 0111 */
- {illegal,0 }, /* 58: 0100 1100 0101 1000 */
- {illegal,0 }, /* 59: 0100 1100 0101 1001 */
- {illegal,0 }, /* 5a: 0100 1100 0101 1010 */
- {illegal,0 }, /* 5b: 0100 1100 0101 1011 */
- {illegal,0 }, /* 5c: 0100 1100 0101 1100 */
- {illegal,0 }, /* 5d: 0100 1100 0101 1101 */
- {illegal,0 }, /* 5e: 0100 1100 0101 1110 */
- {illegal,0 }, /* 5f: 0100 1100 0101 1111 */
-
- {illegal,0 }, /* 60: 0100 1100 0110 0000 */
- {illegal,0 }, /* 61: 0100 1100 0110 0001 */
- {illegal,0 }, /* 62: 0100 1100 0110 0010 */
- {illegal,0 }, /* 63: 0100 1100 0110 0011 */
- {illegal,0 }, /* 64: 0100 1100 0110 0100 */
- {illegal,0 }, /* 65: 0100 1100 0110 0101 */
- {illegal,0 }, /* 66: 0100 1100 0110 0110 */
- {illegal,0 }, /* 67: 0100 1100 0110 0111 */
- {illegal,0 }, /* 68: 0100 1100 0110 1000 */
- {illegal,0 }, /* 69: 0100 1100 0110 1001 */
- {illegal,0 }, /* 6a: 0100 1100 0110 1010 */
- {illegal,0 }, /* 6b: 0100 1100 0110 1011 */
- {illegal,0 }, /* 6c: 0100 1100 0110 1100 */
- {illegal,0 }, /* 6d: 0100 1100 0110 1101 */
- {illegal,0 }, /* 6e: 0100 1100 0110 1110 */
- {illegal,0 }, /* 6f: 0100 1100 0110 1111 */
-
- {illegal,0 }, /* 70: 0100 1100 0111 0000 */
- {illegal,0 }, /* 71: 0100 1100 0111 0001 */
- {illegal,0 }, /* 72: 0100 1100 0111 0010 */
- {illegal,0 }, /* 73: 0100 1100 0111 0011 */
- {illegal,0 }, /* 74: 0100 1100 0111 0100 */
- {illegal,0 }, /* 75: 0100 1100 0111 0101 */
- {illegal,0 }, /* 76: 0100 1100 0111 0110 */
- {illegal,0 }, /* 77: 0100 1100 0111 0111 */
- {illegal,0 }, /* 78: 0100 1100 0111 1000 */
- {illegal,0 }, /* 79: 0100 1100 0111 1001 */
- {illegal,0 }, /* 7a: 0100 1100 0111 1010 */
- {illegal,0 }, /* 7b: 0100 1100 0111 1011 */
- {illegal,0 }, /* 7c: 0100 1100 0111 1100 */
- {illegal,0 }, /* 7d: 0100 1100 0111 1101 */
- {illegal,0 }, /* 7e: 0100 1100 0111 1110 */
- {illegal,0 }, /* 7f: 0100 1100 0111 1111 */
-
- {illegal,0 }, /* 80: 0100 1100 1000 0000 */
- {illegal,0 }, /* 81: 0100 1100 1000 0001 */
- {illegal,0 }, /* 82: 0100 1100 1000 0010 */
- {illegal,0 }, /* 83: 0100 1100 1000 0011 */
- {illegal,0 }, /* 84: 0100 1100 1000 0100 */
- {illegal,0 }, /* 85: 0100 1100 1000 0101 */
- {illegal,0 }, /* 86: 0100 1100 1000 0110 */
- {illegal,0 }, /* 87: 0100 1100 1000 0111 */
- {illegal,0 }, /* 88: 0100 1100 1000 1000 */
- {illegal,0 }, /* 89: 0100 1100 1000 1001 */
- {illegal,0 }, /* 8a: 0100 1100 1000 1010 */
- {illegal,0 }, /* 8b: 0100 1100 1000 1011 */
- {illegal,0 }, /* 8c: 0100 1100 1000 1100 */
- {illegal,0 }, /* 8d: 0100 1100 1000 1101 */
- {illegal,0 }, /* 8e: 0100 1100 1000 1110 */
- {illegal,0 }, /* 8f: 0100 1100 1000 1111 */
-
- {illegal,0 }, /* 90: 0100 1100 1001 0000 */
- {illegal,0 }, /* 91: 0100 1100 1001 0001 */
- {illegal,0 }, /* 92: 0100 1100 1001 0010 */
- {illegal,0 }, /* 93: 0100 1100 1001 0011 */
- {illegal,0 }, /* 94: 0100 1100 1001 0100 */
- {illegal,0 }, /* 95: 0100 1100 1001 0101 */
- {illegal,0 }, /* 96: 0100 1100 1001 0110 */
- {illegal,0 }, /* 97: 0100 1100 1001 0111 */
- {illegal,0 }, /* 98: 0100 1100 1001 1000 */
- {illegal,0 }, /* 99: 0100 1100 1001 1001 */
- {illegal,0 }, /* 9a: 0100 1100 1001 1010 */
- {illegal,0 }, /* 9b: 0100 1100 1001 1011 */
- {illegal,0 }, /* 9c: 0100 1100 1001 1100 */
- {illegal,0 }, /* 9d: 0100 1100 1001 1101 */
- {illegal,0 }, /* 9e: 0100 1100 1001 1110 */
- {illegal,0 }, /* 9f: 0100 1100 1001 1111 */
-
- {illegal,0 }, /* a0: 0100 1100 1010 0000 */
- {illegal,0 }, /* a1: 0100 1100 1010 0001 */
- {illegal,0 }, /* a2: 0100 1100 1010 0010 */
- {illegal,0 }, /* a3: 0100 1100 1010 0011 */
- {illegal,0 }, /* a4: 0100 1100 1010 0100 */
- {illegal,0 }, /* a5: 0100 1100 1010 0101 */
- {illegal,0 }, /* a6: 0100 1100 1010 0110 */
- {illegal,0 }, /* a7: 0100 1100 1010 0111 */
- {illegal,0 }, /* a8: 0100 1100 1010 1000 */
- {illegal,0 }, /* a9: 0100 1100 1010 1001 */
- {illegal,0 }, /* aa: 0100 1100 1010 1010 */
- {illegal,0 }, /* ab: 0100 1100 1010 1011 */
- {illegal,0 }, /* ac: 0100 1100 1010 1100 */
- {illegal,0 }, /* ad: 0100 1100 1010 1101 */
- {illegal,0 }, /* ae: 0100 1100 1010 1110 */
- {illegal,0 }, /* af: 0100 1100 1010 1111 */
-
- {illegal,0 }, /* b0: 0100 1100 1011 0000 */
- {illegal,0 }, /* b1: 0100 1100 1011 0001 */
- {illegal,0 }, /* b2: 0100 1100 1011 0010 */
- {illegal,0 }, /* b3: 0100 1100 1011 0011 */
- {illegal,0 }, /* b4: 0100 1100 1011 0100 */
- {illegal,0 }, /* b5: 0100 1100 1011 0101 */
- {illegal,0 }, /* b6: 0100 1100 1011 0110 */
- {illegal,0 }, /* b7: 0100 1100 1011 0111 */
- {illegal,0 }, /* b8: 0100 1100 1011 1000 */
- {illegal,0 }, /* b9: 0100 1100 1011 1001 */
- {illegal,0 }, /* ba: 0100 1100 1011 1010 */
- {illegal,0 }, /* bb: 0100 1100 1011 1011 */
- {illegal,0 }, /* bc: 0100 1100 1011 1100 */
- {illegal,0 }, /* bd: 0100 1100 1011 1101 */
- {illegal,0 }, /* be: 0100 1100 1011 1110 */
- {illegal,0 }, /* bf: 0100 1100 1011 1111 */
+ {illegal,nullptr }, /* 00: 0100 1100 0000 0000 */
+ {illegal,nullptr }, /* 01: 0100 1100 0000 0001 */
+ {illegal,nullptr }, /* 02: 0100 1100 0000 0010 */
+ {illegal,nullptr }, /* 03: 0100 1100 0000 0011 */
+ {illegal,nullptr }, /* 04: 0100 1100 0000 0100 */
+ {illegal,nullptr }, /* 05: 0100 1100 0000 0101 */
+ {illegal,nullptr }, /* 06: 0100 1100 0000 0110 */
+ {illegal,nullptr }, /* 07: 0100 1100 0000 0111 */
+ {illegal,nullptr }, /* 08: 0100 1100 0000 1000 */
+ {illegal,nullptr }, /* 09: 0100 1100 0000 1001 */
+ {illegal,nullptr }, /* 0a: 0100 1100 0000 1010 */
+ {illegal,nullptr }, /* 0b: 0100 1100 0000 1011 */
+ {illegal,nullptr }, /* 0c: 0100 1100 0000 1100 */
+ {illegal,nullptr }, /* 0d: 0100 1100 0000 1101 */
+ {illegal,nullptr }, /* 0e: 0100 1100 0000 1110 */
+ {illegal,nullptr }, /* 0f: 0100 1100 0000 1111 */
+
+ {illegal,nullptr }, /* 10: 0100 1100 0001 0000 */
+ {illegal,nullptr }, /* 11: 0100 1100 0001 0001 */
+ {illegal,nullptr }, /* 12: 0100 1100 0001 0010 */
+ {illegal,nullptr }, /* 13: 0100 1100 0001 0011 */
+ {illegal,nullptr }, /* 14: 0100 1100 0001 0100 */
+ {illegal,nullptr }, /* 15: 0100 1100 0001 0101 */
+ {illegal,nullptr }, /* 16: 0100 1100 0001 0110 */
+ {illegal,nullptr }, /* 17: 0100 1100 0001 0111 */
+ {illegal,nullptr }, /* 18: 0100 1100 0001 1000 */
+ {illegal,nullptr }, /* 19: 0100 1100 0001 1001 */
+ {illegal,nullptr }, /* 1a: 0100 1100 0001 1010 */
+ {illegal,nullptr }, /* 1b: 0100 1100 0001 1011 */
+ {illegal,nullptr }, /* 1c: 0100 1100 0001 1100 */
+ {illegal,nullptr }, /* 1d: 0100 1100 0001 1101 */
+ {illegal,nullptr }, /* 1e: 0100 1100 0001 1110 */
+ {illegal,nullptr }, /* 1f: 0100 1100 0001 1111 */
+
+ {illegal,nullptr }, /* 20: 0100 1100 0010 0000 */
+ {illegal,nullptr }, /* 21: 0100 1100 0010 0001 */
+ {illegal,nullptr }, /* 22: 0100 1100 0010 0010 */
+ {illegal,nullptr }, /* 23: 0100 1100 0010 0011 */
+ {illegal,nullptr }, /* 24: 0100 1100 0010 0100 */
+ {illegal,nullptr }, /* 25: 0100 1100 0010 0101 */
+ {illegal,nullptr }, /* 26: 0100 1100 0010 0110 */
+ {illegal,nullptr }, /* 27: 0100 1100 0010 0111 */
+ {illegal,nullptr }, /* 28: 0100 1100 0010 1000 */
+ {illegal,nullptr }, /* 29: 0100 1100 0010 1001 */
+ {illegal,nullptr }, /* 2a: 0100 1100 0010 1010 */
+ {illegal,nullptr }, /* 2b: 0100 1100 0010 1011 */
+ {illegal,nullptr }, /* 2c: 0100 1100 0010 1100 */
+ {illegal,nullptr }, /* 2d: 0100 1100 0010 1101 */
+ {illegal,nullptr }, /* 2e: 0100 1100 0010 1110 */
+ {illegal,nullptr }, /* 2f: 0100 1100 0010 1111 */
+
+ {illegal,nullptr }, /* 30: 0100 1100 0011 0000 */
+ {illegal,nullptr }, /* 31: 0100 1100 0011 0001 */
+ {illegal,nullptr }, /* 32: 0100 1100 0011 0010 */
+ {illegal,nullptr }, /* 33: 0100 1100 0011 0011 */
+ {illegal,nullptr }, /* 34: 0100 1100 0011 0100 */
+ {illegal,nullptr }, /* 35: 0100 1100 0011 0101 */
+ {illegal,nullptr }, /* 36: 0100 1100 0011 0110 */
+ {illegal,nullptr }, /* 37: 0100 1100 0011 0111 */
+ {illegal,nullptr }, /* 38: 0100 1100 0011 1000 */
+ {illegal,nullptr }, /* 39: 0100 1100 0011 1001 */
+ {illegal,nullptr }, /* 3a: 0100 1100 0011 1010 */
+ {illegal,nullptr }, /* 3b: 0100 1100 0011 1011 */
+ {illegal,nullptr }, /* 3c: 0100 1100 0011 1100 */
+ {illegal,nullptr }, /* 3d: 0100 1100 0011 1101 */
+ {illegal,nullptr }, /* 3e: 0100 1100 0011 1110 */
+ {illegal,nullptr }, /* 3f: 0100 1100 0011 1111 */
+
+ {illegal,nullptr }, /* 40: 0100 1100 0100 0000 */
+ {illegal,nullptr }, /* 41: 0100 1100 0100 0001 */
+ {illegal,nullptr }, /* 42: 0100 1100 0100 0010 */
+ {illegal,nullptr }, /* 43: 0100 1100 0100 0011 */
+ {illegal,nullptr }, /* 44: 0100 1100 0100 0100 */
+ {illegal,nullptr }, /* 45: 0100 1100 0100 0101 */
+ {illegal,nullptr }, /* 46: 0100 1100 0100 0110 */
+ {illegal,nullptr }, /* 47: 0100 1100 0100 0111 */
+ {illegal,nullptr }, /* 48: 0100 1100 0100 1000 */
+ {illegal,nullptr }, /* 49: 0100 1100 0100 1001 */
+ {illegal,nullptr }, /* 4a: 0100 1100 0100 1010 */
+ {illegal,nullptr }, /* 4b: 0100 1100 0100 1011 */
+ {illegal,nullptr }, /* 4c: 0100 1100 0100 1100 */
+ {illegal,nullptr }, /* 4d: 0100 1100 0100 1101 */
+ {illegal,nullptr }, /* 4e: 0100 1100 0100 1110 */
+ {illegal,nullptr }, /* 4f: 0100 1100 0100 1111 */
+
+ {illegal,nullptr }, /* 50: 0100 1100 0101 0000 */
+ {illegal,nullptr }, /* 51: 0100 1100 0101 0001 */
+ {illegal,nullptr }, /* 52: 0100 1100 0101 0010 */
+ {illegal,nullptr }, /* 53: 0100 1100 0101 0011 */
+ {illegal,nullptr }, /* 54: 0100 1100 0101 0100 */
+ {illegal,nullptr }, /* 55: 0100 1100 0101 0101 */
+ {illegal,nullptr }, /* 56: 0100 1100 0101 0110 */
+ {illegal,nullptr }, /* 57: 0100 1100 0101 0111 */
+ {illegal,nullptr }, /* 58: 0100 1100 0101 1000 */
+ {illegal,nullptr }, /* 59: 0100 1100 0101 1001 */
+ {illegal,nullptr }, /* 5a: 0100 1100 0101 1010 */
+ {illegal,nullptr }, /* 5b: 0100 1100 0101 1011 */
+ {illegal,nullptr }, /* 5c: 0100 1100 0101 1100 */
+ {illegal,nullptr }, /* 5d: 0100 1100 0101 1101 */
+ {illegal,nullptr }, /* 5e: 0100 1100 0101 1110 */
+ {illegal,nullptr }, /* 5f: 0100 1100 0101 1111 */
+
+ {illegal,nullptr }, /* 60: 0100 1100 0110 0000 */
+ {illegal,nullptr }, /* 61: 0100 1100 0110 0001 */
+ {illegal,nullptr }, /* 62: 0100 1100 0110 0010 */
+ {illegal,nullptr }, /* 63: 0100 1100 0110 0011 */
+ {illegal,nullptr }, /* 64: 0100 1100 0110 0100 */
+ {illegal,nullptr }, /* 65: 0100 1100 0110 0101 */
+ {illegal,nullptr }, /* 66: 0100 1100 0110 0110 */
+ {illegal,nullptr }, /* 67: 0100 1100 0110 0111 */
+ {illegal,nullptr }, /* 68: 0100 1100 0110 1000 */
+ {illegal,nullptr }, /* 69: 0100 1100 0110 1001 */
+ {illegal,nullptr }, /* 6a: 0100 1100 0110 1010 */
+ {illegal,nullptr }, /* 6b: 0100 1100 0110 1011 */
+ {illegal,nullptr }, /* 6c: 0100 1100 0110 1100 */
+ {illegal,nullptr }, /* 6d: 0100 1100 0110 1101 */
+ {illegal,nullptr }, /* 6e: 0100 1100 0110 1110 */
+ {illegal,nullptr }, /* 6f: 0100 1100 0110 1111 */
+
+ {illegal,nullptr }, /* 70: 0100 1100 0111 0000 */
+ {illegal,nullptr }, /* 71: 0100 1100 0111 0001 */
+ {illegal,nullptr }, /* 72: 0100 1100 0111 0010 */
+ {illegal,nullptr }, /* 73: 0100 1100 0111 0011 */
+ {illegal,nullptr }, /* 74: 0100 1100 0111 0100 */
+ {illegal,nullptr }, /* 75: 0100 1100 0111 0101 */
+ {illegal,nullptr }, /* 76: 0100 1100 0111 0110 */
+ {illegal,nullptr }, /* 77: 0100 1100 0111 0111 */
+ {illegal,nullptr }, /* 78: 0100 1100 0111 1000 */
+ {illegal,nullptr }, /* 79: 0100 1100 0111 1001 */
+ {illegal,nullptr }, /* 7a: 0100 1100 0111 1010 */
+ {illegal,nullptr }, /* 7b: 0100 1100 0111 1011 */
+ {illegal,nullptr }, /* 7c: 0100 1100 0111 1100 */
+ {illegal,nullptr }, /* 7d: 0100 1100 0111 1101 */
+ {illegal,nullptr }, /* 7e: 0100 1100 0111 1110 */
+ {illegal,nullptr }, /* 7f: 0100 1100 0111 1111 */
+
+ {illegal,nullptr }, /* 80: 0100 1100 1000 0000 */
+ {illegal,nullptr }, /* 81: 0100 1100 1000 0001 */
+ {illegal,nullptr }, /* 82: 0100 1100 1000 0010 */
+ {illegal,nullptr }, /* 83: 0100 1100 1000 0011 */
+ {illegal,nullptr }, /* 84: 0100 1100 1000 0100 */
+ {illegal,nullptr }, /* 85: 0100 1100 1000 0101 */
+ {illegal,nullptr }, /* 86: 0100 1100 1000 0110 */
+ {illegal,nullptr }, /* 87: 0100 1100 1000 0111 */
+ {illegal,nullptr }, /* 88: 0100 1100 1000 1000 */
+ {illegal,nullptr }, /* 89: 0100 1100 1000 1001 */
+ {illegal,nullptr }, /* 8a: 0100 1100 1000 1010 */
+ {illegal,nullptr }, /* 8b: 0100 1100 1000 1011 */
+ {illegal,nullptr }, /* 8c: 0100 1100 1000 1100 */
+ {illegal,nullptr }, /* 8d: 0100 1100 1000 1101 */
+ {illegal,nullptr }, /* 8e: 0100 1100 1000 1110 */
+ {illegal,nullptr }, /* 8f: 0100 1100 1000 1111 */
+
+ {illegal,nullptr }, /* 90: 0100 1100 1001 0000 */
+ {illegal,nullptr }, /* 91: 0100 1100 1001 0001 */
+ {illegal,nullptr }, /* 92: 0100 1100 1001 0010 */
+ {illegal,nullptr }, /* 93: 0100 1100 1001 0011 */
+ {illegal,nullptr }, /* 94: 0100 1100 1001 0100 */
+ {illegal,nullptr }, /* 95: 0100 1100 1001 0101 */
+ {illegal,nullptr }, /* 96: 0100 1100 1001 0110 */
+ {illegal,nullptr }, /* 97: 0100 1100 1001 0111 */
+ {illegal,nullptr }, /* 98: 0100 1100 1001 1000 */
+ {illegal,nullptr }, /* 99: 0100 1100 1001 1001 */
+ {illegal,nullptr }, /* 9a: 0100 1100 1001 1010 */
+ {illegal,nullptr }, /* 9b: 0100 1100 1001 1011 */
+ {illegal,nullptr }, /* 9c: 0100 1100 1001 1100 */
+ {illegal,nullptr }, /* 9d: 0100 1100 1001 1101 */
+ {illegal,nullptr }, /* 9e: 0100 1100 1001 1110 */
+ {illegal,nullptr }, /* 9f: 0100 1100 1001 1111 */
+
+ {illegal,nullptr }, /* a0: 0100 1100 1010 0000 */
+ {illegal,nullptr }, /* a1: 0100 1100 1010 0001 */
+ {illegal,nullptr }, /* a2: 0100 1100 1010 0010 */
+ {illegal,nullptr }, /* a3: 0100 1100 1010 0011 */
+ {illegal,nullptr }, /* a4: 0100 1100 1010 0100 */
+ {illegal,nullptr }, /* a5: 0100 1100 1010 0101 */
+ {illegal,nullptr }, /* a6: 0100 1100 1010 0110 */
+ {illegal,nullptr }, /* a7: 0100 1100 1010 0111 */
+ {illegal,nullptr }, /* a8: 0100 1100 1010 1000 */
+ {illegal,nullptr }, /* a9: 0100 1100 1010 1001 */
+ {illegal,nullptr }, /* aa: 0100 1100 1010 1010 */
+ {illegal,nullptr }, /* ab: 0100 1100 1010 1011 */
+ {illegal,nullptr }, /* ac: 0100 1100 1010 1100 */
+ {illegal,nullptr }, /* ad: 0100 1100 1010 1101 */
+ {illegal,nullptr }, /* ae: 0100 1100 1010 1110 */
+ {illegal,nullptr }, /* af: 0100 1100 1010 1111 */
+
+ {illegal,nullptr }, /* b0: 0100 1100 1011 0000 */
+ {illegal,nullptr }, /* b1: 0100 1100 1011 0001 */
+ {illegal,nullptr }, /* b2: 0100 1100 1011 0010 */
+ {illegal,nullptr }, /* b3: 0100 1100 1011 0011 */
+ {illegal,nullptr }, /* b4: 0100 1100 1011 0100 */
+ {illegal,nullptr }, /* b5: 0100 1100 1011 0101 */
+ {illegal,nullptr }, /* b6: 0100 1100 1011 0110 */
+ {illegal,nullptr }, /* b7: 0100 1100 1011 0111 */
+ {illegal,nullptr }, /* b8: 0100 1100 1011 1000 */
+ {illegal,nullptr }, /* b9: 0100 1100 1011 1001 */
+ {illegal,nullptr }, /* ba: 0100 1100 1011 1010 */
+ {illegal,nullptr }, /* bb: 0100 1100 1011 1011 */
+ {illegal,nullptr }, /* bc: 0100 1100 1011 1100 */
+ {illegal,nullptr }, /* bd: 0100 1100 1011 1101 */
+ {illegal,nullptr }, /* be: 0100 1100 1011 1110 */
+ {illegal,nullptr }, /* bf: 0100 1100 1011 1111 */
{MOV,"A,PA" }, /* c0: 0100 1100 1100 0000 */
{MOV,"A,PB" }, /* c1: 0100 1100 1100 0001 */
{MOV,"A,PC" }, /* c2: 0100 1100 1100 0010 */
{MOV,"A,PD" }, /* c3: 0100 1100 1100 0011 */
- {illegal,0 }, /* c4: 0100 1100 1100 0100 */
+ {illegal,nullptr }, /* c4: 0100 1100 1100 0100 */
{MOV,"A,PF" }, /* c5: 0100 1100 1100 0101 */
{MOV,"A,MKH" }, /* c6: 0100 1100 1100 0110 */
{MOV,"A,MKL" }, /* c7: 0100 1100 1100 0111 */
- {illegal,0 }, /* c8: 0100 1100 1100 1000 */
+ {illegal,nullptr }, /* c8: 0100 1100 1100 1000 */
{MOV,"A,SMH" }, /* c9: 0100 1100 1100 1001 */
- {illegal,0 }, /* ca: 0100 1100 1100 1010 */
+ {illegal,nullptr }, /* ca: 0100 1100 1100 1010 */
{MOV,"A,EOM" }, /* cb: 0100 1100 1100 1011 */
- {illegal,0 }, /* cc: 0100 1100 1100 1100 */
+ {illegal,nullptr }, /* cc: 0100 1100 1100 1100 */
{MOV,"A,TMM" }, /* cd: 0100 1100 1100 1101 */
{MOV,"A,PT" }, /* ce: 0100 1100 1100 1110 */ /* 7807 */
- {illegal,0 }, /* cf: 0100 1100 1100 1111 */
-
- {illegal,0 }, /* d0: 0100 1100 1101 0000 */
- {illegal,0 }, /* d1: 0100 1100 1101 0001 */
- {illegal,0 }, /* d2: 0100 1100 1101 0010 */
- {illegal,0 }, /* d3: 0100 1100 1101 0011 */
- {illegal,0 }, /* d4: 0100 1100 1101 0100 */
- {illegal,0 }, /* d5: 0100 1100 1101 0101 */
- {illegal,0 }, /* d6: 0100 1100 1101 0110 */
- {illegal,0 }, /* d7: 0100 1100 1101 0111 */
- {illegal,0 }, /* d8: 0100 1100 1101 1000 */
+ {illegal,nullptr }, /* cf: 0100 1100 1100 1111 */
+
+ {illegal,nullptr }, /* d0: 0100 1100 1101 0000 */
+ {illegal,nullptr }, /* d1: 0100 1100 1101 0001 */
+ {illegal,nullptr }, /* d2: 0100 1100 1101 0010 */
+ {illegal,nullptr }, /* d3: 0100 1100 1101 0011 */
+ {illegal,nullptr }, /* d4: 0100 1100 1101 0100 */
+ {illegal,nullptr }, /* d5: 0100 1100 1101 0101 */
+ {illegal,nullptr }, /* d6: 0100 1100 1101 0110 */
+ {illegal,nullptr }, /* d7: 0100 1100 1101 0111 */
+ {illegal,nullptr }, /* d8: 0100 1100 1101 1000 */
{MOV,"A,RXB" }, /* d9: 0100 1100 1101 1001 */
- {illegal,0 }, /* da: 0100 1100 1101 1010 */
- {illegal,0 }, /* db: 0100 1100 1101 1011 */
- {illegal,0 }, /* dc: 0100 1100 1101 1100 */
- {illegal,0 }, /* dd: 0100 1100 1101 1101 */
- {illegal,0 }, /* de: 0100 1100 1101 1110 */
- {illegal,0 }, /* df: 0100 1100 1101 1111 */
-
- {illegal,0 }, /* e0: 0100 1100 1110 0000 */
- {illegal,0 }, /* e1: 0100 1100 1110 0001 */
- {illegal,0 }, /* e2: 0100 1100 1110 0010 */
- {illegal,0 }, /* e3: 0100 1100 1110 0011 */
- {illegal,0 }, /* e4: 0100 1100 1110 0100 */
- {illegal,0 }, /* e5: 0100 1100 1110 0101 */
- {illegal,0 }, /* e6: 0100 1100 1110 0110 */
- {illegal,0 }, /* e7: 0100 1100 1110 0111 */
- {illegal,0 }, /* e8: 0100 1100 1110 1000 */
- {illegal,0 }, /* e9: 0100 1100 1110 1001 */
- {illegal,0 }, /* ea: 0100 1100 1110 1010 */
- {illegal,0 }, /* eb: 0100 1100 1110 1011 */
- {illegal,0 }, /* ec: 0100 1100 1110 1100 */
- {illegal,0 }, /* ed: 0100 1100 1110 1101 */
- {illegal,0 }, /* ee: 0100 1100 1110 1110 */
- {illegal,0 }, /* ef: 0100 1100 1110 1111 */
-
- {illegal,0 }, /* f0: 0100 1100 1111 0000 */
- {illegal,0 }, /* f1: 0100 1100 1111 0001 */
- {illegal,0 }, /* f2: 0100 1100 1111 0010 */
- {illegal,0 }, /* f3: 0100 1100 1111 0011 */
- {illegal,0 }, /* f4: 0100 1100 1111 0100 */
- {illegal,0 }, /* f5: 0100 1100 1111 0101 */
- {illegal,0 }, /* f6: 0100 1100 1111 0110 */
- {illegal,0 }, /* f7: 0100 1100 1111 0111 */
- {illegal,0 }, /* f8: 0100 1100 1111 1000 */
- {illegal,0 }, /* f9: 0100 1100 1111 1001 */
- {illegal,0 }, /* fa: 0100 1100 1111 1010 */
- {illegal,0 }, /* fb: 0100 1100 1111 1011 */
- {illegal,0 }, /* fc: 0100 1100 1111 1100 */
- {illegal,0 }, /* fd: 0100 1100 1111 1101 */
- {illegal,0 }, /* fe: 0100 1100 1111 1110 */
- {illegal,0 } /* ff: 0100 1100 1111 1111 */
+ {illegal,nullptr }, /* da: 0100 1100 1101 1010 */
+ {illegal,nullptr }, /* db: 0100 1100 1101 1011 */
+ {illegal,nullptr }, /* dc: 0100 1100 1101 1100 */
+ {illegal,nullptr }, /* dd: 0100 1100 1101 1101 */
+ {illegal,nullptr }, /* de: 0100 1100 1101 1110 */
+ {illegal,nullptr }, /* df: 0100 1100 1101 1111 */
+
+ {illegal,nullptr }, /* e0: 0100 1100 1110 0000 */
+ {illegal,nullptr }, /* e1: 0100 1100 1110 0001 */
+ {illegal,nullptr }, /* e2: 0100 1100 1110 0010 */
+ {illegal,nullptr }, /* e3: 0100 1100 1110 0011 */
+ {illegal,nullptr }, /* e4: 0100 1100 1110 0100 */
+ {illegal,nullptr }, /* e5: 0100 1100 1110 0101 */
+ {illegal,nullptr }, /* e6: 0100 1100 1110 0110 */
+ {illegal,nullptr }, /* e7: 0100 1100 1110 0111 */
+ {illegal,nullptr }, /* e8: 0100 1100 1110 1000 */
+ {illegal,nullptr }, /* e9: 0100 1100 1110 1001 */
+ {illegal,nullptr }, /* ea: 0100 1100 1110 1010 */
+ {illegal,nullptr }, /* eb: 0100 1100 1110 1011 */
+ {illegal,nullptr }, /* ec: 0100 1100 1110 1100 */
+ {illegal,nullptr }, /* ed: 0100 1100 1110 1101 */
+ {illegal,nullptr }, /* ee: 0100 1100 1110 1110 */
+ {illegal,nullptr }, /* ef: 0100 1100 1110 1111 */
+
+ {illegal,nullptr }, /* f0: 0100 1100 1111 0000 */
+ {illegal,nullptr }, /* f1: 0100 1100 1111 0001 */
+ {illegal,nullptr }, /* f2: 0100 1100 1111 0010 */
+ {illegal,nullptr }, /* f3: 0100 1100 1111 0011 */
+ {illegal,nullptr }, /* f4: 0100 1100 1111 0100 */
+ {illegal,nullptr }, /* f5: 0100 1100 1111 0101 */
+ {illegal,nullptr }, /* f6: 0100 1100 1111 0110 */
+ {illegal,nullptr }, /* f7: 0100 1100 1111 0111 */
+ {illegal,nullptr }, /* f8: 0100 1100 1111 1000 */
+ {illegal,nullptr }, /* f9: 0100 1100 1111 1001 */
+ {illegal,nullptr }, /* fa: 0100 1100 1111 1010 */
+ {illegal,nullptr }, /* fb: 0100 1100 1111 1011 */
+ {illegal,nullptr }, /* fc: 0100 1100 1111 1100 */
+ {illegal,nullptr }, /* fd: 0100 1100 1111 1101 */
+ {illegal,nullptr }, /* fe: 0100 1100 1111 1110 */
+ {illegal,nullptr } /* ff: 0100 1100 1111 1111 */
};
/* prefix 4D */
static const struct dasm_s dasm4D_7810[256] =
{
- {illegal,0 }, /* 00: 0100 1101 0000 0000 */
- {illegal,0 }, /* 01: 0100 1101 0000 0001 */
- {illegal,0 }, /* 02: 0100 1101 0000 0010 */
- {illegal,0 }, /* 03: 0100 1101 0000 0011 */
- {illegal,0 }, /* 04: 0100 1101 0000 0100 */
- {illegal,0 }, /* 05: 0100 1101 0000 0101 */
- {illegal,0 }, /* 06: 0100 1101 0000 0110 */
- {illegal,0 }, /* 07: 0100 1101 0000 0111 */
- {illegal,0 }, /* 08: 0100 1101 0000 1000 */
- {illegal,0 }, /* 09: 0100 1101 0000 1001 */
- {illegal,0 }, /* 0a: 0100 1101 0000 1010 */
- {illegal,0 }, /* 0b: 0100 1101 0000 1011 */
- {illegal,0 }, /* 0c: 0100 1101 0000 1100 */
- {illegal,0 }, /* 0d: 0100 1101 0000 1101 */
- {illegal,0 }, /* 0e: 0100 1101 0000 1110 */
- {illegal,0 }, /* 0f: 0100 1101 0000 1111 */
-
- {illegal,0 }, /* 10: 0100 1101 0001 0000 */
- {illegal,0 }, /* 11: 0100 1101 0001 0001 */
- {illegal,0 }, /* 12: 0100 1101 0001 0010 */
- {illegal,0 }, /* 13: 0100 1101 0001 0011 */
- {illegal,0 }, /* 14: 0100 1101 0001 0100 */
- {illegal,0 }, /* 15: 0100 1101 0001 0101 */
- {illegal,0 }, /* 16: 0100 1101 0001 0110 */
- {illegal,0 }, /* 17: 0100 1101 0001 0111 */
- {illegal,0 }, /* 18: 0100 1101 0001 1000 */
- {illegal,0 }, /* 19: 0100 1101 0001 1001 */
- {illegal,0 }, /* 1a: 0100 1101 0001 1010 */
- {illegal,0 }, /* 1b: 0100 1101 0001 1011 */
- {illegal,0 }, /* 1c: 0100 1101 0001 1100 */
- {illegal,0 }, /* 1d: 0100 1101 0001 1101 */
- {illegal,0 }, /* 1e: 0100 1101 0001 1110 */
- {illegal,0 }, /* 1f: 0100 1101 0001 1111 */
-
- {illegal,0 }, /* 20: 0100 1101 0010 0000 */
- {illegal,0 }, /* 21: 0100 1101 0010 0001 */
- {illegal,0 }, /* 22: 0100 1101 0010 0010 */
- {illegal,0 }, /* 23: 0100 1101 0010 0011 */
- {illegal,0 }, /* 24: 0100 1101 0010 0100 */
- {illegal,0 }, /* 25: 0100 1101 0010 0101 */
- {illegal,0 }, /* 26: 0100 1101 0010 0110 */
- {illegal,0 }, /* 27: 0100 1101 0010 0111 */
- {illegal,0 }, /* 28: 0100 1101 0010 1000 */
- {illegal,0 }, /* 29: 0100 1101 0010 1001 */
- {illegal,0 }, /* 2a: 0100 1101 0010 1010 */
- {illegal,0 }, /* 2b: 0100 1101 0010 1011 */
- {illegal,0 }, /* 2c: 0100 1101 0010 1100 */
- {illegal,0 }, /* 2d: 0100 1101 0010 1101 */
- {illegal,0 }, /* 2e: 0100 1101 0010 1110 */
- {illegal,0 }, /* 2f: 0100 1101 0010 1111 */
-
- {illegal,0 }, /* 30: 0100 1101 0011 0000 */
- {illegal,0 }, /* 31: 0100 1101 0011 0001 */
- {illegal,0 }, /* 32: 0100 1101 0011 0010 */
- {illegal,0 }, /* 33: 0100 1101 0011 0011 */
- {illegal,0 }, /* 34: 0100 1101 0011 0100 */
- {illegal,0 }, /* 35: 0100 1101 0011 0101 */
- {illegal,0 }, /* 36: 0100 1101 0011 0110 */
- {illegal,0 }, /* 37: 0100 1101 0011 0111 */
- {illegal,0 }, /* 38: 0100 1101 0011 1000 */
- {illegal,0 }, /* 39: 0100 1101 0011 1001 */
- {illegal,0 }, /* 3a: 0100 1101 0011 1010 */
- {illegal,0 }, /* 3b: 0100 1101 0011 1011 */
- {illegal,0 }, /* 3c: 0100 1101 0011 1100 */
- {illegal,0 }, /* 3d: 0100 1101 0011 1101 */
- {illegal,0 }, /* 3e: 0100 1101 0011 1110 */
- {illegal,0 }, /* 3f: 0100 1101 0011 1111 */
-
- {illegal,0 }, /* 40: 0100 1101 0100 0000 */
- {illegal,0 }, /* 41: 0100 1101 0100 0001 */
- {illegal,0 }, /* 42: 0100 1101 0100 0010 */
- {illegal,0 }, /* 43: 0100 1101 0100 0011 */
- {illegal,0 }, /* 44: 0100 1101 0100 0100 */
- {illegal,0 }, /* 45: 0100 1101 0100 0101 */
- {illegal,0 }, /* 46: 0100 1101 0100 0110 */
- {illegal,0 }, /* 47: 0100 1101 0100 0111 */
- {illegal,0 }, /* 48: 0100 1101 0100 1000 */
- {illegal,0 }, /* 49: 0100 1101 0100 1001 */
- {illegal,0 }, /* 4a: 0100 1101 0100 1010 */
- {illegal,0 }, /* 4b: 0100 1101 0100 1011 */
- {illegal,0 }, /* 4c: 0100 1101 0100 1100 */
- {illegal,0 }, /* 4d: 0100 1101 0100 1101 */
- {illegal,0 }, /* 4e: 0100 1101 0100 1110 */
- {illegal,0 }, /* 4f: 0100 1101 0100 1111 */
-
- {illegal,0 }, /* 50: 0100 1101 0101 0000 */
- {illegal,0 }, /* 51: 0100 1101 0101 0001 */
- {illegal,0 }, /* 52: 0100 1101 0101 0010 */
- {illegal,0 }, /* 53: 0100 1101 0101 0011 */
- {illegal,0 }, /* 54: 0100 1101 0101 0100 */
- {illegal,0 }, /* 55: 0100 1101 0101 0101 */
- {illegal,0 }, /* 56: 0100 1101 0101 0110 */
- {illegal,0 }, /* 57: 0100 1101 0101 0111 */
- {illegal,0 }, /* 58: 0100 1101 0101 1000 */
- {illegal,0 }, /* 59: 0100 1101 0101 1001 */
- {illegal,0 }, /* 5a: 0100 1101 0101 1010 */
- {illegal,0 }, /* 5b: 0100 1101 0101 1011 */
- {illegal,0 }, /* 5c: 0100 1101 0101 1100 */
- {illegal,0 }, /* 5d: 0100 1101 0101 1101 */
- {illegal,0 }, /* 5e: 0100 1101 0101 1110 */
- {illegal,0 }, /* 5f: 0100 1101 0101 1111 */
-
- {illegal,0 }, /* 60: 0100 1101 0110 0000 */
- {illegal,0 }, /* 61: 0100 1101 0110 0001 */
- {illegal,0 }, /* 62: 0100 1101 0110 0010 */
- {illegal,0 }, /* 63: 0100 1101 0110 0011 */
- {illegal,0 }, /* 64: 0100 1101 0110 0100 */
- {illegal,0 }, /* 65: 0100 1101 0110 0101 */
- {illegal,0 }, /* 66: 0100 1101 0110 0110 */
- {illegal,0 }, /* 67: 0100 1101 0110 0111 */
- {illegal,0 }, /* 68: 0100 1101 0110 1000 */
- {illegal,0 }, /* 69: 0100 1101 0110 1001 */
- {illegal,0 }, /* 6a: 0100 1101 0110 1010 */
- {illegal,0 }, /* 6b: 0100 1101 0110 1011 */
- {illegal,0 }, /* 6c: 0100 1101 0110 1100 */
- {illegal,0 }, /* 6d: 0100 1101 0110 1101 */
- {illegal,0 }, /* 6e: 0100 1101 0110 1110 */
- {illegal,0 }, /* 6f: 0100 1101 0110 1111 */
-
- {illegal,0 }, /* 70: 0100 1101 0111 0000 */
- {illegal,0 }, /* 71: 0100 1101 0111 0001 */
- {illegal,0 }, /* 72: 0100 1101 0111 0010 */
- {illegal,0 }, /* 73: 0100 1101 0111 0011 */
- {illegal,0 }, /* 74: 0100 1101 0111 0100 */
- {illegal,0 }, /* 75: 0100 1101 0111 0101 */
- {illegal,0 }, /* 76: 0100 1101 0111 0110 */
- {illegal,0 }, /* 77: 0100 1101 0111 0111 */
- {illegal,0 }, /* 78: 0100 1101 0111 1000 */
- {illegal,0 }, /* 79: 0100 1101 0111 1001 */
- {illegal,0 }, /* 7a: 0100 1101 0111 1010 */
- {illegal,0 }, /* 7b: 0100 1101 0111 1011 */
- {illegal,0 }, /* 7c: 0100 1101 0111 1100 */
- {illegal,0 }, /* 7d: 0100 1101 0111 1101 */
- {illegal,0 }, /* 7e: 0100 1101 0111 1110 */
- {illegal,0 }, /* 7f: 0100 1101 0111 1111 */
-
- {illegal,0 }, /* 80: 0100 1101 1000 0000 */
- {illegal,0 }, /* 81: 0100 1101 1000 0001 */
- {illegal,0 }, /* 82: 0100 1101 1000 0010 */
- {illegal,0 }, /* 83: 0100 1101 1000 0011 */
- {illegal,0 }, /* 84: 0100 1101 1000 0100 */
- {illegal,0 }, /* 85: 0100 1101 1000 0101 */
- {illegal,0 }, /* 86: 0100 1101 1000 0110 */
- {illegal,0 }, /* 87: 0100 1101 1000 0111 */
- {illegal,0 }, /* 88: 0100 1101 1000 1000 */
- {illegal,0 }, /* 89: 0100 1101 1000 1001 */
- {illegal,0 }, /* 8a: 0100 1101 1000 1010 */
- {illegal,0 }, /* 8b: 0100 1101 1000 1011 */
- {illegal,0 }, /* 8c: 0100 1101 1000 1100 */
- {illegal,0 }, /* 8d: 0100 1101 1000 1101 */
- {illegal,0 }, /* 8e: 0100 1101 1000 1110 */
- {illegal,0 }, /* 8f: 0100 1101 1000 1111 */
-
- {illegal,0 }, /* 90: 0100 1101 1001 0000 */
- {illegal,0 }, /* 91: 0100 1101 1001 0001 */
- {illegal,0 }, /* 92: 0100 1101 1001 0010 */
- {illegal,0 }, /* 93: 0100 1101 1001 0011 */
- {illegal,0 }, /* 94: 0100 1101 1001 0100 */
- {illegal,0 }, /* 95: 0100 1101 1001 0101 */
- {illegal,0 }, /* 96: 0100 1101 1001 0110 */
- {illegal,0 }, /* 97: 0100 1101 1001 0111 */
- {illegal,0 }, /* 98: 0100 1101 1001 1000 */
- {illegal,0 }, /* 99: 0100 1101 1001 1001 */
- {illegal,0 }, /* 9a: 0100 1101 1001 1010 */
- {illegal,0 }, /* 9b: 0100 1101 1001 1011 */
- {illegal,0 }, /* 9c: 0100 1101 1001 1100 */
- {illegal,0 }, /* 9d: 0100 1101 1001 1101 */
- {illegal,0 }, /* 9e: 0100 1101 1001 1110 */
- {illegal,0 }, /* 9f: 0100 1101 1001 1111 */
-
- {illegal,0 }, /* a0: 0100 1101 1010 0000 */
- {illegal,0 }, /* a1: 0100 1101 1010 0001 */
- {illegal,0 }, /* a2: 0100 1101 1010 0010 */
- {illegal,0 }, /* a3: 0100 1101 1010 0011 */
- {illegal,0 }, /* a4: 0100 1101 1010 0100 */
- {illegal,0 }, /* a5: 0100 1101 1010 0101 */
- {illegal,0 }, /* a6: 0100 1101 1010 0110 */
- {illegal,0 }, /* a7: 0100 1101 1010 0111 */
- {illegal,0 }, /* a8: 0100 1101 1010 1000 */
- {illegal,0 }, /* a9: 0100 1101 1010 1001 */
- {illegal,0 }, /* aa: 0100 1101 1010 1010 */
- {illegal,0 }, /* ab: 0100 1101 1010 1011 */
- {illegal,0 }, /* ac: 0100 1101 1010 1100 */
- {illegal,0 }, /* ad: 0100 1101 1010 1101 */
- {illegal,0 }, /* ae: 0100 1101 1010 1110 */
- {illegal,0 }, /* af: 0100 1101 1010 1111 */
-
- {illegal,0 }, /* b0: 0100 1101 1011 0000 */
- {illegal,0 }, /* b1: 0100 1101 1011 0001 */
- {illegal,0 }, /* b2: 0100 1101 1011 0010 */
- {illegal,0 }, /* b3: 0100 1101 1011 0011 */
- {illegal,0 }, /* b4: 0100 1101 1011 0100 */
- {illegal,0 }, /* b5: 0100 1101 1011 0101 */
- {illegal,0 }, /* b6: 0100 1101 1011 0110 */
- {illegal,0 }, /* b7: 0100 1101 1011 0111 */
- {illegal,0 }, /* b8: 0100 1101 1011 1000 */
- {illegal,0 }, /* b9: 0100 1101 1011 1001 */
- {illegal,0 }, /* ba: 0100 1101 1011 1010 */
- {illegal,0 }, /* bb: 0100 1101 1011 1011 */
- {illegal,0 }, /* bc: 0100 1101 1011 1100 */
- {illegal,0 }, /* bd: 0100 1101 1011 1101 */
- {illegal,0 }, /* be: 0100 1101 1011 1110 */
- {illegal,0 }, /* bf: 0100 1101 1011 1111 */
+ {illegal,nullptr }, /* 00: 0100 1101 0000 0000 */
+ {illegal,nullptr }, /* 01: 0100 1101 0000 0001 */
+ {illegal,nullptr }, /* 02: 0100 1101 0000 0010 */
+ {illegal,nullptr }, /* 03: 0100 1101 0000 0011 */
+ {illegal,nullptr }, /* 04: 0100 1101 0000 0100 */
+ {illegal,nullptr }, /* 05: 0100 1101 0000 0101 */
+ {illegal,nullptr }, /* 06: 0100 1101 0000 0110 */
+ {illegal,nullptr }, /* 07: 0100 1101 0000 0111 */
+ {illegal,nullptr }, /* 08: 0100 1101 0000 1000 */
+ {illegal,nullptr }, /* 09: 0100 1101 0000 1001 */
+ {illegal,nullptr }, /* 0a: 0100 1101 0000 1010 */
+ {illegal,nullptr }, /* 0b: 0100 1101 0000 1011 */
+ {illegal,nullptr }, /* 0c: 0100 1101 0000 1100 */
+ {illegal,nullptr }, /* 0d: 0100 1101 0000 1101 */
+ {illegal,nullptr }, /* 0e: 0100 1101 0000 1110 */
+ {illegal,nullptr }, /* 0f: 0100 1101 0000 1111 */
+
+ {illegal,nullptr }, /* 10: 0100 1101 0001 0000 */
+ {illegal,nullptr }, /* 11: 0100 1101 0001 0001 */
+ {illegal,nullptr }, /* 12: 0100 1101 0001 0010 */
+ {illegal,nullptr }, /* 13: 0100 1101 0001 0011 */
+ {illegal,nullptr }, /* 14: 0100 1101 0001 0100 */
+ {illegal,nullptr }, /* 15: 0100 1101 0001 0101 */
+ {illegal,nullptr }, /* 16: 0100 1101 0001 0110 */
+ {illegal,nullptr }, /* 17: 0100 1101 0001 0111 */
+ {illegal,nullptr }, /* 18: 0100 1101 0001 1000 */
+ {illegal,nullptr }, /* 19: 0100 1101 0001 1001 */
+ {illegal,nullptr }, /* 1a: 0100 1101 0001 1010 */
+ {illegal,nullptr }, /* 1b: 0100 1101 0001 1011 */
+ {illegal,nullptr }, /* 1c: 0100 1101 0001 1100 */
+ {illegal,nullptr }, /* 1d: 0100 1101 0001 1101 */
+ {illegal,nullptr }, /* 1e: 0100 1101 0001 1110 */
+ {illegal,nullptr }, /* 1f: 0100 1101 0001 1111 */
+
+ {illegal,nullptr }, /* 20: 0100 1101 0010 0000 */
+ {illegal,nullptr }, /* 21: 0100 1101 0010 0001 */
+ {illegal,nullptr }, /* 22: 0100 1101 0010 0010 */
+ {illegal,nullptr }, /* 23: 0100 1101 0010 0011 */
+ {illegal,nullptr }, /* 24: 0100 1101 0010 0100 */
+ {illegal,nullptr }, /* 25: 0100 1101 0010 0101 */
+ {illegal,nullptr }, /* 26: 0100 1101 0010 0110 */
+ {illegal,nullptr }, /* 27: 0100 1101 0010 0111 */
+ {illegal,nullptr }, /* 28: 0100 1101 0010 1000 */
+ {illegal,nullptr }, /* 29: 0100 1101 0010 1001 */
+ {illegal,nullptr }, /* 2a: 0100 1101 0010 1010 */
+ {illegal,nullptr }, /* 2b: 0100 1101 0010 1011 */
+ {illegal,nullptr }, /* 2c: 0100 1101 0010 1100 */
+ {illegal,nullptr }, /* 2d: 0100 1101 0010 1101 */
+ {illegal,nullptr }, /* 2e: 0100 1101 0010 1110 */
+ {illegal,nullptr }, /* 2f: 0100 1101 0010 1111 */
+
+ {illegal,nullptr }, /* 30: 0100 1101 0011 0000 */
+ {illegal,nullptr }, /* 31: 0100 1101 0011 0001 */
+ {illegal,nullptr }, /* 32: 0100 1101 0011 0010 */
+ {illegal,nullptr }, /* 33: 0100 1101 0011 0011 */
+ {illegal,nullptr }, /* 34: 0100 1101 0011 0100 */
+ {illegal,nullptr }, /* 35: 0100 1101 0011 0101 */
+ {illegal,nullptr }, /* 36: 0100 1101 0011 0110 */
+ {illegal,nullptr }, /* 37: 0100 1101 0011 0111 */
+ {illegal,nullptr }, /* 38: 0100 1101 0011 1000 */
+ {illegal,nullptr }, /* 39: 0100 1101 0011 1001 */
+ {illegal,nullptr }, /* 3a: 0100 1101 0011 1010 */
+ {illegal,nullptr }, /* 3b: 0100 1101 0011 1011 */
+ {illegal,nullptr }, /* 3c: 0100 1101 0011 1100 */
+ {illegal,nullptr }, /* 3d: 0100 1101 0011 1101 */
+ {illegal,nullptr }, /* 3e: 0100 1101 0011 1110 */
+ {illegal,nullptr }, /* 3f: 0100 1101 0011 1111 */
+
+ {illegal,nullptr }, /* 40: 0100 1101 0100 0000 */
+ {illegal,nullptr }, /* 41: 0100 1101 0100 0001 */
+ {illegal,nullptr }, /* 42: 0100 1101 0100 0010 */
+ {illegal,nullptr }, /* 43: 0100 1101 0100 0011 */
+ {illegal,nullptr }, /* 44: 0100 1101 0100 0100 */
+ {illegal,nullptr }, /* 45: 0100 1101 0100 0101 */
+ {illegal,nullptr }, /* 46: 0100 1101 0100 0110 */
+ {illegal,nullptr }, /* 47: 0100 1101 0100 0111 */
+ {illegal,nullptr }, /* 48: 0100 1101 0100 1000 */
+ {illegal,nullptr }, /* 49: 0100 1101 0100 1001 */
+ {illegal,nullptr }, /* 4a: 0100 1101 0100 1010 */
+ {illegal,nullptr }, /* 4b: 0100 1101 0100 1011 */
+ {illegal,nullptr }, /* 4c: 0100 1101 0100 1100 */
+ {illegal,nullptr }, /* 4d: 0100 1101 0100 1101 */
+ {illegal,nullptr }, /* 4e: 0100 1101 0100 1110 */
+ {illegal,nullptr }, /* 4f: 0100 1101 0100 1111 */
+
+ {illegal,nullptr }, /* 50: 0100 1101 0101 0000 */
+ {illegal,nullptr }, /* 51: 0100 1101 0101 0001 */
+ {illegal,nullptr }, /* 52: 0100 1101 0101 0010 */
+ {illegal,nullptr }, /* 53: 0100 1101 0101 0011 */
+ {illegal,nullptr }, /* 54: 0100 1101 0101 0100 */
+ {illegal,nullptr }, /* 55: 0100 1101 0101 0101 */
+ {illegal,nullptr }, /* 56: 0100 1101 0101 0110 */
+ {illegal,nullptr }, /* 57: 0100 1101 0101 0111 */
+ {illegal,nullptr }, /* 58: 0100 1101 0101 1000 */
+ {illegal,nullptr }, /* 59: 0100 1101 0101 1001 */
+ {illegal,nullptr }, /* 5a: 0100 1101 0101 1010 */
+ {illegal,nullptr }, /* 5b: 0100 1101 0101 1011 */
+ {illegal,nullptr }, /* 5c: 0100 1101 0101 1100 */
+ {illegal,nullptr }, /* 5d: 0100 1101 0101 1101 */
+ {illegal,nullptr }, /* 5e: 0100 1101 0101 1110 */
+ {illegal,nullptr }, /* 5f: 0100 1101 0101 1111 */
+
+ {illegal,nullptr }, /* 60: 0100 1101 0110 0000 */
+ {illegal,nullptr }, /* 61: 0100 1101 0110 0001 */
+ {illegal,nullptr }, /* 62: 0100 1101 0110 0010 */
+ {illegal,nullptr }, /* 63: 0100 1101 0110 0011 */
+ {illegal,nullptr }, /* 64: 0100 1101 0110 0100 */
+ {illegal,nullptr }, /* 65: 0100 1101 0110 0101 */
+ {illegal,nullptr }, /* 66: 0100 1101 0110 0110 */
+ {illegal,nullptr }, /* 67: 0100 1101 0110 0111 */
+ {illegal,nullptr }, /* 68: 0100 1101 0110 1000 */
+ {illegal,nullptr }, /* 69: 0100 1101 0110 1001 */
+ {illegal,nullptr }, /* 6a: 0100 1101 0110 1010 */
+ {illegal,nullptr }, /* 6b: 0100 1101 0110 1011 */
+ {illegal,nullptr }, /* 6c: 0100 1101 0110 1100 */
+ {illegal,nullptr }, /* 6d: 0100 1101 0110 1101 */
+ {illegal,nullptr }, /* 6e: 0100 1101 0110 1110 */
+ {illegal,nullptr }, /* 6f: 0100 1101 0110 1111 */
+
+ {illegal,nullptr }, /* 70: 0100 1101 0111 0000 */
+ {illegal,nullptr }, /* 71: 0100 1101 0111 0001 */
+ {illegal,nullptr }, /* 72: 0100 1101 0111 0010 */
+ {illegal,nullptr }, /* 73: 0100 1101 0111 0011 */
+ {illegal,nullptr }, /* 74: 0100 1101 0111 0100 */
+ {illegal,nullptr }, /* 75: 0100 1101 0111 0101 */
+ {illegal,nullptr }, /* 76: 0100 1101 0111 0110 */
+ {illegal,nullptr }, /* 77: 0100 1101 0111 0111 */
+ {illegal,nullptr }, /* 78: 0100 1101 0111 1000 */
+ {illegal,nullptr }, /* 79: 0100 1101 0111 1001 */
+ {illegal,nullptr }, /* 7a: 0100 1101 0111 1010 */
+ {illegal,nullptr }, /* 7b: 0100 1101 0111 1011 */
+ {illegal,nullptr }, /* 7c: 0100 1101 0111 1100 */
+ {illegal,nullptr }, /* 7d: 0100 1101 0111 1101 */
+ {illegal,nullptr }, /* 7e: 0100 1101 0111 1110 */
+ {illegal,nullptr }, /* 7f: 0100 1101 0111 1111 */
+
+ {illegal,nullptr }, /* 80: 0100 1101 1000 0000 */
+ {illegal,nullptr }, /* 81: 0100 1101 1000 0001 */
+ {illegal,nullptr }, /* 82: 0100 1101 1000 0010 */
+ {illegal,nullptr }, /* 83: 0100 1101 1000 0011 */
+ {illegal,nullptr }, /* 84: 0100 1101 1000 0100 */
+ {illegal,nullptr }, /* 85: 0100 1101 1000 0101 */
+ {illegal,nullptr }, /* 86: 0100 1101 1000 0110 */
+ {illegal,nullptr }, /* 87: 0100 1101 1000 0111 */
+ {illegal,nullptr }, /* 88: 0100 1101 1000 1000 */
+ {illegal,nullptr }, /* 89: 0100 1101 1000 1001 */
+ {illegal,nullptr }, /* 8a: 0100 1101 1000 1010 */
+ {illegal,nullptr }, /* 8b: 0100 1101 1000 1011 */
+ {illegal,nullptr }, /* 8c: 0100 1101 1000 1100 */
+ {illegal,nullptr }, /* 8d: 0100 1101 1000 1101 */
+ {illegal,nullptr }, /* 8e: 0100 1101 1000 1110 */
+ {illegal,nullptr }, /* 8f: 0100 1101 1000 1111 */
+
+ {illegal,nullptr }, /* 90: 0100 1101 1001 0000 */
+ {illegal,nullptr }, /* 91: 0100 1101 1001 0001 */
+ {illegal,nullptr }, /* 92: 0100 1101 1001 0010 */
+ {illegal,nullptr }, /* 93: 0100 1101 1001 0011 */
+ {illegal,nullptr }, /* 94: 0100 1101 1001 0100 */
+ {illegal,nullptr }, /* 95: 0100 1101 1001 0101 */
+ {illegal,nullptr }, /* 96: 0100 1101 1001 0110 */
+ {illegal,nullptr }, /* 97: 0100 1101 1001 0111 */
+ {illegal,nullptr }, /* 98: 0100 1101 1001 1000 */
+ {illegal,nullptr }, /* 99: 0100 1101 1001 1001 */
+ {illegal,nullptr }, /* 9a: 0100 1101 1001 1010 */
+ {illegal,nullptr }, /* 9b: 0100 1101 1001 1011 */
+ {illegal,nullptr }, /* 9c: 0100 1101 1001 1100 */
+ {illegal,nullptr }, /* 9d: 0100 1101 1001 1101 */
+ {illegal,nullptr }, /* 9e: 0100 1101 1001 1110 */
+ {illegal,nullptr }, /* 9f: 0100 1101 1001 1111 */
+
+ {illegal,nullptr }, /* a0: 0100 1101 1010 0000 */
+ {illegal,nullptr }, /* a1: 0100 1101 1010 0001 */
+ {illegal,nullptr }, /* a2: 0100 1101 1010 0010 */
+ {illegal,nullptr }, /* a3: 0100 1101 1010 0011 */
+ {illegal,nullptr }, /* a4: 0100 1101 1010 0100 */
+ {illegal,nullptr }, /* a5: 0100 1101 1010 0101 */
+ {illegal,nullptr }, /* a6: 0100 1101 1010 0110 */
+ {illegal,nullptr }, /* a7: 0100 1101 1010 0111 */
+ {illegal,nullptr }, /* a8: 0100 1101 1010 1000 */
+ {illegal,nullptr }, /* a9: 0100 1101 1010 1001 */
+ {illegal,nullptr }, /* aa: 0100 1101 1010 1010 */
+ {illegal,nullptr }, /* ab: 0100 1101 1010 1011 */
+ {illegal,nullptr }, /* ac: 0100 1101 1010 1100 */
+ {illegal,nullptr }, /* ad: 0100 1101 1010 1101 */
+ {illegal,nullptr }, /* ae: 0100 1101 1010 1110 */
+ {illegal,nullptr }, /* af: 0100 1101 1010 1111 */
+
+ {illegal,nullptr }, /* b0: 0100 1101 1011 0000 */
+ {illegal,nullptr }, /* b1: 0100 1101 1011 0001 */
+ {illegal,nullptr }, /* b2: 0100 1101 1011 0010 */
+ {illegal,nullptr }, /* b3: 0100 1101 1011 0011 */
+ {illegal,nullptr }, /* b4: 0100 1101 1011 0100 */
+ {illegal,nullptr }, /* b5: 0100 1101 1011 0101 */
+ {illegal,nullptr }, /* b6: 0100 1101 1011 0110 */
+ {illegal,nullptr }, /* b7: 0100 1101 1011 0111 */
+ {illegal,nullptr }, /* b8: 0100 1101 1011 1000 */
+ {illegal,nullptr }, /* b9: 0100 1101 1011 1001 */
+ {illegal,nullptr }, /* ba: 0100 1101 1011 1010 */
+ {illegal,nullptr }, /* bb: 0100 1101 1011 1011 */
+ {illegal,nullptr }, /* bc: 0100 1101 1011 1100 */
+ {illegal,nullptr }, /* bd: 0100 1101 1011 1101 */
+ {illegal,nullptr }, /* be: 0100 1101 1011 1110 */
+ {illegal,nullptr }, /* bf: 0100 1101 1011 1111 */
{MOV,"PA,A" }, /* c0: 0100 1101 1100 0000 */
{MOV,"PB,A" }, /* c1: 0100 1101 1100 0001 */
{MOV,"PC,A" }, /* c2: 0100 1101 1100 0010 */
{MOV,"PD,A" }, /* c3: 0100 1101 1100 0011 */
- {illegal,0 }, /* c4: 0100 1101 1100 0100 */
+ {illegal,nullptr }, /* c4: 0100 1101 1100 0100 */
{MOV,"PF,A" }, /* c5: 0100 1101 1100 0101 */
{MOV,"MKH,A" }, /* c6: 0100 1101 1100 0110 */
{MOV,"MKL,A" }, /* c7: 0100 1101 1100 0111 */
@@ -1700,347 +1700,347 @@ static const struct dasm_s dasm4D_7810[256] =
{MOV,"EOM,A" }, /* cb: 0100 1101 1100 1011 */
{MOV,"ETMM,A" }, /* cc: 0100 1101 1100 1100 */
{MOV,"TMM,A" }, /* cd: 0100 1101 1100 1101 */
- {illegal,0 }, /* ce: 0100 1101 1100 1110 */
- {illegal,0 }, /* cf: 0100 1101 1100 1111 */
+ {illegal,nullptr }, /* ce: 0100 1101 1100 1110 */
+ {illegal,nullptr }, /* cf: 0100 1101 1100 1111 */
{MOV,"MM,A" }, /* d0: 0100 1101 1101 0000 */
{MOV,"MCC,A" }, /* d1: 0100 1101 1101 0001 */
{MOV,"MA,A" }, /* d2: 0100 1101 1101 0010 */
{MOV,"MB,A" }, /* d3: 0100 1101 1101 0011 */
{MOV,"MC,A" }, /* d4: 0100 1101 1101 0100 */
- {illegal,0 }, /* d5: 0100 1101 1101 0101 */
- {illegal,0 }, /* d6: 0100 1101 1101 0110 */
+ {illegal,nullptr }, /* d5: 0100 1101 1101 0101 */
+ {illegal,nullptr }, /* d6: 0100 1101 1101 0110 */
{MOV,"MF,A" }, /* d7: 0100 1101 1101 0111 */
{MOV,"TXB,A" }, /* d8: 0100 1101 1101 1000 */
- {illegal,0 }, /* d9: 0100 1101 1101 1001 */
+ {illegal,nullptr }, /* d9: 0100 1101 1101 1001 */
{MOV,"TM0,A" }, /* da: 0100 1101 1101 1010 */
{MOV,"TM1,A" }, /* db: 0100 1101 1101 1011 */
- {illegal,0 }, /* dc: 0100 1101 1101 1100 */
- {illegal,0 }, /* dd: 0100 1101 1101 1101 */
- {illegal,0 }, /* de: 0100 1101 1101 1110 */
- {illegal,0 }, /* df: 0100 1101 1101 1111 */
-
- {illegal,0 }, /* e0: 0100 1101 1110 0000 */
- {illegal,0 }, /* e1: 0100 1101 1110 0001 */
- {illegal,0 }, /* e2: 0100 1101 1110 0010 */
- {illegal,0 }, /* e3: 0100 1101 1110 0011 */
- {illegal,0 }, /* e4: 0100 1101 1110 0100 */
- {illegal,0 }, /* e5: 0100 1101 1110 0101 */
- {illegal,0 }, /* e6: 0100 1101 1110 0110 */
- {illegal,0 }, /* e7: 0100 1101 1110 0111 */
+ {illegal,nullptr }, /* dc: 0100 1101 1101 1100 */
+ {illegal,nullptr }, /* dd: 0100 1101 1101 1101 */
+ {illegal,nullptr }, /* de: 0100 1101 1101 1110 */
+ {illegal,nullptr }, /* df: 0100 1101 1101 1111 */
+
+ {illegal,nullptr }, /* e0: 0100 1101 1110 0000 */
+ {illegal,nullptr }, /* e1: 0100 1101 1110 0001 */
+ {illegal,nullptr }, /* e2: 0100 1101 1110 0010 */
+ {illegal,nullptr }, /* e3: 0100 1101 1110 0011 */
+ {illegal,nullptr }, /* e4: 0100 1101 1110 0100 */
+ {illegal,nullptr }, /* e5: 0100 1101 1110 0101 */
+ {illegal,nullptr }, /* e6: 0100 1101 1110 0110 */
+ {illegal,nullptr }, /* e7: 0100 1101 1110 0111 */
{MOV,"ZCM,A" }, /* e8: 0100 1101 1110 1000 */ /* 7810 */
- {illegal,0 }, /* e9: 0100 1101 1110 1001 */
- {illegal,0 }, /* ea: 0100 1101 1110 1010 */
- {illegal,0 }, /* eb: 0100 1101 1110 1011 */
- {illegal,0 }, /* ec: 0100 1101 1110 1100 */
- {illegal,0 }, /* ed: 0100 1101 1110 1101 */
- {illegal,0 }, /* ee: 0100 1101 1110 1110 */
- {illegal,0 }, /* ef: 0100 1101 1110 1111 */
-
- {illegal,0 }, /* f0: 0100 1101 1111 0000 */
- {illegal,0 }, /* f1: 0100 1101 1111 0001 */
- {illegal,0 }, /* f2: 0100 1101 1111 0010 */
- {illegal,0 }, /* f3: 0100 1101 1111 0011 */
- {illegal,0 }, /* f4: 0100 1101 1111 0100 */
- {illegal,0 }, /* f5: 0100 1101 1111 0101 */
- {illegal,0 }, /* f6: 0100 1101 1111 0110 */
- {illegal,0 }, /* f7: 0100 1101 1111 0111 */
- {illegal,0 }, /* f8: 0100 1101 1111 1000 */
- {illegal,0 }, /* f9: 0100 1101 1111 1001 */
- {illegal,0 }, /* fa: 0100 1101 1111 1010 */
- {illegal,0 }, /* fb: 0100 1101 1111 1011 */
- {illegal,0 }, /* fc: 0100 1101 1111 1100 */
- {illegal,0 }, /* fd: 0100 1101 1111 1101 */
- {illegal,0 }, /* fe: 0100 1101 1111 1110 */
- {illegal,0 } /* ff: 0100 1101 1111 1111 */
+ {illegal,nullptr }, /* e9: 0100 1101 1110 1001 */
+ {illegal,nullptr }, /* ea: 0100 1101 1110 1010 */
+ {illegal,nullptr }, /* eb: 0100 1101 1110 1011 */
+ {illegal,nullptr }, /* ec: 0100 1101 1110 1100 */
+ {illegal,nullptr }, /* ed: 0100 1101 1110 1101 */
+ {illegal,nullptr }, /* ee: 0100 1101 1110 1110 */
+ {illegal,nullptr }, /* ef: 0100 1101 1110 1111 */
+
+ {illegal,nullptr }, /* f0: 0100 1101 1111 0000 */
+ {illegal,nullptr }, /* f1: 0100 1101 1111 0001 */
+ {illegal,nullptr }, /* f2: 0100 1101 1111 0010 */
+ {illegal,nullptr }, /* f3: 0100 1101 1111 0011 */
+ {illegal,nullptr }, /* f4: 0100 1101 1111 0100 */
+ {illegal,nullptr }, /* f5: 0100 1101 1111 0101 */
+ {illegal,nullptr }, /* f6: 0100 1101 1111 0110 */
+ {illegal,nullptr }, /* f7: 0100 1101 1111 0111 */
+ {illegal,nullptr }, /* f8: 0100 1101 1111 1000 */
+ {illegal,nullptr }, /* f9: 0100 1101 1111 1001 */
+ {illegal,nullptr }, /* fa: 0100 1101 1111 1010 */
+ {illegal,nullptr }, /* fb: 0100 1101 1111 1011 */
+ {illegal,nullptr }, /* fc: 0100 1101 1111 1100 */
+ {illegal,nullptr }, /* fd: 0100 1101 1111 1101 */
+ {illegal,nullptr }, /* fe: 0100 1101 1111 1110 */
+ {illegal,nullptr } /* ff: 0100 1101 1111 1111 */
};
static const struct dasm_s dasm4D_7807[256] =
{
- {illegal,0 }, /* 00: 0100 1101 0000 0000 */
- {illegal,0 }, /* 01: 0100 1101 0000 0001 */
- {illegal,0 }, /* 02: 0100 1101 0000 0010 */
- {illegal,0 }, /* 03: 0100 1101 0000 0011 */
- {illegal,0 }, /* 04: 0100 1101 0000 0100 */
- {illegal,0 }, /* 05: 0100 1101 0000 0101 */
- {illegal,0 }, /* 06: 0100 1101 0000 0110 */
- {illegal,0 }, /* 07: 0100 1101 0000 0111 */
- {illegal,0 }, /* 08: 0100 1101 0000 1000 */
- {illegal,0 }, /* 09: 0100 1101 0000 1001 */
- {illegal,0 }, /* 0a: 0100 1101 0000 1010 */
- {illegal,0 }, /* 0b: 0100 1101 0000 1011 */
- {illegal,0 }, /* 0c: 0100 1101 0000 1100 */
- {illegal,0 }, /* 0d: 0100 1101 0000 1101 */
- {illegal,0 }, /* 0e: 0100 1101 0000 1110 */
- {illegal,0 }, /* 0f: 0100 1101 0000 1111 */
-
- {illegal,0 }, /* 10: 0100 1101 0001 0000 */
- {illegal,0 }, /* 11: 0100 1101 0001 0001 */
- {illegal,0 }, /* 12: 0100 1101 0001 0010 */
- {illegal,0 }, /* 13: 0100 1101 0001 0011 */
- {illegal,0 }, /* 14: 0100 1101 0001 0100 */
- {illegal,0 }, /* 15: 0100 1101 0001 0101 */
- {illegal,0 }, /* 16: 0100 1101 0001 0110 */
- {illegal,0 }, /* 17: 0100 1101 0001 0111 */
- {illegal,0 }, /* 18: 0100 1101 0001 1000 */
- {illegal,0 }, /* 19: 0100 1101 0001 1001 */
- {illegal,0 }, /* 1a: 0100 1101 0001 1010 */
- {illegal,0 }, /* 1b: 0100 1101 0001 1011 */
- {illegal,0 }, /* 1c: 0100 1101 0001 1100 */
- {illegal,0 }, /* 1d: 0100 1101 0001 1101 */
- {illegal,0 }, /* 1e: 0100 1101 0001 1110 */
- {illegal,0 }, /* 1f: 0100 1101 0001 1111 */
-
- {illegal,0 }, /* 20: 0100 1101 0010 0000 */
- {illegal,0 }, /* 21: 0100 1101 0010 0001 */
- {illegal,0 }, /* 22: 0100 1101 0010 0010 */
- {illegal,0 }, /* 23: 0100 1101 0010 0011 */
- {illegal,0 }, /* 24: 0100 1101 0010 0100 */
- {illegal,0 }, /* 25: 0100 1101 0010 0101 */
- {illegal,0 }, /* 26: 0100 1101 0010 0110 */
- {illegal,0 }, /* 27: 0100 1101 0010 0111 */
- {illegal,0 }, /* 28: 0100 1101 0010 1000 */
- {illegal,0 }, /* 29: 0100 1101 0010 1001 */
- {illegal,0 }, /* 2a: 0100 1101 0010 1010 */
- {illegal,0 }, /* 2b: 0100 1101 0010 1011 */
- {illegal,0 }, /* 2c: 0100 1101 0010 1100 */
- {illegal,0 }, /* 2d: 0100 1101 0010 1101 */
- {illegal,0 }, /* 2e: 0100 1101 0010 1110 */
- {illegal,0 }, /* 2f: 0100 1101 0010 1111 */
-
- {illegal,0 }, /* 30: 0100 1101 0011 0000 */
- {illegal,0 }, /* 31: 0100 1101 0011 0001 */
- {illegal,0 }, /* 32: 0100 1101 0011 0010 */
- {illegal,0 }, /* 33: 0100 1101 0011 0011 */
- {illegal,0 }, /* 34: 0100 1101 0011 0100 */
- {illegal,0 }, /* 35: 0100 1101 0011 0101 */
- {illegal,0 }, /* 36: 0100 1101 0011 0110 */
- {illegal,0 }, /* 37: 0100 1101 0011 0111 */
- {illegal,0 }, /* 38: 0100 1101 0011 1000 */
- {illegal,0 }, /* 39: 0100 1101 0011 1001 */
- {illegal,0 }, /* 3a: 0100 1101 0011 1010 */
- {illegal,0 }, /* 3b: 0100 1101 0011 1011 */
- {illegal,0 }, /* 3c: 0100 1101 0011 1100 */
- {illegal,0 }, /* 3d: 0100 1101 0011 1101 */
- {illegal,0 }, /* 3e: 0100 1101 0011 1110 */
- {illegal,0 }, /* 3f: 0100 1101 0011 1111 */
-
- {illegal,0 }, /* 40: 0100 1101 0100 0000 */
- {illegal,0 }, /* 41: 0100 1101 0100 0001 */
- {illegal,0 }, /* 42: 0100 1101 0100 0010 */
- {illegal,0 }, /* 43: 0100 1101 0100 0011 */
- {illegal,0 }, /* 44: 0100 1101 0100 0100 */
- {illegal,0 }, /* 45: 0100 1101 0100 0101 */
- {illegal,0 }, /* 46: 0100 1101 0100 0110 */
- {illegal,0 }, /* 47: 0100 1101 0100 0111 */
- {illegal,0 }, /* 48: 0100 1101 0100 1000 */
- {illegal,0 }, /* 49: 0100 1101 0100 1001 */
- {illegal,0 }, /* 4a: 0100 1101 0100 1010 */
- {illegal,0 }, /* 4b: 0100 1101 0100 1011 */
- {illegal,0 }, /* 4c: 0100 1101 0100 1100 */
- {illegal,0 }, /* 4d: 0100 1101 0100 1101 */
- {illegal,0 }, /* 4e: 0100 1101 0100 1110 */
- {illegal,0 }, /* 4f: 0100 1101 0100 1111 */
-
- {illegal,0 }, /* 50: 0100 1101 0101 0000 */
- {illegal,0 }, /* 51: 0100 1101 0101 0001 */
- {illegal,0 }, /* 52: 0100 1101 0101 0010 */
- {illegal,0 }, /* 53: 0100 1101 0101 0011 */
- {illegal,0 }, /* 54: 0100 1101 0101 0100 */
- {illegal,0 }, /* 55: 0100 1101 0101 0101 */
- {illegal,0 }, /* 56: 0100 1101 0101 0110 */
- {illegal,0 }, /* 57: 0100 1101 0101 0111 */
- {illegal,0 }, /* 58: 0100 1101 0101 1000 */
- {illegal,0 }, /* 59: 0100 1101 0101 1001 */
- {illegal,0 }, /* 5a: 0100 1101 0101 1010 */
- {illegal,0 }, /* 5b: 0100 1101 0101 1011 */
- {illegal,0 }, /* 5c: 0100 1101 0101 1100 */
- {illegal,0 }, /* 5d: 0100 1101 0101 1101 */
- {illegal,0 }, /* 5e: 0100 1101 0101 1110 */
- {illegal,0 }, /* 5f: 0100 1101 0101 1111 */
-
- {illegal,0 }, /* 60: 0100 1101 0110 0000 */
- {illegal,0 }, /* 61: 0100 1101 0110 0001 */
- {illegal,0 }, /* 62: 0100 1101 0110 0010 */
- {illegal,0 }, /* 63: 0100 1101 0110 0011 */
- {illegal,0 }, /* 64: 0100 1101 0110 0100 */
- {illegal,0 }, /* 65: 0100 1101 0110 0101 */
- {illegal,0 }, /* 66: 0100 1101 0110 0110 */
- {illegal,0 }, /* 67: 0100 1101 0110 0111 */
- {illegal,0 }, /* 68: 0100 1101 0110 1000 */
- {illegal,0 }, /* 69: 0100 1101 0110 1001 */
- {illegal,0 }, /* 6a: 0100 1101 0110 1010 */
- {illegal,0 }, /* 6b: 0100 1101 0110 1011 */
- {illegal,0 }, /* 6c: 0100 1101 0110 1100 */
- {illegal,0 }, /* 6d: 0100 1101 0110 1101 */
- {illegal,0 }, /* 6e: 0100 1101 0110 1110 */
- {illegal,0 }, /* 6f: 0100 1101 0110 1111 */
-
- {illegal,0 }, /* 70: 0100 1101 0111 0000 */
- {illegal,0 }, /* 71: 0100 1101 0111 0001 */
- {illegal,0 }, /* 72: 0100 1101 0111 0010 */
- {illegal,0 }, /* 73: 0100 1101 0111 0011 */
- {illegal,0 }, /* 74: 0100 1101 0111 0100 */
- {illegal,0 }, /* 75: 0100 1101 0111 0101 */
- {illegal,0 }, /* 76: 0100 1101 0111 0110 */
- {illegal,0 }, /* 77: 0100 1101 0111 0111 */
- {illegal,0 }, /* 78: 0100 1101 0111 1000 */
- {illegal,0 }, /* 79: 0100 1101 0111 1001 */
- {illegal,0 }, /* 7a: 0100 1101 0111 1010 */
- {illegal,0 }, /* 7b: 0100 1101 0111 1011 */
- {illegal,0 }, /* 7c: 0100 1101 0111 1100 */
- {illegal,0 }, /* 7d: 0100 1101 0111 1101 */
- {illegal,0 }, /* 7e: 0100 1101 0111 1110 */
- {illegal,0 }, /* 7f: 0100 1101 0111 1111 */
-
- {illegal,0 }, /* 80: 0100 1101 1000 0000 */
- {illegal,0 }, /* 81: 0100 1101 1000 0001 */
- {illegal,0 }, /* 82: 0100 1101 1000 0010 */
- {illegal,0 }, /* 83: 0100 1101 1000 0011 */
- {illegal,0 }, /* 84: 0100 1101 1000 0100 */
- {illegal,0 }, /* 85: 0100 1101 1000 0101 */
- {illegal,0 }, /* 86: 0100 1101 1000 0110 */
- {illegal,0 }, /* 87: 0100 1101 1000 0111 */
- {illegal,0 }, /* 88: 0100 1101 1000 1000 */
- {illegal,0 }, /* 89: 0100 1101 1000 1001 */
- {illegal,0 }, /* 8a: 0100 1101 1000 1010 */
- {illegal,0 }, /* 8b: 0100 1101 1000 1011 */
- {illegal,0 }, /* 8c: 0100 1101 1000 1100 */
- {illegal,0 }, /* 8d: 0100 1101 1000 1101 */
- {illegal,0 }, /* 8e: 0100 1101 1000 1110 */
- {illegal,0 }, /* 8f: 0100 1101 1000 1111 */
-
- {illegal,0 }, /* 90: 0100 1101 1001 0000 */
- {illegal,0 }, /* 91: 0100 1101 1001 0001 */
- {illegal,0 }, /* 92: 0100 1101 1001 0010 */
- {illegal,0 }, /* 93: 0100 1101 1001 0011 */
- {illegal,0 }, /* 94: 0100 1101 1001 0100 */
- {illegal,0 }, /* 95: 0100 1101 1001 0101 */
- {illegal,0 }, /* 96: 0100 1101 1001 0110 */
- {illegal,0 }, /* 97: 0100 1101 1001 0111 */
- {illegal,0 }, /* 98: 0100 1101 1001 1000 */
- {illegal,0 }, /* 99: 0100 1101 1001 1001 */
- {illegal,0 }, /* 9a: 0100 1101 1001 1010 */
- {illegal,0 }, /* 9b: 0100 1101 1001 1011 */
- {illegal,0 }, /* 9c: 0100 1101 1001 1100 */
- {illegal,0 }, /* 9d: 0100 1101 1001 1101 */
- {illegal,0 }, /* 9e: 0100 1101 1001 1110 */
- {illegal,0 }, /* 9f: 0100 1101 1001 1111 */
-
- {illegal,0 }, /* a0: 0100 1101 1010 0000 */
- {illegal,0 }, /* a1: 0100 1101 1010 0001 */
- {illegal,0 }, /* a2: 0100 1101 1010 0010 */
- {illegal,0 }, /* a3: 0100 1101 1010 0011 */
- {illegal,0 }, /* a4: 0100 1101 1010 0100 */
- {illegal,0 }, /* a5: 0100 1101 1010 0101 */
- {illegal,0 }, /* a6: 0100 1101 1010 0110 */
- {illegal,0 }, /* a7: 0100 1101 1010 0111 */
- {illegal,0 }, /* a8: 0100 1101 1010 1000 */
- {illegal,0 }, /* a9: 0100 1101 1010 1001 */
- {illegal,0 }, /* aa: 0100 1101 1010 1010 */
- {illegal,0 }, /* ab: 0100 1101 1010 1011 */
- {illegal,0 }, /* ac: 0100 1101 1010 1100 */
- {illegal,0 }, /* ad: 0100 1101 1010 1101 */
- {illegal,0 }, /* ae: 0100 1101 1010 1110 */
- {illegal,0 }, /* af: 0100 1101 1010 1111 */
-
- {illegal,0 }, /* b0: 0100 1101 1011 0000 */
- {illegal,0 }, /* b1: 0100 1101 1011 0001 */
- {illegal,0 }, /* b2: 0100 1101 1011 0010 */
- {illegal,0 }, /* b3: 0100 1101 1011 0011 */
- {illegal,0 }, /* b4: 0100 1101 1011 0100 */
- {illegal,0 }, /* b5: 0100 1101 1011 0101 */
- {illegal,0 }, /* b6: 0100 1101 1011 0110 */
- {illegal,0 }, /* b7: 0100 1101 1011 0111 */
- {illegal,0 }, /* b8: 0100 1101 1011 1000 */
- {illegal,0 }, /* b9: 0100 1101 1011 1001 */
- {illegal,0 }, /* ba: 0100 1101 1011 1010 */
- {illegal,0 }, /* bb: 0100 1101 1011 1011 */
- {illegal,0 }, /* bc: 0100 1101 1011 1100 */
- {illegal,0 }, /* bd: 0100 1101 1011 1101 */
- {illegal,0 }, /* be: 0100 1101 1011 1110 */
- {illegal,0 }, /* bf: 0100 1101 1011 1111 */
+ {illegal,nullptr }, /* 00: 0100 1101 0000 0000 */
+ {illegal,nullptr }, /* 01: 0100 1101 0000 0001 */
+ {illegal,nullptr }, /* 02: 0100 1101 0000 0010 */
+ {illegal,nullptr }, /* 03: 0100 1101 0000 0011 */
+ {illegal,nullptr }, /* 04: 0100 1101 0000 0100 */
+ {illegal,nullptr }, /* 05: 0100 1101 0000 0101 */
+ {illegal,nullptr }, /* 06: 0100 1101 0000 0110 */
+ {illegal,nullptr }, /* 07: 0100 1101 0000 0111 */
+ {illegal,nullptr }, /* 08: 0100 1101 0000 1000 */
+ {illegal,nullptr }, /* 09: 0100 1101 0000 1001 */
+ {illegal,nullptr }, /* 0a: 0100 1101 0000 1010 */
+ {illegal,nullptr }, /* 0b: 0100 1101 0000 1011 */
+ {illegal,nullptr }, /* 0c: 0100 1101 0000 1100 */
+ {illegal,nullptr }, /* 0d: 0100 1101 0000 1101 */
+ {illegal,nullptr }, /* 0e: 0100 1101 0000 1110 */
+ {illegal,nullptr }, /* 0f: 0100 1101 0000 1111 */
+
+ {illegal,nullptr }, /* 10: 0100 1101 0001 0000 */
+ {illegal,nullptr }, /* 11: 0100 1101 0001 0001 */
+ {illegal,nullptr }, /* 12: 0100 1101 0001 0010 */
+ {illegal,nullptr }, /* 13: 0100 1101 0001 0011 */
+ {illegal,nullptr }, /* 14: 0100 1101 0001 0100 */
+ {illegal,nullptr }, /* 15: 0100 1101 0001 0101 */
+ {illegal,nullptr }, /* 16: 0100 1101 0001 0110 */
+ {illegal,nullptr }, /* 17: 0100 1101 0001 0111 */
+ {illegal,nullptr }, /* 18: 0100 1101 0001 1000 */
+ {illegal,nullptr }, /* 19: 0100 1101 0001 1001 */
+ {illegal,nullptr }, /* 1a: 0100 1101 0001 1010 */
+ {illegal,nullptr }, /* 1b: 0100 1101 0001 1011 */
+ {illegal,nullptr }, /* 1c: 0100 1101 0001 1100 */
+ {illegal,nullptr }, /* 1d: 0100 1101 0001 1101 */
+ {illegal,nullptr }, /* 1e: 0100 1101 0001 1110 */
+ {illegal,nullptr }, /* 1f: 0100 1101 0001 1111 */
+
+ {illegal,nullptr }, /* 20: 0100 1101 0010 0000 */
+ {illegal,nullptr }, /* 21: 0100 1101 0010 0001 */
+ {illegal,nullptr }, /* 22: 0100 1101 0010 0010 */
+ {illegal,nullptr }, /* 23: 0100 1101 0010 0011 */
+ {illegal,nullptr }, /* 24: 0100 1101 0010 0100 */
+ {illegal,nullptr }, /* 25: 0100 1101 0010 0101 */
+ {illegal,nullptr }, /* 26: 0100 1101 0010 0110 */
+ {illegal,nullptr }, /* 27: 0100 1101 0010 0111 */
+ {illegal,nullptr }, /* 28: 0100 1101 0010 1000 */
+ {illegal,nullptr }, /* 29: 0100 1101 0010 1001 */
+ {illegal,nullptr }, /* 2a: 0100 1101 0010 1010 */
+ {illegal,nullptr }, /* 2b: 0100 1101 0010 1011 */
+ {illegal,nullptr }, /* 2c: 0100 1101 0010 1100 */
+ {illegal,nullptr }, /* 2d: 0100 1101 0010 1101 */
+ {illegal,nullptr }, /* 2e: 0100 1101 0010 1110 */
+ {illegal,nullptr }, /* 2f: 0100 1101 0010 1111 */
+
+ {illegal,nullptr }, /* 30: 0100 1101 0011 0000 */
+ {illegal,nullptr }, /* 31: 0100 1101 0011 0001 */
+ {illegal,nullptr }, /* 32: 0100 1101 0011 0010 */
+ {illegal,nullptr }, /* 33: 0100 1101 0011 0011 */
+ {illegal,nullptr }, /* 34: 0100 1101 0011 0100 */
+ {illegal,nullptr }, /* 35: 0100 1101 0011 0101 */
+ {illegal,nullptr }, /* 36: 0100 1101 0011 0110 */
+ {illegal,nullptr }, /* 37: 0100 1101 0011 0111 */
+ {illegal,nullptr }, /* 38: 0100 1101 0011 1000 */
+ {illegal,nullptr }, /* 39: 0100 1101 0011 1001 */
+ {illegal,nullptr }, /* 3a: 0100 1101 0011 1010 */
+ {illegal,nullptr }, /* 3b: 0100 1101 0011 1011 */
+ {illegal,nullptr }, /* 3c: 0100 1101 0011 1100 */
+ {illegal,nullptr }, /* 3d: 0100 1101 0011 1101 */
+ {illegal,nullptr }, /* 3e: 0100 1101 0011 1110 */
+ {illegal,nullptr }, /* 3f: 0100 1101 0011 1111 */
+
+ {illegal,nullptr }, /* 40: 0100 1101 0100 0000 */
+ {illegal,nullptr }, /* 41: 0100 1101 0100 0001 */
+ {illegal,nullptr }, /* 42: 0100 1101 0100 0010 */
+ {illegal,nullptr }, /* 43: 0100 1101 0100 0011 */
+ {illegal,nullptr }, /* 44: 0100 1101 0100 0100 */
+ {illegal,nullptr }, /* 45: 0100 1101 0100 0101 */
+ {illegal,nullptr }, /* 46: 0100 1101 0100 0110 */
+ {illegal,nullptr }, /* 47: 0100 1101 0100 0111 */
+ {illegal,nullptr }, /* 48: 0100 1101 0100 1000 */
+ {illegal,nullptr }, /* 49: 0100 1101 0100 1001 */
+ {illegal,nullptr }, /* 4a: 0100 1101 0100 1010 */
+ {illegal,nullptr }, /* 4b: 0100 1101 0100 1011 */
+ {illegal,nullptr }, /* 4c: 0100 1101 0100 1100 */
+ {illegal,nullptr }, /* 4d: 0100 1101 0100 1101 */
+ {illegal,nullptr }, /* 4e: 0100 1101 0100 1110 */
+ {illegal,nullptr }, /* 4f: 0100 1101 0100 1111 */
+
+ {illegal,nullptr }, /* 50: 0100 1101 0101 0000 */
+ {illegal,nullptr }, /* 51: 0100 1101 0101 0001 */
+ {illegal,nullptr }, /* 52: 0100 1101 0101 0010 */
+ {illegal,nullptr }, /* 53: 0100 1101 0101 0011 */
+ {illegal,nullptr }, /* 54: 0100 1101 0101 0100 */
+ {illegal,nullptr }, /* 55: 0100 1101 0101 0101 */
+ {illegal,nullptr }, /* 56: 0100 1101 0101 0110 */
+ {illegal,nullptr }, /* 57: 0100 1101 0101 0111 */
+ {illegal,nullptr }, /* 58: 0100 1101 0101 1000 */
+ {illegal,nullptr }, /* 59: 0100 1101 0101 1001 */
+ {illegal,nullptr }, /* 5a: 0100 1101 0101 1010 */
+ {illegal,nullptr }, /* 5b: 0100 1101 0101 1011 */
+ {illegal,nullptr }, /* 5c: 0100 1101 0101 1100 */
+ {illegal,nullptr }, /* 5d: 0100 1101 0101 1101 */
+ {illegal,nullptr }, /* 5e: 0100 1101 0101 1110 */
+ {illegal,nullptr }, /* 5f: 0100 1101 0101 1111 */
+
+ {illegal,nullptr }, /* 60: 0100 1101 0110 0000 */
+ {illegal,nullptr }, /* 61: 0100 1101 0110 0001 */
+ {illegal,nullptr }, /* 62: 0100 1101 0110 0010 */
+ {illegal,nullptr }, /* 63: 0100 1101 0110 0011 */
+ {illegal,nullptr }, /* 64: 0100 1101 0110 0100 */
+ {illegal,nullptr }, /* 65: 0100 1101 0110 0101 */
+ {illegal,nullptr }, /* 66: 0100 1101 0110 0110 */
+ {illegal,nullptr }, /* 67: 0100 1101 0110 0111 */
+ {illegal,nullptr }, /* 68: 0100 1101 0110 1000 */
+ {illegal,nullptr }, /* 69: 0100 1101 0110 1001 */
+ {illegal,nullptr }, /* 6a: 0100 1101 0110 1010 */
+ {illegal,nullptr }, /* 6b: 0100 1101 0110 1011 */
+ {illegal,nullptr }, /* 6c: 0100 1101 0110 1100 */
+ {illegal,nullptr }, /* 6d: 0100 1101 0110 1101 */
+ {illegal,nullptr }, /* 6e: 0100 1101 0110 1110 */
+ {illegal,nullptr }, /* 6f: 0100 1101 0110 1111 */
+
+ {illegal,nullptr }, /* 70: 0100 1101 0111 0000 */
+ {illegal,nullptr }, /* 71: 0100 1101 0111 0001 */
+ {illegal,nullptr }, /* 72: 0100 1101 0111 0010 */
+ {illegal,nullptr }, /* 73: 0100 1101 0111 0011 */
+ {illegal,nullptr }, /* 74: 0100 1101 0111 0100 */
+ {illegal,nullptr }, /* 75: 0100 1101 0111 0101 */
+ {illegal,nullptr }, /* 76: 0100 1101 0111 0110 */
+ {illegal,nullptr }, /* 77: 0100 1101 0111 0111 */
+ {illegal,nullptr }, /* 78: 0100 1101 0111 1000 */
+ {illegal,nullptr }, /* 79: 0100 1101 0111 1001 */
+ {illegal,nullptr }, /* 7a: 0100 1101 0111 1010 */
+ {illegal,nullptr }, /* 7b: 0100 1101 0111 1011 */
+ {illegal,nullptr }, /* 7c: 0100 1101 0111 1100 */
+ {illegal,nullptr }, /* 7d: 0100 1101 0111 1101 */
+ {illegal,nullptr }, /* 7e: 0100 1101 0111 1110 */
+ {illegal,nullptr }, /* 7f: 0100 1101 0111 1111 */
+
+ {illegal,nullptr }, /* 80: 0100 1101 1000 0000 */
+ {illegal,nullptr }, /* 81: 0100 1101 1000 0001 */
+ {illegal,nullptr }, /* 82: 0100 1101 1000 0010 */
+ {illegal,nullptr }, /* 83: 0100 1101 1000 0011 */
+ {illegal,nullptr }, /* 84: 0100 1101 1000 0100 */
+ {illegal,nullptr }, /* 85: 0100 1101 1000 0101 */
+ {illegal,nullptr }, /* 86: 0100 1101 1000 0110 */
+ {illegal,nullptr }, /* 87: 0100 1101 1000 0111 */
+ {illegal,nullptr }, /* 88: 0100 1101 1000 1000 */
+ {illegal,nullptr }, /* 89: 0100 1101 1000 1001 */
+ {illegal,nullptr }, /* 8a: 0100 1101 1000 1010 */
+ {illegal,nullptr }, /* 8b: 0100 1101 1000 1011 */
+ {illegal,nullptr }, /* 8c: 0100 1101 1000 1100 */
+ {illegal,nullptr }, /* 8d: 0100 1101 1000 1101 */
+ {illegal,nullptr }, /* 8e: 0100 1101 1000 1110 */
+ {illegal,nullptr }, /* 8f: 0100 1101 1000 1111 */
+
+ {illegal,nullptr }, /* 90: 0100 1101 1001 0000 */
+ {illegal,nullptr }, /* 91: 0100 1101 1001 0001 */
+ {illegal,nullptr }, /* 92: 0100 1101 1001 0010 */
+ {illegal,nullptr }, /* 93: 0100 1101 1001 0011 */
+ {illegal,nullptr }, /* 94: 0100 1101 1001 0100 */
+ {illegal,nullptr }, /* 95: 0100 1101 1001 0101 */
+ {illegal,nullptr }, /* 96: 0100 1101 1001 0110 */
+ {illegal,nullptr }, /* 97: 0100 1101 1001 0111 */
+ {illegal,nullptr }, /* 98: 0100 1101 1001 1000 */
+ {illegal,nullptr }, /* 99: 0100 1101 1001 1001 */
+ {illegal,nullptr }, /* 9a: 0100 1101 1001 1010 */
+ {illegal,nullptr }, /* 9b: 0100 1101 1001 1011 */
+ {illegal,nullptr }, /* 9c: 0100 1101 1001 1100 */
+ {illegal,nullptr }, /* 9d: 0100 1101 1001 1101 */
+ {illegal,nullptr }, /* 9e: 0100 1101 1001 1110 */
+ {illegal,nullptr }, /* 9f: 0100 1101 1001 1111 */
+
+ {illegal,nullptr }, /* a0: 0100 1101 1010 0000 */
+ {illegal,nullptr }, /* a1: 0100 1101 1010 0001 */
+ {illegal,nullptr }, /* a2: 0100 1101 1010 0010 */
+ {illegal,nullptr }, /* a3: 0100 1101 1010 0011 */
+ {illegal,nullptr }, /* a4: 0100 1101 1010 0100 */
+ {illegal,nullptr }, /* a5: 0100 1101 1010 0101 */
+ {illegal,nullptr }, /* a6: 0100 1101 1010 0110 */
+ {illegal,nullptr }, /* a7: 0100 1101 1010 0111 */
+ {illegal,nullptr }, /* a8: 0100 1101 1010 1000 */
+ {illegal,nullptr }, /* a9: 0100 1101 1010 1001 */
+ {illegal,nullptr }, /* aa: 0100 1101 1010 1010 */
+ {illegal,nullptr }, /* ab: 0100 1101 1010 1011 */
+ {illegal,nullptr }, /* ac: 0100 1101 1010 1100 */
+ {illegal,nullptr }, /* ad: 0100 1101 1010 1101 */
+ {illegal,nullptr }, /* ae: 0100 1101 1010 1110 */
+ {illegal,nullptr }, /* af: 0100 1101 1010 1111 */
+
+ {illegal,nullptr }, /* b0: 0100 1101 1011 0000 */
+ {illegal,nullptr }, /* b1: 0100 1101 1011 0001 */
+ {illegal,nullptr }, /* b2: 0100 1101 1011 0010 */
+ {illegal,nullptr }, /* b3: 0100 1101 1011 0011 */
+ {illegal,nullptr }, /* b4: 0100 1101 1011 0100 */
+ {illegal,nullptr }, /* b5: 0100 1101 1011 0101 */
+ {illegal,nullptr }, /* b6: 0100 1101 1011 0110 */
+ {illegal,nullptr }, /* b7: 0100 1101 1011 0111 */
+ {illegal,nullptr }, /* b8: 0100 1101 1011 1000 */
+ {illegal,nullptr }, /* b9: 0100 1101 1011 1001 */
+ {illegal,nullptr }, /* ba: 0100 1101 1011 1010 */
+ {illegal,nullptr }, /* bb: 0100 1101 1011 1011 */
+ {illegal,nullptr }, /* bc: 0100 1101 1011 1100 */
+ {illegal,nullptr }, /* bd: 0100 1101 1011 1101 */
+ {illegal,nullptr }, /* be: 0100 1101 1011 1110 */
+ {illegal,nullptr }, /* bf: 0100 1101 1011 1111 */
{MOV,"PA,A" }, /* c0: 0100 1101 1100 0000 */
{MOV,"PB,A" }, /* c1: 0100 1101 1100 0001 */
{MOV,"PC,A" }, /* c2: 0100 1101 1100 0010 */
{MOV,"PD,A" }, /* c3: 0100 1101 1100 0011 */
- {illegal,0 }, /* c4: 0100 1101 1100 0100 */
+ {illegal,nullptr }, /* c4: 0100 1101 1100 0100 */
{MOV,"PF,A" }, /* c5: 0100 1101 1100 0101 */
{MOV,"MKH,A" }, /* c6: 0100 1101 1100 0110 */
{MOV,"MKL,A" }, /* c7: 0100 1101 1100 0111 */
- {illegal,0 }, /* c8: 0100 1101 1100 1000 */
+ {illegal,nullptr }, /* c8: 0100 1101 1100 1000 */
{MOV,"SMH,A" }, /* c9: 0100 1101 1100 1001 */
{MOV,"SML,A" }, /* ca: 0100 1101 1100 1010 */
{MOV,"EOM,A" }, /* cb: 0100 1101 1100 1011 */
{MOV,"ETMM,A" }, /* cc: 0100 1101 1100 1100 */
{MOV,"TMM,A" }, /* cd: 0100 1101 1100 1101 */
- {illegal,0 }, /* ce: 0100 1101 1100 1110 */
- {illegal,0 }, /* cf: 0100 1101 1100 1111 */
+ {illegal,nullptr }, /* ce: 0100 1101 1100 1110 */
+ {illegal,nullptr }, /* cf: 0100 1101 1100 1111 */
{MOV,"MM,A" }, /* d0: 0100 1101 1101 0000 */
{MOV,"MCC,A" }, /* d1: 0100 1101 1101 0001 */
{MOV,"MA,A" }, /* d2: 0100 1101 1101 0010 */
{MOV,"MB,A" }, /* d3: 0100 1101 1101 0011 */
{MOV,"MC,A" }, /* d4: 0100 1101 1101 0100 */
- {illegal,0 }, /* d5: 0100 1101 1101 0101 */
- {illegal,0 }, /* d6: 0100 1101 1101 0110 */
+ {illegal,nullptr }, /* d5: 0100 1101 1101 0101 */
+ {illegal,nullptr }, /* d6: 0100 1101 1101 0110 */
{MOV,"MF,A" }, /* d7: 0100 1101 1101 0111 */
{MOV,"TXB,A" }, /* d8: 0100 1101 1101 1000 */
- {illegal,0 }, /* d9: 0100 1101 1101 1001 */
+ {illegal,nullptr }, /* d9: 0100 1101 1101 1001 */
{MOV,"TM0,A" }, /* da: 0100 1101 1101 1010 */
{MOV,"TM1,A" }, /* db: 0100 1101 1101 1011 */
- {illegal,0 }, /* dc: 0100 1101 1101 1100 */
- {illegal,0 }, /* dd: 0100 1101 1101 1101 */
- {illegal,0 }, /* de: 0100 1101 1101 1110 */
- {illegal,0 }, /* df: 0100 1101 1101 1111 */
-
- {illegal,0 }, /* e0: 0100 1101 1110 0000 */
- {illegal,0 }, /* e1: 0100 1101 1110 0001 */
- {illegal,0 }, /* e2: 0100 1101 1110 0010 */
- {illegal,0 }, /* e3: 0100 1101 1110 0011 */
- {illegal,0 }, /* e4: 0100 1101 1110 0100 */
+ {illegal,nullptr }, /* dc: 0100 1101 1101 1100 */
+ {illegal,nullptr }, /* dd: 0100 1101 1101 1101 */
+ {illegal,nullptr }, /* de: 0100 1101 1101 1110 */
+ {illegal,nullptr }, /* df: 0100 1101 1101 1111 */
+
+ {illegal,nullptr }, /* e0: 0100 1101 1110 0000 */
+ {illegal,nullptr }, /* e1: 0100 1101 1110 0001 */
+ {illegal,nullptr }, /* e2: 0100 1101 1110 0010 */
+ {illegal,nullptr }, /* e3: 0100 1101 1110 0011 */
+ {illegal,nullptr }, /* e4: 0100 1101 1110 0100 */
{MOV,"MT,A" }, /* e5: 0100 1101 1110 0101 */ /* 7807 */
- {illegal,0 }, /* e6: 0100 1101 1110 0110 */
- {illegal,0 }, /* e7: 0100 1101 1110 0111 */
- {illegal,0 }, /* e8: 0100 1101 1110 1000 */
- {illegal,0 }, /* e9: 0100 1101 1110 1001 */
- {illegal,0 }, /* ea: 0100 1101 1110 1010 */
- {illegal,0 }, /* eb: 0100 1101 1110 1011 */
- {illegal,0 }, /* ec: 0100 1101 1110 1100 */
- {illegal,0 }, /* ed: 0100 1101 1110 1101 */
- {illegal,0 }, /* ee: 0100 1101 1110 1110 */
- {illegal,0 }, /* ef: 0100 1101 1110 1111 */
-
- {illegal,0 }, /* f0: 0100 1101 1111 0000 */
- {illegal,0 }, /* f1: 0100 1101 1111 0001 */
- {illegal,0 }, /* f2: 0100 1101 1111 0010 */
- {illegal,0 }, /* f3: 0100 1101 1111 0011 */
- {illegal,0 }, /* f4: 0100 1101 1111 0100 */
- {illegal,0 }, /* f5: 0100 1101 1111 0101 */
- {illegal,0 }, /* f6: 0100 1101 1111 0110 */
- {illegal,0 }, /* f7: 0100 1101 1111 0111 */
- {illegal,0 }, /* f8: 0100 1101 1111 1000 */
- {illegal,0 }, /* f9: 0100 1101 1111 1001 */
- {illegal,0 }, /* fa: 0100 1101 1111 1010 */
- {illegal,0 }, /* fb: 0100 1101 1111 1011 */
- {illegal,0 }, /* fc: 0100 1101 1111 1100 */
- {illegal,0 }, /* fd: 0100 1101 1111 1101 */
- {illegal,0 }, /* fe: 0100 1101 1111 1110 */
- {illegal,0 } /* ff: 0100 1101 1111 1111 */
+ {illegal,nullptr }, /* e6: 0100 1101 1110 0110 */
+ {illegal,nullptr }, /* e7: 0100 1101 1110 0111 */
+ {illegal,nullptr }, /* e8: 0100 1101 1110 1000 */
+ {illegal,nullptr }, /* e9: 0100 1101 1110 1001 */
+ {illegal,nullptr }, /* ea: 0100 1101 1110 1010 */
+ {illegal,nullptr }, /* eb: 0100 1101 1110 1011 */
+ {illegal,nullptr }, /* ec: 0100 1101 1110 1100 */
+ {illegal,nullptr }, /* ed: 0100 1101 1110 1101 */
+ {illegal,nullptr }, /* ee: 0100 1101 1110 1110 */
+ {illegal,nullptr }, /* ef: 0100 1101 1110 1111 */
+
+ {illegal,nullptr }, /* f0: 0100 1101 1111 0000 */
+ {illegal,nullptr }, /* f1: 0100 1101 1111 0001 */
+ {illegal,nullptr }, /* f2: 0100 1101 1111 0010 */
+ {illegal,nullptr }, /* f3: 0100 1101 1111 0011 */
+ {illegal,nullptr }, /* f4: 0100 1101 1111 0100 */
+ {illegal,nullptr }, /* f5: 0100 1101 1111 0101 */
+ {illegal,nullptr }, /* f6: 0100 1101 1111 0110 */
+ {illegal,nullptr }, /* f7: 0100 1101 1111 0111 */
+ {illegal,nullptr }, /* f8: 0100 1101 1111 1000 */
+ {illegal,nullptr }, /* f9: 0100 1101 1111 1001 */
+ {illegal,nullptr }, /* fa: 0100 1101 1111 1010 */
+ {illegal,nullptr }, /* fb: 0100 1101 1111 1011 */
+ {illegal,nullptr }, /* fc: 0100 1101 1111 1100 */
+ {illegal,nullptr }, /* fd: 0100 1101 1111 1101 */
+ {illegal,nullptr }, /* fe: 0100 1101 1111 1110 */
+ {illegal,nullptr } /* ff: 0100 1101 1111 1111 */
};
/* prefix 60 */
static const struct dasm_s dasm60[256] =
{
- {illegal,0 }, /* 00: 0110 0000 0000 0000 */
- {illegal,0 }, /* 01: 0110 0000 0000 0001 */
- {illegal,0 }, /* 02: 0110 0000 0000 0010 */
- {illegal,0 }, /* 03: 0110 0000 0000 0011 */
- {illegal,0 }, /* 04: 0110 0000 0000 0100 */
- {illegal,0 }, /* 05: 0110 0000 0000 0101 */
- {illegal,0 }, /* 06: 0110 0000 0000 0110 */
- {illegal,0 }, /* 07: 0110 0000 0000 0111 */
+ {illegal,nullptr }, /* 00: 0110 0000 0000 0000 */
+ {illegal,nullptr }, /* 01: 0110 0000 0000 0001 */
+ {illegal,nullptr }, /* 02: 0110 0000 0000 0010 */
+ {illegal,nullptr }, /* 03: 0110 0000 0000 0011 */
+ {illegal,nullptr }, /* 04: 0110 0000 0000 0100 */
+ {illegal,nullptr }, /* 05: 0110 0000 0000 0101 */
+ {illegal,nullptr }, /* 06: 0110 0000 0000 0110 */
+ {illegal,nullptr }, /* 07: 0110 0000 0000 0111 */
{ANA,"V,A" }, /* 08: 0110 0000 0000 1000 */
{ANA,"A,A" }, /* 09: 0110 0000 0000 1001 */
{ANA,"B,A" }, /* 0a: 0110 0000 0000 1010 */
@@ -2109,14 +2109,14 @@ static const struct dasm_s dasm60[256] =
{ADD,"E,A" }, /* 45: 0110 0000 0100 0101 */
{ADD,"H,A" }, /* 46: 0110 0000 0100 0110 */
{ADD,"L,A" }, /* 47: 0110 0000 0100 0111 */
- {illegal,0 }, /* 48: 0110 0000 0100 1000 */
- {illegal,0 }, /* 49: 0110 0000 0100 1001 */
- {illegal,0 }, /* 4a: 0110 0000 0100 1010 */
- {illegal,0 }, /* 4b: 0110 0000 0100 1011 */
- {illegal,0 }, /* 4c: 0110 0000 0100 1100 */
- {illegal,0 }, /* 4d: 0110 0000 0100 1101 */
- {illegal,0 }, /* 4e: 0110 0000 0100 1110 */
- {illegal,0 }, /* 4f: 0110 0000 0100 1111 */
+ {illegal,nullptr }, /* 48: 0110 0000 0100 1000 */
+ {illegal,nullptr }, /* 49: 0110 0000 0100 1001 */
+ {illegal,nullptr }, /* 4a: 0110 0000 0100 1010 */
+ {illegal,nullptr }, /* 4b: 0110 0000 0100 1011 */
+ {illegal,nullptr }, /* 4c: 0110 0000 0100 1100 */
+ {illegal,nullptr }, /* 4d: 0110 0000 0100 1101 */
+ {illegal,nullptr }, /* 4e: 0110 0000 0100 1110 */
+ {illegal,nullptr }, /* 4f: 0110 0000 0100 1111 */
{ADC,"V,A" }, /* 50: 0110 0000 0101 0000 */
{ADC,"A,A" }, /* 51: 0110 0000 0101 0001 */
@@ -2126,14 +2126,14 @@ static const struct dasm_s dasm60[256] =
{ADC,"E,A" }, /* 55: 0110 0000 0101 0101 */
{ADC,"H,A" }, /* 56: 0110 0000 0101 0110 */
{ADC,"L,A" }, /* 57: 0110 0000 0101 0111 */
- {illegal,0 }, /* 58: 0110 0000 0101 1000 */
- {illegal,0 }, /* 59: 0110 0000 0101 1001 */
- {illegal,0 }, /* 5a: 0110 0000 0101 1010 */
- {illegal,0 }, /* 5b: 0110 0000 0101 1011 */
- {illegal,0 }, /* 5c: 0110 0000 0101 1100 */
- {illegal,0 }, /* 5d: 0110 0000 0101 1101 */
- {illegal,0 }, /* 5e: 0110 0000 0101 1110 */
- {illegal,0 }, /* 5f: 0110 0000 0101 1111 */
+ {illegal,nullptr }, /* 58: 0110 0000 0101 1000 */
+ {illegal,nullptr }, /* 59: 0110 0000 0101 1001 */
+ {illegal,nullptr }, /* 5a: 0110 0000 0101 1010 */
+ {illegal,nullptr }, /* 5b: 0110 0000 0101 1011 */
+ {illegal,nullptr }, /* 5c: 0110 0000 0101 1100 */
+ {illegal,nullptr }, /* 5d: 0110 0000 0101 1101 */
+ {illegal,nullptr }, /* 5e: 0110 0000 0101 1110 */
+ {illegal,nullptr }, /* 5f: 0110 0000 0101 1111 */
{SUB,"V,A" }, /* 60: 0110 0000 0110 0000 */
{SUB,"A,A" }, /* 61: 0110 0000 0110 0001 */
@@ -2169,14 +2169,14 @@ static const struct dasm_s dasm60[256] =
{EQA,"H,A" }, /* 7e: 0110 0000 0111 1110 */
{EQA,"L,A" }, /* 7f: 0110 0000 0111 1111 */
- {illegal,0 }, /* 80: 0110 0000 1000 0000 */
- {illegal,0 }, /* 81: 0110 0000 1000 0001 */
- {illegal,0 }, /* 82: 0110 0000 1000 0010 */
- {illegal,0 }, /* 83: 0110 0000 1000 0011 */
- {illegal,0 }, /* 84: 0110 0000 1000 0100 */
- {illegal,0 }, /* 85: 0110 0000 1000 0101 */
- {illegal,0 }, /* 86: 0110 0000 1000 0110 */
- {illegal,0 }, /* 87: 0110 0000 1000 0111 */
+ {illegal,nullptr }, /* 80: 0110 0000 1000 0000 */
+ {illegal,nullptr }, /* 81: 0110 0000 1000 0001 */
+ {illegal,nullptr }, /* 82: 0110 0000 1000 0010 */
+ {illegal,nullptr }, /* 83: 0110 0000 1000 0011 */
+ {illegal,nullptr }, /* 84: 0110 0000 1000 0100 */
+ {illegal,nullptr }, /* 85: 0110 0000 1000 0101 */
+ {illegal,nullptr }, /* 86: 0110 0000 1000 0110 */
+ {illegal,nullptr }, /* 87: 0110 0000 1000 0111 */
{ANA,"A,V" }, /* 88: 0110 0000 1000 1000 */
{ANA,"A,A" }, /* 89: 0110 0000 1000 1001 */
{ANA,"A,B" }, /* 8a: 0110 0000 1000 1010 */
@@ -2313,7 +2313,7 @@ static const struct dasm_s dasm64_7810[256] =
{MVI,"PB,%b" }, /* 01: 0110 0100 0000 0001 xxxx xxxx */
{MVI,"PC,%b" }, /* 02: 0110 0100 0000 0010 xxxx xxxx */
{MVI,"PD,%b" }, /* 03: 0110 0100 0000 0011 xxxx xxxx */
- {illegal,0 }, /* 04: 0110 0100 0000 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 04: 0110 0100 0000 0100 xxxx xxxx */
{MVI,"PF,%b" }, /* 05: 0110 0100 0000 0101 xxxx xxxx */
{MVI,"MKH,%b" }, /* 06: 0110 0100 0000 0110 xxxx xxxx */
{MVI,"MKL,%b" }, /* 07: 0110 0100 0000 0111 xxxx xxxx */
@@ -2321,7 +2321,7 @@ static const struct dasm_s dasm64_7810[256] =
{ANI,"PB,%b" }, /* 09: 0110 0100 0000 1001 xxxx xxxx */
{ANI,"PC,%b" }, /* 0a: 0110 0100 0000 1010 xxxx xxxx */
{ANI,"PD,%b" }, /* 0b: 0110 0100 0000 1011 xxxx xxxx */
- {illegal,0 }, /* 0c: 0110 0100 0000 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 0c: 0110 0100 0000 1100 xxxx xxxx */
{ANI,"PF,%b" }, /* 0d: 0110 0100 0000 1101 xxxx xxxx */
{ANI,"MKH,%b" }, /* 0e: 0110 0100 0000 1110 xxxx xxxx */
{ANI,"MKL,%b" }, /* 0f: 0110 0100 0000 1111 xxxx xxxx */
@@ -2330,7 +2330,7 @@ static const struct dasm_s dasm64_7810[256] =
{XRI,"PB,%b" }, /* 11: 0110 0100 0001 0001 xxxx xxxx */
{XRI,"PC,%b" }, /* 12: 0110 0100 0001 0010 xxxx xxxx */
{XRI,"PD,%b" }, /* 13: 0110 0100 0001 0011 xxxx xxxx */
- {illegal,0 }, /* 14: 0110 0100 0001 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 14: 0110 0100 0001 0100 xxxx xxxx */
{XRI,"PF,%b" }, /* 15: 0110 0100 0001 0101 xxxx xxxx */
{XRI,"MKH,%b" }, /* 16: 0110 0100 0001 0110 xxxx xxxx */
{XRI,"MKL,%b" }, /* 17: 0110 0100 0001 0111 xxxx xxxx */
@@ -2338,7 +2338,7 @@ static const struct dasm_s dasm64_7810[256] =
{ORI,"PB,%b" }, /* 19: 0110 0100 0001 1001 xxxx xxxx */
{ORI,"PC,%b" }, /* 1a: 0110 0100 0001 1010 xxxx xxxx */
{ORI,"PD,%b" }, /* 1b: 0110 0100 0001 1011 xxxx xxxx */
- {illegal,0 }, /* 1c: 0110 0100 0001 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 1c: 0110 0100 0001 1100 xxxx xxxx */
{ORI,"PF,%b" }, /* 1d: 0110 0100 0001 1101 xxxx xxxx */
{ORI,"MKH,%b" }, /* 1e: 0110 0100 0001 1110 xxxx xxxx */
{ORI,"MKL,%b" }, /* 1f: 0110 0100 0001 1111 xxxx xxxx */
@@ -2347,7 +2347,7 @@ static const struct dasm_s dasm64_7810[256] =
{ADINC,"PB,%b" }, /* 21: 0110 0100 0010 0001 xxxx xxxx */
{ADINC,"PC,%b" }, /* 22: 0110 0100 0010 0010 xxxx xxxx */
{ADINC,"PD,%b" }, /* 23: 0110 0100 0010 0011 xxxx xxxx */
- {illegal,0 }, /* 24: 0110 0100 0010 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 24: 0110 0100 0010 0100 xxxx xxxx */
{ADINC,"PF,%b" }, /* 25: 0110 0100 0010 0101 xxxx xxxx */
{ADINC,"MKH,%b" }, /* 26: 0110 0100 0010 0110 xxxx xxxx */
{ADINC,"MKL,%b" }, /* 27: 0110 0100 0010 0111 xxxx xxxx */
@@ -2355,7 +2355,7 @@ static const struct dasm_s dasm64_7810[256] =
{GTI,"PB,%b" }, /* 29: 0110 0100 0010 1001 xxxx xxxx */
{GTI,"PC,%b" }, /* 2a: 0110 0100 0010 1010 xxxx xxxx */
{GTI,"PD,%b" }, /* 2b: 0110 0100 0010 1011 xxxx xxxx */
- {illegal,0 }, /* 2c: 0110 0100 0010 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 2c: 0110 0100 0010 1100 xxxx xxxx */
{GTI,"PF,%b" }, /* 2d: 0110 0100 0010 1101 xxxx xxxx */
{GTI,"MKH,%b" }, /* 2e: 0110 0100 0010 1110 xxxx xxxx */
{GTI,"MKL,%b" }, /* 2f: 0110 0100 0010 1111 xxxx xxxx */
@@ -2364,7 +2364,7 @@ static const struct dasm_s dasm64_7810[256] =
{SUINB,"PB,%b" }, /* 31: 0110 0100 0011 0001 xxxx xxxx */
{SUINB,"PC,%b" }, /* 32: 0110 0100 0011 0010 xxxx xxxx */
{SUINB,"PD,%b" }, /* 33: 0110 0100 0011 0011 xxxx xxxx */
- {illegal,0 }, /* 34: 0110 0100 0011 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 34: 0110 0100 0011 0100 xxxx xxxx */
{SUINB,"PF,%b" }, /* 35: 0110 0100 0011 0101 xxxx xxxx */
{SUINB,"MKH,%b" }, /* 36: 0110 0100 0011 0110 xxxx xxxx */
{SUINB,"MKL,%b" }, /* 37: 0110 0100 0011 0111 xxxx xxxx */
@@ -2372,7 +2372,7 @@ static const struct dasm_s dasm64_7810[256] =
{LTI,"PB,%b" }, /* 39: 0110 0100 0011 1001 xxxx xxxx */
{LTI,"PC,%b" }, /* 3a: 0110 0100 0011 1010 xxxx xxxx */
{LTI,"PD,%b" }, /* 3b: 0110 0100 0011 1011 xxxx xxxx */
- {illegal,0 }, /* 3c: 0110 0100 0011 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 3c: 0110 0100 0011 1100 xxxx xxxx */
{LTI,"PF,%b" }, /* 3d: 0110 0100 0011 1101 xxxx xxxx */
{LTI,"MKH,%b" }, /* 3e: 0110 0100 0011 1110 xxxx xxxx */
{LTI,"MKL,%b" }, /* 3f: 0110 0100 0011 1111 xxxx xxxx */
@@ -2381,7 +2381,7 @@ static const struct dasm_s dasm64_7810[256] =
{ADI,"PB,%b" }, /* 41: 0110 0100 0100 0001 xxxx xxxx */
{ADI,"PC,%b" }, /* 42: 0110 0100 0100 0010 xxxx xxxx */
{ADI,"PD,%b" }, /* 43: 0110 0100 0100 0011 xxxx xxxx */
- {illegal,0 }, /* 44: 0110 0100 0100 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 44: 0110 0100 0100 0100 xxxx xxxx */
{ADI,"PF,%b" }, /* 45: 0110 0100 0100 0101 xxxx xxxx */
{ADI,"MKH,%b" }, /* 46: 0110 0100 0100 0110 xxxx xxxx */
{ADI,"MKL,%b" }, /* 47: 0110 0100 0100 0111 xxxx xxxx */
@@ -2389,7 +2389,7 @@ static const struct dasm_s dasm64_7810[256] =
{ONI,"PB,%b" }, /* 49: 0110 0100 0100 1001 xxxx xxxx */
{ONI,"PC,%b" }, /* 4a: 0110 0100 0100 1010 xxxx xxxx */
{ONI,"PD,%b" }, /* 4b: 0110 0100 0100 1011 xxxx xxxx */
- {illegal,0 }, /* 4c: 0110 0100 0100 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 4c: 0110 0100 0100 1100 xxxx xxxx */
{ONI,"PF,%b" }, /* 4d: 0110 0100 0100 1101 xxxx xxxx */
{ONI,"MKH,%b" }, /* 4e: 0110 0100 0100 1110 xxxx xxxx */
{ONI,"MKL,%b" }, /* 4f: 0110 0100 0100 1111 xxxx xxxx */
@@ -2398,7 +2398,7 @@ static const struct dasm_s dasm64_7810[256] =
{ACI,"PB,%b" }, /* 51: 0110 0100 0101 0001 xxxx xxxx */
{ACI,"PC,%b" }, /* 52: 0110 0100 0101 0010 xxxx xxxx */
{ACI,"PD,%b" }, /* 53: 0110 0100 0101 0011 xxxx xxxx */
- {illegal,0 }, /* 54: 0110 0100 0101 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 54: 0110 0100 0101 0100 xxxx xxxx */
{ACI,"PF,%b" }, /* 55: 0110 0100 0101 0101 xxxx xxxx */
{ACI,"MKH,%b" }, /* 56: 0110 0100 0101 0110 xxxx xxxx */
{ACI,"MKL,%b" }, /* 57: 0110 0100 0101 0111 xxxx xxxx */
@@ -2406,7 +2406,7 @@ static const struct dasm_s dasm64_7810[256] =
{OFFI,"PB,%b" }, /* 59: 0110 0100 0101 1001 xxxx xxxx */
{OFFI,"PC,%b" }, /* 5a: 0110 0100 0101 1010 xxxx xxxx */
{OFFI,"PD,%b" }, /* 5b: 0110 0100 0101 1011 xxxx xxxx */
- {illegal,0 }, /* 5c: 0110 0100 0101 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 5c: 0110 0100 0101 1100 xxxx xxxx */
{OFFI,"PF,%b" }, /* 5d: 0110 0100 0101 1101 xxxx xxxx */
{OFFI,"MKH,%b" }, /* 5e: 0110 0100 0101 1110 xxxx xxxx */
{OFFI,"MKL,%b" }, /* 5f: 0110 0100 0101 1111 xxxx xxxx */
@@ -2415,7 +2415,7 @@ static const struct dasm_s dasm64_7810[256] =
{SUI,"PB,%b" }, /* 61: 0110 0100 0110 0001 xxxx xxxx */
{SUI,"PC,%b" }, /* 62: 0110 0100 0110 0010 xxxx xxxx */
{SUI,"PD,%b" }, /* 63: 0110 0100 0110 0011 xxxx xxxx */
- {illegal,0 }, /* 64: 0110 0100 0110 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 64: 0110 0100 0110 0100 xxxx xxxx */
{SUI,"PF,%b" }, /* 65: 0110 0100 0110 0101 xxxx xxxx */
{SUI,"MKH,%b" }, /* 66: 0110 0100 0110 0110 xxxx xxxx */
{SUI,"MKL,%b" }, /* 67: 0110 0100 0110 0111 xxxx xxxx */
@@ -2423,7 +2423,7 @@ static const struct dasm_s dasm64_7810[256] =
{NEI,"PB,%b" }, /* 69: 0110 0100 0110 1001 xxxx xxxx */
{NEI,"PC,%b" }, /* 6a: 0110 0100 0110 1010 xxxx xxxx */
{NEI,"PD,%b" }, /* 6b: 0110 0100 0110 1011 xxxx xxxx */
- {illegal,0 }, /* 6c: 0110 0100 0110 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 6c: 0110 0100 0110 1100 xxxx xxxx */
{NEI,"PF,%b" }, /* 6d: 0110 0100 0110 1101 xxxx xxxx */
{NEI,"MKH,%b" }, /* 6e: 0110 0100 0110 1110 xxxx xxxx */
{NEI,"MKL,%b" }, /* 6f: 0110 0100 0110 1111 xxxx xxxx */
@@ -2432,7 +2432,7 @@ static const struct dasm_s dasm64_7810[256] =
{SBI,"PB,%b" }, /* 71: 0110 0100 0111 0001 xxxx xxxx */
{SBI,"PC,%b" }, /* 72: 0110 0100 0111 0010 xxxx xxxx */
{SBI,"PD,%b" }, /* 73: 0110 0100 0111 0011 xxxx xxxx */
- {illegal,0 }, /* 74: 0110 0100 0111 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 74: 0110 0100 0111 0100 xxxx xxxx */
{SBI,"PF,%b" }, /* 75: 0110 0100 0111 0101 xxxx xxxx */
{SBI,"MKH,%b" }, /* 76: 0110 0100 0111 0110 xxxx xxxx */
{SBI,"MKL,%b" }, /* 77: 0110 0100 0111 0111 xxxx xxxx */
@@ -2440,146 +2440,146 @@ static const struct dasm_s dasm64_7810[256] =
{EQI,"PB,%b" }, /* 79: 0110 0100 0111 1001 xxxx xxxx */
{EQI,"PC,%b" }, /* 7a: 0110 0100 0111 1010 xxxx xxxx */
{EQI,"PD,%b" }, /* 7b: 0110 0100 0111 1011 xxxx xxxx */
- {illegal,0 }, /* 7c: 0110 0100 0111 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 7c: 0110 0100 0111 1100 xxxx xxxx */
{EQI,"PF,%b" }, /* 7d: 0110 0100 0111 1101 xxxx xxxx */
{EQI,"MKH,%b" }, /* 7e: 0110 0100 0111 1110 xxxx xxxx */
{EQI,"MKL,%b" }, /* 7f: 0110 0100 0111 1111 xxxx xxxx */
{MVI,"ANM,%b" }, /* 80: 0110 0100 1000 0000 xxxx xxxx */ /* 7810 */
{MVI,"SMH,%b" }, /* 81: 0110 0100 1000 0001 xxxx xxxx */
- {illegal,0 }, /* 82: 0110 0100 1000 0010 xxxx xxxx */
+ {illegal,nullptr }, /* 82: 0110 0100 1000 0010 xxxx xxxx */
{MVI,"EOM,%b" }, /* 83: 0110 0100 1000 0011 xxxx xxxx */
- {illegal,0 }, /* 84: 0110 0100 1000 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 84: 0110 0100 1000 0100 xxxx xxxx */
{MVI,"TMM,%b" }, /* 85: 0110 0100 1000 0101 xxxx xxxx */
- {illegal,0 }, /* 86: 0110 0100 1000 0110 xxxx xxxx */
- {illegal,0 }, /* 87: 0110 0100 1000 0111 xxxx xxxx */
+ {illegal,nullptr }, /* 86: 0110 0100 1000 0110 xxxx xxxx */
+ {illegal,nullptr }, /* 87: 0110 0100 1000 0111 xxxx xxxx */
{ANI,"ANM,%b" }, /* 88: 0110 0100 1000 1000 xxxx xxxx */ /* 7810 */
{ANI,"SMH,%b" }, /* 89: 0110 0100 1000 1001 xxxx xxxx */
- {illegal,0 }, /* 8a: 0110 0100 1000 1010 xxxx xxxx */
+ {illegal,nullptr }, /* 8a: 0110 0100 1000 1010 xxxx xxxx */
{ANI,"EOM,%b" }, /* 8b: 0110 0100 1000 1011 xxxx xxxx */
- {illegal,0 }, /* 8c: 0110 0100 1000 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 8c: 0110 0100 1000 1100 xxxx xxxx */
{ANI,"TMM,%b" }, /* 8d: 0110 0100 1000 1101 xxxx xxxx */
- {illegal,0 }, /* 8e: 0110 0100 1000 1110 xxxx xxxx */
- {illegal,0 }, /* 8f: 0110 0100 1000 1111 xxxx xxxx */
+ {illegal,nullptr }, /* 8e: 0110 0100 1000 1110 xxxx xxxx */
+ {illegal,nullptr }, /* 8f: 0110 0100 1000 1111 xxxx xxxx */
{XRI,"ANM,%b" }, /* 90: 0110 0100 1001 0000 xxxx xxxx */ /* 7810 */
{XRI,"SMH,%b" }, /* 91: 0110 0100 1001 0001 xxxx xxxx */
- {illegal,0 }, /* 92: 0110 0100 1001 0010 xxxx xxxx */
+ {illegal,nullptr }, /* 92: 0110 0100 1001 0010 xxxx xxxx */
{XRI,"EOM,%b" }, /* 93: 0110 0100 1001 0011 xxxx xxxx */
- {illegal,0 }, /* 94: 0110 0100 1001 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 94: 0110 0100 1001 0100 xxxx xxxx */
{XRI,"TMM,%b" }, /* 95: 0110 0100 1001 0101 xxxx xxxx */
- {illegal,0 }, /* 96: 0110 0100 1001 0110 xxxx xxxx */
- {illegal,0 }, /* 97: 0110 0100 1001 0111 xxxx xxxx */
+ {illegal,nullptr }, /* 96: 0110 0100 1001 0110 xxxx xxxx */
+ {illegal,nullptr }, /* 97: 0110 0100 1001 0111 xxxx xxxx */
{ORI,"ANM,%b" }, /* 98: 0110 0100 1001 1000 xxxx xxxx */ /* 7810 */
{ORI,"SMH,%b" }, /* 99: 0110 0100 1001 1001 xxxx xxxx */
- {illegal,0 }, /* 9a: 0110 0100 1001 1010 xxxx xxxx */
+ {illegal,nullptr }, /* 9a: 0110 0100 1001 1010 xxxx xxxx */
{ORI,"EOM,%b" }, /* 9b: 0110 0100 1001 1011 xxxx xxxx */
- {illegal,0 }, /* 9c: 0110 0100 1001 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 9c: 0110 0100 1001 1100 xxxx xxxx */
{ORI,"TMM,%b" }, /* 9d: 0110 0100 1001 1101 xxxx xxxx */
- {illegal,0 }, /* 9e: 0110 0100 1001 1110 xxxx xxxx */
- {illegal,0 }, /* 9f: 0110 0100 1001 1111 xxxx xxxx */
+ {illegal,nullptr }, /* 9e: 0110 0100 1001 1110 xxxx xxxx */
+ {illegal,nullptr }, /* 9f: 0110 0100 1001 1111 xxxx xxxx */
{ADINC,"ANM,%b" }, /* a0: 0110 0100 1010 0000 xxxx xxxx */ /* 7810 */
{ADINC,"SMH,%b" }, /* a1: 0110 0100 1010 0001 xxxx xxxx */
- {illegal,0 }, /* a2: 0110 0100 1010 0010 xxxx xxxx */
+ {illegal,nullptr }, /* a2: 0110 0100 1010 0010 xxxx xxxx */
{ADINC,"EOM,%b" }, /* a3: 0110 0100 1010 0011 xxxx xxxx */
- {illegal,0 }, /* a4: 0110 0100 1010 0100 xxxx xxxx */
+ {illegal,nullptr }, /* a4: 0110 0100 1010 0100 xxxx xxxx */
{ADINC,"TMM,%b" }, /* a5: 0110 0100 1010 0101 xxxx xxxx */
- {illegal,0 }, /* a6: 0110 0100 1010 0110 xxxx xxxx */
- {illegal,0 }, /* a7: 0110 0100 1010 0111 xxxx xxxx */
+ {illegal,nullptr }, /* a6: 0110 0100 1010 0110 xxxx xxxx */
+ {illegal,nullptr }, /* a7: 0110 0100 1010 0111 xxxx xxxx */
{GTI,"ANM,%b" }, /* a8: 0110 0100 1010 1000 xxxx xxxx */ /* 7810 */
{GTI,"SMH,%b" }, /* a9: 0110 0100 1010 1001 xxxx xxxx */
- {illegal,0 }, /* aa: 0110 0100 1010 1010 xxxx xxxx */
+ {illegal,nullptr }, /* aa: 0110 0100 1010 1010 xxxx xxxx */
{GTI,"EOM,%b" }, /* ab: 0110 0100 1010 1011 xxxx xxxx */
- {illegal,0 }, /* ac: 0110 0100 1010 1100 xxxx xxxx */
+ {illegal,nullptr }, /* ac: 0110 0100 1010 1100 xxxx xxxx */
{GTI,"TMM,%b" }, /* ad: 0110 0100 1010 1101 xxxx xxxx */
- {illegal,0 }, /* ae: 0110 0100 1010 1110 xxxx xxxx */
- {illegal,0 }, /* af: 0110 0100 1010 1111 xxxx xxxx */
+ {illegal,nullptr }, /* ae: 0110 0100 1010 1110 xxxx xxxx */
+ {illegal,nullptr }, /* af: 0110 0100 1010 1111 xxxx xxxx */
{SUINB,"ANM,%b" }, /* b0: 0110 0100 1011 0000 xxxx xxxx */ /* 7810 */
{SUINB,"SMH,%b" }, /* b1: 0110 0100 1011 0001 xxxx xxxx */
- {illegal,0 }, /* b2: 0110 0100 1011 0010 xxxx xxxx */
+ {illegal,nullptr }, /* b2: 0110 0100 1011 0010 xxxx xxxx */
{SUINB,"EOM,%b" }, /* b3: 0110 0100 1011 0011 xxxx xxxx */
- {illegal,0 }, /* b4: 0110 0100 1011 0100 xxxx xxxx */
+ {illegal,nullptr }, /* b4: 0110 0100 1011 0100 xxxx xxxx */
{SUINB,"TMM,%b" }, /* b5: 0110 0100 1011 0101 xxxx xxxx */
- {illegal,0 }, /* b6: 0110 0100 1011 0110 xxxx xxxx */
- {illegal,0 }, /* b7: 0110 0100 1011 0111 xxxx xxxx */
+ {illegal,nullptr }, /* b6: 0110 0100 1011 0110 xxxx xxxx */
+ {illegal,nullptr }, /* b7: 0110 0100 1011 0111 xxxx xxxx */
{LTI,"ANM,%b" }, /* b8: 0110 0100 1011 1000 xxxx xxxx */ /* 7810 */
{LTI,"SMH,%b" }, /* b9: 0110 0100 1011 1001 xxxx xxxx */
- {illegal,0 }, /* ba: 0110 0100 1011 1010 xxxx xxxx */
+ {illegal,nullptr }, /* ba: 0110 0100 1011 1010 xxxx xxxx */
{LTI,"EOM,%b" }, /* bb: 0110 0100 1011 1011 xxxx xxxx */
- {illegal,0 }, /* bc: 0110 0100 1011 1100 xxxx xxxx */
+ {illegal,nullptr }, /* bc: 0110 0100 1011 1100 xxxx xxxx */
{LTI,"TMM,%b" }, /* bd: 0110 0100 1011 1101 xxxx xxxx */
- {illegal,0 }, /* be: 0110 0100 1011 1110 xxxx xxxx */
- {illegal,0 }, /* bf: 0110 0100 1011 1111 xxxx xxxx */
+ {illegal,nullptr }, /* be: 0110 0100 1011 1110 xxxx xxxx */
+ {illegal,nullptr }, /* bf: 0110 0100 1011 1111 xxxx xxxx */
{ADI,"ANM,%b" }, /* c0: 0110 0100 1100 0000 xxxx xxxx */ /* 7810 */
{ADI,"SMH,%b" }, /* c1: 0110 0100 1100 0001 xxxx xxxx */
- {illegal,0 }, /* c2: 0110 0100 1100 0010 xxxx xxxx */
+ {illegal,nullptr }, /* c2: 0110 0100 1100 0010 xxxx xxxx */
{ADI,"EOM,%b" }, /* c3: 0110 0100 1100 0011 xxxx xxxx */
- {illegal,0 }, /* c4: 0110 0100 1100 0100 xxxx xxxx */
+ {illegal,nullptr }, /* c4: 0110 0100 1100 0100 xxxx xxxx */
{ADI,"TMM,%b" }, /* c5: 0110 0100 1100 0101 xxxx xxxx */
- {illegal,0 }, /* c6: 0110 0100 1100 0110 xxxx xxxx */
- {illegal,0 }, /* c7: 0110 0100 1100 0111 xxxx xxxx */
+ {illegal,nullptr }, /* c6: 0110 0100 1100 0110 xxxx xxxx */
+ {illegal,nullptr }, /* c7: 0110 0100 1100 0111 xxxx xxxx */
{ONI,"ANM,%b" }, /* c8: 0110 0100 1100 1000 xxxx xxxx */ /* 7810 */
{ONI,"SMH,%b" }, /* c9: 0110 0100 1100 1001 xxxx xxxx */
- {illegal,0 }, /* ca: 0110 0100 1100 1010 xxxx xxxx */
+ {illegal,nullptr }, /* ca: 0110 0100 1100 1010 xxxx xxxx */
{ONI,"EOM,%b" }, /* cb: 0110 0100 1100 1011 xxxx xxxx */
- {illegal,0 }, /* cc: 0110 0100 1100 1100 xxxx xxxx */
+ {illegal,nullptr }, /* cc: 0110 0100 1100 1100 xxxx xxxx */
{ONI,"TMM,%b" }, /* cd: 0110 0100 1100 1101 xxxx xxxx */
- {illegal,0 }, /* ce: 0110 0100 1100 1110 xxxx xxxx */
- {illegal,0 }, /* cf: 0110 0100 1100 1111 xxxx xxxx */
+ {illegal,nullptr }, /* ce: 0110 0100 1100 1110 xxxx xxxx */
+ {illegal,nullptr }, /* cf: 0110 0100 1100 1111 xxxx xxxx */
{ACI,"ANM,%b" }, /* d0: 0110 0100 1101 0000 xxxx xxxx */ /* 7810 */
{ACI,"SMH,%b" }, /* d1: 0110 0100 1101 0001 xxxx xxxx */
- {illegal,0 }, /* d2: 0110 0100 1101 0010 xxxx xxxx */
+ {illegal,nullptr }, /* d2: 0110 0100 1101 0010 xxxx xxxx */
{ACI,"EOM,%b" }, /* d3: 0110 0100 1101 0011 xxxx xxxx */
- {illegal,0 }, /* d4: 0110 0100 1101 0100 xxxx xxxx */
+ {illegal,nullptr }, /* d4: 0110 0100 1101 0100 xxxx xxxx */
{ACI,"TMM,%b" }, /* d5: 0110 0100 1101 0101 xxxx xxxx */
- {illegal,0 }, /* d6: 0110 0100 1101 0110 xxxx xxxx */
- {illegal,0 }, /* d7: 0110 0100 1101 0111 xxxx xxxx */
+ {illegal,nullptr }, /* d6: 0110 0100 1101 0110 xxxx xxxx */
+ {illegal,nullptr }, /* d7: 0110 0100 1101 0111 xxxx xxxx */
{OFFI,"ANM,%b" }, /* d8: 0110 0100 1101 1000 xxxx xxxx */ /* 7810 */
{OFFI,"SMH,%b" }, /* d9: 0110 0100 1101 1001 xxxx xxxx */
- {illegal,0 }, /* da: 0110 0100 1101 1010 xxxx xxxx */
+ {illegal,nullptr }, /* da: 0110 0100 1101 1010 xxxx xxxx */
{OFFI,"EOM,%b" }, /* db: 0110 0100 1101 1011 xxxx xxxx */
- {illegal,0 }, /* dc: 0110 0100 1101 1100 xxxx xxxx */
+ {illegal,nullptr }, /* dc: 0110 0100 1101 1100 xxxx xxxx */
{OFFI,"TMM,%b" }, /* dd: 0110 0100 1101 1101 xxxx xxxx */
- {illegal,0 }, /* de: 0110 0100 1101 1110 xxxx xxxx */
- {illegal,0 }, /* df: 0110 0100 1101 1111 xxxx xxxx */
+ {illegal,nullptr }, /* de: 0110 0100 1101 1110 xxxx xxxx */
+ {illegal,nullptr }, /* df: 0110 0100 1101 1111 xxxx xxxx */
{SUI,"ANM,%b" }, /* e0: 0110 0100 1110 0000 xxxx xxxx */ /* 7810 */
{SUI,"SMH,%b" }, /* e1: 0110 0100 1110 0001 xxxx xxxx */
- {illegal,0 }, /* e2: 0110 0100 1110 0010 xxxx xxxx */
+ {illegal,nullptr }, /* e2: 0110 0100 1110 0010 xxxx xxxx */
{SUI,"EOM,%b" }, /* e3: 0110 0100 1110 0011 xxxx xxxx */
- {illegal,0 }, /* e4: 0110 0100 1110 0100 xxxx xxxx */
+ {illegal,nullptr }, /* e4: 0110 0100 1110 0100 xxxx xxxx */
{SUI,"TMM,%b" }, /* e5: 0110 0100 1110 0101 xxxx xxxx */
- {illegal,0 }, /* e6: 0110 0100 1110 0110 xxxx xxxx */
- {illegal,0 }, /* e7: 0110 0100 1110 0111 xxxx xxxx */
+ {illegal,nullptr }, /* e6: 0110 0100 1110 0110 xxxx xxxx */
+ {illegal,nullptr }, /* e7: 0110 0100 1110 0111 xxxx xxxx */
{NEI,"ANM,%b" }, /* e8: 0110 0100 1110 1000 xxxx xxxx */ /* 7810 */
{NEI,"SMH,%b" }, /* e9: 0110 0100 1110 1001 xxxx xxxx */
- {illegal,0 }, /* ea: 0110 0100 1110 1010 xxxx xxxx */
+ {illegal,nullptr }, /* ea: 0110 0100 1110 1010 xxxx xxxx */
{NEI,"EOM,%b" }, /* eb: 0110 0100 1110 1011 xxxx xxxx */
- {illegal,0 }, /* ec: 0110 0100 1110 1100 xxxx xxxx */
+ {illegal,nullptr }, /* ec: 0110 0100 1110 1100 xxxx xxxx */
{NEI,"TMM,%b" }, /* ed: 0110 0100 1110 1101 xxxx xxxx */
- {illegal,0 }, /* ee: 0110 0100 1110 1110 xxxx xxxx */
- {illegal,0 }, /* ef: 0110 0100 1110 1111 xxxx xxxx */
+ {illegal,nullptr }, /* ee: 0110 0100 1110 1110 xxxx xxxx */
+ {illegal,nullptr }, /* ef: 0110 0100 1110 1111 xxxx xxxx */
{SBI,"ANM,%b" }, /* f0: 0110 0100 1111 0000 xxxx xxxx */ /* 7810 */
{SBI,"SMH,%b" }, /* f1: 0110 0100 1111 0001 xxxx xxxx */
- {illegal,0 }, /* f2: 0110 0100 1111 0010 xxxx xxxx */
+ {illegal,nullptr }, /* f2: 0110 0100 1111 0010 xxxx xxxx */
{SBI,"EOM,%b" }, /* f3: 0110 0100 1111 0011 xxxx xxxx */
- {illegal,0 }, /* f4: 0110 0100 1111 0100 xxxx xxxx */
+ {illegal,nullptr }, /* f4: 0110 0100 1111 0100 xxxx xxxx */
{SBI,"TMM,%b" }, /* f5: 0110 0100 1111 0101 xxxx xxxx */
- {illegal,0 }, /* f6: 0110 0100 1111 0110 xxxx xxxx */
- {illegal,0 }, /* f7: 0110 0100 1111 0111 xxxx xxxx */
+ {illegal,nullptr }, /* f6: 0110 0100 1111 0110 xxxx xxxx */
+ {illegal,nullptr }, /* f7: 0110 0100 1111 0111 xxxx xxxx */
{EQI,"ANM,%b" }, /* f8: 0110 0100 1111 1000 xxxx xxxx */ /* 7810 */
{EQI,"SMH,%b" }, /* f9: 0110 0100 1111 1001 xxxx xxxx */
- {illegal,0 }, /* fa: 0110 0100 1111 1010 xxxx xxxx */
+ {illegal,nullptr }, /* fa: 0110 0100 1111 1010 xxxx xxxx */
{EQI,"EOM,%b" }, /* fb: 0110 0100 1111 1011 xxxx xxxx */
- {illegal,0 }, /* fc: 0110 0100 1111 1100 xxxx xxxx */
+ {illegal,nullptr }, /* fc: 0110 0100 1111 1100 xxxx xxxx */
{EQI,"TMM,%b" }, /* fd: 0110 0100 1111 1101 xxxx xxxx */
- {illegal,0 }, /* fe: 0110 0100 1111 1110 xxxx xxxx */
- {illegal,0 } /* ff: 0110 0100 1111 1111 xxxx xxxx */
+ {illegal,nullptr }, /* fe: 0110 0100 1111 1110 xxxx xxxx */
+ {illegal,nullptr } /* ff: 0110 0100 1111 1111 xxxx xxxx */
};
static const struct dasm_s dasm64_7807[256] =
@@ -2588,7 +2588,7 @@ static const struct dasm_s dasm64_7807[256] =
{MVI,"PB,%b" }, /* 01: 0110 0100 0000 0001 xxxx xxxx */
{MVI,"PC,%b" }, /* 02: 0110 0100 0000 0010 xxxx xxxx */
{MVI,"PD,%b" }, /* 03: 0110 0100 0000 0011 xxxx xxxx */
- {illegal,0 }, /* 04: 0110 0100 0000 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 04: 0110 0100 0000 0100 xxxx xxxx */
{MVI,"PF,%b" }, /* 05: 0110 0100 0000 0101 xxxx xxxx */
{MVI,"MKH,%b" }, /* 06: 0110 0100 0000 0110 xxxx xxxx */
{MVI,"MKL,%b" }, /* 07: 0110 0100 0000 0111 xxxx xxxx */
@@ -2596,7 +2596,7 @@ static const struct dasm_s dasm64_7807[256] =
{ANI,"PB,%b" }, /* 09: 0110 0100 0000 1001 xxxx xxxx */
{ANI,"PC,%b" }, /* 0a: 0110 0100 0000 1010 xxxx xxxx */
{ANI,"PD,%b" }, /* 0b: 0110 0100 0000 1011 xxxx xxxx */
- {illegal,0 }, /* 0c: 0110 0100 0000 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 0c: 0110 0100 0000 1100 xxxx xxxx */
{ANI,"PF,%b" }, /* 0d: 0110 0100 0000 1101 xxxx xxxx */
{ANI,"MKH,%b" }, /* 0e: 0110 0100 0000 1110 xxxx xxxx */
{ANI,"MKL,%b" }, /* 0f: 0110 0100 0000 1111 xxxx xxxx */
@@ -2605,7 +2605,7 @@ static const struct dasm_s dasm64_7807[256] =
{XRI,"PB,%b" }, /* 11: 0110 0100 0001 0001 xxxx xxxx */
{XRI,"PC,%b" }, /* 12: 0110 0100 0001 0010 xxxx xxxx */
{XRI,"PD,%b" }, /* 13: 0110 0100 0001 0011 xxxx xxxx */
- {illegal,0 }, /* 14: 0110 0100 0001 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 14: 0110 0100 0001 0100 xxxx xxxx */
{XRI,"PF,%b" }, /* 15: 0110 0100 0001 0101 xxxx xxxx */
{XRI,"MKH,%b" }, /* 16: 0110 0100 0001 0110 xxxx xxxx */
{XRI,"MKL,%b" }, /* 17: 0110 0100 0001 0111 xxxx xxxx */
@@ -2613,7 +2613,7 @@ static const struct dasm_s dasm64_7807[256] =
{ORI,"PB,%b" }, /* 19: 0110 0100 0001 1001 xxxx xxxx */
{ORI,"PC,%b" }, /* 1a: 0110 0100 0001 1010 xxxx xxxx */
{ORI,"PD,%b" }, /* 1b: 0110 0100 0001 1011 xxxx xxxx */
- {illegal,0 }, /* 1c: 0110 0100 0001 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 1c: 0110 0100 0001 1100 xxxx xxxx */
{ORI,"PF,%b" }, /* 1d: 0110 0100 0001 1101 xxxx xxxx */
{ORI,"MKH,%b" }, /* 1e: 0110 0100 0001 1110 xxxx xxxx */
{ORI,"MKL,%b" }, /* 1f: 0110 0100 0001 1111 xxxx xxxx */
@@ -2622,7 +2622,7 @@ static const struct dasm_s dasm64_7807[256] =
{ADINC,"PB,%b" }, /* 21: 0110 0100 0010 0001 xxxx xxxx */
{ADINC,"PC,%b" }, /* 22: 0110 0100 0010 0010 xxxx xxxx */
{ADINC,"PD,%b" }, /* 23: 0110 0100 0010 0011 xxxx xxxx */
- {illegal,0 }, /* 24: 0110 0100 0010 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 24: 0110 0100 0010 0100 xxxx xxxx */
{ADINC,"PF,%b" }, /* 25: 0110 0100 0010 0101 xxxx xxxx */
{ADINC,"MKH,%b" }, /* 26: 0110 0100 0010 0110 xxxx xxxx */
{ADINC,"MKL,%b" }, /* 27: 0110 0100 0010 0111 xxxx xxxx */
@@ -2630,7 +2630,7 @@ static const struct dasm_s dasm64_7807[256] =
{GTI,"PB,%b" }, /* 29: 0110 0100 0010 1001 xxxx xxxx */
{GTI,"PC,%b" }, /* 2a: 0110 0100 0010 1010 xxxx xxxx */
{GTI,"PD,%b" }, /* 2b: 0110 0100 0010 1011 xxxx xxxx */
- {illegal,0 }, /* 2c: 0110 0100 0010 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 2c: 0110 0100 0010 1100 xxxx xxxx */
{GTI,"PF,%b" }, /* 2d: 0110 0100 0010 1101 xxxx xxxx */
{GTI,"MKH,%b" }, /* 2e: 0110 0100 0010 1110 xxxx xxxx */
{GTI,"MKL,%b" }, /* 2f: 0110 0100 0010 1111 xxxx xxxx */
@@ -2639,7 +2639,7 @@ static const struct dasm_s dasm64_7807[256] =
{SUINB,"PB,%b" }, /* 31: 0110 0100 0011 0001 xxxx xxxx */
{SUINB,"PC,%b" }, /* 32: 0110 0100 0011 0010 xxxx xxxx */
{SUINB,"PD,%b" }, /* 33: 0110 0100 0011 0011 xxxx xxxx */
- {illegal,0 }, /* 34: 0110 0100 0011 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 34: 0110 0100 0011 0100 xxxx xxxx */
{SUINB,"PF,%b" }, /* 35: 0110 0100 0011 0101 xxxx xxxx */
{SUINB,"MKH,%b" }, /* 36: 0110 0100 0011 0110 xxxx xxxx */
{SUINB,"MKL,%b" }, /* 37: 0110 0100 0011 0111 xxxx xxxx */
@@ -2647,7 +2647,7 @@ static const struct dasm_s dasm64_7807[256] =
{LTI,"PB,%b" }, /* 39: 0110 0100 0011 1001 xxxx xxxx */
{LTI,"PC,%b" }, /* 3a: 0110 0100 0011 1010 xxxx xxxx */
{LTI,"PD,%b" }, /* 3b: 0110 0100 0011 1011 xxxx xxxx */
- {illegal,0 }, /* 3c: 0110 0100 0011 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 3c: 0110 0100 0011 1100 xxxx xxxx */
{LTI,"PF,%b" }, /* 3d: 0110 0100 0011 1101 xxxx xxxx */
{LTI,"MKH,%b" }, /* 3e: 0110 0100 0011 1110 xxxx xxxx */
{LTI,"MKL,%b" }, /* 3f: 0110 0100 0011 1111 xxxx xxxx */
@@ -2656,7 +2656,7 @@ static const struct dasm_s dasm64_7807[256] =
{ADI,"PB,%b" }, /* 41: 0110 0100 0100 0001 xxxx xxxx */
{ADI,"PC,%b" }, /* 42: 0110 0100 0100 0010 xxxx xxxx */
{ADI,"PD,%b" }, /* 43: 0110 0100 0100 0011 xxxx xxxx */
- {illegal,0 }, /* 44: 0110 0100 0100 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 44: 0110 0100 0100 0100 xxxx xxxx */
{ADI,"PF,%b" }, /* 45: 0110 0100 0100 0101 xxxx xxxx */
{ADI,"MKH,%b" }, /* 46: 0110 0100 0100 0110 xxxx xxxx */
{ADI,"MKL,%b" }, /* 47: 0110 0100 0100 0111 xxxx xxxx */
@@ -2664,7 +2664,7 @@ static const struct dasm_s dasm64_7807[256] =
{ONI,"PB,%b" }, /* 49: 0110 0100 0100 1001 xxxx xxxx */
{ONI,"PC,%b" }, /* 4a: 0110 0100 0100 1010 xxxx xxxx */
{ONI,"PD,%b" }, /* 4b: 0110 0100 0100 1011 xxxx xxxx */
- {illegal,0 }, /* 4c: 0110 0100 0100 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 4c: 0110 0100 0100 1100 xxxx xxxx */
{ONI,"PF,%b" }, /* 4d: 0110 0100 0100 1101 xxxx xxxx */
{ONI,"MKH,%b" }, /* 4e: 0110 0100 0100 1110 xxxx xxxx */
{ONI,"MKL,%b" }, /* 4f: 0110 0100 0100 1111 xxxx xxxx */
@@ -2673,7 +2673,7 @@ static const struct dasm_s dasm64_7807[256] =
{ACI,"PB,%b" }, /* 51: 0110 0100 0101 0001 xxxx xxxx */
{ACI,"PC,%b" }, /* 52: 0110 0100 0101 0010 xxxx xxxx */
{ACI,"PD,%b" }, /* 53: 0110 0100 0101 0011 xxxx xxxx */
- {illegal,0 }, /* 54: 0110 0100 0101 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 54: 0110 0100 0101 0100 xxxx xxxx */
{ACI,"PF,%b" }, /* 55: 0110 0100 0101 0101 xxxx xxxx */
{ACI,"MKH,%b" }, /* 56: 0110 0100 0101 0110 xxxx xxxx */
{ACI,"MKL,%b" }, /* 57: 0110 0100 0101 0111 xxxx xxxx */
@@ -2681,7 +2681,7 @@ static const struct dasm_s dasm64_7807[256] =
{OFFI,"PB,%b" }, /* 59: 0110 0100 0101 1001 xxxx xxxx */
{OFFI,"PC,%b" }, /* 5a: 0110 0100 0101 1010 xxxx xxxx */
{OFFI,"PD,%b" }, /* 5b: 0110 0100 0101 1011 xxxx xxxx */
- {illegal,0 }, /* 5c: 0110 0100 0101 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 5c: 0110 0100 0101 1100 xxxx xxxx */
{OFFI,"PF,%b" }, /* 5d: 0110 0100 0101 1101 xxxx xxxx */
{OFFI,"MKH,%b" }, /* 5e: 0110 0100 0101 1110 xxxx xxxx */
{OFFI,"MKL,%b" }, /* 5f: 0110 0100 0101 1111 xxxx xxxx */
@@ -2690,7 +2690,7 @@ static const struct dasm_s dasm64_7807[256] =
{SUI,"PB,%b" }, /* 61: 0110 0100 0110 0001 xxxx xxxx */
{SUI,"PC,%b" }, /* 62: 0110 0100 0110 0010 xxxx xxxx */
{SUI,"PD,%b" }, /* 63: 0110 0100 0110 0011 xxxx xxxx */
- {illegal,0 }, /* 64: 0110 0100 0110 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 64: 0110 0100 0110 0100 xxxx xxxx */
{SUI,"PF,%b" }, /* 65: 0110 0100 0110 0101 xxxx xxxx */
{SUI,"MKH,%b" }, /* 66: 0110 0100 0110 0110 xxxx xxxx */
{SUI,"MKL,%b" }, /* 67: 0110 0100 0110 0111 xxxx xxxx */
@@ -2698,7 +2698,7 @@ static const struct dasm_s dasm64_7807[256] =
{NEI,"PB,%b" }, /* 69: 0110 0100 0110 1001 xxxx xxxx */
{NEI,"PC,%b" }, /* 6a: 0110 0100 0110 1010 xxxx xxxx */
{NEI,"PD,%b" }, /* 6b: 0110 0100 0110 1011 xxxx xxxx */
- {illegal,0 }, /* 6c: 0110 0100 0110 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 6c: 0110 0100 0110 1100 xxxx xxxx */
{NEI,"PF,%b" }, /* 6d: 0110 0100 0110 1101 xxxx xxxx */
{NEI,"MKH,%b" }, /* 6e: 0110 0100 0110 1110 xxxx xxxx */
{NEI,"MKL,%b" }, /* 6f: 0110 0100 0110 1111 xxxx xxxx */
@@ -2707,7 +2707,7 @@ static const struct dasm_s dasm64_7807[256] =
{SBI,"PB,%b" }, /* 71: 0110 0100 0111 0001 xxxx xxxx */
{SBI,"PC,%b" }, /* 72: 0110 0100 0111 0010 xxxx xxxx */
{SBI,"PD,%b" }, /* 73: 0110 0100 0111 0011 xxxx xxxx */
- {illegal,0 }, /* 74: 0110 0100 0111 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 74: 0110 0100 0111 0100 xxxx xxxx */
{SBI,"PF,%b" }, /* 75: 0110 0100 0111 0101 xxxx xxxx */
{SBI,"MKH,%b" }, /* 76: 0110 0100 0111 0110 xxxx xxxx */
{SBI,"MKL,%b" }, /* 77: 0110 0100 0111 0111 xxxx xxxx */
@@ -2715,216 +2715,216 @@ static const struct dasm_s dasm64_7807[256] =
{EQI,"PB,%b" }, /* 79: 0110 0100 0111 1001 xxxx xxxx */
{EQI,"PC,%b" }, /* 7a: 0110 0100 0111 1010 xxxx xxxx */
{EQI,"PD,%b" }, /* 7b: 0110 0100 0111 1011 xxxx xxxx */
- {illegal,0 }, /* 7c: 0110 0100 0111 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 7c: 0110 0100 0111 1100 xxxx xxxx */
{EQI,"PF,%b" }, /* 7d: 0110 0100 0111 1101 xxxx xxxx */
{EQI,"MKH,%b" }, /* 7e: 0110 0100 0111 1110 xxxx xxxx */
{EQI,"MKL,%b" }, /* 7f: 0110 0100 0111 1111 xxxx xxxx */
- {illegal,0 }, /* 80: 0110 0100 1000 0000 xxxx xxxx */
+ {illegal,nullptr }, /* 80: 0110 0100 1000 0000 xxxx xxxx */
{MVI,"SMH,%b" }, /* 81: 0110 0100 1000 0001 xxxx xxxx */
- {illegal,0 }, /* 82: 0110 0100 1000 0010 xxxx xxxx */
+ {illegal,nullptr }, /* 82: 0110 0100 1000 0010 xxxx xxxx */
{MVI,"EOM,%b" }, /* 83: 0110 0100 1000 0011 xxxx xxxx */
- {illegal,0 }, /* 84: 0110 0100 1000 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 84: 0110 0100 1000 0100 xxxx xxxx */
{MVI,"TMM,%b" }, /* 85: 0110 0100 1000 0101 xxxx xxxx */
- {illegal,0 }, /* 86: 0110 0100 1000 0110 xxxx xxxx */
- {illegal,0 }, /* 87: 0110 0100 1000 0111 xxxx xxxx */
- {illegal,0 }, /* 88: 0110 0100 1000 1000 xxxx xxxx */
+ {illegal,nullptr }, /* 86: 0110 0100 1000 0110 xxxx xxxx */
+ {illegal,nullptr }, /* 87: 0110 0100 1000 0111 xxxx xxxx */
+ {illegal,nullptr }, /* 88: 0110 0100 1000 1000 xxxx xxxx */
{ANI,"SMH,%b" }, /* 89: 0110 0100 1000 1001 xxxx xxxx */
- {illegal,0 }, /* 8a: 0110 0100 1000 1010 xxxx xxxx */
+ {illegal,nullptr }, /* 8a: 0110 0100 1000 1010 xxxx xxxx */
{ANI,"EOM,%b" }, /* 8b: 0110 0100 1000 1011 xxxx xxxx */
- {illegal,0 }, /* 8c: 0110 0100 1000 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 8c: 0110 0100 1000 1100 xxxx xxxx */
{ANI,"TMM,%b" }, /* 8d: 0110 0100 1000 1101 xxxx xxxx */
- {illegal,0 }, /* 8e: 0110 0100 1000 1110 xxxx xxxx */
- {illegal,0 }, /* 8f: 0110 0100 1000 1111 xxxx xxxx */
+ {illegal,nullptr }, /* 8e: 0110 0100 1000 1110 xxxx xxxx */
+ {illegal,nullptr }, /* 8f: 0110 0100 1000 1111 xxxx xxxx */
- {illegal,0 }, /* 90: 0110 0100 1001 0000 xxxx xxxx */
+ {illegal,nullptr }, /* 90: 0110 0100 1001 0000 xxxx xxxx */
{XRI,"SMH,%b" }, /* 91: 0110 0100 1001 0001 xxxx xxxx */
- {illegal,0 }, /* 92: 0110 0100 1001 0010 xxxx xxxx */
+ {illegal,nullptr }, /* 92: 0110 0100 1001 0010 xxxx xxxx */
{XRI,"EOM,%b" }, /* 93: 0110 0100 1001 0011 xxxx xxxx */
- {illegal,0 }, /* 94: 0110 0100 1001 0100 xxxx xxxx */
+ {illegal,nullptr }, /* 94: 0110 0100 1001 0100 xxxx xxxx */
{XRI,"TMM,%b" }, /* 95: 0110 0100 1001 0101 xxxx xxxx */
- {illegal,0 }, /* 96: 0110 0100 1001 0110 xxxx xxxx */
- {illegal,0 }, /* 97: 0110 0100 1001 0111 xxxx xxxx */
- {illegal,0 }, /* 98: 0110 0100 1001 1000 xxxx xxxx */
+ {illegal,nullptr }, /* 96: 0110 0100 1001 0110 xxxx xxxx */
+ {illegal,nullptr }, /* 97: 0110 0100 1001 0111 xxxx xxxx */
+ {illegal,nullptr }, /* 98: 0110 0100 1001 1000 xxxx xxxx */
{ORI,"SMH,%b" }, /* 99: 0110 0100 1001 1001 xxxx xxxx */
- {illegal,0 }, /* 9a: 0110 0100 1001 1010 xxxx xxxx */
+ {illegal,nullptr }, /* 9a: 0110 0100 1001 1010 xxxx xxxx */
{ORI,"EOM,%b" }, /* 9b: 0110 0100 1001 1011 xxxx xxxx */
- {illegal,0 }, /* 9c: 0110 0100 1001 1100 xxxx xxxx */
+ {illegal,nullptr }, /* 9c: 0110 0100 1001 1100 xxxx xxxx */
{ORI,"TMM,%b" }, /* 9d: 0110 0100 1001 1101 xxxx xxxx */
- {illegal,0 }, /* 9e: 0110 0100 1001 1110 xxxx xxxx */
- {illegal,0 }, /* 9f: 0110 0100 1001 1111 xxxx xxxx */
+ {illegal,nullptr }, /* 9e: 0110 0100 1001 1110 xxxx xxxx */
+ {illegal,nullptr }, /* 9f: 0110 0100 1001 1111 xxxx xxxx */
- {illegal,0 }, /* a0: 0110 0100 1010 0000 xxxx xxxx */
+ {illegal,nullptr }, /* a0: 0110 0100 1010 0000 xxxx xxxx */
{ADINC,"SMH,%b" }, /* a1: 0110 0100 1010 0001 xxxx xxxx */
- {illegal,0 }, /* a2: 0110 0100 1010 0010 xxxx xxxx */
+ {illegal,nullptr }, /* a2: 0110 0100 1010 0010 xxxx xxxx */
{ADINC,"EOM,%b" }, /* a3: 0110 0100 1010 0011 xxxx xxxx */
- {illegal,0 }, /* a4: 0110 0100 1010 0100 xxxx xxxx */
+ {illegal,nullptr }, /* a4: 0110 0100 1010 0100 xxxx xxxx */
{ADINC,"TMM,%b" }, /* a5: 0110 0100 1010 0101 xxxx xxxx */
- {illegal,0 }, /* a6: 0110 0100 1010 0110 xxxx xxxx */
- {illegal,0 }, /* a7: 0110 0100 1010 0111 xxxx xxxx */
- {illegal,0 }, /* a8: 0110 0100 1010 1000 xxxx xxxx */
+ {illegal,nullptr }, /* a6: 0110 0100 1010 0110 xxxx xxxx */
+ {illegal,nullptr }, /* a7: 0110 0100 1010 0111 xxxx xxxx */
+ {illegal,nullptr }, /* a8: 0110 0100 1010 1000 xxxx xxxx */
{GTI,"SMH,%b" }, /* a9: 0110 0100 1010 1001 xxxx xxxx */
- {illegal,0 }, /* aa: 0110 0100 1010 1010 xxxx xxxx */
+ {illegal,nullptr }, /* aa: 0110 0100 1010 1010 xxxx xxxx */
{GTI,"EOM,%b" }, /* ab: 0110 0100 1010 1011 xxxx xxxx */
- {illegal,0 }, /* ac: 0110 0100 1010 1100 xxxx xxxx */
+ {illegal,nullptr }, /* ac: 0110 0100 1010 1100 xxxx xxxx */
{GTI,"TMM,%b" }, /* ad: 0110 0100 1010 1101 xxxx xxxx */
{GTI,"PT,%b" }, /* ae: 0110 0100 1010 1110 xxxx xxxx */
- {illegal,0 }, /* af: 0110 0100 1010 1111 xxxx xxxx */
+ {illegal,nullptr }, /* af: 0110 0100 1010 1111 xxxx xxxx */
- {illegal,0 }, /* b0: 0110 0100 1011 0000 xxxx xxxx */
+ {illegal,nullptr }, /* b0: 0110 0100 1011 0000 xxxx xxxx */
{SUINB,"SMH,%b" }, /* b1: 0110 0100 1011 0001 xxxx xxxx */
- {illegal,0 }, /* b2: 0110 0100 1011 0010 xxxx xxxx */
+ {illegal,nullptr }, /* b2: 0110 0100 1011 0010 xxxx xxxx */
{SUINB,"EOM,%b" }, /* b3: 0110 0100 1011 0011 xxxx xxxx */
- {illegal,0 }, /* b4: 0110 0100 1011 0100 xxxx xxxx */
+ {illegal,nullptr }, /* b4: 0110 0100 1011 0100 xxxx xxxx */
{SUINB,"TMM,%b" }, /* b5: 0110 0100 1011 0101 xxxx xxxx */
- {illegal,0 }, /* b6: 0110 0100 1011 0110 xxxx xxxx */
- {illegal,0 }, /* b7: 0110 0100 1011 0111 xxxx xxxx */
- {illegal,0 }, /* b8: 0110 0100 1011 1000 xxxx xxxx */
+ {illegal,nullptr }, /* b6: 0110 0100 1011 0110 xxxx xxxx */
+ {illegal,nullptr }, /* b7: 0110 0100 1011 0111 xxxx xxxx */
+ {illegal,nullptr }, /* b8: 0110 0100 1011 1000 xxxx xxxx */
{LTI,"SMH,%b" }, /* b9: 0110 0100 1011 1001 xxxx xxxx */
- {illegal,0 }, /* ba: 0110 0100 1011 1010 xxxx xxxx */
+ {illegal,nullptr }, /* ba: 0110 0100 1011 1010 xxxx xxxx */
{LTI,"EOM,%b" }, /* bb: 0110 0100 1011 1011 xxxx xxxx */
- {illegal,0 }, /* bc: 0110 0100 1011 1100 xxxx xxxx */
+ {illegal,nullptr }, /* bc: 0110 0100 1011 1100 xxxx xxxx */
{LTI,"TMM,%b" }, /* bd: 0110 0100 1011 1101 xxxx xxxx */
{LTI,"PT,%b" }, /* be: 0110 0100 1011 1110 xxxx xxxx */
- {illegal,0 }, /* bf: 0110 0100 1011 1111 xxxx xxxx */
+ {illegal,nullptr }, /* bf: 0110 0100 1011 1111 xxxx xxxx */
- {illegal,0 }, /* c0: 0110 0100 1100 0000 xxxx xxxx */
+ {illegal,nullptr }, /* c0: 0110 0100 1100 0000 xxxx xxxx */
{ADI,"SMH,%b" }, /* c1: 0110 0100 1100 0001 xxxx xxxx */
- {illegal,0 }, /* c2: 0110 0100 1100 0010 xxxx xxxx */
+ {illegal,nullptr }, /* c2: 0110 0100 1100 0010 xxxx xxxx */
{ADI,"EOM,%b" }, /* c3: 0110 0100 1100 0011 xxxx xxxx */
- {illegal,0 }, /* c4: 0110 0100 1100 0100 xxxx xxxx */
+ {illegal,nullptr }, /* c4: 0110 0100 1100 0100 xxxx xxxx */
{ADI,"TMM,%b" }, /* c5: 0110 0100 1100 0101 xxxx xxxx */
- {illegal,0 }, /* c6: 0110 0100 1100 0110 xxxx xxxx */
- {illegal,0 }, /* c7: 0110 0100 1100 0111 xxxx xxxx */
- {illegal,0 }, /* c8: 0110 0100 1100 1000 xxxx xxxx */
+ {illegal,nullptr }, /* c6: 0110 0100 1100 0110 xxxx xxxx */
+ {illegal,nullptr }, /* c7: 0110 0100 1100 0111 xxxx xxxx */
+ {illegal,nullptr }, /* c8: 0110 0100 1100 1000 xxxx xxxx */
{ONI,"SMH,%b" }, /* c9: 0110 0100 1100 1001 xxxx xxxx */
- {illegal,0 }, /* ca: 0110 0100 1100 1010 xxxx xxxx */
+ {illegal,nullptr }, /* ca: 0110 0100 1100 1010 xxxx xxxx */
{ONI,"EOM,%b" }, /* cb: 0110 0100 1100 1011 xxxx xxxx */
- {illegal,0 }, /* cc: 0110 0100 1100 1100 xxxx xxxx */
+ {illegal,nullptr }, /* cc: 0110 0100 1100 1100 xxxx xxxx */
{ONI,"TMM,%b" }, /* cd: 0110 0100 1100 1101 xxxx xxxx */
{ONI,"PT,%b" }, /* ce: 0110 0100 1100 1110 xxxx xxxx */
- {illegal,0 }, /* cf: 0110 0100 1100 1111 xxxx xxxx */
+ {illegal,nullptr }, /* cf: 0110 0100 1100 1111 xxxx xxxx */
- {illegal,0 }, /* d0: 0110 0100 1101 0000 xxxx xxxx */
+ {illegal,nullptr }, /* d0: 0110 0100 1101 0000 xxxx xxxx */
{ACI,"SMH,%b" }, /* d1: 0110 0100 1101 0001 xxxx xxxx */
- {illegal,0 }, /* d2: 0110 0100 1101 0010 xxxx xxxx */
+ {illegal,nullptr }, /* d2: 0110 0100 1101 0010 xxxx xxxx */
{ACI,"EOM,%b" }, /* d3: 0110 0100 1101 0011 xxxx xxxx */
- {illegal,0 }, /* d4: 0110 0100 1101 0100 xxxx xxxx */
+ {illegal,nullptr }, /* d4: 0110 0100 1101 0100 xxxx xxxx */
{ACI,"TMM,%b" }, /* d5: 0110 0100 1101 0101 xxxx xxxx */
- {illegal,0 }, /* d6: 0110 0100 1101 0110 xxxx xxxx */
- {illegal,0 }, /* d7: 0110 0100 1101 0111 xxxx xxxx */
- {illegal,0 }, /* d8: 0110 0100 1101 1000 xxxx xxxx */
+ {illegal,nullptr }, /* d6: 0110 0100 1101 0110 xxxx xxxx */
+ {illegal,nullptr }, /* d7: 0110 0100 1101 0111 xxxx xxxx */
+ {illegal,nullptr }, /* d8: 0110 0100 1101 1000 xxxx xxxx */
{OFFI,"SMH,%b" }, /* d9: 0110 0100 1101 1001 xxxx xxxx */
- {illegal,0 }, /* da: 0110 0100 1101 1010 xxxx xxxx */
+ {illegal,nullptr }, /* da: 0110 0100 1101 1010 xxxx xxxx */
{OFFI,"EOM,%b" }, /* db: 0110 0100 1101 1011 xxxx xxxx */
- {illegal,0 }, /* dc: 0110 0100 1101 1100 xxxx xxxx */
+ {illegal,nullptr }, /* dc: 0110 0100 1101 1100 xxxx xxxx */
{OFFI,"TMM,%b" }, /* dd: 0110 0100 1101 1101 xxxx xxxx */
{OFFI,"PT,%b" }, /* de: 0110 0100 1101 1110 xxxx xxxx */
- {illegal,0 }, /* df: 0110 0100 1101 1111 xxxx xxxx */
+ {illegal,nullptr }, /* df: 0110 0100 1101 1111 xxxx xxxx */
- {illegal,0 }, /* e0: 0110 0100 1110 0000 xxxx xxxx */
+ {illegal,nullptr }, /* e0: 0110 0100 1110 0000 xxxx xxxx */
{SUI,"SMH,%b" }, /* e1: 0110 0100 1110 0001 xxxx xxxx */
- {illegal,0 }, /* e2: 0110 0100 1110 0010 xxxx xxxx */
+ {illegal,nullptr }, /* e2: 0110 0100 1110 0010 xxxx xxxx */
{SUI,"EOM,%b" }, /* e3: 0110 0100 1110 0011 xxxx xxxx */
- {illegal,0 }, /* e4: 0110 0100 1110 0100 xxxx xxxx */
+ {illegal,nullptr }, /* e4: 0110 0100 1110 0100 xxxx xxxx */
{SUI,"TMM,%b" }, /* e5: 0110 0100 1110 0101 xxxx xxxx */
- {illegal,0 }, /* e6: 0110 0100 1110 0110 xxxx xxxx */
- {illegal,0 }, /* e7: 0110 0100 1110 0111 xxxx xxxx */
- {illegal,0 }, /* e8: 0110 0100 1110 1000 xxxx xxxx */
+ {illegal,nullptr }, /* e6: 0110 0100 1110 0110 xxxx xxxx */
+ {illegal,nullptr }, /* e7: 0110 0100 1110 0111 xxxx xxxx */
+ {illegal,nullptr }, /* e8: 0110 0100 1110 1000 xxxx xxxx */
{NEI,"SMH,%b" }, /* e9: 0110 0100 1110 1001 xxxx xxxx */
- {illegal,0 }, /* ea: 0110 0100 1110 1010 xxxx xxxx */
+ {illegal,nullptr }, /* ea: 0110 0100 1110 1010 xxxx xxxx */
{NEI,"EOM,%b" }, /* eb: 0110 0100 1110 1011 xxxx xxxx */
- {illegal,0 }, /* ec: 0110 0100 1110 1100 xxxx xxxx */
+ {illegal,nullptr }, /* ec: 0110 0100 1110 1100 xxxx xxxx */
{NEI,"TMM,%b" }, /* ed: 0110 0100 1110 1101 xxxx xxxx */
{NEI,"PT,%b" }, /* ee: 0110 0100 1110 1110 xxxx xxxx */
- {illegal,0 }, /* ef: 0110 0100 1110 1111 xxxx xxxx */
+ {illegal,nullptr }, /* ef: 0110 0100 1110 1111 xxxx xxxx */
- {illegal,0 }, /* f0: 0110 0100 1111 0000 xxxx xxxx */
+ {illegal,nullptr }, /* f0: 0110 0100 1111 0000 xxxx xxxx */
{SBI,"SMH,%b" }, /* f1: 0110 0100 1111 0001 xxxx xxxx */
- {illegal,0 }, /* f2: 0110 0100 1111 0010 xxxx xxxx */
+ {illegal,nullptr }, /* f2: 0110 0100 1111 0010 xxxx xxxx */
{SBI,"EOM,%b" }, /* f3: 0110 0100 1111 0011 xxxx xxxx */
- {illegal,0 }, /* f4: 0110 0100 1111 0100 xxxx xxxx */
+ {illegal,nullptr }, /* f4: 0110 0100 1111 0100 xxxx xxxx */
{SBI,"TMM,%b" }, /* f5: 0110 0100 1111 0101 xxxx xxxx */
- {illegal,0 }, /* f6: 0110 0100 1111 0110 xxxx xxxx */
- {illegal,0 }, /* f7: 0110 0100 1111 0111 xxxx xxxx */
- {illegal,0 }, /* f8: 0110 0100 1111 1000 xxxx xxxx */
+ {illegal,nullptr }, /* f6: 0110 0100 1111 0110 xxxx xxxx */
+ {illegal,nullptr }, /* f7: 0110 0100 1111 0111 xxxx xxxx */
+ {illegal,nullptr }, /* f8: 0110 0100 1111 1000 xxxx xxxx */
{EQI,"SMH,%b" }, /* f9: 0110 0100 1111 1001 xxxx xxxx */
- {illegal,0 }, /* fa: 0110 0100 1111 1010 xxxx xxxx */
+ {illegal,nullptr }, /* fa: 0110 0100 1111 1010 xxxx xxxx */
{EQI,"EOM,%b" }, /* fb: 0110 0100 1111 1011 xxxx xxxx */
- {illegal,0 }, /* fc: 0110 0100 1111 1100 xxxx xxxx */
+ {illegal,nullptr }, /* fc: 0110 0100 1111 1100 xxxx xxxx */
{EQI,"TMM,%b" }, /* fd: 0110 0100 1111 1101 xxxx xxxx */
{EQI,"PT,%b" }, /* fe: 0110 0100 1111 1110 xxxx xxxx */
- {illegal,0 } /* ff: 0110 0100 1111 1111 xxxx xxxx */
+ {illegal,nullptr } /* ff: 0110 0100 1111 1111 xxxx xxxx */
};
/* prefix 70 */
static const struct dasm_s dasm70[256] =
{
- {illegal,0 }, /* 00: 0111 0000 0000 0000 */
- {illegal,0 }, /* 01: 0111 0000 0000 0001 */
- {illegal,0 }, /* 02: 0111 0000 0000 0010 */
- {illegal,0 }, /* 03: 0111 0000 0000 0011 */
- {illegal,0 }, /* 04: 0111 0000 0000 0100 */
- {illegal,0 }, /* 05: 0111 0000 0000 0101 */
- {illegal,0 }, /* 06: 0111 0000 0000 0110 */
- {illegal,0 }, /* 07: 0111 0000 0000 0111 */
- {illegal,0 }, /* 08: 0111 0000 0000 1000 */
- {illegal,0 }, /* 09: 0111 0000 0000 1001 */
- {illegal,0 }, /* 0a: 0111 0000 0000 1010 */
- {illegal,0 }, /* 0b: 0111 0000 0000 1011 */
- {illegal,0 }, /* 0c: 0111 0000 0000 1100 */
- {illegal,0 }, /* 0d: 0111 0000 0000 1101 */
+ {illegal,nullptr }, /* 00: 0111 0000 0000 0000 */
+ {illegal,nullptr }, /* 01: 0111 0000 0000 0001 */
+ {illegal,nullptr }, /* 02: 0111 0000 0000 0010 */
+ {illegal,nullptr }, /* 03: 0111 0000 0000 0011 */
+ {illegal,nullptr }, /* 04: 0111 0000 0000 0100 */
+ {illegal,nullptr }, /* 05: 0111 0000 0000 0101 */
+ {illegal,nullptr }, /* 06: 0111 0000 0000 0110 */
+ {illegal,nullptr }, /* 07: 0111 0000 0000 0111 */
+ {illegal,nullptr }, /* 08: 0111 0000 0000 1000 */
+ {illegal,nullptr }, /* 09: 0111 0000 0000 1001 */
+ {illegal,nullptr }, /* 0a: 0111 0000 0000 1010 */
+ {illegal,nullptr }, /* 0b: 0111 0000 0000 1011 */
+ {illegal,nullptr }, /* 0c: 0111 0000 0000 1100 */
+ {illegal,nullptr }, /* 0d: 0111 0000 0000 1101 */
{SSPD,"%w" }, /* 0e: 0111 0000 0000 1110 llll llll hhhh hhhh */
{LSPD,"%w" }, /* 0f: 0111 0000 0000 1111 llll llll hhhh hhhh */
- {illegal,0 }, /* 10: 0111 0000 0001 0000 */
- {illegal,0 }, /* 11: 0111 0000 0001 0001 */
- {illegal,0 }, /* 12: 0111 0000 0001 0010 */
- {illegal,0 }, /* 13: 0111 0000 0001 0011 */
- {illegal,0 }, /* 14: 0111 0000 0001 0100 */
- {illegal,0 }, /* 15: 0111 0000 0001 0101 */
- {illegal,0 }, /* 16: 0111 0000 0001 0110 */
- {illegal,0 }, /* 17: 0111 0000 0001 0111 */
- {illegal,0 }, /* 18: 0111 0000 0001 1000 */
- {illegal,0 }, /* 19: 0111 0000 0001 1001 */
- {illegal,0 }, /* 1a: 0111 0000 0001 1010 */
- {illegal,0 }, /* 1b: 0111 0000 0001 1011 */
- {illegal,0 }, /* 1c: 0111 0000 0001 1100 */
- {illegal,0 }, /* 1d: 0111 0000 0001 1101 */
+ {illegal,nullptr }, /* 10: 0111 0000 0001 0000 */
+ {illegal,nullptr }, /* 11: 0111 0000 0001 0001 */
+ {illegal,nullptr }, /* 12: 0111 0000 0001 0010 */
+ {illegal,nullptr }, /* 13: 0111 0000 0001 0011 */
+ {illegal,nullptr }, /* 14: 0111 0000 0001 0100 */
+ {illegal,nullptr }, /* 15: 0111 0000 0001 0101 */
+ {illegal,nullptr }, /* 16: 0111 0000 0001 0110 */
+ {illegal,nullptr }, /* 17: 0111 0000 0001 0111 */
+ {illegal,nullptr }, /* 18: 0111 0000 0001 1000 */
+ {illegal,nullptr }, /* 19: 0111 0000 0001 1001 */
+ {illegal,nullptr }, /* 1a: 0111 0000 0001 1010 */
+ {illegal,nullptr }, /* 1b: 0111 0000 0001 1011 */
+ {illegal,nullptr }, /* 1c: 0111 0000 0001 1100 */
+ {illegal,nullptr }, /* 1d: 0111 0000 0001 1101 */
{SBCD,"%w" }, /* 1e: 0111 0000 0001 1110 llll llll hhhh hhhh */
{LBCD,"%w" }, /* 1f: 0111 0000 0001 1111 llll llll hhhh hhhh */
- {illegal,0 }, /* 20: 0111 0000 0010 0000 */
- {illegal,0 }, /* 21: 0111 0000 0010 0001 */
- {illegal,0 }, /* 22: 0111 0000 0010 0010 */
- {illegal,0 }, /* 23: 0111 0000 0010 0011 */
- {illegal,0 }, /* 24: 0111 0000 0010 0100 */
- {illegal,0 }, /* 25: 0111 0000 0010 0101 */
- {illegal,0 }, /* 26: 0111 0000 0010 0110 */
- {illegal,0 }, /* 27: 0111 0000 0010 0111 */
- {illegal,0 }, /* 28: 0111 0000 0010 1000 */
- {illegal,0 }, /* 29: 0111 0000 0010 1001 */
- {illegal,0 }, /* 2a: 0111 0000 0010 1010 */
- {illegal,0 }, /* 2b: 0111 0000 0010 1011 */
- {illegal,0 }, /* 2c: 0111 0000 0010 1100 */
- {illegal,0 }, /* 2d: 0111 0000 0010 1101 */
+ {illegal,nullptr }, /* 20: 0111 0000 0010 0000 */
+ {illegal,nullptr }, /* 21: 0111 0000 0010 0001 */
+ {illegal,nullptr }, /* 22: 0111 0000 0010 0010 */
+ {illegal,nullptr }, /* 23: 0111 0000 0010 0011 */
+ {illegal,nullptr }, /* 24: 0111 0000 0010 0100 */
+ {illegal,nullptr }, /* 25: 0111 0000 0010 0101 */
+ {illegal,nullptr }, /* 26: 0111 0000 0010 0110 */
+ {illegal,nullptr }, /* 27: 0111 0000 0010 0111 */
+ {illegal,nullptr }, /* 28: 0111 0000 0010 1000 */
+ {illegal,nullptr }, /* 29: 0111 0000 0010 1001 */
+ {illegal,nullptr }, /* 2a: 0111 0000 0010 1010 */
+ {illegal,nullptr }, /* 2b: 0111 0000 0010 1011 */
+ {illegal,nullptr }, /* 2c: 0111 0000 0010 1100 */
+ {illegal,nullptr }, /* 2d: 0111 0000 0010 1101 */
{SDED,"%w" }, /* 2e: 0111 0000 0010 1110 llll llll hhhh hhhh */
{LDED,"%w" }, /* 2f: 0111 0000 0010 1111 llll llll hhhh hhhh */
- {illegal,0 }, /* 30: 0111 0000 0011 0000 */
- {illegal,0 }, /* 31: 0111 0000 0011 0001 */
- {illegal,0 }, /* 32: 0111 0000 0011 0010 */
- {illegal,0 }, /* 33: 0111 0000 0011 0011 */
- {illegal,0 }, /* 34: 0111 0000 0011 0100 */
- {illegal,0 }, /* 35: 0111 0000 0011 0101 */
- {illegal,0 }, /* 36: 0111 0000 0011 0110 */
- {illegal,0 }, /* 37: 0111 0000 0011 0111 */
- {illegal,0 }, /* 38: 0111 0000 0011 1000 */
- {illegal,0 }, /* 39: 0111 0000 0011 1001 */
- {illegal,0 }, /* 3a: 0111 0000 0011 1010 */
- {illegal,0 }, /* 3b: 0111 0000 0011 1011 */
- {illegal,0 }, /* 3c: 0111 0000 0011 1100 */
- {illegal,0 }, /* 3d: 0111 0000 0011 1101 */
+ {illegal,nullptr }, /* 30: 0111 0000 0011 0000 */
+ {illegal,nullptr }, /* 31: 0111 0000 0011 0001 */
+ {illegal,nullptr }, /* 32: 0111 0000 0011 0010 */
+ {illegal,nullptr }, /* 33: 0111 0000 0011 0011 */
+ {illegal,nullptr }, /* 34: 0111 0000 0011 0100 */
+ {illegal,nullptr }, /* 35: 0111 0000 0011 0101 */
+ {illegal,nullptr }, /* 36: 0111 0000 0011 0110 */
+ {illegal,nullptr }, /* 37: 0111 0000 0011 0111 */
+ {illegal,nullptr }, /* 38: 0111 0000 0011 1000 */
+ {illegal,nullptr }, /* 39: 0111 0000 0011 1001 */
+ {illegal,nullptr }, /* 3a: 0111 0000 0011 1010 */
+ {illegal,nullptr }, /* 3b: 0111 0000 0011 1011 */
+ {illegal,nullptr }, /* 3c: 0111 0000 0011 1100 */
+ {illegal,nullptr }, /* 3d: 0111 0000 0011 1101 */
{SHLD,"%w" }, /* 3e: 0111 0000 0011 1110 llll llll hhhh hhhh */
{LHLD,"%w" }, /* 3f: 0111 0000 0011 1111 llll llll hhhh hhhh */
@@ -2932,44 +2932,44 @@ static const struct dasm_s dasm70[256] =
{EADD,"EA,A" }, /* 41: 0111 0000 0100 0001 */
{EADD,"EA,B" }, /* 42: 0111 0000 0100 0010 */
{EADD,"EA,C" }, /* 43: 0111 0000 0100 0011 */
- {illegal,0 }, /* 44: 0111 0000 0100 0100 */
- {illegal,0 }, /* 45: 0111 0000 0100 0101 */
- {illegal,0 }, /* 46: 0111 0000 0100 0110 */
- {illegal,0 }, /* 47: 0111 0000 0100 0111 */
- {illegal,0 }, /* 48: 0111 0000 0100 1000 */
- {illegal,0 }, /* 49: 0111 0000 0100 1001 */
- {illegal,0 }, /* 4a: 0111 0000 0100 1010 */
- {illegal,0 }, /* 4b: 0111 0000 0100 1011 */
- {illegal,0 }, /* 4c: 0111 0000 0100 1100 */
- {illegal,0 }, /* 4d: 0111 0000 0100 1101 */
- {illegal,0 }, /* 4e: 0111 0000 0100 1110 */
- {illegal,0 }, /* 4f: 0111 0000 0100 1111 */
-
- {illegal,0 }, /* 50: 0111 0000 0101 0000 */
- {illegal,0 }, /* 51: 0111 0000 0101 0001 */
- {illegal,0 }, /* 52: 0111 0000 0101 0010 */
- {illegal,0 }, /* 53: 0111 0000 0101 0011 */
- {illegal,0 }, /* 54: 0111 0000 0101 0100 */
- {illegal,0 }, /* 55: 0111 0000 0101 0101 */
- {illegal,0 }, /* 56: 0111 0000 0101 0110 */
- {illegal,0 }, /* 57: 0111 0000 0101 0111 */
- {illegal,0 }, /* 58: 0111 0000 0101 1000 */
- {illegal,0 }, /* 59: 0111 0000 0101 1001 */
- {illegal,0 }, /* 5a: 0111 0000 0101 1010 */
- {illegal,0 }, /* 5b: 0111 0000 0101 1011 */
- {illegal,0 }, /* 5c: 0111 0000 0101 1100 */
- {illegal,0 }, /* 5d: 0111 0000 0101 1101 */
- {illegal,0 }, /* 5e: 0111 0000 0101 1110 */
- {illegal,0 }, /* 5f: 0111 0000 0101 1111 */
+ {illegal,nullptr }, /* 44: 0111 0000 0100 0100 */
+ {illegal,nullptr }, /* 45: 0111 0000 0100 0101 */
+ {illegal,nullptr }, /* 46: 0111 0000 0100 0110 */
+ {illegal,nullptr }, /* 47: 0111 0000 0100 0111 */
+ {illegal,nullptr }, /* 48: 0111 0000 0100 1000 */
+ {illegal,nullptr }, /* 49: 0111 0000 0100 1001 */
+ {illegal,nullptr }, /* 4a: 0111 0000 0100 1010 */
+ {illegal,nullptr }, /* 4b: 0111 0000 0100 1011 */
+ {illegal,nullptr }, /* 4c: 0111 0000 0100 1100 */
+ {illegal,nullptr }, /* 4d: 0111 0000 0100 1101 */
+ {illegal,nullptr }, /* 4e: 0111 0000 0100 1110 */
+ {illegal,nullptr }, /* 4f: 0111 0000 0100 1111 */
+
+ {illegal,nullptr }, /* 50: 0111 0000 0101 0000 */
+ {illegal,nullptr }, /* 51: 0111 0000 0101 0001 */
+ {illegal,nullptr }, /* 52: 0111 0000 0101 0010 */
+ {illegal,nullptr }, /* 53: 0111 0000 0101 0011 */
+ {illegal,nullptr }, /* 54: 0111 0000 0101 0100 */
+ {illegal,nullptr }, /* 55: 0111 0000 0101 0101 */
+ {illegal,nullptr }, /* 56: 0111 0000 0101 0110 */
+ {illegal,nullptr }, /* 57: 0111 0000 0101 0111 */
+ {illegal,nullptr }, /* 58: 0111 0000 0101 1000 */
+ {illegal,nullptr }, /* 59: 0111 0000 0101 1001 */
+ {illegal,nullptr }, /* 5a: 0111 0000 0101 1010 */
+ {illegal,nullptr }, /* 5b: 0111 0000 0101 1011 */
+ {illegal,nullptr }, /* 5c: 0111 0000 0101 1100 */
+ {illegal,nullptr }, /* 5d: 0111 0000 0101 1101 */
+ {illegal,nullptr }, /* 5e: 0111 0000 0101 1110 */
+ {illegal,nullptr }, /* 5f: 0111 0000 0101 1111 */
{ESUB,"EA,V" }, /* 60: 0111 0000 0110 0000 */
{ESUB,"EA,A" }, /* 61: 0111 0000 0110 0001 */
{ESUB,"EA,B" }, /* 62: 0111 0000 0110 0010 */
{ESUB,"EA,C" }, /* 63: 0111 0000 0110 0011 */
- {illegal,0 }, /* 64: 0111 0000 0110 0100 */
- {illegal,0 }, /* 65: 0111 0000 0110 0101 */
- {illegal,0 }, /* 66: 0111 0000 0110 0110 */
- {illegal,0 }, /* 67: 0111 0000 0110 0111 */
+ {illegal,nullptr }, /* 64: 0111 0000 0110 0100 */
+ {illegal,nullptr }, /* 65: 0111 0000 0110 0101 */
+ {illegal,nullptr }, /* 66: 0111 0000 0110 0110 */
+ {illegal,nullptr }, /* 67: 0111 0000 0110 0111 */
{MOV,"V,(%w)" }, /* 68: 0111 0000 0110 1000 llll llll hhhh hhhh */
{MOV,"A,(%w)" }, /* 69: 0111 0000 0110 1001 llll llll hhhh hhhh */
{MOV,"B,(%w)" }, /* 6a: 0111 0000 0110 1010 llll llll hhhh hhhh */
@@ -2979,14 +2979,14 @@ static const struct dasm_s dasm70[256] =
{MOV,"H,(%w)" }, /* 6e: 0111 0000 0110 1110 llll llll hhhh hhhh */
{MOV,"L,(%w)" }, /* 6f: 0111 0000 0110 1111 llll llll hhhh hhhh */
- {illegal,0 }, /* 70: 0111 0000 0111 0000 */
- {illegal,0 }, /* 71: 0111 0000 0111 0001 */
- {illegal,0 }, /* 72: 0111 0000 0111 0010 */
- {illegal,0 }, /* 73: 0111 0000 0111 0011 */
- {illegal,0 }, /* 74: 0111 0000 0111 0100 */
- {illegal,0 }, /* 75: 0111 0000 0111 0101 */
- {illegal,0 }, /* 76: 0111 0000 0111 0110 */
- {illegal,0 }, /* 77: 0111 0000 0111 0111 */
+ {illegal,nullptr }, /* 70: 0111 0000 0111 0000 */
+ {illegal,nullptr }, /* 71: 0111 0000 0111 0001 */
+ {illegal,nullptr }, /* 72: 0111 0000 0111 0010 */
+ {illegal,nullptr }, /* 73: 0111 0000 0111 0011 */
+ {illegal,nullptr }, /* 74: 0111 0000 0111 0100 */
+ {illegal,nullptr }, /* 75: 0111 0000 0111 0101 */
+ {illegal,nullptr }, /* 76: 0111 0000 0111 0110 */
+ {illegal,nullptr }, /* 77: 0111 0000 0111 0111 */
{MOV,"(%w),V" }, /* 78: 0111 0000 0111 1000 llll llll hhhh hhhh */
{MOV,"(%w),A" }, /* 79: 0111 0000 0111 1001 llll llll hhhh hhhh */
{MOV,"(%w),B" }, /* 7a: 0111 0000 0111 1010 llll llll hhhh hhhh */
@@ -2996,15 +2996,15 @@ static const struct dasm_s dasm70[256] =
{MOV,"(%w),H" }, /* 7e: 0111 0000 0111 1110 llll llll hhhh hhhh */
{MOV,"(%w),L" }, /* 7f: 0111 0000 0111 1111 llll llll hhhh hhhh */
- {illegal,0 }, /* 80: 0111 0000 1000 0000 */
- {illegal,0 }, /* 81: 0111 0000 1000 0001 */
- {illegal,0 }, /* 82: 0111 0000 1000 0010 */
- {illegal,0 }, /* 83: 0111 0000 1000 0011 */
- {illegal,0 }, /* 84: 0111 0000 1000 0100 */
- {illegal,0 }, /* 85: 0111 0000 1000 0101 */
- {illegal,0 }, /* 86: 0111 0000 1000 0110 */
- {illegal,0 }, /* 87: 0111 0000 1000 0111 */
- {illegal,0 }, /* 88: 0111 0000 1000 1000 */
+ {illegal,nullptr }, /* 80: 0111 0000 1000 0000 */
+ {illegal,nullptr }, /* 81: 0111 0000 1000 0001 */
+ {illegal,nullptr }, /* 82: 0111 0000 1000 0010 */
+ {illegal,nullptr }, /* 83: 0111 0000 1000 0011 */
+ {illegal,nullptr }, /* 84: 0111 0000 1000 0100 */
+ {illegal,nullptr }, /* 85: 0111 0000 1000 0101 */
+ {illegal,nullptr }, /* 86: 0111 0000 1000 0110 */
+ {illegal,nullptr }, /* 87: 0111 0000 1000 0111 */
+ {illegal,nullptr }, /* 88: 0111 0000 1000 1000 */
{ANAX,"(BC)" }, /* 89: 0111 0000 1000 1001 */
{ANAX,"(DE)" }, /* 8a: 0111 0000 1000 1010 */
{ANAX,"(HL)" }, /* 8b: 0111 0000 1000 1011 */
@@ -3013,7 +3013,7 @@ static const struct dasm_s dasm70[256] =
{ANAX,"(DE-)" }, /* 8e: 0111 0000 1000 1110 */
{ANAX,"(HL-)" }, /* 8f: 0111 0000 1000 1111 */
- {illegal,0 }, /* 90: 0111 0000 1001 0000 */
+ {illegal,nullptr }, /* 90: 0111 0000 1001 0000 */
{XRAX,"(BC)" }, /* 91: 0111 0000 1001 0001 */
{XRAX,"(DE)" }, /* 92: 0111 0000 1001 0010 */
{XRAX,"(HL)" }, /* 93: 0111 0000 1001 0011 */
@@ -3021,7 +3021,7 @@ static const struct dasm_s dasm70[256] =
{XRAX,"(HL+)" }, /* 95: 0111 0000 1001 0101 */
{XRAX,"(DE-)" }, /* 96: 0111 0000 1001 0110 */
{XRAX,"(HL-)" }, /* 97: 0111 0000 1001 0111 */
- {illegal,0 }, /* 98: 0111 0000 1001 1000 */
+ {illegal,nullptr }, /* 98: 0111 0000 1001 1000 */
{ORAX,"(BC)" }, /* 99: 0111 0000 1001 1001 */
{ORAX,"(DE)" }, /* 9a: 0111 0000 1001 1010 */
{ORAX,"(HL)" }, /* 9b: 0111 0000 1001 1011 */
@@ -3030,7 +3030,7 @@ static const struct dasm_s dasm70[256] =
{ORAX,"(DE-)" }, /* 9e: 0111 0000 1001 1110 */
{ORAX,"(HL-)" }, /* 9f: 0111 0000 1001 1111 */
- {illegal,0 }, /* a0: 0111 0000 1010 0000 */
+ {illegal,nullptr }, /* a0: 0111 0000 1010 0000 */
{ADDNCX,"(BC)" }, /* a1: 0111 0000 1010 0001 */
{ADDNCX,"(DE)" }, /* a2: 0111 0000 1010 0010 */
{ADDNCX,"(HL)" }, /* a3: 0111 0000 1010 0011 */
@@ -3038,7 +3038,7 @@ static const struct dasm_s dasm70[256] =
{ADDNCX,"(HL+)" }, /* a5: 0111 0000 1010 0101 */
{ADDNCX,"(DE-)" }, /* a6: 0111 0000 1010 0110 */
{ADDNCX,"(HL-)" }, /* a7: 0111 0000 1010 0111 */
- {illegal,0 }, /* a8: 0111 0000 1010 1000 */
+ {illegal,nullptr }, /* a8: 0111 0000 1010 1000 */
{GTAX,"(BC)" }, /* a9: 0111 0000 1010 1001 */
{GTAX,"(DE)" }, /* aa: 0111 0000 1010 1010 */
{GTAX,"(HL)" }, /* ab: 0111 0000 1010 1011 */
@@ -3047,7 +3047,7 @@ static const struct dasm_s dasm70[256] =
{GTAX,"(DE-)" }, /* ae: 0111 0000 1010 1110 */
{GTAX,"(HL-)" }, /* af: 0111 0000 1010 1111 */
- {illegal,0 }, /* b0: 0111 0000 1011 0000 */
+ {illegal,nullptr }, /* b0: 0111 0000 1011 0000 */
{SUBNBX,"(BC)" }, /* b1: 0111 0000 1011 0001 */
{SUBNBX,"(DE)" }, /* b2: 0111 0000 1011 0010 */
{SUBNBX,"(HL)" }, /* b3: 0111 0000 1011 0011 */
@@ -3055,7 +3055,7 @@ static const struct dasm_s dasm70[256] =
{SUBNBX,"(HL+)" }, /* b5: 0111 0000 1011 0101 */
{SUBNBX,"(DE-)" }, /* b6: 0111 0000 1011 0110 */
{SUBNBX,"(HL-)" }, /* b7: 0111 0000 1011 0111 */
- {illegal,0 }, /* b8: 0111 0000 1011 1000 */
+ {illegal,nullptr }, /* b8: 0111 0000 1011 1000 */
{LTAX,"(BC)" }, /* b9: 0111 0000 1011 1001 */
{LTAX,"(DE)" }, /* ba: 0111 0000 1011 1010 */
{LTAX,"(HL)" }, /* bb: 0111 0000 1011 1011 */
@@ -3064,7 +3064,7 @@ static const struct dasm_s dasm70[256] =
{LTAX,"(DE-)" }, /* be: 0111 0000 1011 1110 */
{LTAX,"(HL-)" }, /* bf: 0111 0000 1011 1111 */
- {illegal,0 }, /* c0: 0111 0000 1100 0000 */
+ {illegal,nullptr }, /* c0: 0111 0000 1100 0000 */
{ADDX,"(BC)" }, /* c1: 0111 0000 1100 0001 */
{ADDX,"(DE)" }, /* c2: 0111 0000 1100 0010 */
{ADDX,"(HL)" }, /* c3: 0111 0000 1100 0011 */
@@ -3072,7 +3072,7 @@ static const struct dasm_s dasm70[256] =
{ADDX,"(HL+)" }, /* c5: 0111 0000 1100 0101 */
{ADDX,"(DE-)" }, /* c6: 0111 0000 1100 0110 */
{ADDX,"(HL-)" }, /* c7: 0111 0000 1100 0111 */
- {illegal,0 }, /* c8: 0111 0000 1100 1000 */
+ {illegal,nullptr }, /* c8: 0111 0000 1100 1000 */
{ONAX,"(BC)" }, /* c9: 0111 0000 1100 1001 */
{ONAX,"(DE)" }, /* ca: 0111 0000 1100 1010 */
{ONAX,"(HL)" }, /* cb: 0111 0000 1100 1011 */
@@ -3081,7 +3081,7 @@ static const struct dasm_s dasm70[256] =
{ONAX,"(DE-)" }, /* ce: 0111 0000 1100 1110 */
{ONAX,"(HL-)" }, /* cf: 0111 0000 1100 1111 */
- {illegal,0 }, /* d0: 0111 0000 1101 0000 */
+ {illegal,nullptr }, /* d0: 0111 0000 1101 0000 */
{ADCX,"(BC)" }, /* d1: 0111 0000 1101 0001 */
{ADCX,"(DE)" }, /* d2: 0111 0000 1101 0010 */
{ADCX,"(HL)" }, /* d3: 0111 0000 1101 0011 */
@@ -3089,7 +3089,7 @@ static const struct dasm_s dasm70[256] =
{ADCX,"(HL+)" }, /* d5: 0111 0000 1101 0101 */
{ADCX,"(DE-)" }, /* d6: 0111 0000 1101 0110 */
{ADCX,"(HL-)" }, /* d7: 0111 0000 1101 0111 */
- {illegal,0 }, /* d8: 0111 0000 1101 1000 */
+ {illegal,nullptr }, /* d8: 0111 0000 1101 1000 */
{OFFAX,"(BC)" }, /* d9: 0111 0000 1101 1001 */
{OFFAX,"(DE)" }, /* da: 0111 0000 1101 1010 */
{OFFAX,"(HL)" }, /* db: 0111 0000 1101 1011 */
@@ -3098,7 +3098,7 @@ static const struct dasm_s dasm70[256] =
{OFFAX,"(DE-)" }, /* de: 0111 0000 1101 1110 */
{OFFAX,"(HL-)" }, /* df: 0111 0000 1101 1111 */
- {illegal,0 }, /* e0: 0111 0000 1110 0000 */
+ {illegal,nullptr }, /* e0: 0111 0000 1110 0000 */
{SUBX,"(BC)" }, /* e1: 0111 0000 1110 0001 */
{SUBX,"(DE)" }, /* e2: 0111 0000 1110 0010 */
{SUBX,"(HL)" }, /* e3: 0111 0000 1110 0011 */
@@ -3106,7 +3106,7 @@ static const struct dasm_s dasm70[256] =
{SUBX,"(HL+)" }, /* e5: 0111 0000 1110 0101 */
{SUBX,"(DE-)" }, /* e6: 0111 0000 1110 0110 */
{SUBX,"(HL-)" }, /* e7: 0111 0000 1110 0111 */
- {illegal,0 }, /* e8: 0111 0000 1110 1000 */
+ {illegal,nullptr }, /* e8: 0111 0000 1110 1000 */
{NEAX,"(BC)" }, /* e9: 0111 0000 1110 1001 */
{NEAX,"(DE)" }, /* ea: 0111 0000 1110 1010 */
{NEAX,"(HL)" }, /* eb: 0111 0000 1110 1011 */
@@ -3115,7 +3115,7 @@ static const struct dasm_s dasm70[256] =
{NEAX,"(DE-)" }, /* ee: 0111 0000 1110 1110 */
{NEAX,"(HL-)" }, /* ef: 0111 0000 1110 1111 */
- {illegal,0 }, /* f0: 0111 0000 1111 0000 */
+ {illegal,nullptr }, /* f0: 0111 0000 1111 0000 */
{SBBX,"(BC)" }, /* f1: 0111 0000 1111 0001 */
{SBBX,"(DE)" }, /* f2: 0111 0000 1111 0010 */
{SBBX,"(HL)" }, /* f3: 0111 0000 1111 0011 */
@@ -3123,7 +3123,7 @@ static const struct dasm_s dasm70[256] =
{SBBX,"(HL+)" }, /* f5: 0111 0000 1111 0101 */
{SBBX,"(DE-)" }, /* f6: 0111 0000 1111 0110 */
{SBBX,"(HL-)" }, /* f7: 0111 0000 1111 0111 */
- {illegal,0 }, /* f8: 0111 0000 1111 1000 */
+ {illegal,nullptr }, /* f8: 0111 0000 1111 1000 */
{EQAX,"(BC)" }, /* f9: 0111 0000 1111 1001 */
{EQAX,"(DE)" }, /* fa: 0111 0000 1111 1010 */
{EQAX,"(HL)" }, /* fb: 0111 0000 1111 1011 */
@@ -3136,14 +3136,14 @@ static const struct dasm_s dasm70[256] =
/* prefix 74 */
static const struct dasm_s dasm74[256] =
{
- {illegal,0 }, /* 00: 0111 0100 0000 0000 */
- {illegal,0 }, /* 01: 0111 0100 0000 0001 */
- {illegal,0 }, /* 02: 0111 0100 0000 0010 */
- {illegal,0 }, /* 03: 0111 0100 0000 0011 */
- {illegal,0 }, /* 04: 0111 0100 0000 0100 */
- {illegal,0 }, /* 05: 0111 0100 0000 0101 */
- {illegal,0 }, /* 06: 0111 0100 0000 0110 */
- {illegal,0 }, /* 07: 0111 0100 0000 0111 */
+ {illegal,nullptr }, /* 00: 0111 0100 0000 0000 */
+ {illegal,nullptr }, /* 01: 0111 0100 0000 0001 */
+ {illegal,nullptr }, /* 02: 0111 0100 0000 0010 */
+ {illegal,nullptr }, /* 03: 0111 0100 0000 0011 */
+ {illegal,nullptr }, /* 04: 0111 0100 0000 0100 */
+ {illegal,nullptr }, /* 05: 0111 0100 0000 0101 */
+ {illegal,nullptr }, /* 06: 0111 0100 0000 0110 */
+ {illegal,nullptr }, /* 07: 0111 0100 0000 0111 */
{ANI,"V,%b" }, /* 08: 0111 0100 0000 1000 xxxx xxxx */
{ANI,"A,%b" }, /* 09: 0111 0100 0000 1001 xxxx xxxx */
{ANI,"B,%b" }, /* 0a: 0111 0100 0000 1010 xxxx xxxx */
@@ -3272,138 +3272,138 @@ static const struct dasm_s dasm74[256] =
{EQI,"H,%b" }, /* 7e: 0111 0100 0111 1110 xxxx xxxx */
{EQI,"L,%b" }, /* 7f: 0111 0100 0111 1111 xxxx xxxx */
- {illegal,0 }, /* 80: 0111 0100 1000 0000 */
- {illegal,0 }, /* 81: 0111 0100 1000 0001 */
- {illegal,0 }, /* 82: 0111 0100 1000 0010 */
- {illegal,0 }, /* 83: 0111 0100 1000 0011 */
- {illegal,0 }, /* 84: 0111 0100 1000 0100 */
- {illegal,0 }, /* 85: 0111 0100 1000 0101 */
- {illegal,0 }, /* 86: 0111 0100 1000 0110 */
- {illegal,0 }, /* 87: 0111 0100 1000 0111 */
+ {illegal,nullptr }, /* 80: 0111 0100 1000 0000 */
+ {illegal,nullptr }, /* 81: 0111 0100 1000 0001 */
+ {illegal,nullptr }, /* 82: 0111 0100 1000 0010 */
+ {illegal,nullptr }, /* 83: 0111 0100 1000 0011 */
+ {illegal,nullptr }, /* 84: 0111 0100 1000 0100 */
+ {illegal,nullptr }, /* 85: 0111 0100 1000 0101 */
+ {illegal,nullptr }, /* 86: 0111 0100 1000 0110 */
+ {illegal,nullptr }, /* 87: 0111 0100 1000 0111 */
{ANAW,"%a" }, /* 88: 0111 0100 1000 1000 oooo oooo */
- {illegal,0 }, /* 89: 0111 0100 1000 1001 */
- {illegal,0 }, /* 8a: 0111 0100 1000 1010 */
- {illegal,0 }, /* 8b: 0111 0100 1000 1011 */
- {illegal,0 }, /* 8c: 0111 0100 1000 1100 */
+ {illegal,nullptr }, /* 89: 0111 0100 1000 1001 */
+ {illegal,nullptr }, /* 8a: 0111 0100 1000 1010 */
+ {illegal,nullptr }, /* 8b: 0111 0100 1000 1011 */
+ {illegal,nullptr }, /* 8c: 0111 0100 1000 1100 */
{DAN,"EA,BC" }, /* 8d: 0111 0100 1000 1101 */
{DAN,"EA,DE" }, /* 8e: 0111 0100 1000 1110 */
{DAN,"EA,HL" }, /* 8f: 0111 0100 1000 1111 */
{XRAW,"%a" }, /* 90: 0111 0100 1001 0000 oooo oooo */
- {illegal,0 }, /* 91: 0111 0100 1001 0001 */
- {illegal,0 }, /* 92: 0111 0100 1001 0010 */
- {illegal,0 }, /* 93: 0111 0100 1001 0011 */
- {illegal,0 }, /* 94: 0111 0100 1001 0100 */
+ {illegal,nullptr }, /* 91: 0111 0100 1001 0001 */
+ {illegal,nullptr }, /* 92: 0111 0100 1001 0010 */
+ {illegal,nullptr }, /* 93: 0111 0100 1001 0011 */
+ {illegal,nullptr }, /* 94: 0111 0100 1001 0100 */
{DXR,"EA,BC" }, /* 95: 0111 0100 1001 0101 */
{DXR,"EA,DE" }, /* 96: 0111 0100 1001 0110 */
{DXR,"EA,HL" }, /* 97: 0111 0100 1001 0111 */
{ORAW,"%a" }, /* 98: 0111 0100 1001 1000 oooo oooo */
- {illegal,0 }, /* 99: 0111 0100 1001 1001 */
- {illegal,0 }, /* 9a: 0111 0100 1001 1010 */
- {illegal,0 }, /* 9b: 0111 0100 1001 1011 */
- {illegal,0 }, /* 9c: 0111 0100 1001 1100 */
+ {illegal,nullptr }, /* 99: 0111 0100 1001 1001 */
+ {illegal,nullptr }, /* 9a: 0111 0100 1001 1010 */
+ {illegal,nullptr }, /* 9b: 0111 0100 1001 1011 */
+ {illegal,nullptr }, /* 9c: 0111 0100 1001 1100 */
{DOR,"EA,BC" }, /* 9d: 0111 0100 1001 1101 */
{DOR,"EA,DE" }, /* 9e: 0111 0100 1001 1110 */
{DOR,"EA,HL" }, /* 9f: 0111 0100 1001 1111 */
{ADDNCW,"%a" }, /* a0: 0111 0100 1010 0000 oooo oooo */
- {illegal,0 }, /* a1: 0111 0100 1010 0001 */
- {illegal,0 }, /* a2: 0111 0100 1010 0010 */
- {illegal,0 }, /* a3: 0111 0100 1010 0011 */
- {illegal,0 }, /* a4: 0111 0100 1010 0100 */
+ {illegal,nullptr }, /* a1: 0111 0100 1010 0001 */
+ {illegal,nullptr }, /* a2: 0111 0100 1010 0010 */
+ {illegal,nullptr }, /* a3: 0111 0100 1010 0011 */
+ {illegal,nullptr }, /* a4: 0111 0100 1010 0100 */
{DADDNC,"EA,BC" }, /* a5: 0111 0100 1010 0101 */
{DADDNC,"EA,DE" }, /* a6: 0111 0100 1010 0110 */
{DADDNC,"EA,HL" }, /* a7: 0111 0100 1010 0111 */
{GTAW,"%a" }, /* a8: 0111 0100 1010 1000 oooo oooo */
- {illegal,0 }, /* a9: 0111 0100 1010 1001 */
- {illegal,0 }, /* aa: 0111 0100 1010 1010 */
- {illegal,0 }, /* ab: 0111 0100 1010 1011 */
- {illegal,0 }, /* ac: 0111 0100 1010 1100 */
+ {illegal,nullptr }, /* a9: 0111 0100 1010 1001 */
+ {illegal,nullptr }, /* aa: 0111 0100 1010 1010 */
+ {illegal,nullptr }, /* ab: 0111 0100 1010 1011 */
+ {illegal,nullptr }, /* ac: 0111 0100 1010 1100 */
{DGT,"EA,BC" }, /* ad: 0111 0100 1010 1101 */
{DGT,"EA,DE" }, /* ae: 0111 0100 1010 1110 */
{DGT,"EA,HL" }, /* af: 0111 0100 1010 1111 */
{SUBNBW,"%a" }, /* b0: 0111 0100 1011 0000 oooo oooo */
- {illegal,0 }, /* b1: 0111 0100 1011 0001 */
- {illegal,0 }, /* b2: 0111 0100 1011 0010 */
- {illegal,0 }, /* b3: 0111 0100 1011 0011 */
- {illegal,0 }, /* b4: 0111 0100 1011 0100 */
+ {illegal,nullptr }, /* b1: 0111 0100 1011 0001 */
+ {illegal,nullptr }, /* b2: 0111 0100 1011 0010 */
+ {illegal,nullptr }, /* b3: 0111 0100 1011 0011 */
+ {illegal,nullptr }, /* b4: 0111 0100 1011 0100 */
{DSUBNB,"EA,BC" }, /* b5: 0111 0100 1011 0101 */
{DSUBNB,"EA,DE" }, /* b6: 0111 0100 1011 0110 */
{DSUBNB,"EA,HL" }, /* b7: 0111 0100 1011 0111 */
{LTAW,"%a" }, /* b8: 0111 0100 1011 1000 oooo oooo */
- {illegal,0 }, /* b9: 0111 0100 1011 1001 */
- {illegal,0 }, /* ba: 0111 0100 1011 1010 */
- {illegal,0 }, /* bb: 0111 0100 1011 1011 */
- {illegal,0 }, /* bc: 0111 0100 1011 1100 */
+ {illegal,nullptr }, /* b9: 0111 0100 1011 1001 */
+ {illegal,nullptr }, /* ba: 0111 0100 1011 1010 */
+ {illegal,nullptr }, /* bb: 0111 0100 1011 1011 */
+ {illegal,nullptr }, /* bc: 0111 0100 1011 1100 */
{DLT,"EA,BC" }, /* bd: 0111 0100 1011 1101 */
{DLT,"EA,DE" }, /* be: 0111 0100 1011 1110 */
{DLT,"EA,HL" }, /* bf: 0111 0100 1011 1111 */
{ADDW,"%a" }, /* c0: 0111 0100 1100 0000 oooo oooo */
- {illegal,0 }, /* c1: 0111 0100 1100 0001 */
- {illegal,0 }, /* c2: 0111 0100 1100 0010 */
- {illegal,0 }, /* c3: 0111 0100 1100 0011 */
- {illegal,0 }, /* c4: 0111 0100 1100 0100 */
+ {illegal,nullptr }, /* c1: 0111 0100 1100 0001 */
+ {illegal,nullptr }, /* c2: 0111 0100 1100 0010 */
+ {illegal,nullptr }, /* c3: 0111 0100 1100 0011 */
+ {illegal,nullptr }, /* c4: 0111 0100 1100 0100 */
{DADD,"EA,BC" }, /* c5: 0111 0100 1100 0101 */
{DADD,"EA,DE" }, /* c6: 0111 0100 1100 0110 */
{DADD,"EA,HL" }, /* c7: 0111 0100 1100 0111 */
{ONAW,"%a" }, /* c8: 0111 0100 1100 1000 oooo oooo */
- {illegal,0 }, /* c9: 0111 0100 1100 1001 */
- {illegal,0 }, /* ca: 0111 0100 1100 1010 */
- {illegal,0 }, /* cb: 0111 0100 1100 1011 */
- {illegal,0 }, /* cc: 0111 0100 1100 1100 */
+ {illegal,nullptr }, /* c9: 0111 0100 1100 1001 */
+ {illegal,nullptr }, /* ca: 0111 0100 1100 1010 */
+ {illegal,nullptr }, /* cb: 0111 0100 1100 1011 */
+ {illegal,nullptr }, /* cc: 0111 0100 1100 1100 */
{DON,"EA,BC" }, /* cd: 0111 0100 1100 1101 */
{DON,"EA,DE" }, /* ce: 0111 0100 1100 1110 */
{DON,"EA,HL" }, /* cf: 0111 0100 1100 1111 */
{ADCW,"%a" }, /* d0: 0111 0100 1101 0000 oooo oooo */
- {illegal,0 }, /* d1: 0111 0100 1101 0001 */
- {illegal,0 }, /* d2: 0111 0100 1101 0010 */
- {illegal,0 }, /* d3: 0111 0100 1101 0011 */
- {illegal,0 }, /* d4: 0111 0100 1101 0100 */
+ {illegal,nullptr }, /* d1: 0111 0100 1101 0001 */
+ {illegal,nullptr }, /* d2: 0111 0100 1101 0010 */
+ {illegal,nullptr }, /* d3: 0111 0100 1101 0011 */
+ {illegal,nullptr }, /* d4: 0111 0100 1101 0100 */
{DADC,"EA,BC" }, /* d5: 0111 0100 1101 0101 */
{DADC,"EA,DE" }, /* d6: 0111 0100 1101 0110 */
{DADC,"EA,HL" }, /* d7: 0111 0100 1101 0111 */
{OFFAW,"%a" }, /* d8: 0111 0100 1101 1000 oooo oooo */
- {illegal,0 }, /* d9: 0111 0100 1101 1001 */
- {illegal,0 }, /* da: 0111 0100 1101 1010 */
- {illegal,0 }, /* db: 0111 0100 1101 1011 */
- {illegal,0 }, /* dc: 0111 0100 1101 1100 */
+ {illegal,nullptr }, /* d9: 0111 0100 1101 1001 */
+ {illegal,nullptr }, /* da: 0111 0100 1101 1010 */
+ {illegal,nullptr }, /* db: 0111 0100 1101 1011 */
+ {illegal,nullptr }, /* dc: 0111 0100 1101 1100 */
{DOFF,"EA,BC" }, /* dd: 0111 0100 1101 1101 */
{DOFF,"EA,DE" }, /* de: 0111 0100 1101 1110 */
{DOFF,"EA,HL" }, /* df: 0111 0100 1101 1111 */
{SUBW,"%a" }, /* e0: 0111 0100 1110 0000 oooo oooo */
- {illegal,0 }, /* e1: 0111 0100 1110 0001 */
- {illegal,0 }, /* e2: 0111 0100 1110 0010 */
- {illegal,0 }, /* e3: 0111 0100 1110 0011 */
- {illegal,0 }, /* e4: 0111 0100 1110 0100 */
+ {illegal,nullptr }, /* e1: 0111 0100 1110 0001 */
+ {illegal,nullptr }, /* e2: 0111 0100 1110 0010 */
+ {illegal,nullptr }, /* e3: 0111 0100 1110 0011 */
+ {illegal,nullptr }, /* e4: 0111 0100 1110 0100 */
{DSUB,"EA,BC" }, /* e5: 0111 0100 1110 0101 */
{DSUB,"EA,DE" }, /* e6: 0111 0100 1110 0110 */
{DSUB,"EA,HL" }, /* e7: 0111 0100 1110 0111 */
{NEAW,"%a" }, /* e8: 0111 0100 1110 1000 oooo oooo */
- {illegal,0 }, /* e9: 0111 0100 1110 1001 */
- {illegal,0 }, /* ea: 0111 0100 1110 1010 */
- {illegal,0 }, /* eb: 0111 0100 1110 1011 */
- {illegal,0 }, /* ec: 0111 0100 1110 1100 */
+ {illegal,nullptr }, /* e9: 0111 0100 1110 1001 */
+ {illegal,nullptr }, /* ea: 0111 0100 1110 1010 */
+ {illegal,nullptr }, /* eb: 0111 0100 1110 1011 */
+ {illegal,nullptr }, /* ec: 0111 0100 1110 1100 */
{DNE,"EA,BC" }, /* ed: 0111 0100 1110 1101 */
{DNE,"EA,DE" }, /* ee: 0111 0100 1110 1110 */
{DNE,"EA,HL" }, /* ef: 0111 0100 1110 1111 */
{SBBW,"%a" }, /* f0: 0111 0100 1111 0000 oooo oooo */
- {illegal,0 }, /* f1: 0111 0100 1111 0001 */
- {illegal,0 }, /* f2: 0111 0100 1111 0010 */
- {illegal,0 }, /* f3: 0111 0100 1111 0011 */
- {illegal,0 }, /* f4: 0111 0100 1111 0100 */
+ {illegal,nullptr }, /* f1: 0111 0100 1111 0001 */
+ {illegal,nullptr }, /* f2: 0111 0100 1111 0010 */
+ {illegal,nullptr }, /* f3: 0111 0100 1111 0011 */
+ {illegal,nullptr }, /* f4: 0111 0100 1111 0100 */
{DSBB,"EA,BC" }, /* f5: 0111 0100 1111 0101 */
{DSBB,"EA,DE" }, /* f6: 0111 0100 1111 0110 */
{DSBB,"EA,HL" }, /* f7: 0111 0100 1111 0111 */
{EQAW,"%a" }, /* f8: 0111 0100 1111 1000 oooo oooo */
- {illegal,0 }, /* f9: 0111 0100 1111 1001 */
- {illegal,0 }, /* fa: 0111 0100 1111 1010 */
- {illegal,0 }, /* fb: 0111 0100 1111 1011 */
- {illegal,0 }, /* fc: 0111 0100 1111 1100 */
+ {illegal,nullptr }, /* f9: 0111 0100 1111 1001 */
+ {illegal,nullptr }, /* fa: 0111 0100 1111 1010 */
+ {illegal,nullptr }, /* fb: 0111 0100 1111 1011 */
+ {illegal,nullptr }, /* fc: 0111 0100 1111 1100 */
{DEQ,"EA,BC" }, /* fd: 0111 0100 1111 1101 */
{DEQ,"EA,DE" }, /* fe: 0111 0100 1111 1110 */
{DEQ,"EA,HL" } /* ff: 0111 0100 1111 1111 */
@@ -3412,13 +3412,13 @@ static const struct dasm_s dasm74[256] =
/* main opcodes */
static const struct dasm_s dasmXX_7810[256] =
{
- {NOP,0 }, /* 00: 0000 0000 */
+ {NOP,nullptr }, /* 00: 0000 0000 */
{LDAW,"%a" }, /* 01: 0000 0001 oooo oooo */
{INX,"SP" }, /* 02: 0000 0010 */
{DCX,"SP" }, /* 03: 0000 0011 */
{LXI,"SP,%w" }, /* 04: 0000 0100 llll llll hhhh hhhh */
{ANIW,"%a,%b" }, /* 05: 0000 0101 oooo oooo xxxx xxxx */
- {illegal,0 }, /* 06: */
+ {illegal,nullptr }, /* 06: */
{ANI,"A,%b" }, /* 07: 0000 0111 xxxx xxxx */
{MOV,"A,EAH" }, /* 08: 0000 1000 */
{MOV,"A,EAL" }, /* 09: 0000 1001 */
@@ -3429,8 +3429,8 @@ static const struct dasm_s dasmXX_7810[256] =
{MOV,"A,H" }, /* 0e: 0000 1110 */
{MOV,"A,L" }, /* 0f: 0000 1111 */
- {EXA,0 }, /* 10: 0001 0000 */ /* 7810 */
- {EXX,0 }, /* 11: 0001 0001 */ /* 7810 */
+ {EXA,nullptr }, /* 10: 0001 0000 */ /* 7810 */
+ {EXX,nullptr }, /* 11: 0001 0001 */ /* 7810 */
{INX,"BC" }, /* 12: 0001 0010 */
{DCX,"BC" }, /* 13: 0001 0011 */
{LXI,"BC,%w" }, /* 14: 0001 0100 llll llll hhhh hhhh */
@@ -3447,14 +3447,14 @@ static const struct dasm_s dasmXX_7810[256] =
{MOV,"L,A" }, /* 1f: 0001 1111 */
{INRW,"%a" }, /* 20: 0010 0000 oooo oooo */
- {JB,0 }, /* 21: 0010 0001 */
+ {JB,nullptr }, /* 21: 0010 0001 */
{INX,"DE" }, /* 22: 0010 0010 */
{DCX,"DE" }, /* 23: 0010 0011 */
{LXI,"DE,%w" }, /* 24: 0010 0100 llll llll hhhh hhhh */
{GTIW,"%a,%b" }, /* 25: 0010 0101 oooo oooo xxxx xxxx */
{ADINC,"A,%b" }, /* 26: 0010 0110 xxxx xxxx */
{GTI,"A,%b" }, /* 27: 0010 0111 xxxx xxxx */
- {illegal,0 }, /* 28: 0010 1000 */
+ {illegal,nullptr }, /* 28: 0010 1000 */
{LDAX,"(BC)" }, /* 29: 0010 1001 */
{LDAX,"(DE)" }, /* 2a: 0010 1010 */
{LDAX,"(HL)" }, /* 2b: 0010 1011 */
@@ -3464,14 +3464,14 @@ static const struct dasm_s dasmXX_7810[256] =
{LDAX,"(HL-)" }, /* 2f: 0010 1111 */
{DCRW,"%a" }, /* 30: 0011 0000 oooo oooo */
- {BLOCK,0 }, /* 31: 0011 0001 */ /* 7810 */
+ {BLOCK,nullptr }, /* 31: 0011 0001 */ /* 7810 */
{INX,"HL", }, /* 32: 0011 0010 */
{DCX,"HL", }, /* 33: 0011 0011 */
{LXI,"HL,%w" }, /* 34: 0011 0100 llll llll hhhh hhhh */
{LTIW,"%a,%b" }, /* 35: 0011 0101 oooo oooo xxxx xxxx */
{SUINB,"A,%b" }, /* 36: 0011 0110 xxxx xxxx */
{LTI,"A,%b" }, /* 37: 0011 0111 xxxx xxxx */
- {illegal,0 }, /* 38: */
+ {illegal,nullptr }, /* 38: */
{STAX,"(BC)" }, /* 39: 0011 1001 */
{STAX,"(DE)" }, /* 3a: 0011 1010 */
{STAX,"(HL)" }, /* 3b: 0011 1011 */
@@ -3497,7 +3497,7 @@ static const struct dasm_s dasmXX_7810[256] =
{JRE,"%d" }, /* 4e: 0100 111d dddd dddd */
{JRE,"%d" }, /* 4f: 0100 111d dddd dddd */
- {EXH,0 }, /* 50: 0101 0000 */ /* 7810 */
+ {EXH,nullptr }, /* 50: 0101 0000 */ /* 7810 */
{DCR,"A" }, /* 51: 0101 0001 */
{DCR,"B" }, /* 52: 0101 0010 */
{DCR,"C" }, /* 53: 0101 0011 */
@@ -3515,8 +3515,8 @@ static const struct dasm_s dasmXX_7810[256] =
{BIT,"7,%a", }, /* 5f: 0101 1111 oooo oooo */ /* 7810 */
{0,dasm60 }, /* 60: prefix */
- {DAA,0 }, /* 61: 0110 0001 */
- {RETI,0 }, /* 62: 0110 0010 */
+ {DAA,nullptr }, /* 61: 0110 0001 */
+ {RETI,nullptr }, /* 62: 0110 0010 */
{STAW,"%a" }, /* 63: 0110 0011 oooo oooo */
{0,dasm64_7810 }, /* 64: prefix */
{NEIW,"%a,%b" }, /* 65: 0110 0101 oooo oooo xxxx xxxx */
@@ -3533,8 +3533,8 @@ static const struct dasm_s dasmXX_7810[256] =
{0,dasm70 }, /* 70: prefix */
{MVIW,"%a,%b" }, /* 71: 0111 0001 oooo oooo xxxx xxxx */
- {SOFTI,0 }, /* 72: 0111 0010 */
- {illegal,0 }, /* 73: */
+ {SOFTI,nullptr }, /* 72: 0111 0010 */
+ {illegal,nullptr }, /* 73: */
{0,dasm74 }, /* 74: prefix */
{EQIW,"%a,%b" }, /* 75: 0111 0101 oooo oooo xxxx xxxx */
{SBI,"A,%b" }, /* 76: 0111 0110 xxxx xxxx */
@@ -3592,7 +3592,7 @@ static const struct dasm_s dasmXX_7810[256] =
{DMOV,"EA,HL" }, /* a7: 1010 0111 */
{INX,"EA" }, /* a8: 1010 1000 */
{DCX,"EA" }, /* a9: 1010 1001 */
- {EI,0 }, /* aa: 1010 1010 */
+ {EI,nullptr }, /* aa: 1010 1010 */
{LDAX,"(DE+%b)" }, /* ab: 1010 1011 dddd dddd */
{LDAX,"(HL+A)" }, /* ac: 1010 1100 */
{LDAX,"(HL+B)" }, /* ad: 1010 1101 */
@@ -3607,9 +3607,9 @@ static const struct dasm_s dasmXX_7810[256] =
{DMOV,"BC,EA" }, /* b5: 1011 0101 */
{DMOV,"DE,EA" }, /* b6: 1011 0110 */
{DMOV,"HL,EA" }, /* b7: 1011 0111 */
- {RET,0 }, /* b8: 1011 1000 */
- {RETS,0 }, /* b9: 1011 1001 */
- {DI,0 }, /* ba: 1011 1010 */
+ {RET,nullptr }, /* b8: 1011 1000 */
+ {RETS,nullptr }, /* b9: 1011 1001 */
+ {DI,nullptr }, /* ba: 1011 1010 */
{STAX,"(DE+%b)" }, /* bb: 1011 1011 dddd dddd */
{STAX,"(HL+A)" }, /* bc: 1011 1100 */
{STAX,"(HL+B)" }, /* bd: 1011 1101 */
@@ -3687,13 +3687,13 @@ static const struct dasm_s dasmXX_7810[256] =
static const struct dasm_s dasmXX_7807[256] =
{
- {NOP,0 }, /* 00: 0000 0000 */
+ {NOP,nullptr }, /* 00: 0000 0000 */
{LDAW,"%a" }, /* 01: 0000 0001 oooo oooo */
{INX,"SP" }, /* 02: 0000 0010 */
{DCX,"SP" }, /* 03: 0000 0011 */
{LXI,"SP,%w" }, /* 04: 0000 0100 llll llll hhhh hhhh */
{ANIW,"%a,%b" }, /* 05: 0000 0101 oooo oooo xxxx xxxx */
- {illegal,0 }, /* 06: */
+ {illegal,nullptr }, /* 06: */
{ANI,"A,%b" }, /* 07: 0000 0111 xxxx xxxx */
{MOV,"A,EAH" }, /* 08: 0000 1000 */
{MOV,"A,EAL" }, /* 09: 0000 1001 */
@@ -3722,14 +3722,14 @@ static const struct dasm_s dasmXX_7807[256] =
{MOV,"L,A" }, /* 1f: 0001 1111 */
{INRW,"%a" }, /* 20: 0010 0000 oooo oooo */
- {JB,0 }, /* 21: 0010 0001 */
+ {JB,nullptr }, /* 21: 0010 0001 */
{INX,"DE" }, /* 22: 0010 0010 */
{DCX,"DE" }, /* 23: 0010 0011 */
{LXI,"DE,%w" }, /* 24: 0010 0100 llll llll hhhh hhhh */
{GTIW,"%a,%b" }, /* 25: 0010 0101 oooo oooo xxxx xxxx */
{ADINC,"A,%b" }, /* 26: 0010 0110 xxxx xxxx */
{GTI,"A,%b" }, /* 27: 0010 0111 xxxx xxxx */
- {illegal,0 }, /* 28: 0010 1000 */
+ {illegal,nullptr }, /* 28: 0010 1000 */
{LDAX,"(BC)" }, /* 29: 0010 1001 */
{LDAX,"(DE)" }, /* 2a: 0010 1010 */
{LDAX,"(HL)" }, /* 2b: 0010 1011 */
@@ -3746,7 +3746,7 @@ static const struct dasm_s dasmXX_7807[256] =
{LTIW,"%a,%b" }, /* 35: 0011 0101 oooo oooo xxxx xxxx */
{SUINB,"A,%b" }, /* 36: 0011 0110 xxxx xxxx */
{LTI,"A,%b" }, /* 37: 0011 0111 xxxx xxxx */
- {illegal,0 }, /* 38: */
+ {illegal,nullptr }, /* 38: */
{STAX,"(BC)" }, /* 39: 0011 1001 */
{STAX,"(DE)" }, /* 3a: 0011 1010 */
{STAX,"(HL)" }, /* 3b: 0011 1011 */
@@ -3789,8 +3789,8 @@ static const struct dasm_s dasmXX_7807[256] =
{MOV,"CY,%i" }, /* 5f: 0101 1111 bbbb bbbb */ /* 7807 */
{0,dasm60 }, /* 60: prefix */
- {DAA,0 }, /* 61: 0110 0001 */
- {RETI,0 }, /* 62: 0110 0010 */
+ {DAA,nullptr }, /* 61: 0110 0001 */
+ {RETI,nullptr }, /* 62: 0110 0010 */
{STAW,"%a" }, /* 63: 0110 0011 oooo oooo */
{0,dasm64_7807 }, /* 64: prefix */
{NEIW,"%a,%b" }, /* 65: 0110 0101 oooo oooo xxxx xxxx */
@@ -3807,8 +3807,8 @@ static const struct dasm_s dasmXX_7807[256] =
{0,dasm70 }, /* 70: prefix */
{MVIW,"%a,%b" }, /* 71: 0111 0001 oooo oooo xxxx xxxx */
- {SOFTI,0 }, /* 72: 0111 0010 */
- {illegal,0 }, /* 73: */
+ {SOFTI,nullptr }, /* 72: 0111 0010 */
+ {illegal,nullptr }, /* 73: */
{0,dasm74 }, /* 74: prefix */
{EQIW,"%a,%b" }, /* 75: 0111 0101 oooo oooo xxxx xxxx */
{SBI,"A,%b" }, /* 76: 0111 0110 xxxx xxxx */
@@ -3866,7 +3866,7 @@ static const struct dasm_s dasmXX_7807[256] =
{DMOV,"EA,HL" }, /* a7: 1010 0111 */
{INX,"EA" }, /* a8: 1010 1000 */
{DCX,"EA" }, /* a9: 1010 1001 */
- {EI,0 }, /* aa: 1010 1010 */
+ {EI,nullptr }, /* aa: 1010 1010 */
{LDAX,"(DE+%b)" }, /* ab: 1010 1011 dddd dddd */
{LDAX,"(HL+A)" }, /* ac: 1010 1100 */
{LDAX,"(HL+B)" }, /* ad: 1010 1101 */
@@ -3881,9 +3881,9 @@ static const struct dasm_s dasmXX_7807[256] =
{DMOV,"BC,EA" }, /* b5: 1011 0101 */
{DMOV,"DE,EA" }, /* b6: 1011 0110 */
{DMOV,"HL,EA" }, /* b7: 1011 0111 */
- {RET,0 }, /* b8: 1011 1000 */
- {RETS,0 }, /* b9: 1011 1001 */
- {DI,0 }, /* ba: 1011 1010 */
+ {RET,nullptr }, /* b8: 1011 1000 */
+ {RETS,nullptr }, /* b9: 1011 1001 */
+ {DI,nullptr }, /* ba: 1011 1010 */
{STAX,"(DE+%b)" }, /* bb: 1011 1011 dddd dddd */
{STAX,"(HL+A)" }, /* bc: 1011 1100 */
{STAX,"(HL+B)" }, /* bd: 1011 1101 */
@@ -3968,265 +3968,265 @@ static const struct dasm_s dasmXX_7807[256] =
static const struct dasm_s dasm48_7801[256] = {
/* 0x00 - 0x3F */
{ SKIT, "F0" }, { SKIT, "FT" }, { SKIT, "F1" }, { SKIT, "F2" },
- { SKIT, "FS" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SK, "CY" }, { illegal, 0 },
- { SK, "Z" }, { illegal, 0 }, { PUSH, "VA" }, { POP, "VA" },
+ { SKIT, "FS" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SK, "CY" }, { illegal, nullptr },
+ { SK, "Z" }, { illegal, nullptr }, { PUSH, "VA" }, { POP, "VA" },
{ SKNIT, "F0" }, { SKNIT, "FT" }, { SKNIT, "F1" }, { SKNIT, "F2" },
- { SKNIT, "FS" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SKN, "CY" }, { illegal, 0 },
- { SKN, "Z" }, { illegal, 0 }, { PUSH, "BC" }, { POP, "BC" },
+ { SKNIT, "FS" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SKN, "CY" }, { illegal, nullptr },
+ { SKN, "Z" }, { illegal, nullptr }, { PUSH, "BC" }, { POP, "BC" },
- { EI, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { DI, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { CLC, 0 }, { STC, 0 },
- { PER, 0 }, { PEX, 0 }, { PUSH, "DE" }, { POP, "DE" },
+ { EI, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { DI, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { CLC, nullptr }, { STC, nullptr },
+ { PER, nullptr }, { PEX, nullptr }, { PUSH, "DE" }, { POP, "DE" },
{ RLL, "A" }, { RLR, "A" }, { RLL, "C" }, { RLR, "C" },
{ SLL, "A" }, { SLR, "A" }, { SLL, "C" }, { SLR, "C" },
- { RLD, 0 }, { RRD, 0 }, { illegal, 0 }, { illegal, 0 },
- { PER, 0 }, { illegal, 0 }, { PUSH, "HL" }, { POP, "HL" },
+ { RLD, nullptr }, { RRD, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { PER, nullptr }, { illegal, nullptr }, { PUSH, "HL" }, { POP, "HL" },
/* 0x40 - 0x7F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0xC0 - 0xFF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }
};
static const struct dasm_s dasm4c_7801[256] = {
/* 0x00 - 0x3F */
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
-
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
-
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
-
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
/* 0x40 - 0x7F */
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
-
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
-
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
-
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
/* 0x80 - 0xBF */
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
-
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
-
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
-
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
- { IN, 0 }, { IN, 0 }, { IN, 0 }, { IN, 0 },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
+ { IN, nullptr }, { IN, nullptr }, { IN, nullptr }, { IN, nullptr },
/* 0xC0 - 0xFF */
{ MOV, "A,PA" }, { MOV, "A,PB" }, { MOV, "A,PC" }, { MOV, "A,MK" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { MOV, "A,S" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { MOV, "A,S" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }
};
static const struct dasm_s dasm4d_7801[256] = {
/* 0x00 - 0x3F */
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
-
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
-
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
-
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
/* 0x40 - 0x7F */
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
-
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
-
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
-
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
/* 0x80 - 0xBF */
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
-
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
-
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
-
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
- { OUT, 0 }, { OUT, 0 }, { OUT, 0 }, { OUT, 0 },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
+ { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr }, { OUT, nullptr },
/* 0xC0 - 0xFF */
{ MOV, "PA,A" }, { MOV, "PB,A" }, { MOV, "PC,A" }, { MOV, "MK,A" },
{ MOV, "MB,A" }, { MOV, "MC,A" }, { MOV, "TM0,A" }, { MOV, "TM1,A" },
- { MOV, "S,A" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }
+ { MOV, "S,A" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }
};
static const struct dasm_s dasm60_7801[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ANA, "V,A" }, { ANA, "A,A" }, { ANA, "B,A" }, { ANA, "C,A" },
{ ANA, "D,A" }, { ANA, "E,A" }, { ANA, "H,A" }, { ANA, "L,A" },
@@ -4248,13 +4248,13 @@ static const struct dasm_s dasm60_7801[256] = {
/* 0x40 - 0x7F */
{ ADD, "V,A" }, { ADD, "A,A" }, { ADD, "B,A" }, { ADD, "C,A" },
{ ADD, "D,A" }, { ADD, "E,A" }, { ADD, "H,A" }, { ADD, "L,A" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ADC, "V,A" }, { ADC, "A,A" }, { ADC, "B,A" }, { ADC, "C,A" },
{ ADC, "D,A" }, { ADC, "E,A" }, { ADC, "H,A" }, { ADC, "L,A" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ SUB, "V,A" }, { SUB, "A,A" }, { SUB, "B,A" }, { SUB, "C,A" },
{ SUB, "D,A" }, { SUB, "E,A" }, { SUB, "H,A" }, { SUB, "L,A" },
@@ -4267,8 +4267,8 @@ static const struct dasm_s dasm60_7801[256] = {
{ EQA, "D,A" }, { EQA, "E,A" }, { EQA, "H,A" }, { EQA, "L,A" },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ANA, "A,V" }, { ANA, "A,A" }, { ANA, "A,B" }, { ANA, "A,C" },
{ ANA, "A,D" }, { ANA, "A,E" }, { ANA, "A,H" }, { ANA, "A,L" },
@@ -4311,8 +4311,8 @@ static const struct dasm_s dasm60_7801[256] = {
static const struct dasm_s dasm64_7801[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ANI, "V,%b" }, { ANI, "A,%b" }, { ANI, "B,%b" }, { ANI, "C,%b" },
{ ANI, "D,%b" }, { ANI, "E,%b" }, { ANI, "H,%b" }, { ANI, "L,%b" },
@@ -4353,259 +4353,259 @@ static const struct dasm_s dasm64_7801[256] = {
{ EQI, "D,%b" }, { EQI, "E,%b" }, { EQI, "H,%b" }, { EQI, "L,%b" },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ANI, "PA,%b" }, { ANI, "PB,%b" }, { ANI, "PC,%b" }, { ANI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ XRI, "PA,%b" }, { XRI, "PB,%b" }, { XRI, "PC,%b" }, { XRI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ORI, "PA,%b" }, { ORI, "PB,%b" }, { ORI, "PC,%b" }, { ORI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ADINC, "PA,%b" }, { ADINC, "PB,%b" }, { ADINC, "PC,%b" }, { ADINC, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ GTI, "PA,%b" }, { GTI, "PB,%b" }, { GTI, "PC,%b" }, { GTI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ SUINB, "PA,%b" }, { SUINB, "PB,%b" }, { SUINB, "PC,%b" }, { SUINB, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ LTI, "PA,%b" }, { LTI, "PB,%b" }, { LTI, "PC,%b" }, { LTI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0xC0 - 0xFF */
{ ADI, "PA,%b" }, { ADI, "PB,%b" }, { ADI, "PC,%b" }, { ADI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ONI, "PA,%b" }, { ONI, "PB,%b" }, { ONI, "PC,%b" }, { ONI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ACI, "PA,%b" }, { ACI, "PB,%b" }, { ACI, "PC,%b" }, { ACI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ OFFI, "PA,%b" }, { OFFI, "PB,%b" }, { OFFI, "PC,%b" }, { OFFI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ SUI, "PA,%b" }, { SUI, "PB,%b" }, { SUI, "PC,%b" }, { SUI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ NEI, "PA,%b" }, { NEI, "PB,%b" }, { NEI, "PC,%b" }, { NEI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ SBI, "PA,%b" }, { SBI, "PB,%b" }, { SBI, "PC,%b" }, { SBI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ EQI, "PA,%b" }, { EQI, "PB,%b" }, { EQI, "PC,%b" }, { EQI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }
};
static const struct dasm_s dasm70_7801[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SSPD, "%w" }, { LSPD, "%w" },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SBCD, "%w" }, { LBCD, "%w" },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SDED, "%w" }, { LDED, "%w" },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SHLD, "%w" }, { LHLD, "%w" },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SSPD, "%w" }, { LSPD, "%w" },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SBCD, "%w" }, { LBCD, "%w" },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SDED, "%w" }, { LDED, "%w" },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SHLD, "%w" }, { LHLD, "%w" },
/* 0x40 - 0x7F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ MOV, "V,%w" }, { MOV, "A,%w" }, { MOV, "B,%w" }, { MOV, "C,%w" },
{ MOV, "D,%w" }, { MOV, "E,%w" }, { MOV, "H,%w" }, { MOV, "L,%w" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ MOV, "%w,V" }, { MOV, "%w,A" }, { MOV, "%w,B" }, { MOV, "%w,C" },
{ MOV, "%w,D" }, { MOV, "%w,E" }, { MOV, "%w,H" }, { MOV, "%w,L" },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { ANAX, "BC" }, { ANAX, "DE" }, { ANAX, "HL" },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { ANAX, "BC" }, { ANAX, "DE" }, { ANAX, "HL" },
{ ANAX, "DE+" }, { ANAX, "HL+" }, { ANAX, "DE-" }, { ANAX, "HL-" },
- { illegal, 0 }, { XRAX, "BC" }, { XRAX, "DE" }, { XRAX, "HL" },
+ { illegal, nullptr }, { XRAX, "BC" }, { XRAX, "DE" }, { XRAX, "HL" },
{ XRAX, "DE+" }, { XRAX, "HL+" }, { XRAX, "DE-" }, { XRAX, "HL-" },
- { illegal, 0 }, { ORAX, "BC" }, { ORAX, "DE" }, { ORAX, "HL" },
+ { illegal, nullptr }, { ORAX, "BC" }, { ORAX, "DE" }, { ORAX, "HL" },
{ ORAX, "DE+" }, { ORAX, "HL+" }, { ORAX, "DE-" }, { ORAX, "HL-" },
- { illegal, 0 }, { ADDNCX, "BC" }, { ADDNCX, "DE" }, { ADDNCX, "HL" },
+ { illegal, nullptr }, { ADDNCX, "BC" }, { ADDNCX, "DE" }, { ADDNCX, "HL" },
{ ADDNCX, "DE+" }, { ADDNCX, "HL+" }, { ADDNCX, "DE-" }, { ADDNCX, "HL-" },
- { illegal, 0 }, { GTAX, "BC" }, { GTAX, "DE" }, { GTAX, "HL" },
+ { illegal, nullptr }, { GTAX, "BC" }, { GTAX, "DE" }, { GTAX, "HL" },
{ GTAX, "DE+" }, { GTAX, "HL+" }, { GTAX, "DE-" }, { GTAX, "HL-" },
- { illegal, 0 }, { SUBNBX, "BC" }, { SUBNBX, "DE" }, { SUBNBX, "HL" },
+ { illegal, nullptr }, { SUBNBX, "BC" }, { SUBNBX, "DE" }, { SUBNBX, "HL" },
{ SUBNBX, "DE+" }, { SUBNBX, "HL+" }, { SUBNBX, }, { SUBNBX, "HL-" },
- { illegal, 0 }, { LTAX, "BC" }, { LTAX, "DE" }, { LTAX, "HL" },
+ { illegal, nullptr }, { LTAX, "BC" }, { LTAX, "DE" }, { LTAX, "HL" },
{ LTAX, "DE+" }, { LTAX, "HL+" }, { LTAX, "DE-" }, { LTAX, "HL-" },
/* 0xC0 - 0xFF */
- { illegal, 0 }, { ADDX, "BC" }, { ADDX, "DE" }, { ADDX, "HL" },
+ { illegal, nullptr }, { ADDX, "BC" }, { ADDX, "DE" }, { ADDX, "HL" },
{ ADDX, "DE+" }, { ADDX, "HL+" }, { ADDX, "DE-" }, { ADDX, "HL-" },
- { illegal, 0 }, { ONAX, "BC" }, { ONAX, "DE" }, { ONAX, "HL" },
+ { illegal, nullptr }, { ONAX, "BC" }, { ONAX, "DE" }, { ONAX, "HL" },
{ ONAX, "DE+" }, { ONAX, "HL+" }, { ONAX, "DE-" }, { ONAX, "HL-" },
- { illegal, 0 }, { ADCX, "BC" }, { ADCX, "DE" }, { ADCX, "HL" },
+ { illegal, nullptr }, { ADCX, "BC" }, { ADCX, "DE" }, { ADCX, "HL" },
{ ADCX, "DE+" }, { ADCX, "HL+" }, { ADCX, "DE-" }, { ADCX, "HL-" },
- { illegal, 0 }, { OFFAX, "BC" }, { OFFAX, "DE" }, { OFFAX, "HL" },
+ { illegal, nullptr }, { OFFAX, "BC" }, { OFFAX, "DE" }, { OFFAX, "HL" },
{ OFFAX, "DE+" }, { OFFAX, "HL+" }, { OFFAX, "DE-" }, { OFFAX, "HL-" },
- { illegal, 0 }, { SUBX, "BC" }, { SUBX, "DE" }, { SUBX, "HL" },
+ { illegal, nullptr }, { SUBX, "BC" }, { SUBX, "DE" }, { SUBX, "HL" },
{ SUBX, "DE+" }, { SUBX, "HL+" }, { SUBX, "DE-" }, { SUBX, "HL-" },
- { illegal, 0 }, { NEAX, "BC" }, { NEAX, "DE" }, { NEAX, "HL" },
+ { illegal, nullptr }, { NEAX, "BC" }, { NEAX, "DE" }, { NEAX, "HL" },
{ NEAX, "DE+" }, { NEAX, "HL+" }, { NEAX, "DE-" }, { NEAX, "HL-" },
- { illegal, 0 }, { SBBX, "BC" }, { SBBX, "DE" }, { SBBX, "HL" },
+ { illegal, nullptr }, { SBBX, "BC" }, { SBBX, "DE" }, { SBBX, "HL" },
{ SBBX, "DE+" }, { SBBX, "HL+" }, { SBBX, "DE-" }, { SBBX, "HL-" },
- { illegal, 0 }, { EQAX, "BC" }, { EQAX, "DE" }, { EQAX, "HL" },
+ { illegal, nullptr }, { EQAX, "BC" }, { EQAX, "DE" }, { EQAX, "HL" },
{ EQAX, "DE+" }, { EQAX, "HL+" }, { EQAX, "DE-" }, { EQAX, "HL-" },
};
static const struct dasm_s dasm74_7801[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x40 - 0x7F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { ANAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { XRAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { ORAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { ADDNCW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { GTAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { SUBNBW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { LTAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { ANAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { XRAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { ORAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { ADDNCW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { GTAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { SUBNBW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { LTAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0xC0 - 0xFF */
- { ADDW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { ONAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { ADCW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { OFFAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { SUBW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { NEAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { SBBW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { EQAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }
+ { ADDW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { ONAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { ADCW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { OFFAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { SUBW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { NEAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { SBBW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { EQAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }
};
static const struct dasm_s dasmXX_7801[256] = {
/* 0x00 - 0x3F */
- { NOP, 0 }, { HALT, 0 }, { INX, "SP" }, { DCX, "SP" },
- { LXI, "SP,%w" }, { ANIW, "%a,%b" }, { illegal, 0 }, { ANI, "A,%b" },
- { RET, 0 }, { SIO, 0 }, { MOV, "A,B" }, { MOV, "A,C" },
+ { NOP, nullptr }, { HALT, nullptr }, { INX, "SP" }, { DCX, "SP" },
+ { LXI, "SP,%w" }, { ANIW, "%a,%b" }, { illegal, nullptr }, { ANI, "A,%b" },
+ { RET, nullptr }, { SIO, nullptr }, { MOV, "A,B" }, { MOV, "A,C" },
{ MOV, "A,D" }, { MOV, "A,E" }, { MOV, "A,H" }, { MOV, "A,L" },
- { EX, 0 }, { EXX, 0 }, { INX, "BC" }, { DCX, "BC" },
+ { EX, nullptr }, { EXX, nullptr }, { INX, "BC" }, { DCX, "BC" },
{ LXI, "BC,%w" }, { ORIW, "%a,%b" }, { XRI, "A,%b" }, { ORI, "A,%b" },
- { RETS, 0 }, { STM, 0 }, { MOV, "B,A" }, { MOV, "C,A" },
+ { RETS, nullptr }, { STM, nullptr }, { MOV, "B,A" }, { MOV, "C,A" },
{ MOV, "D,A" }, { MOV, "E,A" }, { MOV, "H,A" }, { MOV, "L,A" },
- { INRW, "%a" }, { TABLE, 0 }, { INX, "DE" }, { DCX, "DE" },
+ { INRW, "%a" }, { TABLE, nullptr }, { INX, "DE" }, { DCX, "DE" },
{ LXI, "DE,%w" }, { GTIW, "%a,%b" }, { ADINC, "A,%b" }, { GTI, "A,%b" },
{ LDAW, "%a" }, { LDAX, "BC" }, { LDAX, "DE" }, { LDAX, "HL" },
{ LDAX, "DE+" }, { LDAX, "HL+" }, { LDAX, "DE-" }, { LDAX, "HL-" },
- { DCRW, "%a" }, { BLOCK, 0 }, { INX, "HL" }, { DCX, "HL" },
+ { DCRW, "%a" }, { BLOCK, nullptr }, { INX, "HL" }, { DCX, "HL" },
{ LXI, "HL,%w" }, { LTIW, "%a,%b" }, { SUINB, "A,%b" }, { LTI, "A,%b" },
{ STAW, "%a" }, { STAX, "BC" }, { STAX, "DE" }, { STAX, "HL" },
{ STAX, "DE+" }, { STAX, "HL+" }, { STAX, "DE-" }, { STAX, "HL-" },
/* 0x40 - 0x7F */
- { illegal, 0 }, { INR, "A" }, { INR, "B" }, { INR, "C" },
+ { illegal, nullptr }, { INR, "A" }, { INR, "B" }, { INR, "C" },
{ CALL, "%w" }, { ONIW, "%a,%b" }, { ADI, "A,%b" }, { ONI, "A,%b" },
{ 0, dasm48_7801 }, { MVIX, "BC,%b" }, { MVIX, "DE,%b" }, { MVIX, "HL,%b" },
{ 0, dasm4c_7801 }, { 0, dasm4d_7801 }, { JRE, "%d" }, { JRE, "%d" },
- { illegal, 0 }, { DCR, "A" }, { DCR, "B" }, { DCR, "C" },
+ { illegal, nullptr }, { DCR, "A" }, { DCR, "B" }, { DCR, "C" },
{ JMP, "%w" }, { OFFIW, "%a,%b" }, { ACI, "A,%b" }, { OFFI, "A,%b" },
{ BIT, "0,%a" }, { BIT, "1,%a" }, { BIT," 2,%a" }, { BIT, "3,%a" },
{ BIT, "4,%a" }, { BIT, "5,%a" }, { BIT, "6,%a" }, { BIT, "7,%a" },
- { 0, dasm60_7801 }, { DAA, 0 }, { RETI, 0 }, { CALB, 0 },
+ { 0, dasm60_7801 }, { DAA, nullptr }, { RETI, nullptr }, { CALB, nullptr },
{ 0, dasm64_7801 }, { NEIW, "%a,%b" }, { SUI, "A,%b" }, { NEI, "A,%b" },
{ MVI, "V,%b" }, { MVI, "A,%b" }, { MVI, "B,%b" }, { MVI, "C,%b" },
{ MVI, "D,%b" }, { MVI, "E,%b" }, { MVI, "H,%b" }, { MVI, "L,%b" },
- { 0, dasm70_7801 }, { MVIW, "%a,%b" }, { SOFTI, 0 }, { JB, 0 },
+ { 0, dasm70_7801 }, { MVIW, "%a,%b" }, { SOFTI, nullptr }, { JB, nullptr },
{ 0, dasm74_7801 }, { EQIW, "%a,%b" }, { SBI, "A,%b" }, { EQI, "A,%b" },
{ CALF, "%f" }, { CALF, "%f" }, { CALF, "%f" }, { CALF, "%f" },
{ CALF, "%f" }, { CALF, "%f" }, { CALF, "%f" }, { CALF, "%f" },
@@ -4661,645 +4661,645 @@ static const struct dasm_s dasmXX_7801[256] = {
static const struct dasm_s dasm48_78c05[256] = {
/* 0x00 - 0x3F */
- { SKIT, "F0" }, { SKIT, "FT" }, { SKIT, "F1" }, { illegal, 0 }, /* TODO: PDF doesn't mention SKIT and SK */
- { SKIT, "FS" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SK, "CY" }, { illegal, 0 },
- { SK, "Z" }, { illegal, 0 }, { PUSH, "VA" }, { POP, "VA" },
-
- { SKNIT, "F0" }, { SKNIT, "FT" }, { SKNIT, "F1" }, { illegal, 0 },
- { SKNIT, "FS" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SKN, "CY" }, { illegal, 0 },
- { SKN, "Z" }, { illegal, 0 }, { PUSH, "BC" }, { POP, "BC" },
-
- { EI, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { DI, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { CLC, 0 }, { STC, 0 },
- { illegal, 0 }, { PEX, 0 }, { PUSH, "DE" }, { POP, "DE" },
-
- { RLL, "A" }, { RLR, "A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { RLD, 0 }, { RRD, 0 }, { illegal, 0 }, { illegal, 0 },
- { PER, 0 }, { illegal, 0 }, { PUSH, "HL" }, { POP, "HL" },
+ { SKIT, "F0" }, { SKIT, "FT" }, { SKIT, "F1" }, { illegal, nullptr }, /* TODO: PDF doesn't mention SKIT and SK */
+ { SKIT, "FS" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SK, "CY" }, { illegal, nullptr },
+ { SK, "Z" }, { illegal, nullptr }, { PUSH, "VA" }, { POP, "VA" },
+
+ { SKNIT, "F0" }, { SKNIT, "FT" }, { SKNIT, "F1" }, { illegal, nullptr },
+ { SKNIT, "FS" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SKN, "CY" }, { illegal, nullptr },
+ { SKN, "Z" }, { illegal, nullptr }, { PUSH, "BC" }, { POP, "BC" },
+
+ { EI, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { DI, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { CLC, nullptr }, { STC, nullptr },
+ { illegal, nullptr }, { PEX, nullptr }, { PUSH, "DE" }, { POP, "DE" },
+
+ { RLL, "A" }, { RLR, "A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { RLD, nullptr }, { RRD, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { PER, nullptr }, { illegal, nullptr }, { PUSH, "HL" }, { POP, "HL" },
/* 0x40 - 0x7F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0xC0 - 0xFF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }
};
static const struct dasm_s dasm4c_78c05[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x40 - 0x7F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0xC0 - 0xFF */
{ MOV, "A,PA" }, { MOV, "A,PB" }, { MOV, "A,PC" }, { MOV, "A,MK" },
{ MOV, "A,MB" }, { MOV, "A,MC" }, { MOV, "A,TM0" }, { MOV, "A,TM1" },
- { MOV, "A,S" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, /* TODO: Figure out what regsiter C9 indicates */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }
+ { MOV, "A,S" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, /* TODO: Figure out what regsiter C9 indicates */
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }
};
static const struct dasm_s dasm4d_78c05[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x40 - 0x7F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0xC0 - 0xFF */
{ MOV, "PA,A" }, { MOV, "PB,A" }, { MOV, "PC,A" }, { MOV, "MK,A" },
{ MOV, "MB,A" }, { MOV, "MC,A" }, { MOV, "TM0,A" }, { MOV, "TM1,A" },
- { MOV, "S,A" }, { MOV, "TMM,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }
+ { MOV, "S,A" }, { MOV, "TMM,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }
};
static const struct dasm_s dasm60_78c05[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { ANA, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { XRA, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { ORA, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { ADDNC, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { GTA, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { SUBNB, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { LTA, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { ANA, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { XRA, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { ORA, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { ADDNC, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { GTA, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { SUBNB, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { LTA, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x40 - 0x7F */
- { illegal, 0 }, { ADD, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { ADC, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { SUB, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { NEA, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { SBB, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { EQA, "A,A" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { ADD, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { ADC, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { SUB, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { NEA, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { SBB, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { EQA, "A,A" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { ANA, "A,A" }, { ANA, "A,B" }, { ANA, "A,C" },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { ANA, "A,A" }, { ANA, "A,B" }, { ANA, "A,C" },
{ ANA, "A,D" }, { ANA, "A,E" }, { ANA, "A,H" }, { ANA, "A,L" },
- { illegal, 0 }, { XRA, "A,A" }, { XRA, "A,B" }, { XRA, "A,C" },
+ { illegal, nullptr }, { XRA, "A,A" }, { XRA, "A,B" }, { XRA, "A,C" },
{ XRA, "A,D" }, { XRA, "A,E" }, { XRA, "A,H" }, { XRA, "A,L" },
- { illegal, 0 }, { ORA, "A,A" }, { ORA, "A,B" }, { ORA, "A,C" },
+ { illegal, nullptr }, { ORA, "A,A" }, { ORA, "A,B" }, { ORA, "A,C" },
{ ORA, "A,D" }, { ORA, "A,E" }, { ORA, "A,H" }, { ORA, "A,L" },
- { illegal, 0 }, { ADDNC, "A,A" }, { ADDNC, "A,B" }, { ADDNC, "A,C" },
+ { illegal, nullptr }, { ADDNC, "A,A" }, { ADDNC, "A,B" }, { ADDNC, "A,C" },
{ ADDNC, "A,D" }, { ADDNC, "A,E" }, { ADDNC, "A,H" }, { ADDNC, "A,L" },
- { illegal, 0 }, { GTA, "A,A" }, { GTA, "A,B" }, { GTA, "A,C" },
+ { illegal, nullptr }, { GTA, "A,A" }, { GTA, "A,B" }, { GTA, "A,C" },
{ GTA, "A,D" }, { GTA, "A,E" }, { GTA, "A,H" }, { GTA, "A,L" },
- { illegal, 0 }, { SUBNB, "A,A" }, { SUBNB, "A,B" }, { SUBNB, "A,C" },
+ { illegal, nullptr }, { SUBNB, "A,A" }, { SUBNB, "A,B" }, { SUBNB, "A,C" },
{ SUBNB, "A,D" }, { SUBNB, "A,E" }, { SUBNB, "A,H" }, { SUBNB, "A,L" },
- { illegal, 0 }, { LTA, "A,A" }, { LTA, "A,B" }, { LTA, "A,C" },
+ { illegal, nullptr }, { LTA, "A,A" }, { LTA, "A,B" }, { LTA, "A,C" },
{ LTA, "A,D" }, { LTA, "A,E" }, { LTA, "A,H" }, { LTA, "A,L" },
/* 0xC0 - 0xFF */
- { illegal, 0 }, { ADD, "A,A" }, { ADD, "A,B" }, { ADD, "A,C" },
+ { illegal, nullptr }, { ADD, "A,A" }, { ADD, "A,B" }, { ADD, "A,C" },
{ ADD, "A,D" }, { ADD, "A,E" }, { ADD, "A,H" }, { ADD, "A,L" },
- { illegal, 0 }, { ONA, "A,A" }, { ONA, "A,B" }, { ONA, "A,C" },
+ { illegal, nullptr }, { ONA, "A,A" }, { ONA, "A,B" }, { ONA, "A,C" },
{ ONA, "A,D" }, { ONA, "A,E" }, { ONA, "A,H" }, { ONA, "A,L" },
- { illegal, 0 }, { ADC, "A,A" }, { ADC, "A,B" }, { ADC, "A,C" },
+ { illegal, nullptr }, { ADC, "A,A" }, { ADC, "A,B" }, { ADC, "A,C" },
{ ADC, "A,D" }, { ADC, "A,E" }, { ADC, "A,H" }, { ADC, "A,L" },
- { illegal, 0 }, { OFFA, "A,A" }, { OFFA, "A,B" }, { OFFA, "A,C" },
+ { illegal, nullptr }, { OFFA, "A,A" }, { OFFA, "A,B" }, { OFFA, "A,C" },
{ OFFA, "A,D" }, { OFFA, "A,E" }, { OFFA, "A,H" }, { OFFA, "A,L" },
- { illegal, 0 }, { SUB, "A,A" }, { SUB, "A,B" }, { SUB, "A,C" },
+ { illegal, nullptr }, { SUB, "A,A" }, { SUB, "A,B" }, { SUB, "A,C" },
{ SUB, "A,D" }, { SUB, "A,E" }, { SUB, "A,H" }, { SUB, "A,L" },
- { illegal, 0 }, { NEA, "A,A" }, { NEA, "A,B" }, { NEA, "A,C" },
+ { illegal, nullptr }, { NEA, "A,A" }, { NEA, "A,B" }, { NEA, "A,C" },
{ NEA, "A,D" }, { NEA, "A,E" }, { NEA, "A,H" }, { NEA, "A,L" },
- { illegal, 0 }, { SBB, "A,A" }, { SBB, "A,B" }, { SBB, "A,C" },
+ { illegal, nullptr }, { SBB, "A,A" }, { SBB, "A,B" }, { SBB, "A,C" },
{ SBB, "A,D" }, { SBB, "A,E" }, { SBB, "A,H" }, { SBB, "A,L" },
- { illegal, 0 }, { EQA, "A,A" }, { EQA, "A,B" }, { EQA, "A,C" },
+ { illegal, nullptr }, { EQA, "A,A" }, { EQA, "A,B" }, { EQA, "A,C" },
{ EQA, "A,D" }, { EQA, "A,E" }, { EQA, "A,H" }, { EQA, "A,L" }
};
static const struct dasm_s dasm64_78c05[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { ANI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { XRI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { ORI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { ADINC, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { GTI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { SUINB, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { LTI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { ANI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { XRI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { ORI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { ADINC, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { GTI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { SUINB, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { LTI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x40 - 0x7F */
- { illegal, 0 }, { ADI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { ONI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { ACI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { OFFI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { SUI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { NEI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { SBI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { EQI, "A,%b" }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { ADI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { ONI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { ACI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { OFFI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { SUI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { NEI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { SBI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { EQI, "A,%b" }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ANI, "PA,%b" }, { ANI, "PB,%b" }, { ANI, "PC,%b" }, { ANI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ XRI, "PA,%b" }, { XRI, "PB,%b" }, { XRI, "PC,%b" }, { XRI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ORI, "PA,%b" }, { ORI, "PB,%b" }, { ORI, "PC,%b" }, { ORI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ADINC, "PA,%b" }, { ADINC, "PB,%b" }, { ADINC, "PC,%b" }, { ADINC, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ GTI, "PA,%b" }, { GTI, "PB,%b" }, { GTI, "PC,%b" }, { GTI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ SUINB, "PA,%b" }, { SUINB, "PB,%b" }, { SUINB, "PC,%b" }, { SUINB, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ LTI, "PA,%b" }, { LTI, "PB,%b" }, { LTI, "PC,%b" }, { LTI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0xC0 - 0xFF */
{ ADI, "PA,%b" }, { ADI, "PB,%b" }, { ADI, "PC,%b" }, { ADI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ONI, "PA,%b" }, { ONI, "PB,%b" }, { ONI, "PC,%b" }, { ONI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ ACI, "PA,%b" }, { ACI, "PB,%b" }, { ACI, "PC,%b" }, { ACI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ SUI, "PA,%b" }, { SUI, "PB,%b" }, { SUI, "PC,%b" }, { SUI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ NEI, "PA,%b" }, { NEI, "PB,%b" }, { NEI, "PC,%b" }, { NEI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ SBI, "PA,%b" }, { SBI, "PB,%b" }, { SBI, "PC,%b" }, { SBI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ SBI, "PA,%b" }, { SBI, "PB,%b" }, { SBI, "PC,%b" }, { SBI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ EQI, "PA,%b" }, { EQI, "PB,%b" }, { EQI, "PC,%b" }, { EQI, "MK,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 }
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }
};
static const struct dasm_s dasm70_78c05[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SSPD, "%w" }, { LSPD, "%w" },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SBCD, "%w" }, { LBCD, "%w" },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SDED, "%w" }, { LDED, "%w" },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { SHLD, "%w" }, { LHLD, "%w" },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SSPD, "%w" }, { LSPD, "%w" },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SBCD, "%w" }, { LBCD, "%w" },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SDED, "%w" }, { LDED, "%w" },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { SHLD, "%w" }, { LHLD, "%w" },
/* 0x40 - 0x7F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { MOV, "A,%w" }, { MOV, "B,%w" }, { MOV, "C,%w" },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { MOV, "A,%w" }, { MOV, "B,%w" }, { MOV, "C,%w" },
{ MOV, "D,%w" }, { MOV, "E,%w" }, { MOV, "H,%w" }, { MOV, "L,%w" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { MOV, "%w,A" }, { MOV, "%w,B" }, { MOV, "%w,C" },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { MOV, "%w,A" }, { MOV, "%w,B" }, { MOV, "%w,C" },
{ MOV, "%w,D" }, { MOV, "%w,E" }, { MOV, "%w,H" }, { MOV, "%w,L" },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { ANAX, "BC" }, { ANAX, "DE" }, { ANAX, "HL" },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { ANAX, "BC" }, { ANAX, "DE" }, { ANAX, "HL" },
{ ANAX, "DE+" }, { ANAX, "HL+" }, { ANAX, "DE-" }, { ANAX, "HL-" },
- { illegal, 0 }, { XRAX, "BC" }, { XRAX, "DE" }, { XRAX, "HL" },
+ { illegal, nullptr }, { XRAX, "BC" }, { XRAX, "DE" }, { XRAX, "HL" },
{ XRAX, "DE+" }, { XRAX, "HL+" }, { XRAX, "DE-" }, { XRAX, "HL-" },
- { illegal, 0 }, { ORAX, "BC" }, { ORAX, "DE" }, { ORAX, "HL" },
+ { illegal, nullptr }, { ORAX, "BC" }, { ORAX, "DE" }, { ORAX, "HL" },
{ ORAX, "DE+" }, { ORAX, "HL+" }, { ORAX, "DE-" }, { ORAX, "HL-" },
- { illegal, 0 }, { ADDNCX, "BC" }, { ADDNCX, "DE" }, { ADDNCX, "HL" },
+ { illegal, nullptr }, { ADDNCX, "BC" }, { ADDNCX, "DE" }, { ADDNCX, "HL" },
{ ADDNCX, "DE+" }, { ADDNCX, "HL+" }, { ADDNCX, "DE-" }, { ADDNCX, "HL-" },
- { illegal, 0 }, { GTAX, "BC" }, { GTAX, "DE" }, { GTAX, "HL" },
+ { illegal, nullptr }, { GTAX, "BC" }, { GTAX, "DE" }, { GTAX, "HL" },
{ GTAX, "DE+" }, { GTAX, "HL+" }, { GTAX, "DE-" }, { GTAX, "HL-" },
- { illegal, 0 }, { SUBNBX, "BC" }, { SUBNBX, "DE" }, { SUBNBX, "HL" },
+ { illegal, nullptr }, { SUBNBX, "BC" }, { SUBNBX, "DE" }, { SUBNBX, "HL" },
{ SUBNBX, "DE+" }, { SUBNBX, "HL+" }, { SUBNBX, "DE-" }, { SUBNBX, "HL-" },
- { illegal, 0 }, { LTAX, "BC" }, { LTAX, "DE" }, { LTAX, "HL" },
+ { illegal, nullptr }, { LTAX, "BC" }, { LTAX, "DE" }, { LTAX, "HL" },
{ LTAX, "DE+" }, { LTAX, "HL+" }, { LTAX, "DE-" }, { LTAX, "HL-" },
/* 0xC0 - 0xFF */
- { illegal, 0 }, { ADDX, "BC" }, { ADDX, "DE" }, { ADDX, "HL" },
+ { illegal, nullptr }, { ADDX, "BC" }, { ADDX, "DE" }, { ADDX, "HL" },
{ ADDX, "DE+" }, { ADDX, "HL+" }, { ADDX, "DE-" }, { ADDX, "HL-" },
- { illegal, 0 }, { ONAX, "BC" }, { ONAX, "DE" }, { ONAX, "HL" },
+ { illegal, nullptr }, { ONAX, "BC" }, { ONAX, "DE" }, { ONAX, "HL" },
{ ONAX, "DE+" }, { ONAX, "HL+" }, { ONAX, "DE-" }, { ONAX, "HL-" },
- { illegal, 0 }, { ADCX, "BC" }, { ADCX, "DE" }, { ADCX, "HL" },
+ { illegal, nullptr }, { ADCX, "BC" }, { ADCX, "DE" }, { ADCX, "HL" },
{ ADCX, "DE+" }, { ADCX, "HL+" }, { ADCX, "DE-" }, { ADCX, "HL-" },
- { illegal, 0 }, { OFFAX, "BC" }, { OFFAX, "DE" }, { OFFAX, "HL" },
+ { illegal, nullptr }, { OFFAX, "BC" }, { OFFAX, "DE" }, { OFFAX, "HL" },
{ OFFAX, "DE+" }, { OFFAX, "HL+" }, { OFFAX, "DE-" }, { OFFAX, "HL-" },
- { illegal, 0 }, { SUBX, "BC" }, { SUBX, "DE" }, { SUBX, "HL" },
+ { illegal, nullptr }, { SUBX, "BC" }, { SUBX, "DE" }, { SUBX, "HL" },
{ SUBX, "DE+" }, { SUBX, "HL+" }, { SUBX, "DE-" }, { SUBX, "HL-" },
- { illegal, 0 }, { NEAX, "BC" }, { NEAX, "DE" }, { NEAX, "HL" },
+ { illegal, nullptr }, { NEAX, "BC" }, { NEAX, "DE" }, { NEAX, "HL" },
{ NEAX, "DE+" }, { NEAX, "HL+" }, { NEAX, "DE-" }, { NEAX, "HL-" },
- { illegal, 0 }, { SBBX, "BC" }, { SBBX, "DE" }, { SBBX, "HL" },
+ { illegal, nullptr }, { SBBX, "BC" }, { SBBX, "DE" }, { SBBX, "HL" },
{ SBBX, "DE+" }, { SBBX, "HL+" }, { SBBX, "DE-" }, { SBBX, "HL-" },
- { illegal, 0 }, { EQAX, "BC" }, { EQAX, "DE" }, { EQAX, "HL" },
+ { illegal, nullptr }, { EQAX, "BC" }, { EQAX, "DE" }, { EQAX, "HL" },
{ EQAX, "DE+" }, { EQAX, "HL+" }, { EQAX, "DE-" }, { EQAX, "HL-" },
};
static const struct dasm_s dasm74_78c05[256] = {
/* 0x00 - 0x3F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x40 - 0x7F */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0x80 - 0xBF */
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { ANAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { XRAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { ORAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { ADDNCW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { GTAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { SUBNBW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { LTAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { ANAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { XRAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { ORAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { ADDNCW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { GTAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { SUBNBW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { LTAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
/* 0xC0 - 0xFF */
- { ADDW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { ONAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { ADCW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { OFFAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { SUBW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { NEAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
-
- { SBBW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { EQAW, "%a" }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { ADDW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { ONAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { ADCW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { OFFAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { SUBW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { NEAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+
+ { SBBW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { EQAW, "%a" }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
};
static const struct dasm_s dasmXX_78c05[256] = {
/* 0x00 - 0x3F */
- { NOP, 0 }, { HALT, 0 }, { INX, "SP" }, { DCX, "SP" },
- { LXI, "SP,%w" }, { ANIW, "%a,%b" }, { illegal, 0 }, { ANI, "A,%b" },
- { RET, 0 }, { SIO, 0 }, { MOV, "A,B" }, { MOV, "A,C" },
+ { NOP, nullptr }, { HALT, nullptr }, { INX, "SP" }, { DCX, "SP" },
+ { LXI, "SP,%w" }, { ANIW, "%a,%b" }, { illegal, nullptr }, { ANI, "A,%b" },
+ { RET, nullptr }, { SIO, nullptr }, { MOV, "A,B" }, { MOV, "A,C" },
{ MOV, "A,D" }, { MOV, "A,E" }, { MOV, "A,H" }, { MOV, "A,L" },
- { illegal, 0 }, { illegal, 0 }, { INX, "BC" }, { DCX, "BC" },
+ { illegal, nullptr }, { illegal, nullptr }, { INX, "BC" }, { DCX, "BC" },
{ LXI, "BC,%w" }, { ORIW, "%a,%b" }, { XRI, "A,%b" }, { ORI, "A,%b" },
- { RETS, 0 }, { STM, 0 }, { MOV, "B,A" }, { MOV, "C,A" },
+ { RETS, nullptr }, { STM, nullptr }, { MOV, "B,A" }, { MOV, "C,A" },
{ MOV, "D,A" }, { MOV, "E,A" }, { MOV, "H,A" }, { MOV, "L,A" },
- { INRW, "%a" }, { illegal, 0 }, { INX, "DE" }, { DCX, "DE" },
+ { INRW, "%a" }, { illegal, nullptr }, { INX, "DE" }, { DCX, "DE" },
{ LXI, "DE,%w" }, { GTIW, "%a,%b" }, { ADINC, "A,%b" }, { GTI, "A,%b" },
{ LDAW, "%a" }, { LDAX, "BC" }, { LDAX, "DE" }, { LDAX, "HL" },
{ LDAX, "DE+" }, { LDAX, "HL+" }, { LDAX, "DE-" }, { LDAX, "HL-" },
- { DCRW, "%a" }, { illegal, 0 }, { INX, "HL" }, { DCX, "HL" },
+ { DCRW, "%a" }, { illegal, nullptr }, { INX, "HL" }, { DCX, "HL" },
{ LXI, "HL,%w" }, { LTIW, "%a,%b" }, { SUINB, "A,%b" }, { LTI, "A,%b" },
{ STAW, "%a" }, { STAX, "BC" }, { STAX, "DE" }, { STAX, "HL" },
{ STAX, "DE+" }, { STAX, "HL+" }, { STAX, "DE-" }, { STAX, "HL-" },
/* 0x40 - 0x7F */
- { illegal, 0 }, { INR, "A" }, { INR, "B" }, { INR, "C" },
+ { illegal, nullptr }, { INR, "A" }, { INR, "B" }, { INR, "C" },
{ CALL, "%w" }, { ONIW, "%a,%b" }, { ADI, "A,%b" }, { ONI, "A,%b" },
- { 0, dasm48_78c05 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { 0, dasm48_78c05 }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
{ 0, dasm4c_78c05 }, { 0, dasm4d_78c05 }, { JRE, "%d" }, { JRE, "%d" },
- { illegal, 0 }, { DCR, "A" }, { DCR, "B" }, { DCR, "C" },
+ { illegal, nullptr }, { DCR, "A" }, { DCR, "B" }, { DCR, "C" },
{ JMP, "%w" }, { OFFIW, "%a,%b" }, { ACI, "A,%b" }, { OFFI, "A,%b" },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
- { illegal, 0 }, { illegal, 0 }, { illegal, 0 }, { illegal, 0 },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
+ { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr }, { illegal, nullptr },
- { 0, dasm60_78c05 }, { DAA, 0 }, { RETI, 0 }, { CALB, 0 },
+ { 0, dasm60_78c05 }, { DAA, nullptr }, { RETI, nullptr }, { CALB, nullptr },
{ 0, dasm64_78c05 }, { NEIW, "%a,%b" }, { SUI, "A,%b" }, { NEI, "A,%b" },
- { illegal, 0 }, { MVI, "A,%b" }, { MVI, "B,%b" }, { MVI, "C,%b" },
+ { illegal, nullptr }, { MVI, "A,%b" }, { MVI, "B,%b" }, { MVI, "C,%b" },
{ MVI, "D,%b" }, { MVI, "E,%b" }, { MVI, "H,%b" }, { MVI, "L,%b" },
- { 0, dasm70_78c05 }, { MVIW, "%a,%b" }, { SOFTI, 0 }, { JB, 0 },
+ { 0, dasm70_78c05 }, { MVIW, "%a,%b" }, { SOFTI, nullptr }, { JB, nullptr },
{ 0, dasm74_78c05 }, { EQIW, "%a,%b" }, { SBI, "A,%b" }, { EQI, "A,%b" },
{ CALF, "%f" }, { CALF, "%f" }, { CALF, "%f" }, { CALF, "%f" },
{ CALF, "%f" }, { CALF, "%f" }, { CALF, "%f" }, { CALF, "%f" },
diff --git a/src/devices/cpu/v30mz/v30mz.h b/src/devices/cpu/v30mz/v30mz.h
index 35f6ca7dbe8..94e19801192 100644
--- a/src/devices/cpu/v30mz/v30mz.h
+++ b/src/devices/cpu/v30mz/v30mz.h
@@ -41,7 +41,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/v60/v60.h b/src/devices/cpu/v60/v60.h
index 28cba0b15c9..80aca421fb8 100644
--- a/src/devices/cpu/v60/v60.h
+++ b/src/devices/cpu/v60/v60.h
@@ -102,7 +102,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : NULL ); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry);
diff --git a/src/devices/cpu/v810/v810.h b/src/devices/cpu/v810/v810.h
index c5fcf163147..ebccfccc23f 100644
--- a/src/devices/cpu/v810/v810.h
+++ b/src/devices/cpu/v810/v810.h
@@ -98,7 +98,7 @@ protected:
virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : NULL); }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { 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);
diff --git a/src/devices/cpu/vtlb.cpp b/src/devices/cpu/vtlb.cpp
index f5a488100f7..5dd5711366c 100644
--- a/src/devices/cpu/vtlb.cpp
+++ b/src/devices/cpu/vtlb.cpp
@@ -64,7 +64,7 @@ vtlb_state *vtlb_alloc(device_t *cpu, address_spacenum space, int fixed_entries,
vtlb->dynamic = dynamic_entries;
vtlb->fixed = fixed_entries;
const address_space_config *spaceconfig = device_get_space_config(*cpu, space);
- assert(spaceconfig != NULL);
+ assert(spaceconfig != nullptr);
vtlb->pageshift = spaceconfig->m_page_shift;
vtlb->addrwidth = spaceconfig->m_logaddr_width;
diff --git a/src/devices/cpu/x86log.cpp b/src/devices/cpu/x86log.cpp
index 4c311310d96..d709af981f3 100644
--- a/src/devices/cpu/x86log.cpp
+++ b/src/devices/cpu/x86log.cpp
@@ -103,7 +103,7 @@ x86log_context *x86log_create_context(const char *filename)
void x86log_free_context(x86log_context *log)
{
/* close any open files */
- if (log->file != NULL)
+ if (log->file != nullptr)
fclose(log->file);
/* free the structure */
@@ -188,7 +188,7 @@ void x86log_disasm_code_range(x86log_context *log, const char *label, x86code *s
x86code *cur = start;
/* print the optional label */
- if (label != NULL)
+ if (label != nullptr)
x86log_printf(log, "\n%s\n", label);
/* loop from the start until the cache top */
@@ -268,9 +268,9 @@ void x86log_printf(x86log_context *log, const char *format, ...)
va_list va;
/* open the file, creating it if necessary */
- if (log->file == NULL)
+ if (log->file == nullptr)
log->file = fopen(log->filename.c_str(), "w");
- if (log->file == NULL)
+ if (log->file == nullptr)
return;
/* do the printf */
diff --git a/src/devices/cpu/z180/z180.cpp b/src/devices/cpu/z180/z180.cpp
index 134e67dfb72..5a76f81ae76 100644
--- a/src/devices/cpu/z180/z180.cpp
+++ b/src/devices/cpu/z180/z180.cpp
@@ -775,8 +775,8 @@ const address_space_config *z180_device::memory_space_config(address_spacenum sp
{
case AS_PROGRAM: return &m_program_config;
case AS_IO: return &m_io_config;
- case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_decrypted_opcodes_config : NULL;
- default: return NULL;
+ case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_decrypted_opcodes_config : nullptr;
+ default: return nullptr;
}
}
@@ -1888,7 +1888,7 @@ void z180_device::device_start()
int oldval, newval, val;
UINT8 *padd, *padc, *psub, *psbc;
- if (static_config() != NULL)
+ if (static_config() != nullptr)
{
m_daisy.init(this, (const z80_daisy_config *)static_config());
}
diff --git a/src/devices/cpu/z180/z180dasm.cpp b/src/devices/cpu/z180/z180dasm.cpp
index 5c83ed212b2..4d89d6ac673 100644
--- a/src/devices/cpu/z180/z180dasm.cpp
+++ b/src/devices/cpu/z180/z180dasm.cpp
@@ -194,36 +194,36 @@ static const z80dasm mnemonic_ed[256]= {
{zIN0,"a,(B)"}, {zOUT0,"(B),a"},{zDB,"?"}, {zDB,"?"},
{zTST,"a"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zIN,"b,(c)"}, {zOUT,"(c),b"}, {zSBC,"hl,bc"}, {zLD,"(W),bc"},
- {zNEG,0}, {zRETN,0}, {zIM,"0"}, {zLD,"i,a"},
+ {zNEG,nullptr}, {zRETN,nullptr}, {zIM,"0"}, {zLD,"i,a"},
{zIN,"c,(c)"}, {zOUT,"(c),c"}, {zADC,"hl,bc"}, {zLD,"bc,(W)"},
- {zMLT,"bc"}, {zRETI,0}, {zIM,"0"}, {zLD,"r,a"},
+ {zMLT,"bc"}, {zRETI,nullptr}, {zIM,"0"}, {zLD,"r,a"},
{zIN,"d,(c)"}, {zOUT,"(c),d"}, {zSBC,"hl,de"}, {zLD,"(W),de"},
- {zNEG,"*"}, {zRETN,0}, {zIM,"1"}, {zLD,"a,i"},
+ {zNEG,"*"}, {zRETN,nullptr}, {zIM,"1"}, {zLD,"a,i"},
{zIN,"e,(c)"}, {zOUT,"(c),e"}, {zADC,"hl,de"}, {zLD,"de,(W)"},
- {zMLT,"de"}, {zRETI,0}, {zIM,"2"}, {zLD,"a,r"},
+ {zMLT,"de"}, {zRETI,nullptr}, {zIM,"2"}, {zLD,"a,r"},
{zIN,"h,(c)"}, {zOUT,"(c),h"}, {zSBC,"hl,hl"}, {zLD,"(W),hl"},
- {zTST,"B"}, {zRETN,0}, {zIM,"0"}, {zRRD,"(hl)"},
+ {zTST,"B"}, {zRETN,nullptr}, {zIM,"0"}, {zRRD,"(hl)"},
{zIN,"l,(c)"}, {zOUT,"(c),l"}, {zADC,"hl,hl"}, {zLD,"hl,(W)"},
- {zMLT,"hl"}, {zRETI,0}, {zIM,"0"}, {zRLD,"(hl)"},
+ {zMLT,"hl"}, {zRETI,nullptr}, {zIM,"0"}, {zRLD,"(hl)"},
{zIN,"0,(c)"}, {zOUT,"(c),0"}, {zSBC,"hl,sp"}, {zLD,"(W),sp"},
- {zTSTIO,"B"}, {zRETN,0}, {zSLP,0}, {zDB,"?"},
+ {zTSTIO,"B"}, {zRETN,nullptr}, {zSLP,nullptr}, {zDB,"?"},
{zIN,"a,(c)"}, {zOUT,"(c),a"}, {zADC,"hl,sp"}, {zLD,"sp,(W)"},
- {zMLT,"sp"}, {zRETI,0}, {zIM,"2"}, {zDB,"?"},
- {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zOTIM,0},
+ {zMLT,"sp"}, {zRETI,nullptr}, {zIM,"2"}, {zDB,"?"},
+ {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zOTIM,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zOTDM,0},
+ {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zOTDM,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zOTIMR,0},
+ {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zOTIMR,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zOTDMR,0},
+ {zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zOTDMR,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zLDI,0}, {zCPI,0}, {zINI,0}, {zOUTI,0},
+ {zLDI,nullptr}, {zCPI,nullptr}, {zINI,nullptr}, {zOUTI,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zLDD,0}, {zCPD,0}, {zIND,0}, {zOUTD,0},
+ {zLDD,nullptr}, {zCPD,nullptr}, {zIND,nullptr}, {zOUTD,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zLDIR,0}, {zCPIR,0}, {zINIR,0}, {zOTIR,0},
+ {zLDIR,nullptr}, {zCPIR,nullptr}, {zINIR,nullptr}, {zOTIR,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zLDDR,0}, {zCPDR,0}, {zINDR,0}, {zOTDR,0},
+ {zLDDR,nullptr}, {zCPDR,nullptr}, {zINDR,nullptr}, {zOTDR,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
@@ -311,22 +311,22 @@ static const z80dasm mnemonic_xx[256]= {
};
static const z80dasm mnemonic_main[256]= {
- {zNOP,0}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"},
- {zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,0},
+ {zNOP,nullptr}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"},
+ {zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,nullptr},
{zEX,"af,af'"}, {zADD,"hl,bc"}, {zLD,"a,(bc)"}, {zDEC,"bc"},
- {zINC,"c"}, {zDEC,"c"}, {zLD,"c,B"}, {zRRCA,0},
+ {zINC,"c"}, {zDEC,"c"}, {zLD,"c,B"}, {zRRCA,nullptr},
{zDJNZ,"O"}, {zLD,"de,N"}, {zLD,"(de),a"}, {zINC,"de"},
- {zINC,"d"}, {zDEC,"d"}, {zLD,"d,B"}, {zRLA,0},
+ {zINC,"d"}, {zDEC,"d"}, {zLD,"d,B"}, {zRLA,nullptr},
{zJR,"O"}, {zADD,"hl,de"}, {zLD,"a,(de)"}, {zDEC,"de"},
- {zINC,"e"}, {zDEC,"e"}, {zLD,"e,B"}, {zRRA,0},
+ {zINC,"e"}, {zDEC,"e"}, {zLD,"e,B"}, {zRRA,nullptr},
{zJR,"nz,O"}, {zLD,"hl,N"}, {zLD,"(W),hl"}, {zINC,"hl"},
- {zINC,"h"}, {zDEC,"h"}, {zLD,"h,B"}, {zDAA,0},
+ {zINC,"h"}, {zDEC,"h"}, {zLD,"h,B"}, {zDAA,nullptr},
{zJR,"z,O"}, {zADD,"hl,hl"}, {zLD,"hl,(W)"}, {zDEC,"hl"},
- {zINC,"l"}, {zDEC,"l"}, {zLD,"l,B"}, {zCPL,0},
+ {zINC,"l"}, {zDEC,"l"}, {zLD,"l,B"}, {zCPL,nullptr},
{zJR,"nc,O"}, {zLD,"sp,N"}, {zLD,"(W),a"}, {zINC,"sp"},
- {zINC,"(hl)"}, {zDEC,"(hl)"}, {zLD,"(hl),B"}, {zSCF,0},
+ {zINC,"(hl)"}, {zDEC,"(hl)"}, {zLD,"(hl),B"}, {zSCF,nullptr},
{zJR,"c,O"}, {zADD,"hl,sp"}, {zLD,"a,(W)"}, {zDEC,"sp"},
- {zINC,"a"}, {zDEC,"a"}, {zLD,"a,B"}, {zCCF,0},
+ {zINC,"a"}, {zDEC,"a"}, {zLD,"a,B"}, {zCCF,nullptr},
{zLD,"b,b"}, {zLD,"b,c"}, {zLD,"b,d"}, {zLD,"b,e"},
{zLD,"b,h"}, {zLD,"b,l"}, {zLD,"b,(hl)"}, {zLD,"b,a"},
{zLD,"c,b"}, {zLD,"c,c"}, {zLD,"c,d"}, {zLD,"c,e"},
@@ -340,7 +340,7 @@ static const z80dasm mnemonic_main[256]= {
{zLD,"l,b"}, {zLD,"l,c"}, {zLD,"l,d"}, {zLD,"l,e"},
{zLD,"l,h"}, {zLD,"l,l"}, {zLD,"l,(hl)"}, {zLD,"l,a"},
{zLD,"(hl),b"}, {zLD,"(hl),c"}, {zLD,"(hl),d"}, {zLD,"(hl),e"},
- {zLD,"(hl),h"}, {zLD,"(hl),l"}, {zHLT,0}, {zLD,"(hl),a"},
+ {zLD,"(hl),h"}, {zLD,"(hl),l"}, {zHLT,nullptr}, {zLD,"(hl),a"},
{zLD,"a,b"}, {zLD,"a,c"}, {zLD,"a,d"}, {zLD,"a,e"},
{zLD,"a,h"}, {zLD,"a,l"}, {zLD,"a,(hl)"}, {zLD,"a,a"},
{zADD,"a,b"}, {zADD,"a,c"}, {zADD,"a,d"}, {zADD,"a,e"},
@@ -361,19 +361,19 @@ static const z80dasm mnemonic_main[256]= {
{zCP,"h"}, {zCP,"l"}, {zCP,"(hl)"}, {zCP,"a"},
{zRET,"nz"}, {zPOP,"bc"}, {zJP,"nz,A"}, {zJP,"A"},
{zCALL,"nz,A"}, {zPUSH,"bc"}, {zADD,"a,B"}, {zRST,"V"},
- {zRET,"z"}, {zRET,0}, {zJP,"z,A"}, {zDB,"cb"},
+ {zRET,"z"}, {zRET,nullptr}, {zJP,"z,A"}, {zDB,"cb"},
{zCALL,"z,A"}, {zCALL,"A"}, {zADC,"a,B"}, {zRST,"V"},
{zRET,"nc"}, {zPOP,"de"}, {zJP,"nc,A"}, {zOUT,"(P),a"},
{zCALL,"nc,A"}, {zPUSH,"de"}, {zSUB,"B"}, {zRST,"V"},
- {zRET,"c"}, {zEXX,0}, {zJP,"c,A"}, {zIN,"a,(P)"},
+ {zRET,"c"}, {zEXX,nullptr}, {zJP,"c,A"}, {zIN,"a,(P)"},
{zCALL,"c,A"}, {zDB,"dd"}, {zSBC,"a,B"}, {zRST,"V"},
{zRET,"po"}, {zPOP,"hl"}, {zJP,"po,A"}, {zEX,"(sp),hl"},
{zCALL,"po,A"}, {zPUSH,"hl"}, {zAND,"B"}, {zRST,"V"},
{zRET,"pe"}, {zJP,"(hl)"}, {zJP,"pe,A"}, {zEX,"de,hl"},
{zCALL,"pe,A"}, {zDB,"ed"}, {zXOR,"B"}, {zRST,"V"},
- {zRET,"p"}, {zPOP,"af"}, {zJP,"p,A"}, {zDI,0},
+ {zRET,"p"}, {zPOP,"af"}, {zJP,"p,A"}, {zDI,nullptr},
{zCALL,"p,A"}, {zPUSH,"af"}, {zOR,"B"}, {zRST,"V"},
- {zRET,"m"}, {zLD,"sp,hl"}, {zJP,"m,A"}, {zEI,0},
+ {zRET,"m"}, {zLD,"sp,hl"}, {zJP,"m,A"}, {zEI,nullptr},
{zCALL,"m,A"}, {zDB,"fd"}, {zCP,"B"}, {zRST,"V"}
};
diff --git a/src/devices/cpu/z8/z8.cpp b/src/devices/cpu/z8/z8.cpp
index 7db38eaf500..3d8c6746c5b 100644
--- a/src/devices/cpu/z8/z8.cpp
+++ b/src/devices/cpu/z8/z8.cpp
@@ -693,17 +693,17 @@ void z8_device::device_start()
m_t1_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(z8_device::t1_tick), this));
/* Clear state */
- for ( int i = 0; i < 6; i++ )
- m_irq[i] = 0;
- for ( int i = 0; i < 256; i++ )
- m_r[i] = 0;
+ for (auto & elem : m_irq)
+ elem = 0;
+ for (auto & elem : m_r)
+ elem = 0;
for ( int i = 0; i < 4; i++ )
{
m_input[i] = 0;
m_output[i] = 0;
}
- for ( int i = 0; i < 16; i++ )
- m_fake_r[i] = 0;
+ for (auto & elem : m_fake_r)
+ elem = 0;
m_fake_sp = 0;
m_t0 = 0;
m_t1 = 0;
diff --git a/src/devices/cpu/z8/z8.h b/src/devices/cpu/z8/z8.h
index 3ab30695bd6..68c1b9534c7 100644
--- a/src/devices/cpu/z8/z8.h
+++ b/src/devices/cpu/z8/z8.h
@@ -51,9 +51,9 @@ protected:
case AS_PROGRAM: return &m_program_config;
case AS_DATA: return &m_data_config;
case AS_IO: return &m_io_config;
- default: return NULL;
+ default: return nullptr;
}
- return NULL;
+ return nullptr;
}
// device_state_interface overrides
diff --git a/src/devices/cpu/z80/tmpz84c015.cpp b/src/devices/cpu/z80/tmpz84c015.cpp
index 1677358e059..d61ae4ef4c5 100644
--- a/src/devices/cpu/z80/tmpz84c015.cpp
+++ b/src/devices/cpu/z80/tmpz84c015.cpp
@@ -161,7 +161,7 @@ WRITE8_MEMBER(tmpz84c015_device::irq_priority_w)
{ dev[prio[data][0]] },
{ dev[prio[data][1]] },
{ dev[prio[data][2]] },
- { NULL }
+ { nullptr }
};
m_daisy.init(this, daisy_chain);
diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp
index ee58f870578..37ae5938426 100644
--- a/src/devices/cpu/z80/z80.cpp
+++ b/src/devices/cpu/z80/z80.cpp
@@ -3387,7 +3387,7 @@ void z80_device::device_start()
m_decrypted_opcodes_direct = &m_decrypted_opcodes->direct();
m_io = &space(AS_IO);
- if (static_config() != NULL)
+ if (static_config() != nullptr)
m_daisy.init(this, (const z80_daisy_config *)static_config());
m_irq_callback = device_irq_acknowledge_delegate(FUNC(z80_device::standard_irq_callback_member), this);
@@ -3702,12 +3702,12 @@ offs_t z80_device::disasm_disassemble( char *buffer, offs_t pc, const UINT8 *opr
void z80_device::z80_set_cycle_tables(const UINT8 *op, const UINT8 *cb, const UINT8 *ed, const UINT8 *xy, const UINT8 *xycb, const UINT8 *ex)
{
- m_cc_op = (op != NULL) ? op : cc_op;
- m_cc_cb = (cb != NULL) ? cb : cc_cb;
- m_cc_ed = (ed != NULL) ? ed : cc_ed;
- m_cc_xy = (xy != NULL) ? xy : cc_xy;
- m_cc_xycb = (xycb != NULL) ? xycb : cc_xycb;
- m_cc_ex = (ex != NULL) ? ex : cc_ex;
+ m_cc_op = (op != nullptr) ? op : cc_op;
+ m_cc_cb = (cb != nullptr) ? cb : cc_cb;
+ m_cc_ed = (ed != nullptr) ? ed : cc_ed;
+ m_cc_xy = (xy != nullptr) ? xy : cc_xy;
+ m_cc_xycb = (xycb != nullptr) ? xycb : cc_xycb;
+ m_cc_ex = (ex != nullptr) ? ex : cc_ex;
}
@@ -3737,8 +3737,8 @@ const address_space_config *z80_device::memory_space_config(address_spacenum spa
{
case AS_PROGRAM: return &m_program_config;
case AS_IO: return &m_io_config;
- case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_decrypted_opcodes_config : NULL;
- default: return NULL;
+ case AS_DECRYPTED_OPCODES: return has_configured_map(AS_DECRYPTED_OPCODES) ? &m_decrypted_opcodes_config : nullptr;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h
index 40cc67222dd..679e7444435 100644
--- a/src/devices/cpu/z80/z80.h
+++ b/src/devices/cpu/z80/z80.h
@@ -51,29 +51,29 @@ protected:
z80_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
// device-level overrides
- virtual void device_start();
- virtual void device_reset();
+ virtual void device_start() override;
+ virtual void device_reset() override;
// device_execute_interface overrides
- virtual UINT32 execute_min_cycles() const { return 2; }
- virtual UINT32 execute_max_cycles() const { return 16; }
- virtual UINT32 execute_input_lines() const { return 4; }
- virtual UINT32 execute_default_irq_vector() const { return 0xff; }
- virtual void execute_run();
- virtual void execute_set_input(int inputnum, int state);
+ virtual UINT32 execute_min_cycles() const override { return 2; }
+ virtual UINT32 execute_max_cycles() const override { return 16; }
+ virtual UINT32 execute_input_lines() const override { return 4; }
+ virtual UINT32 execute_default_irq_vector() const override { return 0xff; }
+ virtual void execute_run() override;
+ 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;
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
// device_state_interface overrides
- virtual void state_import(const device_state_entry &entry);
- virtual void state_export(const device_state_entry &entry);
- virtual void state_string_export(const device_state_entry &entry, std::string &str);
+ virtual void state_import(const device_state_entry &entry) override;
+ virtual void state_export(const device_state_entry &entry) override;
+ virtual void state_string_export(const device_state_entry &entry, std::string &str) override;
// device_disasm_interface overrides
- virtual UINT32 disasm_min_opcode_bytes() const { return 1; }
- virtual UINT32 disasm_max_opcode_bytes() const { return 4; }
- virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options);
+ virtual UINT32 disasm_min_opcode_bytes() const override { return 1; }
+ virtual UINT32 disasm_max_opcode_bytes() const override { return 4; }
+ virtual offs_t disasm_disassemble(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 options) override;
#undef PROTOTYPES
#define PROTOTYPES(prefix) \
@@ -302,13 +302,13 @@ public:
protected:
// device-level overrides
- virtual void device_start();
- virtual void device_reset();
+ virtual void device_start() override;
+ virtual void device_reset() override;
// device_execute_interface overrides
- virtual UINT32 execute_input_lines() const { return 7; }
- virtual void execute_run();
- virtual void execute_set_input(int inputnum, int state);
+ virtual UINT32 execute_input_lines() const override { return 7; }
+ virtual void execute_run() override;
+ virtual void execute_set_input(int inputnum, int state) override;
void take_interrupt_nsc800();
UINT8 m_nsc800_irq_state[4]; /* state of NSC800 restart interrupts A, B, C */
diff --git a/src/devices/cpu/z80/z80daisy.cpp b/src/devices/cpu/z80/z80daisy.cpp
index c1b0a5454c3..6553760160b 100644
--- a/src/devices/cpu/z80/z80daisy.cpp
+++ b/src/devices/cpu/z80/z80daisy.cpp
@@ -45,7 +45,7 @@ device_z80daisy_interface::~device_z80daisy_interface()
//-------------------------------------------------
z80_daisy_chain::z80_daisy_chain()
- : m_daisy_list(NULL)
+ : m_daisy_list(nullptr)
{
}
@@ -59,13 +59,13 @@ void z80_daisy_chain::init(device_t *cpudevice, const z80_daisy_config *daisy)
{
// create a linked list of devices
daisy_entry **tailptr = &m_daisy_list;
- for ( ; daisy->devname != NULL; daisy++)
+ for ( ; daisy->devname != nullptr; daisy++)
{
// find the device
device_t *target;
- if ((target = cpudevice->subdevice(daisy->devname)) == NULL)
+ if ((target = cpudevice->subdevice(daisy->devname)) == nullptr)
{
- if ((target = cpudevice->siblingdevice(daisy->devname)) == NULL)
+ if ((target = cpudevice->siblingdevice(daisy->devname)) == nullptr)
fatalerror("Unable to locate device '%s'\n", daisy->devname);
}
@@ -75,8 +75,8 @@ void z80_daisy_chain::init(device_t *cpudevice, const z80_daisy_config *daisy)
fatalerror("Device '%s' does not implement the z80daisy interface!\n", daisy->devname);
// append to the end, or overwrite existing entry
- daisy_entry *next = (*tailptr) ? (*tailptr)->m_next : NULL;
- if (*tailptr != NULL)
+ daisy_entry *next = (*tailptr) ? (*tailptr)->m_next : nullptr;
+ if (*tailptr != nullptr)
auto_free(cpudevice->machine(), *tailptr);
*tailptr = auto_alloc(cpudevice->machine(), daisy_entry(target));
(*tailptr)->m_next = next;
@@ -93,7 +93,7 @@ void z80_daisy_chain::init(device_t *cpudevice, const z80_daisy_config *daisy)
void z80_daisy_chain::reset()
{
// loop over all devices and call their reset function
- for (daisy_entry *daisy = m_daisy_list; daisy != NULL; daisy = daisy->m_next)
+ for (daisy_entry *daisy = m_daisy_list; daisy != nullptr; daisy = daisy->m_next)
daisy->m_device->reset();
}
@@ -106,7 +106,7 @@ void z80_daisy_chain::reset()
int z80_daisy_chain::update_irq_state()
{
// loop over all devices; dev[0] is highest priority
- for (daisy_entry *daisy = m_daisy_list; daisy != NULL; daisy = daisy->m_next)
+ for (daisy_entry *daisy = m_daisy_list; daisy != nullptr; daisy = daisy->m_next)
{
// if this device is asserting the INT line, that's the one we want
int state = daisy->m_interface->z80daisy_irq_state();
@@ -131,7 +131,7 @@ int z80_daisy_chain::call_ack_device()
int vector = 0;
// loop over all devices; dev[0] is the highest priority
- for (daisy_entry *daisy = m_daisy_list; daisy != NULL; daisy = daisy->m_next)
+ for (daisy_entry *daisy = m_daisy_list; daisy != nullptr; daisy = daisy->m_next)
{
// if this device is asserting the INT line, that's the one we want
int state = daisy->m_interface->z80daisy_irq_state();
@@ -152,7 +152,7 @@ int z80_daisy_chain::call_ack_device()
void z80_daisy_chain::call_reti_device()
{
// loop over all devices; dev[0] is the highest priority
- for (daisy_entry *daisy = m_daisy_list; daisy != NULL; daisy = daisy->m_next)
+ for (daisy_entry *daisy = m_daisy_list; daisy != nullptr; daisy = daisy->m_next)
{
// if this device is asserting the IEO line, that's the one we want
int state = daisy->m_interface->z80daisy_irq_state();
@@ -171,9 +171,9 @@ void z80_daisy_chain::call_reti_device()
//-------------------------------------------------
z80_daisy_chain::daisy_entry::daisy_entry(device_t *device)
- : m_next(NULL),
+ : m_next(nullptr),
m_device(device),
- m_interface(NULL)
+ m_interface(nullptr)
{
device->interface(m_interface);
}
diff --git a/src/devices/cpu/z80/z80daisy.h b/src/devices/cpu/z80/z80daisy.h
index b4651649a20..258df6cd017 100644
--- a/src/devices/cpu/z80/z80daisy.h
+++ b/src/devices/cpu/z80/z80daisy.h
@@ -64,7 +64,7 @@ public:
z80_daisy_chain();
void init(device_t *cpudevice, const z80_daisy_config *daisy);
- bool present() const { return (m_daisy_list != NULL); }
+ bool present() const { return (m_daisy_list != nullptr); }
void reset();
int update_irq_state();
diff --git a/src/devices/cpu/z80/z80dasm.cpp b/src/devices/cpu/z80/z80dasm.cpp
index a65ea623e3f..011d7857d19 100644
--- a/src/devices/cpu/z80/z80dasm.cpp
+++ b/src/devices/cpu/z80/z80dasm.cpp
@@ -214,21 +214,21 @@ static const z80dasm mnemonic_ed[256] =
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zIN,"b,(c)"}, {zOUT,"(c),b"}, {zSBC,"hl,bc"}, {zLD,"(W),bc"},
- {zNEG,0}, {zRETN,0}, {zIM,"0"}, {zLD,"i,a"},
+ {zNEG,nullptr}, {zRETN,nullptr}, {zIM,"0"}, {zLD,"i,a"},
{zIN,"c,(c)"}, {zOUT,"(c),c"}, {zADC,"hl,bc"}, {zLD,"bc,(W)"},
- {zNEG,"*"}, {zRETI,0}, {zIM,"0"}, {zLD,"r,a"},
+ {zNEG,"*"}, {zRETI,nullptr}, {zIM,"0"}, {zLD,"r,a"},
{zIN,"d,(c)"}, {zOUT,"(c),d"}, {zSBC,"hl,de"}, {zLD,"(W),de"},
- {zNEG,"*"}, {zRETN,0}, {zIM,"1"}, {zLD,"a,i"},
+ {zNEG,"*"}, {zRETN,nullptr}, {zIM,"1"}, {zLD,"a,i"},
{zIN,"e,(c)"}, {zOUT,"(c),e"}, {zADC,"hl,de"}, {zLD,"de,(W)"},
- {zNEG,"*"}, {zRETI,0}, {zIM,"2"}, {zLD,"a,r"},
+ {zNEG,"*"}, {zRETI,nullptr}, {zIM,"2"}, {zLD,"a,r"},
{zIN,"h,(c)"}, {zOUT,"(c),h"}, {zSBC,"hl,hl"}, {zLD,"(W),hl"},
- {zNEG,"*"}, {zRETN,0}, {zIM,"0"}, {zRRD,"(hl)"},
+ {zNEG,"*"}, {zRETN,nullptr}, {zIM,"0"}, {zRRD,"(hl)"},
{zIN,"l,(c)"}, {zOUT,"(c),l"}, {zADC,"hl,hl"}, {zLD,"hl,(W)"},
- {zNEG,"*"}, {zRETI,0}, {zIM,"0"}, {zRLD,"(hl)"},
+ {zNEG,"*"}, {zRETI,nullptr}, {zIM,"0"}, {zRLD,"(hl)"},
{zIN,"0,(c)"}, {zOUT,"(c),0"}, {zSBC,"hl,sp"}, {zLD,"(W),sp"},
- {zNEG,"*"}, {zRETN,0}, {zIM,"1"}, {zDB,"?"},
+ {zNEG,"*"}, {zRETN,nullptr}, {zIM,"1"}, {zDB,"?"},
{zIN,"a,(c)"}, {zOUT,"(c),a"}, {zADC,"hl,sp"}, {zLD,"sp,(W)"},
- {zNEG,"*"}, {zRETI,0}, {zIM,"2"}, {zDB,"?"},
+ {zNEG,"*"}, {zRETI,nullptr}, {zIM,"2"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
@@ -237,13 +237,13 @@ static const z80dasm mnemonic_ed[256] =
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zLDI,0}, {zCPI,0}, {zINI,0}, {zOUTI,0},
+ {zLDI,nullptr}, {zCPI,nullptr}, {zINI,nullptr}, {zOUTI,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zLDD,0}, {zCPD,0}, {zIND,0}, {zOUTD,0},
+ {zLDD,nullptr}, {zCPD,nullptr}, {zIND,nullptr}, {zOUTD,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zLDIR,0}, {zCPIR,0}, {zINIR,0}, {zOTIR,0},
+ {zLDIR,nullptr}, {zCPIR,nullptr}, {zINIR,nullptr}, {zOTIR,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
- {zLDDR,0}, {zCPDR,0}, {zINDR,0}, {zOTDR,0},
+ {zLDDR,nullptr}, {zCPDR,nullptr}, {zINDR,nullptr}, {zOTDR,nullptr},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
{zDB,"?"}, {zDB,"?"}, {zDB,"?"}, {zDB,"?"},
@@ -333,22 +333,22 @@ static const z80dasm mnemonic_xx[256] =
static const z80dasm mnemonic_main[256] =
{
- {zNOP,0}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"},
- {zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,0},
+ {zNOP,nullptr}, {zLD,"bc,N"}, {zLD,"(bc),a"}, {zINC,"bc"},
+ {zINC,"b"}, {zDEC,"b"}, {zLD,"b,B"}, {zRLCA,nullptr},
{zEX,"af,af'"}, {zADD,"hl,bc"}, {zLD,"a,(bc)"}, {zDEC,"bc"},
- {zINC,"c"}, {zDEC,"c"}, {zLD,"c,B"}, {zRRCA,0},
+ {zINC,"c"}, {zDEC,"c"}, {zLD,"c,B"}, {zRRCA,nullptr},
{zDJNZ,"O"}, {zLD,"de,N"}, {zLD,"(de),a"}, {zINC,"de"},
- {zINC,"d"}, {zDEC,"d"}, {zLD,"d,B"}, {zRLA,0},
+ {zINC,"d"}, {zDEC,"d"}, {zLD,"d,B"}, {zRLA,nullptr},
{zJR,"O"}, {zADD,"hl,de"}, {zLD,"a,(de)"}, {zDEC,"de"},
- {zINC,"e"}, {zDEC,"e"}, {zLD,"e,B"}, {zRRA,0},
+ {zINC,"e"}, {zDEC,"e"}, {zLD,"e,B"}, {zRRA,nullptr},
{zJR,"nz,O"}, {zLD,"hl,N"}, {zLD,"(W),hl"}, {zINC,"hl"},
- {zINC,"h"}, {zDEC,"h"}, {zLD,"h,B"}, {zDAA,0},
+ {zINC,"h"}, {zDEC,"h"}, {zLD,"h,B"}, {zDAA,nullptr},
{zJR,"z,O"}, {zADD,"hl,hl"}, {zLD,"hl,(W)"}, {zDEC,"hl"},
- {zINC,"l"}, {zDEC,"l"}, {zLD,"l,B"}, {zCPL,0},
+ {zINC,"l"}, {zDEC,"l"}, {zLD,"l,B"}, {zCPL,nullptr},
{zJR,"nc,O"}, {zLD,"sp,N"}, {zLD,"(W),a"}, {zINC,"sp"},
- {zINC,"(hl)"}, {zDEC,"(hl)"}, {zLD,"(hl),B"}, {zSCF,0},
+ {zINC,"(hl)"}, {zDEC,"(hl)"}, {zLD,"(hl),B"}, {zSCF,nullptr},
{zJR,"c,O"}, {zADD,"hl,sp"}, {zLD,"a,(W)"}, {zDEC,"sp"},
- {zINC,"a"}, {zDEC,"a"}, {zLD,"a,B"}, {zCCF,0},
+ {zINC,"a"}, {zDEC,"a"}, {zLD,"a,B"}, {zCCF,nullptr},
{zLD,"b,b"}, {zLD,"b,c"}, {zLD,"b,d"}, {zLD,"b,e"},
{zLD,"b,h"}, {zLD,"b,l"}, {zLD,"b,(hl)"}, {zLD,"b,a"},
{zLD,"c,b"}, {zLD,"c,c"}, {zLD,"c,d"}, {zLD,"c,e"},
@@ -362,7 +362,7 @@ static const z80dasm mnemonic_main[256] =
{zLD,"l,b"}, {zLD,"l,c"}, {zLD,"l,d"}, {zLD,"l,e"},
{zLD,"l,h"}, {zLD,"l,l"}, {zLD,"l,(hl)"}, {zLD,"l,a"},
{zLD,"(hl),b"}, {zLD,"(hl),c"}, {zLD,"(hl),d"}, {zLD,"(hl),e"},
- {zLD,"(hl),h"}, {zLD,"(hl),l"}, {zHLT,0}, {zLD,"(hl),a"},
+ {zLD,"(hl),h"}, {zLD,"(hl),l"}, {zHLT,nullptr}, {zLD,"(hl),a"},
{zLD,"a,b"}, {zLD,"a,c"}, {zLD,"a,d"}, {zLD,"a,e"},
{zLD,"a,h"}, {zLD,"a,l"}, {zLD,"a,(hl)"}, {zLD,"a,a"},
{zADD,"a,b"}, {zADD,"a,c"}, {zADD,"a,d"}, {zADD,"a,e"},
@@ -383,19 +383,19 @@ static const z80dasm mnemonic_main[256] =
{zCP,"h"}, {zCP,"l"}, {zCP,"(hl)"}, {zCP,"a"},
{zRET,"nz"}, {zPOP,"bc"}, {zJP,"nz,A"}, {zJP,"A"},
{zCALL,"nz,A"}, {zPUSH,"bc"}, {zADD,"a,B"}, {zRST,"V"},
- {zRET,"z"}, {zRET,0}, {zJP,"z,A"}, {zDB,"cb"},
+ {zRET,"z"}, {zRET,nullptr}, {zJP,"z,A"}, {zDB,"cb"},
{zCALL,"z,A"}, {zCALL,"A"}, {zADC,"a,B"}, {zRST,"V"},
{zRET,"nc"}, {zPOP,"de"}, {zJP,"nc,A"}, {zOUT,"(P),a"},
{zCALL,"nc,A"}, {zPUSH,"de"}, {zSUB,"B"}, {zRST,"V"},
- {zRET,"c"}, {zEXX,0}, {zJP,"c,A"}, {zIN,"a,(P)"},
+ {zRET,"c"}, {zEXX,nullptr}, {zJP,"c,A"}, {zIN,"a,(P)"},
{zCALL,"c,A"}, {zDB,"dd"}, {zSBC,"a,B"}, {zRST,"V"},
{zRET,"po"}, {zPOP,"hl"}, {zJP,"po,A"}, {zEX,"(sp),hl"},
{zCALL,"po,A"}, {zPUSH,"hl"}, {zAND,"B"}, {zRST,"V"},
{zRET,"pe"}, {zJP,"(hl)"}, {zJP,"pe,A"}, {zEX,"de,hl"},
{zCALL,"pe,A"}, {zDB,"ed"}, {zXOR,"B"}, {zRST,"V"},
- {zRET,"p"}, {zPOP,"af"}, {zJP,"p,A"}, {zDI,0},
+ {zRET,"p"}, {zPOP,"af"}, {zJP,"p,A"}, {zDI,nullptr},
{zCALL,"p,A"}, {zPUSH,"af"}, {zOR,"B"}, {zRST,"V"},
- {zRET,"m"}, {zLD,"sp,hl"}, {zJP,"m,A"}, {zEI,0},
+ {zRET,"m"}, {zLD,"sp,hl"}, {zJP,"m,A"}, {zEI,nullptr},
{zCALL,"m,A"}, {zDB,"fd"}, {zCP,"B"}, {zRST,"V"}
};
diff --git a/src/devices/cpu/z8000/8000dasm.cpp b/src/devices/cpu/z8000/8000dasm.cpp
index 91a4849da41..c8eaa7ad9b9 100644
--- a/src/devices/cpu/z8000/8000dasm.cpp
+++ b/src/devices/cpu/z8000/8000dasm.cpp
@@ -97,7 +97,7 @@ CPU_DISASSEMBLE( z8000 )
UINT32 old_w;
/* already initialized? */
- if(z8000_exec == NULL)
+ if(z8000_exec == nullptr)
z8000_init_tables();
GET_OP(oprom, 0, new_pc - pc);
diff --git a/src/devices/cpu/z8000/z8000.cpp b/src/devices/cpu/z8000/z8000.cpp
index ad9d5b7beb6..9cd356225d6 100644
--- a/src/devices/cpu/z8000/z8000.cpp
+++ b/src/devices/cpu/z8000/z8000.cpp
@@ -68,7 +68,7 @@ offs_t z8002_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *op
/* opcode execution table */
-Z8000_exec *z8000_exec = NULL;
+Z8000_exec *z8000_exec = nullptr;
/* zero, sign and parity flags for logical byte operations */
static UINT8 z8000_zsp[256];
@@ -658,7 +658,7 @@ void z8001_device::device_start()
m_io = &space(AS_IO);
/* already initialized? */
- if(z8000_exec == NULL)
+ if(z8000_exec == nullptr)
z8000_init_tables();
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
@@ -688,7 +688,7 @@ void z8002_device::device_start()
m_io = &space(AS_IO);
/* already initialized? */
- if(z8000_exec == NULL)
+ if(z8000_exec == nullptr)
z8000_init_tables();
z8k_segm = false;
diff --git a/src/devices/cpu/z8000/z8000.h b/src/devices/cpu/z8000/z8000.h
index 4437e0399ab..66a5e4f797f 100644
--- a/src/devices/cpu/z8000/z8000.h
+++ b/src/devices/cpu/z8000/z8000.h
@@ -62,7 +62,7 @@ protected:
{
case AS_PROGRAM: return &m_program_config;
case AS_IO: return &m_io_config;
- default: return NULL;
+ default: return nullptr;
}
}
@@ -643,7 +643,7 @@ protected:
case AS_PROGRAM: return &m_program_config;
case AS_DATA: return &m_data_config;
case AS_IO: return &m_io_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/devices/cpu/z8000/z8000tbl.inc b/src/devices/cpu/z8000/z8000tbl.inc
index fc116c18301..39f4a3c192c 100644
--- a/src/devices/cpu/z8000/z8000tbl.inc
+++ b/src/devices/cpu/z8000/z8000tbl.inc
@@ -527,7 +527,7 @@ static const Z8000_init table[] = {
{0xfd80,0xfdff, 1,1, 11,&z8002_device::ZF_dddd_1dsp7, "djnz %rw1,%d0", DASMFLAG_STEP_OVER},
{0xfe80,0xfeff, 1,1, 11,&z8002_device::ZF_dddd_1dsp7, "djnz %rw1,%d0", DASMFLAG_STEP_OVER},
{0xff80,0xffff, 1,1, 11,&z8002_device::ZF_dddd_1dsp7, "djnz %rw1,%d0", DASMFLAG_STEP_OVER},
-{0, 0, 0,0, 0,NULL, NULL, 0}
+{0, 0, 0,0, 0,nullptr, nullptr, 0}
};
@@ -575,5 +575,5 @@ void z8000_init_tables(void)
void z8000_deinit_tables(void)
{
global_free_array( z8000_exec );
- z8000_exec = NULL;
+ z8000_exec = nullptr;
}
diff --git a/src/devices/imagedev/bitbngr.h b/src/devices/imagedev/bitbngr.h
index 4c3b3e5b9d1..f2a486a04a7 100644
--- a/src/devices/imagedev/bitbngr.h
+++ b/src/devices/imagedev/bitbngr.h
@@ -29,7 +29,7 @@ public:
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
virtual const char *file_extensions() const { return ""; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
void output(UINT8 data);
UINT32 input(void *buffer, UINT32 length);
diff --git a/src/devices/imagedev/cassette.cpp b/src/devices/imagedev/cassette.cpp
index 0df32b0ef9d..e6485b05523 100644
--- a/src/devices/imagedev/cassette.cpp
+++ b/src/devices/imagedev/cassette.cpp
@@ -31,7 +31,7 @@ const device_type CASSETTE = &device_creator<cassette_image_device>;
cassette_image_device::cassette_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CASSETTE, "Cassette", tag, owner, clock, "cassette_image", __FILE__),
device_image_interface(mconfig, *this),
- m_cassette(NULL),
+ m_cassette(nullptr),
m_state(CASSETTE_STOPPED),
m_position(0),
m_position_time(0),
@@ -40,9 +40,9 @@ cassette_image_device::cassette_image_device(const machine_config &mconfig, cons
m_speed(0),
m_direction(0),
m_formats(cassette_default_formats),
- m_create_opts(NULL),
+ m_create_opts(nullptr),
m_default_state(CASSETTE_PLAY),
- m_interface(NULL)
+ m_interface(nullptr)
{
}
@@ -250,7 +250,7 @@ void cassette_image_device::seek(double time, int origin)
void cassette_image_device::device_start()
{
/* set to default state */
- m_cassette = NULL;
+ m_cassette = nullptr;
m_state = m_default_state;
m_value = 0;
}
@@ -266,7 +266,7 @@ bool cassette_image_device::call_load()
int cassette_flags;
const char *extension;
int is_writable;
- device_image_interface *image = NULL;
+ device_image_interface *image = nullptr;
interface(image);
if ((has_been_created()) || (length() == 0))
@@ -284,7 +284,7 @@ bool cassette_image_device::call_load()
is_writable = !is_readonly();
cassette_flags = is_writable ? (CASSETTE_FLAG_READWRITE|CASSETTE_FLAG_SAVEONEXIT) : CASSETTE_FLAG_READONLY;
std::string fname;
- if (software_entry()==NULL) {
+ if (software_entry()==nullptr) {
extension = filetype();
} else {
fname = m_mame_file->filename();
@@ -355,7 +355,7 @@ void cassette_image_device::call_unload()
/* close out the cassette */
cassette_close(m_cassette);
- m_cassette = NULL;
+ m_cassette = nullptr;
/* set to default state, but only change the UI state */
change_state(CASSETTE_STOPPED, CASSETTE_MASK_UISTATE);
@@ -392,7 +392,7 @@ void cassette_image_device::call_display()
y = 0.5f;
cassette_device_iterator iter(device().machine().root_device());
- for (dev = iter.first(); dev != NULL && strcmp( dev->tag(), device().tag() ); dev = iter.next())
+ for (dev = iter.first(); dev != nullptr && strcmp( dev->tag(), device().tag() ); dev = iter.next())
y += 1;
y *= device().machine().ui().get_line_height() + 2.0f * UI_BOX_TB_BORDER;
diff --git a/src/devices/imagedev/cassette.h b/src/devices/imagedev/cassette.h
index 188670922cc..e7edd0acef2 100644
--- a/src/devices/imagedev/cassette.h
+++ b/src/devices/imagedev/cassette.h
@@ -55,22 +55,22 @@ public:
static void static_set_interface(device_t &device, const char *_interface) { downcast<cassette_image_device &>(device).m_interface = _interface; }
// image-level overrides
- virtual bool call_load();
- virtual bool call_create(int format_type, option_resolution *format_options);
- virtual void call_unload();
- virtual void call_display();
- virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) { return load_software(swlist, swname, start_entry); }
-
- virtual iodevice_t image_type() const { return IO_CASSETTE; }
-
- virtual bool is_readable() const { return 1; }
- virtual bool is_writeable() const { return 1; }
- virtual bool is_creatable() const { return 1; }
- virtual bool must_be_loaded() const { return 0; }
- virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return m_interface; }
- virtual const char *file_extensions() const { return m_extension_list; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual bool call_load() override;
+ virtual bool call_create(int format_type, option_resolution *format_options) override;
+ virtual void call_unload() override;
+ virtual void call_display() override;
+ virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override { return load_software(swlist, swname, start_entry); }
+
+ virtual iodevice_t image_type() const override { return IO_CASSETTE; }
+
+ virtual bool is_readable() const override { return 1; }
+ virtual bool is_writeable() const override { return 1; }
+ virtual bool is_creatable() const override { return 1; }
+ virtual bool must_be_loaded() const override { return 0; }
+ virtual bool is_reset_on_load() const override { return 0; }
+ virtual const char *image_interface() const override { return m_interface; }
+ virtual const char *file_extensions() const override { return m_extension_list; }
+ virtual const option_guide *create_option_guide() const override { return nullptr; }
// specific implementation
cassette_state get_state() { return m_state; }
@@ -94,8 +94,8 @@ protected:
void update();
// device-level overrides
- virtual void device_config_complete();
- virtual void device_start();
+ virtual void device_config_complete() override;
+ virtual void device_start() override;
private:
cassette_image *m_cassette;
cassette_state m_state;
diff --git a/src/devices/imagedev/chd_cd.cpp b/src/devices/imagedev/chd_cd.cpp
index ca7898d14cd..83845d026b8 100644
--- a/src/devices/imagedev/chd_cd.cpp
+++ b/src/devices/imagedev/chd_cd.cpp
@@ -29,18 +29,18 @@ const device_type CDROM = &device_creator<cdrom_image_device>;
cdrom_image_device::cdrom_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDROM, "CD-ROM Image", tag, owner, clock, "cdrom_image", __FILE__),
device_image_interface(mconfig, *this),
- m_cdrom_handle(NULL),
- m_extension_list(NULL),
- m_interface(NULL)
+ m_cdrom_handle(nullptr),
+ m_extension_list(nullptr),
+ m_interface(nullptr)
{
}
cdrom_image_device::cdrom_image_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_image_interface(mconfig, *this),
- m_cdrom_handle(NULL),
- m_extension_list(NULL),
- m_interface(NULL)
+ m_cdrom_handle(nullptr),
+ m_extension_list(nullptr),
+ m_interface(nullptr)
{
}
//-------------------------------------------------
@@ -80,13 +80,13 @@ void cdrom_image_device::device_start()
{
// try to locate the CHD from a DISK_REGION
chd_file *chd = get_disk_handle( machine(), owner()->tag() );
- if( chd != NULL )
+ if( chd != nullptr )
{
m_cdrom_handle = cdrom_open( chd );
}
else
{
- m_cdrom_handle = NULL;
+ m_cdrom_handle = nullptr;
}
}
@@ -101,12 +101,12 @@ void cdrom_image_device::device_stop()
bool cdrom_image_device::call_load()
{
chd_error err = (chd_error)0;
- chd_file *chd = NULL;
+ chd_file *chd = nullptr;
if (m_cdrom_handle)
cdrom_close(m_cdrom_handle);
- if (software_entry() == NULL)
+ if (software_entry() == nullptr)
{
if (strstr(m_image_name.c_str(), ".chd") && is_loaded()) {
err = m_self_chd.open( *image_core_file() ); /* CDs are never writeable */
@@ -141,7 +141,7 @@ void cdrom_image_device::call_unload()
{
assert(m_cdrom_handle);
cdrom_close(m_cdrom_handle);
- m_cdrom_handle = NULL;
+ m_cdrom_handle = nullptr;
if( m_self_chd.opened() )
m_self_chd.close();
}
diff --git a/src/devices/imagedev/diablo.cpp b/src/devices/imagedev/diablo.cpp
index d7d499ec523..9982463fd08 100644
--- a/src/devices/imagedev/diablo.cpp
+++ b/src/devices/imagedev/diablo.cpp
@@ -32,11 +32,11 @@ const device_type DIABLO = &device_creator<diablo_image_device>;
diablo_image_device::diablo_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DIABLO, "Diablo", tag, owner, clock, "diablo_image", __FILE__),
device_image_interface(mconfig, *this),
- m_chd(NULL),
- m_hard_disk_handle(NULL),
+ m_chd(nullptr),
+ m_hard_disk_handle(nullptr),
m_device_image_load(device_image_load_delegate()),
m_device_image_unload(device_image_func_delegate()),
- m_interface(NULL)
+ m_interface(nullptr)
{
}
@@ -73,17 +73,17 @@ const option_guide *diablo_image_device::create_option_guide() const
void diablo_image_device::device_start()
{
- m_chd = NULL;
+ m_chd = nullptr;
// try to locate the CHD from a DISK_REGION
chd_file *handle = get_disk_handle(machine(), tag());
- if (handle != NULL)
+ if (handle != nullptr)
{
m_hard_disk_handle = hard_disk_open(handle);
}
else
{
- m_hard_disk_handle = NULL;
+ m_hard_disk_handle = nullptr;
}
}
@@ -151,15 +151,15 @@ void diablo_image_device::call_unload()
m_device_image_unload(*this);
}
- if (m_hard_disk_handle != NULL)
+ if (m_hard_disk_handle != nullptr)
{
hard_disk_close(m_hard_disk_handle);
- m_hard_disk_handle = NULL;
+ m_hard_disk_handle = nullptr;
}
m_origchd.close();
m_diffchd.close();
- m_chd = NULL;
+ m_chd = nullptr;
}
/*-------------------------------------------------
@@ -209,13 +209,13 @@ int diablo_image_device::internal_load_dsk()
{
chd_error err = CHDERR_NONE;
- m_chd = NULL;
+ m_chd = nullptr;
if (m_hard_disk_handle)
hard_disk_close(m_hard_disk_handle);
/* open the CHD file */
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
m_chd = get_disk_handle(device().machine(), device().subtag("harddriv").c_str());
}
@@ -240,18 +240,18 @@ int diablo_image_device::internal_load_dsk()
}
}
- if (m_chd != NULL)
+ if (m_chd != nullptr)
{
/* open the hard disk file */
m_hard_disk_handle = hard_disk_open(m_chd);
- if (m_hard_disk_handle != NULL)
+ if (m_hard_disk_handle != nullptr)
return IMAGE_INIT_PASS;
}
/* if we had an error, close out the CHD */
m_origchd.close();
m_diffchd.close();
- m_chd = NULL;
+ m_chd = nullptr;
seterror(IMAGE_ERROR_UNSPECIFIED, chd_file::error_string(err));
return IMAGE_INIT_FAIL;
@@ -266,7 +266,7 @@ int diablo_image_device::internal_load_dsk()
chd_file *diablo_image_device::get_chd_file()
{
- chd_file *result = NULL;
+ chd_file *result = nullptr;
hard_disk_file *hd_file = get_hard_disk_file();
if (hd_file)
result = hard_disk_get_chd(hd_file);
diff --git a/src/devices/imagedev/flopdrv.cpp b/src/devices/imagedev/flopdrv.cpp
index ed4063ecc00..4bfa045dae9 100644
--- a/src/devices/imagedev/flopdrv.cpp
+++ b/src/devices/imagedev/flopdrv.cpp
@@ -124,7 +124,7 @@ void legacy_floppy_image_device::floppy_drive_init()
{
/* initialise flags */
m_flags = 0;
- m_index_pulse_callback = NULL;
+ m_index_pulse_callback = nullptr;
m_index_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(legacy_floppy_image_device::floppy_drive_index_callback),this));
m_idx = 0;
@@ -138,7 +138,7 @@ void legacy_floppy_image_device::floppy_drive_init()
/* default RPM */
m_rpm = 300;
- m_controller = NULL;
+ m_controller = nullptr;
m_floppy_drive_type = FLOPPY_TYPE_REGULAR;
}
@@ -425,7 +425,7 @@ int legacy_floppy_image_device::internal_floppy_device_load(int create_format, o
int floppy_flags, i;
const char *extension;
- device_image_interface *image = NULL;
+ device_image_interface *image = nullptr;
interface(image); /* figure out the floppy options */
floppy_options = ((floppy_interface*)static_config())->formats;
@@ -478,7 +478,7 @@ legacy_floppy_image_device *floppy_get_device(running_machine &machine,int drive
case 2 : return machine.device<legacy_floppy_image_device>(FLOPPY_2);
case 3 : return machine.device<legacy_floppy_image_device>(FLOPPY_3);
}
- return NULL;
+ return nullptr;
}
int legacy_floppy_image_device::floppy_get_drive_type()
@@ -504,7 +504,7 @@ legacy_floppy_image_device *floppy_get_device_by_type(running_machine &machine,i
cnt++;
}
}
- return NULL;
+ return nullptr;
}
int floppy_get_drive(device_t *image)
@@ -672,7 +672,7 @@ READ_LINE_MEMBER( legacy_floppy_image_device::floppy_dskchg_r )
/* 2-sided disk */
READ_LINE_MEMBER( legacy_floppy_image_device::floppy_twosid_r )
{
- if (m_floppy == NULL)
+ if (m_floppy == nullptr)
return ASSERT_LINE;
else
return !floppy_get_heads_per_disk(m_floppy);
@@ -710,20 +710,20 @@ legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mco
m_dskchg(0),
m_drive_id(0),
m_active(0),
- m_config(NULL),
+ m_config(nullptr),
m_flags(0),
m_max_track(0),
m_num_sides(0),
m_current_track(0),
- m_index_timer(NULL),
- m_index_pulse_callback(NULL),
+ m_index_timer(nullptr),
+ m_index_pulse_callback(nullptr),
m_rpm(0.0f),
m_id_index(0),
- m_controller(NULL),
- m_floppy(NULL),
+ m_controller(nullptr),
+ m_floppy(nullptr),
m_track(0),
- m_load_proc(NULL),
- m_unload_proc(NULL),
+ m_load_proc(nullptr),
+ m_unload_proc(nullptr),
m_floppy_drive_type(0)
{
memset(&m_extension_list,0,sizeof(m_extension_list));
@@ -744,20 +744,20 @@ legacy_floppy_image_device::legacy_floppy_image_device(const machine_config &mco
m_dskchg(0),
m_drive_id(0),
m_active(0),
- m_config(NULL),
+ m_config(nullptr),
m_flags(0),
m_max_track(0),
m_num_sides(0),
m_current_track(0),
- m_index_timer(NULL),
- m_index_pulse_callback(NULL),
+ m_index_timer(nullptr),
+ m_index_pulse_callback(nullptr),
m_rpm(0.0f),
m_id_index(0),
- m_controller(NULL),
- m_floppy(NULL),
+ m_controller(nullptr),
+ m_floppy(nullptr),
m_track(0),
- m_load_proc(NULL),
- m_unload_proc(NULL),
+ m_load_proc(nullptr),
+ m_unload_proc(nullptr),
m_floppy_drive_type(0)
{
memset(&m_extension_list,0,sizeof(m_extension_list));
@@ -839,7 +839,7 @@ bool legacy_floppy_image_device::call_create(int format_type, option_resolution
bool legacy_floppy_image_device::call_load()
{
- int retVal = internal_floppy_device_load(-1, NULL);
+ int retVal = internal_floppy_device_load(-1, nullptr);
if (retVal==IMAGE_INIT_PASS) {
/* if we have one of our hacky unload procs, call it */
if (m_load_proc)
@@ -869,7 +869,7 @@ void legacy_floppy_image_device::call_unload()
m_unload_proc(*this);
floppy_close(m_floppy);
- m_floppy = NULL;
+ m_floppy = nullptr;
/* disk changed */
m_dskchg = CLEAR_LINE;
diff --git a/src/devices/imagedev/floppy.cpp b/src/devices/imagedev/floppy.cpp
index 22a0b03ceec..786a44e2916 100644
--- a/src/devices/imagedev/floppy.cpp
+++ b/src/devices/imagedev/floppy.cpp
@@ -121,13 +121,13 @@ const floppy_format_type floppy_image_device::default_floppy_formats[] = {
FLOPPY_TD0_FORMAT,
FLOPPY_CQM_FORMAT,
FLOPPY_DSK_FORMAT,
- NULL
+ nullptr
};
floppy_connector::floppy_connector(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, FLOPPY_CONNECTOR, "Floppy drive connector abstraction", tag, owner, clock, "floppy_connector", __FILE__),
device_slot_interface(mconfig, *this),
- formats(NULL),
+ formats(nullptr),
m_enable_sound(false)
{
}
@@ -168,11 +168,11 @@ floppy_image_device::floppy_image_device(const machine_config &mconfig, device_t
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_image_interface(mconfig, *this),
device_slot_card_interface(mconfig, *this),
- input_format(NULL),
- output_format(NULL),
- image(NULL),
- fif_list(NULL),
- index_timer(NULL),
+ input_format(nullptr),
+ output_format(nullptr),
+ image(nullptr),
+ fif_list(nullptr),
+ index_timer(nullptr),
tracks(0),
sides(0),
form_factor(0),
@@ -187,7 +187,7 @@ floppy_image_device::floppy_image_device(const machine_config &mconfig, device_t
image_dirty(false),
ready_counter(0),
m_make_sound(false),
- m_sound_out(NULL)
+ m_sound_out(nullptr)
{
extension_list[0] = '\0';
m_err = IMAGE_ERROR_INVALIDIMAGE;
@@ -204,7 +204,7 @@ floppy_image_device::~floppy_image_device()
format = format->next;
delete tmp_format;
}
- fif_list = NULL;
+ fif_list = nullptr;
}
void floppy_image_device::setup_load_cb(load_cb cb)
@@ -235,7 +235,7 @@ void floppy_image_device::setup_wpt_cb(wpt_cb cb)
void floppy_image_device::set_formats(const floppy_format_type *formats)
{
extension_list[0] = '\0';
- fif_list = NULL;
+ fif_list = nullptr;
for(int cnt=0; formats[cnt]; cnt++)
{
// allocate a new format
@@ -369,7 +369,7 @@ floppy_image_format_t *floppy_image_device::identify(std::string filename)
file_error err = zippath_fopen(filename.c_str(), OPEN_FLAG_READ, fd, revised_path);
if(err) {
seterror(IMAGE_ERROR_INVALIDIMAGE, "Unable to open the image file");
- return 0;
+ return nullptr;
}
io_generic io;
@@ -377,7 +377,7 @@ floppy_image_format_t *floppy_image_device::identify(std::string filename)
io.procs = &corefile_ioprocs_noclose;
io.filler = 0xff;
int best = 0;
- floppy_image_format_t *best_format = 0;
+ floppy_image_format_t *best_format = nullptr;
for(floppy_image_format_t *format = fif_list; format; format = format->next) {
int score = format->identify(&io, form_factor);
if(score > best) {
@@ -398,7 +398,7 @@ bool floppy_image_device::call_load()
io.procs = &image_ioprocs;
io.filler = 0xff;
int best = 0;
- floppy_image_format_t *best_format = 0;
+ floppy_image_format_t *best_format = nullptr;
for(floppy_image_format_t *format = fif_list; format; format = format->next) {
int score = format->identify(&io, form_factor);
if(score > best) {
@@ -415,7 +415,7 @@ bool floppy_image_device::call_load()
image = global_alloc(floppy_image(tracks, sides, form_factor));
best_format->load(&io, form_factor, image);
- output_format = is_readonly() ? 0 : best_format;
+ output_format = is_readonly() ? nullptr : best_format;
revolution_start_time = mon ? attotime::never : machine().time();
revolution_count = 0;
@@ -427,7 +427,7 @@ bool floppy_image_device::call_load()
if (!cur_wpt_cb.isnull())
cur_wpt_cb(this, wpt);
- wpt = is_readonly() || (output_format == 0);
+ wpt = is_readonly() || (output_format == nullptr);
if (!cur_wpt_cb.isnull())
cur_wpt_cb(this, wpt);
@@ -451,7 +451,7 @@ void floppy_image_device::call_unload()
if(image_dirty)
commit_image();
global_free(image);
- image = 0;
+ image = nullptr;
}
wpt = 1; // disk sleeve is covering the sensor
@@ -478,7 +478,7 @@ void floppy_image_device::call_unload()
bool floppy_image_device::call_create(int format_type, option_resolution *format_options)
{
image = global_alloc(floppy_image(tracks, sides, form_factor));
- output_format = 0;
+ output_format = nullptr;
// search for a suitable format based on the extension
for(floppy_image_format_t *i = fif_list; i; i = i->next)
@@ -495,7 +495,7 @@ bool floppy_image_device::call_create(int format_type, option_resolution *format
}
// did we find a suitable format?
- if (output_format == 0)
+ if (output_format == nullptr)
{
seterror(IMAGE_ERROR_INVALIDIMAGE, "Unable to identify the image format");
return IMAGE_INIT_FAIL;
@@ -946,7 +946,7 @@ ui_menu_control_floppy_image::ui_menu_control_floppy_image(running_machine &mach
fcnt++;
format_array = global_alloc_array(floppy_image_format_t *, fcnt);
- input_format = output_format = 0;
+ input_format = output_format = nullptr;
input_filename = output_filename = "";
}
@@ -959,7 +959,7 @@ void ui_menu_control_floppy_image::do_load_create()
{
floppy_image_device *fd = static_cast<floppy_image_device *>(image);
if(input_filename.compare("")==0) {
- int err = fd->create(output_filename.c_str(), 0, NULL);
+ int err = fd->create(output_filename.c_str(), nullptr, nullptr);
if (err != 0) {
machine().popmessage("Error: %s", fd->error());
return;
@@ -1104,7 +1104,7 @@ void ui_menu_control_floppy_image::handle()
floppy_sound_device::floppy_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: samples_device(mconfig, FLOPPYSOUND, "Floppy sound", tag, owner, clock, "flopsnd", __FILE__),
- m_sound(NULL),
+ m_sound(nullptr),
m_is525(false),
m_sampleindex_motor_start(0),
m_sampleindex_motor_loop(0),
@@ -1149,7 +1149,7 @@ void floppy_sound_device::device_start()
m_step_playback_state = 0; // 0 == currently not playing, > 0 = playing one of the step samples from start to end
m_motor_on = false;
- m_is525 = strstr(tag(), "525") != NULL;
+ m_is525 = strstr(tag(), "525") != nullptr;
if (m_is525)
{
m_sampleindex_motor_start = 2;
@@ -1171,7 +1171,7 @@ void floppy_sound_device::device_start()
m_samplesize_motor_start = 0;
m_samplesize_motor_loop = 0;
m_samplesize_motor_end = 0;
- for (int i = 0; i < MAX_STEP_SAMPLES; ++i) m_samplesize_step[i] = 0;
+ for (auto & elem : m_samplesize_step) elem = 0;
// Read audio samples. The samples are stored in the list m_samples.
m_loaded = load_samples();
@@ -1310,7 +1310,7 @@ static const char *const floppy_sample_names[] =
"floppy_525_step3",
"floppy_525_step4",
"floppy_525_step5",
- 0
+ nullptr
};
#define FLOPSPK "flopsndout"
diff --git a/src/devices/imagedev/floppy.h b/src/devices/imagedev/floppy.h
index 15b1095571f..66d4569a6da 100644
--- a/src/devices/imagedev/floppy.h
+++ b/src/devices/imagedev/floppy.h
@@ -79,20 +79,20 @@ public:
void set_rpm(float rpm);
// image-level overrides
- virtual bool call_load();
- virtual void call_unload();
- virtual bool call_create(int format_type, option_resolution *format_options);
- virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) { return load_software(swlist, swname, start_entry); }
- virtual const char *image_interface() const = 0;
- virtual iodevice_t image_type() const { return IO_FLOPPY; }
-
- virtual bool is_readable() const { return true; }
- virtual bool is_writeable() const { return true; }
- virtual bool is_creatable() const { return true; }
- virtual bool must_be_loaded() const { return false; }
- virtual bool is_reset_on_load() const { return false; }
- virtual const char *file_extensions() const { return extension_list; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual bool call_load() override;
+ virtual void call_unload() override;
+ virtual bool call_create(int format_type, option_resolution *format_options) override;
+ virtual bool call_softlist_load(software_list_device &swlist, const char *swname, const rom_entry *start_entry) override { return load_software(swlist, swname, start_entry); }
+ virtual const char *image_interface() const override = 0;
+ virtual iodevice_t image_type() const override { return IO_FLOPPY; }
+
+ virtual bool is_readable() const override { return true; }
+ virtual bool is_writeable() const override { return true; }
+ virtual bool is_creatable() const override { return true; }
+ virtual bool must_be_loaded() const override { return false; }
+ virtual bool is_reset_on_load() const override { return false; }
+ virtual const char *file_extensions() const override { return extension_list; }
+ virtual const option_guide *create_option_guide() const override { return nullptr; }
void setup_write(floppy_image_format_t *output_format);
void setup_load_cb(load_cb cb);
@@ -131,7 +131,7 @@ public:
UINT32 get_form_factor() const;
UINT32 get_variant() const;
- virtual ui_menu *get_selection_menu(running_machine &machine, class render_container *container);
+ virtual ui_menu *get_selection_menu(running_machine &machine, class render_container *container) override;
static const floppy_format_type default_floppy_formats[];
@@ -140,12 +140,12 @@ public:
protected:
// device-level overrides
- virtual void device_config_complete();
- virtual void device_start();
- virtual void device_reset();
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
+ virtual void device_config_complete() override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- virtual machine_config_constructor device_mconfig_additions() const;
+ virtual machine_config_constructor device_mconfig_additions() const override;
virtual void setup_characteristics() = 0;
@@ -209,7 +209,7 @@ public:
ui_menu_control_floppy_image(running_machine &machine, render_container *container, device_image_interface *image);
virtual ~ui_menu_control_floppy_image();
- virtual void handle();
+ virtual void handle() override;
protected:
enum { SELECT_FORMAT = LAST_ID, SELECT_MEDIA, SELECT_RW };
@@ -219,7 +219,7 @@ protected:
std::string input_filename, output_filename;
void do_load_create();
- virtual void hook_load(std::string filename, bool softlist);
+ virtual void hook_load(std::string filename, bool softlist) override;
};
@@ -283,11 +283,11 @@ public:
void register_for_save_states();
protected:
- void device_start();
+ void device_start() override;
private:
// device_sound_interface overrides
- void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
+ void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
sound_stream* m_sound;
bool m_loaded;
@@ -323,8 +323,8 @@ public:
void enable_sound(bool doit) { m_enable_sound = doit; }
protected:
- virtual void device_start();
- virtual void device_config_complete();
+ virtual void device_start() override;
+ virtual void device_config_complete() override;
private:
const floppy_format_type *formats;
diff --git a/src/devices/imagedev/harddriv.cpp b/src/devices/imagedev/harddriv.cpp
index bc39d53e4b3..8b0ea459be5 100644
--- a/src/devices/imagedev/harddriv.cpp
+++ b/src/devices/imagedev/harddriv.cpp
@@ -41,11 +41,11 @@ const device_type HARDDISK = &device_creator<harddisk_image_device>;
harddisk_image_device::harddisk_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HARDDISK, "Harddisk", tag, owner, clock, "harddisk_image", __FILE__),
device_image_interface(mconfig, *this),
- m_chd(NULL),
- m_hard_disk_handle(NULL),
+ m_chd(nullptr),
+ m_hard_disk_handle(nullptr),
m_device_image_load(device_image_load_delegate()),
m_device_image_unload(device_image_func_delegate()),
- m_interface(NULL)
+ m_interface(nullptr)
{
}
@@ -55,11 +55,11 @@ harddisk_image_device::harddisk_image_device(const machine_config &mconfig, cons
harddisk_image_device::harddisk_image_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_image_interface(mconfig, *this),
- m_chd(NULL),
- m_hard_disk_handle(NULL),
+ m_chd(nullptr),
+ m_hard_disk_handle(nullptr),
m_device_image_load(device_image_load_delegate()),
m_device_image_unload(device_image_func_delegate()),
- m_interface(NULL)
+ m_interface(nullptr)
{
}
@@ -96,17 +96,17 @@ const option_guide *harddisk_image_device::create_option_guide() const
void harddisk_image_device::device_start()
{
- m_chd = NULL;
+ m_chd = nullptr;
// try to locate the CHD from a DISK_REGION
chd_file *handle = get_disk_handle(machine(), tag());
- if (handle != NULL)
+ if (handle != nullptr)
{
m_hard_disk_handle = hard_disk_open(handle);
}
else
{
- m_hard_disk_handle = NULL;
+ m_hard_disk_handle = nullptr;
}
}
@@ -175,15 +175,15 @@ void harddisk_image_device::call_unload()
m_device_image_unload(*this);
}
- if (m_hard_disk_handle != NULL)
+ if (m_hard_disk_handle != nullptr)
{
hard_disk_close(m_hard_disk_handle);
- m_hard_disk_handle = NULL;
+ m_hard_disk_handle = nullptr;
}
m_origchd.close();
m_diffchd.close();
- m_chd = NULL;
+ m_chd = nullptr;
}
/*-------------------------------------------------
@@ -233,13 +233,13 @@ int harddisk_image_device::internal_load_hd()
{
chd_error err = CHDERR_NONE;
- m_chd = NULL;
+ m_chd = nullptr;
if (m_hard_disk_handle)
hard_disk_close(m_hard_disk_handle);
/* open the CHD file */
- if (software_entry() != NULL)
+ if (software_entry() != nullptr)
{
m_chd = get_disk_handle(device().machine(), device().subtag("harddriv").c_str());
}
@@ -264,18 +264,18 @@ int harddisk_image_device::internal_load_hd()
}
}
- if (m_chd != NULL)
+ if (m_chd != nullptr)
{
/* open the hard disk file */
m_hard_disk_handle = hard_disk_open(m_chd);
- if (m_hard_disk_handle != NULL)
+ if (m_hard_disk_handle != nullptr)
return IMAGE_INIT_PASS;
}
/* if we had an error, close out the CHD */
m_origchd.close();
m_diffchd.close();
- m_chd = NULL;
+ m_chd = nullptr;
seterror(IMAGE_ERROR_UNSPECIFIED, chd_file::error_string(err));
return IMAGE_INIT_FAIL;
@@ -290,7 +290,7 @@ int harddisk_image_device::internal_load_hd()
chd_file *harddisk_image_device::get_chd_file()
{
- chd_file *result = NULL;
+ chd_file *result = nullptr;
hard_disk_file *hd_file = get_hard_disk_file();
if (hd_file)
result = hard_disk_get_chd(hd_file);
diff --git a/src/devices/imagedev/mfmhd.cpp b/src/devices/imagedev/mfmhd.cpp
index e1cccc6f660..bc8987d7b0f 100644
--- a/src/devices/imagedev/mfmhd.cpp
+++ b/src/devices/imagedev/mfmhd.cpp
@@ -310,10 +310,10 @@ std::string mfm_harddisk_device::tts(const attotime &t)
mfm_harddisk_device::mfm_harddisk_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)
: harddisk_image_device(mconfig, type, name, tag, owner, clock, shortname, source),
device_slot_card_interface(mconfig, *this),
- m_index_timer(NULL),
- m_spinup_timer(NULL),
- m_seek_timer(NULL),
- m_cache_timer(NULL),
+ m_index_timer(nullptr),
+ m_spinup_timer(nullptr),
+ m_seek_timer(nullptr),
+ m_cache_timer(nullptr),
m_precomp_cyl(0),
m_redwc_cyl(0),
m_encoding(),
@@ -327,7 +327,7 @@ mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_t
m_autotruncation(false),
m_recalibrated(false),
m_step_line(),
- m_format(NULL)
+ m_format(nullptr)
{
m_spinupms = 10000;
m_cachelines = 5;
@@ -337,7 +337,7 @@ mfm_harddisk_device::mfm_harddisk_device(const machine_config &mconfig, device_t
m_cell_size = 100;
m_rpm = 3600; // MFM drives have a revolution rate of 3600 rpm (i.e. 60/sec)
m_trackimage_size = (int)((60000000000ULL / (m_rpm * m_cell_size)) / 16 + 1);
- m_cache = NULL;
+ m_cache = nullptr;
// We will calculate default values from the time specs later.
m_seeknext_time = 0;
m_maxseek_time = 0;
@@ -382,7 +382,7 @@ void mfm_harddisk_device::device_reset()
void mfm_harddisk_device::device_stop()
{
- if (m_cache!=NULL) global_free(m_cache);
+ if (m_cache!=nullptr) global_free(m_cache);
}
/*
@@ -404,7 +404,7 @@ bool mfm_harddisk_device::call_load()
std::string metadata;
chd_file* chdfile = get_chd_file();
- if (chdfile==NULL)
+ if (chdfile==nullptr)
{
logerror("%s: chdfile is null\n", tag());
return IMAGE_INIT_FAIL;
@@ -523,7 +523,7 @@ void mfm_harddisk_device::call_unload()
mfmhd_layout_params* params = m_format->get_current_params();
mfmhd_layout_params* oldparams = m_format->get_initial_params();
- if (m_cache!=NULL)
+ if (m_cache!=nullptr)
{
m_cache->cleanup();
@@ -814,7 +814,7 @@ bool mfm_harddisk_device::read(attotime &from_when, const attotime &limit, UINT1
{
UINT16* track = m_cache->get_trackimage(m_current_cylinder, m_current_head);
- if (track==NULL)
+ if (track==nullptr)
{
// What shall we do in this case?
throw emu_fatalerror("Cannot read CHD image");
@@ -853,7 +853,7 @@ bool mfm_harddisk_device::write(attotime &from_when, const attotime &limit, UINT
{
UINT16* track = m_cache->get_trackimage(m_current_cylinder, m_current_head);
- if (track==NULL)
+ if (track==nullptr)
{
// What shall we do in this case?
throw emu_fatalerror("Cannot read CHD image");
@@ -970,8 +970,8 @@ const device_type MFMHD_ST251 = &device_creator<mfm_hd_st251_device>;
// ===========================================================
mfmhd_trackimage_cache::mfmhd_trackimage_cache(running_machine &machine):
- m_mfmhd(NULL),
- m_tracks(NULL),
+ m_mfmhd(nullptr),
+ m_tracks(nullptr),
m_machine(machine)
{
}
@@ -981,7 +981,7 @@ mfmhd_trackimage_cache::~mfmhd_trackimage_cache()
mfmhd_trackimage* current = m_tracks;
if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache destroy\n", m_mfmhd->tag());
- while (current != NULL)
+ while (current != nullptr)
{
global_free_array(current->encdata);
mfmhd_trackimage* currenttmp = current->next;
@@ -994,7 +994,7 @@ void mfmhd_trackimage_cache::write_back_one()
{
mfmhd_trackimage* current = m_tracks;
- while (current != NULL)
+ while (current != nullptr)
{
if (current->dirty)
{
@@ -1013,7 +1013,7 @@ void mfmhd_trackimage_cache::cleanup()
if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache cleanup\n", m_mfmhd->tag());
// Still dirty?
- while (current != NULL)
+ while (current != nullptr)
{
if (TRACE_CACHE) m_machine.logerror("%s: MFM HD cache: evict line cylinder=%d head=%d\n", m_mfmhd->tag(), current->cylinder, current->head);
if (current->dirty)
@@ -1047,7 +1047,7 @@ void mfmhd_trackimage_cache::init(mfm_harddisk_device* mfmhd, int tracksize, int
chd_error state;
mfmhd_trackimage* previous;
- mfmhd_trackimage* current = NULL;
+ mfmhd_trackimage* current = nullptr;
m_mfmhd = mfmhd;
@@ -1077,9 +1077,9 @@ void mfmhd_trackimage_cache::init(mfm_harddisk_device* mfmhd, int tracksize, int
head = 0;
cylinder++;
}
- current->next = NULL;
+ current->next = nullptr;
- if (previous != NULL)
+ if (previous != nullptr)
previous->next = current;
else
// Head
@@ -1100,7 +1100,7 @@ UINT16* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head)
{
// Search the cached track images
mfmhd_trackimage* current = m_tracks;
- mfmhd_trackimage* previous = NULL;
+ mfmhd_trackimage* previous = nullptr;
chd_error state = CHDERR_NONE;
@@ -1109,13 +1109,13 @@ UINT16* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head)
while (state == CHDERR_NONE)
{
// A simple linear search
- while (current != NULL)
+ while (current != nullptr)
{
if (current->cylinder == cylinder && current->head == head)
{
// found it
// move it to the front of the chain for LRU
- if (previous != NULL)
+ if (previous != nullptr)
{
previous->next = current->next; // pull out here
current->next = m_tracks; // put the previous head into the next field
@@ -1126,7 +1126,7 @@ UINT16* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head)
else
{
// Don't lose the pointer to the next tail
- if (current->next != NULL) previous = current;
+ if (current->next != nullptr) previous = current;
current = current->next;
}
}
@@ -1152,7 +1152,7 @@ UINT16* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head)
current->head = head;
}
// If we are here we have a CHD error.
- return NULL;
+ return nullptr;
}
// ================================================================
@@ -1163,7 +1163,7 @@ mfm_harddisk_connector::mfm_harddisk_connector(const machine_config &mconfig, co
m_encoding(),
m_spinupms(0),
m_cachesize(0),
- m_format(NULL)
+ m_format(nullptr)
{
}
@@ -1187,7 +1187,7 @@ void mfm_harddisk_connector::configure(mfmhd_enc_t encoding, int spinupms, int c
void mfm_harddisk_connector::device_config_complete()
{
mfm_harddisk_device *dev = get_device();
- if (dev != NULL)
+ if (dev != nullptr)
{
dev->set_encoding(m_encoding);
dev->set_spinup_time(m_spinupms);
diff --git a/src/devices/imagedev/midiin.cpp b/src/devices/imagedev/midiin.cpp
index 8d32dbcba27..ae5bdb81eb8 100644
--- a/src/devices/imagedev/midiin.cpp
+++ b/src/devices/imagedev/midiin.cpp
@@ -26,8 +26,8 @@ midiin_device::midiin_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, MIDIIN, "MIDI In image device", tag, owner, clock, "midiin", __FILE__),
device_image_interface(mconfig, *this),
device_serial_interface(mconfig, *this),
- m_midi(NULL),
- m_timer(NULL),
+ m_midi(nullptr),
+ m_timer(nullptr),
m_input_cb(*this),
m_xmit_read(0),
m_xmit_write(0),
@@ -43,7 +43,7 @@ void midiin_device::device_start()
{
m_input_cb.resolve_safe();
m_timer = timer_alloc(0);
- m_midi = NULL;
+ m_midi = nullptr;
m_timer->enable(false);
}
@@ -81,7 +81,7 @@ void midiin_device::device_timer(emu_timer &timer, device_timer_id id, int param
UINT8 buf[8192*4];
int bytesRead;
- if (m_midi == NULL) {
+ if (m_midi == nullptr) {
return;
}
@@ -110,7 +110,7 @@ bool midiin_device::call_load(void)
if (!m_midi->open_input(filename()))
{
global_free(m_midi);
- m_midi = NULL;
+ m_midi = nullptr;
return IMAGE_INIT_FAIL;
}
@@ -131,7 +131,7 @@ void midiin_device::call_unload(void)
global_free(m_midi);
}
m_timer->enable(false);
- m_midi = NULL;
+ m_midi = nullptr;
}
void midiin_device::tra_complete()
diff --git a/src/devices/imagedev/midiin.h b/src/devices/imagedev/midiin.h
index d8cc99eb0aa..42c6873cb4f 100644
--- a/src/devices/imagedev/midiin.h
+++ b/src/devices/imagedev/midiin.h
@@ -43,7 +43,7 @@ public:
virtual bool is_reset_on_load() const { return 0; }
virtual const char *file_extensions() const { return "mid"; }
virtual bool core_opens_image_file() const { return FALSE; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
protected:
// device-level overrides
diff --git a/src/devices/imagedev/midiout.cpp b/src/devices/imagedev/midiout.cpp
index 33e6d911294..a8651c40b49 100644
--- a/src/devices/imagedev/midiout.cpp
+++ b/src/devices/imagedev/midiout.cpp
@@ -26,7 +26,7 @@ midiout_device::midiout_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, MIDIOUT, "MIDI Out image device", tag, owner, clock, "midiout", __FILE__),
device_image_interface(mconfig, *this),
device_serial_interface(mconfig, *this),
- m_midi(NULL)
+ m_midi(nullptr)
{
}
@@ -36,7 +36,7 @@ midiout_device::midiout_device(const machine_config &mconfig, const char *tag, d
void midiout_device::device_start()
{
- m_midi = NULL;
+ m_midi = nullptr;
}
void midiout_device::device_reset()
@@ -72,7 +72,7 @@ bool midiout_device::call_load(void)
if (!m_midi->open_output(filename()))
{
global_free(m_midi);
- m_midi = NULL;
+ m_midi = nullptr;
return IMAGE_INIT_FAIL;
}
@@ -89,7 +89,7 @@ void midiout_device::call_unload(void)
{
m_midi->close();
global_free(m_midi);
- m_midi = NULL;
+ m_midi = nullptr;
}
}
diff --git a/src/devices/imagedev/midiout.h b/src/devices/imagedev/midiout.h
index 5ac4d7c3ed4..d6da8c732c2 100644
--- a/src/devices/imagedev/midiout.h
+++ b/src/devices/imagedev/midiout.h
@@ -46,7 +46,7 @@ public:
virtual bool is_reset_on_load() const { return 0; }
virtual const char *file_extensions() const { return "mid"; }
virtual bool core_opens_image_file() const { return FALSE; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual void tx(UINT8 state) { rx_w(state); }
diff --git a/src/devices/imagedev/printer.h b/src/devices/imagedev/printer.h
index 8e6ca051fdc..ccd388d6663 100644
--- a/src/devices/imagedev/printer.h
+++ b/src/devices/imagedev/printer.h
@@ -42,7 +42,7 @@ public:
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
virtual const char *file_extensions() const { return "prn"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// specific implementation
diff --git a/src/devices/imagedev/snapquik.cpp b/src/devices/imagedev/snapquik.cpp
index 81d4049edbb..a3c55ff4064 100644
--- a/src/devices/imagedev/snapquik.cpp
+++ b/src/devices/imagedev/snapquik.cpp
@@ -21,22 +21,22 @@ const device_type SNAPSHOT = &device_creator<snapshot_image_device>;
snapshot_image_device::snapshot_image_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SNAPSHOT, "Snapshot", tag, owner, clock, "snapshot_image", __FILE__),
device_image_interface(mconfig, *this),
- m_file_extensions(NULL),
- m_interface(NULL),
+ m_file_extensions(nullptr),
+ m_interface(nullptr),
m_delay_seconds(0),
m_delay_attoseconds(0),
- m_timer(NULL)
+ m_timer(nullptr)
{
}
snapshot_image_device::snapshot_image_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_image_interface(mconfig, *this),
- m_file_extensions(NULL),
- m_interface(NULL),
+ m_file_extensions(nullptr),
+ m_interface(nullptr),
m_delay_seconds(0),
m_delay_attoseconds(0),
- m_timer(NULL)
+ m_timer(nullptr)
{
}
//-------------------------------------------------
diff --git a/src/devices/imagedev/snapquik.h b/src/devices/imagedev/snapquik.h
index a9e186ba2bd..5ef6f1dc191 100644
--- a/src/devices/imagedev/snapquik.h
+++ b/src/devices/imagedev/snapquik.h
@@ -37,7 +37,7 @@ public:
virtual bool is_reset_on_load() const { return 0; }
virtual const char *image_interface() const { return m_interface; }
virtual const char *file_extensions() const { return m_file_extensions; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
TIMER_CALLBACK_MEMBER(process_snapshot_or_quickload);
void set_handler(snapquick_load_delegate load, const char *ext, seconds_t sec) { m_load = load; m_file_extensions = ext; m_delay_seconds = sec; };
diff --git a/src/devices/machine/53c810.cpp b/src/devices/machine/53c810.cpp
index a2a22f0fac0..1323e822d69 100644
--- a/src/devices/machine/53c810.cpp
+++ b/src/devices/machine/53c810.cpp
@@ -634,9 +634,9 @@ void lsi53c810_device::device_start()
m_dma_cb.bind_relative_to(*owner());
m_fetch_cb.bind_relative_to(*owner());
- for (int i = 0; i < 256; i++)
+ for (auto & elem : dma_opcode)
{
- dma_opcode[i] = opcode_handler_delegate(FUNC(lsi53c810_device::dmaop_invalid), this);
+ elem = opcode_handler_delegate(FUNC(lsi53c810_device::dmaop_invalid), this);
}
add_opcode(0x00, 0xc0, opcode_handler_delegate(FUNC( lsi53c810_device::dmaop_block_move ), this));
@@ -671,7 +671,7 @@ UINT32 lsi53c810_device::lsi53c810_dasm_fetch(UINT32 pc)
unsigned lsi53c810_device::lsi53c810_dasm(char *buf, UINT32 pc)
{
unsigned result = 0;
- const char *op_mnemonic = NULL;
+ const char *op_mnemonic = nullptr;
UINT32 op = lsi53c810_dasm_fetch(pc);
UINT32 dest;
int i;
diff --git a/src/devices/machine/64h156.cpp b/src/devices/machine/64h156.cpp
index 508034169dd..fbbe84d7383 100644
--- a/src/devices/machine/64h156.cpp
+++ b/src/devices/machine/64h156.cpp
@@ -59,7 +59,7 @@ c64h156_device::c64h156_device(const machine_config &mconfig, const char *tag, d
m_write_atn(*this),
m_write_sync(*this),
m_write_byte(*this),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_mtr(1),
m_accl(0),
m_stp(0),
diff --git a/src/devices/machine/6525tpi.cpp b/src/devices/machine/6525tpi.cpp
index 038440e29d3..8d5a43a2b35 100644
--- a/src/devices/machine/6525tpi.cpp
+++ b/src/devices/machine/6525tpi.cpp
@@ -132,9 +132,9 @@ tpi6525_device::tpi6525_device(const machine_config &mconfig, const char *tag, d
m_cr(0),
m_air(0)
{
- for (int i = 0; i < 5; i++)
+ for (auto & elem : m_irq_level)
{
- m_irq_level[i] = 0;
+ elem = 0;
}
}
diff --git a/src/devices/machine/6532riot.cpp b/src/devices/machine/6532riot.cpp
index a8d952d07ba..8ef5566fbde 100644
--- a/src/devices/machine/6532riot.cpp
+++ b/src/devices/machine/6532riot.cpp
@@ -400,7 +400,7 @@ riot6532_device::riot6532_device(const machine_config &mconfig, const char *tag,
m_pa7prev(0),
m_timershift(0),
m_timerstate(0),
- m_timer(NULL)
+ m_timer(nullptr)
{
memset(m_port, 0x00, sizeof(m_port));
}
diff --git a/src/devices/machine/68307.cpp b/src/devices/machine/68307.cpp
index 320c701acc7..2c3649023be 100644
--- a/src/devices/machine/68307.cpp
+++ b/src/devices/machine/68307.cpp
@@ -61,9 +61,9 @@ m68307cpu_device::m68307cpu_device(const machine_config &mconfig, const char *ta
write_outport(*this),
m_duart(*this, "internal68681")
{
- m68307SIM = 0;
- m68307MBUS = 0;
- m68307TIMER = 0;
+ m68307SIM = nullptr;
+ m68307MBUS = nullptr;
+ m68307TIMER = nullptr;
m68307_base = 0;
m68307_scrhigh = 0;
m68307_scrlow = 0;
diff --git a/src/devices/machine/68307bus.cpp b/src/devices/machine/68307bus.cpp
index c9af37df775..4d6b2928d40 100644
--- a/src/devices/machine/68307bus.cpp
+++ b/src/devices/machine/68307bus.cpp
@@ -11,7 +11,7 @@ READ8_MEMBER( m68307cpu_device::m68307_internal_mbus_r )
{
m68307cpu_device *m68k = this;
m68307_mbus* mbus = m68k->m68307MBUS;
- assert(mbus != NULL);
+ assert(mbus != nullptr);
UINT8 retval;
if (mbus)
@@ -59,7 +59,7 @@ WRITE8_MEMBER( m68307cpu_device::m68307_internal_mbus_w )
{
m68307cpu_device *m68k = this;
m68307_mbus* mbus = m68k->m68307MBUS;
- assert(mbus != NULL);
+ assert(mbus != nullptr);
if (mbus)
{
diff --git a/src/devices/machine/68307sim.cpp b/src/devices/machine/68307sim.cpp
index 873d065b385..7d293d6f8d7 100644
--- a/src/devices/machine/68307sim.cpp
+++ b/src/devices/machine/68307sim.cpp
@@ -10,7 +10,7 @@ READ16_MEMBER( m68307cpu_device::m68307_internal_sim_r )
{
m68307cpu_device *m68k = this;
m68307_sim* sim = m68k->m68307SIM;
- assert(sim != NULL);
+ assert(sim != nullptr);
int pc = space.device().safe_pc();
@@ -47,7 +47,7 @@ WRITE16_MEMBER( m68307cpu_device::m68307_internal_sim_w )
{
m68307cpu_device *m68k = this;
m68307_sim* sim = m68k->m68307SIM;
- assert(sim != NULL);
+ assert(sim != nullptr);
int pc = space.device().safe_pc();
diff --git a/src/devices/machine/68307tmu.cpp b/src/devices/machine/68307tmu.cpp
index 9077468f55d..6f5c33687cd 100644
--- a/src/devices/machine/68307tmu.cpp
+++ b/src/devices/machine/68307tmu.cpp
@@ -10,7 +10,7 @@ READ16_MEMBER( m68307cpu_device::m68307_internal_timer_r )
{
m68307cpu_device *m68k = this;
m68307_timer* timer = m68k->m68307TIMER;
- assert(timer != NULL);
+ assert(timer != nullptr);
if (timer)
{
@@ -36,7 +36,7 @@ WRITE16_MEMBER( m68307cpu_device::m68307_internal_timer_w )
{
m68307cpu_device *m68k = this;
m68307_timer* timer = m68k->m68307TIMER;
- assert(timer != NULL);
+ assert(timer != nullptr);
if (timer)
{
@@ -223,9 +223,9 @@ void m68307_timer::write_trr(UINT16 data, UINT16 mem_mask, int which)
void m68307_timer::reset(void)
{
- for (int i=0;i<2;i++)
+ for (auto & elem : singletimer)
{
- m68307_single_timer* tptr = &singletimer[i];
+ m68307_single_timer* tptr = &elem;
tptr->regs[m68307TIMER_TMR] = 0x0000;
tptr->regs[m68307TIMER_TRR] = 0xffff;
diff --git a/src/devices/machine/68340.cpp b/src/devices/machine/68340.cpp
index 752a7be4592..b9ddd9c4b16 100644
--- a/src/devices/machine/68340.cpp
+++ b/src/devices/machine/68340.cpp
@@ -112,10 +112,10 @@ ADDRESS_MAP_END
m68340cpu_device::m68340cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: fscpu32_device(mconfig, "MC68340", tag, owner, clock, M68340, 32,32, ADDRESS_MAP_NAME(m68340_internal_map), "mc68340", __FILE__)
{
- m68340SIM = 0;
- m68340DMA = 0;
- m68340SERIAL = 0;
- m68340TIMER = 0;
+ m68340SIM = nullptr;
+ m68340DMA = nullptr;
+ m68340SERIAL = nullptr;
+ m68340TIMER = nullptr;
m68340_base = 0;
}
diff --git a/src/devices/machine/68340dma.cpp b/src/devices/machine/68340dma.cpp
index 9ee0ae5114e..84f17f6c1cb 100644
--- a/src/devices/machine/68340dma.cpp
+++ b/src/devices/machine/68340dma.cpp
@@ -10,7 +10,7 @@ READ32_MEMBER( m68340cpu_device::m68340_internal_dma_r )
{
m68340cpu_device *m68k = this;
m68340_dma* dma = m68k->m68340DMA;
- assert(dma != NULL);
+ assert(dma != nullptr);
if (dma)
{
@@ -25,7 +25,7 @@ WRITE32_MEMBER( m68340cpu_device::m68340_internal_dma_w )
{
m68340cpu_device *m68k = this;
m68340_dma* dma = m68k->m68340DMA;
- assert(dma != NULL);
+ assert(dma != nullptr);
if (dma)
{
diff --git a/src/devices/machine/68340ser.cpp b/src/devices/machine/68340ser.cpp
index 9e4118ec92e..230b6c7a71b 100644
--- a/src/devices/machine/68340ser.cpp
+++ b/src/devices/machine/68340ser.cpp
@@ -10,7 +10,7 @@ READ32_MEMBER( m68340cpu_device::m68340_internal_serial_r )
{
m68340cpu_device *m68k = this;
m68340_serial* serial = m68k->m68340SERIAL;
- assert(serial != NULL);
+ assert(serial != nullptr);
if (serial)
{
@@ -25,7 +25,7 @@ WRITE32_MEMBER( m68340cpu_device::m68340_internal_serial_w )
{
m68340cpu_device *m68k = this;
m68340_serial* serial = m68k->m68340SERIAL;
- assert(serial != NULL);
+ assert(serial != nullptr);
if (serial)
{
diff --git a/src/devices/machine/68340sim.cpp b/src/devices/machine/68340sim.cpp
index 88e56d78763..f1d346e880b 100644
--- a/src/devices/machine/68340sim.cpp
+++ b/src/devices/machine/68340sim.cpp
@@ -11,7 +11,7 @@ READ16_MEMBER( m68340cpu_device::m68340_internal_sim_r )
{
m68340cpu_device *m68k = this;
m68340_sim* sim = m68k->m68340SIM;
- assert(sim != NULL);
+ assert(sim != nullptr);
if (sim)
{
@@ -62,7 +62,7 @@ READ8_MEMBER( m68340cpu_device::m68340_internal_sim_ports_r )
offset += 0x10;
m68340cpu_device *m68k = this;
m68340_sim* sim = m68k->m68340SIM;
- assert(sim != NULL);
+ assert(sim != nullptr);
if (sim)
{
@@ -118,7 +118,7 @@ READ32_MEMBER( m68340cpu_device::m68340_internal_sim_cs_r )
m68340cpu_device *m68k = this;
m68340_sim* sim = m68k->m68340SIM;
- assert(sim != NULL);
+ assert(sim != nullptr);
if (sim)
{
@@ -148,7 +148,7 @@ WRITE16_MEMBER( m68340cpu_device::m68340_internal_sim_w )
{
m68340cpu_device *m68k = this;
m68340_sim* sim = m68k->m68340SIM;
- assert(sim != NULL);
+ assert(sim != nullptr);
if (sim)
{
@@ -207,7 +207,7 @@ WRITE8_MEMBER( m68340cpu_device::m68340_internal_sim_ports_w )
offset += 0x10;
m68340cpu_device *m68k = this;
m68340_sim* sim = m68k->m68340SIM;
- assert(sim != NULL);
+ assert(sim != nullptr);
if (sim)
{
@@ -260,7 +260,7 @@ WRITE32_MEMBER( m68340cpu_device::m68340_internal_sim_cs_w )
offset += m68340SIM_AM_CS0>>2;
m68340cpu_device *m68k = this;
m68340_sim* sim = m68k->m68340SIM;
- assert(sim != NULL);
+ assert(sim != nullptr);
if (sim)
{
diff --git a/src/devices/machine/68340tmu.cpp b/src/devices/machine/68340tmu.cpp
index f8109214ba0..faffb9d1181 100644
--- a/src/devices/machine/68340tmu.cpp
+++ b/src/devices/machine/68340tmu.cpp
@@ -10,7 +10,7 @@ READ32_MEMBER( m68340cpu_device::m68340_internal_timer_r )
{
m68340cpu_device *m68k = this;
m68340_timer* timer = m68k->m68340TIMER;
- assert(timer != NULL);
+ assert(timer != nullptr);
if (timer)
{
@@ -25,7 +25,7 @@ WRITE32_MEMBER( m68340cpu_device::m68340_internal_timer_w )
{
m68340cpu_device *m68k = this;
m68340_timer* timer = m68k->m68340TIMER;
- assert(timer != NULL);
+ assert(timer != nullptr);
if (timer)
{
diff --git a/src/devices/machine/6840ptm.cpp b/src/devices/machine/6840ptm.cpp
index 239498f681c..bbf9a57ce18 100644
--- a/src/devices/machine/6840ptm.cpp
+++ b/src/devices/machine/6840ptm.cpp
@@ -92,19 +92,19 @@ void ptm6840_device::device_start()
m_out2_cb.resolve_safe();
m_irq_cb.resolve_safe();
- for (int i = 0; i < 3; i++)
+ for (auto & elem : m_external_clock)
{
- if ( m_external_clock[i] == 0 )
- m_external_clock[i] = 1;
+ if ( elem == 0 )
+ elem = 1;
}
m_timer[0] = timer_alloc(0);
m_timer[1] = timer_alloc(1);
m_timer[2] = timer_alloc(2);
- for (int i = 0; i < 3; i++)
+ for (auto & elem : m_timer)
{
- m_timer[i]->enable(false);
+ elem->enable(false);
}
// register for state saving
diff --git a/src/devices/machine/74148.cpp b/src/devices/machine/74148.cpp
index 02d1be3927a..71520535f63 100644
--- a/src/devices/machine/74148.cpp
+++ b/src/devices/machine/74148.cpp
@@ -56,8 +56,8 @@ ttl74148_device::ttl74148_device(const machine_config &mconfig, const char *tag,
m_last_output_valid(0),
m_last_enable_output(0)
{
- for (int i = 0; i < 8; i++)
- m_input_lines[i] = 0;
+ for (auto & elem : m_input_lines)
+ elem = 0;
}
//-------------------------------------------------
diff --git a/src/devices/machine/74153.cpp b/src/devices/machine/74153.cpp
index e38194f5d6e..d5b8ad37634 100644
--- a/src/devices/machine/74153.cpp
+++ b/src/devices/machine/74153.cpp
@@ -55,14 +55,14 @@ ttl74153_device::ttl74153_device(const machine_config &mconfig, const char *tag,
m_input_lines[1][2] = 0;
m_input_lines[1][3] = 0;
- for (int i = 0; i < 2; i++)
- m_enable[i] = 0;
+ for (auto & elem : m_enable)
+ elem = 0;
- for (int i = 0; i < 2; i++)
- m_output[i] = 0;
+ for (auto & elem : m_output)
+ elem = 0;
- for (int i = 0; i < 2; i++)
- m_last_output[i] = 0;
+ for (auto & elem : m_last_output)
+ elem = 0;
}
//-------------------------------------------------
diff --git a/src/devices/machine/akiko.cpp b/src/devices/machine/akiko.cpp
index 99acef43cab..0c7ef441ad2 100644
--- a/src/devices/machine/akiko.cpp
+++ b/src/devices/machine/akiko.cpp
@@ -75,11 +75,11 @@ akiko_device::akiko_device(const machine_config &mconfig, const char *tag, devic
m_cdrom_cmd_start(0),
m_cdrom_cmd_end(0),
m_cdrom_cmd_resp(0),
- m_cdda(NULL),
- m_cdrom(NULL),
- m_cdrom_toc(NULL),
- m_dma_timer(NULL),
- m_frame_timer(NULL),
+ m_cdda(nullptr),
+ m_cdrom(nullptr),
+ m_cdrom_toc(nullptr),
+ m_dma_timer(nullptr),
+ m_frame_timer(nullptr),
m_cdrom_is_device(0),
m_scl_w(*this),
m_sda_r(*this),
@@ -147,7 +147,7 @@ void akiko_device::device_start()
device_t *cpu = machine().device(m_cputag);
m_space = &cpu->memory().space(AS_PROGRAM);
- m_cdrom_toc = NULL;
+ m_cdrom_toc = nullptr;
m_dma_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(akiko_device::dma_proc), this));
m_frame_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(akiko_device::frame_proc), this));
m_cdda = machine().device<cdda_device>("cdda");
@@ -161,7 +161,7 @@ void akiko_device::device_reset()
{
cdrom_image_device *cddevice = machine().device<cdrom_image_device>("cdrom");
- if (cddevice != NULL)
+ if (cddevice != nullptr)
{
// MESS case
m_cdrom = cddevice->get_cdrom_file();
@@ -175,7 +175,7 @@ void akiko_device::device_reset()
}
/* create the TOC table */
- if ( m_cdrom != NULL && cdrom_get_last_track(m_cdrom) )
+ if ( m_cdrom != nullptr && cdrom_get_last_track(m_cdrom) )
{
UINT8 *p;
int i, addrctrl = cdrom_get_adr_control( m_cdrom, 0 );
@@ -236,7 +236,7 @@ void akiko_device::device_stop()
if( m_cdrom )
{
cdrom_close(m_cdrom);
- m_cdrom = (cdrom_file *)NULL;
+ m_cdrom = (cdrom_file *)nullptr;
}
}
}
@@ -347,7 +347,7 @@ static const char* get_akiko_reg_name(int reg)
void akiko_device::cdda_stop()
{
- if (m_cdda != NULL)
+ if (m_cdda != nullptr)
{
m_cdda->stop_audio();
m_frame_timer->reset( );
@@ -356,7 +356,7 @@ void akiko_device::cdda_stop()
void akiko_device::cdda_play(UINT32 lba, UINT32 num_blocks)
{
- if (m_cdda != NULL)
+ if (m_cdda != nullptr)
{
m_cdda->start_audio(lba, num_blocks);
m_frame_timer->adjust( attotime::from_hz( 75 ) );
@@ -365,7 +365,7 @@ void akiko_device::cdda_play(UINT32 lba, UINT32 num_blocks)
void akiko_device::cdda_pause(int pause)
{
- if (m_cdda != NULL)
+ if (m_cdda != nullptr)
{
if (m_cdda->audio_active() && m_cdda->audio_paused() != pause )
{
@@ -387,7 +387,7 @@ UINT8 akiko_device::cdda_getstatus(UINT32 *lba)
{
if ( lba ) *lba = 0;
- if (m_cdda != NULL)
+ if (m_cdda != nullptr)
{
if (m_cdda->audio_active())
{
@@ -430,9 +430,9 @@ TIMER_CALLBACK_MEMBER(akiko_device::frame_proc)
{
(void)param;
- if (m_cdda != NULL)
+ if (m_cdda != nullptr)
{
- UINT8 s = cdda_getstatus(NULL);
+ UINT8 s = cdda_getstatus(nullptr);
if ( s == 0x11 )
{
@@ -577,7 +577,7 @@ TIMER_CALLBACK_MEMBER( akiko_device::cd_delayed_cmd )
if ( m_cdrom_status[0] & 0x10000000 )
return;
- cddastatus = cdda_getstatus(NULL);
+ cddastatus = cdda_getstatus(nullptr);
if ( cddastatus == 0x11 || cddastatus == 0x12 )
return;
@@ -593,7 +593,7 @@ TIMER_CALLBACK_MEMBER( akiko_device::cd_delayed_cmd )
resp[0] = 0x06;
- if ( m_cdrom == NULL || m_cdrom_numtracks == 0 )
+ if ( m_cdrom == nullptr || m_cdrom_numtracks == 0 )
{
resp[1] = 0x80;
setup_response( 15, resp );
@@ -633,7 +633,7 @@ void akiko_device::update_cdrom()
{
resp[1] = 0x00;
- if ( cdda_getstatus(NULL) == 0x11 )
+ if ( cdda_getstatus(nullptr) == 0x11 )
resp[1] = 0x08;
cdda_pause(1);
@@ -646,7 +646,7 @@ void akiko_device::update_cdrom()
{
resp[1] = 0x00;
- if ( cdda_getstatus(NULL) == 0x11 )
+ if ( cdda_getstatus(nullptr) == 0x11 )
resp[1] = 0x08;
cdda_pause(0);
@@ -669,7 +669,7 @@ void akiko_device::update_cdrom()
m_cdrom_cmd_start = (m_cdrom_cmd_start+13) & 0xff;
- if ( m_cdrom == NULL || m_cdrom_numtracks == 0 )
+ if ( m_cdrom == nullptr || m_cdrom_numtracks == 0 )
{
resp[1] = 0x80;
setup_response( 2, resp );
@@ -776,7 +776,7 @@ void akiko_device::update_cdrom()
m_cdrom_cmd_start = (m_cdrom_cmd_start+2) & 0xff;
- if ( m_cdrom == NULL || m_cdrom_numtracks == 0 )
+ if ( m_cdrom == nullptr || m_cdrom_numtracks == 0 )
resp[1] = 0x80;
setup_response( 20, resp );
@@ -801,7 +801,7 @@ READ32_MEMBER( akiko_device::read )
switch( offset )
{
case 0x00/4: /* ID */
- if ( m_cdrom != NULL ) m_cdda->set_cdrom(m_cdrom);
+ if ( m_cdrom != nullptr ) m_cdda->set_cdrom(m_cdrom);
return 0x0000cafe;
case 0x04/4: /* CDROM STATUS 1 */
diff --git a/src/devices/machine/am9517a.cpp b/src/devices/machine/am9517a.cpp
index 734d542e37d..7f2ecb7e37f 100644
--- a/src/devices/machine/am9517a.cpp
+++ b/src/devices/machine/am9517a.cpp
@@ -557,13 +557,13 @@ void am9517a_device::device_start()
m_out_dack_2_cb.resolve_safe();
m_out_dack_3_cb.resolve_safe();
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_channel)
{
- m_channel[i].m_address = 0;
- m_channel[i].m_count = 0;
- m_channel[i].m_base_address = 0;
- m_channel[i].m_base_count = 0;
- m_channel[i].m_mode = 0;
+ elem.m_address = 0;
+ elem.m_count = 0;
+ elem.m_base_address = 0;
+ elem.m_base_count = 0;
+ elem.m_mode = 0;
}
// state saving
diff --git a/src/devices/machine/amigafdc.cpp b/src/devices/machine/amigafdc.cpp
index 8b2622e2182..e6cbe2911ae 100644
--- a/src/devices/machine/amigafdc.cpp
+++ b/src/devices/machine/amigafdc.cpp
@@ -34,10 +34,10 @@ void amiga_fdc::device_start()
if(con)
floppy_devices[i] = con->get_device();
else
- floppy_devices[i] = 0;
+ floppy_devices[i] = nullptr;
}
- floppy = 0;
+ floppy = nullptr;
t_gen = timer_alloc(0);
}
@@ -45,7 +45,7 @@ void amiga_fdc::device_start()
void amiga_fdc::device_reset()
{
- floppy = 0;
+ floppy = nullptr;
dsklen = 0x4000;
dsksync = 0x4489;
adkcon = 0;
@@ -457,7 +457,7 @@ WRITE8_MEMBER( amiga_fdc::ciaaprb_w )
else if(!(data & 0x40))
floppy = floppy_devices[3];
else
- floppy = 0;
+ floppy = nullptr;
if(old_floppy != floppy) {
if(old_floppy)
diff --git a/src/devices/machine/at28c16.cpp b/src/devices/machine/at28c16.cpp
index e50049d9cbc..9461850043d 100644
--- a/src/devices/machine/at28c16.cpp
+++ b/src/devices/machine/at28c16.cpp
@@ -79,7 +79,7 @@ void at28c16_device::device_validity_check(validity_checker &valid) const
const address_space_config *at28c16_device::memory_space_config( address_spacenum spacenum ) const
{
- return ( spacenum == 0 ) ? &m_space_config : NULL;
+ return ( spacenum == 0 ) ? &m_space_config : nullptr;
}
@@ -120,7 +120,7 @@ void at28c16_device::nvram_default()
}
/* populate from a memory region if present */
- if( m_region != NULL )
+ if( m_region != nullptr )
{
if( m_region->bytes() != AT28C16_DATA_BYTES )
{
diff --git a/src/devices/machine/at45dbxx.cpp b/src/devices/machine/at45dbxx.cpp
index 2890f8784d4..e61fcca498a 100644
--- a/src/devices/machine/at45dbxx.cpp
+++ b/src/devices/machine/at45dbxx.cpp
@@ -121,7 +121,7 @@ void at45db041_device::device_reset()
memset(&m_cmd.data[0], 0, sizeof(m_cmd.data));
m_cmd.size = 0;
// input/output
- m_io.data = NULL;
+ m_io.data = nullptr;
m_io.size = 0;
m_io.pos = 0;
// pins
@@ -144,7 +144,7 @@ void at45db041_device::nvram_default()
{
memset(&m_data[0], 0xff, m_data.size());
- if (region() != NULL)
+ if (region() != nullptr)
{
UINT32 bytes = region()->bytes();
if (bytes > m_size)
diff --git a/src/devices/machine/at_keybc.cpp b/src/devices/machine/at_keybc.cpp
index a2930d627f9..c77e6c8eed2 100644
--- a/src/devices/machine/at_keybc.cpp
+++ b/src/devices/machine/at_keybc.cpp
@@ -60,7 +60,7 @@ ROM_END
at_keyboard_controller_device::at_keyboard_controller_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, AT_KEYBOARD_CONTROLLER, "AT Keyboard Controller", tag, owner, clock, "at_keybc", __FILE__),
- m_cpu(NULL),
+ m_cpu(nullptr),
m_system_reset_cb(*this),
m_gate_a20_cb(*this),
m_input_buffer_full_cb(*this),
diff --git a/src/devices/machine/ataflash.cpp b/src/devices/machine/ataflash.cpp
index f6a1ea9192e..a7491f1eb1e 100644
--- a/src/devices/machine/ataflash.cpp
+++ b/src/devices/machine/ataflash.cpp
@@ -29,7 +29,7 @@ void ata_flash_pccard_device::device_reset()
memset(m_key, 0, sizeof(m_key));
memset(m_cis, 0xff, 512);
- if (m_handle != NULL)
+ if (m_handle != nullptr)
{
m_handle->read_metadata(PCMCIA_CIS_METADATA_TAG, 0, m_cis, 512, metalength);
@@ -97,7 +97,7 @@ READ16_MEMBER( ata_flash_pccard_device::read_reg )
WRITE16_MEMBER( ata_flash_pccard_device::write_reg )
{
- if(offset >= 0x280 && offset <= 0x288 && m_handle != NULL)
+ if(offset >= 0x280 && offset <= 0x288 && m_handle != nullptr)
{
UINT8 v = data;
int pos = offset - 0x280;
diff --git a/src/devices/machine/ataintf.cpp b/src/devices/machine/ataintf.cpp
index 56c2031bd56..b9c51351e71 100644
--- a/src/devices/machine/ataintf.cpp
+++ b/src/devices/machine/ataintf.cpp
@@ -72,7 +72,7 @@ WRITE_LINE_MEMBER( ata_interface_device::dasp1_write_line )
m_dasp[1] = state;
ata_device_interface *dev = m_slot[0]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->write_dasp(state);
set_dasp(m_dasp[0] == ASSERT_LINE || m_dasp[1] == ASSERT_LINE);
@@ -111,7 +111,7 @@ WRITE_LINE_MEMBER( ata_interface_device::pdiag1_write_line )
m_pdiag[1] = state;
ata_device_interface *dev = m_slot[0]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
dev->write_pdiag(state);
}
}
@@ -125,9 +125,9 @@ WRITE_LINE_MEMBER( ata_interface_device::pdiag1_write_line )
UINT16 ata_interface_device::read_dma()
{
UINT16 result = 0xffff;
- for (int i = 0; i < 2; i++)
- if (m_slot[i]->dev() != NULL)
- result &= m_slot[i]->dev()->read_dma();
+ for (auto & elem : m_slot)
+ if (elem->dev() != nullptr)
+ result &= elem->dev()->read_dma();
// printf( "%s: read_dma %04x\n", machine().describe_context(), result );
return result;
@@ -136,9 +136,9 @@ UINT16 ata_interface_device::read_dma()
READ16_MEMBER( ata_interface_device::read_cs0 )
{
UINT16 result = mem_mask;
- for (int i = 0; i < 2; i++)
- if (m_slot[i]->dev() != NULL)
- result &= m_slot[i]->dev()->read_cs0(space, offset, mem_mask);
+ for (auto & elem : m_slot)
+ if (elem->dev() != nullptr)
+ result &= elem->dev()->read_cs0(space, offset, mem_mask);
// { static int last_status = -1; if (offset == 7 ) { if( result == last_status ) return last_status; last_status = result; } else last_status = -1; }
@@ -150,9 +150,9 @@ READ16_MEMBER( ata_interface_device::read_cs0 )
READ16_MEMBER( ata_interface_device::read_cs1 )
{
UINT16 result = mem_mask;
- for (int i = 0; i < 2; i++)
- if (m_slot[i]->dev() != NULL)
- result &= m_slot[i]->dev()->read_cs1(space, offset, mem_mask);
+ for (auto & elem : m_slot)
+ if (elem->dev() != nullptr)
+ result &= elem->dev()->read_cs1(space, offset, mem_mask);
// printf( "%s: read cs1 %04x %04x %04x\n", machine().describe_context(), offset, result, mem_mask );
@@ -170,36 +170,36 @@ void ata_interface_device::write_dma( UINT16 data )
{
// printf( "%s: write_dma %04x\n", machine().describe_context(), data );
- for (int i = 0; i < 2; i++)
- if (m_slot[i]->dev() != NULL)
- m_slot[i]->dev()->write_dma(data);
+ for (auto & elem : m_slot)
+ if (elem->dev() != nullptr)
+ elem->dev()->write_dma(data);
}
WRITE16_MEMBER( ata_interface_device::write_cs0 )
{
// printf( "%s: write cs0 %04x %04x %04x\n", machine().describe_context(), offset, data, mem_mask );
- for (int i = 0; i < 2; i++)
- if (m_slot[i]->dev() != NULL)
- m_slot[i]->dev()->write_cs0(space, offset, data, mem_mask);
+ for (auto & elem : m_slot)
+ if (elem->dev() != nullptr)
+ elem->dev()->write_cs0(space, offset, data, mem_mask);
}
WRITE16_MEMBER( ata_interface_device::write_cs1 )
{
// printf( "%s: write cs1 %04x %04x %04x\n", machine().describe_context(), offset, data, mem_mask );
- for (int i = 0; i < 2; i++)
- if (m_slot[i]->dev() != NULL)
- m_slot[i]->dev()->write_cs1(space, offset, data, mem_mask);
+ for (auto & elem : m_slot)
+ if (elem->dev() != nullptr)
+ elem->dev()->write_cs1(space, offset, data, mem_mask);
}
WRITE_LINE_MEMBER( ata_interface_device::write_dmack )
{
// printf( "%s: write_dmack %04x\n", machine().describe_context(), state );
- for (int i = 0; i < 2; i++)
- if (m_slot[i]->dev() != NULL)
- m_slot[i]->dev()->write_dmack(state);
+ for (auto & elem : m_slot)
+ if (elem->dev() != nullptr)
+ elem->dev()->write_dmack(state);
}
SLOT_INTERFACE_START(ata_devices)
@@ -247,7 +247,7 @@ void ata_interface_device::device_start()
m_pdiag[i] = 0;
ata_device_interface *dev = m_slot[i]->dev();
- if (dev != NULL)
+ if (dev != nullptr)
{
if (i == 0)
{
@@ -299,7 +299,7 @@ const device_type ATA_SLOT = &device_creator<ata_slot_device>;
ata_slot_device::ata_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ATA_SLOT, "ATA Connector", tag, owner, clock, "ata_slot", __FILE__),
device_slot_interface(mconfig, *this),
- m_dev(NULL)
+ m_dev(nullptr)
{
}
diff --git a/src/devices/machine/ay31015.cpp b/src/devices/machine/ay31015.cpp
index 2ecd3f311f7..f1db92a19d8 100644
--- a/src/devices/machine/ay31015.cpp
+++ b/src/devices/machine/ay31015.cpp
@@ -110,19 +110,19 @@ ay31015_device::ay31015_device(const machine_config &mconfig, device_type type,
m_rx_parity(0),
m_rx_pulses(0),
m_rx_clock(0),
- m_rx_timer(NULL),
+ m_rx_timer(nullptr),
m_tx_data(0),
m_tx_buffer(0),
m_tx_parity(0),
m_tx_pulses(0),
m_tx_clock(0),
- m_tx_timer(NULL),
+ m_tx_timer(nullptr),
m_read_si_cb(*this),
m_write_so_cb(*this),
m_status_changed_cb(*this)
{
- for (int i = 0; i < 41; i++)
- m_pins[i] = 0;
+ for (auto & elem : m_pins)
+ elem = 0;
}
ay31015_device::ay31015_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -138,19 +138,19 @@ ay31015_device::ay31015_device(const machine_config &mconfig, const char *tag, d
m_rx_parity(0),
m_rx_pulses(0),
m_rx_clock(0),
- m_rx_timer(NULL),
+ m_rx_timer(nullptr),
m_tx_data(0),
m_tx_buffer(0),
m_tx_parity(0),
m_tx_pulses(0),
m_tx_clock(0),
- m_tx_timer(NULL),
+ m_tx_timer(nullptr),
m_read_si_cb(*this),
m_write_so_cb(*this),
m_status_changed_cb(*this)
{
- for (int i = 0; i < 41; i++)
- m_pins[i] = 0;
+ for (auto & elem : m_pins)
+ elem = 0;
}
ay51013_device::ay51013_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
diff --git a/src/devices/machine/bankdev.cpp b/src/devices/machine/bankdev.cpp
index 644e92f05f9..65d56a39819 100644
--- a/src/devices/machine/bankdev.cpp
+++ b/src/devices/machine/bankdev.cpp
@@ -12,7 +12,7 @@ address_map_bank_device::address_map_bank_device( const machine_config &mconfig,
m_databus_width(0),
m_addrbus_width(32),
m_stride(1),
- m_program(NULL),
+ m_program(nullptr),
m_offset(0)
{
}
diff --git a/src/devices/machine/bankdev.h b/src/devices/machine/bankdev.h
index 54359fc6282..aaff8fca996 100644
--- a/src/devices/machine/bankdev.h
+++ b/src/devices/machine/bankdev.h
@@ -55,7 +55,7 @@ protected:
virtual void device_config_complete();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
private:
// internal state
diff --git a/src/devices/machine/bcreader.h b/src/devices/machine/bcreader.h
index 23b80ddab70..ecb6908e0ae 100644
--- a/src/devices/machine/bcreader.h
+++ b/src/devices/machine/bcreader.h
@@ -38,7 +38,7 @@ public:
protected:
// device-level overrides
- virtual void device_start();
+ virtual void device_start() override;
UINT8 m_byte_data[13];
UINT8 m_pixel_data[100];
diff --git a/src/devices/machine/clock.cpp b/src/devices/machine/clock.cpp
index 9896bebabcc..70d3bd4fade 100644
--- a/src/devices/machine/clock.cpp
+++ b/src/devices/machine/clock.cpp
@@ -7,7 +7,7 @@ const device_type CLOCK = &device_creator<clock_device>;
clock_device::clock_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CLOCK, "Clock", tag, owner, clock, "clock", __FILE__),
m_signal(0),
- m_timer(NULL),
+ m_timer(nullptr),
m_signal_handler(*this)
{
}
@@ -44,7 +44,7 @@ void clock_device::update_timer()
{
if (!m_signal_handler.isnull() && m_clock > 0)
{
- if (m_timer == NULL)
+ if (m_timer == nullptr)
{
m_timer = timer_alloc(0);
m_timer->adjust(period());
@@ -61,7 +61,7 @@ void clock_device::update_timer()
m_timer->adjust(next);
}
}
- else if (m_timer != NULL)
+ else if (m_timer != nullptr)
{
m_timer->adjust(attotime::never);
}
diff --git a/src/devices/machine/corvushd.cpp b/src/devices/machine/corvushd.cpp
index 0444d3cb530..558851c0b7a 100644
--- a/src/devices/machine/corvushd.cpp
+++ b/src/devices/machine/corvushd.cpp
@@ -955,16 +955,16 @@ hard_disk_file *corvus_hdc_t::corvus_hdc_file(int drv) {
// Corvus drive id numbers are 1-based so we check 1..4 instead of 0..3
if (drv < 1 || drv > 4)
{
- return NULL;
+ return nullptr;
}
harddisk_image_device *img = siblingdevice<harddisk_image_device>(tags[drv - 1]);
if ( !img )
- return NULL;
+ return nullptr;
if (!img->exists())
- return NULL;
+ return nullptr;
// Pick up the Head/Cylinder/Sector info
hard_disk_file *file = img->get_hard_disk_file();
diff --git a/src/devices/machine/cr511b.cpp b/src/devices/machine/cr511b.cpp
index 9ce22895dba..debd3906fbc 100644
--- a/src/devices/machine/cr511b.cpp
+++ b/src/devices/machine/cr511b.cpp
@@ -55,7 +55,7 @@ cr511b_device::cr511b_device(const machine_config &mconfig, const char *tag, dev
m_dten_handler(*this),
m_scor_handler(*this),
m_xaen_handler(*this),
- m_frame_timer(NULL),
+ m_frame_timer(nullptr),
//m_motor(false),
m_enabled(-1),
m_cmd(-1)
@@ -76,7 +76,7 @@ void cr511b_device::device_start()
m_scor_handler.resolve_safe();
m_xaen_handler.resolve_safe();
- m_frame_timer = timer_alloc(0, NULL);
+ m_frame_timer = timer_alloc(0, nullptr);
m_frame_timer->adjust(attotime::never);
}
diff --git a/src/devices/machine/diablo_hd.cpp b/src/devices/machine/diablo_hd.cpp
index 9ee566350ff..f067acd4742 100644
--- a/src/devices/machine/diablo_hd.cpp
+++ b/src/devices/machine/diablo_hd.cpp
@@ -87,18 +87,18 @@ diablo_hd_device::diablo_hd_device(const machine_config &mconfig, const char *ta
m_head(-1),
m_sector(-1),
m_page(-1),
- m_cache(0),
- m_bits(0),
+ m_cache(nullptr),
+ m_bits(nullptr),
m_rdfirst(-1),
m_rdlast(-1),
m_wrfirst(-1),
m_wrlast(-1),
- m_sector_callback_cookie(0),
- m_sector_callback(0),
- m_timer(0),
- m_image(0),
- m_handle(0),
- m_disk(0)
+ m_sector_callback_cookie(nullptr),
+ m_sector_callback(nullptr),
+ m_timer(nullptr),
+ m_image(nullptr),
+ m_handle(nullptr),
+ m_disk(nullptr)
{
memset(m_description, 0x00, sizeof(m_description));
}
@@ -317,7 +317,7 @@ void diablo_hd_device::read_sector()
} else {
LOG_DRIVE((0,"[DHD%u] CHS:%03d/%d/%02d => page:%d read failed\n", m_unit, m_cylinder, m_head, m_sector, m_page));
auto_free(machine(), m_cache[m_page]);
- m_cache[m_page] = 0;
+ m_cache[m_page] = nullptr;
}
} else {
LOG_DRIVE((2,"[DHD%u] no disk\n", m_unit));
@@ -432,7 +432,7 @@ UINT32* diablo_hd_device::expand_sector()
size_t dst;
if (!m_bits)
- return NULL;
+ return nullptr;
/* already expanded this sector? */
if (m_bits[m_page])
return m_bits[m_page];
@@ -440,7 +440,7 @@ UINT32* diablo_hd_device::expand_sector()
/* allocate a sector buffer */
if (!m_cache[m_page]) {
LOG_DRIVE((0,"[DHD%u] no image for page #%d\n", m_unit, m_page));
- return NULL;
+ return nullptr;
}
diablo_sector_t *s = reinterpret_cast<diablo_sector_t *>(m_cache[m_page]);
@@ -775,7 +775,7 @@ void diablo_hd_device::squeeze_sector()
#endif
}
auto_free(machine(), m_bits[m_page]);
- m_bits[m_page] = 0;
+ m_bits[m_page] = nullptr;
if (m_disk) {
if (!hard_disk_write(m_disk, m_page, m_cache[m_page])) {
@@ -1325,7 +1325,7 @@ void diablo_hd_device::device_start()
m_packs = 1; // FIXME: get from configuration?
m_unit = strstr(m_image->tag(), "diablo0") ? 0 : 1;
- m_timer = timer_alloc(1, 0);
+ m_timer = timer_alloc(1, nullptr);
}
void diablo_hd_device::device_reset()
@@ -1336,7 +1336,7 @@ void diablo_hd_device::device_reset()
if (m_cache[page])
auto_free(machine(), m_cache[page]);
auto_free(machine(), m_cache);
- m_cache = 0;
+ m_cache = nullptr;
}
// free previous bits cache
if (m_bits) {
@@ -1344,7 +1344,7 @@ void diablo_hd_device::device_reset()
if (m_bits[page])
auto_free(machine(), m_bits[page]);
auto_free(machine(), m_bits);
- m_bits = 0;
+ m_bits = nullptr;
}
m_handle = m_image->get_chd_file();
m_diablo31 = true; // FIXME: get from m_handle meta data?
diff --git a/src/devices/machine/dmac.cpp b/src/devices/machine/dmac.cpp
index d739d64f308..34992fc4f5c 100644
--- a/src/devices/machine/dmac.cpp
+++ b/src/devices/machine/dmac.cpp
@@ -47,9 +47,9 @@ dmac_device::dmac_device(const machine_config &mconfig, const char *tag, device_
m_scsi_write_handler(*this),
m_io_read_handler(*this),
m_io_write_handler(*this),
- m_space(NULL),
- m_rom(NULL),
- m_ram(NULL),
+ m_space(nullptr),
+ m_rom(nullptr),
+ m_ram(nullptr),
m_ram_size(-1),
m_configured(false),
m_rst(-1),
diff --git a/src/devices/machine/ds1302.cpp b/src/devices/machine/ds1302.cpp
index c254690cae0..c2cd23b560f 100644
--- a/src/devices/machine/ds1302.cpp
+++ b/src/devices/machine/ds1302.cpp
@@ -90,8 +90,8 @@ void ds1302_device::device_start()
m_clock_timer = timer_alloc();
m_clock_timer->adjust(attotime::from_hz(clock() / 32768), 0, attotime::from_hz(clock() / 32768));
- for (int i = 0; i < 9; i++)
- m_reg[i] = 0;
+ for (auto & elem : m_reg)
+ elem = 0;
// state saving
save_item(NAME(m_ce));
diff --git a/src/devices/machine/ds2404.cpp b/src/devices/machine/ds2404.cpp
index 9ba913c7250..68082389cee 100644
--- a/src/devices/machine/ds2404.cpp
+++ b/src/devices/machine/ds2404.cpp
@@ -99,8 +99,8 @@ void ds2404_device::device_start()
m_rtc[3] = (current_time >> 16) & 0xff;
m_rtc[4] = (current_time >> 24) & 0xff;
- for (int i = 0; i < 8; i++)
- m_state[i] = DS2404_STATE_IDLE;
+ for (auto & elem : m_state)
+ elem = DS2404_STATE_IDLE;
m_tick_timer = timer_alloc(0);
m_tick_timer->adjust(attotime::from_hz(256), 0, attotime::from_hz(256));
@@ -353,10 +353,10 @@ void ds2404_device::device_timer(emu_timer &timer, device_timer_id id, int param
case 0:
{
// tick
- for(int i = 0; i < 5; i++)
+ for(auto & elem : m_rtc)
{
- m_rtc[ i ]++;
- if(m_rtc[ i ] != 0)
+ elem++;
+ if(elem != 0)
{
break;
}
diff --git a/src/devices/machine/eeprom.cpp b/src/devices/machine/eeprom.cpp
index a0e8886e7f4..53b92a0ee0d 100644
--- a/src/devices/machine/eeprom.cpp
+++ b/src/devices/machine/eeprom.cpp
@@ -51,7 +51,7 @@ eeprom_base_device::eeprom_base_device(const machine_config &mconfig, device_typ
m_cells(0),
m_address_bits(0),
m_data_bits(0),
- m_default_data(0),
+ m_default_data(nullptr),
m_default_data_size(0),
m_default_value(0),
m_default_value_set(false),
@@ -253,7 +253,7 @@ void eeprom_base_device::device_reset()
const address_space_config *eeprom_base_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
@@ -276,7 +276,7 @@ void eeprom_base_device::nvram_default()
m_addrspace[0]->write_word(offs * 2, default_value);
// handle hard-coded data from the driver
- if (m_default_data.u8 != NULL)
+ if (m_default_data.u8 != nullptr)
{
osd_printf_verbose("Warning: Driver-specific EEPROM defaults are going away soon.\n");
for (offs_t offs = 0; offs < m_default_data_size; offs++)
@@ -289,7 +289,7 @@ void eeprom_base_device::nvram_default()
}
// populate from a memory region if present
- if (m_region != NULL)
+ if (m_region != nullptr)
{
if (m_region->bytes() != eeprom_bytes)
fatalerror("eeprom region '%s' wrong size (expected size = 0x%X)\n", tag(), eeprom_bytes);
diff --git a/src/devices/machine/er2055.cpp b/src/devices/machine/er2055.cpp
index 24ab1766744..7c395a83b62 100644
--- a/src/devices/machine/er2055.cpp
+++ b/src/devices/machine/er2055.cpp
@@ -66,7 +66,7 @@ void er2055_device::device_start()
const address_space_config *er2055_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
@@ -82,7 +82,7 @@ void er2055_device::nvram_default()
m_addrspace[0]->write_byte(byte, 0xff);
// populate from a memory region if present
- if (m_region != NULL)
+ if (m_region != nullptr)
{
if (m_region->bytes() != SIZE_DATA)
fatalerror("er2055 region '%s' wrong size (expected size = 0x40)\n", tag());
diff --git a/src/devices/machine/hd63450.cpp b/src/devices/machine/hd63450.cpp
index 9528026b95e..e15039fbb38 100644
--- a/src/devices/machine/hd63450.cpp
+++ b/src/devices/machine/hd63450.cpp
@@ -22,13 +22,13 @@ hd63450_device::hd63450_device(const machine_config &mconfig, const char *tag, d
m_dma_write_1(*this),
m_dma_write_2(*this),
m_dma_write_3(*this),
- m_cpu_tag(NULL),
- m_cpu(NULL)
+ m_cpu_tag(nullptr),
+ m_cpu(nullptr)
{
for (int i = 0; i < 4; i++)
{
memset(&m_reg[i], 0, sizeof(m_reg[i]));
- m_timer[i] = NULL;
+ m_timer[i] = nullptr;
m_in_progress[i] = 0;
m_transfer_size[i] = 0;
m_halted[i] = 0;
@@ -45,7 +45,7 @@ void hd63450_device::device_start()
{
// get the CPU device
m_cpu = machine().device<cpu_device>(m_cpu_tag);
- assert(m_cpu != NULL);
+ assert(m_cpu != nullptr);
// resolve callbacks
m_dma_end.resolve();
diff --git a/src/devices/machine/hdc92x4.cpp b/src/devices/machine/hdc92x4.cpp
index d9cdf3a48b8..f433a7a2edd 100644
--- a/src/devices/machine/hdc92x4.cpp
+++ b/src/devices/machine/hdc92x4.cpp
@@ -425,7 +425,7 @@ const hdc92x4_device::cmddef hdc92x4_device::s_command[] =
{ 0x5c, 0xfc, &hdc92x4_device::read_sectors },
{ 0x60, 0xe0, &hdc92x4_device::format_track },
{ 0x80, 0x80, &hdc92x4_device::write_sectors },
- { 0, 0, 0 }
+ { 0, 0, nullptr }
};
/*
@@ -2004,7 +2004,7 @@ void hdc92x4_device::live_run_until(attotime limit)
if (limit == attotime::never)
{
// We did not specify an upper time bound, so we take the next index pulse
- if (m_floppy != NULL) limit = m_floppy->time_next_index();
+ if (m_floppy != nullptr) limit = m_floppy->time_next_index();
if (limit == attotime::never)
{
@@ -2721,8 +2721,8 @@ void hdc92x4_device::live_run_until(attotime limit)
m_out_dip(ASSERT_LINE);
// Write the header via DMA
- for (int slot = 0; slot < 6; slot++)
- m_out_dma(0, m_register_r[id_field[slot]], 0xff);
+ for (auto & elem : id_field)
+ m_out_dma(0, m_register_r[elem], 0xff);
m_out_dip(CLEAR_LINE);
m_out_dmarq(CLEAR_LINE);
@@ -2834,7 +2834,7 @@ void hdc92x4_device::live_run_hd_until(attotime limit)
}
// We did not specify an upper time bound, so we take the next index pulse
- if (limit == attotime::never && m_harddisk != NULL)
+ if (limit == attotime::never && m_harddisk != nullptr)
{
limit = m_harddisk->track_end_time();
if (TRACE_LIVE) logerror("%s: [%s live] live_run_hd new limit %s\n", tag(), tts(m_live_state.time).c_str(), tts(limit).c_str());
@@ -3296,8 +3296,8 @@ void hdc92x4_device::live_run_hd_until(attotime limit)
m_out_dip(ASSERT_LINE);
// Write the header via DMA
- for (int slot = 0; slot < 6; slot++)
- m_out_dma(0, m_register_r[id_field[slot]], 0xff);
+ for (auto & elem : id_field)
+ m_out_dma(0, m_register_r[elem], 0xff);
// Continue with reading the sector data
m_live_state.state = SEARCH_DAM;
@@ -3721,7 +3721,7 @@ bool hdc92x4_device::read_from_mfmhd(const attotime &limit)
UINT16 data = 0;
bool offlimit = false;
- if (m_harddisk != NULL)
+ if (m_harddisk != nullptr)
{
offlimit = m_harddisk->read(m_live_state.time, limit, data);
}
@@ -3811,7 +3811,7 @@ bool hdc92x4_device::write_to_mfmhd(const attotime &limit)
count = 16;
}
- if (m_harddisk != NULL)
+ if (m_harddisk != nullptr)
{
offlimit = m_harddisk->write(m_live_state.time, limit, data, m_precompensation != 0, m_reduced_write_current);
}
@@ -4434,8 +4434,8 @@ void hdc92x4_device::device_reset()
m_executing = false;
m_event_line = UNDEF;
m_first_sector_found = false;
- m_floppy = NULL;
- m_harddisk = NULL;
+ m_floppy = nullptr;
+ m_harddisk = nullptr;
m_initialized = true;
m_line_level = CLEAR_LINE;
m_live_state.state = IDLE;
diff --git a/src/devices/machine/i2cmem.cpp b/src/devices/machine/i2cmem.cpp
index 7b6869e2cb7..17da9d40e2e 100644
--- a/src/devices/machine/i2cmem.cpp
+++ b/src/devices/machine/i2cmem.cpp
@@ -159,7 +159,7 @@ void i2cmem_device::device_reset()
const address_space_config *i2cmem_device::memory_space_config( address_spacenum spacenum ) const
{
- return ( spacenum == 0 ) ? &m_space_config : NULL;
+ return ( spacenum == 0 ) ? &m_space_config : nullptr;
}
@@ -179,7 +179,7 @@ void i2cmem_device::nvram_default()
}
/* populate from a memory region if present */
- if( m_region != NULL )
+ if( m_region != nullptr )
{
if( m_region->bytes() != i2cmem_bytes )
{
diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp
index a2914b9081f..b3d4098398a 100644
--- a/src/devices/machine/i8155.cpp
+++ b/src/devices/machine/i8155.cpp
@@ -214,7 +214,7 @@ i8155_device::i8155_device(const machine_config &mconfig, const char *tag, devic
m_out_to_cb(*this),
m_command(0),
m_status(0),
- m_space_config("ram", ENDIANNESS_LITTLE, 8, 8, 0, NULL, *ADDRESS_MAP_NAME(i8155))
+ m_space_config("ram", ENDIANNESS_LITTLE, 8, 8, 0, nullptr, *ADDRESS_MAP_NAME(i8155))
{
}
@@ -342,7 +342,7 @@ void i8155_device::device_timer(emu_timer &timer, device_timer_id id, int param,
const address_space_config *i8155_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/machine/i8257.cpp b/src/devices/machine/i8257.cpp
index 23abcc3915c..a54d21697cc 100644
--- a/src/devices/machine/i8257.cpp
+++ b/src/devices/machine/i8257.cpp
@@ -364,11 +364,11 @@ void i8257_device::device_reset()
m_hreq = -1;
m_tc = 0;
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_channel)
{
- m_channel[i].m_address = 0;
- m_channel[i].m_count = 0;
- m_channel[i].m_mode = 0;
+ elem.m_address = 0;
+ elem.m_count = 0;
+ elem.m_mode = 0;
}
set_hreq(0);
set_dack();
@@ -390,11 +390,11 @@ bool i8257_device::next_channel()
}
}
- for (int channel = 0; channel < 4; channel++)
+ for (auto & elem : priority)
{
- if (is_request_active(priority[channel]))
+ if (is_request_active(elem))
{
- m_current_channel = m_last_channel = priority[channel];
+ m_current_channel = m_last_channel = elem;
return true;
}
}
diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp
index 75086e941d4..3d1d602dd74 100644
--- a/src/devices/machine/i8271.cpp
+++ b/src/devices/machine/i8271.cpp
@@ -50,12 +50,12 @@ void i8271_device::device_start()
floppy_connector *con = subdevice<floppy_connector>(name);
if(con) {
flopi[i].dev = con->get_device();
- if (flopi[i].dev != NULL)
+ if (flopi[i].dev != nullptr)
flopi[i].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(i8271_device::index_callback), this));
} else
- flopi[i].dev = NULL;
+ flopi[i].dev = nullptr;
} else
- flopi[i].dev = NULL;
+ flopi[i].dev = nullptr;
flopi[i].main_state = IDLE;
flopi[i].sub_state = IDLE;
@@ -71,7 +71,7 @@ void i8271_device::device_start()
cur_live.tm = attotime::never;
cur_live.state = IDLE;
cur_live.next_state = -1;
- cur_live.fi = NULL;
+ cur_live.fi = nullptr;
}
void i8271_device::device_reset()
@@ -91,11 +91,11 @@ void i8271_device::soft_reset()
set_irq(false);
set_drq(false);
command_pos = 0;
- cur_live.fi = 0;
+ cur_live.fi = nullptr;
cur_live.tm = attotime::never;
cur_live.state = IDLE;
cur_live.next_state = -1;
- cur_live.fi = NULL;
+ cur_live.fi = nullptr;
rr = 0;
scan_sec = 0;
moder = 0xc0;
@@ -119,10 +119,10 @@ bool i8271_device::get_ready(int fid)
void i8271_device::set_floppy(floppy_image_device *flop)
{
- for(int fid=0; fid<2; fid++) {
- if(flopi[fid].dev)
- flopi[fid].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb());
- flopi[fid].dev = flop;
+ for(auto & elem : flopi) {
+ if(elem.dev)
+ elem.dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb());
+ elem.dev = flop;
}
if(flop)
flop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(i8271_device::index_callback), this));
@@ -303,7 +303,7 @@ void i8271_device::live_sync()
cur_live.pll.stop_writing(cur_live.fi->dev, cur_live.tm);
cur_live.tm = attotime::never;
cur_live.fi->live = false;
- cur_live.fi = 0;
+ cur_live.fi = nullptr;
}
}
cur_live.next_state = -1;
@@ -321,7 +321,7 @@ void i8271_device::live_abort()
if(cur_live.fi) {
cur_live.pll.stop_writing(cur_live.fi->dev, cur_live.tm);
cur_live.fi->live = false;
- cur_live.fi = 0;
+ cur_live.fi = nullptr;
}
cur_live.tm = attotime::never;
@@ -1540,8 +1540,8 @@ void i8271_device::device_timer(emu_timer &timer, device_timer_id id, int param,
void i8271_device::index_callback(floppy_image_device *floppy, int state)
{
- for(int fid=0; fid<2; fid++) {
- floppy_info &fi = flopi[fid];
+ for(auto & fi : flopi) {
+
if(fi.dev != floppy)
continue;
diff --git a/src/devices/machine/i8355.cpp b/src/devices/machine/i8355.cpp
index d417bd1e3c3..cf53a098a19 100644
--- a/src/devices/machine/i8355.cpp
+++ b/src/devices/machine/i8355.cpp
@@ -99,7 +99,7 @@ i8355_device::i8355_device(const machine_config &mconfig, const char *tag, devic
m_out_pa_cb(*this),
m_in_pb_cb(*this),
m_out_pb_cb(*this),
- m_space_config("ram", ENDIANNESS_LITTLE, 8, 11, 0, NULL, *ADDRESS_MAP_NAME(i8355))
+ m_space_config("ram", ENDIANNESS_LITTLE, 8, 11, 0, nullptr, *ADDRESS_MAP_NAME(i8355))
{
}
@@ -140,7 +140,7 @@ void i8355_device::device_reset()
const address_space_config *i8355_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/machine/idectrl.cpp b/src/devices/machine/idectrl.cpp
index bebfcc09d0d..5be4dcd3d5a 100644
--- a/src/devices/machine/idectrl.cpp
+++ b/src/devices/machine/idectrl.cpp
@@ -187,10 +187,10 @@ void bus_master_ide_controller_device::device_start()
ide_controller_32_device::device_start();
/* find the bus master space */
- if (m_bmcpu != NULL)
+ if (m_bmcpu != nullptr)
{
device_t *bmtarget = machine().device(m_bmcpu);
- if (bmtarget == NULL)
+ if (bmtarget == nullptr)
throw emu_fatalerror("IDE controller '%s' bus master target '%s' doesn't exist!", tag(), m_bmcpu);
device_memory_interface *memory;
if (!bmtarget->interface(memory))
diff --git a/src/devices/machine/idehd.cpp b/src/devices/machine/idehd.cpp
index ccab353472c..a9205ed02fe 100644
--- a/src/devices/machine/idehd.cpp
+++ b/src/devices/machine/idehd.cpp
@@ -199,8 +199,8 @@ void ata_mass_storage_device::soft_reset()
m_cur_lba = 0;
m_status |= IDE_STATUS_DSC;
- m_master_password_enable = (m_master_password != NULL);
- m_user_password_enable = (m_user_password != NULL);
+ m_master_password_enable = (m_master_password != nullptr);
+ m_user_password_enable = (m_user_password != nullptr);
}
void ata_mass_storage_device::perform_diagnostic()
@@ -777,7 +777,7 @@ void ide_hdd_device::device_reset()
m_handle = m_image->get_chd_file();
m_disk = m_image->get_hard_disk_file();
- if (m_disk != NULL && !m_can_identify_device)
+ if (m_disk != nullptr && !m_can_identify_device)
{
const hard_disk_info *hdinfo = hard_disk_get_info(m_disk);
if (hdinfo->sectorbytes == IDE_DISK_SECTOR_SIZE)
diff --git a/src/devices/machine/idehd.h b/src/devices/machine/idehd.h
index beacb0a25c4..4645929057e 100644
--- a/src/devices/machine/idehd.h
+++ b/src/devices/machine/idehd.h
@@ -27,13 +27,13 @@ public:
void set_master_password(const UINT8 *password)
{
m_master_password = password;
- m_master_password_enable = (password != NULL);
+ m_master_password_enable = (password != nullptr);
}
void set_user_password(const UINT8 *password)
{
m_user_password = password;
- m_user_password_enable = (password != NULL);
+ m_user_password_enable = (password != nullptr);
}
protected:
@@ -98,8 +98,8 @@ protected:
// optional information overrides
virtual machine_config_constructor device_mconfig_additions() const;
- virtual int read_sector(UINT32 lba, void *buffer) { if (m_disk == NULL) return 0; return hard_disk_read(m_disk, lba, buffer); }
- virtual int write_sector(UINT32 lba, const void *buffer) { if (m_disk == NULL) return 0; return hard_disk_write(m_disk, lba, buffer); }
+ virtual int read_sector(UINT32 lba, void *buffer) { if (m_disk == nullptr) return 0; return hard_disk_read(m_disk, lba, buffer); }
+ virtual int write_sector(UINT32 lba, const void *buffer) { if (m_disk == nullptr) return 0; return hard_disk_write(m_disk, lba, buffer); }
virtual UINT8 calculate_status();
chd_file *m_handle;
diff --git a/src/devices/machine/intelfsh.cpp b/src/devices/machine/intelfsh.cpp
index 6f841692bea..9fdc04609c1 100644
--- a/src/devices/machine/intelfsh.cpp
+++ b/src/devices/machine/intelfsh.cpp
@@ -177,10 +177,10 @@ intelfsh_device::intelfsh_device(const machine_config &mconfig, device_type type
m_erase_sector(0),
m_flash_mode(FM_NORMAL),
m_flash_master_lock(false),
- m_timer(NULL),
+ m_timer(nullptr),
m_bank(0)
{
- address_map_constructor map = NULL;
+ address_map_constructor map = nullptr;
switch( variant )
{
@@ -520,7 +520,7 @@ void intelfsh_device::device_timer(emu_timer &timer, device_timer_id id, int par
const address_space_config *intelfsh_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
@@ -532,7 +532,7 @@ const address_space_config *intelfsh_device::memory_space_config(address_spacenu
void intelfsh_device::nvram_default()
{
// region always wins
- if (m_region != NULL)
+ if (m_region != nullptr)
{
UINT32 bytes = m_region->bytes();
if (bytes > m_size)
diff --git a/src/devices/machine/jvsdev.cpp b/src/devices/machine/jvsdev.cpp
index dc2c3db0acf..c70f8a9fce6 100644
--- a/src/devices/machine/jvsdev.cpp
+++ b/src/devices/machine/jvsdev.cpp
@@ -12,8 +12,8 @@ void jvs_device::static_set_jvs_host_tag(device_t &device, const char *jvs_host_
jvs_device::jvs_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), jvs_outputs(0), jvs_address(0), jvs_reset_counter(0)
{
- jvs_host_tag = 0;
- next_device = 0;
+ jvs_host_tag = nullptr;
+ next_device = nullptr;
}
const char *jvs_device::device_id()
diff --git a/src/devices/machine/jvshost.cpp b/src/devices/machine/jvshost.cpp
index 145b105d703..bca7f7c618c 100644
--- a/src/devices/machine/jvshost.cpp
+++ b/src/devices/machine/jvshost.cpp
@@ -31,7 +31,7 @@ void jvs_host::device_reset()
jvs_host::jvs_host(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), send_size(0), recv_size(0), recv_is_encoded(false)
{
- first_device = 0;
+ first_device = nullptr;
}
void jvs_host::push(UINT8 val)
@@ -104,7 +104,7 @@ void jvs_host::get_encoded_reply(const UINT8 *&buffer, UINT32 &size)
bool jvs_host::get_presence_line()
{
- return first_device != 0;
+ return first_device != nullptr;
}
bool jvs_host::get_address_set_line()
diff --git a/src/devices/machine/kb3600.cpp b/src/devices/machine/kb3600.cpp
index f83ba9c46d8..ca5fb5e7e76 100644
--- a/src/devices/machine/kb3600.cpp
+++ b/src/devices/machine/kb3600.cpp
@@ -58,9 +58,9 @@ ay3600_device::ay3600_device(const machine_config &mconfig, const char *tag, dev
m_write_data_ready(*this),
m_write_ako(*this)
{
- for (int i = 0; i < 9; i++)
+ for (auto & elem : m_x_mask)
{
- m_x_mask[i] = 0;
+ elem = 0;
}
}
diff --git a/src/devices/machine/keyboard.cpp b/src/devices/machine/keyboard.cpp
index e586aaaa8a6..d801bbf7dcf 100644
--- a/src/devices/machine/keyboard.cpp
+++ b/src/devices/machine/keyboard.cpp
@@ -44,7 +44,7 @@ generic_keyboard_device::generic_keyboard_device(const machine_config &mconfig,
m_io_kbd8(*this, "TERM_LINE8"),
m_io_kbd9(*this, "TERM_LINE9"),
m_io_kbdc(*this, "TERM_LINEC"),
- m_timer(NULL),
+ m_timer(nullptr),
m_last_code(0),
m_scan_line(0),
m_keyboard_cb(*this)
@@ -64,7 +64,7 @@ generic_keyboard_device::generic_keyboard_device(const machine_config &mconfig,
m_io_kbd8(*this, "TERM_LINE8"),
m_io_kbd9(*this, "TERM_LINE9"),
m_io_kbdc(*this, "TERM_LINEC"),
- m_timer(NULL),
+ m_timer(nullptr),
m_last_code(0),
m_scan_line(0),
m_keyboard_cb(*this)
diff --git a/src/devices/machine/laserdsc.cpp b/src/devices/machine/laserdsc.cpp
index a027ac62271..b8ecf53611c 100644
--- a/src/devices/machine/laserdsc.cpp
+++ b/src/devices/machine/laserdsc.cpp
@@ -64,7 +64,7 @@ laserdisc_device::laserdisc_device(const machine_config &mconfig, device_type ty
m_overwidth(0),
m_overheight(0),
m_overclip(0, -1, 0, -1),
- m_disc(NULL),
+ m_disc(nullptr),
m_width(0),
m_height(0),
m_fps_times_1million(0),
@@ -80,18 +80,18 @@ laserdisc_device::laserdisc_device(const machine_config &mconfig, device_type ty
m_attospertrack(0),
m_sliderupdate(attotime::zero),
m_videoindex(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_audiobufsize(0),
m_audiobufin(0),
m_audiobufout(0),
m_audiocursamples(0),
m_audiomaxsamples(0),
m_videoenable(false),
- m_videotex(NULL),
- m_videopalette(NULL),
+ m_videotex(nullptr),
+ m_videopalette(nullptr),
m_overenable(false),
m_overindex(0),
- m_overtex(NULL),
+ m_overtex(nullptr),
m_overlay_palette(*this)
{
// initialize overlay_config
@@ -312,7 +312,7 @@ void laserdisc_device::static_set_overlay_palette(device_t &device, const char *
void laserdisc_device::device_start()
{
// if we have a palette and it's not started, wait for it
- if (m_overlay_palette != NULL && !m_overlay_palette->started())
+ if (m_overlay_palette != nullptr && !m_overlay_palette->started())
throw device_missing_dependencies();
// initialize the various pieces
@@ -332,15 +332,15 @@ void laserdisc_device::device_start()
void laserdisc_device::device_stop()
{
// make sure all async operations have completed
- if (m_disc != NULL)
+ if (m_disc != nullptr)
osd_work_queue_wait(m_work_queue, osd_ticks_per_second() * 10);
// free any textures and palettes
- if (m_videotex != NULL)
+ if (m_videotex != nullptr)
machine().render().texture_free(m_videotex);
- if (m_videopalette != NULL)
+ if (m_videopalette != nullptr)
m_videopalette->deref();
- if (m_overtex != NULL)
+ if (m_overtex != nullptr)
machine().render().texture_free(m_overtex);
}
@@ -372,7 +372,7 @@ void laserdisc_device::device_reset()
void laserdisc_device::device_validity_check(validity_checker &valid) const
{
texture_format texformat = !m_overupdate_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32;
- if (m_overlay_palette == NULL && texformat == TEXFORMAT_PALETTE16)
+ if (m_overlay_palette == nullptr && texformat == TEXFORMAT_PALETTE16)
osd_printf_error("Overlay screen does not have palette defined\n");
}
@@ -748,7 +748,7 @@ void laserdisc_device::init_disc()
// get the disc metadata and extract the ld
m_chdtracks = 0;
m_maxtrack = VIRTUAL_LEAD_IN_TRACKS + MAX_TOTAL_TRACKS + VIRTUAL_LEAD_OUT_TRACKS;
- if (m_disc != NULL)
+ if (m_disc != nullptr)
{
// require the A/V codec and nothing else
if (m_disc->compression(0) != CHD_CODEC_AVHUFF || m_disc->compression(1) != CHD_CODEC_NONE)
@@ -796,16 +796,16 @@ void laserdisc_device::init_video()
// allocate palette for applying brightness/contrast/gamma
m_videopalette = palette_t::alloc(256);
- if (m_videopalette == NULL)
+ if (m_videopalette == nullptr)
throw emu_fatalerror("Out of memory allocating video palette");
for (int index = 0; index < 256; index++)
m_videopalette->entry_set_color(index, rgb_t(index, index, index));
// allocate video frames
- for (int index = 0; index < ARRAY_LENGTH(m_frame); index++)
+ for (auto & frame : m_frame)
{
// first allocate a YUY16 bitmap at 2x the height
- frame_data &frame = m_frame[index];
+
frame.m_bitmap.allocate(m_width, m_height * 2);
frame.m_bitmap.set_palette(m_videopalette);
fillbitmap_yuy16(frame.m_bitmap, 40, 109, 240);
@@ -826,7 +826,7 @@ void laserdisc_device::init_video()
// allocate texture for rendering
m_videoenable = true;
m_videotex = machine().render().texture_alloc();
- if (m_videotex == NULL)
+ if (m_videotex == nullptr)
fatalerror("Out of memory allocating video texture\n");
// allocate overlay
@@ -842,17 +842,17 @@ void laserdisc_device::init_video()
texture_format texformat = !m_overupdate_ind16.isnull() ? TEXFORMAT_PALETTEA16 : TEXFORMAT_ARGB32;
// allocate overlay bitmaps
- for (int index = 0; index < ARRAY_LENGTH(m_overbitmap); index++)
+ for (auto & elem : m_overbitmap)
{
- m_overbitmap[index].set_format(format, texformat);
+ elem.set_format(format, texformat);
if (format==BITMAP_FORMAT_IND16)
- m_overbitmap[index].set_palette(m_overlay_palette->palette());
- m_overbitmap[index].resize(m_overwidth, m_overheight);
+ elem.set_palette(m_overlay_palette->palette());
+ elem.resize(m_overwidth, m_overheight);
}
// allocate overlay texture
m_overtex = machine().render().texture_alloc();
- if (m_overtex == NULL)
+ if (m_overtex == nullptr)
fatalerror("Out of memory allocating overlay texture\n");
}
}
@@ -994,7 +994,7 @@ void laserdisc_device::read_track_data()
// cheat and look up the metadata we are about to retrieve
vbi_metadata vbidata = { 0 };
if (!m_vbidata.empty())
- vbi_metadata_unpack(&vbidata, NULL, &m_vbidata[readhunk * VBI_PACKED_BYTES]);
+ vbi_metadata_unpack(&vbidata, nullptr, &m_vbidata[readhunk * VBI_PACKED_BYTES]);
// if we're in the lead-in area, force the VBI data to be standard lead-in
if (m_curtrack - 1 < VIRTUAL_LEAD_IN_TRACKS)
@@ -1059,7 +1059,7 @@ void laserdisc_device::read_track_data()
// configure the codec and then read
m_readresult = CHDERR_FILE_NOT_FOUND;
- if (m_disc != NULL && !m_videosquelch)
+ if (m_disc != nullptr && !m_videosquelch)
{
m_readresult = m_disc->codec_configure(CHD_CODEC_AVHUFF, AVHUFF_CODEC_DECOMPRESS_CONFIG, &m_avhuff_config);
if (m_readresult == CHDERR_NONE)
@@ -1080,8 +1080,8 @@ void laserdisc_device::read_track_data()
void *laserdisc_device::read_async_static(void *param, int threadid)
{
laserdisc_device &ld = *reinterpret_cast<laserdisc_device *>(param);
- ld.m_readresult = ld.m_disc->read_hunk(ld.m_queued_hunknum, NULL);
- return NULL;
+ ld.m_readresult = ld.m_disc->read_hunk(ld.m_queued_hunknum, nullptr);
+ return nullptr;
}
@@ -1149,18 +1149,18 @@ void laserdisc_device::config_load(int config_type, xml_data_node *parentnode)
return;
// might not have any data
- if (parentnode == NULL)
+ if (parentnode == nullptr)
return;
// iterate over overlay nodes
- for (xml_data_node *ldnode = xml_get_sibling(parentnode->child, "device"); ldnode != NULL; ldnode = xml_get_sibling(ldnode->next, "device"))
+ for (xml_data_node *ldnode = xml_get_sibling(parentnode->child, "device"); ldnode != nullptr; ldnode = xml_get_sibling(ldnode->next, "device"))
{
const char *devtag = xml_get_attribute_string(ldnode, "tag", "");
if (strcmp(devtag, tag()) == 0)
{
// handle the overlay node
xml_data_node *overnode = xml_get_sibling(ldnode->child, "overlay");
- if (overnode != NULL)
+ if (overnode != nullptr)
{
// fetch positioning controls
m_overposx = xml_get_attribute_float(overnode, "hoffset", m_overposx);
@@ -1185,16 +1185,16 @@ void laserdisc_device::config_save(int config_type, xml_data_node *parentnode)
return;
// create a node
- xml_data_node *ldnode = xml_add_child(parentnode, "device", NULL);
- if (ldnode != NULL)
+ xml_data_node *ldnode = xml_add_child(parentnode, "device", nullptr);
+ if (ldnode != nullptr)
{
// output the basics
xml_set_attribute(ldnode, "tag", tag());
// add an overlay node
- xml_data_node *overnode = xml_add_child(ldnode, "overlay", NULL);
+ xml_data_node *overnode = xml_add_child(ldnode, "overlay", nullptr);
bool changed = false;
- if (overnode != NULL)
+ if (overnode != nullptr)
{
// output the positioning controls
if (m_overposx != m_orig_config.m_overposx)
diff --git a/src/devices/machine/laserdsc.h b/src/devices/machine/laserdsc.h
index 55d4aeda1b3..0980bbb9f13 100644
--- a/src/devices/machine/laserdsc.h
+++ b/src/devices/machine/laserdsc.h
@@ -237,14 +237,14 @@ protected:
virtual void player_overlay(bitmap_yuy16 &bitmap) = 0;
// device-level overrides
- virtual void device_start();
- virtual void device_stop();
- virtual void device_reset();
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
- virtual void device_validity_check(validity_checker &valid) const;
+ virtual void device_start() override;
+ virtual void device_stop() override;
+ virtual void device_reset() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
+ virtual void device_validity_check(validity_checker &valid) const override;
// device_sound_interface overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
+ virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
// subclass helpers
void set_audio_squelch(bool squelchleft, bool squelchright) { m_stream->update(); m_audiosquelch = (squelchleft ? 1 : 0) | (squelchright ? 2 : 0); }
diff --git a/src/devices/machine/ldv1000.cpp b/src/devices/machine/ldv1000.cpp
index 18c8d86fc9a..1e6224adc0d 100644
--- a/src/devices/machine/ldv1000.cpp
+++ b/src/devices/machine/ldv1000.cpp
@@ -80,7 +80,7 @@ ADDRESS_MAP_END
static const z80_daisy_config daisy_chain[] =
{
{ "ldvctc" },
- { NULL }
+ { nullptr }
};
@@ -125,7 +125,7 @@ pioneer_ldv1000_device::pioneer_ldv1000_device(const machine_config &mconfig, co
: laserdisc_device(mconfig, PIONEER_LDV1000, "Pioneer LD-V1000", tag, owner, clock, "ldv1000", __FILE__),
m_z80_cpu(*this, "ldv1000"),
m_z80_ctc(*this, "ldvctc"),
- m_multitimer(NULL),
+ m_multitimer(nullptr),
m_command(0),
m_status(0),
m_vsync(false),
diff --git a/src/devices/machine/ldvp931.cpp b/src/devices/machine/ldvp931.cpp
index 0d927fed665..47133de9ffb 100644
--- a/src/devices/machine/ldvp931.cpp
+++ b/src/devices/machine/ldvp931.cpp
@@ -89,7 +89,7 @@ ROM_END
phillips_22vp931_device::phillips_22vp931_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: laserdisc_device(mconfig, PHILLIPS_22VP931, "Phillips 22VP931", tag, owner, clock, "22vp931", __FILE__),
m_i8049_cpu(*this, "vp931"),
- m_tracktimer(NULL),
+ m_tracktimer(nullptr),
m_i8049_out0(0),
m_i8049_out1(0),
m_i8049_port1(0),
@@ -575,7 +575,7 @@ WRITE8_MEMBER( phillips_22vp931_device::i8049_port1_w )
}
// if we have a timer, adjust it
- if (m_tracktimer != NULL)
+ if (m_tracktimer != nullptr)
{
// turn it off if we're not tracking
if (m_trackdir == 0)
diff --git a/src/devices/machine/legscsi.cpp b/src/devices/machine/legscsi.cpp
index 4ef3318d1ce..23cc5902a29 100644
--- a/src/devices/machine/legscsi.cpp
+++ b/src/devices/machine/legscsi.cpp
@@ -18,7 +18,7 @@ void legacy_scsi_host_adapter::reset_bus()
for (int i = 0; i <= 7; i++)
{
scsihle_device *scsidev = get_device(i);
- if (scsidev != NULL)
+ if (scsidev != nullptr)
{
scsidev->reset();
}
@@ -30,7 +30,7 @@ bool legacy_scsi_host_adapter::select(int id)
m_selected = id;
scsihle_device *scsidev = get_device(m_selected);
- if (scsidev != NULL)
+ if (scsidev != nullptr)
{
return true;
}
@@ -41,7 +41,7 @@ bool legacy_scsi_host_adapter::select(int id)
void legacy_scsi_host_adapter::send_command(UINT8 *data, int bytes)
{
scsihle_device *scsidev = get_device(m_selected);
- if (scsidev != NULL)
+ if (scsidev != nullptr)
{
scsidev->SetCommand(data, bytes);
scsidev->ExecCommand();
@@ -55,7 +55,7 @@ void legacy_scsi_host_adapter::send_command(UINT8 *data, int bytes)
int legacy_scsi_host_adapter::get_length(void)
{
scsihle_device *scsidev = get_device(m_selected);
- if (scsidev != NULL)
+ if (scsidev != nullptr)
{
int length;
scsidev->GetLength(&length);
@@ -71,7 +71,7 @@ int legacy_scsi_host_adapter::get_length(void)
int legacy_scsi_host_adapter::get_phase(void)
{
scsihle_device *scsidev = get_device(m_selected);
- if (scsidev != NULL)
+ if (scsidev != nullptr)
{
int phase;
scsidev->GetPhase(&phase);
@@ -87,7 +87,7 @@ int legacy_scsi_host_adapter::get_phase(void)
void legacy_scsi_host_adapter::read_data(UINT8 *data, int bytes)
{
scsihle_device *scsidev = get_device(m_selected);
- if (scsidev != NULL)
+ if (scsidev != nullptr)
{
scsidev->ReadData(data, bytes);
}
@@ -100,7 +100,7 @@ void legacy_scsi_host_adapter::read_data(UINT8 *data, int bytes)
void legacy_scsi_host_adapter::write_data(UINT8 *data, int bytes)
{
scsihle_device *scsidev = get_device(m_selected);
- if (scsidev != NULL)
+ if (scsidev != nullptr)
{
scsidev->WriteData(data, bytes);
}
@@ -113,12 +113,12 @@ void legacy_scsi_host_adapter::write_data(UINT8 *data, int bytes)
UINT8 legacy_scsi_host_adapter::get_status()
{
scsihle_device *scsidev = get_device(m_selected);
- if (scsidev != NULL)
+ if (scsidev != nullptr)
{
void *image;
scsidev->GetDevice(&image);
- if (image != NULL)
+ if (image != nullptr)
return 0x00;
return 0x02;
@@ -133,13 +133,13 @@ UINT8 legacy_scsi_host_adapter::get_status()
scsihle_device *legacy_scsi_host_adapter::get_device(int id)
{
// steal scsi devices from bus
- for (device_t *device = m_scsi_port->first_subdevice(); device != NULL; device = device->next())
+ for (device_t *device = m_scsi_port->first_subdevice(); device != nullptr; device = device->next())
{
SCSI_PORT_SLOT_device *slot = dynamic_cast<SCSI_PORT_SLOT_device *>(device);
- if (slot != NULL)
+ if (slot != nullptr)
{
scsihle_device *scsidev = dynamic_cast<scsihle_device *>(slot->dev());
- if (scsidev != NULL)
+ if (scsidev != nullptr)
{
if (scsidev->GetDeviceID() == id)
{
@@ -149,5 +149,5 @@ scsihle_device *legacy_scsi_host_adapter::get_device(int id)
}
}
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/machine/linflash.cpp b/src/devices/machine/linflash.cpp
index 52b5c0204a8..efc9583981b 100644
--- a/src/devices/machine/linflash.cpp
+++ b/src/devices/machine/linflash.cpp
@@ -16,7 +16,7 @@ void linear_flash_pccard_device::device_start()
const address_space_config *linear_flash_pccard_device::memory_space_config( address_spacenum spacenum ) const
{
- return ( spacenum == AS_0 ) ? &m_space_config : NULL;
+ return ( spacenum == AS_0 ) ? &m_space_config : nullptr;
}
READ16_MEMBER( linear_flash_pccard_device::read_memory )
diff --git a/src/devices/machine/lpci.cpp b/src/devices/machine/lpci.cpp
index 913dd915184..d03667d5be8 100644
--- a/src/devices/machine/lpci.cpp
+++ b/src/devices/machine/lpci.cpp
@@ -91,12 +91,12 @@ const device_type PCI_BUS_LEGACY = &device_creator<pci_bus_legacy_device>;
//-------------------------------------------------
pci_bus_legacy_device::pci_bus_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PCI_BUS_LEGACY, "PCI Bus Legacy", tag, owner, clock, "pci_bus_legacy", __FILE__),
- m_father(NULL)
+ m_father(nullptr)
{
for (int i = 0; i < ARRAY_LENGTH(m_devtag); i++) {
- m_devtag[i]= NULL;
- m_read_callback[i] = NULL;
- m_write_callback[i] = NULL;
+ m_devtag[i]= nullptr;
+ m_read_callback[i] = nullptr;
+ m_write_callback[i] = nullptr;
}
m_siblings_count = 0;
}
@@ -122,7 +122,7 @@ READ32_MEMBER( pci_bus_legacy_device::read )
if (m_devicenum != -1)
{
pci_read_func read = m_busnumaddr->m_read_callback[m_devicenum];
- if (read != NULL)
+ if (read != nullptr)
{
function = (m_address >> 8) & 0x07;
reg = (m_address >> 0) & 0xfc;
@@ -152,10 +152,10 @@ pci_bus_legacy_device *pci_bus_legacy_device::pci_search_bustree(int busnum, int
for (a = 0; a < pcibus->m_siblings_count; a++)
{
ret = pci_search_bustree(busnum, devicenum, pcibus->m_siblings[a]);
- if (ret != NULL)
+ if (ret != nullptr)
return ret;
}
- return NULL;
+ return nullptr;
}
@@ -178,7 +178,7 @@ WRITE32_MEMBER( pci_bus_legacy_device::write )
int busnum = (m_address >> 16) & 0xff;
int devicenum = (m_address >> 11) & 0x1f;
m_busnumaddr = pci_search_bustree(busnum, devicenum, this);
- if (m_busnumaddr != NULL)
+ if (m_busnumaddr != nullptr)
{
m_busnumber = busnum;
m_devicenum = devicenum;
@@ -194,7 +194,7 @@ WRITE32_MEMBER( pci_bus_legacy_device::write )
if (m_devicenum != -1)
{
pci_write_func write = m_busnumaddr->m_write_callback[m_devicenum];
- if (write != NULL)
+ if (write != nullptr)
{
int function = (m_address >> 8) & 0x07;
int reg = (m_address >> 0) & 0xfc;
@@ -263,10 +263,10 @@ void pci_bus_legacy_device::device_start()
/* find all our devices */
for (int i = 0; i < ARRAY_LENGTH(m_devtag); i++)
- if (m_devtag[i] != NULL)
+ if (m_devtag[i] != nullptr)
m_device[i] = machine().device(m_devtag[i]);
- if (m_father != NULL) {
+ if (m_father != nullptr) {
pci_bus_legacy_device *father = machine().device<pci_bus_legacy_device>(m_father);
if (father)
father->add_sibling(this, m_busnum);
diff --git a/src/devices/machine/m6m80011ap.cpp b/src/devices/machine/m6m80011ap.cpp
index 39fbd526235..a8dea68d6ef 100644
--- a/src/devices/machine/m6m80011ap.cpp
+++ b/src/devices/machine/m6m80011ap.cpp
@@ -68,8 +68,8 @@ void m6m80011ap_device::device_reset()
void m6m80011ap_device::nvram_default()
{
- for (offs_t offs = 0; offs < 0x80; offs++)
- m_eeprom_data[offs] = 0xffff;
+ for (auto & elem : m_eeprom_data)
+ elem = 0xffff;
}
diff --git a/src/devices/machine/matsucd.cpp b/src/devices/machine/matsucd.cpp
index 94512e65b39..922f117d188 100644
--- a/src/devices/machine/matsucd.cpp
+++ b/src/devices/machine/matsucd.cpp
@@ -139,7 +139,7 @@ int matsucd_get_next_byte( UINT8 *data )
static void matsucd_cdda_stop( running_machine &machine )
{
- if (cd.cdda != NULL)
+ if (cd.cdda != nullptr)
{
cd.cdda->stop_audio();
cd.frame_timer->reset( );
@@ -148,7 +148,7 @@ static void matsucd_cdda_stop( running_machine &machine )
static void matsucd_cdda_play( running_machine &machine, UINT32 lba, UINT32 num_blocks )
{
- if (cd.cdda != NULL)
+ if (cd.cdda != nullptr)
{
cd.cdda->start_audio(lba, num_blocks);
cd.frame_timer->adjust(attotime::from_hz( 75 ));
@@ -157,7 +157,7 @@ static void matsucd_cdda_play( running_machine &machine, UINT32 lba, UINT32 num_
static void matsucd_cdda_pause( running_machine &machine, int pause )
{
- if (cd.cdda != NULL)
+ if (cd.cdda != nullptr)
{
cd.cdda->pause_audio(pause);
@@ -176,7 +176,7 @@ static UINT8 matsucd_cdda_getstatus( running_machine &machine, UINT32 *lba )
{
if ( lba ) *lba = 0;
- if (cd.cdda != NULL)
+ if (cd.cdda != nullptr)
{
if (cd.cdda->audio_active())
{
@@ -278,9 +278,9 @@ static TIMER_CALLBACK(matsu_subcode_proc)
{
(void)param;
- if (cd.cdda != NULL)
+ if (cd.cdda != nullptr)
{
- UINT8 s = matsucd_cdda_getstatus(machine, NULL);
+ UINT8 s = matsucd_cdda_getstatus(machine, nullptr);
UINT8 newstatus = cd.status;
if ( s == 0x11 || s == 0x12 )
@@ -694,7 +694,7 @@ void matsucd_command_w( running_machine &machine, UINT8 data )
track = cd.input[2];
msfmode = (cd.input[1] & 0x02) ? 1 : 0;
- if ( cd.cdrom == NULL )
+ if ( cd.cdrom == nullptr )
{
machine.logerror( "MATSUCD - Warning: Reading TOC without a CD!\n" );
matsucd_command_error( machine );
diff --git a/src/devices/machine/mc146818.cpp b/src/devices/machine/mc146818.cpp
index fcd71437c1d..9166e189952 100644
--- a/src/devices/machine/mc146818.cpp
+++ b/src/devices/machine/mc146818.cpp
@@ -193,7 +193,7 @@ void mc146818_device::device_timer(emu_timer &timer, device_timer_id id, int par
void mc146818_device::nvram_default()
{
// populate from a memory region if present
- if (m_region != NULL)
+ if (m_region != nullptr)
{
UINT32 bytes = m_region->bytes();
diff --git a/src/devices/machine/mc6843.cpp b/src/devices/machine/mc6843.cpp
index f30dafde916..04a7b6a0906 100644
--- a/src/devices/machine/mc6843.cpp
+++ b/src/devices/machine/mc6843.cpp
@@ -93,11 +93,11 @@ mc6843_device::mc6843_device(const machine_config &mconfig, const char *tag, dev
m_data_idx(0),
m_data_id(0),
m_index_pulse(0),
- m_timer_cont(NULL)
+ m_timer_cont(nullptr)
{
- for (int i = 0; i < 128; i++)
+ for (auto & elem : m_data)
{
- m_data[i] = 0;
+ elem = 0;
}
}
@@ -169,7 +169,7 @@ legacy_floppy_image_device* mc6843_device::floppy_image( UINT8 drive )
legacy_floppy_image_device *img = floppy_get_device( machine(), drive );
if (!img && owner()) {
// For slot devices, drives are typically attached to the slot rather than the machine
- const char *floppy_name = NULL;
+ const char *floppy_name = nullptr;
switch (drive) {
case 0:
floppy_name = FLOPPY_0;
diff --git a/src/devices/machine/mc6854.cpp b/src/devices/machine/mc6854.cpp
index 7ed16885b19..3461d58dde5 100644
--- a/src/devices/machine/mc6854.cpp
+++ b/src/devices/machine/mc6854.cpp
@@ -183,7 +183,7 @@ mc6854_device::mc6854_device(const machine_config &mconfig, const char *tag, dev
m_dcd(0),
m_tstate(0),
m_tones(0),
- m_ttimer(NULL),
+ m_ttimer(nullptr),
m_rstate(0),
m_rreg(0),
m_rones(0),
@@ -197,9 +197,9 @@ mc6854_device::mc6854_device(const machine_config &mconfig, const char *tag, dev
m_rfifo[i] = 0;
}
- for (int i = 0; i < MAX_FRAME_LENGTH; i++)
+ for (auto & elem : m_frame)
{
- m_frame[i] = 0;
+ elem = 0;
}
}
diff --git a/src/devices/machine/mc68681.cpp b/src/devices/machine/mc68681.cpp
index 8b40488de24..edf1a23f817 100644
--- a/src/devices/machine/mc68681.cpp
+++ b/src/devices/machine/mc68681.cpp
@@ -109,7 +109,7 @@ void mc68681_device::device_start()
read_inport.resolve();
write_outport.resolve_safe();
- duart_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mc68681_device::duart_timer_callback),this), NULL);
+ duart_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(mc68681_device::duart_timer_callback),this), nullptr);
save_item(NAME(ACR));
save_item(NAME(IMR));
diff --git a/src/devices/machine/mccs1850.cpp b/src/devices/machine/mccs1850.cpp
index b037f184bfc..72fb12a667a 100644
--- a/src/devices/machine/mccs1850.cpp
+++ b/src/devices/machine/mccs1850.cpp
@@ -374,7 +374,7 @@ void mccs1850_device::nvram_default()
{
memset(m_ram, 0xff, RAM_SIZE);
- if (machine().root_device().memregion(tag()) != NULL)
+ if (machine().root_device().memregion(tag()) != nullptr)
{
UINT8 *nvram = machine().root_device().memregion(tag())->base();
diff --git a/src/devices/machine/mcf5206e.cpp b/src/devices/machine/mcf5206e.cpp
index d993c7235e4..cdc1a9b6477 100644
--- a/src/devices/machine/mcf5206e.cpp
+++ b/src/devices/machine/mcf5206e.cpp
@@ -831,7 +831,7 @@ const device_type MCF5206E_PERIPHERAL = &device_creator<mcf5206e_peripheral_devi
mcf5206e_peripheral_device::mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MCF5206E_PERIPHERAL, "MCF5206E Peripheral", tag, owner, clock, "mcf5206e_peripheral", __FILE__),
device_memory_interface(mconfig, *this),
- m_space_config("coldfire_regs", ENDIANNESS_BIG, 32,10, 0, NULL, *ADDRESS_MAP_NAME(coldfire_regs_map))
+ m_space_config("coldfire_regs", ENDIANNESS_BIG, 32,10, 0, nullptr, *ADDRESS_MAP_NAME(coldfire_regs_map))
{
}
@@ -848,7 +848,7 @@ void mcf5206e_peripheral_device::device_config_complete()
const address_space_config *mcf5206e_peripheral_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/machine/mos8722.cpp b/src/devices/machine/mos8722.cpp
index 31b2beb1f27..214a52faa21 100644
--- a/src/devices/machine/mos8722.cpp
+++ b/src/devices/machine/mos8722.cpp
@@ -100,9 +100,9 @@ void mos8722_device::device_start()
void mos8722_device::device_reset()
{
- for (int i = 0; i < 16; i++)
+ for (auto & elem : m_reg)
{
- m_reg[i] = 0;
+ elem = 0;
}
m_reg[P1L] = 0x01;
diff --git a/src/devices/machine/mpu401.cpp b/src/devices/machine/mpu401.cpp
index 5a2933380df..98e4bb90b76 100644
--- a/src/devices/machine/mpu401.cpp
+++ b/src/devices/machine/mpu401.cpp
@@ -133,7 +133,7 @@ mpu401_device::mpu401_device(const machine_config &mconfig, const char *tag, dev
void mpu401_device::device_start()
{
write_irq.resolve_safe();
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
}
//-------------------------------------------------
diff --git a/src/devices/machine/msm5832.cpp b/src/devices/machine/msm5832.cpp
index 7bc6fa70bfa..21fdeb3ba63 100644
--- a/src/devices/machine/msm5832.cpp
+++ b/src/devices/machine/msm5832.cpp
@@ -96,8 +96,8 @@ msm5832_device::msm5832_device(const machine_config &mconfig, const char *tag, d
m_write(0),
m_cs(0)
{
- for (int i = 0; i < 13; i++)
- m_reg[i] = 0;
+ for (auto & elem : m_reg)
+ elem = 0;
}
diff --git a/src/devices/machine/msm58321.cpp b/src/devices/machine/msm58321.cpp
index 679b85584ff..7bdd77713ea 100644
--- a/src/devices/machine/msm58321.cpp
+++ b/src/devices/machine/msm58321.cpp
@@ -298,8 +298,8 @@ void msm58321_device::rtc_clock_updated(int year, int month, int day, int day_of
void msm58321_device::nvram_default()
{
- for (int i = 0; i < 13; i++)
- m_reg[i] = 0;
+ for (auto & elem : m_reg)
+ elem = 0;
if (m_default_24h)
m_reg[REGISTER_H10] = H10_24;
diff --git a/src/devices/machine/ncr539x.cpp b/src/devices/machine/ncr539x.cpp
index fe1fd9919e1..3d0a83b5246 100644
--- a/src/devices/machine/ncr539x.cpp
+++ b/src/devices/machine/ncr539x.cpp
@@ -135,7 +135,7 @@ void ncr539x_device::device_start()
m_out_irq_cb.resolve_safe();
m_out_drq_cb.resolve_safe();
- m_operation_timer = timer_alloc(0, NULL);
+ m_operation_timer = timer_alloc(0, nullptr);
}
//-------------------------------------------------
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index 8b9bceb2b3d..94c9c29e36e 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -216,8 +216,8 @@ protected:
switch (spacenum)
{
case AS_PROGRAM: return &m_program_config;
- case AS_IO: return NULL;
- default: return NULL;
+ case AS_IO: return nullptr;
+ default: return nullptr;
}
}
@@ -310,7 +310,7 @@ public:
inline netlist_mame_device_t &nl_owner() const { return *m_owner; }
- inline bool is_sound_device() const { return (m_sound != NULL); }
+ inline bool is_sound_device() const { return (m_sound != nullptr); }
inline void update_to_current_time()
{
@@ -509,7 +509,7 @@ class NETLIB_NAME(analog_callback) : public netlist::device_t
{
public:
NETLIB_NAME(analog_callback)()
- : device_t(), m_cpu_device(NULL), m_last(0) { }
+ : device_t(), m_cpu_device(nullptr), m_last(0) { }
ATTR_COLD void start()
{
@@ -658,8 +658,8 @@ public:
ATTR_COLD void reset()
{
m_pos = 0;
- for (int i = 0; i < MAX_INPUT_CHANNELS; i++)
- m_buffer[i] = NULL;
+ for (auto & elem : m_buffer)
+ elem = nullptr;
}
ATTR_COLD int resolve()
@@ -682,7 +682,7 @@ public:
{
for (int i=0; i<m_num_channel; i++)
{
- if (m_buffer[i] == NULL)
+ if (m_buffer[i] == nullptr)
break; // stop, called outside of stream_update
const nl_double v = m_buffer[i][m_pos];
m_param[i]->setTo(v * m_param_mult[i].Value() + m_param_offset[i].Value());
diff --git a/src/devices/machine/nscsi_bus.cpp b/src/devices/machine/nscsi_bus.cpp
index 7618b298787..611586a7962 100644
--- a/src/devices/machine/nscsi_bus.cpp
+++ b/src/devices/machine/nscsi_bus.cpp
@@ -156,7 +156,7 @@ nscsi_device::nscsi_device(const machine_config &mconfig, device_type type, cons
device_slot_card_interface(mconfig, *this)
{
scsi_id = scsi_refid = -1;
- scsi_bus = 0;
+ scsi_bus = nullptr;
}
void nscsi_device::connect_to_bus(nscsi_bus_device *bus, int refid, int default_scsi_id)
diff --git a/src/devices/machine/nvram.cpp b/src/devices/machine/nvram.cpp
index 8ea20a58eac..d1e99ceb98b 100644
--- a/src/devices/machine/nvram.cpp
+++ b/src/devices/machine/nvram.cpp
@@ -26,7 +26,7 @@ nvram_device::nvram_device(const machine_config &mconfig, const char *tag, devic
: device_t(mconfig, NVRAM, "NVRAM", tag, owner, clock, "nvram", __FILE__),
device_nvram_interface(mconfig, *this),
m_default_value(DEFAULT_ALL_1),
- m_base(NULL),
+ m_base(nullptr),
m_length(0)
{
}
@@ -79,7 +79,7 @@ void nvram_device::nvram_default()
determine_final_base();
// region always wins
- if (m_region != NULL)
+ if (m_region != nullptr)
{
memcpy(m_base, m_region->base(), m_length);
return;
@@ -154,16 +154,16 @@ void nvram_device::nvram_write(emu_file &file)
void nvram_device::determine_final_base()
{
// find our shared pointer with the target RAM
- if (m_base == NULL)
+ if (m_base == nullptr)
{
memory_share *share = owner()->memshare(tag());
- if (share == NULL)
+ if (share == nullptr)
throw emu_fatalerror("NVRAM device '%s' has no corresponding AM_SHARE region", tag());
m_base = share->ptr();
m_length = share->bytes();
}
// if we are region-backed for the default, find it now and make sure it's the right size
- if (m_region != NULL && m_region->bytes() != m_length)
+ if (m_region != nullptr && m_region->bytes() != m_length)
throw emu_fatalerror("NVRAM device '%s' has a default region, but it should be 0x%" SIZETFMT "X bytes", tag(), m_length);
}
diff --git a/src/devices/machine/pc_fdc.cpp b/src/devices/machine/pc_fdc.cpp
index 5c56a53d3d6..d72db5a0c45 100644
--- a/src/devices/machine/pc_fdc.cpp
+++ b/src/devices/machine/pc_fdc.cpp
@@ -78,9 +78,9 @@ void pc_fdc_family_device::device_start()
drq_cb.resolve();
for(int i=0; i<4; i++) {
- char name[2] = {'0'+i, 0};
+ char name[2] = {static_cast<char>('0'+i), 0};
floppy_connector *conn = subdevice<floppy_connector>(name);
- floppy[i] = conn ? conn->get_device() : NULL;
+ floppy[i] = conn ? conn->get_device() : nullptr;
}
irq = drq = false;
@@ -115,7 +115,7 @@ WRITE8_MEMBER( pc_fdc_family_device::dor_w )
if(dor & (0x10 << fid))
fdc->set_floppy(floppy[fid]);
else
- fdc->set_floppy(NULL);
+ fdc->set_floppy(nullptr);
check_irq();
check_drq();
diff --git a/src/devices/machine/pccard.cpp b/src/devices/machine/pccard.cpp
index 0d9887fa15f..3284c2c5d45 100644
--- a/src/devices/machine/pccard.cpp
+++ b/src/devices/machine/pccard.cpp
@@ -25,7 +25,7 @@ const device_type PCCARD_SLOT = &device_creator<pccard_slot_device>;
pccard_slot_device::pccard_slot_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, PCCARD_SLOT, "PCCARD SLOT", tag, owner, clock, "pccard", __FILE__),
device_slot_interface(mconfig, *this),
- m_pccard(NULL)
+ m_pccard(nullptr)
{
}
@@ -36,12 +36,12 @@ void pccard_slot_device::device_start()
READ_LINE_MEMBER(pccard_slot_device::read_line_inserted)
{
- return m_pccard != NULL;
+ return m_pccard != nullptr;
}
READ16_MEMBER( pccard_slot_device::read_memory )
{
- if( m_pccard != NULL )
+ if( m_pccard != nullptr )
{
return m_pccard->read_memory( space, offset, mem_mask );
}
@@ -51,7 +51,7 @@ READ16_MEMBER( pccard_slot_device::read_memory )
WRITE16_MEMBER( pccard_slot_device::write_memory )
{
- if( m_pccard != NULL )
+ if( m_pccard != nullptr )
{
m_pccard->write_memory( space, offset, data, mem_mask );
}
@@ -59,7 +59,7 @@ WRITE16_MEMBER( pccard_slot_device::write_memory )
READ16_MEMBER( pccard_slot_device::read_reg )
{
- if( m_pccard != NULL )
+ if( m_pccard != nullptr )
{
return m_pccard->read_reg( space, offset, mem_mask );
}
@@ -69,7 +69,7 @@ READ16_MEMBER( pccard_slot_device::read_reg )
WRITE16_MEMBER( pccard_slot_device::write_reg )
{
- if( m_pccard != NULL )
+ if( m_pccard != nullptr )
{
m_pccard->write_reg( space, offset, data, mem_mask );
}
diff --git a/src/devices/machine/pci.cpp b/src/devices/machine/pci.cpp
index 079444f379b..f41eaea2e20 100644
--- a/src/devices/machine/pci.cpp
+++ b/src/devices/machine/pci.cpp
@@ -93,7 +93,7 @@ void pci_device::device_start()
bank_count = 0;
bank_reg_count = 0;
- expansion_rom = 0;
+ expansion_rom = nullptr;
expansion_rom_size = 0;
expansion_rom_base = 0;
}
@@ -411,7 +411,7 @@ READ8_MEMBER(pci_bridge_device::header_type_r)
const address_space_config *pci_bridge_device::memory_space_config(address_spacenum spacenum) const
{
- return spacenum == AS_PROGRAM ? &configure_space_config : NULL;
+ return spacenum == AS_PROGRAM ? &configure_space_config : nullptr;
}
device_t *pci_bridge_device::bus_root()
@@ -431,15 +431,15 @@ void pci_bridge_device::device_start()
{
pci_device::device_start();
- for(int i=0; i<32*8; i++)
- sub_devices[i] = NULL;
+ for(auto & elem : sub_devices)
+ elem = nullptr;
- for(device_t *d = bus_root()->first_subdevice(); d != NULL; d = d->next()) {
+ for(device_t *d = bus_root()->first_subdevice(); d != nullptr; d = d->next()) {
const char *t = d->tag();
int l = strlen(t);
if(l <= 4 || t[l-5] != ':' || t[l-2] != '.')
continue;
- int id = strtol(t+l-4, 0, 16);
+ int id = strtol(t+l-4, nullptr, 16);
int fct = t[l-1] - '0';
sub_devices[(id << 3) | fct] = downcast<pci_device *>(d);
}
diff --git a/src/devices/machine/pci9050.cpp b/src/devices/machine/pci9050.cpp
index 2687966c718..4a8ad2dd704 100644
--- a/src/devices/machine/pci9050.cpp
+++ b/src/devices/machine/pci9050.cpp
@@ -44,8 +44,8 @@ pci9050_device::pci9050_device(const machine_config &mconfig, const char *tag, d
: pci_device(mconfig, PCI9050, "PLX PCI9050 PCI to Local Bus Bridge", tag, owner, clock, "pci9050", __FILE__)
{
for(int i=0; i<4; i++) {
- m_devices[i] = NULL;
- m_names[i] = NULL;
+ m_devices[i] = nullptr;
+ m_names[i] = nullptr;
}
}
diff --git a/src/devices/machine/pckeybrd.cpp b/src/devices/machine/pckeybrd.cpp
index f7a049e2469..513b9036dc9 100644
--- a/src/devices/machine/pckeybrd.cpp
+++ b/src/devices/machine/pckeybrd.cpp
@@ -208,7 +208,7 @@ const at_keyboard_device::extended_keyboard_code at_keyboard_device::m_extended_
/* print screen */
{
"\xe0\x12\xe0\x7c",
- 0, /* I don't know the break sequence */
+ nullptr, /* I don't know the break sequence */
},
/* right alt */
@@ -269,7 +269,7 @@ const at_keyboard_device::extended_keyboard_code at_keyboard_device::m_extended_
/* pause */
{
"\xe1\x14\x77\xe1\xf0\x14\xf0\x77",
- 0, /*?? I don't know the break sequence */
+ nullptr, /*?? I don't know the break sequence */
}
};
diff --git a/src/devices/machine/pit8253.cpp b/src/devices/machine/pit8253.cpp
index 2a0be4466ab..d0bf2bc5c84 100644
--- a/src/devices/machine/pit8253.cpp
+++ b/src/devices/machine/pit8253.cpp
@@ -83,7 +83,7 @@ pit8253_device::pit8253_timer *pit8253_device::get_timer(int which)
if (which < PIT8253_MAX_TIMER)
return &m_timers[which];
- return NULL;
+ return nullptr;
}
@@ -758,7 +758,7 @@ READ8_MEMBER( pit8253_device::read )
LOG2(("pit8253_r(): offset %d\n", offset));
- if (timer == NULL)
+ if (timer == nullptr)
{
/* Reading mode control register is illegal according to docs */
/* Experimentally determined: reading it returns 0 */
@@ -935,11 +935,11 @@ WRITE8_MEMBER( pit8253_device::write )
LOG2(("pit8253: write(): offset=%d data=0x%02x\n", offset, data));
- if (timer == NULL)
+ if (timer == nullptr)
{
/* Write to mode control register */
timer = get_timer((data >> 6) & 3);
- if (timer == NULL)
+ if (timer == nullptr)
{
readback_command(data);
return;
@@ -1042,7 +1042,7 @@ void pit8253_device::gate_w(int gate, int state)
{
pit8253_timer *timer = get_timer(gate);
- if (timer == NULL)
+ if (timer == nullptr)
return;
LOG2(("pit8253 : gate_w(): gate=%d state=%d\n", gate, state));
@@ -1082,7 +1082,7 @@ WRITE_LINE_MEMBER( pit8253_device::write_gate2 )
void pit8253_device::set_clockin(int timerno, double new_clockin)
{
pit8253_timer *timer = get_timer(timerno);
- assert(timer != NULL);
+ assert(timer != nullptr);
LOG2(("pit8253_set_clockin(): PIT timer=%d, clockin = %f\n", timerno, new_clockin));
@@ -1095,7 +1095,7 @@ void pit8253_device::set_clockin(int timerno, double new_clockin)
void pit8253_device::set_clock_signal(int timerno, int state)
{
pit8253_timer *timer = get_timer(timerno);
- assert(timer != NULL);
+ assert(timer != nullptr);
LOG2(("pit8253_set_clock_signal(): PIT timer=%d, state = %d\n", timerno, state));
diff --git a/src/devices/machine/pla.cpp b/src/devices/machine/pla.cpp
index 37051d99548..417fb4e6c3f 100644
--- a/src/devices/machine/pla.cpp
+++ b/src/devices/machine/pla.cpp
@@ -35,7 +35,7 @@ pla_device::pla_device(const machine_config &mconfig, const char *tag, device_t
void pla_device::device_start()
{
- assert(region() != NULL);
+ assert(region() != nullptr);
assert(m_terms < MAX_TERMS);
assert(m_inputs < 32 && m_outputs <= 32);
@@ -48,8 +48,8 @@ void pla_device::device_start()
// initialize cache
m_cache2_ptr = 0;
- for (int i = 0; i < CACHE2_SIZE; i++)
- m_cache2[i] = 0x80000000;
+ for (auto & elem : m_cache2)
+ elem = 0x80000000;
m_cache_size = 0;
int csize = 1 << ((m_inputs > MAX_CACHE_BITS) ? MAX_CACHE_BITS : m_inputs);
@@ -146,9 +146,9 @@ UINT32 pla_device::read(UINT32 input)
if (input < m_cache_size)
return m_cache[input];
- for (int i = 0; i < CACHE2_SIZE; ++i)
+ for (auto cache2_entry : m_cache2)
{
- UINT64 cache2_entry = m_cache2[i];
+
if ((UINT32)cache2_entry == input)
{
diff --git a/src/devices/machine/ram.cpp b/src/devices/machine/ram.cpp
index 815ec477ba4..92728b55303 100644
--- a/src/devices/machine/ram.cpp
+++ b/src/devices/machine/ram.cpp
@@ -33,8 +33,8 @@ ram_device::ram_device(const machine_config &mconfig, const char *tag, device_t
: device_t(mconfig, RAM, "RAM", tag, owner, clock, "ram", __FILE__)
{
m_size = 0;
- m_default_size = NULL;
- m_extra_options = NULL;
+ m_default_size = nullptr;
+ m_extra_options = nullptr;
m_default_value = 0xCD;
}
@@ -51,7 +51,7 @@ void ram_device::device_start()
if (strcmp(tag(), ":" RAM_TAG) == 0)
{
const char *ramsize_string = machine().options().ram_size();
- if ((ramsize_string != NULL) && (ramsize_string[0] != '\0'))
+ if ((ramsize_string != nullptr) && (ramsize_string[0] != '\0'))
m_size = parse_string(ramsize_string);
}
@@ -76,7 +76,7 @@ void ram_device::device_start()
void ram_device::device_validity_check(validity_checker &valid) const
{
- const char *ramsize_string = NULL;
+ const char *ramsize_string = nullptr;
int is_valid = FALSE;
UINT32 specified_ram;
const char *gamename_option;
@@ -86,27 +86,27 @@ void ram_device::device_validity_check(validity_checker &valid) const
osd_printf_error("Invalid default RAM option: %s\n", m_default_size);
/* command line options are only parsed for the device named RAM_TAG */
- if (tag() != NULL && strcmp(tag(), ":" RAM_TAG) == 0)
+ if (tag() != nullptr && strcmp(tag(), ":" RAM_TAG) == 0)
{
/* verify command line ram option */
ramsize_string = mconfig().options().ram_size();
gamename_option = mconfig().options().system_name();
- if ((ramsize_string != NULL) && (ramsize_string[0] != '\0'))
+ if ((ramsize_string != nullptr) && (ramsize_string[0] != '\0'))
{
specified_ram = parse_string(ramsize_string);
if (specified_ram == 0)
osd_printf_error("Cannot recognize the RAM option %s\n", ramsize_string);
- if (gamename_option != NULL && *gamename_option != 0 && strcmp(gamename_option, mconfig().gamedrv().name) == 0)
+ if (gamename_option != nullptr && *gamename_option != 0 && strcmp(gamename_option, mconfig().gamedrv().name) == 0)
{
/* compare command line option to default value */
if (default_size() == specified_ram)
is_valid = TRUE;
/* verify extra ram options */
- if (m_extra_options != NULL)
+ if (m_extra_options != nullptr)
{
int j;
int size = strlen(m_extra_options);
@@ -157,7 +157,7 @@ void ram_device::device_validity_check(validity_checker &valid) const
strcatprintf(output, "Cannot recognize the RAM option %s", ramsize_string);
strcatprintf(output, " (valid options are %s", m_default_size);
- if (m_extra_options != NULL)
+ if (m_extra_options != nullptr)
strcatprintf(output, ",%s).\n", m_extra_options);
else
strcatprintf(output, ").\n");
diff --git a/src/devices/machine/ram.h b/src/devices/machine/ram.h
index c17832dff16..7d3f054895f 100644
--- a/src/devices/machine/ram.h
+++ b/src/devices/machine/ram.h
@@ -71,8 +71,8 @@ public:
static void static_set_default_value(device_t &device, UINT8 default_value) { downcast<ram_device &>(device).m_default_value = default_value; }
protected:
- virtual void device_start(void);
- virtual void device_validity_check(validity_checker &valid) const;
+ virtual void device_start(void) override;
+ virtual void device_validity_check(validity_checker &valid) const override;
private:
// device state
diff --git a/src/devices/machine/rp5h01.cpp b/src/devices/machine/rp5h01.cpp
index 53691cf160f..40964570129 100644
--- a/src/devices/machine/rp5h01.cpp
+++ b/src/devices/machine/rp5h01.cpp
@@ -54,7 +54,7 @@ void rp5h01_device::device_config_complete()
void rp5h01_device::device_start()
{
m_data = region()->base();
- if (m_data == NULL)
+ if (m_data == nullptr)
m_data = initial_data;
else
assert(region()->bytes() == 0x10);
diff --git a/src/devices/machine/rtc9701.cpp b/src/devices/machine/rtc9701.cpp
index ee7cff625c7..7c92ddc53e7 100644
--- a/src/devices/machine/rtc9701.cpp
+++ b/src/devices/machine/rtc9701.cpp
@@ -129,8 +129,8 @@ void rtc9701_device::device_reset()
void rtc9701_device::nvram_default()
{
- for (offs_t offs = 0; offs < 0x100; offs++)
- rtc9701_data[offs] = 0xffff;
+ for (auto & elem : rtc9701_data)
+ elem = 0xffff;
}
diff --git a/src/devices/machine/s2636.cpp b/src/devices/machine/s2636.cpp
index c3cf7bb8178..142514d8a19 100644
--- a/src/devices/machine/s2636.cpp
+++ b/src/devices/machine/s2636.cpp
@@ -89,7 +89,7 @@ s2636_device::s2636_device(const machine_config &mconfig, const char *tag, devic
: device_t(mconfig, S2636, "Signetics 2636", tag, owner, clock, "s2636", __FILE__),
device_video_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
- m_channel(NULL),
+ m_channel(nullptr),
m_size(0),
m_pos(0),
m_level(0),
@@ -97,8 +97,8 @@ s2636_device::s2636_device(const machine_config &mconfig, const char *tag, devic
m_y_offset(0),
m_x_offset(0)
{
- for (int i = 0; i < 1; i++)
- m_reg[i] = 0;
+ for (auto & elem : m_reg)
+ elem = 0;
}
//-------------------------------------------------
diff --git a/src/devices/machine/s3c24xx.inc b/src/devices/machine/s3c24xx.inc
index 6bf7a49f71c..07193f890a4 100644
--- a/src/devices/machine/s3c24xx.inc
+++ b/src/devices/machine/s3c24xx.inc
@@ -1481,9 +1481,9 @@ TIMER_CALLBACK_MEMBER( S3C24_CLASS_NAME::s3c24xx_pwm_timer_exp )
void S3C24_CLASS_NAME::s3c24xx_dma_reset()
{
- for (int i = 0; i < S3C24XX_DMA_COUNT; i++)
+ for (auto & elem : m_dma)
{
- s3c24xx_dma_t *dma = &m_dma[i];
+ s3c24xx_dma_t *dma = &elem;
memset( &dma->regs, 0, sizeof( dma->regs));
dma->timer->adjust( attotime::never);
}
@@ -2012,9 +2012,9 @@ WRITE32_MEMBER( S3C24_CLASS_NAME::s3c24xx_usb_host_w )
void S3C24_CLASS_NAME::s3c24xx_uart_reset()
{
- for (int i = 0; i < S3C24XX_UART_COUNT; i++)
+ for (auto & elem : m_uart)
{
- s3c24xx_uart_t *uart = &m_uart[i];
+ s3c24xx_uart_t *uart = &elem;
memset( &uart->regs, 0, sizeof( uart->regs));
uart->regs.utrstat = 6;
}
@@ -2860,9 +2860,9 @@ void S3C24_CLASS_NAME::s3c24xx_touch_screen(int state)
void S3C24_CLASS_NAME::s3c24xx_spi_reset()
{
- for (int i = 0; i < S3C24XX_SPI_COUNT; i++)
+ for (auto & elem : m_spi)
{
- s3c24xx_spi_t *spi = &m_spi[i];
+ s3c24xx_spi_t *spi = &elem;
memset( &spi->regs, 0, sizeof( spi->regs));
spi->regs.spsta = 1;
#if defined(DEVICE_S3C2400) || defined(DEVICE_S3C2410)
@@ -3496,9 +3496,9 @@ void S3C24_CLASS_NAME::s3c24xx_device_start()
{
m_pwm.timer[i] = machine().scheduler().timer_alloc(timer_expired_delegate( FUNC(S3C24_CLASS_NAME::s3c24xx_pwm_timer_exp), this));
}
- for (int i = 0; i < S3C24XX_DMA_COUNT; i++)
+ for (auto & elem : m_dma)
{
- m_dma[i].timer = machine().scheduler().timer_alloc(timer_expired_delegate( FUNC(S3C24_CLASS_NAME::s3c24xx_dma_timer_exp), this));
+ elem.timer = machine().scheduler().timer_alloc(timer_expired_delegate( FUNC(S3C24_CLASS_NAME::s3c24xx_dma_timer_exp), this));
}
m_iic.timer = machine().scheduler().timer_alloc(timer_expired_delegate( FUNC(S3C24_CLASS_NAME::s3c24xx_iic_timer_exp), this));
m_iis.timer = machine().scheduler().timer_alloc(timer_expired_delegate( FUNC(S3C24_CLASS_NAME::s3c24xx_iis_timer_exp), this));
diff --git a/src/devices/machine/s3c44b0.cpp b/src/devices/machine/s3c44b0.cpp
index 22d895fb5d9..56e9ee32e3b 100644
--- a/src/devices/machine/s3c44b0.cpp
+++ b/src/devices/machine/s3c44b0.cpp
@@ -76,9 +76,9 @@ void s3c44b0_device::device_start()
for (int i = 0; i < 6; i++) m_pwm.timer[i] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::pwm_timer_exp),this));
- for (int i = 0; i < 2; i++) m_uart[i].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::uart_timer_exp),this));
- for (int i = 0; i < 2; i++) m_zdma[i].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::zdma_timer_exp),this));
- for (int i = 0; i < 2; i++) m_bdma[i].timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::bdma_timer_exp),this));
+ for (auto & elem : m_uart) elem.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::uart_timer_exp),this));
+ for (auto & elem : m_zdma) elem.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::zdma_timer_exp),this));
+ for (auto & elem : m_bdma) elem.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::bdma_timer_exp),this));
m_lcd.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::lcd_timer_exp),this));
m_wdt.timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(s3c44b0_device::wdt_timer_exp),this));
@@ -390,12 +390,12 @@ void s3c44b0_device::lcd_render_stn_04()
UINT8 *bitmap = m_lcd.bitmap + ((m_lcd.vpos - m_lcd.vpos_min) * (m_lcd.hpos_max - m_lcd.hpos_min + 1)) + (m_lcd.hpos - m_lcd.hpos_min);
UINT8 data[16];
lcd_dma_read(16, data);
- for (int i = 0; i < 16; i++)
+ for (auto & elem : data)
{
for (int j = 0; j < 2; j++)
{
- *bitmap++ = lcd_get_color_stn_04((data[i] >> 4) & 0x0F);
- data[i] = data[i] << 4;
+ *bitmap++ = lcd_get_color_stn_04((elem >> 4) & 0x0F);
+ elem = elem << 4;
m_lcd.hpos++;
if (m_lcd.hpos >= m_lcd.hpos_min + (m_lcd.pagewidth_max << 2))
{
@@ -416,15 +416,15 @@ void s3c44b0_device::lcd_render_stn_08()
UINT8 *bitmap = m_lcd.bitmap + ((m_lcd.vpos - m_lcd.vpos_min) * (m_lcd.hpos_max - m_lcd.hpos_min + 1)) + (m_lcd.hpos - m_lcd.hpos_min);
UINT8 data[16];
lcd_dma_read(16, data);
- for (int i = 0; i < 16; i++)
+ for (auto & elem : data)
{
UINT8 xxx[3];
- xxx[0] = lcd_get_color_stn_08_r(data[i]);
- xxx[1] = lcd_get_color_stn_08_g(data[i]);
- xxx[2] = lcd_get_color_stn_08_b(data[i]);
- for (int j = 0; j < 3; j++)
+ xxx[0] = lcd_get_color_stn_08_r(elem);
+ xxx[1] = lcd_get_color_stn_08_g(elem);
+ xxx[2] = lcd_get_color_stn_08_b(elem);
+ for (auto & xxx_j : xxx)
{
- *bitmap++ = xxx[j];
+ *bitmap++ = xxx_j;
m_lcd.hpos++;
if (m_lcd.hpos >= m_lcd.hpos_min + (m_lcd.pagewidth_max * 6))
{
diff --git a/src/devices/machine/saturn.cpp b/src/devices/machine/saturn.cpp
index cf79fdc26a2..6472c4ab3c8 100644
--- a/src/devices/machine/saturn.cpp
+++ b/src/devices/machine/saturn.cpp
@@ -964,10 +964,10 @@ static const gfx_layout tiles16x16x8_layout =
GFXDECODE_START( stv )
- GFXDECODE_ENTRY( NULL, 0, tiles8x8x4_layout, 0x00, (0x80*(2+1)) )
- GFXDECODE_ENTRY( NULL, 0, tiles16x16x4_layout, 0x00, (0x80*(2+1)) )
- GFXDECODE_ENTRY( NULL, 0, tiles8x8x8_layout, 0x00, (0x08*(2+1)) )
- GFXDECODE_ENTRY( NULL, 0, tiles16x16x8_layout, 0x00, (0x08*(2+1)) )
+ GFXDECODE_ENTRY( nullptr, 0, tiles8x8x4_layout, 0x00, (0x80*(2+1)) )
+ GFXDECODE_ENTRY( nullptr, 0, tiles16x16x4_layout, 0x00, (0x80*(2+1)) )
+ GFXDECODE_ENTRY( nullptr, 0, tiles8x8x8_layout, 0x00, (0x08*(2+1)) )
+ GFXDECODE_ENTRY( nullptr, 0, tiles16x16x8_layout, 0x00, (0x08*(2+1)) )
GFXDECODE_END
WRITE_LINE_MEMBER(saturn_state::scudsp_end_w)
diff --git a/src/devices/machine/spchrom.cpp b/src/devices/machine/spchrom.cpp
index 25210f26fa4..542be5b4ded 100644
--- a/src/devices/machine/spchrom.cpp
+++ b/src/devices/machine/spchrom.cpp
@@ -125,7 +125,7 @@ void speechrom_device::read_and_branch()
void speechrom_device::device_start()
{
memory_region *region = memregion(tag());
- if (region == NULL)
+ if (region == nullptr)
{
throw emu_fatalerror("No region for device '%s'\n", tag());
}
diff --git a/src/devices/machine/stvcd.cpp b/src/devices/machine/stvcd.cpp
index eebb8d11cb4..09d7b9e09a5 100644
--- a/src/devices/machine/stvcd.cpp
+++ b/src/devices/machine/stvcd.cpp
@@ -309,7 +309,7 @@ void saturn_state::cd_exec_command( void )
for (i = xfersectpos; i < xfersectpos+xfersectnum; i++)
{
cd_free_block(transpart->blocks[i]);
- transpart->blocks[i] = (blockT *)NULL;
+ transpart->blocks[i] = (blockT *)nullptr;
transpart->bnum[i] = 0xff;
}
@@ -595,7 +595,7 @@ void saturn_state::cd_exec_command( void )
if (parm == 0xff)
{
- cddevice = (filterT *)NULL;
+ cddevice = (filterT *)nullptr;
}
else
{
@@ -755,7 +755,7 @@ void saturn_state::cd_exec_command( void )
for (i = 0; i < MAX_BLOCKS; i++)
{
cd_free_block(partitions[bufnum].blocks[i]);
- partitions[bufnum].blocks[i] = (blockT *)NULL;
+ partitions[bufnum].blocks[i] = (blockT *)nullptr;
partitions[bufnum].bnum[i] = 0xff;
}
@@ -813,7 +813,7 @@ void saturn_state::cd_exec_command( void )
for (j = 0; j < MAX_BLOCKS; j++)
{
cd_free_block(partitions[i].blocks[j]);
- partitions[i].blocks[j] = (blockT *)NULL;
+ partitions[i].blocks[j] = (blockT *)nullptr;
partitions[i].bnum[j] = 0xff;
}
@@ -1047,7 +1047,7 @@ void saturn_state::cd_exec_command( void )
{
partitions[bufnum].size -= partitions[bufnum].blocks[i]->size;
cd_free_block(partitions[bufnum].blocks[i]);
- partitions[bufnum].blocks[i] = (blockT *)NULL;
+ partitions[bufnum].blocks[i] = (blockT *)nullptr;
partitions[bufnum].bnum[i] = 0xff;
}
@@ -1223,7 +1223,7 @@ void saturn_state::cd_exec_command( void )
if((cr3 >> 8) < 0x24)
cddevice = &filters[cr3 >> 8];
else
- cddevice = (filterT *)NULL;
+ cddevice = (filterT *)nullptr;
/* TODO: */
//read_new_dir(read_dir - 2);
@@ -1318,7 +1318,7 @@ void saturn_state::cd_exec_command( void )
if(file_filter < 0x24)
cddevice = &filters[file_filter];
else
- cddevice = (filterT *)NULL;
+ cddevice = (filterT *)nullptr;
printf("Read file %08x (%08x %08x) %02x %d\n",curdir[file_id].firstfad,cd_curfad,fadstoplay,file_filter,sectlenin);
@@ -1455,7 +1455,7 @@ void saturn_state::stvcd_reset( void )
for (j = 0; j < MAX_BLOCKS; j++)
{
- partitions[i].blocks[j] = (blockT *)NULL;
+ partitions[i].blocks[j] = (blockT *)nullptr;
partitions[i].bnum[j] = 0xff;
}
}
@@ -1471,11 +1471,11 @@ void saturn_state::stvcd_reset( void )
if (cdrom)
{
cdrom_close(cdrom);
- cdrom = (cdrom_file *)NULL;
+ cdrom = (cdrom_file *)nullptr;
}
cdrom_image_device *cddevice = machine().device<cdrom_image_device>("cdrom");
- if (cddevice!=NULL)
+ if (cddevice!=nullptr)
{
// MESS case
cdrom = cddevice->get_cdrom_file();
@@ -1533,7 +1533,7 @@ saturn_state::blockT *saturn_state::cd_alloc_block(UINT8 *blknum)
}
buffull = 1;
- return (blockT *)NULL;
+ return (blockT *)nullptr;
}
void saturn_state::cd_free_block(blockT *blktofree)
@@ -1542,7 +1542,7 @@ void saturn_state::cd_free_block(blockT *blktofree)
CDROM_LOG(("cd_free_block: %x\n", (UINT32)(FPTR)blktofree))
- if(blktofree == NULL)
+ if(blktofree == nullptr)
{
return;
}
@@ -1584,7 +1584,7 @@ void saturn_state::cd_defragblocks(partitionT *part)
{
for (j = i+1; j < MAX_BLOCKS; j++)
{
- if ((part->blocks[i] == (blockT *)NULL) && (part->blocks[j] != (blockT *)NULL))
+ if ((part->blocks[i] == (blockT *)nullptr) && (part->blocks[j] != (blockT *)nullptr))
{
temp = part->blocks[i];
part->blocks[i] = part->blocks[j];
@@ -1808,7 +1808,7 @@ UINT32 saturn_state::cd_readLong(UINT32 addr)
for (i = xfersectpos; i < xfersectpos+xfersectnum; i++)
{
cd_free_block(transpart->blocks[i]);
- transpart->blocks[i] = (blockT *)NULL;
+ transpart->blocks[i] = (blockT *)nullptr;
transpart->bnum[i] = 0xff;
}
@@ -2243,11 +2243,11 @@ void saturn_state::stvcd_exit( void )
if (cdrom)
{
cdrom_image_device *cddevice = machine().device<cdrom_image_device>("cdrom");
- if (cddevice==NULL)
+ if (cddevice==nullptr)
{
cdrom_close(cdrom);
}
- cdrom = (cdrom_file *)NULL;
+ cdrom = (cdrom_file *)nullptr;
}
}
@@ -2346,7 +2346,7 @@ void saturn_state::cd_readTOC(void)
saturn_state::partitionT *saturn_state::cd_filterdata(filterT *flt, int trktype, UINT8 *p_ok)
{
int match, keepgoing;
- partitionT *filterprt = (partitionT *)NULL;
+ partitionT *filterprt = (partitionT *)nullptr;
CDROM_LOG(("cd_filterdata, trktype %d\n", trktype))
match = 1;
@@ -2428,7 +2428,7 @@ saturn_state::partitionT *saturn_state::cd_filterdata(filterT *flt, int trktype,
if ((lastbuf == 0xff) || (keepgoing == 0))
{
*p_ok = 0;
- return (partitionT *)NULL;
+ return (partitionT *)nullptr;
}
// try again using the filter that was on the "false" connector
@@ -2446,10 +2446,10 @@ saturn_state::partitionT *saturn_state::cd_filterdata(filterT *flt, int trktype,
filterprt->blocks[filterprt->numblks] = cd_alloc_block(&filterprt->bnum[filterprt->numblks]);
// did the allocation succeed?
- if (filterprt->blocks[filterprt->numblks] == (blockT *)NULL)
+ if (filterprt->blocks[filterprt->numblks] == (blockT *)nullptr)
{
*p_ok = 0;
- return (partitionT *)NULL;
+ return (partitionT *)nullptr;
}
// copy working block to the newly allocated one
@@ -2503,7 +2503,7 @@ saturn_state::partitionT *saturn_state::cd_read_filtered_sector(INT32 fad, UINT8
{
int trktype;
- if ((cddevice != NULL) && (!buffull))
+ if ((cddevice != nullptr) && (!buffull))
{
// find out the track's type
trktype = cdrom_get_track_type(cdrom, cdrom_get_track(cdrom, fad-150));
@@ -2544,7 +2544,7 @@ saturn_state::partitionT *saturn_state::cd_read_filtered_sector(INT32 fad, UINT8
}
*p_ok = 0;
- return (partitionT *)NULL;
+ return (partitionT *)nullptr;
}
// loads in data set up by a CD-block PLAY command
@@ -2655,7 +2655,7 @@ void saturn_state::stvcd_set_tray_open( void )
hirqreg |= DCHG;
cd_stat = CD_STAT_OPEN;
- cdrom = (cdrom_file *)NULL;
+ cdrom = (cdrom_file *)nullptr;
tray_is_closed = 0;
popmessage("Tray Open");
@@ -2670,7 +2670,7 @@ void saturn_state::stvcd_set_tray_close( void )
hirqreg |= DCHG;
cdrom_image_device *cddevice = machine().device<cdrom_image_device>("cdrom");
- if (cddevice!=NULL)
+ if (cddevice!=nullptr)
{
// MESS case
cdrom = cddevice->get_cdrom_file();
diff --git a/src/devices/machine/tc009xlvc.cpp b/src/devices/machine/tc009xlvc.cpp
index 53275de8051..32c02a32db7 100644
--- a/src/devices/machine/tc009xlvc.cpp
+++ b/src/devices/machine/tc009xlvc.cpp
@@ -167,7 +167,7 @@ ADDRESS_MAP_END
tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0091LVC, "Taito TC0091LVC", tag, owner, clock, "tc0091lvc", __FILE__),
device_memory_interface(mconfig, *this),
- m_space_config("tc0091lvc", ENDIANNESS_LITTLE, 8,20, 0, NULL, *ADDRESS_MAP_NAME(tc0091lvc_map8)),
+ m_space_config("tc0091lvc", ENDIANNESS_LITTLE, 8,20, 0, nullptr, *ADDRESS_MAP_NAME(tc0091lvc_map8)),
m_gfxdecode(*this),
m_palette(*this)
{
@@ -292,7 +292,7 @@ void tc0091lvc_device::device_start()
bg1_tilemap->set_scrolldx(38, -21);
for (m_gfx_index = 0; m_gfx_index < MAX_GFX_ELEMENTS; m_gfx_index++)
- if (m_gfxdecode->gfx(m_gfx_index) == 0)
+ if (m_gfxdecode->gfx(m_gfx_index) == nullptr)
break;
//printf("m_gfx_index %d\n", m_gfx_index);
@@ -306,7 +306,7 @@ void tc0091lvc_device::device_reset()
const address_space_config *tc0091lvc_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
diff --git a/src/devices/machine/timekpr.cpp b/src/devices/machine/timekpr.cpp
index 940fa84f259..177cd5fef55 100644
--- a/src/devices/machine/timekpr.cpp
+++ b/src/devices/machine/timekpr.cpp
@@ -215,7 +215,7 @@ void timekeeper_device::device_start()
system_time systime;
/* validate some basic stuff */
- assert(this != NULL);
+ assert(this != nullptr);
machine().base_datetime(systime);
@@ -398,7 +398,7 @@ READ8_MEMBER( timekeeper_device::read )
void timekeeper_device::nvram_default()
{
- if( m_default_data != NULL )
+ if( m_default_data != nullptr )
{
memcpy( &m_data[0], m_default_data, m_size );
}
diff --git a/src/devices/machine/tmp68301.cpp b/src/devices/machine/tmp68301.cpp
index 955a10c463b..c2526699070 100644
--- a/src/devices/machine/tmp68301.cpp
+++ b/src/devices/machine/tmp68301.cpp
@@ -109,7 +109,7 @@ tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag,
m_scr(0),
m_pdir(0),
m_pdr(0),
- m_space_config("regs", ENDIANNESS_LITTLE, 16, 10, 0, NULL, *ADDRESS_MAP_NAME(tmp68301_regs))
+ m_space_config("regs", ENDIANNESS_LITTLE, 16, 10, 0, nullptr, *ADDRESS_MAP_NAME(tmp68301_regs))
{
memset(m_regs, 0, sizeof(m_regs));
memset(m_IE, 0, sizeof(m_IE));
@@ -161,7 +161,7 @@ void tmp68301_device::device_reset()
const address_space_config *tmp68301_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/machine/tms9902.cpp b/src/devices/machine/tms9902.cpp
index 557da504f96..40194b312fe 100644
--- a/src/devices/machine/tms9902.cpp
+++ b/src/devices/machine/tms9902.cpp
@@ -813,7 +813,7 @@ void tms9902_device::device_stop()
if (m_dectimer)
{
m_dectimer->reset();
- m_dectimer = NULL;
+ m_dectimer = nullptr;
}
}
diff --git a/src/devices/machine/upd1990a.cpp b/src/devices/machine/upd1990a.cpp
index f40bb30af48..59f85d9c4ca 100644
--- a/src/devices/machine/upd1990a.cpp
+++ b/src/devices/machine/upd1990a.cpp
@@ -86,8 +86,8 @@ void upd1990a_device::device_start()
// initialize
set_current_time(machine());
- for (int i = 0; i < 7; i++)
- m_shift_reg[i] = 0;
+ for (auto & elem : m_shift_reg)
+ elem = 0;
m_oe = 0;
m_cs = 0;
diff --git a/src/devices/machine/upd71071.cpp b/src/devices/machine/upd71071.cpp
index 59965256bc5..921c0bcc7a4 100644
--- a/src/devices/machine/upd71071.cpp
+++ b/src/devices/machine/upd71071.cpp
@@ -133,9 +133,9 @@ void upd71071_device::device_start()
m_out_dack_1_cb.resolve_safe();
m_out_dack_2_cb.resolve_safe();
m_out_dack_3_cb.resolve_safe();
- for (int x = 0; x < 4; x++)
+ for (auto & elem : m_timer)
{
- m_timer[x] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(upd71071_device::dma_transfer_timer),this));
+ elem = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(upd71071_device::dma_transfer_timer),this));
}
m_selected_channel = 0;
diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp
index e1ce769880e..54c1119d4e7 100644
--- a/src/devices/machine/upd765.cpp
+++ b/src/devices/machine/upd765.cpp
@@ -153,12 +153,12 @@ void upd765_family_device::device_start()
floppy_connector *con = subdevice<floppy_connector>(name);
if(con) {
flopi[i].dev = con->get_device();
- if (flopi[i].dev != NULL)
+ if (flopi[i].dev != nullptr)
flopi[i].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(upd765_family_device::index_callback), this));
} else
- flopi[i].dev = NULL;
+ flopi[i].dev = nullptr;
} else
- flopi[i].dev = NULL;
+ flopi[i].dev = nullptr;
flopi[i].main_state = IDLE;
flopi[i].sub_state = IDLE;
@@ -181,13 +181,13 @@ void upd765_family_device::device_start()
cur_live.tm = attotime::never;
cur_live.state = IDLE;
cur_live.next_state = -1;
- cur_live.fi = NULL;
+ cur_live.fi = nullptr;
if(ready_polled) {
poll_timer = timer_alloc(TIMER_DRIVE_READY_POLLING);
poll_timer->adjust(attotime::from_usec(100), 0, attotime::from_usec(1024));
} else
- poll_timer = NULL;
+ poll_timer = nullptr;
cur_irq = false;
locked = false;
@@ -219,12 +219,12 @@ void upd765_family_device::soft_reset()
result_pos = 0;
if(!locked)
fifocfg = FIF_DIS;
- cur_live.fi = 0;
+ cur_live.fi = nullptr;
drq = false;
cur_live.tm = attotime::never;
cur_live.state = IDLE;
cur_live.next_state = -1;
- cur_live.fi = NULL;
+ cur_live.fi = nullptr;
tc_done = false;
st1 = st2 = st3 = 0x00;
@@ -260,10 +260,10 @@ bool upd765_family_device::get_ready(int fid)
void upd765_family_device::set_floppy(floppy_image_device *flop)
{
- for(int fid=0; fid<4; fid++) {
- if(flopi[fid].dev)
- flopi[fid].dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb());
- flopi[fid].dev = flop;
+ for(auto & elem : flopi) {
+ if(elem.dev)
+ elem.dev->setup_index_pulse_cb(floppy_image_device::index_pulse_cb());
+ elem.dev = flop;
}
if(flop)
flop->setup_index_pulse_cb(floppy_image_device::index_pulse_cb(FUNC(upd765_family_device::index_callback), this));
@@ -626,7 +626,7 @@ void upd765_family_device::live_sync()
cur_live.pll.stop_writing(cur_live.fi->dev, cur_live.tm);
cur_live.tm = attotime::never;
cur_live.fi->live = false;
- cur_live.fi = 0;
+ cur_live.fi = nullptr;
}
}
cur_live.next_state = -1;
@@ -644,7 +644,7 @@ void upd765_family_device::live_abort()
if(cur_live.fi) {
cur_live.pll.stop_writing(cur_live.fi->dev, cur_live.tm);
cur_live.fi->live = false;
- cur_live.fi = 0;
+ cur_live.fi = nullptr;
}
cur_live.tm = attotime::never;
@@ -2246,8 +2246,8 @@ void upd765_family_device::run_drive_ready_polling()
void upd765_family_device::index_callback(floppy_image_device *floppy, int state)
{
- for(int fid=0; fid<4; fid++) {
- floppy_info &fi = flopi[fid];
+ for(auto & fi : flopi) {
+
if(fi.dev != floppy)
continue;
diff --git a/src/devices/machine/vrc4373.cpp b/src/devices/machine/vrc4373.cpp
index 7f53cd68d7b..c6797193c49 100644
--- a/src/devices/machine/vrc4373.cpp
+++ b/src/devices/machine/vrc4373.cpp
@@ -38,7 +38,7 @@ vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, d
const address_space_config *vrc4373_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 vrc4373_device::device_start()
diff --git a/src/devices/machine/vt82c496.cpp b/src/devices/machine/vt82c496.cpp
index f3e16232515..8f24e2338fd 100644
--- a/src/devices/machine/vt82c496.cpp
+++ b/src/devices/machine/vt82c496.cpp
@@ -24,7 +24,7 @@ void vt82c496_device::device_start()
{
/* get address space we are working on */
device_t *cpu = machine().device(m_cpu_tag);
- assert(cpu != NULL);
+ assert(cpu != nullptr);
m_space = &cpu->memory().space(AS_PROGRAM);
diff --git a/src/devices/machine/wd7600.cpp b/src/devices/machine/wd7600.cpp
index 26873553e14..63586c3d858 100644
--- a/src/devices/machine/wd7600.cpp
+++ b/src/devices/machine/wd7600.cpp
@@ -201,8 +201,8 @@ void wd7600_device::device_reset()
m_memory_ctrl = 0;
m_diagnostic = 0xe080;
- for(int x=0;x<4;x++)
- m_bank_start[x] = 0;
+ for(auto & elem : m_bank_start)
+ elem = 0;
// initialize dma controller clocks
m_dma1->set_unscaled_clock(clock());
diff --git a/src/devices/machine/wd_fdc.cpp b/src/devices/machine/wd_fdc.cpp
index 5d77209e0c7..32cda7b663c 100644
--- a/src/devices/machine/wd_fdc.cpp
+++ b/src/devices/machine/wd_fdc.cpp
@@ -98,7 +98,7 @@ void wd_fdc_t::device_start()
t_sector = timer_alloc(TM_SECTOR);
dden = disable_mfm;
enmf = false;
- floppy = 0;
+ floppy = nullptr;
status = 0x00;
save_item(NAME(status));
diff --git a/src/devices/machine/wozfdc.cpp b/src/devices/machine/wozfdc.cpp
index e79e0ca8486..6428aae26c6 100644
--- a/src/devices/machine/wozfdc.cpp
+++ b/src/devices/machine/wozfdc.cpp
@@ -88,7 +88,7 @@ void wozfdc_device::device_start()
void wozfdc_device::device_reset()
{
- floppy = NULL;
+ floppy = nullptr;
active = MODE_IDLE;
phases = 0x00;
mode_write = false;
@@ -109,7 +109,7 @@ void wozfdc_device::device_reset()
void wozfdc_device::a3_update_drive_sel()
{
- floppy_image_device *newflop = NULL;
+ floppy_image_device *newflop = nullptr;
if (!external_io_select)
{
@@ -154,7 +154,7 @@ void diskii_fdc::device_reset()
wozfdc_device::device_reset();
external_drive_select = false;
- if (floppy0 != NULL)
+ if (floppy0 != nullptr)
{
floppy = floppy0->get_device();
}
diff --git a/src/devices/machine/x2212.cpp b/src/devices/machine/x2212.cpp
index 01db1709c74..cb6fc2b57e9 100644
--- a/src/devices/machine/x2212.cpp
+++ b/src/devices/machine/x2212.cpp
@@ -107,7 +107,7 @@ void x2210_device::device_start()
const address_space_config *x2212_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_sram_space_config : (spacenum == 1) ? &m_e2prom_space_config : NULL;
+ return (spacenum == 0) ? &m_sram_space_config : (spacenum == 1) ? &m_e2prom_space_config : nullptr;
}
@@ -126,7 +126,7 @@ void x2212_device::nvram_default()
}
// populate from a memory region if present
- if (m_region != NULL)
+ if (m_region != nullptr)
{
if (m_region->bytes() != SIZE_DATA)
fatalerror("x2212 region '%s' wrong size (expected size = 0x100)\n", tag());
diff --git a/src/devices/machine/z80ctc.cpp b/src/devices/machine/z80ctc.cpp
index 7ea90146ca3..13c4844c9e3 100644
--- a/src/devices/machine/z80ctc.cpp
+++ b/src/devices/machine/z80ctc.cpp
@@ -183,9 +183,9 @@ int z80ctc_device::z80daisy_irq_state()
// loop over all channels
int state = 0;
- for (int ch = 0; ch < 4; ch++)
+ for (auto & channel : m_channel)
{
- ctc_channel &channel = m_channel[ch];
+
// if we're servicing a request, don't indicate more interrupts
if (channel.m_int_state & Z80_DAISY_IEO)
@@ -284,13 +284,13 @@ void z80ctc_device::interrupt_check()
//-------------------------------------------------
z80ctc_device::ctc_channel::ctc_channel()
- : m_device(NULL),
+ : m_device(nullptr),
m_index(0),
m_mode(0),
m_tconst(0),
m_down(0),
m_extclk(0),
- m_timer(NULL),
+ m_timer(nullptr),
m_int_state(0)
{
}
@@ -369,7 +369,7 @@ UINT8 z80ctc_device::ctc_channel::read()
VPRINTF_CHANNEL(("CTC clock %f\n",ATTOSECONDS_TO_HZ(period.attoseconds())));
- if (m_timer != NULL)
+ if (m_timer != nullptr)
return ((int)(m_timer->remaining().as_double() / period.as_double()) + 1) & 0xff;
else
return 0;
diff --git a/src/devices/machine/z80dart.cpp b/src/devices/machine/z80dart.cpp
index 6254d1d81f1..e976080881f 100644
--- a/src/devices/machine/z80dart.cpp
+++ b/src/devices/machine/z80dart.cpp
@@ -112,8 +112,8 @@ z80dart_device::z80dart_device(const machine_config &mconfig, device_type type,
m_out_txdrqb_cb(*this),
m_variant(variant)
{
- for (int i = 0; i < 8; i++)
- m_int_state[i] = 0;
+ for (auto & elem : m_int_state)
+ elem = 0;
}
z80dart_device::z80dart_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -142,8 +142,8 @@ z80dart_device::z80dart_device(const machine_config &mconfig, const char *tag, d
m_out_txdrqb_cb(*this),
m_variant(TYPE_DART)
{
- for (int i = 0; i < 8; i++)
- m_int_state[i] = 0;
+ for (auto & elem : m_int_state)
+ elem = 0;
}
z80sio0_device::z80sio0_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -338,9 +338,9 @@ void z80dart_device::check_interrupts()
void z80dart_device::reset_interrupts()
{
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_int_state)
{
- m_int_state[i] = 0;
+ elem = 0;
}
check_interrupts();
@@ -518,11 +518,11 @@ z80dart_channel::z80dart_channel(const machine_config &mconfig, const char *tag,
m_rts(0),
m_sync(0)
{
- for (int i = 0; i < 3; i++)
- m_rr[i] = 0;
+ for (auto & elem : m_rr)
+ elem = 0;
- for (int i = 0; i < 6; i++)
- m_wr[i] = 0;
+ for (auto & elem : m_wr)
+ elem = 0;
for (int i = 0; i < 3; i++)
{
diff --git a/src/devices/machine/z80pio.cpp b/src/devices/machine/z80pio.cpp
index e04727bf664..21541eb68ba 100644
--- a/src/devices/machine/z80pio.cpp
+++ b/src/devices/machine/z80pio.cpp
@@ -275,7 +275,7 @@ void z80pio_device::check_interrupts()
//-------------------------------------------------
z80pio_device::pio_port::pio_port() :
- m_device(NULL),
+ m_device(nullptr),
m_index(0),
m_mode(0),
m_next_control_word(0),
diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp
index 1abc94fec86..3c6a17f6fbb 100644
--- a/src/devices/machine/z80scc.cpp
+++ b/src/devices/machine/z80scc.cpp
@@ -154,8 +154,8 @@ z80scc_device::z80scc_device(const machine_config &mconfig, device_type type, co
m_out_txdrqb_cb(*this),
m_variant(variant),
m_wr0_ptrbits(0){
- for (int i = 0; i < 6; i++)
- m_int_state[i] = 0;
+ for (auto & elem : m_int_state)
+ elem = 0;
}
z80scc_device::z80scc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -184,8 +184,8 @@ z80scc_device::z80scc_device(const machine_config &mconfig, const char *tag, dev
m_out_txdrqb_cb(*this),
m_variant(TYPE_Z80SCC)
{
- for (int i = 0; i < 6; i++)
- m_int_state[i] = 0;
+ for (auto & elem : m_int_state)
+ elem = 0;
}
scc8030_device::scc8030_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -379,9 +379,9 @@ void z80scc_device::reset_interrupts()
{
LOG(("%s %s \n",FUNCNAME, tag()));
// reset internal interrupt sources
- for (int i = 0; i < 6; i++)
+ for (auto & elem : m_int_state)
{
- m_int_state[i] = 0;
+ elem = 0;
}
// check external interrupt sources
diff --git a/src/devices/machine/z80sio.cpp b/src/devices/machine/z80sio.cpp
index 00f65a8e6b4..64d9480dfbf 100644
--- a/src/devices/machine/z80sio.cpp
+++ b/src/devices/machine/z80sio.cpp
@@ -129,8 +129,8 @@ z80sio_device::z80sio_device(const machine_config &mconfig, device_type type, co
m_out_txdrqb_cb(*this),
m_variant(variant)
{
- for (int i = 0; i < 8; i++)
- m_int_state[i] = 0;
+ for (auto & elem : m_int_state)
+ elem = 0;
}
z80sio_device::z80sio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
@@ -159,8 +159,8 @@ z80sio_device::z80sio_device(const machine_config &mconfig, const char *tag, dev
m_out_txdrqb_cb(*this),
m_variant(TYPE_Z80SIO)
{
- for (int i = 0; i < 8; i++)
- m_int_state[i] = 0;
+ for (auto & elem : m_int_state)
+ elem = 0;
}
//-------------------------------------------------
@@ -317,9 +317,9 @@ void z80sio_device::reset_interrupts()
{
LOG(("%s %s \n",FUNCNAME, tag()));
// reset internal interrupt sources
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_int_state)
{
- m_int_state[i] = 0;
+ elem = 0;
}
check_interrupts();
diff --git a/src/devices/machine/z80sti.cpp b/src/devices/machine/z80sti.cpp
index a27295f6ff1..e8900abd021 100644
--- a/src/devices/machine/z80sti.cpp
+++ b/src/devices/machine/z80sti.cpp
@@ -103,9 +103,9 @@ z80sti_device::z80sti_device(const machine_config &mconfig, const char *tag, dev
m_isr(0),
m_imr(0)
{
- for (int i = 0; i < 16; i++)
+ for (auto & elem : m_int_state)
{
- m_int_state[i] = 0;
+ elem = 0;
}
}
diff --git a/src/devices/machine/z8536.cpp b/src/devices/machine/z8536.cpp
index fc5e770b15a..60d5e46f05f 100644
--- a/src/devices/machine/z8536.cpp
+++ b/src/devices/machine/z8536.cpp
@@ -905,9 +905,9 @@ void z8536_device::device_reset()
{
m_state = STATE_RESET;
- for (int i = 0; i < 48; i++)
+ for (auto & elem : m_register)
{
- m_register[i] = 0;
+ elem = 0;
}
m_register[MASTER_INTERRUPT_CONTROL] = MICR_RESET;
diff --git a/src/devices/sound/2151intf.cpp b/src/devices/sound/2151intf.cpp
index cd87829c803..e46eea7b4f6 100644
--- a/src/devices/sound/2151intf.cpp
+++ b/src/devices/sound/2151intf.cpp
@@ -24,8 +24,8 @@ const device_type YM2151 = &device_creator<ym2151_device>;
ym2151_device::ym2151_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, YM2151, "YM2151", tag, owner, clock, "ym2151", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
- m_chip(NULL),
+ m_stream(nullptr),
+ m_chip(nullptr),
m_lastreg(0),
m_irqhandler(*this),
m_portwritehandler(*this)
@@ -85,7 +85,7 @@ void ym2151_device::device_start()
m_stream = stream_alloc(0, 2, rate);
m_chip = ym2151_init(this, clock(), rate);
- assert_always(m_chip != NULL, "Error creating YM2151 chip");
+ assert_always(m_chip != nullptr, "Error creating YM2151 chip");
ym2151_set_irq_handler(m_chip, irq_frontend);
ym2151_set_port_write_handler(m_chip, port_write_frontend);
diff --git a/src/devices/sound/2203intf.cpp b/src/devices/sound/2203intf.cpp
index 279ae52cea4..8b1bada64ec 100644
--- a/src/devices/sound/2203intf.cpp
+++ b/src/devices/sound/2203intf.cpp
@@ -134,7 +134,7 @@ void ym2203_device::device_start()
/* Initialize FM emurator */
m_chip = ym2203_init(this,this,clock(),rate,timer_handler,IRQHandler,&psgintf);
- assert_always(m_chip != NULL, "Error creating YM2203 chip");
+ assert_always(m_chip != nullptr, "Error creating YM2203 chip");
}
//-------------------------------------------------
diff --git a/src/devices/sound/2413intf.cpp b/src/devices/sound/2413intf.cpp
index 3ecfd061241..2010264313d 100644
--- a/src/devices/sound/2413intf.cpp
+++ b/src/devices/sound/2413intf.cpp
@@ -41,7 +41,7 @@ void ym2413_device::device_start()
/* emulator create */
m_chip = ym2413_init(this, clock(), rate);
- assert_always(m_chip != NULL, "Error creating YM2413 chip");
+ assert_always(m_chip != nullptr, "Error creating YM2413 chip");
/* stream system initialize */
m_stream = machine().sound().stream_alloc(*this,0,2,rate);
diff --git a/src/devices/sound/2608intf.cpp b/src/devices/sound/2608intf.cpp
index 4a2c25597bb..ba6baba7bce 100644
--- a/src/devices/sound/2608intf.cpp
+++ b/src/devices/sound/2608intf.cpp
@@ -151,7 +151,7 @@ void ym2608_device::device_start()
m_chip = ym2608_init(this,this,clock(),rate,
pcmbufa,pcmsizea,
timer_handler,IRQHandler,&psgintf);
- assert_always(m_chip != NULL, "Error creating YM2608 chip");
+ assert_always(m_chip != nullptr, "Error creating YM2608 chip");
}
//-------------------------------------------------
diff --git a/src/devices/sound/2610intf.cpp b/src/devices/sound/2610intf.cpp
index 88f05e354cc..9111b03502c 100644
--- a/src/devices/sound/2610intf.cpp
+++ b/src/devices/sound/2610intf.cpp
@@ -161,7 +161,7 @@ void ym2610_device::device_start()
name.append(".deltat");
pcmbufb = (void *)(machine().root_device().memregion(name.c_str())->base());
pcmsizeb = machine().root_device().memregion(name.c_str())->bytes();
- if (pcmbufb == NULL || pcmsizeb == 0)
+ if (pcmbufb == nullptr || pcmsizeb == 0)
{
pcmbufb = pcmbufa;
pcmsizeb = pcmsizea;
@@ -171,7 +171,7 @@ void ym2610_device::device_start()
m_chip = ym2610_init(this,this,clock(),rate,
pcmbufa,pcmsizea,pcmbufb,pcmsizeb,
timer_handler,IRQHandler,&psgintf);
- assert_always(m_chip != NULL, "Error creating YM2610 chip");
+ assert_always(m_chip != nullptr, "Error creating YM2610 chip");
}
//-------------------------------------------------
diff --git a/src/devices/sound/2612intf.cpp b/src/devices/sound/2612intf.cpp
index b5464d4e824..c606f4eaece 100644
--- a/src/devices/sound/2612intf.cpp
+++ b/src/devices/sound/2612intf.cpp
@@ -114,7 +114,7 @@ void ym2612_device::device_start()
/**** initialize YM2612 ****/
m_chip = ym2612_init(this,this,clock(),rate,timer_handler,IRQHandler);
- assert_always(m_chip != NULL, "Error creating YM2612 chip");
+ assert_always(m_chip != nullptr, "Error creating YM2612 chip");
}
diff --git a/src/devices/sound/262intf.cpp b/src/devices/sound/262intf.cpp
index b15b6f4deda..d14497e672e 100644
--- a/src/devices/sound/262intf.cpp
+++ b/src/devices/sound/262intf.cpp
@@ -93,7 +93,7 @@ void ymf262_device::device_start()
/* stream system initialize */
m_chip = ymf262_init(this,clock(),rate);
- assert_always(m_chip != NULL, "Error creating YMF262 chip");
+ assert_always(m_chip != nullptr, "Error creating YMF262 chip");
m_stream = machine().sound().stream_alloc(*this,0,4,rate);
diff --git a/src/devices/sound/315-5641.cpp b/src/devices/sound/315-5641.cpp
index ec5477d778d..df5341c7382 100644
--- a/src/devices/sound/315-5641.cpp
+++ b/src/devices/sound/315-5641.cpp
@@ -24,7 +24,7 @@ void sega_315_5641_pcm_device::advance_state()
switch (m_state)
{
case STATE_DROP_DRQ:
- if (m_rombase == NULL)
+ if (m_rombase == nullptr)
{
// Slave Mode: get data from FIFO buffer
UINT8 fiforead = (m_fifo_read + 1) & 0x3F;
@@ -43,7 +43,7 @@ void sega_315_5641_pcm_device::advance_state()
WRITE8_MEMBER( sega_315_5641_pcm_device::port_w )
{
- if (m_rombase != NULL)
+ if (m_rombase != nullptr)
{
/* update the FIFO value */
m_fifo_in = data;
diff --git a/src/devices/sound/3526intf.cpp b/src/devices/sound/3526intf.cpp
index e66d745e31e..81ae14881f5 100644
--- a/src/devices/sound/3526intf.cpp
+++ b/src/devices/sound/3526intf.cpp
@@ -105,7 +105,7 @@ void ym3526_device::device_start()
/* stream system initialize */
m_chip = ym3526_init(this,clock(),rate);
- assert_always(m_chip != NULL, "Error creating YM3526 chip");
+ assert_always(m_chip != nullptr, "Error creating YM3526 chip");
m_stream = machine().sound().stream_alloc(*this,0,1,rate);
/* YM3526 setup */
@@ -157,8 +157,8 @@ const device_type YM3526 = &device_creator<ym3526_device>;
ym3526_device::ym3526_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, YM3526, "YM3526", tag, owner, clock, "ym3526", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
- m_chip(NULL),
+ m_stream(nullptr),
+ m_chip(nullptr),
m_irq_handler(*this)
{
}
diff --git a/src/devices/sound/3812intf.cpp b/src/devices/sound/3812intf.cpp
index edd752fa47d..192d5bba6c8 100644
--- a/src/devices/sound/3812intf.cpp
+++ b/src/devices/sound/3812intf.cpp
@@ -102,7 +102,7 @@ void ym3812_device::device_start()
/* stream system initialize */
m_chip = ym3812_init(this,clock(),rate);
- assert_always(m_chip != NULL, "Error creating YM3812 chip");
+ assert_always(m_chip != nullptr, "Error creating YM3812 chip");
m_stream = machine().sound().stream_alloc(*this,0,1,rate);
@@ -155,8 +155,8 @@ const device_type YM3812 = &device_creator<ym3812_device>;
ym3812_device::ym3812_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, YM3812, "YM3812", tag, owner, clock, "ym3812", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
- m_chip(NULL),
+ m_stream(nullptr),
+ m_chip(nullptr),
m_irq_handler(*this)
{
}
diff --git a/src/devices/sound/8950intf.cpp b/src/devices/sound/8950intf.cpp
index 6c6a7931142..4454b37f941 100644
--- a/src/devices/sound/8950intf.cpp
+++ b/src/devices/sound/8950intf.cpp
@@ -147,7 +147,7 @@ void y8950_device::device_start()
/* stream system initialize */
m_chip = y8950_init(this,clock(),rate);
- assert_always(m_chip != NULL, "Error creating Y8950 chip");
+ assert_always(m_chip != nullptr, "Error creating Y8950 chip");
/* ADPCM ROM data */
y8950_set_delta_t_memory(m_chip, region()->base(), region()->bytes());
@@ -206,8 +206,8 @@ const device_type Y8950 = &device_creator<y8950_device>;
y8950_device::y8950_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, Y8950, "Y8950", tag, owner, clock, "y8950", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
- m_chip(NULL),
+ m_stream(nullptr),
+ m_chip(nullptr),
m_irq_handler(*this),
m_keyboard_read_handler(*this),
m_keyboard_write_handler(*this),
diff --git a/src/devices/sound/aica.cpp b/src/devices/sound/aica.cpp
index e788b4fda34..851ba77f5a8 100644
--- a/src/devices/sound/aica.cpp
+++ b/src/devices/sound/aica.cpp
@@ -515,7 +515,7 @@ void aica_device::Init()
{
m_Slots[i].slot=i;
m_Slots[i].active=0;
- m_Slots[i].base=NULL;
+ m_Slots[i].base=nullptr;
m_Slots[i].EG.state=AICA_RELEASE;
m_Slots[i].lpend=1;
}
@@ -1476,12 +1476,12 @@ aica_device::aica_device(const machine_config &mconfig, const char *tag, device_
m_IRQL(0),
m_IRQR(0),
m_BUFPTR(0),
- m_AICARAM(NULL),
+ m_AICARAM(nullptr),
m_AICARAM_LENGTH(0),
m_RAM_MASK(0),
m_RAM_MASK16(0),
- m_buffertmpl(NULL),
- m_buffertmpr(NULL),
+ m_buffertmpl(nullptr),
+ m_buffertmpr(nullptr),
m_IrqTimA(0),
m_IrqTimBC(0),
m_IrqMidi(0),
@@ -1491,10 +1491,10 @@ aica_device::aica_device(const machine_config &mconfig, const char *tag, device_
m_MidiR(0),
m_mcieb(0),
m_mcipd(0),
- m_bufferl(NULL),
- m_bufferr(NULL),
+ m_bufferl(nullptr),
+ m_bufferr(nullptr),
m_length(0),
- m_RBUFDST(NULL)
+ m_RBUFDST(nullptr)
{
memset(&m_udata.data, 0, sizeof(m_udata.data));
diff --git a/src/devices/sound/amiga.cpp b/src/devices/sound/amiga.cpp
index 84b761e73bd..d11e115a59e 100644
--- a/src/devices/sound/amiga.cpp
+++ b/src/devices/sound/amiga.cpp
@@ -36,7 +36,7 @@ const device_type AMIGA = &device_creator<amiga_sound_device>;
amiga_sound_device::amiga_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, AMIGA, "Amiga Paula", tag, owner, clock, "amiga_paula", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
@@ -232,7 +232,7 @@ void amiga_sound_device::sound_stream_update(sound_stream &stream, stream_sample
// if we're in manual mode, signal an interrupt once we latch the low byte
if (!chan->dma_enabled && chan->manualmode && (chan->curlocation & 1))
{
- signal_irq(NULL, channum);
+ signal_irq(nullptr, channum);
chan->manualmode = false;
}
}
diff --git a/src/devices/sound/asc.cpp b/src/devices/sound/asc.cpp
index ad7559e0d3d..c2692af9912 100644
--- a/src/devices/sound/asc.cpp
+++ b/src/devices/sound/asc.cpp
@@ -76,7 +76,7 @@ void asc_device::device_start()
memset(m_regs, 0, sizeof(m_regs));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
save_item(NAME(m_fifo_a_rdptr));
save_item(NAME(m_fifo_b_rdptr));
diff --git a/src/devices/sound/astrocde.cpp b/src/devices/sound/astrocde.cpp
index 0870347c6ae..c26af3aca19 100644
--- a/src/devices/sound/astrocde.cpp
+++ b/src/devices/sound/astrocde.cpp
@@ -60,7 +60,7 @@ const device_type ASTROCADE = &device_creator<astrocade_device>;
astrocade_device::astrocade_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ASTROCADE, "Astrocade", tag, owner, clock, "astrocade", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_master_count(0),
m_vibrato_clock(0),
m_noise_clock(0),
diff --git a/src/devices/sound/awacs.cpp b/src/devices/sound/awacs.cpp
index b0c26e7dbff..4784616cdf6 100644
--- a/src/devices/sound/awacs.cpp
+++ b/src/devices/sound/awacs.cpp
@@ -41,7 +41,7 @@ void awacs_device::device_start()
memset(m_regs, 0, sizeof(m_regs));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
save_item(NAME(m_play_ptr));
save_item(NAME(m_buffer_size));
@@ -62,7 +62,7 @@ void awacs_device::device_reset()
m_play_ptr = 0;
m_buffer_size = 0;
m_playback_enable = false;
- m_dma_space = NULL;
+ m_dma_space = nullptr;
m_dma_offset_0 = m_dma_offset_1 = 0;
m_buffer_num = 0;
}
diff --git a/src/devices/sound/ay8910.cpp b/src/devices/sound/ay8910.cpp
index 384930014fe..ccef69d17d3 100644
--- a/src/devices/sound/ay8910.cpp
+++ b/src/devices/sound/ay8910.cpp
@@ -687,8 +687,8 @@ void ay8910_device::sound_stream_update(sound_stream &stream, stream_sample_t **
int chan;
buf[0] = outputs[0];
- buf[1] = NULL;
- buf[2] = NULL;
+ buf[1] = nullptr;
+ buf[2] = nullptr;
if (m_streams == AY8910_NUM_CHANNELS)
{
buf[1] = outputs[1];
@@ -699,7 +699,7 @@ void ay8910_device::sound_stream_update(sound_stream &stream, stream_sample_t **
if (!m_ready)
{
for (chan = 0; chan < AY8910_NUM_CHANNELS; chan++)
- if (buf[chan] != NULL)
+ if (buf[chan] != nullptr)
memset(buf[chan], 0, samples * sizeof(*buf[chan]));
}
@@ -1131,7 +1131,7 @@ ay8910_device::ay8910_device(const machine_config &mconfig, const char *tag, dev
m_streams(3),
m_ioports(2),
m_ready(0),
- m_channel(NULL),
+ m_channel(nullptr),
m_register_latch(0),
m_last_enable(0),
m_prescale_noise(0),
@@ -1173,7 +1173,7 @@ ay8910_device::ay8910_device(const machine_config &mconfig, device_type type, co
m_streams(streams),
m_ioports(ioports),
m_ready(0),
- m_channel(NULL),
+ m_channel(nullptr),
m_register_latch(0),
m_last_enable(0),
m_prescale_noise(0),
diff --git a/src/devices/sound/beep.cpp b/src/devices/sound/beep.cpp
index ce5558f3320..e5c9362dc9f 100644
--- a/src/devices/sound/beep.cpp
+++ b/src/devices/sound/beep.cpp
@@ -34,7 +34,7 @@ const device_type BEEP = &device_creator<beep_device>;
beep_device::beep_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, BEEP, "Beep", tag, owner, clock, "beep", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_enable(0),
m_frequency(0),
m_incr(0),
diff --git a/src/devices/sound/bsmt2000.cpp b/src/devices/sound/bsmt2000.cpp
index 0b1dea55354..2741f447fb5 100644
--- a/src/devices/sound/bsmt2000.cpp
+++ b/src/devices/sound/bsmt2000.cpp
@@ -80,11 +80,11 @@ bsmt2000_device::bsmt2000_device(const machine_config &mconfig, const char *tag,
: device_t(mconfig, BSMT2000, "BSMT2000", tag, owner, clock, "bsmt2000", __FILE__),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
- m_space_config("samples", ENDIANNESS_LITTLE, 8, 32, 0, NULL),
- m_ready_callback(NULL),
- m_stream(NULL),
- m_direct(NULL),
- m_cpu(NULL),
+ m_space_config("samples", ENDIANNESS_LITTLE, 8, 32, 0, nullptr),
+ m_ready_callback(nullptr),
+ m_stream(nullptr),
+ m_direct(nullptr),
+ m_cpu(nullptr),
m_register_select(0),
m_write_data(0),
m_rom_address(0),
@@ -177,7 +177,7 @@ void bsmt2000_device::device_reset()
const address_space_config *bsmt2000_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
@@ -282,7 +282,7 @@ READ16_MEMBER( bsmt2000_device::tms_data_r )
{
// also implicitly clear the write pending flag
m_write_pending = false;
- if (m_ready_callback != NULL)
+ if (m_ready_callback != nullptr)
(*m_ready_callback)(*this);
return m_write_data;
}
diff --git a/src/devices/sound/c140.cpp b/src/devices/sound/c140.cpp
index 6649f53616a..2156efd27fc 100644
--- a/src/devices/sound/c140.cpp
+++ b/src/devices/sound/c140.cpp
@@ -90,12 +90,12 @@ c140_device::c140_device(const machine_config &mconfig, const char *tag, device_
: device_t(mconfig, C140, "C140", tag, owner, clock, "c140", __FILE__),
device_sound_interface(mconfig, *this),
m_sample_rate(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_banking_type(0),
- m_mixer_buffer_left(NULL),
- m_mixer_buffer_right(NULL),
+ m_mixer_buffer_left(nullptr),
+ m_mixer_buffer_right(nullptr),
m_baserate(0),
- m_pRom(NULL)
+ m_pRom(nullptr)
{
memset(m_REG, 0, sizeof(UINT8)*0x200);
memset(m_pcmtbl, 0, sizeof(INT16)*8);
diff --git a/src/devices/sound/c352.cpp b/src/devices/sound/c352.cpp
index e0bc39918b8..2da83f0dd4d 100644
--- a/src/devices/sound/c352.cpp
+++ b/src/devices/sound/c352.cpp
@@ -49,7 +49,7 @@ c352_device::c352_device(const machine_config &mconfig, const char *tag, device_
: device_t(mconfig, C352, "C352", tag, owner, clock, "c352", __FILE__),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
- m_space_config("samples", ENDIANNESS_LITTLE, 8, 24, 0, NULL, *ADDRESS_MAP_NAME(c352))
+ m_space_config("samples", ENDIANNESS_LITTLE, 8, 24, 0, nullptr, *ADDRESS_MAP_NAME(c352))
{
}
@@ -71,7 +71,7 @@ void c352_device::static_set_divider(device_t &device, int setting)
const address_space_config *c352_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
// noise generator
diff --git a/src/devices/sound/cdda.cpp b/src/devices/sound/cdda.cpp
index 1b7c81c1172..5bd6746e9d7 100644
--- a/src/devices/sound/cdda.cpp
+++ b/src/devices/sound/cdda.cpp
@@ -40,7 +40,7 @@ void cdda_device::device_start()
m_audio_length = 0;
m_audio_samples = 0;
m_audio_bptr = 0;
- m_disc = NULL;
+ m_disc = nullptr;
save_item( NAME(m_audio_playing) );
save_item( NAME(m_audio_pause) );
diff --git a/src/devices/sound/cdp1863.cpp b/src/devices/sound/cdp1863.cpp
index 08a88f914ce..63515aa7c43 100644
--- a/src/devices/sound/cdp1863.cpp
+++ b/src/devices/sound/cdp1863.cpp
@@ -49,7 +49,7 @@ const device_type CDP1863 = &device_creator<cdp1863_device>;
cdp1863_device::cdp1863_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CDP1863, "CDP1863", tag, owner, clock, "cdp1863", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_clock1(clock),
m_clock2(0)
{
diff --git a/src/devices/sound/cdp1864.cpp b/src/devices/sound/cdp1864.cpp
index b4859cee4a3..9b1d1807d96 100644
--- a/src/devices/sound/cdp1864.cpp
+++ b/src/devices/sound/cdp1864.cpp
@@ -427,9 +427,9 @@ UINT32 cdp1864_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap
void cdp1864_device::initialize_palette()
{
- const int resistances_r[] = { m_chr_r };
- const int resistances_g[] = { m_chr_g };
- const int resistances_b[] = { m_chr_b };
+ const int resistances_r[] = { static_cast<int>(m_chr_r) };
+ const int resistances_g[] = { static_cast<int>(m_chr_g) };
+ const int resistances_b[] = { static_cast<int>(m_chr_b) };
double color_weights_r[1], color_weights_g[1], color_weights_b[1];
double color_weights_bkg_r[1], color_weights_bkg_g[1], color_weights_bkg_b[1];
diff --git a/src/devices/sound/cdp1869.cpp b/src/devices/sound/cdp1869.cpp
index 383d7eb5d88..5f70edc8cef 100644
--- a/src/devices/sound/cdp1869.cpp
+++ b/src/devices/sound/cdp1869.cpp
@@ -348,9 +348,9 @@ cdp1869_device::cdp1869_device(const machine_config &mconfig, const char *tag, d
m_read_pal_ntsc(*this),
m_write_prd(*this),
m_color_clock(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_palette(*this, "palette"),
- m_space_config("pageram", ENDIANNESS_LITTLE, 8, 11, 0, NULL, *ADDRESS_MAP_NAME(cdp1869))
+ m_space_config("pageram", ENDIANNESS_LITTLE, 8, 11, 0, nullptr, *ADDRESS_MAP_NAME(cdp1869))
{
}
@@ -467,7 +467,7 @@ void cdp1869_device::device_timer(emu_timer &timer, device_timer_id id, int para
const address_space_config *cdp1869_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
diff --git a/src/devices/sound/cem3394.cpp b/src/devices/sound/cem3394.cpp
index f5af2dd2b86..c64b2539482 100644
--- a/src/devices/sound/cem3394.cpp
+++ b/src/devices/sound/cem3394.cpp
@@ -118,7 +118,7 @@ const device_type CEM3394 = &device_creator<cem3394_device>;
cem3394_device::cem3394_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CEM3394, "CEM3394", tag, owner, clock, "cem3394", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_vco_zero_freq(0.0),
m_filter_zero_freq(0.0),
m_wave_select(0),
@@ -134,8 +134,8 @@ cem3394_device::cem3394_device(const machine_config &mconfig, const char *tag, d
m_pulse_width(0),
m_inv_sample_rate(0.0),
m_sample_rate(0),
- m_mixer_buffer(NULL),
- m_external_buffer(NULL)
+ m_mixer_buffer(nullptr),
+ m_external_buffer(nullptr)
{
memset(m_values, 0, 8*sizeof(double));
}
diff --git a/src/devices/sound/dac.cpp b/src/devices/sound/dac.cpp
index 8e4baffe3aa..d51b51c1410 100644
--- a/src/devices/sound/dac.cpp
+++ b/src/devices/sound/dac.cpp
@@ -27,7 +27,7 @@ const device_type DAC = &device_creator<dac_device>;
dac_device::dac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DAC, "DAC", tag, owner, clock, "dac", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_output(0)
{
}
diff --git a/src/devices/sound/digitalk.cpp b/src/devices/sound/digitalk.cpp
index 7f240879d53..262e930bddf 100644
--- a/src/devices/sound/digitalk.cpp
+++ b/src/devices/sound/digitalk.cpp
@@ -266,8 +266,8 @@ const device_type DIGITALKER = &device_creator<digitalker_device>;
digitalker_device::digitalker_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DIGITALKER, "Digitalker", tag, owner, clock, "digitalker", __FILE__),
device_sound_interface(mconfig, *this),
- m_rom(NULL),
- m_stream(NULL),
+ m_rom(nullptr),
+ m_stream(nullptr),
m_data(0),
m_cs(0),
m_cms(0),
diff --git a/src/devices/sound/disc_dev.inc b/src/devices/sound/disc_dev.inc
index 47026747cd1..7ebf374f65a 100644
--- a/src/devices/sound/disc_dev.inc
+++ b/src/devices/sound/disc_dev.inc
@@ -109,7 +109,7 @@ DISCRETE_STEP(dsd_555_astbl)
}
/* get the v_charge and update each step if it is a node */
- if (m_v_charge_node != NULL)
+ if (m_v_charge_node != nullptr)
{
v_charge = *m_v_charge_node;
if (info->options & DISC_555_ASTABLE_HAS_FAST_CHARGE_DIODE) v_charge -= 0.5;
@@ -296,7 +296,7 @@ DISCRETE_RESET(dsd_555_astbl)
/* setup v_charge or node */
m_v_charge_node = m_device->node_output_ptr(info->v_charge);
- if (m_v_charge_node == NULL)
+ if (m_v_charge_node == nullptr)
{
m_v_charge = (info->v_charge == DEFAULT_555_CHARGE) ? info->v_pos : info->v_charge;
diff --git a/src/devices/sound/disc_inp.inc b/src/devices/sound/disc_inp.inc
index b9eedb9fdff..1116d074546 100644
--- a/src/devices/sound/disc_inp.inc
+++ b/src/devices/sound/disc_inp.inc
@@ -65,7 +65,7 @@ DISCRETE_RESET(dss_adjustment)
double min, max;
m_port = m_device->machine().root_device().ioport(m_device->siblingtag((const char *)this->custom_data()).c_str());
- if (m_port == NULL)
+ if (m_port == nullptr)
fatalerror("DISCRETE_ADJUSTMENT - NODE_%d has invalid tag\n", this->index());
m_lastpval = 0x7fffffff;
@@ -264,7 +264,7 @@ DISCRETE_STEP(dss_input_stream)
DISCRETE_RESET(dss_input_stream)
{
- m_ptr = NULL;
+ m_ptr = nullptr;
m_data = 0;
}
@@ -304,10 +304,10 @@ DISCRETE_START(dss_input_stream)
m_stream_in_number = DSS_INPUT_STREAM__STREAM;
m_gain = DSS_INPUT_STREAM__GAIN;
m_offset = DSS_INPUT_STREAM__OFFSET;
- m_ptr = NULL;
+ m_ptr = nullptr;
m_is_buffered = is_buffered();
- m_buffer_stream = NULL;
+ m_buffer_stream = nullptr;
}
void DISCRETE_CLASS_NAME(dss_input_stream)::stream_start(void)
diff --git a/src/devices/sound/disc_mth.inc b/src/devices/sound/disc_mth.inc
index 45e04654445..2172e80edd6 100644
--- a/src/devices/sound/disc_mth.inc
+++ b/src/devices/sound/disc_mth.inc
@@ -332,7 +332,7 @@ DISCRETE_RESET(dst_diode_mix)
for (addr = 0; addr < m_size; addr++)
{
- if (info == NULL)
+ if (info == nullptr)
{
/* setup default junction voltage */
m_v_junction[addr] = 0.5;
@@ -1170,7 +1170,7 @@ DISCRETE_RESET(dst_mixer)
for (bit = 0; bit < 8; bit++)
{
m_r_node[bit] = m_device->node_output_ptr(info->r_node[bit]);
- if (m_r_node[bit] != NULL)
+ if (m_r_node[bit] != nullptr)
{
m_r_node_bit_flag |= 1 << bit;
}
diff --git a/src/devices/sound/disc_wav.inc b/src/devices/sound/disc_wav.inc
index 57a90ae5a5b..8d3b8d330a7 100644
--- a/src/devices/sound/disc_wav.inc
+++ b/src/devices/sound/disc_wav.inc
@@ -914,7 +914,7 @@ DISCRETE_RESET(dss_op_amp_osc)
for (loop = 0; loop < 8; loop ++)
{
m_r[loop] = m_device->node_output_ptr(*r_info_ptr);
- if (m_r[loop] == NULL)
+ if (m_r[loop] == nullptr)
m_r[loop] = r_info_ptr;
r_info_ptr++;
}
diff --git a/src/devices/sound/discrete.cpp b/src/devices/sound/discrete.cpp
index 3e8eaed0632..586e928966f 100644
--- a/src/devices/sound/discrete.cpp
+++ b/src/devices/sound/discrete.cpp
@@ -223,13 +223,13 @@ void *discrete_task::task_callback(void *param, int threadid)
if ((*task)->lock_threadid(threadid))
{
if (!(*task)->process())
- return NULL;
+ return nullptr;
(*task)->unlock();
}
}
} while (1);
- return NULL;
+ return nullptr;
}
bool discrete_task::process(void)
@@ -303,7 +303,7 @@ void discrete_task::check(discrete_task *dest_task)
{
input_buffer source;
int i, found = -1;
- output_buffer *pbuf = NULL;
+ output_buffer *pbuf = nullptr;
for (i = 0; i < m_buffers.count(); i++)
// if (m_buffers[i].node->block_node() == inputnode_num)
@@ -335,7 +335,7 @@ void discrete_task::check(discrete_task *dest_task)
//source.output_node = i;
source.linked_outbuf = pbuf;
source.buffer = 0.0; /* please compiler */
- source.ptr = NULL;
+ source.ptr = nullptr;
dest_task->source_list.add(source);
/* point the input to a buffered location */
@@ -355,14 +355,14 @@ void discrete_task::check(discrete_task *dest_task)
*************************************/
discrete_base_node::discrete_base_node() :
- m_device(NULL),
- m_block(NULL),
+ m_device(nullptr),
+ m_block(nullptr),
m_active_inputs(0),
- m_custom(NULL),
+ m_custom(nullptr),
m_input_is_node(0),
- m_step_intf(NULL),
- m_input_intf(NULL),
- m_output_intf(NULL)
+ m_step_intf(nullptr),
+ m_input_intf(nullptr),
+ m_output_intf(nullptr)
{
m_output[0] = 0.0;
}
@@ -400,7 +400,7 @@ void discrete_base_node::save_state(void)
discrete_base_node *discrete_device::discrete_find_node(int node)
{
- if (node < NODE_START || node > NODE_END) return NULL;
+ if (node < NODE_START || node > NODE_END) return nullptr;
return m_indexed_node[NODE_INDEX(node)];
}
@@ -454,12 +454,12 @@ const double *discrete_device::node_output_ptr(int onode)
const discrete_base_node *node;
node = discrete_find_node(onode);
- if (node != NULL)
+ if (node != nullptr)
{
return &(node->m_output[NODE_CHILD_NODE_NUM(onode)]);
}
else
- return NULL;
+ return nullptr;
}
/*************************************
@@ -679,7 +679,7 @@ void discrete_device::display_profiling(void)
void discrete_device::init_nodes(const sound_block_list_t &block_list)
{
- discrete_task *task = NULL;
+ discrete_task *task = nullptr;
/* list tail pointers */
int has_tasks = 0;
@@ -731,7 +731,7 @@ void discrete_device::init_nodes(const sound_block_list_t &block_list)
case DSO_TASK_START:
if (USE_DISCRETE_TASKS)
{
- if (task != NULL)
+ if (task != nullptr)
fatalerror("init_nodes() - Nested DISCRETE_START_TASK.\n");
task = auto_alloc_clear(machine(), discrete_task(*this));
task->task_group = block->initial[0];
@@ -745,7 +745,7 @@ void discrete_device::init_nodes(const sound_block_list_t &block_list)
case DSO_TASK_END:
if (USE_DISCRETE_TASKS)
{
- if (task == NULL)
+ if (task == nullptr)
fatalerror("init_nodes() - NO DISCRETE_START_TASK.\n");
}
break;
@@ -772,7 +772,7 @@ void discrete_device::init_nodes(const sound_block_list_t &block_list)
if (node->interface(step))
{
/* do we belong to a task? */
- if (task == NULL)
+ if (task == nullptr)
fatalerror("init_nodes() - found node outside of task: %s\n", node->module_name() );
else
task->step_list.add(step);
@@ -780,7 +780,7 @@ void discrete_device::init_nodes(const sound_block_list_t &block_list)
if (USE_DISCRETE_TASKS && block->type == DSO_TASK_END)
{
- task = NULL;
+ task = nullptr;
}
/* and register save state */
@@ -836,13 +836,13 @@ void discrete_device::static_set_intf(device_t &device, const discrete_block *in
discrete_device::discrete_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, type, name, tag, owner, clock, "discrete", __FILE__),
- m_intf(NULL),
+ m_intf(nullptr),
m_sample_rate(0),
m_sample_time(0),
m_neg_sample_time(0),
- m_indexed_node(NULL),
- m_disclogfile(NULL),
- m_queue(NULL),
+ m_indexed_node(nullptr),
+ m_disclogfile(nullptr),
+ m_queue(nullptr),
m_profiling(0),
m_total_samples(0),
m_total_stream_updates(0)
@@ -852,7 +852,7 @@ discrete_device::discrete_device(const machine_config &mconfig, device_type type
discrete_sound_device::discrete_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: discrete_device(mconfig, DISCRETE, "DISCRETE", tag, owner, clock),
device_sound_interface(mconfig, *this),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
@@ -959,7 +959,7 @@ void discrete_device::device_stop()
/* close the debug log */
if (m_disclogfile)
fclose(m_disclogfile);
- m_disclogfile = NULL;
+ m_disclogfile = nullptr;
}
}
@@ -980,7 +980,7 @@ void discrete_sound_device::device_start()
{
/* if we are an stream input node, track that */
discrete_dss_input_stream_node *input_stream = dynamic_cast<discrete_dss_input_stream_node *>(*node);
- if (input_stream != NULL)
+ if (input_stream != nullptr)
{
m_input_stream_list.add(input_stream);
}
diff --git a/src/devices/sound/discrete.h b/src/devices/sound/discrete.h
index 92eeb40810e..9a003e4488b 100644
--- a/src/devices/sound/discrete.h
+++ b/src/devices/sound/discrete.h
@@ -3801,7 +3801,7 @@ public:
if (m_count >= m_allocated)
{
m_allocated *= 2;
- _ElementType *newarr = global_alloc_array_clear(_ElementType, m_allocated);
+ auto newarr = global_alloc_array_clear(_ElementType, m_allocated);
for (int i=0; i < m_count; i++)
newarr[i] = m_arr[i];
global_free_array(m_arr);
@@ -4422,9 +4422,9 @@ public:
virtual int max_output(void) { return 1; };
- inline bool interface(discrete_step_interface *&intf) const { intf = m_step_intf; return (intf != NULL); }
- inline bool interface(discrete_input_interface *&intf) const { intf = m_input_intf; return (intf != NULL); }
- inline bool interface(discrete_sound_output_interface *&intf) const { intf = m_output_intf; return (intf != NULL); }
+ inline bool interface(discrete_step_interface *&intf) const { intf = m_step_intf; return (intf != nullptr); }
+ inline bool interface(discrete_input_interface *&intf) const { intf = m_input_intf; return (intf != nullptr); }
+ inline bool interface(discrete_sound_output_interface *&intf) const { intf = m_output_intf; return (intf != nullptr); }
/* get the input value from node #n */
inline double input(int n) { return *(m_input[n]); }
diff --git a/src/devices/sound/dmadac.cpp b/src/devices/sound/dmadac.cpp
index 622b566f1ee..91e6216ef69 100644
--- a/src/devices/sound/dmadac.cpp
+++ b/src/devices/sound/dmadac.cpp
@@ -201,7 +201,7 @@ const device_type DMADAC = &device_creator<dmadac_sound_device>;
dmadac_sound_device::dmadac_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DMADAC, "DMA-driven DAC", tag, owner, clock, "dmadac", __FILE__),
device_sound_interface(mconfig, *this),
- m_buffer(NULL),
+ m_buffer(nullptr),
m_bufin(0),
m_bufout(0),
m_volume(0),
diff --git a/src/devices/sound/es1373.cpp b/src/devices/sound/es1373.cpp
index a23210c6374..efe1abb405d 100644
--- a/src/devices/sound/es1373.cpp
+++ b/src/devices/sound/es1373.cpp
@@ -45,7 +45,7 @@ void es1373_device::device_stop()
if (LOG_ES_FILE && m_eslog)
{
fclose(m_eslog);
- m_eslog = NULL;
+ m_eslog = nullptr;
}
}
@@ -61,7 +61,7 @@ void es1373_device::device_start()
// create the stream
m_stream = machine().sound().stream_alloc(*this, 0, 2, 44100/2);
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(attotime::zero, 0, attotime::from_hz(44100/2/16));
}
@@ -73,7 +73,7 @@ void es1373_device::device_reset()
if (LOG_ES_FILE && m_eslog)
{
fclose(m_eslog);
- m_eslog = NULL;
+ m_eslog = nullptr;
}
if (LOG_ES_FILE && !m_eslog)
m_eslog = fopen("es.log", "w");
diff --git a/src/devices/sound/es5503.cpp b/src/devices/sound/es5503.cpp
index b1881412da2..8103ffbc456 100644
--- a/src/devices/sound/es5503.cpp
+++ b/src/devices/sound/es5503.cpp
@@ -61,7 +61,7 @@ es5503_device::es5503_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, ES5503, "Ensoniq ES5503", tag, owner, clock, "es5503", __FILE__),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
- m_space_config("es5503_samples", ENDIANNESS_LITTLE, 8, 17, 0, NULL, *ADDRESS_MAP_NAME(es5503)),
+ m_space_config("es5503_samples", ENDIANNESS_LITTLE, 8, 17, 0, nullptr, *ADDRESS_MAP_NAME(es5503)),
m_irq_func(*this),
m_adc_func(*this)
{
@@ -74,7 +74,7 @@ es5503_device::es5503_device(const machine_config &mconfig, const char *tag, dev
const address_space_config *es5503_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
//-------------------------------------------------
@@ -252,7 +252,7 @@ void es5503_device::device_start()
output_rate = (clock()/8)/34; // (input clock / 8) / # of oscs. enabled + 2
m_stream = machine().sound().stream_alloc(*this, 0, output_channels, output_rate);
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(attotime::from_hz(output_rate), 0, attotime::from_hz(output_rate));
}
@@ -260,18 +260,18 @@ void es5503_device::device_reset()
{
rege0 = 0xff;
- for (int osc = 0; osc < 32; osc++)
+ for (auto & elem : oscillators)
{
- oscillators[osc].freq = 0;
- oscillators[osc].wtsize = 0;
- oscillators[osc].control = 0;
- oscillators[osc].vol = 0;
- oscillators[osc].data = 0x80;
- oscillators[osc].wavetblpointer = 0;
- oscillators[osc].wavetblsize = 0;
- oscillators[osc].resolution = 0;
- oscillators[osc].accumulator = 0;
- oscillators[osc].irqpend = 0;
+ elem.freq = 0;
+ elem.wtsize = 0;
+ elem.control = 0;
+ elem.vol = 0;
+ elem.data = 0x80;
+ elem.wavetblpointer = 0;
+ elem.wavetblsize = 0;
+ elem.resolution = 0;
+ elem.accumulator = 0;
+ elem.irqpend = 0;
}
oscsenabled = 1;
diff --git a/src/devices/sound/es5506.cpp b/src/devices/sound/es5506.cpp
index d6e1865b8ae..6e47ed7977d 100644
--- a/src/devices/sound/es5506.cpp
+++ b/src/devices/sound/es5506.cpp
@@ -130,7 +130,7 @@ Ensoniq OTIS - ES5505 Ensoniq OTTO -
es550x_device::es550x_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_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_sample_rate(0),
m_write_latch(0),
m_read_latch(0),
@@ -142,24 +142,24 @@ es550x_device::es550x_device(const machine_config &mconfig, device_type type, co
m_wend(0),
m_lrend(0),
m_irqv(0),
- m_scratch(NULL),
- m_ulaw_lookup(NULL),
- m_volume_lookup(NULL),
+ m_scratch(nullptr),
+ m_ulaw_lookup(nullptr),
+ m_volume_lookup(nullptr),
#if MAKE_WAVS
m_wavraw(NULL),
#endif
- m_eslog(NULL),
- m_region0(NULL),
- m_region1(NULL),
- m_region2(NULL),
- m_region3(NULL),
+ m_eslog(nullptr),
+ m_region0(nullptr),
+ m_region1(nullptr),
+ m_region2(nullptr),
+ m_region3(nullptr),
m_channels(0),
m_irq_cb(*this),
m_read_port_cb(*this)
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_region_base)
{
- m_region_base[i] = NULL;
+ elem = nullptr;
}
}
@@ -195,10 +195,10 @@ void es5506_device::device_start()
m_stream = machine().sound().stream_alloc(*this, 0, 2 * channels, clock() / (16*32));
/* initialize the regions */
- m_region_base[0] = m_region0 ? (UINT16 *)machine().root_device().memregion(m_region0)->base() : NULL;
- m_region_base[1] = m_region1 ? (UINT16 *)machine().root_device().memregion(m_region1)->base() : NULL;
- m_region_base[2] = m_region2 ? (UINT16 *)machine().root_device().memregion(m_region2)->base() : NULL;
- m_region_base[3] = m_region3 ? (UINT16 *)machine().root_device().memregion(m_region3)->base() : NULL;
+ m_region_base[0] = m_region0 ? (UINT16 *)machine().root_device().memregion(m_region0)->base() : nullptr;
+ m_region_base[1] = m_region1 ? (UINT16 *)machine().root_device().memregion(m_region1)->base() : nullptr;
+ m_region_base[2] = m_region2 ? (UINT16 *)machine().root_device().memregion(m_region2)->base() : nullptr;
+ m_region_base[3] = m_region3 ? (UINT16 *)machine().root_device().memregion(m_region3)->base() : nullptr;
/* initialize the rest of the structure */
m_master_clock = clock();
@@ -292,7 +292,7 @@ void es550x_device::device_stop()
if (LOG_COMMANDS && m_eslog)
{
fclose(m_eslog);
- m_eslog = NULL;
+ m_eslog = nullptr;
}
#if MAKE_WAVS
@@ -337,8 +337,8 @@ void es5505_device::device_start()
m_stream = machine().sound().stream_alloc(*this, 0, 2 * channels, clock() / (16*32));
/* initialize the regions */
- m_region_base[0] = m_region0 ? (UINT16 *)machine().root_device().memregion(m_region0)->base() : NULL;
- m_region_base[1] = m_region1 ? (UINT16 *)machine().root_device().memregion(m_region1)->base() : NULL;
+ m_region_base[0] = m_region0 ? (UINT16 *)machine().root_device().memregion(m_region0)->base() : nullptr;
+ m_region_base[1] = m_region1 ? (UINT16 *)machine().root_device().memregion(m_region1)->base() : nullptr;
/* initialize the rest of the structure */
m_master_clock = clock();
diff --git a/src/devices/sound/es8712.cpp b/src/devices/sound/es8712.cpp
index f6087f83dc1..e7fee35bbe8 100644
--- a/src/devices/sound/es8712.cpp
+++ b/src/devices/sound/es8712.cpp
@@ -53,7 +53,7 @@ es8712_device::es8712_device(const machine_config &mconfig, const char *tag, dev
m_end(0),
m_repeat(0),
m_bank_offset(0),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
diff --git a/src/devices/sound/flt_rc.cpp b/src/devices/sound/flt_rc.cpp
index 5fc0a7df882..af73f401e59 100644
--- a/src/devices/sound/flt_rc.cpp
+++ b/src/devices/sound/flt_rc.cpp
@@ -19,7 +19,7 @@ const device_type FILTER_RC = &device_creator<filter_rc_device>;
filter_rc_device::filter_rc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, FILTER_RC, "RC Filter", tag, owner, clock, "filter_rc", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_k(0),
m_memory(0),
m_type(FLT_RC_LOWPASS),
diff --git a/src/devices/sound/flt_vol.cpp b/src/devices/sound/flt_vol.cpp
index 0012f3fc4db..c8aaffc9afe 100644
--- a/src/devices/sound/flt_vol.cpp
+++ b/src/devices/sound/flt_vol.cpp
@@ -14,7 +14,7 @@ const device_type FILTER_VOLUME = &device_creator<filter_volume_device>;
filter_volume_device::filter_volume_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, FILTER_VOLUME, "Volume Filter", tag, owner, clock, "filter_volume", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_gain(0)
{
}
diff --git a/src/devices/sound/fm.cpp b/src/devices/sound/fm.cpp
index 2e3e0f5d92b..4e21a4e5c7b 100644
--- a/src/devices/sound/fm.cpp
+++ b/src/devices/sound/fm.cpp
@@ -943,7 +943,7 @@ static void setup_connection( FM_OPN *OPN, FM_CH *CH, int ch )
/* +----C1----+ */
/* M1-+-MEM---M2-+-OUT */
/* +----C2----+ */
- *om1 = 0; /* special mark */
+ *om1 = nullptr; /* special mark */
*oc1 = carrier;
*om2 = carrier;
*memc= &OPN->m2;
@@ -2268,7 +2268,7 @@ void * ym2203_init(void *param, device_t *device, int clock, int rate,
if( !init_tables() )
{
auto_free( device->machine(), F2203 );
- return NULL;
+ return nullptr;
}
F2203->OPN.ST.param = param;
@@ -2558,7 +2558,7 @@ static void FM_ADPCMAWrite(YM2610 *F2610,int r,int v)
adpcm[c].adpcm_out = 0;
adpcm[c].flag = 1;
- if(F2610->pcmbuf==NULL)
+ if(F2610->pcmbuf==nullptr)
{ /* Check ROM Mapped */
F2610->device->logerror("YM2608-YM2610: ADPCM-A rom not mapped\n");
adpcm[c].flag = 0;
@@ -2946,7 +2946,7 @@ void * ym2608_init(void *param, device_t *device, int clock, int rate,
if( !init_tables() )
{
auto_free( device->machine(), F2608 );
- return NULL;
+ return nullptr;
}
F2608->OPN.ST.param = param;
@@ -3627,7 +3627,7 @@ void *ym2610_init(void *param, device_t *device, int clock, int rate,
if( !init_tables() )
{
auto_free( device->machine(), F2610 );
- return NULL;
+ return nullptr;
}
F2610->device = device;
@@ -3686,7 +3686,7 @@ void ym2610_reset_chip(void *chip)
F2610->pcm_size = dev->machine().root_device().memregion(name.c_str())->bytes();
name.append(".deltat");
F2610->deltaT.memory = (UINT8 *)dev->machine().root_device().memregion(name.c_str())->base();
- if(F2610->deltaT.memory == NULL)
+ if(F2610->deltaT.memory == nullptr)
{
F2610->deltaT.memory = (UINT8*)F2610->pcmbuf;
F2610->deltaT.memory_size = F2610->pcm_size;
diff --git a/src/devices/sound/fm2612.cpp b/src/devices/sound/fm2612.cpp
index fc74fa6e6ea..2154e393735 100644
--- a/src/devices/sound/fm2612.cpp
+++ b/src/devices/sound/fm2612.cpp
@@ -1087,7 +1087,7 @@ static void setup_connection(fm2612_FM_OPN *OPN, fm2612_FM_CH *CH, int ch)
/* +----C1----+ */
/* M1-+-MEM---M2-+-OUT */
/* +----C2----+ */
- *om1 = 0; /* special mark */
+ *om1 = nullptr; /* special mark */
*oc1 = carrier;
*om2 = carrier;
*memc= &OPN->m2;
diff --git a/src/devices/sound/fmopl.cpp b/src/devices/sound/fmopl.cpp
index e368e3a077d..22a4254c2c3 100644
--- a/src/devices/sound/fmopl.cpp
+++ b/src/devices/sound/fmopl.cpp
@@ -184,7 +184,7 @@ static FILE *sample[1];
#endif
#define LOG_CYM_FILE 0
-static FILE * cymfile = NULL;
+static FILE * cymfile = nullptr;
@@ -347,45 +347,45 @@ static const int slot_array[32]=
static const UINT32 ksl_tab[8*16]=
{
/* OCT 0 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
/* OCT 1 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.750/DV, 1.125/DV, 1.500/DV,
- 1.875/DV, 2.250/DV, 2.625/DV, 3.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.750/DV), static_cast<UINT32>(1.125/DV), static_cast<UINT32>(1.500/DV),
+ static_cast<UINT32>(1.875/DV), static_cast<UINT32>(2.250/DV), static_cast<UINT32>(2.625/DV), static_cast<UINT32>(3.000/DV),
/* OCT 2 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 1.125/DV, 1.875/DV, 2.625/DV,
- 3.000/DV, 3.750/DV, 4.125/DV, 4.500/DV,
- 4.875/DV, 5.250/DV, 5.625/DV, 6.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(1.125/DV), static_cast<UINT32>(1.875/DV), static_cast<UINT32>(2.625/DV),
+ static_cast<UINT32>(3.000/DV), static_cast<UINT32>(3.750/DV), static_cast<UINT32>(4.125/DV), static_cast<UINT32>(4.500/DV),
+ static_cast<UINT32>(4.875/DV), static_cast<UINT32>(5.250/DV), static_cast<UINT32>(5.625/DV), static_cast<UINT32>(6.000/DV),
/* OCT 3 */
- 0.000/DV, 0.000/DV, 0.000/DV, 1.875/DV,
- 3.000/DV, 4.125/DV, 4.875/DV, 5.625/DV,
- 6.000/DV, 6.750/DV, 7.125/DV, 7.500/DV,
- 7.875/DV, 8.250/DV, 8.625/DV, 9.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(1.875/DV),
+ static_cast<UINT32>(3.000/DV), static_cast<UINT32>(4.125/DV), static_cast<UINT32>(4.875/DV), static_cast<UINT32>(5.625/DV),
+ static_cast<UINT32>(6.000/DV), static_cast<UINT32>(6.750/DV), static_cast<UINT32>(7.125/DV), static_cast<UINT32>(7.500/DV),
+ static_cast<UINT32>(7.875/DV), static_cast<UINT32>(8.250/DV), static_cast<UINT32>(8.625/DV), static_cast<UINT32>(9.000/DV),
/* OCT 4 */
- 0.000/DV, 0.000/DV, 3.000/DV, 4.875/DV,
- 6.000/DV, 7.125/DV, 7.875/DV, 8.625/DV,
- 9.000/DV, 9.750/DV,10.125/DV,10.500/DV,
- 10.875/DV,11.250/DV,11.625/DV,12.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(3.000/DV), static_cast<UINT32>(4.875/DV),
+ static_cast<UINT32>(6.000/DV), static_cast<UINT32>(7.125/DV), static_cast<UINT32>(7.875/DV), static_cast<UINT32>(8.625/DV),
+ static_cast<UINT32>(9.000/DV), static_cast<UINT32>(9.750/DV), static_cast<UINT32>(10.125/DV),static_cast<UINT32>(10.500/DV),
+ static_cast<UINT32>(10.875/DV),static_cast<UINT32>(11.250/DV),static_cast<UINT32>(11.625/DV),static_cast<UINT32>(12.000/DV),
/* OCT 5 */
- 0.000/DV, 3.000/DV, 6.000/DV, 7.875/DV,
- 9.000/DV,10.125/DV,10.875/DV,11.625/DV,
- 12.000/DV,12.750/DV,13.125/DV,13.500/DV,
- 13.875/DV,14.250/DV,14.625/DV,15.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(3.000/DV), static_cast<UINT32>(6.000/DV), static_cast<UINT32>(7.875/DV),
+ static_cast<UINT32>(9.000/DV), static_cast<UINT32>(10.125/DV),static_cast<UINT32>(10.875/DV),static_cast<UINT32>(11.625/DV),
+ static_cast<UINT32>(12.000/DV),static_cast<UINT32>(12.750/DV),static_cast<UINT32>(13.125/DV),static_cast<UINT32>(13.500/DV),
+ static_cast<UINT32>(13.875/DV),static_cast<UINT32>(14.250/DV),static_cast<UINT32>(14.625/DV),static_cast<UINT32>(15.000/DV),
/* OCT 6 */
- 0.000/DV, 6.000/DV, 9.000/DV,10.875/DV,
- 12.000/DV,13.125/DV,13.875/DV,14.625/DV,
- 15.000/DV,15.750/DV,16.125/DV,16.500/DV,
- 16.875/DV,17.250/DV,17.625/DV,18.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(6.000/DV), static_cast<UINT32>(9.000/DV), static_cast<UINT32>(10.875/DV),
+ static_cast<UINT32>(12.000/DV),static_cast<UINT32>(13.125/DV),static_cast<UINT32>(13.875/DV),static_cast<UINT32>(14.625/DV),
+ static_cast<UINT32>(15.000/DV),static_cast<UINT32>(15.750/DV),static_cast<UINT32>(16.125/DV),static_cast<UINT32>(16.500/DV),
+ static_cast<UINT32>(16.875/DV),static_cast<UINT32>(17.250/DV),static_cast<UINT32>(17.625/DV),static_cast<UINT32>(18.000/DV),
/* OCT 7 */
- 0.000/DV, 9.000/DV,12.000/DV,13.875/DV,
- 15.000/DV,16.125/DV,16.875/DV,17.625/DV,
- 18.000/DV,18.750/DV,19.125/DV,19.500/DV,
- 19.875/DV,20.250/DV,20.625/DV,21.000/DV
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(9.000/DV), static_cast<UINT32>(12.000/DV),static_cast<UINT32>(13.875/DV),
+ static_cast<UINT32>(15.000/DV),static_cast<UINT32>(16.125/DV),static_cast<UINT32>(16.875/DV),static_cast<UINT32>(17.625/DV),
+ static_cast<UINT32>(18.000/DV),static_cast<UINT32>(18.750/DV),static_cast<UINT32>(19.125/DV),static_cast<UINT32>(19.500/DV),
+ static_cast<UINT32>(19.875/DV),static_cast<UINT32>(20.250/DV),static_cast<UINT32>(20.625/DV),static_cast<UINT32>(21.000/DV)
};
#undef DV
@@ -1765,7 +1765,7 @@ static void OPL_UnLockTable(void)
if (cymfile)
fclose (cymfile);
- cymfile = NULL;
+ cymfile = nullptr;
}
static void OPLResetChip(FM_OPL *OPL)
@@ -1971,7 +1971,7 @@ static FM_OPL *OPLCreate(device_t *device, UINT32 clock, UINT32 rate, int type)
FM_OPL *OPL;
int state_size;
- if (OPL_LockTable(device) == -1) return NULL;
+ if (OPL_LockTable(device) == -1) return nullptr;
/* calculate OPL state size */
state_size = sizeof(FM_OPL);
diff --git a/src/devices/sound/gaelco.cpp b/src/devices/sound/gaelco.cpp
index c11c39979ff..6fe6b0de784 100644
--- a/src/devices/sound/gaelco.cpp
+++ b/src/devices/sound/gaelco.cpp
@@ -59,18 +59,18 @@ const device_type GAELCO_GAE1 = &device_creator<gaelco_gae1_device>;
gaelco_gae1_device::gaelco_gae1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, GAELCO_GAE1, "Gaelco GAE1", tag, owner, clock, "gaelco_gae1", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
- m_snd_data(NULL),
- m_data_tag(NULL)
+ m_stream(nullptr),
+ m_snd_data(nullptr),
+ m_data_tag(nullptr)
{
}
gaelco_gae1_device::gaelco_gae1_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_sound_interface(mconfig, *this),
- m_stream(NULL),
- m_snd_data(NULL),
- m_data_tag(NULL)
+ m_stream(nullptr),
+ m_snd_data(nullptr),
+ m_data_tag(nullptr)
{
}
@@ -260,7 +260,7 @@ void gaelco_gae1_device::device_stop()
{
if (wavraw)
wav_close(wavraw);
- wavraw = NULL;
+ wavraw = nullptr;
}
diff --git a/src/devices/sound/hc55516.cpp b/src/devices/sound/hc55516.cpp
index 9d8a191bdba..5c291804a90 100644
--- a/src/devices/sound/hc55516.cpp
+++ b/src/devices/sound/hc55516.cpp
@@ -28,7 +28,7 @@ const device_type HC55516 = &device_creator<hc55516_device>;
hc55516_device::hc55516_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HC55516, "HC-55516", tag, owner, clock, "hc55516", __FILE__),
device_sound_interface(mconfig, *this),
- m_channel(NULL),
+ m_channel(nullptr),
m_active_clock_hi(0),
m_shiftreg_mask(0),
m_last_clock_state(0),
@@ -48,7 +48,7 @@ hc55516_device::hc55516_device(const machine_config &mconfig, const char *tag, d
hc55516_device::hc55516_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_sound_interface(mconfig, *this),
- m_channel(NULL),
+ m_channel(nullptr),
m_active_clock_hi(0),
m_shiftreg_mask(0),
m_last_clock_state(0),
diff --git a/src/devices/sound/i5000.cpp b/src/devices/sound/i5000.cpp
index 22d390cc89c..11dc147f0b0 100644
--- a/src/devices/sound/i5000.cpp
+++ b/src/devices/sound/i5000.cpp
@@ -35,9 +35,9 @@ void i5000snd_device::device_start()
// fill volume table
double div = 1.032;
double vol = 2047.0;
- for (int i = 0; i < 0x100; i++)
+ for (auto & elem : m_lut_volume)
{
- m_lut_volume[i] = vol + 0.5;
+ elem = vol + 0.5;
vol /= div;
}
m_lut_volume[0xff] = 0;
diff --git a/src/devices/sound/ics2115.cpp b/src/devices/sound/ics2115.cpp
index c76e043f8ac..9dabc41d334 100644
--- a/src/devices/sound/ics2115.cpp
+++ b/src/devices/sound/ics2115.cpp
@@ -108,29 +108,29 @@ void ics2115_device::device_reset()
m_vmode = 0;
m_irq_on = false;
memset(m_voice, 0, sizeof(m_voice));
- for(int i = 0; i < 2; ++i)
+ for(auto & elem : m_timer)
{
- m_timer[i].timer->adjust(attotime::never);
- m_timer[i].period = 0;
- m_timer[i].scale = 0;
- m_timer[i].preset = 0;
+ elem.timer->adjust(attotime::never);
+ elem.period = 0;
+ elem.scale = 0;
+ elem.preset = 0;
}
- for(int i = 0; i < 32; i++) {
- m_voice[i].osc_conf.value = 2;
- m_voice[i].osc.fc = 0;
- m_voice[i].osc.acc = 0;
- m_voice[i].osc.start = 0;
- m_voice[i].osc.end = 0;
- m_voice[i].osc.ctl = 0;
- m_voice[i].osc.saddr = 0;
- m_voice[i].vol.acc = 0;
- m_voice[i].vol.incr = 0;
- m_voice[i].vol.start = 0;
- m_voice[i].vol.end = 0;
- m_voice[i].vol.pan = 0x7F;
- m_voice[i].vol_ctrl.value = 1;
- m_voice[i].vol.mode = 0;
- m_voice[i].state.value = 0;
+ for(auto & elem : m_voice) {
+ elem.osc_conf.value = 2;
+ elem.osc.fc = 0;
+ elem.osc.acc = 0;
+ elem.osc.start = 0;
+ elem.osc.end = 0;
+ elem.osc.ctl = 0;
+ elem.osc.saddr = 0;
+ elem.vol.acc = 0;
+ elem.vol.incr = 0;
+ elem.vol.start = 0;
+ elem.vol.end = 0;
+ elem.vol.pan = 0x7F;
+ elem.vol_ctrl.value = 1;
+ elem.vol.mode = 0;
+ elem.state.value = 0;
}
}
diff --git a/src/devices/sound/iremga20.cpp b/src/devices/sound/iremga20.cpp
index 925814945fe..b913546337e 100644
--- a/src/devices/sound/iremga20.cpp
+++ b/src/devices/sound/iremga20.cpp
@@ -49,9 +49,9 @@ const device_type IREMGA20 = &device_creator<iremga20_device>;
iremga20_device::iremga20_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, IREMGA20, "Irem GA20", tag, owner, clock, "iremga20", __FILE__),
device_sound_interface(mconfig, *this),
- m_rom(NULL),
+ m_rom(nullptr),
m_rom_size(0),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
diff --git a/src/devices/sound/k005289.cpp b/src/devices/sound/k005289.cpp
index 746cf04413f..dc349b7e211 100644
--- a/src/devices/sound/k005289.cpp
+++ b/src/devices/sound/k005289.cpp
@@ -56,12 +56,12 @@ const device_type K005289 = &device_creator<k005289_device>;
k005289_device::k005289_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K005289, "K005289 SCC", tag, owner, clock, "k005289", __FILE__),
device_sound_interface(mconfig, *this),
- m_sound_prom(NULL),
- m_stream(NULL),
+ m_sound_prom(nullptr),
+ m_stream(nullptr),
m_rate(0),
- m_mixer_table(NULL),
- m_mixer_lookup(NULL),
- m_mixer_buffer(NULL)
+ m_mixer_table(nullptr),
+ m_mixer_lookup(nullptr),
+ m_mixer_buffer(nullptr)
{
}
diff --git a/src/devices/sound/k007232.cpp b/src/devices/sound/k007232.cpp
index 6f5286b951f..767cd904357 100644
--- a/src/devices/sound/k007232.cpp
+++ b/src/devices/sound/k007232.cpp
@@ -179,8 +179,8 @@ void k007232_device::device_start()
m_vol[1][0] = 0;
m_vol[1][1] = 255; /* channel B output to output B */
- for (int i = 0; i < 0x10; i++)
- m_wreg[i] = 0;
+ for (auto & elem : m_wreg)
+ elem = 0;
m_stream = machine().sound().stream_alloc(*this, 0 , 2, clock()/128);
diff --git a/src/devices/sound/k051649.cpp b/src/devices/sound/k051649.cpp
index d69b9f25445..05c8fffae3f 100644
--- a/src/devices/sound/k051649.cpp
+++ b/src/devices/sound/k051649.cpp
@@ -46,12 +46,12 @@ const device_type K051649 = &device_creator<k051649_device>;
k051649_device::k051649_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K051649, "K051649 SCC1", tag, owner, clock, "k051649", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_mclock(0),
m_rate(0),
- m_mixer_table(NULL),
- m_mixer_lookup(NULL),
- m_mixer_buffer(NULL),
+ m_mixer_table(nullptr),
+ m_mixer_lookup(nullptr),
+ m_mixer_buffer(nullptr),
m_test(0)
{
}
diff --git a/src/devices/sound/k053260.cpp b/src/devices/sound/k053260.cpp
index 8ec3937cffe..434d352635c 100644
--- a/src/devices/sound/k053260.cpp
+++ b/src/devices/sound/k053260.cpp
@@ -76,9 +76,9 @@ const device_type K053260 = &device_creator<k053260_device>;
k053260_device::k053260_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K053260, "K053260 KDSC", tag, owner, clock, "k053260", __FILE__),
device_sound_interface(mconfig, *this),
- m_rgnoverride(NULL),
- m_stream(NULL),
- m_rom(NULL),
+ m_rgnoverride(nullptr),
+ m_stream(nullptr),
+ m_rom(nullptr),
m_rom_size(0),
m_keyon(0),
m_mode(0)
@@ -115,8 +115,8 @@ void k053260_device::device_start()
void k053260_device::device_reset()
{
- for (int i = 0; i < 4; i++)
- m_voice[i].voice_reset();
+ for (auto & elem : m_voice)
+ elem.voice_reset();
}
@@ -208,9 +208,9 @@ WRITE8_MEMBER( k053260_device::write )
// 0x29 is a read register
case 0x2a: // loop and pcm/adpcm select
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_voice)
{
- m_voice[i].set_loop_kadpcm(data);
+ elem.set_loop_kadpcm(data);
data >>= 1;
}
break;
@@ -272,9 +272,9 @@ void k053260_device::sound_stream_update(sound_stream &stream, stream_sample_t *
{
stream_sample_t buffer[2] = {0, 0};
- for (int i = 0; i < 4; i++)
+ for (auto & voice : m_voice)
{
- KDSC_Voice &voice = m_voice[i];
+
if (voice.playing())
voice.play(buffer);
}
diff --git a/src/devices/sound/k054539.cpp b/src/devices/sound/k054539.cpp
index 90e7efbff1d..e619e53a0bd 100644
--- a/src/devices/sound/k054539.cpp
+++ b/src/devices/sound/k054539.cpp
@@ -22,7 +22,7 @@ k054539_device::k054539_device(const machine_config &mconfig, const char *tag, d
device_sound_interface(mconfig, *this), flags(0), ram(nullptr), reverb_pos(0), cur_ptr(0), cur_limit(0),
cur_zone(nullptr), rom(nullptr), rom_size(0), rom_mask(0), stream(nullptr), m_timer(nullptr), m_timer_state(0),
m_timer_handler(*this),
- m_rgnoverride(NULL)
+ m_rgnoverride(nullptr)
{
}
@@ -100,8 +100,8 @@ void k054539_device::sound_stream_update(sound_stream &stream, stream_sample_t *
#define VOL_CAP 1.80
static const INT16 dpcm[16] = {
- 0<<8, 1<<8, 4<<8, 9<<8, 16<<8, 25<<8, 36<<8, 49<<8,
- -64<<8, -49<<8, -36<<8, -25<<8, -16<<8, -9<<8, -4<<8, -1<<8
+ 0 * 0x100, 1 * 0x100, 4 * 0x100, 9 * 0x100, 16 * 0x100, 25 * 0x100, 36 * 0x100, 49 * 0x100,
+ -64 * 0x100, -49 * 0x100, -36 * 0x100, -25 * 0x100, -16 * 0x100, -9 * 0x100, -4 * 0x100, -1 * 0x100
};
@@ -311,7 +311,7 @@ void k054539_device::init_chip()
cur_ptr = 0;
memset(ram, 0, 0x4000);
- memory_region *reg = (m_rgnoverride != NULL) ? owner()->memregion(m_rgnoverride) : region();
+ memory_region *reg = (m_rgnoverride != nullptr) ? owner()->memregion(m_rgnoverride) : region();
rom = reg->base();
rom_size = reg->bytes();
rom_mask = 0xffffffffU;
@@ -499,8 +499,8 @@ void k054539_device::device_start()
m_timer_handler.resolve_safe();
m_apan_cb.bind_relative_to(*owner());
- for (int i = 0; i < 8; i++)
- gain[i] = 1.0;
+ for (auto & elem : gain)
+ elem = 1.0;
flags = RESET_FLAGS;
diff --git a/src/devices/sound/l7a1045_l6028_dsp_a.cpp b/src/devices/sound/l7a1045_l6028_dsp_a.cpp
index baf277b55e2..ca30c79e5fc 100644
--- a/src/devices/sound/l7a1045_l6028_dsp_a.cpp
+++ b/src/devices/sound/l7a1045_l6028_dsp_a.cpp
@@ -103,9 +103,9 @@ const device_type L7A1045 = &device_creator<l7a1045_sound_device>;
l7a1045_sound_device::l7a1045_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, L7A1045, "L7A1045 L6028 DSP-A", tag, owner, clock, "l7a1045_custom", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_key(0),
- m_rom(NULL),
+ m_rom(nullptr),
m_rom_size(0)
{
}
diff --git a/src/devices/sound/mos6560.cpp b/src/devices/sound/mos6560.cpp
index eb4ee0a5c30..61ca40f5829 100644
--- a/src/devices/sound/mos6560.cpp
+++ b/src/devices/sound/mos6560.cpp
@@ -670,7 +670,7 @@ void mos6560_device::sound_start()
}
else
{
- m_tone = NULL;
+ m_tone = nullptr;
}
}
@@ -694,8 +694,8 @@ mos6560_device::mos6560_device(const machine_config &mconfig, device_type type,
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_variant(variant),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(mos6560_videoram_map)),
- m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, NULL, *ADDRESS_MAP_NAME(mos6560_colorram_map)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, nullptr, *ADDRESS_MAP_NAME(mos6560_videoram_map)),
+ m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, nullptr, *ADDRESS_MAP_NAME(mos6560_colorram_map)),
m_read_potx(*this),
m_read_poty(*this)
{
@@ -707,8 +707,8 @@ mos6560_device::mos6560_device(const machine_config &mconfig, const char *tag, d
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_variant(TYPE_6560),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(mos6560_videoram_map)),
- m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, NULL, *ADDRESS_MAP_NAME(mos6560_colorram_map)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, nullptr, *ADDRESS_MAP_NAME(mos6560_videoram_map)),
+ m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, nullptr, *ADDRESS_MAP_NAME(mos6560_colorram_map)),
m_read_potx(*this),
m_read_poty(*this)
{
@@ -732,7 +732,7 @@ const address_space_config *mos6560_device::memory_space_config(address_spacenum
{
case AS_0: return &m_videoram_space_config;
case AS_1: return &m_colorram_space_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/devices/sound/mos6581.cpp b/src/devices/sound/mos6581.cpp
index 73115c79f83..89ed5e375c8 100644
--- a/src/devices/sound/mos6581.cpp
+++ b/src/devices/sound/mos6581.cpp
@@ -42,7 +42,7 @@ mos6581_device::mos6581_device(const machine_config &mconfig, device_type type,
device_sound_interface(mconfig, *this),
m_read_potx(*this),
m_read_poty(*this),
- m_stream(NULL),
+ m_stream(nullptr),
m_variant(variant)
{
m_token = global_alloc_clear(SID6581_t);
@@ -53,7 +53,7 @@ mos6581_device::mos6581_device(const machine_config &mconfig, const char *tag, d
device_sound_interface(mconfig, *this),
m_read_potx(*this),
m_read_poty(*this),
- m_stream(NULL),
+ m_stream(nullptr),
m_variant(TYPE_6581)
{
m_token = global_alloc_clear(SID6581_t);
diff --git a/src/devices/sound/mos7360.cpp b/src/devices/sound/mos7360.cpp
index fe8631cfee2..1be8535b417 100644
--- a/src/devices/sound/mos7360.cpp
+++ b/src/devices/sound/mos7360.cpp
@@ -177,7 +177,7 @@ const address_space_config *mos7360_device::memory_space_config(address_spacenum
switch (spacenum)
{
case AS_0: return &m_videoram_space_config;
- default: return NULL;
+ default: return nullptr;
}
}
@@ -258,10 +258,10 @@ mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, d
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(mos7360_videoram_map)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(mos7360_videoram_map)),
m_write_irq(*this),
m_read_k(*this),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
@@ -274,7 +274,7 @@ void mos7360_device::device_start()
{
// get the CPU device
m_cpu = machine().device<cpu_device>(m_cpu_tag);
- assert(m_cpu != NULL);
+ assert(m_cpu != nullptr);
// resolve callbacks
m_write_irq.resolve_safe();
diff --git a/src/devices/sound/multipcm.cpp b/src/devices/sound/multipcm.cpp
index 3d89611cfe5..0ce61d419f7 100644
--- a/src/devices/sound/multipcm.cpp
+++ b/src/devices/sound/multipcm.cpp
@@ -457,25 +457,25 @@ multipcm_device::multipcm_device(const machine_config &mconfig, const char *tag,
: device_t(mconfig, MULTIPCM, "Sega/Yamaha 315-5560", tag, owner, clock, "multipcm", __FILE__),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
- m_space_config("mpcm_samples", ENDIANNESS_LITTLE, 8, 24, 0, NULL),
- m_stream(NULL),
- m_samples(NULL),
- m_slots(NULL),
+ m_space_config("mpcm_samples", ENDIANNESS_LITTLE, 8, 24, 0, nullptr),
+ m_stream(nullptr),
+ m_samples(nullptr),
+ m_slots(nullptr),
m_cur_slot(0),
m_address(0),
m_bank_right(0),
m_bank_left(0),
m_rate(0),
- m_attack_step(NULL),
- m_decay_release_step(NULL),
- m_freq_step_table(NULL),
- m_direct(NULL),
- m_left_pan_table(NULL),
- m_right_pan_table(NULL),
- m_linear_to_exp_volume(NULL),
- m_total_level_steps(NULL),
- m_pitch_scale_tables(NULL),
- m_amplitude_scale_tables(NULL)
+ m_attack_step(nullptr),
+ m_decay_release_step(nullptr),
+ m_freq_step_table(nullptr),
+ m_direct(nullptr),
+ m_left_pan_table(nullptr),
+ m_right_pan_table(nullptr),
+ m_linear_to_exp_volume(nullptr),
+ m_total_level_steps(nullptr),
+ m_pitch_scale_tables(nullptr),
+ m_amplitude_scale_tables(nullptr)
{
m_address_map[0] = *ADDRESS_MAP_NAME(multipcm);
}
@@ -487,7 +487,7 @@ multipcm_device::multipcm_device(const machine_config &mconfig, const char *tag,
const address_space_config *multipcm_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
//-------------------------------------------------
diff --git a/src/devices/sound/n63701x.cpp b/src/devices/sound/n63701x.cpp
index a1308c36713..d544eb6e4ee 100644
--- a/src/devices/sound/n63701x.cpp
+++ b/src/devices/sound/n63701x.cpp
@@ -35,7 +35,7 @@ namco_63701x_device::namco_63701x_device(const machine_config &mconfig, const ch
: device_t(mconfig, NAMCO_63701X, "Namco 63701X", tag, owner, clock, "namco_63701x", __FILE__),
device_sound_interface(mconfig, *this),
m_rom(*this, DEVICE_SELF),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
diff --git a/src/devices/sound/namco.cpp b/src/devices/sound/namco.cpp
index ea59b5c6393..070ae056597 100644
--- a/src/devices/sound/namco.cpp
+++ b/src/devices/sound/namco.cpp
@@ -38,12 +38,12 @@ const device_type NAMCO_CUS30 = &device_creator<namco_cus30_device>;
namco_audio_device::namco_audio_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, __FILE__),
device_sound_interface(mconfig, *this),
- m_last_channel(NULL),
- m_soundregs(NULL),
- m_wavedata(NULL),
+ m_last_channel(nullptr),
+ m_soundregs(nullptr),
+ m_wavedata(nullptr),
m_wave_size(0),
m_sound_enable(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_namco_clock(0),
m_sample_rate(0),
m_f_fracbits(0),
@@ -109,7 +109,7 @@ void namco_audio_device::device_start()
/* register with the save state system */
save_pointer(NAME(m_soundregs), 0x400);
- if (region() == NULL)
+ if (region() == nullptr)
save_pointer(NAME(m_wavedata), 0x400);
save_item(NAME(m_voices));
@@ -182,10 +182,10 @@ void namco_audio_device::build_decoded_waveform(UINT8 *rgnbase)
int offset;
int v;
- m_wavedata = (rgnbase != NULL) ? rgnbase : auto_alloc_array_clear(machine(), UINT8, 0x400);
+ m_wavedata = (rgnbase != nullptr) ? rgnbase : auto_alloc_array_clear(machine(), UINT8, 0x400);
/* 20pacgal has waves in RAM but old sound system */
- if (rgnbase == NULL && m_voices != 3)
+ if (rgnbase == nullptr && m_voices != 3)
{
m_wave_size = 1;
size = 32 * 16; /* 32 samples, 16 waveforms */
diff --git a/src/devices/sound/nes_apu.cpp b/src/devices/sound/nes_apu.cpp
index 841e846136a..0c42deb0fca 100644
--- a/src/devices/sound/nes_apu.cpp
+++ b/src/devices/sound/nes_apu.cpp
@@ -110,27 +110,27 @@ nesapu_device::nesapu_device(const machine_config &mconfig, const char *tag, dev
m_samps_per_sync(0),
m_buffer_size(0),
m_real_rate(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_cpu_tag("")
{
- for (int i = 0; i < NOISE_LONG; i++)
+ for (auto & elem : m_noise_lut)
{
- m_noise_lut[i] = 0;
+ elem = 0;
}
- for (int i = 0; i < 0X20; i++)
+ for (auto & elem : m_vbl_times)
{
- m_vbl_times[i] = 0;
+ elem = 0;
}
- for (int i = 0; i < SYNCS_MAX1; i++)
+ for (auto & elem : m_sync_times1)
{
- m_sync_times1[i] = 0;
+ elem = 0;
}
- for (int i = 0; i < SYNCS_MAX2; i++)
+ for (auto & elem : m_sync_times2)
{
- m_sync_times2[i] = 0;
+ elem = 0;
}
}
diff --git a/src/devices/sound/nes_defs.h b/src/devices/sound/nes_defs.h
index 0215a6a1208..b225b1e60a6 100644
--- a/src/devices/sound/nes_defs.h
+++ b/src/devices/sound/nes_defs.h
@@ -96,9 +96,9 @@ struct square_t
{
square_t()
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : regs)
{
- regs[i] = 0;
+ elem = 0;
}
vbl_length =0;
freq = 0;
@@ -128,9 +128,9 @@ struct triangle_t
{
triangle_t()
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : regs)
{
- regs[i] = 0;
+ elem = 0;
}
linear_length =0;
vbl_length =0;
@@ -158,9 +158,9 @@ struct noise_t
{
noise_t()
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : regs)
{
- regs[i] = 0;
+ elem = 0;
}
cur_pos =0;
vbl_length =0;
@@ -186,9 +186,9 @@ struct dpcm_t
{
dpcm_t()
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : regs)
{
- regs[i] = 0;
+ elem = 0;
}
address = 0;
length = 0;
@@ -198,7 +198,7 @@ struct dpcm_t
cur_byte = 0;
enabled = false;
irq_occurred = false;
- memory = NULL;
+ memory = nullptr;
vol = 0;
}
@@ -221,7 +221,7 @@ struct apu_t
apu_t()
{
memset(regs, 0, sizeof(regs));
- buffer = NULL;
+ buffer = nullptr;
buf_pos = 0;
step_mode = 0;
}
diff --git a/src/devices/sound/nile.cpp b/src/devices/sound/nile.cpp
index a0fd9d8b5a5..3a21b1c6415 100644
--- a/src/devices/sound/nile.cpp
+++ b/src/devices/sound/nile.cpp
@@ -55,8 +55,8 @@ const device_type NILE = &device_creator<nile_device>;
nile_device::nile_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, NILE, "NiLe", tag, owner, clock, "nile", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
- m_sound_ram(NULL),
+ m_stream(nullptr),
+ m_sound_ram(nullptr),
m_ctrl(0)
{
}
diff --git a/src/devices/sound/okim6258.cpp b/src/devices/sound/okim6258.cpp
index d26810e33d5..e317696efa6 100644
--- a/src/devices/sound/okim6258.cpp
+++ b/src/devices/sound/okim6258.cpp
@@ -55,7 +55,7 @@ okim6258_device::okim6258_device(const machine_config &mconfig, const char *tag,
m_adpcm_type(0),
m_data_in(0),
m_nibble_shift(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_output_bits(0),
m_signal(0),
m_step(0)
diff --git a/src/devices/sound/okim6295.cpp b/src/devices/sound/okim6295.cpp
index fc9f35e3a58..7e97d04e916 100644
--- a/src/devices/sound/okim6295.cpp
+++ b/src/devices/sound/okim6295.cpp
@@ -90,13 +90,13 @@ okim6295_device::okim6295_device(const machine_config &mconfig, const char *tag,
: device_t(mconfig, OKIM6295, "OKI6295", tag, owner, clock, "okim6295", __FILE__),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
- m_space_config("samples", ENDIANNESS_LITTLE, 8, 18, 0, NULL, *ADDRESS_MAP_NAME(okim6295)),
+ m_space_config("samples", ENDIANNESS_LITTLE, 8, 18, 0, nullptr, *ADDRESS_MAP_NAME(okim6295)),
m_command(-1),
m_bank_installed(false),
m_bank_offs(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_pin7_state(0),
- m_direct(NULL)
+ m_direct(nullptr)
{
}
@@ -150,8 +150,8 @@ void okim6295_device::device_start()
void okim6295_device::device_reset()
{
m_stream->update();
- for (int voicenum = 0; voicenum < OKIM6295_VOICES; voicenum++)
- m_voice[voicenum].m_playing = false;
+ for (auto & elem : m_voice)
+ elem.m_playing = false;
}
@@ -185,7 +185,7 @@ void okim6295_device::device_clock_changed()
const address_space_config *okim6295_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
@@ -200,8 +200,8 @@ void okim6295_device::sound_stream_update(sound_stream &stream, stream_sample_t
memset(outputs[0], 0, samples * sizeof(*outputs[0]));
// iterate over voices and accumulate sample data
- for (int voicenum = 0; voicenum < OKIM6295_VOICES; voicenum++)
- m_voice[voicenum].generate_adpcm(*m_direct, outputs[0], samples);
+ for (auto & elem : m_voice)
+ elem.generate_adpcm(*m_direct, outputs[0], samples);
}
diff --git a/src/devices/sound/okim6376.cpp b/src/devices/sound/okim6376.cpp
index 2db0a475b04..e4a74eefdb5 100644
--- a/src/devices/sound/okim6376.cpp
+++ b/src/devices/sound/okim6376.cpp
@@ -119,7 +119,7 @@ okim6376_device::okim6376_device(const machine_config &mconfig, const char *tag,
//m_command[OKIM6376_VOICES],
m_latch(0),
//m_stage[OKIM6376_VOICES],
- m_stream(NULL),
+ m_stream(nullptr),
m_master_clock(0),
m_divisor(0),
m_channel(0),
diff --git a/src/devices/sound/okim9810.cpp b/src/devices/sound/okim9810.cpp
index e134e646ddb..cd89d77a3e0 100644
--- a/src/devices/sound/okim9810.cpp
+++ b/src/devices/sound/okim9810.cpp
@@ -81,8 +81,8 @@ okim9810_device::okim9810_device(const machine_config &mconfig, const char *tag,
: device_t(mconfig, OKIM9810, "OKI9810", tag, owner, clock, "okim9810", __FILE__),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
- m_space_config("samples", ENDIANNESS_BIG, 8, 24, 0, NULL, *ADDRESS_MAP_NAME(okim9810)),
- m_stream(NULL),
+ m_space_config("samples", ENDIANNESS_BIG, 8, 24, 0, nullptr, *ADDRESS_MAP_NAME(okim9810)),
+ m_stream(nullptr),
m_TMP_register(0x00),
m_global_volume(0x00),
m_filter_type(OKIM9810_SECONDARY_FILTER),
@@ -144,8 +144,8 @@ void okim9810_device::device_start()
void okim9810_device::device_reset()
{
m_stream->update();
- for (int voicenum = 0; voicenum < OKIM9810_VOICES; voicenum++)
- m_voice[voicenum].m_playing = false;
+ for (auto & elem : m_voice)
+ elem.m_playing = false;
}
@@ -175,7 +175,7 @@ void okim9810_device::device_clock_changed()
const address_space_config *okim9810_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
@@ -191,8 +191,8 @@ void okim9810_device::sound_stream_update(sound_stream &stream, stream_sample_t
memset(outputs[1], 0, samples * sizeof(*outputs[1]));
// iterate over voices and accumulate sample data
- for (int voicenum = 0; voicenum < OKIM9810_VOICES; voicenum++)
- m_voice[voicenum].generate_audio(*m_direct, outputs, samples, m_global_volume, clock(), m_filter_type);
+ for (auto & elem : m_voice)
+ elem.generate_audio(*m_direct, outputs, samples, m_global_volume, clock(), m_filter_type);
}
diff --git a/src/devices/sound/pokey.cpp b/src/devices/sound/pokey.cpp
index 89279c16184..e38b92dd6b3 100644
--- a/src/devices/sound/pokey.cpp
+++ b/src/devices/sound/pokey.cpp
@@ -184,7 +184,7 @@ pokey_device::pokey_device(const machine_config &mconfig, const char *tag, devic
device_state_interface(mconfig, *this),
m_output_type(LEGACY_LINEAR),
m_icount(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_pot0_r_cb(*this),
m_pot1_r_cb(*this),
m_pot2_r_cb(*this),
diff --git a/src/devices/sound/qs1000.cpp b/src/devices/sound/qs1000.cpp
index 3100800acbc..44ff9017ea4 100644
--- a/src/devices/sound/qs1000.cpp
+++ b/src/devices/sound/qs1000.cpp
@@ -191,9 +191,9 @@ qs1000_device::qs1000_device(const machine_config &mconfig, const char *tag, dev
m_out_p2_cb(*this),
m_out_p3_cb(*this),
//m_serial_w_cb(*this),
- m_space_config("samples", ENDIANNESS_LITTLE, 8, 24, 0, NULL),
- m_stream(NULL),
- m_direct(NULL),
+ m_space_config("samples", ENDIANNESS_LITTLE, 8, 24, 0, nullptr),
+ m_stream(nullptr),
+ m_direct(nullptr),
m_cpu(*this, "cpu")
{
m_address_map[0] = *ADDRESS_MAP_NAME(qs1000);
@@ -206,7 +206,7 @@ qs1000_device::qs1000_device(const machine_config &mconfig, const char *tag, dev
//-------------------------------------------------
const rom_entry *qs1000_device::device_rom_region() const
{
- return m_external_rom ? NULL : ROM_NAME( qs1000 );
+ return m_external_rom ? nullptr : ROM_NAME( qs1000 );
}
@@ -305,9 +305,9 @@ READ8_MEMBER(qs1000_device::data_to_i8052)
//-------------------------------------------------
void qs1000_device::device_reset()
{
- for (int ch = 0; ch < QS1000_CHANNELS; ++ch)
+ for (auto & elem : m_channels)
{
- m_channels[ch].m_flags = 0;
+ elem.m_flags = 0;
}
}
@@ -318,7 +318,7 @@ void qs1000_device::device_reset()
//-------------------------------------------------
const address_space_config *qs1000_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
@@ -486,9 +486,9 @@ void qs1000_device::sound_stream_update(sound_stream &stream, stream_sample_t **
memset(outputs[1], 0x0, samples * sizeof(*outputs[1]));
// Iterate over voices and accumulate sample data
- for (int ch = 0; ch < QS1000_CHANNELS; ch++)
+ for (auto & chan : m_channels)
{
- qs1000_channel &chan = m_channels[ch];
+
UINT8 lvol = chan.m_regs[6];
UINT8 rvol = chan.m_regs[7];
diff --git a/src/devices/sound/qsound.cpp b/src/devices/sound/qsound.cpp
index c519da454a5..c9bd30d3e74 100644
--- a/src/devices/sound/qsound.cpp
+++ b/src/devices/sound/qsound.cpp
@@ -73,7 +73,7 @@ qsound_device::qsound_device(const machine_config &mconfig, const char *tag, dev
m_cpu(*this, "qsound"),
m_sample_rom(*this, DEVICE_SELF),
m_data(0),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
@@ -147,9 +147,9 @@ void qsound_device::sound_stream_update(sound_stream &stream, stream_sample_t **
memset(outputs[0], 0, samples * sizeof(*outputs[0]));
memset(outputs[1], 0, samples * sizeof(*outputs[1]));
- for (int ch = 0; ch < 16; ch++)
+ for (auto & elem : m_channel)
{
- if (m_channel[ch].enabled)
+ if (elem.enabled)
{
stream_sample_t *lmix=outputs[0];
stream_sample_t *rmix=outputs[1];
@@ -157,34 +157,34 @@ void qsound_device::sound_stream_update(sound_stream &stream, stream_sample_t **
// Go through the buffer and add voice contributions
for (int i = 0; i < samples; i++)
{
- m_channel[ch].address += (m_channel[ch].step_ptr >> 12);
- m_channel[ch].step_ptr &= 0xfff;
- m_channel[ch].step_ptr += m_channel[ch].freq;
+ elem.address += (elem.step_ptr >> 12);
+ elem.step_ptr &= 0xfff;
+ elem.step_ptr += elem.freq;
- if (m_channel[ch].address >= m_channel[ch].end)
+ if (elem.address >= elem.end)
{
- if (m_channel[ch].loop)
+ if (elem.loop)
{
// Reached the end, restart the loop
- m_channel[ch].address -= m_channel[ch].loop;
+ elem.address -= elem.loop;
// Make sure we don't overflow (what does the real chip do in this case?)
- if (m_channel[ch].address >= m_channel[ch].end)
- m_channel[ch].address = m_channel[ch].end - m_channel[ch].loop;
+ if (elem.address >= elem.end)
+ elem.address = elem.end - elem.loop;
- m_channel[ch].address &= 0xffff;
+ elem.address &= 0xffff;
}
else
{
// Reached the end of a non-looped sample
- m_channel[ch].enabled = false;
+ elem.enabled = false;
break;
}
}
- INT8 sample = read_sample(m_channel[ch].bank | m_channel[ch].address);
- *lmix++ += ((sample * m_channel[ch].lvol * m_channel[ch].vol) >> 14);
- *rmix++ += ((sample * m_channel[ch].rvol * m_channel[ch].vol) >> 14);
+ INT8 sample = read_sample(elem.bank | elem.address);
+ *lmix++ += ((sample * elem.lvol * elem.vol) >> 14);
+ *rmix++ += ((sample * elem.rvol * elem.vol) >> 14);
}
}
}
diff --git a/src/devices/sound/rf5c400.cpp b/src/devices/sound/rf5c400.cpp
index 2e3b823c013..ad381817ccf 100644
--- a/src/devices/sound/rf5c400.cpp
+++ b/src/devices/sound/rf5c400.cpp
@@ -69,7 +69,7 @@ rf5c400_device::rf5c400_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, RF5C400, "RF5C400", tag, owner, clock, "rf5c400", __FILE__),
device_sound_interface(mconfig, *this),
m_rom(*this, DEVICE_SELF),
- m_stream(NULL)
+ m_stream(nullptr)
{
memset(m_env_ar_table, 0, sizeof(double)*0x9f);
memset(m_env_dr_table, 0, sizeof(double)*0x9f);
diff --git a/src/devices/sound/rf5c68.cpp b/src/devices/sound/rf5c68.cpp
index af99edd197a..8b5273bf5c4 100644
--- a/src/devices/sound/rf5c68.cpp
+++ b/src/devices/sound/rf5c68.cpp
@@ -23,7 +23,7 @@ const device_type RF5C68 = &device_creator<rf5c68_device>;
rf5c68_device::rf5c68_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, RF5C68, "RF5C68", tag, owner, clock, "rf5c68", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_cbank(0),
m_wbank(0),
m_enable(0)
diff --git a/src/devices/sound/s14001a.cpp b/src/devices/sound/s14001a.cpp
index 50cca284241..a238a23cd43 100644
--- a/src/devices/sound/s14001a.cpp
+++ b/src/devices/sound/s14001a.cpp
@@ -558,7 +558,7 @@ s14001a_device::s14001a_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, S14001A, "S14001A", tag, owner, clock, "s14001a", __FILE__),
device_sound_interface(mconfig, *this),
m_SpeechRom(*this, DEVICE_SELF),
- m_stream(NULL),
+ m_stream(nullptr),
m_WordInput(0),
m_LatchedWord(0),
m_SyllableAddress(0),
diff --git a/src/devices/sound/saa1099.cpp b/src/devices/sound/saa1099.cpp
index a915fa6ed38..f1986196ddf 100644
--- a/src/devices/sound/saa1099.cpp
+++ b/src/devices/sound/saa1099.cpp
@@ -143,7 +143,7 @@ const device_type SAA1099 = &device_creator<saa1099_device>;
saa1099_device::saa1099_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SAA1099, "SAA1099", tag, owner, clock, "saa1099", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_all_ch_enable(0),
m_sync_state(0),
m_selected_reg(0),
diff --git a/src/devices/sound/samples.cpp b/src/devices/sound/samples.cpp
index 4c209ec72ae..7a756dbb0fe 100644
--- a/src/devices/sound/samples.cpp
+++ b/src/devices/sound/samples.cpp
@@ -49,7 +49,7 @@ samples_device::samples_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, SAMPLES, "Samples", tag, owner, clock, "samples", __FILE__),
device_sound_interface(mconfig, *this),
m_channels(0),
- m_names(NULL)
+ m_names(nullptr)
{
}
@@ -57,7 +57,7 @@ samples_device::samples_device(const machine_config &mconfig, device_type type,
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
m_channels(0),
- m_names(NULL)
+ m_names(nullptr)
{
}
@@ -85,7 +85,7 @@ void samples_device::start(UINT8 channel, UINT32 samplenum, bool loop)
// update the parameters
sample_t &sample = m_sample[samplenum];
- chan.source = (sample.data.size() > 0) ? &sample.data[0] : NULL;
+ chan.source = (sample.data.size() > 0) ? &sample.data[0] : nullptr;
chan.source_length = sample.data.size();
chan.source_num = (chan.source_length > 0) ? samplenum : -1;
chan.pos = 0;
@@ -176,7 +176,7 @@ void samples_device::stop(UINT8 channel)
// force an update before we start
channel_t &chan = m_channel[channel];
- chan.source = NULL;
+ chan.source = nullptr;
chan.source_num = -1;
}
@@ -221,7 +221,7 @@ bool samples_device::playing(UINT8 channel) const
// force an update before we start
const channel_t &chan = m_channel[channel];
chan.stream->update();
- return (chan.source != NULL);
+ return (chan.source != nullptr);
}
@@ -246,7 +246,7 @@ void samples_device::device_start()
// initialize channel
channel_t &chan = m_channel[channel];
chan.stream = stream_alloc(0, 1, machine().sample_rate());
- chan.source = NULL;
+ chan.source = nullptr;
chan.source_num = -1;
chan.step = 0;
chan.loop = 0;
@@ -302,13 +302,13 @@ void samples_device::device_post_load()
}
// validate the position against the length in case the sample is smaller
- if (chan.source != NULL && chan.pos >= chan.source_length)
+ if (chan.source != nullptr && chan.pos >= chan.source_length)
{
if (chan.loop)
chan.pos %= chan.source_length;
else
{
- chan.source = NULL;
+ chan.source = nullptr;
chan.source_num = -1;
}
}
@@ -330,7 +330,7 @@ void samples_device::sound_stream_update(sound_stream &stream, stream_sample_t *
stream_sample_t *buffer = outputs[0];
// process if we still have a source and we're not paused
- if (chan.source != NULL && !chan.paused)
+ if (chan.source != nullptr && !chan.paused)
{
// load some info locally
UINT32 pos = chan.pos;
@@ -359,7 +359,7 @@ void samples_device::sound_stream_update(sound_stream &stream, stream_sample_t *
pos %= sample_length;
else
{
- chan.source = NULL;
+ chan.source = nullptr;
chan.source_num = -1;
if (samples > 0)
memset(buffer, 0, samples * sizeof(*buffer));
@@ -614,18 +614,18 @@ bool samples_device::load_samples()
// load the samples
int index = 0;
- for (const char *samplename = iter.first(); samplename != NULL; index++, samplename = iter.next())
+ for (const char *samplename = iter.first(); samplename != nullptr; index++, samplename = iter.next())
{
// attempt to open as FLAC first
emu_file file(machine().options().sample_path(), OPEN_FLAG_READ);
file_error filerr = file.open(basename, PATH_SEPARATOR, samplename, ".flac");
- if (filerr != FILERR_NONE && altbasename != NULL)
+ if (filerr != FILERR_NONE && altbasename != nullptr)
filerr = file.open(altbasename, PATH_SEPARATOR, samplename, ".flac");
// if not, try as WAV
if (filerr != FILERR_NONE)
filerr = file.open(basename, PATH_SEPARATOR, samplename, ".wav");
- if (filerr != FILERR_NONE && altbasename != NULL)
+ if (filerr != FILERR_NONE && altbasename != nullptr)
filerr = file.open(altbasename, PATH_SEPARATOR, samplename, ".wav");
// if opened, read it
diff --git a/src/devices/sound/samples.h b/src/devices/sound/samples.h
index 24bb4541766..f1512853a6a 100644
--- a/src/devices/sound/samples.h
+++ b/src/devices/sound/samples.h
@@ -85,12 +85,12 @@ protected:
samples_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source);
// device-level overrides
- virtual void device_start();
- virtual void device_reset();
- virtual void device_post_load();
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_post_load() override;
// device_sound_interface overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
+ virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
// internal classes
struct channel_t
@@ -137,13 +137,13 @@ public:
m_current(-1) { }
// getters
- const char *altbasename() const { return (m_samples.m_names != NULL && m_samples.m_names[0] != NULL && m_samples.m_names[0][0] == '*') ? &m_samples.m_names[0][1] : NULL; }
+ const char *altbasename() const { return (m_samples.m_names != nullptr && m_samples.m_names[0] != nullptr && m_samples.m_names[0][0] == '*') ? &m_samples.m_names[0][1] : nullptr; }
// iteration
const char *first()
{
- if (m_samples.m_names == NULL || m_samples.m_names[0] == NULL)
- return NULL;
+ if (m_samples.m_names == nullptr || m_samples.m_names[0] == nullptr)
+ return nullptr;
m_current = 0;
if (m_samples.m_names[0][0] == '*')
m_current++;
@@ -152,8 +152,8 @@ public:
const char *next()
{
- if (m_current == -1 || m_samples.m_names[m_current] == NULL)
- return NULL;
+ if (m_current == -1 || m_samples.m_names[m_current] == nullptr)
+ return nullptr;
return m_samples.m_names[m_current++];
}
@@ -162,7 +162,7 @@ public:
{
int save = m_current;
int result = 0;
- for (const char *scan = first(); scan != NULL; scan = next())
+ for (const char *scan = first(); scan != nullptr; scan = next())
result++;
m_current = save;
return result;
diff --git a/src/devices/sound/scsp.cpp b/src/devices/sound/scsp.cpp
index df2a5ef0143..c1c9f42737d 100644
--- a/src/devices/sound/scsp.cpp
+++ b/src/devices/sound/scsp.cpp
@@ -149,12 +149,12 @@ scsp_device::scsp_device(const machine_config &mconfig, const char *tag, device_
m_irq_cb(*this),
m_main_irq_cb(*this),
m_BUFPTR(0),
- m_SCSPRAM(NULL),
+ m_SCSPRAM(nullptr),
m_SCSPRAM_LENGTH(0),
m_Master(0),
- m_stream(NULL),
- m_buffertmpl(NULL),
- m_buffertmpr(NULL),
+ m_stream(nullptr),
+ m_buffertmpl(nullptr),
+ m_buffertmpr(nullptr),
m_IrqTimA(0),
m_IrqTimBC(0),
m_IrqMidi(0),
@@ -162,15 +162,15 @@ scsp_device::scsp_device(const machine_config &mconfig, const char *tag, device_
m_MidiOutR(0),
m_MidiW(0),
m_MidiR(0),
- m_timerA(NULL),
- m_timerB(NULL),
- m_timerC(NULL),
+ m_timerA(nullptr),
+ m_timerB(nullptr),
+ m_timerC(nullptr),
m_mcieb(0),
m_mcipd(0),
- m_bufferl(NULL),
- m_bufferr(NULL),
+ m_bufferl(nullptr),
+ m_bufferr(nullptr),
m_length(0),
- m_RBUFDST(NULL)
+ m_RBUFDST(nullptr)
{
memset(m_RINGBUF, 0, sizeof(m_RINGBUF));
memset(m_MidiStack, 0, sizeof(m_MidiStack));
@@ -611,7 +611,7 @@ void scsp_device::init()
{
m_Slots[i].slot=i;
m_Slots[i].active=0;
- m_Slots[i].base=NULL;
+ m_Slots[i].base=nullptr;
m_Slots[i].EG.state=SCSP_RELEASE;
}
diff --git a/src/devices/sound/segapcm.cpp b/src/devices/sound/segapcm.cpp
index 50e875bc474..8e92167c708 100644
--- a/src/devices/sound/segapcm.cpp
+++ b/src/devices/sound/segapcm.cpp
@@ -20,11 +20,11 @@ segapcm_device::segapcm_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, SEGAPCM, "Sega PCM", tag, owner, clock, "segapcm", __FILE__),
device_sound_interface(mconfig, *this),
m_rom(*this, DEVICE_SELF),
- m_ram(NULL),
+ m_ram(nullptr),
m_bank(0),
m_bankshift(0),
m_bankmask(0),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
diff --git a/src/devices/sound/sidvoice.cpp b/src/devices/sound/sidvoice.cpp
index 2dd42bcf3c4..5f183307443 100644
--- a/src/devices/sound/sidvoice.cpp
+++ b/src/devices/sound/sidvoice.cpp
@@ -300,9 +300,9 @@ INLINE void waveCalcCycleLen(sidOperator* pVoice)
/* else */
{
#if defined(DIRECT_FIXPOINT)
- register UINT16 diff = pVoice->cycleLenCount - pVoice->cycleLen.w[HI];
+ UINT16 diff = pVoice->cycleLenCount - pVoice->cycleLen.w[HI];
#else
- register UINT16 diff = pVoice->cycleLenCount - pVoice->cycleLen;
+ UINT16 diff = pVoice->cycleLenCount - pVoice->cycleLen;
#endif
if ( pVoice->wavePre[diff].len != pVoice->cycleLenCount )
{
diff --git a/src/devices/sound/sn76477.cpp b/src/devices/sound/sn76477.cpp
index 402db065d51..af53b7bc7ab 100644
--- a/src/devices/sound/sn76477.cpp
+++ b/src/devices/sound/sn76477.cpp
@@ -199,9 +199,9 @@ sn76477_device::sn76477_device(const machine_config &mconfig, const char *tag, d
m_mixer_c(0),
m_envelope_1(0),
m_envelope_2(0),
- m_channel(NULL),
+ m_channel(nullptr),
m_our_sample_rate(0),
- m_file(NULL)
+ m_file(nullptr)
{
}
diff --git a/src/devices/sound/sn76496.cpp b/src/devices/sound/sn76496.cpp
index 2f65392174d..305daa62b5b 100644
--- a/src/devices/sound/sn76496.cpp
+++ b/src/devices/sound/sn76496.cpp
@@ -333,7 +333,7 @@ void sn76496_base_device::sound_stream_update(sound_stream &stream, stream_sampl
{
int i;
stream_sample_t *lbuffer = outputs[0];
- stream_sample_t *rbuffer = (m_stereo)? outputs[1] : NULL;
+ stream_sample_t *rbuffer = (m_stereo)? outputs[1] : nullptr;
INT16 out = 0;
INT16 out2 = 0;
diff --git a/src/devices/sound/snkwave.cpp b/src/devices/sound/snkwave.cpp
index bc9cca6b59c..79a6ed1bcb4 100644
--- a/src/devices/sound/snkwave.cpp
+++ b/src/devices/sound/snkwave.cpp
@@ -24,7 +24,7 @@ const device_type SNKWAVE = &device_creator<snkwave_device>;
snkwave_device::snkwave_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SNKWAVE, "SNK Wave", tag, owner, clock, "snkwave", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_external_clock(0),
m_sample_rate(0),
m_frequency(0),
diff --git a/src/devices/sound/sp0250.cpp b/src/devices/sound/sp0250.cpp
index 5bf37c4e924..004cd6d6921 100644
--- a/src/devices/sound/sp0250.cpp
+++ b/src/devices/sound/sp0250.cpp
@@ -46,22 +46,22 @@ sp0250_device::sp0250_device(const machine_config &mconfig, const char *tag, dev
m_rcount(0),
m_playing(0),
m_RNG(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_voiced(0),
m_fifo_pos(0),
m_drq(*this)
{
- for (int i = 0; i < 15; i++)
+ for (auto & elem : m_fifo)
{
- m_fifo[i] = 0;
+ elem = 0;
}
- for (int i = 0; i < 6; i++)
+ for (auto & elem : m_filter)
{
- m_filter[i].F = 0;
- m_filter[i].B = 0;
- m_filter[i].z1 = 0;
- m_filter[i].z2 = 0;
+ elem.F = 0;
+ elem.B = 0;
+ elem.z1 = 0;
+ elem.z2 = 0;
}
}
diff --git a/src/devices/sound/spu.cpp b/src/devices/sound/spu.cpp
index ef5a81e0e82..31d04be95d6 100644
--- a/src/devices/sound/spu.cpp
+++ b/src/devices/sound/spu.cpp
@@ -240,7 +240,7 @@ static const int filter_coef[5][2]=
// GLOBAL VARIABLES
//**************************************************************************
-reverb_params *spu_reverb_cfg=NULL;
+reverb_params *spu_reverb_cfg=nullptr;
float spu_device::freq_multiplier=1.0f;
@@ -304,11 +304,11 @@ public:
: invalid_start(0xffffffff),
invalid_end(0),
last_update_end(0xffffffff),
- data(NULL),
+ data(nullptr),
ref_count(0),
valid(false),
is_loop(false),
- loop_cache(NULL)
+ loop_cache(nullptr)
{
}
@@ -353,7 +353,7 @@ public:
sample_loop_cache *next;
sample_loop_cache()
- : next(NULL)
+ : next(nullptr)
{
sample_cache::cache_size+=num_loop_cache_samples<<1;
}
@@ -378,14 +378,14 @@ struct spu_device::cache_pointer
sample_cache *cache;
cache_pointer()
- : ptr(NULL),
- cache(NULL)
+ : ptr(nullptr),
+ cache(nullptr)
{
}
cache_pointer(const cache_pointer &other)
- : ptr(NULL),
- cache(NULL)
+ : ptr(nullptr),
+ cache(nullptr)
{
operator =(other);
}
@@ -417,7 +417,7 @@ struct spu_device::cache_pointer
}
}
- operator bool() const { return cache!=NULL; }
+ operator bool() const { return cache!=nullptr; }
bool is_valid() const { return ((cache) && (cache->is_valid_pointer(ptr))); }
};
@@ -492,8 +492,8 @@ public:
in(0),
sector_size(_sector_size),
num_sectors(_num_sectors),
- marker_head(NULL),
- marker_tail(NULL)
+ marker_head(nullptr),
+ marker_tail(nullptr)
{
buffer_size=sector_size*num_sectors;
buffer.resize(buffer_size);
@@ -507,10 +507,10 @@ public:
unsigned char *add_sector(const unsigned int sector)
{
- stream_marker *xam=new stream_marker;
+ auto xam=new stream_marker;
xam->sector=sector;
xam->offset=head;
- xam->next=NULL;
+ xam->next=nullptr;
xam->prev=marker_tail;
if (marker_tail)
{
@@ -539,13 +539,13 @@ public:
stream_marker *xam=marker_tail;
head=xam->offset;
marker_tail=xam->prev;
- if (marker_tail) marker_tail->next=NULL;
+ if (marker_tail) marker_tail->next=nullptr;
global_free(xam);
}
// Set marker head to NULL if the list is now empty
- if (! marker_tail) marker_head=NULL;
+ if (! marker_tail) marker_head=nullptr;
// Adjust buffer size counter
@@ -566,7 +566,7 @@ public:
global_free(m);
}
- marker_head=marker_tail=NULL;
+ marker_head=marker_tail=nullptr;
head=tail=in=0;
}
@@ -586,10 +586,10 @@ public:
stream_marker *xam=marker_head;
marker_head=xam->next;
global_free(xam);
- if (marker_head) marker_head->prev=NULL;
+ if (marker_head) marker_head->prev=nullptr;
}
- if (! marker_head) marker_head=marker_tail=NULL;
+ if (! marker_head) marker_head=marker_tail=nullptr;
}
unsigned int get_bytes_in() const { return in; }
@@ -645,7 +645,7 @@ signed short *spu_device::sample_cache::get_sample_pointer(const unsigned int ad
return data+(((addr-start)>>4)*28);
} else
{
- return NULL;
+ return nullptr;
}
}
@@ -828,9 +828,9 @@ void spu_device::cache_pointer::reset()
{
if (cache)
{
- ptr=NULL;
+ ptr=nullptr;
cache->remove_ref();
- cache=NULL;
+ cache=nullptr;
}
}
@@ -1017,7 +1017,7 @@ void spu_device::device_start()
void spu_device::device_reset()
{
- cur_reverb_preset = NULL;
+ cur_reverb_preset = nullptr;
cur_frame_sample = 0;
cur_generate_sample = 0;
@@ -1048,8 +1048,8 @@ void spu_device::device_reset()
memset(cache,0,(spu_ram_size>>4)*sizeof(sample_cache *));
- for (unsigned int i=0; i<4; i++)
- output_buf[i]=new unsigned char [output_buffer_size];
+ for (auto & elem : output_buf)
+ elem=new unsigned char [output_buffer_size];
output_head=output_tail=output_size=0;
noise_t=0;
@@ -1082,8 +1082,8 @@ void spu_device::device_post_load()
//
void spu_device::device_stop()
{
- for (unsigned int i=0; i<4; i++)
- global_free_array(output_buf[i]);
+ for (auto & elem : output_buf)
+ global_free_array(elem);
kill_stream();
@@ -1117,7 +1117,7 @@ void spu_device::init_stream()
void spu_device::kill_stream()
{
global_free(rev);
- rev=NULL;
+ rev=nullptr;
}
//
@@ -1310,7 +1310,7 @@ void spu_device::flush_cache(sample_cache *sc,
const unsigned int iend)
{
for (unsigned int a=sc->start; a<sc->end; a+=16)
- cache[a>>4]=NULL;
+ cache[a>>4]=nullptr;
/* log_static(log_spu,"cache_invalidate: %08x->%08x\n",
sc->start,
@@ -1349,7 +1349,7 @@ spu_device::sample_cache *spu_device::get_sample_cache(const unsigned int addr)
sc=new sample_cache;
sc->valid=true;
sc->start=addr;
- sc->loop=NULL;
+ sc->loop=nullptr;
adpcm_packet *ap=(adpcm_packet *)(spu_ram+sc->start);
unsigned int a;
@@ -1526,7 +1526,7 @@ spu_device::sample_loop_cache *spu_device::get_loop_cache(sample_cache *cache, c
{
// No loop cache exists for this address pair, create a new one
- sample_loop_cache *lc=new sample_loop_cache;
+ auto lc=new sample_loop_cache;
lc->loopend=lpen;
lc->loopstart=lpst;
lpcache->add_loop_cache(lc);
@@ -1581,7 +1581,7 @@ void spu_device::update_voice_loop(const unsigned int v)
{
ra=spureg.voice[v].repaddr<<3;
ra=(ra+0xf)&~0xf;
- const adpcm_packet *ap=ra?(adpcm_packet *)(spu_ram+ra):NULL;
+ const adpcm_packet *ap=ra?(adpcm_packet *)(spu_ram+ra):nullptr;
if (ap)
{
@@ -1681,7 +1681,7 @@ bool spu_device::process_voice(const unsigned int v,
if (ntoplay)
{
- signed short *noisep=NULL;
+ signed short *noisep=nullptr;
if (fm)
{
@@ -2030,13 +2030,13 @@ void spu_device::generate_voice(const unsigned int v,
{
// Stitch samples, get the first sample of the next segment
- signed short *nsp=NULL;
+ signed short *nsp=nullptr;
if (vi->inloopcache)
{
nsp=vi->play.ptr+(vi->loop_cache->len-vi->lcptr);
if (nsp>=vi->play.cache->dend)
- nsp=NULL;
+ nsp=nullptr;
}
if (! nsp)
@@ -2540,7 +2540,7 @@ void spu_device::update_reverb()
{
cur_reverb_preset=find_reverb_preset((unsigned short *)&reg[0x1c0]);
- if (cur_reverb_preset==NULL)
+ if (cur_reverb_preset==nullptr)
{
// printf("spu: reverb=unknown (reg 1c0 = %x)\n", reg[0x1c0]);
} else
@@ -2735,8 +2735,8 @@ void spu_device::process_until(const unsigned int tsample)
process_samples,
isreverb?reverbptr:outptr,
isnoise?noiseptr
- :(isfm?fmptr:NULL),
- isfmin?fmptr:NULL,
+ :(isfm?fmptr:nullptr),
+ isfmin?fmptr:nullptr,
&tleft))
{
spureg.chon&=~mask;
diff --git a/src/devices/sound/spu_tables.cpp b/src/devices/sound/spu_tables.cpp
index faa5719c4c6..d41286df115 100644
--- a/src/devices/sound/spu_tables.cpp
+++ b/src/devices/sound/spu_tables.cpp
@@ -622,7 +622,7 @@ spu_device::reverb_preset spu_device::reverb_presets[]=
}
},
- { NULL }
+ { nullptr }
};
//
@@ -699,5 +699,5 @@ spu_device::reverb_preset *spu_device::find_reverb_preset(const unsigned short *
if (j==32) return &reverb_presets[i];
}
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/sound/st0016.cpp b/src/devices/sound/st0016.cpp
index 99328a93b4d..59a2c3bdc7d 100644
--- a/src/devices/sound/st0016.cpp
+++ b/src/devices/sound/st0016.cpp
@@ -27,7 +27,7 @@ const device_type ST0016 = &device_creator<st0016_device>;
st0016_device::st0016_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ST0016, "ST0016 (Audio)", tag, owner, clock, "st0016_audio", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_ram_read_cb(*this)
{
memset(m_vpos, 0, sizeof(int)*8);
diff --git a/src/devices/sound/t6721a.cpp b/src/devices/sound/t6721a.cpp
index 2cc9828f407..d5c48f89e4b 100644
--- a/src/devices/sound/t6721a.cpp
+++ b/src/devices/sound/t6721a.cpp
@@ -42,7 +42,7 @@ t6721a_device::t6721a_device(const machine_config &mconfig, const char *tag, dev
m_write_phi2(*this),
m_write_dtrd(*this),
m_write_apd(*this),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
diff --git a/src/devices/sound/tiaintf.cpp b/src/devices/sound/tiaintf.cpp
index 7cbfe6683e4..a16fe0698dc 100644
--- a/src/devices/sound/tiaintf.cpp
+++ b/src/devices/sound/tiaintf.cpp
@@ -19,8 +19,8 @@ const device_type TIA = &device_creator<tia_device>;
tia_device::tia_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TIA, "TIA", tag, owner, clock, "tia_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_channel(NULL),
- m_chip(NULL)
+ m_channel(nullptr),
+ m_chip(nullptr)
{
}
@@ -33,7 +33,7 @@ void tia_device::device_start()
{
m_channel = stream_alloc(0, 1, clock());
m_chip = tia_sound_init(this, clock(), clock(), 16);
- assert_always(m_chip != NULL, "Error creating TIA chip");
+ assert_always(m_chip != nullptr, "Error creating TIA chip");
}
diff --git a/src/devices/sound/tms3615.cpp b/src/devices/sound/tms3615.cpp
index 3ccf9159b9d..a37cc81a654 100644
--- a/src/devices/sound/tms3615.cpp
+++ b/src/devices/sound/tms3615.cpp
@@ -24,7 +24,7 @@ const device_type TMS3615 = &device_creator<tms3615_device>;
tms3615_device::tms3615_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TMS3615, "TMS3615", tag, owner, clock, "tms3615", __FILE__),
device_sound_interface(mconfig, *this),
- m_channel(0),
+ m_channel(nullptr),
m_samplerate(0),
m_basefreq(0),
m_output8(0),
diff --git a/src/devices/sound/tms36xx.cpp b/src/devices/sound/tms36xx.cpp
index 18c55ce6235..d8052d7651a 100644
--- a/src/devices/sound/tms36xx.cpp
+++ b/src/devices/sound/tms36xx.cpp
@@ -264,7 +264,7 @@ static const int tune4[13*6] = {
B(1), B(2), Dx(3), B(3), Dx(4), B(4)
};
-static const int *const tunes[] = {NULL,tune1,tune2,tune3,tune4};
+static const int *const tunes[] = {nullptr,tune1,tune2,tune3,tune4};
#define DECAY(voice) \
if( m_vol[voice] > TMS36XX_VMIN ) \
@@ -323,8 +323,8 @@ const device_type TMS36XX = &device_creator<tms36xx_device>;
tms36xx_device::tms36xx_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TMS36XX, "TMS36XX", tag, owner, clock, "tms36xx", __FILE__),
device_sound_interface(mconfig, *this),
- m_subtype(NULL),
- m_channel(NULL),
+ m_subtype(nullptr),
+ m_channel(nullptr),
m_samplerate(0),
m_basefreq(0),
m_octave(0),
diff --git a/src/devices/sound/tms5110.cpp b/src/devices/sound/tms5110.cpp
index 1ab14ca6b3d..724e2b02c98 100644
--- a/src/devices/sound/tms5110.cpp
+++ b/src/devices/sound/tms5110.cpp
@@ -1186,7 +1186,7 @@ void tms5110_device::device_reset()
m_RNG = 0x1FFF;
memset(m_u, 0, sizeof(m_u));
memset(m_x, 0, sizeof(m_x));
- if (m_table != NULL)
+ if (m_table != nullptr)
{
/* legacy interface */
m_schedule_dummy_read = TRUE;
@@ -1457,9 +1457,9 @@ void tmsprom_device::device_start()
m_ctl_cb.resolve_safe();
m_rom = region()->base();
- assert_always(m_rom != NULL, "Error creating TMSPROM chip: No rom region found");
+ assert_always(m_rom != nullptr, "Error creating TMSPROM chip: No rom region found");
m_prom = owner()->memregion(m_prom_region)->base();
- assert_always(m_prom != NULL, "Error creating TMSPROM chip: No prom region found");
+ assert_always(m_prom != nullptr, "Error creating TMSPROM chip: No prom region found");
m_romclk_timer = timer_alloc(0);
m_romclk_timer->adjust(attotime::zero, 0, attotime::from_hz(clock()));
diff --git a/src/devices/sound/tms5220.cpp b/src/devices/sound/tms5220.cpp
index b2c39d4961d..ac512ffb004 100644
--- a/src/devices/sound/tms5220.cpp
+++ b/src/devices/sound/tms5220.cpp
@@ -1464,7 +1464,7 @@ void tms5220_device::device_start()
}
else
{
- m_speechrom = NULL;
+ m_speechrom = nullptr;
}
set_variant(TMS5220_IS_5220);
@@ -1917,7 +1917,7 @@ tms5220_device::tms5220_device(const machine_config &mconfig, const char *tag, d
device_sound_interface(mconfig, *this),
m_irq_handler(*this),
m_readyq_handler(*this),
- m_speechrom_tag(NULL)
+ m_speechrom_tag(nullptr)
{
}
@@ -1926,7 +1926,7 @@ tms5220_device::tms5220_device(const machine_config &mconfig, device_type type,
device_sound_interface(mconfig, *this),
m_irq_handler(*this),
m_readyq_handler(*this),
- m_speechrom_tag(NULL)
+ m_speechrom_tag(nullptr)
{
}
diff --git a/src/devices/sound/upd7752.cpp b/src/devices/sound/upd7752.cpp
index fb086e4af00..ccb07e56dc7 100644
--- a/src/devices/sound/upd7752.cpp
+++ b/src/devices/sound/upd7752.cpp
@@ -50,7 +50,7 @@ upd7752_device::upd7752_device(const machine_config &mconfig, const char *tag, d
const address_space_config *upd7752_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/sound/upd7759.cpp b/src/devices/sound/upd7759.cpp
index 4b7d4e13a18..a7e0491687f 100644
--- a/src/devices/sound/upd7759.cpp
+++ b/src/devices/sound/upd7759.cpp
@@ -147,7 +147,7 @@
upd775x_device::upd775x_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_sound_interface(mconfig, *this),
- m_channel(NULL),
+ m_channel(nullptr),
m_sample_offset_shift(0),
m_pos(0),
m_step(0),
@@ -171,8 +171,8 @@ upd775x_device::upd775x_device(const machine_config &mconfig, device_type type,
m_adpcm_state(0),
m_adpcm_data(0),
m_sample(0),
- m_rom(NULL),
- m_rombase(NULL),
+ m_rom(nullptr),
+ m_rombase(nullptr),
m_romoffset(0),
m_rommask(0),
m_drqcallback(*this)
@@ -183,14 +183,14 @@ const device_type UPD7759 = &device_creator<upd7759_device>;
upd7759_device::upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: upd775x_device(mconfig, UPD7759, "uPD7759", tag, owner, clock, "upd7759", __FILE__),
- m_timer(NULL)
+ m_timer(nullptr)
{
}
upd7759_device::upd7759_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)
: upd775x_device(mconfig, type, name, tag, owner, clock, shortname, source),
- m_timer(NULL)
+ m_timer(nullptr)
{
}
@@ -232,7 +232,7 @@ void upd7759_device::device_start()
/* compute the ROM base or allocate a timer */
m_romoffset = 0;
m_rom = m_rombase = region()->base();
- if (m_rombase == NULL)
+ if (m_rombase == nullptr)
{
assert(type() == UPD7759); // other chips do not support slave mode
m_timer = timer_alloc(TIMER_SLAVE_UPDATE);
@@ -307,7 +307,7 @@ void upd7756_device::device_start()
/* compute the ROM base or allocate a timer */
m_romoffset = 0;
m_rom = m_rombase = region()->base();
- if (m_rombase == NULL)
+ if (m_rombase == nullptr)
{
m_rommask = 0;
}
@@ -800,7 +800,7 @@ READ_LINE_MEMBER( upd775x_device::busy_r )
void upd775x_device::set_bank_base(UINT32 base)
{
- assert(m_rombase != NULL);
+ assert(m_rombase != nullptr);
m_rom = m_rombase + base;
m_romoffset = base;
}
diff --git a/src/devices/sound/vlm5030.cpp b/src/devices/sound/vlm5030.cpp
index 6a66cfab937..df16d692a22 100644
--- a/src/devices/sound/vlm5030.cpp
+++ b/src/devices/sound/vlm5030.cpp
@@ -162,9 +162,9 @@ const device_type VLM5030 = &device_creator<vlm5030_device>;
vlm5030_device::vlm5030_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VLM5030, "VLM5030", tag, owner, clock, "vlm5030", __FILE__),
device_sound_interface(mconfig, *this),
- m_channel(NULL),
- m_coeff(NULL),
- m_rom(NULL),
+ m_channel(nullptr),
+ m_coeff(nullptr),
+ m_rom(nullptr),
m_address_mask(0),
m_address(0),
m_pin_BSY(0),
diff --git a/src/devices/sound/votrax.cpp b/src/devices/sound/votrax.cpp
index c4538f14270..d77b3669aa0 100644
--- a/src/devices/sound/votrax.cpp
+++ b/src/devices/sound/votrax.cpp
@@ -97,8 +97,8 @@ const double votrax_sc01_device::s_glottal_wave[16] =
votrax_sc01_device::votrax_sc01_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VOTRAX_SC01, "Votrax SC-01", tag, owner, clock, "votrax", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
- m_phoneme_timer(NULL), m_rom(NULL), m_inflection(0), m_phoneme(0),
+ m_stream(nullptr),
+ m_phoneme_timer(nullptr), m_rom(nullptr), m_inflection(0), m_phoneme(0),
m_request_cb(*this), m_request_state(0), m_internal_request(0), m_master_clock_freq(0), m_master_clock(0), m_counter_34(0),
m_latch_70(0), m_latch_72(0), m_beta1(0), m_p2(0), m_p1(0), m_phi2(0), m_phi1(0), m_phi2_20(0), m_phi1_20(0), m_subphoneme_period(0),
m_subphoneme_count(0), m_clock_88(0), m_latch_42(0), m_counter_84(0), m_latch_92(0), m_srff_132(false), m_srff_114(false), m_srff_112(false),
@@ -1322,7 +1322,7 @@ void votrax_sc01_device::device_clock_changed()
if (newfreq != m_master_clock_freq)
{
// if we have a stream
- if (m_stream != NULL)
+ if (m_stream != nullptr)
{
m_stream->update();
m_stream->set_sample_rate(newfreq / 16);
diff --git a/src/devices/sound/vrender0.cpp b/src/devices/sound/vrender0.cpp
index b13f4556525..e063daf3d42 100644
--- a/src/devices/sound/vrender0.cpp
+++ b/src/devices/sound/vrender0.cpp
@@ -86,9 +86,9 @@ const device_type VRENDER0 = &device_creator<vrender0_device>;
vrender0_device::vrender0_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VRENDER0, "VRender0", tag, owner, clock, "vrender0", __FILE__),
device_sound_interface(mconfig, *this),
- m_TexBase(NULL),
- m_FBBase(NULL),
- m_stream(NULL),
+ m_TexBase(nullptr),
+ m_FBBase(nullptr),
+ m_stream(nullptr),
m_reg_base(0)
{
}
diff --git a/src/devices/sound/wave.cpp b/src/devices/sound/wave.cpp
index 744c5acd068..650389b332e 100644
--- a/src/devices/sound/wave.cpp
+++ b/src/devices/sound/wave.cpp
@@ -72,7 +72,7 @@ void wave_device::sound_stream_update(sound_stream &stream, stream_sample_t **in
double time_index;
double duration;
stream_sample_t *left_buffer = outputs[0];
- stream_sample_t *right_buffer = NULL;
+ stream_sample_t *right_buffer = nullptr;
int i;
speaker_device_iterator spkiter(m_cass->machine().root_device());
diff --git a/src/devices/sound/x1_010.cpp b/src/devices/sound/x1_010.cpp
index 0ed9168e735..7e69acc6b26 100644
--- a/src/devices/sound/x1_010.cpp
+++ b/src/devices/sound/x1_010.cpp
@@ -192,9 +192,9 @@ void x1_010_device::sound_stream_update(sound_stream &stream, stream_sample_t **
{
X1_010_CHANNEL *reg;
int ch, i, volL, volR, freq, div;
- register INT8 *start, *end, data;
- register UINT8 *env;
- register UINT32 smp_offs, smp_step, env_offs, env_step, delta;
+ INT8 *start, *end, data;
+ UINT8 *env;
+ UINT32 smp_offs, smp_step, env_offs, env_step, delta;
// mixer buffer zero clear
memset( outputs[0], 0, samples*sizeof(*outputs[0]) );
diff --git a/src/devices/sound/ym2151.cpp b/src/devices/sound/ym2151.cpp
index 01fdf869310..5569fc6e9e1 100644
--- a/src/devices/sound/ym2151.cpp
+++ b/src/devices/sound/ym2151.cpp
@@ -21,7 +21,7 @@
#endif
#define LOG_CYM_FILE 0
-static FILE * cymfile = NULL;
+static FILE * cymfile = nullptr;
/* struct describing a single operator */
@@ -917,7 +917,7 @@ INLINE void set_connect(YM2151 *PSG, YM2151Operator *om1, int cha, int v)
/* +----C1----+ */
/* M1-+-MEM---M2-+-OUT */
/* +----C2----+ */
- om1->connect = 0; /* special mark */
+ om1->connect = nullptr; /* special mark */
oc1->connect = &PSG->chanout[cha];
om2->connect = &PSG->chanout[cha];
om1->mem_connect = &PSG->m2;
@@ -1523,8 +1523,8 @@ void * ym2151_init(device_t *device, int clock, int rate)
PSG->clock = clock;
/*rate = clock/64;*/
PSG->sampfreq = rate ? rate : 44100; /* avoid division by 0 in init_chip_tables() */
- PSG->irqhandler = NULL; /* interrupt handler */
- PSG->porthandler = NULL; /* port write handler */
+ PSG->irqhandler = nullptr; /* interrupt handler */
+ PSG->porthandler = nullptr; /* port write handler */
init_chip_tables( PSG );
PSG->lfo_timer_add = (1<<LFO_SH) * (clock/64.0) / PSG->sampfreq;
@@ -1566,7 +1566,7 @@ void ym2151_shutdown(void *_chip)
if (cymfile)
fclose (cymfile);
- cymfile = NULL;
+ cymfile = nullptr;
#ifdef SAVE_SAMPLE
fclose(sample[8]);
diff --git a/src/devices/sound/ym2413.cpp b/src/devices/sound/ym2413.cpp
index 505e3385fc6..8df9b58b008 100644
--- a/src/devices/sound/ym2413.cpp
+++ b/src/devices/sound/ym2413.cpp
@@ -161,7 +161,7 @@ static FILE *sample[1];
#endif
#define LOG_CYM_FILE 0
-static FILE * cymfile = NULL;
+static FILE * cymfile = nullptr;
@@ -283,45 +283,45 @@ struct YM2413
static const UINT32 ksl_tab[8*16]=
{
/* OCT 0 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
/* OCT 1 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.750/DV, 1.125/DV, 1.500/DV,
- 1.875/DV, 2.250/DV, 2.625/DV, 3.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.750/DV), static_cast<UINT32>(1.125/DV), static_cast<UINT32>(1.500/DV),
+ static_cast<UINT32>(1.875/DV), static_cast<UINT32>(2.250/DV), static_cast<UINT32>(2.625/DV), static_cast<UINT32>(3.000/DV),
/* OCT 2 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 1.125/DV, 1.875/DV, 2.625/DV,
- 3.000/DV, 3.750/DV, 4.125/DV, 4.500/DV,
- 4.875/DV, 5.250/DV, 5.625/DV, 6.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(1.125/DV), static_cast<UINT32>(1.875/DV), static_cast<UINT32>(2.625/DV),
+ static_cast<UINT32>(3.000/DV), static_cast<UINT32>(3.750/DV), static_cast<UINT32>(4.125/DV), static_cast<UINT32>(4.500/DV),
+ static_cast<UINT32>(4.875/DV), static_cast<UINT32>(5.250/DV), static_cast<UINT32>(5.625/DV), static_cast<UINT32>(6.000/DV),
/* OCT 3 */
- 0.000/DV, 0.000/DV, 0.000/DV, 1.875/DV,
- 3.000/DV, 4.125/DV, 4.875/DV, 5.625/DV,
- 6.000/DV, 6.750/DV, 7.125/DV, 7.500/DV,
- 7.875/DV, 8.250/DV, 8.625/DV, 9.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(1.875/DV),
+ static_cast<UINT32>(3.000/DV), static_cast<UINT32>(4.125/DV), static_cast<UINT32>(4.875/DV), static_cast<UINT32>(5.625/DV),
+ static_cast<UINT32>(6.000/DV), static_cast<UINT32>(6.750/DV), static_cast<UINT32>(7.125/DV), static_cast<UINT32>(7.500/DV),
+ static_cast<UINT32>(7.875/DV), static_cast<UINT32>(8.250/DV), static_cast<UINT32>(8.625/DV), static_cast<UINT32>(9.000/DV),
/* OCT 4 */
- 0.000/DV, 0.000/DV, 3.000/DV, 4.875/DV,
- 6.000/DV, 7.125/DV, 7.875/DV, 8.625/DV,
- 9.000/DV, 9.750/DV,10.125/DV,10.500/DV,
- 10.875/DV,11.250/DV,11.625/DV,12.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(3.000/DV), static_cast<UINT32>(4.875/DV),
+ static_cast<UINT32>(6.000/DV), static_cast<UINT32>(7.125/DV), static_cast<UINT32>(7.875/DV), static_cast<UINT32>(8.625/DV),
+ static_cast<UINT32>(9.000/DV), static_cast<UINT32>(9.750/DV), static_cast<UINT32>(10.125/DV),static_cast<UINT32>(10.500/DV),
+ static_cast<UINT32>(10.875/DV),static_cast<UINT32>(11.250/DV),static_cast<UINT32>(11.625/DV),static_cast<UINT32>(12.000/DV),
/* OCT 5 */
- 0.000/DV, 3.000/DV, 6.000/DV, 7.875/DV,
- 9.000/DV,10.125/DV,10.875/DV,11.625/DV,
- 12.000/DV,12.750/DV,13.125/DV,13.500/DV,
- 13.875/DV,14.250/DV,14.625/DV,15.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(3.000/DV), static_cast<UINT32>(6.000/DV), static_cast<UINT32>(7.875/DV),
+ static_cast<UINT32>(9.000/DV), static_cast<UINT32>(10.125/DV),static_cast<UINT32>(10.875/DV),static_cast<UINT32>(11.625/DV),
+ static_cast<UINT32>(12.000/DV),static_cast<UINT32>(12.750/DV),static_cast<UINT32>(13.125/DV),static_cast<UINT32>(13.500/DV),
+ static_cast<UINT32>(13.875/DV),static_cast<UINT32>(14.250/DV),static_cast<UINT32>(14.625/DV),static_cast<UINT32>(15.000/DV),
/* OCT 6 */
- 0.000/DV, 6.000/DV, 9.000/DV,10.875/DV,
- 12.000/DV,13.125/DV,13.875/DV,14.625/DV,
- 15.000/DV,15.750/DV,16.125/DV,16.500/DV,
- 16.875/DV,17.250/DV,17.625/DV,18.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(6.000/DV), static_cast<UINT32>(9.000/DV),static_cast<UINT32>(10.875/DV),
+ static_cast<UINT32>(12.000/DV),static_cast<UINT32>(13.125/DV),static_cast<UINT32>(13.875/DV),static_cast<UINT32>(14.625/DV),
+ static_cast<UINT32>(15.000/DV),static_cast<UINT32>(15.750/DV),static_cast<UINT32>(16.125/DV),static_cast<UINT32>(16.500/DV),
+ static_cast<UINT32>(16.875/DV),static_cast<UINT32>(17.250/DV),static_cast<UINT32>(17.625/DV),static_cast<UINT32>(18.000/DV),
/* OCT 7 */
- 0.000/DV, 9.000/DV,12.000/DV,13.875/DV,
- 15.000/DV,16.125/DV,16.875/DV,17.625/DV,
- 18.000/DV,18.750/DV,19.125/DV,19.500/DV,
- 19.875/DV,20.250/DV,20.625/DV,21.000/DV
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(9.000/DV), static_cast<UINT32>(12.000/DV),static_cast<UINT32>(13.875/DV),
+ static_cast<UINT32>(15.000/DV),static_cast<UINT32>(16.125/DV),static_cast<UINT32>(16.875/DV),static_cast<UINT32>(17.625/DV),
+ static_cast<UINT32>(18.000/DV),static_cast<UINT32>(18.750/DV),static_cast<UINT32>(19.125/DV),static_cast<UINT32>(19.500/DV),
+ static_cast<UINT32>(19.875/DV),static_cast<UINT32>(20.250/DV),static_cast<UINT32>(20.625/DV),static_cast<UINT32>(21.000/DV)
};
#undef DV
@@ -1956,7 +1956,7 @@ static void OPLL_UnLockTable(void)
if (cymfile)
fclose (cymfile);
- cymfile = NULL;
+ cymfile = nullptr;
}
static void OPLLResetChip(YM2413 *chip)
@@ -2005,7 +2005,7 @@ static YM2413 *OPLLCreate(device_t *device, int clock, int rate)
{
YM2413 *chip;
- if (OPLL_LockTable(device) == -1) return NULL;
+ if (OPLL_LockTable(device) == -1) return nullptr;
/* allocate memory block */
chip = auto_alloc_clear(device->machine(), YM2413);
diff --git a/src/devices/sound/ymdeltat.cpp b/src/devices/sound/ymdeltat.cpp
index af9b4ac6a51..3e592ea7ce2 100644
--- a/src/devices/sound/ymdeltat.cpp
+++ b/src/devices/sound/ymdeltat.cpp
@@ -226,7 +226,7 @@ value: START, REC, MEMDAT, REPEAT, SPOFF, x,x,RESET meaning:
DELTAT->memread = 2; /* two dummy reads needed before accesing external memory via register $08*/
/* if yes, then let's check if ADPCM memory is mapped and big enough */
- if(DELTAT->memory == 0)
+ if(DELTAT->memory == nullptr)
{
DELTAT->device->logerror("YM Delta-T ADPCM rom not mapped\n");
DELTAT->portstate = 0x00;
diff --git a/src/devices/sound/ymf262.cpp b/src/devices/sound/ymf262.cpp
index 5e4349e2f5b..b76435bd7ad 100644
--- a/src/devices/sound/ymf262.cpp
+++ b/src/devices/sound/ymf262.cpp
@@ -134,7 +134,7 @@ static FILE *sample[1];
#endif
#define LOG_CYM_FILE 0
-static FILE * cymfile = NULL;
+static FILE * cymfile = nullptr;
@@ -300,45 +300,45 @@ static const int slot_array[32]=
static const UINT32 ksl_tab[8*16]=
{
/* OCT 0 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
/* OCT 1 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 0.750/DV, 1.125/DV, 1.500/DV,
- 1.875/DV, 2.250/DV, 2.625/DV, 3.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.750/DV), static_cast<UINT32>(1.125/DV), static_cast<UINT32>(1.500/DV),
+ static_cast<UINT32>(1.875/DV), static_cast<UINT32>(2.250/DV), static_cast<UINT32>(2.625/DV), static_cast<UINT32>(3.000/DV),
/* OCT 2 */
- 0.000/DV, 0.000/DV, 0.000/DV, 0.000/DV,
- 0.000/DV, 1.125/DV, 1.875/DV, 2.625/DV,
- 3.000/DV, 3.750/DV, 4.125/DV, 4.500/DV,
- 4.875/DV, 5.250/DV, 5.625/DV, 6.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV),
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(1.125/DV), static_cast<UINT32>(1.875/DV), static_cast<UINT32>(2.625/DV),
+ static_cast<UINT32>(3.000/DV), static_cast<UINT32>(3.750/DV), static_cast<UINT32>(4.125/DV), static_cast<UINT32>(4.500/DV),
+ static_cast<UINT32>(4.875/DV), static_cast<UINT32>(5.250/DV), static_cast<UINT32>(5.625/DV), static_cast<UINT32>(6.000/DV),
/* OCT 3 */
- 0.000/DV, 0.000/DV, 0.000/DV, 1.875/DV,
- 3.000/DV, 4.125/DV, 4.875/DV, 5.625/DV,
- 6.000/DV, 6.750/DV, 7.125/DV, 7.500/DV,
- 7.875/DV, 8.250/DV, 8.625/DV, 9.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(1.875/DV),
+ static_cast<UINT32>(3.000/DV), static_cast<UINT32>(4.125/DV), static_cast<UINT32>(4.875/DV), static_cast<UINT32>(5.625/DV),
+ static_cast<UINT32>(6.000/DV), static_cast<UINT32>(6.750/DV), static_cast<UINT32>(7.125/DV), static_cast<UINT32>(7.500/DV),
+ static_cast<UINT32>(7.875/DV), static_cast<UINT32>(8.250/DV), static_cast<UINT32>(8.625/DV), static_cast<UINT32>(9.000/DV),
/* OCT 4 */
- 0.000/DV, 0.000/DV, 3.000/DV, 4.875/DV,
- 6.000/DV, 7.125/DV, 7.875/DV, 8.625/DV,
- 9.000/DV, 9.750/DV,10.125/DV,10.500/DV,
- 10.875/DV,11.250/DV,11.625/DV,12.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(0.000/DV), static_cast<UINT32>(3.000/DV), static_cast<UINT32>(4.875/DV),
+ static_cast<UINT32>(6.000/DV), static_cast<UINT32>(7.125/DV), static_cast<UINT32>(7.875/DV), static_cast<UINT32>(8.625/DV),
+ static_cast<UINT32>(9.000/DV), static_cast<UINT32>(9.750/DV), static_cast<UINT32>(10.125/DV),static_cast<UINT32>(10.500/DV),
+ static_cast<UINT32>(10.875/DV),static_cast<UINT32>(11.250/DV),static_cast<UINT32>(11.625/DV),static_cast<UINT32>(12.000/DV),
/* OCT 5 */
- 0.000/DV, 3.000/DV, 6.000/DV, 7.875/DV,
- 9.000/DV,10.125/DV,10.875/DV,11.625/DV,
- 12.000/DV,12.750/DV,13.125/DV,13.500/DV,
- 13.875/DV,14.250/DV,14.625/DV,15.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(3.000/DV), static_cast<UINT32>(6.000/DV), static_cast<UINT32>(7.875/DV),
+ static_cast<UINT32>(9.000/DV),static_cast<UINT32>(10.125/DV), static_cast<UINT32>(10.875/DV),static_cast<UINT32>(11.625/DV),
+ static_cast<UINT32>(12.000/DV),static_cast<UINT32>(12.750/DV),static_cast<UINT32>(13.125/DV),static_cast<UINT32>(13.500/DV),
+ static_cast<UINT32>(13.875/DV),static_cast<UINT32>(14.250/DV),static_cast<UINT32>(14.625/DV),static_cast<UINT32>(15.000/DV),
/* OCT 6 */
- 0.000/DV, 6.000/DV, 9.000/DV,10.875/DV,
- 12.000/DV,13.125/DV,13.875/DV,14.625/DV,
- 15.000/DV,15.750/DV,16.125/DV,16.500/DV,
- 16.875/DV,17.250/DV,17.625/DV,18.000/DV,
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(6.000/DV), static_cast<UINT32>(9.000/DV), static_cast<UINT32>(10.875/DV),
+ static_cast<UINT32>(12.000/DV),static_cast<UINT32>(13.125/DV),static_cast<UINT32>(13.875/DV),static_cast<UINT32>(14.625/DV),
+ static_cast<UINT32>(15.000/DV),static_cast<UINT32>(15.750/DV),static_cast<UINT32>(16.125/DV),static_cast<UINT32>(16.500/DV),
+ static_cast<UINT32>(16.875/DV),static_cast<UINT32>(17.250/DV),static_cast<UINT32>(17.625/DV),static_cast<UINT32>(18.000/DV),
/* OCT 7 */
- 0.000/DV, 9.000/DV,12.000/DV,13.875/DV,
- 15.000/DV,16.125/DV,16.875/DV,17.625/DV,
- 18.000/DV,18.750/DV,19.125/DV,19.500/DV,
- 19.875/DV,20.250/DV,20.625/DV,21.000/DV
+ static_cast<UINT32>(0.000/DV), static_cast<UINT32>(9.000/DV), static_cast<UINT32>(12.000/DV),static_cast<UINT32>(13.875/DV),
+ static_cast<UINT32>(15.000/DV),static_cast<UINT32>(16.125/DV),static_cast<UINT32>(16.875/DV),static_cast<UINT32>(17.625/DV),
+ static_cast<UINT32>(18.000/DV),static_cast<UINT32>(18.750/DV),static_cast<UINT32>(19.125/DV),static_cast<UINT32>(19.500/DV),
+ static_cast<UINT32>(19.875/DV),static_cast<UINT32>(20.250/DV),static_cast<UINT32>(20.625/DV),static_cast<UINT32>(21.000/DV)
};
#undef DV
@@ -2287,7 +2287,7 @@ static void OPL3_UnLockTable(void)
if (LOG_CYM_FILE)
fclose (cymfile);
- cymfile = NULL;
+ cymfile = nullptr;
}
static void OPL3ResetChip(OPL3 *chip)
@@ -2339,7 +2339,7 @@ static OPL3 *OPL3Create(device_t *device, int clock, int rate, int type)
{
OPL3 *chip;
- if (OPL3_LockTable(device) == -1) return NULL;
+ if (OPL3_LockTable(device) == -1) return nullptr;
/* allocate memory block */
chip = auto_alloc_clear(device->machine(), OPL3);
diff --git a/src/devices/sound/ymf271.cpp b/src/devices/sound/ymf271.cpp
index c10420af8a4..1d0eec4fa5d 100644
--- a/src/devices/sound/ymf271.cpp
+++ b/src/devices/sound/ymf271.cpp
@@ -1726,10 +1726,10 @@ void ymf271_device::device_start()
void ymf271_device::device_reset()
{
- for (int i = 0; i < 48; i++)
+ for (auto & elem : m_slots)
{
- m_slots[i].active = 0;
- m_slots[i].volume = 0;
+ elem.active = 0;
+ elem.volume = 0;
}
// reset timers and IRQ
diff --git a/src/devices/sound/ymf278b.cpp b/src/devices/sound/ymf278b.cpp
index 60097767655..160d609126d 100644
--- a/src/devices/sound/ymf278b.cpp
+++ b/src/devices/sound/ymf278b.cpp
@@ -220,7 +220,7 @@ void ymf278b_device::compute_envelope(YMF278BSlot *slot)
void ymf278b_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
{
int i, j;
- YMF278BSlot *slot = NULL;
+ YMF278BSlot *slot = nullptr;
INT16 sample = 0;
INT32 *mixp;
INT32 vl, vr;
@@ -463,7 +463,7 @@ void ymf278b_device::C_w(UINT8 reg, UINT8 data)
// Handle slot registers specifically
if (reg >= 0x08 && reg <= 0xf7)
{
- YMF278BSlot *slot = NULL;
+ YMF278BSlot *slot = nullptr;
int snum;
snum = (reg-8) % 24;
slot = &m_slots[snum];
@@ -844,7 +844,7 @@ void ymf278b_device::device_reset()
void ymf278b_device::device_stop()
{
ymf262_shutdown(m_ymf262);
- m_ymf262 = NULL;
+ m_ymf262 = nullptr;
}
void ymf278b_device::precompute_rate_tables()
@@ -1016,7 +1016,7 @@ void ymf278b_device::device_start()
/* stream system initialize */
int ymf262_clock = clock() / (19/8.0);
m_ymf262 = ymf262_init(this, ymf262_clock, ymf262_clock / 288);
- assert_always(m_ymf262 != NULL, "Error creating YMF262 chip");
+ assert_always(m_ymf262 != nullptr, "Error creating YMF262 chip");
m_stream_ymf262 = machine().sound().stream_alloc(*this, 0, 4, ymf262_clock / 288);
@@ -1033,7 +1033,7 @@ ymf278b_device::ymf278b_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, YMF278B, "YMF278B", tag, owner, clock, "ymf278b", __FILE__),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
- m_space_config("samples", ENDIANNESS_BIG, 8, 22, 0, NULL),
+ m_space_config("samples", ENDIANNESS_BIG, 8, 22, 0, nullptr),
m_irq_handler(*this),
m_last_fm_data(0)
{
diff --git a/src/devices/sound/ymf278b.h b/src/devices/sound/ymf278b.h
index 096e2e3d3c4..56a9526e474 100644
--- a/src/devices/sound/ymf278b.h
+++ b/src/devices/sound/ymf278b.h
@@ -37,7 +37,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_0) ? &m_space_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_0) ? &m_space_config : nullptr; }
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
diff --git a/src/devices/sound/ymz280b.cpp b/src/devices/sound/ymz280b.cpp
index 9d07f057739..c9c19277780 100644
--- a/src/devices/sound/ymz280b.cpp
+++ b/src/devices/sound/ymz280b.cpp
@@ -138,9 +138,9 @@ void ymz280b_device::update_volumes(struct YMZ280BVoice *voice)
void ymz280b_device::device_post_load()
{
- for (int j = 0; j < 8; j++)
+ for (auto & elem : m_voice)
{
- struct YMZ280BVoice *voice = &m_voice[j];
+ struct YMZ280BVoice *voice = &elem;
update_step(voice);
if(voice->irq_schedule)
voice->timer->adjust(attotime::zero);
@@ -660,9 +660,9 @@ void ymz280b_device::device_reset()
m_ext_mem_address = 0;
/* clear other voice parameters */
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_voice)
{
- struct YMZ280BVoice *voice = &m_voice[i];
+ struct YMZ280BVoice *voice = &elem;
voice->curr_sample = 0;
voice->last_sample = 0;
diff --git a/src/devices/sound/ymz770.cpp b/src/devices/sound/ymz770.cpp
index f5ca4eab23f..6456c346ffd 100644
--- a/src/devices/sound/ymz770.cpp
+++ b/src/devices/sound/ymz770.cpp
@@ -54,11 +54,11 @@ void ymz770_device::device_start()
m_rom_base = region()->base();
m_rom_limit = region()->bytes() * 8;
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_channels)
{
- m_channels[i].is_playing = false;
- m_channels[i].is_seq_playing = false;
- m_channels[i].decoder = new mpeg_audio(m_rom_base, mpeg_audio::AMM, false, 0);
+ elem.is_playing = false;
+ elem.is_seq_playing = false;
+ elem.decoder = new mpeg_audio(m_rom_base, mpeg_audio::AMM, false, 0);
}
// register for save states
@@ -96,19 +96,19 @@ void ymz770_device::device_start()
void ymz770_device::device_reset()
{
- for (int ch = 0; ch < 8; ch++)
+ for (auto & elem : m_channels)
{
- m_channels[ch].phrase = 0;
- m_channels[ch].pan = 8;
- m_channels[ch].volume = 0;
- m_channels[ch].control = 0;
- m_channels[ch].sequence = 0;
- m_channels[ch].seqcontrol = 0;
- m_channels[ch].seqdelay = 0;
- m_channels[ch].is_playing = false;
- m_channels[ch].is_seq_playing = false;
- m_channels[ch].output_remaining = 0;
- m_channels[ch].decoder->clear();
+ elem.phrase = 0;
+ elem.pan = 8;
+ elem.volume = 0;
+ elem.control = 0;
+ elem.sequence = 0;
+ elem.seqcontrol = 0;
+ elem.seqdelay = 0;
+ elem.is_playing = false;
+ elem.is_seq_playing = false;
+ elem.output_remaining = 0;
+ elem.decoder->clear();
}
}
@@ -128,35 +128,35 @@ void ymz770_device::sound_stream_update(sound_stream &stream, stream_sample_t **
for (int i = 0; i < samples; i++)
{
// run sequencers (should probably be in separate timer callbacks)
- for (int ch = 0; ch < 8; ch++)
+ for (auto & elem : m_channels)
{
- if (m_channels[ch].is_seq_playing)
+ if (elem.is_seq_playing)
{
- if (m_channels[ch].seqdelay > 0)
+ if (elem.seqdelay > 0)
{
- m_channels[ch].seqdelay--;
+ elem.seqdelay--;
}
else
{
- int reg = *m_channels[ch].seqdata++;
- UINT8 data = *m_channels[ch].seqdata++;
+ int reg = *elem.seqdata++;
+ UINT8 data = *elem.seqdata++;
switch (reg)
{
case 0x0f:
- if (m_channels[ch].seqcontrol & 1)
+ if (elem.seqcontrol & 1)
{
// loop sequence
- UINT8 sqn = m_channels[ch].sequence;
+ UINT8 sqn = elem.sequence;
UINT32 pptr = m_rom_base[(4*sqn)+1+0x400]<<16 | m_rom_base[(4*sqn)+2+0x400]<<8 | m_rom_base[(4*sqn)+3+0x400];
- m_channels[ch].seqdata = &m_rom_base[pptr];
+ elem.seqdata = &m_rom_base[pptr];
}
else
{
- m_channels[ch].is_seq_playing = false;
+ elem.is_seq_playing = false;
}
break;
case 0x0e:
- m_channels[ch].seqdelay = 32 - 1;
+ elem.seqdelay = 32 - 1;
break;
default:
internal_reg_write(reg, data);
@@ -169,55 +169,55 @@ void ymz770_device::sound_stream_update(sound_stream &stream, stream_sample_t **
// process channels
INT32 mix = 0;
- for (int ch = 0; ch < 8; ch++)
+ for (auto & elem : m_channels)
{
- if (m_channels[ch].output_remaining > 0)
+ if (elem.output_remaining > 0)
{
// force finish current block
- mix += (m_channels[ch].output_data[m_channels[ch].output_ptr++]*m_channels[ch].volume);
- m_channels[ch].output_remaining--;
+ mix += (elem.output_data[elem.output_ptr++]*elem.volume);
+ elem.output_remaining--;
- if (m_channels[ch].output_remaining == 0 && !m_channels[ch].is_playing)
- m_channels[ch].decoder->clear();
+ if (elem.output_remaining == 0 && !elem.is_playing)
+ elem.decoder->clear();
}
- else if (m_channels[ch].is_playing)
+ else if (elem.is_playing)
{
retry:
- if (m_channels[ch].last_block)
+ if (elem.last_block)
{
- if (m_channels[ch].control & 1)
+ if (elem.control & 1)
{
// loop sample
- UINT8 phrase = m_channels[ch].phrase;
- m_channels[ch].atbl = m_rom_base[(4*phrase)+0] >> 4 & 7;
- m_channels[ch].pptr = 8*(m_rom_base[(4*phrase)+1]<<16 | m_rom_base[(4*phrase)+2]<<8 | m_rom_base[(4*phrase)+3]);
+ UINT8 phrase = elem.phrase;
+ elem.atbl = m_rom_base[(4*phrase)+0] >> 4 & 7;
+ elem.pptr = 8*(m_rom_base[(4*phrase)+1]<<16 | m_rom_base[(4*phrase)+2]<<8 | m_rom_base[(4*phrase)+3]);
}
else
{
- m_channels[ch].is_playing = false;
- m_channels[ch].output_remaining = 0;
- m_channels[ch].decoder->clear();
+ elem.is_playing = false;
+ elem.output_remaining = 0;
+ elem.decoder->clear();
}
}
- if (m_channels[ch].is_playing)
+ if (elem.is_playing)
{
// next block
int sample_rate, channel_count;
- if (!m_channels[ch].decoder->decode_buffer(m_channels[ch].pptr, m_rom_limit, m_channels[ch].output_data, m_channels[ch].output_remaining, sample_rate, channel_count) || m_channels[ch].output_remaining == 0)
+ if (!elem.decoder->decode_buffer(elem.pptr, m_rom_limit, elem.output_data, elem.output_remaining, sample_rate, channel_count) || elem.output_remaining == 0)
{
- m_channels[ch].is_playing = !m_channels[ch].last_block; // detect infinite retry loop
- m_channels[ch].last_block = true;
- m_channels[ch].output_remaining = 0;
+ elem.is_playing = !elem.last_block; // detect infinite retry loop
+ elem.last_block = true;
+ elem.output_remaining = 0;
goto retry;
}
- m_channels[ch].last_block = m_channels[ch].output_remaining < 1152;
- m_channels[ch].output_remaining--;
- m_channels[ch].output_ptr = 1;
+ elem.last_block = elem.output_remaining < 1152;
+ elem.output_remaining--;
+ elem.output_ptr = 1;
- mix += (m_channels[ch].output_data[0]*m_channels[ch].volume);
+ mix += (elem.output_data[0]*elem.volume);
}
}
}
diff --git a/src/devices/sound/zsg2.cpp b/src/devices/sound/zsg2.cpp
index 4f3f1a42ca9..f7f7f53ae16 100644
--- a/src/devices/sound/zsg2.cpp
+++ b/src/devices/sound/zsg2.cpp
@@ -206,33 +206,33 @@ void zsg2_device::sound_stream_update(sound_stream &stream, stream_sample_t **in
INT32 mix_r = 0;
// loop over all channels
- for (int ch = 0; ch < 48; ch++)
+ for (auto & elem : m_chan)
{
- if (!m_chan[ch].is_playing)
+ if (!elem.is_playing)
continue;
- m_chan[ch].step_ptr += m_chan[ch].step;
- if (m_chan[ch].step_ptr & 0x10000)
+ elem.step_ptr += elem.step;
+ if (elem.step_ptr & 0x10000)
{
- m_chan[ch].step_ptr &= 0xffff;
- if (++m_chan[ch].cur_pos >= m_chan[ch].end_pos)
+ elem.step_ptr &= 0xffff;
+ if (++elem.cur_pos >= elem.end_pos)
{
// loop sample
- m_chan[ch].cur_pos = m_chan[ch].loop_pos;
- if ((m_chan[ch].cur_pos + 1) >= m_chan[ch].end_pos)
+ elem.cur_pos = elem.loop_pos;
+ if ((elem.cur_pos + 1) >= elem.end_pos)
{
// end of sample
- m_chan[ch].is_playing = false;
+ elem.is_playing = false;
continue;
}
}
- m_chan[ch].samples = prepare_samples(m_chan[ch].page | m_chan[ch].cur_pos);
+ elem.samples = prepare_samples(elem.page | elem.cur_pos);
}
- INT32 sample = (m_chan[ch].samples[m_chan[ch].step_ptr >> 14 & 3] * m_chan[ch].vol) >> 16;
+ INT32 sample = (elem.samples[elem.step_ptr >> 14 & 3] * elem.vol) >> 16;
- mix_l += (sample * m_chan[ch].panl + sample * (0x1f - m_chan[ch].panr)) >> 5;
- mix_r += (sample * m_chan[ch].panr + sample * (0x1f - m_chan[ch].panl)) >> 5;
+ mix_l += (sample * elem.panl + sample * (0x1f - elem.panr)) >> 5;
+ mix_r += (sample * elem.panr + sample * (0x1f - elem.panl)) >> 5;
}
outputs[0][i] = mix_l;
diff --git a/src/devices/video/315_5124.cpp b/src/devices/video/315_5124.cpp
index 27508e79e52..399f48e9b26 100644
--- a/src/devices/video/315_5124.cpp
+++ b/src/devices/video/315_5124.cpp
@@ -170,7 +170,7 @@ sega315_5124_device::sega315_5124_device(const machine_config &mconfig, const ch
, m_is_pal(false)
, m_int_cb(*this)
, m_pause_cb(*this)
- , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(sega315_5124))
+ , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, nullptr, *ADDRESS_MAP_NAME(sega315_5124))
, m_palette(*this, "palette")
{
}
@@ -186,7 +186,7 @@ sega315_5124_device::sega315_5124_device(const machine_config &mconfig, device_t
, m_is_pal(false)
, m_int_cb(*this)
, m_pause_cb(*this)
- , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(sega315_5124))
+ , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, nullptr, *ADDRESS_MAP_NAME(sega315_5124))
, m_palette(*this, "palette")
{
}
diff --git a/src/devices/video/315_5124.h b/src/devices/video/315_5124.h
index a28e61a5e5a..49c4d896e1e 100644
--- a/src/devices/video/315_5124.h
+++ b/src/devices/video/315_5124.h
@@ -114,7 +114,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
virtual machine_config_constructor device_mconfig_additions() const;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_0) ? &m_space_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_0) ? &m_space_config : nullptr; }
void vdp_postload();
diff --git a/src/devices/video/bufsprite.h b/src/devices/video/bufsprite.h
index 86fb699085a..00153ff152a 100644
--- a/src/devices/video/bufsprite.h
+++ b/src/devices/video/bufsprite.h
@@ -65,8 +65,8 @@ public:
// operations
_Type *copy(UINT32 srcoffset = 0, UINT32 srclength = 0x7fffffff)
{
- assert(m_spriteram != NULL);
- if (m_spriteram != NULL)
+ assert(m_spriteram != nullptr);
+ if (m_spriteram != nullptr)
memcpy(&m_buffered[0], m_spriteram + srcoffset, MIN(srclength, m_spriteram.bytes() / sizeof(_Type) - srcoffset) * sizeof(_Type));
return &m_buffered[0];
}
@@ -82,7 +82,7 @@ protected:
// first-time setup
virtual void device_start()
{
- if (m_spriteram != NULL)
+ if (m_spriteram != nullptr)
{
m_buffered.resize(m_spriteram.bytes() / sizeof(_Type));
save_item(NAME(m_buffered));
diff --git a/src/devices/video/crt9007.cpp b/src/devices/video/crt9007.cpp
index a5722fbd3bf..84ec673ec8b 100644
--- a/src/devices/video/crt9007.cpp
+++ b/src/devices/video/crt9007.cpp
@@ -453,7 +453,7 @@ crt9007_t::crt9007_t(const machine_config &mconfig, const char *tag, device_t *o
device_t(mconfig, CRT9007, "SMC CRT9007", tag, owner, clock, "crt9007", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(crt9007)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, nullptr, *ADDRESS_MAP_NAME(crt9007)),
m_write_int(*this),
m_write_dmar(*this),
m_write_hs(*this),
@@ -466,8 +466,8 @@ crt9007_t::crt9007_t(const machine_config &mconfig, const char *tag, device_t *o
m_write_slg(*this),
m_write_sld(*this)
{
- for (int i = 0; i < 0x3d; i++)
- m_reg[i] = 0;
+ for (auto & elem : m_reg)
+ elem = 0;
}
@@ -658,7 +658,7 @@ void crt9007_t::device_timer(emu_timer &timer, device_timer_id id, int param, vo
const address_space_config *crt9007_t::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/crtc_ega.cpp b/src/devices/video/crtc_ega.cpp
index c8c4c212f72..0841adcc69a 100644
--- a/src/devices/video/crtc_ega.cpp
+++ b/src/devices/video/crtc_ega.cpp
@@ -192,7 +192,7 @@ void crtc_ega_device::recompute_parameters(bool postload)
if (LOG) logerror("CRTC_EGA config screen: HTOTAL: 0x%x VTOTAL: 0x%x MAX_X: 0x%x MAX_Y: 0x%x HSYNC: 0x%x-0x%x VSYNC: 0x%x-0x%x Freq: %ffps\n",
horiz_pix_total, vert_pix_total, max_visible_x, max_visible_y, hsync_on_pos, hsync_off_pos - 1, vsync_on_pos, vsync_off_pos - 1, 1 / ATTOSECONDS_TO_DOUBLE(refresh));
- if ( m_screen != NULL )
+ if ( m_screen != nullptr )
m_screen->configure(horiz_pix_total, vert_pix_total, visarea, refresh);
m_has_valid_parameters = true;
@@ -346,7 +346,7 @@ void crtc_ega_device::handle_line_timer()
/* also update the cursor state now */
update_cursor_state();
- if (m_screen != NULL)
+ if (m_screen != nullptr)
m_screen->reset_origin();
}
diff --git a/src/devices/video/ef9345.cpp b/src/devices/video/ef9345.cpp
index 921611d695f..a46e32a34b7 100644
--- a/src/devices/video/ef9345.cpp
+++ b/src/devices/video/ef9345.cpp
@@ -39,7 +39,7 @@ ADDRESS_MAP_END
const address_space_config *ef9345_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
//**************************************************************************
@@ -100,7 +100,7 @@ ef9345_device::ef9345_device(const machine_config &mconfig, const char *tag, dev
device_t(mconfig, EF9345, "EF9345", tag, owner, clock, "ef9345", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(ef9345)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(ef9345)),
m_palette(*this)
{
}
diff --git a/src/devices/video/epic12.cpp b/src/devices/video/epic12.cpp
index 3fe0be1e0f7..fa9c8522198 100644
--- a/src/devices/video/epic12.cpp
+++ b/src/devices/video/epic12.cpp
@@ -16,8 +16,8 @@ epic12_device::epic12_device(const machine_config &mconfig, const char *tag, dev
{
m_is_unsafe = 0;
m_delay_scale = 0;
- m_blitter_request = 0;
- m_blitter_delay_timer = 0;
+ m_blitter_request = nullptr;
+ m_blitter_delay_timer = nullptr;
m_blitter_busy = 0;
m_gfx_addr = 0;
m_gfx_scroll_0_x = 0;
@@ -658,7 +658,7 @@ void *epic12_device::blit_request_callback(void *param, int threadid)
epic12_device *object = reinterpret_cast<epic12_device *>(param);
object->gfx_exec();
- return NULL;
+ return nullptr;
}
@@ -669,7 +669,7 @@ void *epic12_device::blit_request_callback_unsafe(void *param, int threadid)
epic12_device_blit_delay = 0;
object->gfx_exec_unsafe();
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/video/fixfreq.cpp b/src/devices/video/fixfreq.cpp
index 3f3b35bc372..355150ccfb6 100644
--- a/src/devices/video/fixfreq.cpp
+++ b/src/devices/video/fixfreq.cpp
@@ -97,8 +97,8 @@ void fixedfreq_device::device_start()
m_sig_composite = 0;
m_sig_field = 0;
- m_bitmap[0] = NULL;
- m_bitmap[1] = NULL;
+ m_bitmap[0] = nullptr;
+ m_bitmap[1] = nullptr;
//m_vblank_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vga_device::vblank_timer_cb),this));
recompute_parameters(false);
@@ -148,9 +148,9 @@ void fixedfreq_device::recompute_parameters(bool postload)
{
bool needs_realloc = (m_htotal != m_hbackporch) && (m_vtotal != m_vbackporch);
- if (m_bitmap[0] != NULL || needs_realloc)
+ if (m_bitmap[0] != nullptr || needs_realloc)
auto_free(machine(), m_bitmap[0]);
- if (m_bitmap[1] != NULL || needs_realloc)
+ if (m_bitmap[1] != nullptr || needs_realloc)
auto_free(machine(), m_bitmap[0]);
m_htotal = m_hbackporch;
diff --git a/src/devices/video/h63484.cpp b/src/devices/video/h63484.cpp
index 04c123b90c9..75b8f881eb0 100644
--- a/src/devices/video/h63484.cpp
+++ b/src/devices/video/h63484.cpp
@@ -45,7 +45,7 @@ h63484_device::h63484_device(const machine_config &mconfig, const char *tag, dev
m_cl0(0),
m_cl1(0), m_ccmp(0), m_mask(0), m_cpx(0),
m_dcr(0),
- m_space_config("videoram", ENDIANNESS_BIG, 16, 20, -1, NULL, *ADDRESS_MAP_NAME(h63484_vram))
+ m_space_config("videoram", ENDIANNESS_BIG, 16, 20, -1, nullptr, *ADDRESS_MAP_NAME(h63484_vram))
{
}
@@ -349,7 +349,7 @@ ROM_END
const address_space_config *h63484_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/hd44780.cpp b/src/devices/video/hd44780.cpp
index b21dc2e04e1..c54adc6538f 100644
--- a/src/devices/video/hd44780.cpp
+++ b/src/devices/video/hd44780.cpp
@@ -47,14 +47,14 @@ ROM_END
hd44780_device::hd44780_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, HD44780, "HD44780 A00", tag, owner, clock, "hd44780_a00", __FILE__),
- m_pixel_update_func(NULL)
+ m_pixel_update_func(nullptr)
{
set_charset_type(CHARSET_HD44780_A00);
}
hd44780_device::hd44780_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),
- m_pixel_update_func(NULL)
+ m_pixel_update_func(nullptr)
{
}
@@ -77,7 +77,7 @@ const rom_entry *hd44780_device::device_rom_region() const
case CHARSET_KS0066_F05: return ROM_NAME( ks0066_f05 );
}
- return NULL;
+ return nullptr;
}
//-------------------------------------------------
@@ -235,7 +235,7 @@ void hd44780_device::update_nibble(int rs, int rw)
inline void hd44780_device::pixel_update(bitmap_ind16 &bitmap, UINT8 line, UINT8 pos, UINT8 y, UINT8 x, int state)
{
- if (m_pixel_update_func != NULL)
+ if (m_pixel_update_func != nullptr)
{
m_pixel_update_func(*this, bitmap, line, pos, y, x, state);
}
diff --git a/src/devices/video/hd61830.cpp b/src/devices/video/hd61830.cpp
index a9a21e7dbc5..da996128773 100644
--- a/src/devices/video/hd61830.cpp
+++ b/src/devices/video/hd61830.cpp
@@ -104,7 +104,7 @@ hd61830_device::hd61830_device(const machine_config &mconfig, const char *tag, d
m_cac(0),
m_blink(0),
m_cursor(0),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(hd61830)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(hd61830)),
m_char_rom(*this, "hd61830")
{
}
@@ -171,7 +171,7 @@ void hd61830_device::device_timer(emu_timer &timer, device_timer_id id, int para
const address_space_config *hd61830_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/hd63484.cpp b/src/devices/video/hd63484.cpp
index cdfddbcb23d..d23081564a6 100644
--- a/src/devices/video/hd63484.cpp
+++ b/src/devices/video/hd63484.cpp
@@ -29,7 +29,7 @@ const device_type HD63484 = &device_creator<hd63484_device>;
hd63484_device::hd63484_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HD63484, "HD63484 CRTC", tag, owner, clock, "hd63484", __FILE__),
- m_ram(NULL),
+ m_ram(nullptr),
m_fifo_counter(0),
m_readfifo(0),
m_org(0),
diff --git a/src/devices/video/hd66421.cpp b/src/devices/video/hd66421.cpp
index af67be24d78..513b028336f 100644
--- a/src/devices/video/hd66421.cpp
+++ b/src/devices/video/hd66421.cpp
@@ -80,7 +80,7 @@ ADDRESS_MAP_END
const address_space_config *hd66421_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
@@ -119,15 +119,15 @@ inline void hd66421_device::writebyte(offs_t address, UINT8 data)
hd66421_device::hd66421_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, HD66421, "Hitachi HD66421 LCD Controller", tag, owner, clock, "hd66421", __FILE__),
device_memory_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, NULL, *ADDRESS_MAP_NAME(hd66421)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, nullptr, *ADDRESS_MAP_NAME(hd66421)),
m_cmd(0),
m_x(0),
m_y(0),
m_palette(*this, "palette")
{
- for (int i = 0; i < 32; i++)
+ for (auto & elem : m_reg)
{
- m_reg[i] = 0;
+ elem = 0;
}
}
diff --git a/src/devices/video/huc6261.cpp b/src/devices/video/huc6261.cpp
index abdb14fa327..295f8d8abf9 100644
--- a/src/devices/video/huc6261.cpp
+++ b/src/devices/video/huc6261.cpp
@@ -391,8 +391,8 @@ WRITE16_MEMBER( huc6261_device::write )
void huc6261_device::device_start()
{
/* Make sure we are supplied all our mandatory tags */
- assert( m_huc6270_a_tag != NULL );
- assert( m_huc6270_b_tag != NULL );
+ assert( m_huc6270_a_tag != nullptr );
+ assert( m_huc6270_b_tag != nullptr );
m_timer = timer_alloc();
m_huc6270_a = machine().device<huc6270_device>(m_huc6270_a_tag);
@@ -401,8 +401,8 @@ void huc6261_device::device_start()
m_bmp = auto_bitmap_rgb32_alloc( machine(), HUC6261_WPF, HUC6261_LPF );
/* We want to have valid devices */
- assert( m_huc6270_a != NULL );
- assert( m_huc6270_b != NULL );
+ assert( m_huc6270_a != nullptr );
+ assert( m_huc6270_b != nullptr );
save_item(NAME(m_last_h));
save_item(NAME(m_last_v));
diff --git a/src/devices/video/huc6272.cpp b/src/devices/video/huc6272.cpp
index 849ec9f09d6..f76dd257d7f 100644
--- a/src/devices/video/huc6272.cpp
+++ b/src/devices/video/huc6272.cpp
@@ -31,7 +31,7 @@ ADDRESS_MAP_END
const address_space_config *huc6272_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
//**************************************************************************
@@ -68,7 +68,7 @@ inline void huc6272_device::write_dword(offs_t address, UINT32 data)
huc6272_device::huc6272_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, huc6272, "huc6272", tag, owner, clock, "huc6272", __FILE__),
device_memory_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 32, 32, 0, NULL, *ADDRESS_MAP_NAME(huc6272_vram))
+ m_space_config("videoram", ENDIANNESS_LITTLE, 32, 32, 0, nullptr, *ADDRESS_MAP_NAME(huc6272_vram))
{
}
diff --git a/src/devices/video/i82730.cpp b/src/devices/video/i82730.cpp
index d90a79d04ee..84bed542f24 100644
--- a/src/devices/video/i82730.cpp
+++ b/src/devices/video/i82730.cpp
@@ -55,8 +55,8 @@ i82730_device::i82730_device(const machine_config &mconfig, const char *tag, dev
device_t(mconfig, I82730, "I82730", tag, owner, clock, "i82730", __FILE__),
device_video_interface(mconfig, *this),
m_sint_handler(*this),
- m_cpu_tag(NULL), m_program(NULL),
- m_row_timer(NULL),
+ m_cpu_tag(nullptr), m_program(nullptr),
+ m_row_timer(nullptr),
m_initialized(false), m_mode_set(false),
m_ca(0),
m_sysbus(0x00), m_ibp(0x0000), m_cbp(0x0000), m_intmask(0xffff), m_status(0x0000),
diff --git a/src/devices/video/m50458.cpp b/src/devices/video/m50458.cpp
index 1db8b57aaf0..e2121cf565d 100644
--- a/src/devices/video/m50458.cpp
+++ b/src/devices/video/m50458.cpp
@@ -138,7 +138,7 @@ const rom_entry *m50458_device::device_rom_region() const
const address_space_config *m50458_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
//**************************************************************************
@@ -176,7 +176,7 @@ m50458_device::m50458_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, M50458, "M50458 OSD", tag, owner, clock, "m50458", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, NULL, *ADDRESS_MAP_NAME(m50458_vram))
+ m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, nullptr, *ADDRESS_MAP_NAME(m50458_vram))
{
}
diff --git a/src/devices/video/mb90082.cpp b/src/devices/video/mb90082.cpp
index cefa4e60415..b65590b6db8 100644
--- a/src/devices/video/mb90082.cpp
+++ b/src/devices/video/mb90082.cpp
@@ -52,7 +52,7 @@ const rom_entry *mb90082_device::device_rom_region() const
const address_space_config *mb90082_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
//**************************************************************************
@@ -88,7 +88,7 @@ inline void mb90082_device::write_word(offs_t address, UINT16 data)
mb90082_device::mb90082_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MB90082, "MB90082 OSD", tag, owner, clock, "mb90082", __FILE__),
device_memory_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, NULL, *ADDRESS_MAP_NAME(mb90082_vram))
+ m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, nullptr, *ADDRESS_MAP_NAME(mb90082_vram))
{
}
diff --git a/src/devices/video/mb_vcu.cpp b/src/devices/video/mb_vcu.cpp
index 0ad568976f8..8ee9e835ddc 100644
--- a/src/devices/video/mb_vcu.cpp
+++ b/src/devices/video/mb_vcu.cpp
@@ -97,7 +97,7 @@ const address_space_config *mb_vcu_device::memory_space_config(address_spacenum
{
case AS_0: return &m_videoram_space_config;
case AS_1: return &m_paletteram_space_config;
- default: return NULL;
+ default: return nullptr;
}
}
@@ -154,8 +154,8 @@ mb_vcu_device::mb_vcu_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, MB_VCU, "Mazer Blazer custom VCU", tag, owner, clock, "mb_vcu", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 19, 0, NULL, *ADDRESS_MAP_NAME(mb_vcu_vram)),
- m_paletteram_space_config("palram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(mb_vcu_pal_ram)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 19, 0, nullptr, *ADDRESS_MAP_NAME(mb_vcu_vram)),
+ m_paletteram_space_config("palram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(mb_vcu_pal_ram)),
m_cpu(*this),
m_palette(*this)
{
diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp
index d504ad46b8b..827854b0824 100644
--- a/src/devices/video/mc6845.cpp
+++ b/src/devices/video/mc6845.cpp
@@ -534,7 +534,7 @@ void mc6845_device::recompute_parameters(bool postload)
if (LOG) logerror("M6845 config screen: HTOTAL: 0x%x VTOTAL: 0x%x MAX_X: 0x%x MAX_Y: 0x%x HSYNC: 0x%x-0x%x VSYNC: 0x%x-0x%x Freq: %ffps\n",
horiz_pix_total, vert_pix_total, max_visible_x, max_visible_y, hsync_on_pos, hsync_off_pos - 1, vsync_on_pos, vsync_off_pos - 1, 1 / ATTOSECONDS_TO_DOUBLE(refresh));
- if ( m_screen != NULL )
+ if ( m_screen != nullptr )
m_screen->configure(horiz_pix_total, vert_pix_total, visarea, refresh);
if(!m_reconfigure_cb.isnull())
@@ -704,7 +704,7 @@ void mc6845_device::handle_line_timer()
/* also update the cursor state now */
update_cursor_state();
- if (m_screen != NULL)
+ if (m_screen != nullptr)
m_screen->reset_origin();
}
else
@@ -1385,7 +1385,7 @@ const address_space_config *mos8563_device::memory_space_config(address_spacenum
switch (spacenum)
{
case AS_0: return &m_videoram_space_config;
- default: return NULL;
+ default: return nullptr;
}
}
@@ -1457,7 +1457,7 @@ ams40489_device::ams40489_device(const machine_config &mconfig, const char *tag,
mos8563_device::mos8563_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)
: mc6845_device(mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(mos8563_videoram_map)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(mos8563_videoram_map)),
m_palette(*this, "palette")
{
set_clock_scale(1.0/8);
@@ -1467,7 +1467,7 @@ mos8563_device::mos8563_device(const machine_config &mconfig, device_type type,
mos8563_device::mos8563_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: mc6845_device(mconfig, MOS8563, "MOS8563", tag, owner, clock, "mos8563", __FILE__),
device_memory_interface(mconfig, *this),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(mos8563_videoram_map)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(mos8563_videoram_map)),
m_palette(*this, "palette")
{
set_clock_scale(1.0/8);
diff --git a/src/devices/video/mc6847.cpp b/src/devices/video/mc6847.cpp
index 76c0dcb4c92..ec072c6e206 100644
--- a/src/devices/video/mc6847.cpp
+++ b/src/devices/video/mc6847.cpp
@@ -1634,7 +1634,7 @@ ioport_constructor mc6847_base_device::device_input_ports() const
mc6847_base_device::artifacter::artifacter()
{
- m_config = NULL;
+ m_config = nullptr;
m_artifacting = 0;
m_saved_artifacting = 0;
m_saved_c0 = 0;
@@ -1853,7 +1853,7 @@ s68047_device::s68047_device(const machine_config &mconfig, const char *tag, dev
//
void s68047_device::hack_black_becomes_blue(bool flag)
{
- set_custom_palette( flag ? s_s68047_hack_palette : NULL );
+ set_custom_palette( flag ? s_s68047_hack_palette : nullptr );
}
const UINT32 s68047_device::s_s68047_hack_palette[16] =
diff --git a/src/devices/video/mc6847.h b/src/devices/video/mc6847.h
index d3420a7fcba..d25efeee86b 100644
--- a/src/devices/video/mc6847.h
+++ b/src/devices/video/mc6847.h
@@ -210,7 +210,7 @@ protected:
// artifacting config
void setup_config(device_t *device);
- void poll_config(void) { m_artifacting = (m_config!=NULL) ? m_config->read() : 0; }
+ void poll_config(void) { m_artifacting = (m_config!=nullptr) ? m_config->read() : 0; }
// artifacting application
template<int xscale>
diff --git a/src/devices/video/mos6566.cpp b/src/devices/video/mos6566.cpp
index f7888869c25..d39e8cb041a 100644
--- a/src/devices/video/mos6566.cpp
+++ b/src/devices/video/mos6566.cpp
@@ -248,7 +248,7 @@ const address_space_config *mos6566_device::memory_space_config(address_spacenum
{
case AS_0: return &m_videoram_space_config;
case AS_1: return &m_colorram_space_config;
- default: return NULL;
+ default: return nullptr;
}
}
@@ -585,8 +585,8 @@ mos6566_device::mos6566_device(const machine_config &mconfig, const char *tag, d
device_execute_interface(mconfig, *this),
m_icount(0),
m_variant(TYPE_6566),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(mos6566_videoram_map)),
- m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, NULL, *ADDRESS_MAP_NAME(mos6566_colorram_map)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, nullptr, *ADDRESS_MAP_NAME(mos6566_videoram_map)),
+ m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, nullptr, *ADDRESS_MAP_NAME(mos6566_colorram_map)),
m_write_irq(*this),
m_write_ba(*this),
m_write_aec(*this),
@@ -602,8 +602,8 @@ mos6566_device::mos6566_device(const machine_config &mconfig, device_type type,
device_execute_interface(mconfig, *this),
m_icount(0),
m_variant(variant),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(mos6566_videoram_map)),
- m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, NULL, *ADDRESS_MAP_NAME(mos6566_colorram_map)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, nullptr, *ADDRESS_MAP_NAME(mos6566_videoram_map)),
+ m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, nullptr, *ADDRESS_MAP_NAME(mos6566_colorram_map)),
m_write_irq(*this),
m_write_ba(*this),
m_write_aec(*this),
@@ -773,8 +773,8 @@ void mos6566_device::device_reset()
{
memset(m_reg, 0, sizeof(m_reg));
- for (int i = 0; i < ARRAY_LENGTH(m_mc); i++)
- m_mc[i] = 63;
+ for (auto & elem : m_mc)
+ elem = 63;
// from 0 to 311 (0 first, PAL) or from 0 to 261 (? first, NTSC 6567R56A) or from 0 to 262 (? first, NTSC 6567R8)
m_rasterline = 0; // VIC2_LINES - 1;
diff --git a/src/devices/video/msm6222b.cpp b/src/devices/video/msm6222b.cpp
index a8e0d41c673..4287916ce1d 100644
--- a/src/devices/video/msm6222b.cpp
+++ b/src/devices/video/msm6222b.cpp
@@ -48,7 +48,7 @@ void msm6222b_device::device_start()
else if(m_region)
cgrom = m_region->base();
else
- cgrom = NULL;
+ cgrom = nullptr;
memset(cgram, 0, sizeof(cgram));
memset(ddram, 0x20, sizeof(ddram));
diff --git a/src/devices/video/msm6255.cpp b/src/devices/video/msm6255.cpp
index 36fd36325d1..6ae565cce9f 100644
--- a/src/devices/video/msm6255.cpp
+++ b/src/devices/video/msm6255.cpp
@@ -78,7 +78,7 @@ msm6255_device::msm6255_device(const machine_config &mconfig, const char *tag, d
device_t(mconfig, MSM6255, "MSM6255", tag, owner, clock, "msm6255", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 20, 0, NULL, *ADDRESS_MAP_NAME(msm6255)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 20, 0, nullptr, *ADDRESS_MAP_NAME(msm6255)),
m_cursor(0)
{
}
@@ -123,7 +123,7 @@ void msm6255_device::device_reset()
const address_space_config *msm6255_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/pc_vga.cpp b/src/devices/video/pc_vga.cpp
index c494e4904ec..fa8131e5b88 100644
--- a/src/devices/video/pc_vga.cpp
+++ b/src/devices/video/pc_vga.cpp
@@ -5235,7 +5235,7 @@ WRITE8_MEMBER(ati_vga_device::ati_port_ext_w)
if(data & 0x04)
{
eeprom_serial_93cxx_device* eep = subdevice<eeprom_serial_93cxx_device>("ati_eeprom");
- if(eep != NULL)
+ if(eep != nullptr)
{
eep->di_write((data & 0x01) ? ASSERT_LINE : CLEAR_LINE);
eep->clk_write((data & 0x02) ? ASSERT_LINE : CLEAR_LINE);
diff --git a/src/devices/video/poly.h b/src/devices/video/poly.h
index 058a6c793a2..e0dfa972659 100644
--- a/src/devices/video/poly.h
+++ b/src/devices/video/poly.h
@@ -128,7 +128,7 @@ public:
// getters
running_machine &machine() const { return m_machine; }
- screen_device &screen() const { assert(m_screen != NULL); return *m_screen; }
+ screen_device &screen() const { assert(m_screen != nullptr); return *m_screen; }
// synchronization
void wait(const char *debug_reason = "general");
@@ -288,8 +288,8 @@ private:
template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(running_machine &machine, UINT8 flags)
: m_machine(machine),
- m_screen(NULL),
- m_queue(NULL),
+ m_screen(nullptr),
+ m_queue(nullptr),
m_polygon(machine, *this),
m_object(machine, *this),
m_unit(machine, *this),
@@ -316,7 +316,7 @@ template<typename _BaseType, class _ObjectData, int _MaxParams, int _MaxPolys>
poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::poly_manager(screen_device &screen, UINT8 flags)
: m_machine(screen.machine()),
m_screen(&screen),
- m_queue(NULL),
+ m_queue(nullptr),
m_polygon(screen.machine(), *this),
m_object(screen.machine(), *this),
m_unit(screen.machine(), *this),
@@ -372,7 +372,7 @@ poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::~poly_manager()
#endif
// free the work queue
- if (m_queue != NULL)
+ if (m_queue != nullptr)
osd_work_queue_free(m_queue);
}
@@ -435,7 +435,7 @@ void *poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::work_item_cal
break;
param = &polygon.m_owner->m_unit[orig_count_next];
}
- return NULL;
+ return nullptr;
}
@@ -453,7 +453,7 @@ void poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::wait(const cha
time = get_profile_ticks();
// wait for all pending work items to complete
- if (m_queue != NULL)
+ if (m_queue != nullptr)
osd_work_queue_wait(m_queue, osd_ticks_per_second() * 100);
// if we don't have a queue, just run the whole list now
@@ -794,7 +794,7 @@ UINT32 poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::render_trian
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
@@ -808,7 +808,7 @@ UINT32 poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::render_trian
}
// enqueue the work items
- if (m_queue != NULL)
+ if (m_queue != nullptr)
osd_work_item_queue_multiple(m_queue, work_item_callback, m_unit.count() - startunit, &m_unit[startunit], m_unit.itemsize(), WORK_ITEM_FLAG_AUTO_RELEASE);
// return the total number of pixels in the triangle
@@ -924,7 +924,7 @@ UINT32 poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::render_trian
}
// enqueue the work items
- if (m_queue != NULL)
+ if (m_queue != nullptr)
osd_work_item_queue_multiple(m_queue, work_item_callback, m_unit.count() - startunit, &m_unit[startunit], m_unit.itemsize(), WORK_ITEM_FLAG_AUTO_RELEASE);
// return the total number of pixels in the object
@@ -1117,13 +1117,13 @@ UINT32 poly_manager<_BaseType, _ObjectData, _MaxParams, _MaxPolys>::render_polyg
istartx = istopx = 0;
extent.startx = istartx;
extent.stopx = istopx;
- extent.userdata = NULL;
+ extent.userdata = nullptr;
pixels += istopx - istartx;
}
}
// enqueue the work items
- if (m_queue != NULL)
+ if (m_queue != nullptr)
osd_work_item_queue_multiple(m_queue, work_item_callback, m_unit.count() - startunit, &m_unit[startunit], m_unit.itemsize(), WORK_ITEM_FLAG_AUTO_RELEASE);
// return the total number of pixels in the triangle
diff --git a/src/devices/video/polylgcy.cpp b/src/devices/video/polylgcy.cpp
index 84b35a5b768..d88a68c86d1 100644
--- a/src/devices/video/polylgcy.cpp
+++ b/src/devices/video/polylgcy.cpp
@@ -374,7 +374,7 @@ void poly_free(legacy_poly_manager *poly)
#endif
/* free the work queue */
- if (poly->queue != NULL)
+ if (poly->queue != nullptr)
osd_work_queue_free(poly->queue);
}
@@ -398,7 +398,7 @@ void poly_wait(legacy_poly_manager *poly, const char *debug_reason)
time = get_profile_ticks();
/* wait for all pending work items to complete */
- if (poly->queue != NULL)
+ if (poly->queue != nullptr)
osd_work_queue_wait(poly->queue, osd_ticks_per_second() * 100);
/* if we don't have a queue, just run the whole list now */
@@ -630,7 +630,7 @@ UINT32 poly_render_triangle(legacy_poly_manager *poly, void *dest, const rectang
}
/* enqueue the work items */
- if (poly->queue != NULL)
+ if (poly->queue != nullptr)
osd_work_item_queue_multiple(poly->queue, poly_item_callback, poly->unit_next - startunit, poly->unit[startunit], poly->unit_size, WORK_ITEM_FLAG_AUTO_RELEASE);
/* return the total number of pixels in the triangle */
@@ -738,7 +738,7 @@ UINT32 poly_render_triangle_custom(legacy_poly_manager *poly, void *dest, const
#endif
/* enqueue the work items */
- if (poly->queue != NULL)
+ if (poly->queue != nullptr)
osd_work_item_queue_multiple(poly->queue, poly_item_callback, poly->unit_next - startunit, poly->unit[startunit], poly->unit_size, WORK_ITEM_FLAG_AUTO_RELEASE);
/* return the total number of pixels in the object */
@@ -963,7 +963,7 @@ UINT32 poly_render_quad(legacy_poly_manager *poly, void *dest, const rectangle &
#endif
/* enqueue the work items */
- if (poly->queue != NULL)
+ if (poly->queue != nullptr)
osd_work_item_queue_multiple(poly->queue, poly_item_callback, poly->unit_next - startunit, poly->unit[startunit], poly->unit_size, WORK_ITEM_FLAG_AUTO_RELEASE);
/* return the total number of pixels in the triangle */
@@ -1195,7 +1195,7 @@ UINT32 poly_render_polygon(legacy_poly_manager *poly, void *dest, const rectangl
#endif
/* enqueue the work items */
- if (poly->queue != NULL)
+ if (poly->queue != nullptr)
osd_work_item_queue_multiple(poly->queue, poly_item_callback, poly->unit_next - startunit, poly->unit[startunit], poly->unit_size, WORK_ITEM_FLAG_AUTO_RELEASE);
/* return the total number of pixels in the triangle */
@@ -1258,7 +1258,7 @@ static void **allocate_array(running_machine &machine, size_t *itemsize, UINT32
/* fail if 0 */
if (itemcount == 0)
- return NULL;
+ return nullptr;
/* round to a cache line boundary */
*itemsize = ((*itemsize + CACHE_LINE_SIZE - 1) / CACHE_LINE_SIZE) * CACHE_LINE_SIZE;
@@ -1344,7 +1344,7 @@ static void *poly_item_callback(void *param, int threadid)
break;
param = polygon->poly->unit[orig_count_next];
}
- return NULL;
+ return nullptr;
}
diff --git a/src/devices/video/psx.cpp b/src/devices/video/psx.cpp
index 24af56ee05b..4c6efbdf355 100644
--- a/src/devices/video/psx.cpp
+++ b/src/devices/video/psx.cpp
@@ -568,7 +568,7 @@ void psxgpu_device::psx_gpu_init( int n_gputype )
}
// icky!!!
- machine().save().save_memory( this, "globals", NULL, 0, "m_packet", (UINT8 *)&m_packet, 1, sizeof( m_packet ) );
+ machine().save().save_memory( this, "globals", nullptr, 0, "m_packet", (UINT8 *)&m_packet, 1, sizeof( m_packet ) );
save_pointer(NAME(p_vram), width * height );
save_item(NAME(n_gpu_buffer_offset));
@@ -752,7 +752,7 @@ UINT32 psxgpu_device::update_screen(screen_device &screen, bitmap_ind16 &bitmap,
n_line = n_lines;
while( n_line > 0 )
{
- draw_scanline16( bitmap, n_x + n_left, n_y + n_top, n_columns, p_p_vram[ ( n_y + n_displaystarty ) & 1023 ] + n_x + n_displaystartx, NULL );
+ draw_scanline16( bitmap, n_x + n_left, n_y + n_top, n_columns, p_p_vram[ ( n_y + n_displaystarty ) & 1023 ] + n_x + n_displaystartx, nullptr );
n_y++;
n_line--;
}
diff --git a/src/devices/video/ramdac.cpp b/src/devices/video/ramdac.cpp
index f9794e60081..1cda8c4b658 100644
--- a/src/devices/video/ramdac.cpp
+++ b/src/devices/video/ramdac.cpp
@@ -43,7 +43,7 @@ const device_type RAMDAC = &device_creator<ramdac_device>;
ramdac_device::ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, RAMDAC, "RAMDAC", tag, owner, clock, "ramdac", __FILE__),
device_memory_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 10, 0, NULL, *ADDRESS_MAP_NAME(ramdac_palram)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 10, 0, nullptr, *ADDRESS_MAP_NAME(ramdac_palram)),
m_palette(*this),
m_split_read_reg(0)
{
@@ -66,7 +66,7 @@ void ramdac_device::static_set_palette_tag(device_t &device, const char *tag)
const address_space_config *ramdac_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/scn2674.cpp b/src/devices/video/scn2674.cpp
index 9198fb28984..d653b8aef1c 100644
--- a/src/devices/video/scn2674.cpp
+++ b/src/devices/video/scn2674.cpp
@@ -30,7 +30,7 @@ scn2674_device::scn2674_device(const machine_config &mconfig, const char *tag, d
m_IR11_display_pointer_address_upper(0), m_IR11_reset_scanline_counter_on_scrollup(0), m_IR11_reset_scanline_counter_on_scrolldown(0), m_IR12_scroll_start(0), m_IR12_split_register_1(0),
m_IR13_scroll_end(0), m_IR13_split_register_2(0), m_IR14_scroll_lines(0), m_IR14_double_1(0), m_IR14_double_2(0), m_spl1(0), m_spl2(0), m_dbl1(0), m_buffer(0), m_linecounter(0), m_address(0),
m_start1change(0), m_irq_state(0), m_scanline_timer(nullptr),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(scn2674_vram))
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(scn2674_vram))
{
}
diff --git a/src/devices/video/scn2674.h b/src/devices/video/scn2674.h
index b30c65c4039..dc87666ee33 100644
--- a/src/devices/video/scn2674.h
+++ b/src/devices/video/scn2674.h
@@ -41,7 +41,7 @@ public:
DECLARE_WRITE8_MEMBER( buffer_w ) { m_buffer = data; }
UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_0) ? &m_space_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_0) ? &m_space_config : nullptr; }
protected:
virtual void device_start();
diff --git a/src/devices/video/sed1330.cpp b/src/devices/video/sed1330.cpp
index 2ced64a8170..d368c38b1f2 100644
--- a/src/devices/video/sed1330.cpp
+++ b/src/devices/video/sed1330.cpp
@@ -143,7 +143,7 @@ sed1330_device::sed1330_device(const machine_config &mconfig, const char *tag, d
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_bf(0),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, NULL, *ADDRESS_MAP_NAME(sed1330))
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, nullptr, *ADDRESS_MAP_NAME(sed1330))
{
}
@@ -220,7 +220,7 @@ void sed1330_device::device_reset()
const address_space_config *sed1330_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/snes_ppu.cpp b/src/devices/video/snes_ppu.cpp
index ce33d0a7dae..134f3e84a97 100644
--- a/src/devices/video/snes_ppu.cpp
+++ b/src/devices/video/snes_ppu.cpp
@@ -409,14 +409,14 @@ void snes_ppu_device::device_reset()
memset(&m_oam, 0, sizeof(m_oam));
memset(&m_mode7, 0, sizeof(m_mode7));
- for (int i = 0; i < 2; i++)
+ for (auto & elem : m_scanlines)
{
- m_scanlines[i].enable = 0;
- m_scanlines[i].clip = 0;
- memset(m_scanlines[i].buffer, 0, SNES_SCR_WIDTH);
- memset(m_scanlines[i].priority, 0, SNES_SCR_WIDTH);
- memset(m_scanlines[i].layer, 0, SNES_SCR_WIDTH);
- memset(m_scanlines[i].blend_exception, 0, SNES_SCR_WIDTH);
+ elem.enable = 0;
+ elem.clip = 0;
+ memset(elem.buffer, 0, SNES_SCR_WIDTH);
+ memset(elem.priority, 0, SNES_SCR_WIDTH);
+ memset(elem.layer, 0, SNES_SCR_WIDTH);
+ memset(elem.blend_exception, 0, SNES_SCR_WIDTH);
}
for (int i = 0; i < 6; i++)
@@ -442,27 +442,27 @@ void snes_ppu_device::device_reset()
memset(m_clipmasks[i], 0, SNES_SCR_WIDTH);
}
- for (int i = 0; i < ARRAY_LENGTH(m_oam_spritelist); i++)
+ for (auto & elem : m_oam_spritelist)
{
- m_oam_spritelist[i].tile = 0;
- m_oam_spritelist[i].x = 0;
- m_oam_spritelist[i].y = 0;
- m_oam_spritelist[i].size = 0;
- m_oam_spritelist[i].vflip = 0;
- m_oam_spritelist[i].hflip = 0;
- m_oam_spritelist[i].priority_bits = 0;
- m_oam_spritelist[i].pal = 0;
- m_oam_spritelist[i].height = 0;
- m_oam_spritelist[i].width = 0;
+ elem.tile = 0;
+ elem.x = 0;
+ elem.y = 0;
+ elem.size = 0;
+ elem.vflip = 0;
+ elem.hflip = 0;
+ elem.priority_bits = 0;
+ elem.pal = 0;
+ elem.height = 0;
+ elem.width = 0;
}
- for (int i = 0; i < ARRAY_LENGTH(m_oam_tilelist); i++)
+ for (auto & elem : m_oam_tilelist)
{
- m_oam_tilelist[i].x = 0;
- m_oam_tilelist[i].priority = 0;
- m_oam_tilelist[i].pal = 0;
- m_oam_tilelist[i].tileaddr = 0;
- m_oam_tilelist[i].hflip = 0;
+ elem.x = 0;
+ elem.priority = 0;
+ elem.pal = 0;
+ elem.tileaddr = 0;
+ elem.hflip = 0;
}
}
diff --git a/src/devices/video/stvvdp2.cpp b/src/devices/video/stvvdp2.cpp
index e2fbcf7f58d..5308b2afd6b 100644
--- a/src/devices/video/stvvdp2.cpp
+++ b/src/devices/video/stvvdp2.cpp
@@ -4542,7 +4542,7 @@ void saturn_state::stv_vdp2_copy_roz_bitmap(bitmap_rgb32 &bitmap,
use_coeff_table = coeff_table_mode = coeff_table_size = coeff_table_shift = 0;
coeff_table_offset = 0;
coeff_table_val = 0;
- coeff_table_base = NULL;
+ coeff_table_base = nullptr;
if ( LOG_ROZ == 1 ) logerror( "Rendering RBG with parameter %s\n", iRP == 1 ? "A" : "B" );
if ( LOG_ROZ == 1 ) logerror( "RPMD (parameter mode) = %x\n", STV_VDP2_RPMD );
@@ -6411,7 +6411,7 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
int i;
UINT16 pix;
UINT16 *framebuffer_line;
- UINT32 *bitmap_line, *bitmap_line2 = NULL;
+ UINT32 *bitmap_line, *bitmap_line2 = nullptr;
UINT8 interlace_framebuffer;
UINT8 double_x;
static const UINT16 sprite_colormask_table[] = {
diff --git a/src/devices/video/tms34061.cpp b/src/devices/video/tms34061.cpp
index 02720cda66a..8d535b2951a 100644
--- a/src/devices/video/tms34061.cpp
+++ b/src/devices/video/tms34061.cpp
@@ -38,11 +38,11 @@ tms34061_device::tms34061_device(const machine_config &mconfig, const char *tag,
m_xmask(0),
m_yshift(0),
m_vrammask(0),
- m_vram(NULL),
- m_latchram(NULL),
+ m_vram(nullptr),
+ m_latchram(nullptr),
m_latchdata(0),
- m_shiftreg(NULL),
- m_timer(NULL)
+ m_shiftreg(nullptr),
+ m_timer(nullptr)
{
memset(m_regs, 0, sizeof(m_regs));
memset(&m_display, 0, sizeof(m_display));
diff --git a/src/devices/video/tms3556.cpp b/src/devices/video/tms3556.cpp
index 9d073bdbe0d..b007d2fe137 100644
--- a/src/devices/video/tms3556.cpp
+++ b/src/devices/video/tms3556.cpp
@@ -44,7 +44,7 @@ ADDRESS_MAP_END
const address_space_config *tms3556_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
@@ -83,7 +83,7 @@ inline void tms3556_device::writebyte(offs_t address, UINT8 data)
tms3556_device::tms3556_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TMS3556, "Texas Instruments VDP TMS3556", tag, owner, clock, "tms3556", __FILE__),
device_memory_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, NULL, *ADDRESS_MAP_NAME(tms3556)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, nullptr, *ADDRESS_MAP_NAME(tms3556)),
m_reg_access_phase(0),
m_row_col_written(0),
m_bamp_written(0),
@@ -558,7 +558,7 @@ void tms3556_device::draw_line_mixed(UINT16 *ln)
void tms3556_device::draw_line(bitmap_ind16 &bmp, int line)
{
int double_lines = 0;
- UINT16 *ln, *ln2 = NULL;
+ UINT16 *ln, *ln2 = nullptr;
// if (m_control_regs[4] & 0x??)
// { // interlaced mode
diff --git a/src/devices/video/tms9927.cpp b/src/devices/video/tms9927.cpp
index 85c6a178243..4b6f82e18b8 100644
--- a/src/devices/video/tms9927.cpp
+++ b/src/devices/video/tms9927.cpp
@@ -39,7 +39,7 @@ tms9927_device::tms9927_device(const machine_config &mconfig, const char *tag, d
device_video_interface(mconfig, *this),
m_write_vsyn(*this),
m_hpixels_per_column(0),
- m_selfload_region(NULL),
+ m_selfload_region(nullptr),
m_reset(0)
{
memset(m_reg, 0x00, sizeof(m_reg));
@@ -50,7 +50,7 @@ tms9927_device::tms9927_device(const machine_config &mconfig, device_type type,
device_video_interface(mconfig, *this),
m_write_vsyn(*this),
m_hpixels_per_column(0),
- m_selfload_region(NULL),
+ m_selfload_region(nullptr),
m_reset(0)
{
memset(m_reg, 0x00, sizeof(m_reg));
@@ -85,10 +85,10 @@ void tms9927_device::device_start()
m_clock = clock();
/* get the self-load PROM */
- if (m_selfload_region != NULL)
+ if (m_selfload_region != nullptr)
{
m_selfload = machine().root_device().memregion(m_selfload_region)->base();
- assert(m_selfload != NULL);
+ assert(m_selfload != nullptr);
}
// resolve callbacks
@@ -166,7 +166,7 @@ void tms9927_device::generic_access(address_space &space, offs_t offset)
{
case 0x07: /* Processor Self Load */
case 0x0f: /* Non-processor self-load */
- if (m_selfload != NULL)
+ if (m_selfload != nullptr)
{
for (int cur = 0; cur < 7; cur++)
write(space, cur, m_selfload[cur]);
diff --git a/src/devices/video/tms9928a.cpp b/src/devices/video/tms9928a.cpp
index 8e8b672f8e4..ba7a40a4b6e 100644
--- a/src/devices/video/tms9928a.cpp
+++ b/src/devices/video/tms9928a.cpp
@@ -59,7 +59,7 @@ tms9928a_device::tms9928a_device( const machine_config &mconfig, device_type typ
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_out_int_line_cb(*this),
- m_space_config("vram",ENDIANNESS_BIG, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(memmap))
+ m_space_config("vram",ENDIANNESS_BIG, 8, 14, 0, nullptr, *ADDRESS_MAP_NAME(memmap))
{
m_50hz = is_50hz;
m_reva = is_reva;
@@ -74,7 +74,7 @@ tms9928a_device::tms9928a_device( const machine_config &mconfig, const char *tag
device_video_interface(mconfig, *this),
m_vram_size(0),
m_out_int_line_cb(*this),
- m_space_config("vram",ENDIANNESS_BIG, 8, 14, 0, NULL, *ADDRESS_MAP_NAME(memmap))
+ m_space_config("vram",ENDIANNESS_BIG, 8, 14, 0, nullptr, *ADDRESS_MAP_NAME(memmap))
{
m_50hz = false;
m_reva = true;
@@ -709,8 +709,8 @@ void tms9928a_device::device_start()
void tms9928a_device::device_reset()
{
- for ( int i = 0; i < 8; i++ )
- m_Regs[i] = 0;
+ for (auto & elem : m_Regs)
+ elem = 0;
m_StatusReg = 0;
m_FifthSprite = 31;
diff --git a/src/devices/video/tms9928a.h b/src/devices/video/tms9928a.h
index b87807782d1..8c68bc48f83 100644
--- a/src/devices/video/tms9928a.h
+++ b/src/devices/video/tms9928a.h
@@ -107,7 +107,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_DATA) const { return (spacenum == AS_DATA) ? &m_space_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_DATA) const { return (spacenum == AS_DATA) ? &m_space_config : nullptr; }
private:
void change_register(UINT8 reg, UINT8 val);
diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp
index d17ac6ee7dc..cc892d66b33 100644
--- a/src/devices/video/upd7220.cpp
+++ b/src/devices/video/upd7220.cpp
@@ -165,7 +165,7 @@ ROM_END
const address_space_config *upd7220_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
@@ -643,7 +643,7 @@ upd7220_device::upd7220_device(const machine_config &mconfig, const char *tag, d
m_disp(0),
m_gchr(0),
m_bitmap_mod(0),
- m_space_config("videoram", ENDIANNESS_LITTLE, 16, 18, 0, NULL, *ADDRESS_MAP_NAME(upd7220_vram))
+ m_space_config("videoram", ENDIANNESS_LITTLE, 16, 18, 0, nullptr, *ADDRESS_MAP_NAME(upd7220_vram))
{
for (int i = 0; i < 16; i++)
{
@@ -653,9 +653,9 @@ upd7220_device::upd7220_device(const machine_config &mconfig, const char *tag, d
m_ra[i] = 0;
}
- for (int i = 0; i < 17; i++)
+ for (auto & elem : m_pr)
{
- m_pr[i] = 0;
+ elem = 0;
}
memset(&m_figs, 0x00, sizeof(m_figs));
diff --git a/src/devices/video/upd7227.cpp b/src/devices/video/upd7227.cpp
index 037dd037610..99800496a28 100644
--- a/src/devices/video/upd7227.cpp
+++ b/src/devices/video/upd7227.cpp
@@ -98,7 +98,7 @@ void upd7227_device::device_reset()
const address_space_config *upd7227_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
diff --git a/src/devices/video/v9938.cpp b/src/devices/video/v9938.cpp
index 33d5b74d5fb..38adc1e58aa 100644
--- a/src/devices/video/v9938.cpp
+++ b/src/devices/video/v9938.cpp
@@ -115,7 +115,7 @@ v99x8_device::v99x8_device(const machine_config &mconfig, device_type type, cons
m_my_delta(0),
m_button_state(0),
m_vdp_ops_count(0),
- m_vdp_engine(NULL),
+ m_vdp_engine(nullptr),
m_palette(*this, "palette"),
m_pal_ntsc(0)
{
@@ -621,7 +621,7 @@ void v99x8_device::device_start()
{
m_int_callback.resolve_safe();
m_vdp_ops_count = 1;
- m_vdp_engine = NULL;
+ m_vdp_engine = nullptr;
m_screen->register_screen_bitmap(m_bitmap);
@@ -1774,8 +1774,8 @@ const v99x8_device::v99x8_mode v99x8_device::s_modes[] = {
{ 0x02,
&v99x8_device::mode_text1,
&v99x8_device::default_border,
- NULL,
- NULL
+ nullptr,
+ nullptr
},
{ 0x01,
&v99x8_device::mode_multi,
@@ -1828,14 +1828,14 @@ const v99x8_device::v99x8_mode v99x8_device::s_modes[] = {
{ 0x0a,
&v99x8_device::mode_text2,
&v99x8_device::default_border,
- NULL,
- NULL
+ nullptr,
+ nullptr
},
{ 0xff,
&v99x8_device::mode_unknown,
&v99x8_device::default_border,
- NULL,
- NULL
+ nullptr,
+ nullptr
}
};
@@ -1856,7 +1856,7 @@ void v99x8_device::refresh_16(int line)
const pen_t *pens = m_palette->pens();
bool double_lines = false;
UINT8 col[256];
- UINT16 *ln, *ln2 = NULL;
+ UINT16 *ln, *ln2 = nullptr;
if (m_cont_reg[9] & 0x08)
{
@@ -2371,7 +2371,7 @@ void v99x8_device::srch_engine()
if ((m_vdp_ops_count=cnt)>0) {
// Command execution done
m_stat_reg[2] &= 0xFE;
- m_vdp_engine = 0;
+ m_vdp_engine = nullptr;
// Update SX in VDP registers
m_stat_reg[8] = SX & 0xFF;
m_stat_reg[9] = (SX>>8) | 0xFE;
@@ -2455,7 +2455,7 @@ void v99x8_device::line_engine()
if ((m_vdp_ops_count=cnt)>0) {
// Command execution done
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
m_cont_reg[38]=DY & 0xFF;
m_cont_reg[39]=(DY>>8) & 0x03;
}
@@ -2504,7 +2504,7 @@ void v99x8_device::lmmv_engine()
if ((m_vdp_ops_count=cnt)>0) {
// Command execution done
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
if (!NY)
DY+=TY;
m_cont_reg[38]=DY & 0xFF;
@@ -2560,7 +2560,7 @@ void v99x8_device::lmmm_engine()
if ((m_vdp_ops_count=cnt)>0) {
// Command execution done
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
if (!NY) {
SY+=TY;
DY+=TY;
@@ -2598,7 +2598,7 @@ void v99x8_device::lmcm_engine()
if (!--m_mmc.ANX || ((m_mmc.ASX+=m_mmc.TX)&m_mmc.MX)) {
if (!(--m_mmc.NY & 1023) || (m_mmc.SY+=m_mmc.TY)==-1) {
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
if (!m_mmc.NY)
m_mmc.DY+=m_mmc.TY;
m_cont_reg[42]=m_mmc.NY & 0xFF;
@@ -2630,7 +2630,7 @@ void v99x8_device::lmmc_engine()
if (!--m_mmc.ANX || ((m_mmc.ADX+=m_mmc.TX)&m_mmc.MX)) {
if (!(--m_mmc.NY&1023) || (m_mmc.DY+=m_mmc.TY)==-1) {
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
if (!m_mmc.NY)
m_mmc.DY+=m_mmc.TY;
m_cont_reg[42]=m_mmc.NY & 0xFF;
@@ -2682,7 +2682,7 @@ void v99x8_device::hmmv_engine()
if ((m_vdp_ops_count=cnt)>0) {
// Command execution done
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
if (!NY)
DY+=TY;
m_cont_reg[42]=NY & 0xFF;
@@ -2737,7 +2737,7 @@ void v99x8_device::hmmm_engine()
if ((m_vdp_ops_count=cnt)>0) {
// Command execution done
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
if (!NY) {
SY+=TY;
DY+=TY;
@@ -2797,7 +2797,7 @@ void v99x8_device::ymmm_engine()
if ((m_vdp_ops_count=cnt)>0) {
// Command execution done
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
if (!NY) {
SY+=TY;
DY+=TY;
@@ -2833,7 +2833,7 @@ void v99x8_device::hmmc_engine()
if (!--m_mmc.ANX || ((m_mmc.ADX+=m_mmc.TX)&m_mmc.MX)) {
if (!(--m_mmc.NY&1023) || (m_mmc.DY+=m_mmc.TY)==-1) {
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
if (!m_mmc.NY)
m_mmc.DY+=m_mmc.TY;
m_cont_reg[42]=m_mmc.NY & 0xFF;
@@ -2931,11 +2931,11 @@ UINT8 v99x8_device::command_unit_w(UINT8 Op)
switch(Op>>4) {
case CM_ABRT:
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
return 1;
case CM_POINT:
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
m_stat_reg[7]=m_cont_reg[44]=
VDP_POINT(SM, (m_cont_reg[45] & 0x10) != 0,
m_cont_reg[32]+((int)m_cont_reg[33]<<8),
@@ -2943,7 +2943,7 @@ UINT8 v99x8_device::command_unit_w(UINT8 Op)
return 1;
case CM_PSET:
m_stat_reg[2]&=0xFE;
- m_vdp_engine=0;
+ m_vdp_engine=nullptr;
VDP_PSET(SM, (m_cont_reg[45] & 0x20) != 0,
m_cont_reg[36]+((int)m_cont_reg[37]<<8),
m_cont_reg[38]+((int)m_cont_reg[39]<<8),
diff --git a/src/devices/video/v9938.h b/src/devices/video/v9938.h
index 7e620a66c21..e61dee96b70 100644
--- a/src/devices/video/v9938.h
+++ b/src/devices/video/v9938.h
@@ -130,7 +130,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_DATA) const { return (spacenum == AS_DATA) ? &m_space_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_DATA) const { return (spacenum == AS_DATA) ? &m_space_config : nullptr; }
void configure_pal_ntsc();
void set_screen_parameters();
diff --git a/src/devices/video/vic4567.cpp b/src/devices/video/vic4567.cpp
index ca98279365b..e04a4851dcc 100644
--- a/src/devices/video/vic4567.cpp
+++ b/src/devices/video/vic4567.cpp
@@ -494,7 +494,7 @@ void vic3_device::draw_bitmap_multi( int ybegin, int yend, int ch, int yoff, int
void vic3_device::draw_sprite_code( int y, int xbegin, int code, int color, int start_x, int end_x )
{
- register int mask, x;
+ int mask, x;
if ((y < YPOS) || (y >= (VIC2_STARTVISIBLELINES + VIC2_VISIBLELINES)) || (xbegin <= 1) || (xbegin >= (VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS)))
return;
@@ -511,7 +511,7 @@ void vic3_device::draw_sprite_code( int y, int xbegin, int code, int color, int
void vic3_device::draw_sprite_code_multi( int y, int xbegin, int code, int prior, int start_x, int end_x )
{
- register int x, mask, shift;
+ int x, mask, shift;
if ((y < YPOS) || (y >= (VIC2_STARTVISIBLELINES + VIC2_VISIBLELINES)) || (xbegin <= 1) || (xbegin >= (VIC2_STARTVISIBLECOLUMNS + VIC2_VISIBLECOLUMNS)))
return;
@@ -782,7 +782,7 @@ void vic3_device::draw_sprite_multi( int nr, int yoff, int ybegin, int yend, int
#ifndef memset16
static void *memset16(void *dest, int value, size_t size)
{
- register int i;
+ int i;
for (i = 0; i < size; i++)
((short *) dest)[i] = value;
diff --git a/src/devices/video/voodoo.cpp b/src/devices/video/voodoo.cpp
index 5646d1d546d..277d3c9a287 100644
--- a/src/devices/video/voodoo.cpp
+++ b/src/devices/video/voodoo.cpp
@@ -269,7 +269,7 @@ static void raster_generic_2tmu(void *dest, INT32 scanline, const poly_extent *e
static const raster_info predef_raster_table[] =
{
#include "voodoo.cpp"
- { 0 }
+ { nullptr }
};
#undef RASTERIZER_ENTRY
@@ -287,7 +287,7 @@ static const raster_info predef_raster_table[] =
INLINE voodoo_state *get_safe_token(device_t *device)
{
- assert(device != NULL);
+ assert(device != nullptr);
assert((device->type() == VOODOO_1) || (device->type() == VOODOO_2) || (device->type() == VOODOO_BANSHEE) || (device->type() == VOODOO_3));
return (voodoo_state *)downcast<voodoo_device *>(device)->token();
@@ -503,7 +503,7 @@ static void init_fbi(voodoo_state *v, fbi_state *f, void *memory, int fbmem)
f->vblank = FALSE;
/* initialize the memory FIFO */
- f->fifo.base = NULL;
+ f->fifo.base = nullptr;
f->fifo.size = f->fifo.in = f->fifo.out = 0;
/* set the fog delta mask */
@@ -577,8 +577,8 @@ static void init_tmu(voodoo_state *v, tmu_state *t, voodoo_reg *reg, void *memor
t->texel[3] = v->tmushare.int8;
t->texel[4] = v->tmushare.ai44;
t->texel[5] = t->palette;
- t->texel[6] = (v->type >= TYPE_VOODOO_2) ? t->palettea : NULL;
- t->texel[7] = NULL;
+ t->texel[6] = (v->type >= TYPE_VOODOO_2) ? t->palettea : nullptr;
+ t->texel[7] = nullptr;
t->texel[8] = v->tmushare.rgb332;
t->texel[9] = t->ncc[0].texel;
t->texel[10] = v->tmushare.rgb565;
@@ -586,7 +586,7 @@ static void init_tmu(voodoo_state *v, tmu_state *t, voodoo_reg *reg, void *memor
t->texel[12] = v->tmushare.argb4444;
t->texel[13] = v->tmushare.int8;
t->texel[14] = t->palette;
- t->texel[15] = NULL;
+ t->texel[15] = nullptr;
t->lookup = t->texel[0];
/* attach the palette to NCC table 0 */
@@ -747,7 +747,7 @@ static void init_save_state(device_t *device)
for (index = 0; index < ARRAY_LENGTH(v->tmu); index++)
{
tmu_state *tmu = &v->tmu[index];
- if (tmu->ram == NULL)
+ if (tmu->ram == nullptr)
continue;
if (tmu->ram != v->fbi.ram)
device->save_pointer(NAME(tmu->ram), tmu->mask + 1, index);
@@ -1165,7 +1165,7 @@ static void recompute_video_memory(voodoo_state *v)
/* if not, disable the FIFO */
else
{
- v->fbi.fifo.base = NULL;
+ v->fbi.fifo.base = nullptr;
v->fbi.fifo.size = 0;
}
@@ -5021,8 +5021,8 @@ void voodoo_device::common_start_voodoo(UINT8 type)
int val;
/* validate configuration */
- assert(m_screen != NULL);
- assert(m_cputag != NULL);
+ assert(m_screen != nullptr);
+ assert(m_cputag != nullptr);
assert(m_fbmem > 0);
/* store a pointer back to the device */
@@ -5108,7 +5108,7 @@ void voodoo_device::common_start_voodoo(UINT8 type)
/* set the type, and initialize the chip mask */
device_iterator iter(machine().root_device());
v->index = 0;
- for (device_t *scan = iter.first(); scan != NULL; scan = iter.next())
+ for (device_t *scan = iter.first(); scan != nullptr; scan = iter.next())
if (scan->type() == this->type())
{
if (scan == this)
@@ -5116,9 +5116,9 @@ void voodoo_device::common_start_voodoo(UINT8 type)
v->index++;
}
v->screen = downcast<screen_device *>(machine().device(m_screen));
- assert_always(v->screen != NULL, "Unable to find screen attached to voodoo");
+ assert_always(v->screen != nullptr, "Unable to find screen attached to voodoo");
v->cpu = machine().device(m_cputag);
- assert_always(v->cpu != NULL, "Unable to find CPU attached to voodoo");
+ assert_always(v->cpu != nullptr, "Unable to find CPU attached to voodoo");
if (m_tmumem1 != 0)
v->tmu_config |= 0xc0; // two TMUs
@@ -5146,7 +5146,7 @@ void voodoo_device::common_start_voodoo(UINT8 type)
/* separate FB/TMU memory */
fbmem = auto_alloc_array(machine(), UINT8, m_fbmem << 20);
tmumem[0] = auto_alloc_array(machine(), UINT8, m_tmumem0 << 20);
- tmumem[1] = (m_tmumem1 != 0) ? auto_alloc_array(machine(), UINT8, m_tmumem1 << 20) : NULL;
+ tmumem[1] = (m_tmumem1 != 0) ? auto_alloc_array(machine(), UINT8, m_tmumem1 << 20) : nullptr;
}
else
{
@@ -5218,7 +5218,7 @@ static INT32 fastfill(voodoo_state *v)
int ey = (v->reg[clipLowYHighY].u >> 0) & 0x3ff;
poly_extent extents[64];
UINT16 dithermatrix[16];
- UINT16 *drawbuf = NULL;
+ UINT16 *drawbuf = nullptr;
UINT32 pixels = 0;
int extnum, x, y;
@@ -5735,7 +5735,7 @@ static raster_info *add_rasterizer(voodoo_state *v, const raster_info *cinfo)
static raster_info *find_rasterizer(voodoo_state *v, int texcount)
{
- raster_info *info, *prev = NULL;
+ raster_info *info, *prev = nullptr;
raster_info curinfo;
int hash;
@@ -5777,7 +5777,7 @@ static raster_info *find_rasterizer(voodoo_state *v, int texcount)
curinfo.display = 0;
curinfo.polys = 0;
curinfo.hits = 0;
- curinfo.next = 0;
+ curinfo.next = nullptr;
curinfo.hash = hash;
return add_rasterizer(v, &curinfo);
@@ -5801,16 +5801,16 @@ static void dump_rasterizer_stats(voodoo_state *v)
/* loop until we've displayed everything */
while (1)
{
- best = NULL;
+ best = nullptr;
/* find the highest entry */
for (hash = 0; hash < RASTER_HASH_SIZE; hash++)
for (cur = v->raster_hash[hash]; cur; cur = cur->next)
- if (cur->display != display_index && (best == NULL || cur->hits > best->hits))
+ if (cur->display != display_index && (best == nullptr || cur->hits > best->hits))
best = cur;
/* if we're done, we're done */
- if (best == NULL || best->hits == 0)
+ if (best == nullptr || best->hits == 0)
break;
/* print it */
@@ -5836,8 +5836,8 @@ voodoo_device::voodoo_device(const machine_config &mconfig, device_type type, co
m_fbmem(0),
m_tmumem0(0),
m_tmumem1(0),
- m_screen(NULL),
- m_cputag(NULL),
+ m_screen(nullptr),
+ m_cputag(nullptr),
m_vblank(*this),
m_stall(*this)
{
@@ -5878,7 +5878,7 @@ void voodoo_device::device_stop()
voodoo_state *v = get_safe_token(this);
/* release the work queue, ensuring all work is finished */
- if (v->poly != NULL)
+ if (v->poly != nullptr)
poly_free(v->poly);
}
diff --git a/src/devices/video/voodoo.h b/src/devices/video/voodoo.h
index dcd03d38876..02427761a41 100644
--- a/src/devices/video/voodoo.h
+++ b/src/devices/video/voodoo.h
@@ -86,7 +86,7 @@ public:
DECLARE_WRITE32_MEMBER( voodoo_w );
// access to legacy token
- struct voodoo_state *token() const { assert(m_token != NULL); return m_token; }
+ struct voodoo_state *token() const { assert(m_token != nullptr); return m_token; }
void common_start_voodoo(UINT8 type);
UINT8 m_fbmem;
diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp
index 0179dc0e7ac..708caf5d3ee 100644
--- a/src/emu/addrmap.cpp
+++ b/src/emu/addrmap.cpp
@@ -20,18 +20,18 @@
//-------------------------------------------------
address_map_entry::address_map_entry(device_t &device, address_map &map, offs_t start, offs_t end)
- : m_next(NULL),
+ : m_next(nullptr),
m_map(map),
m_devbase(device),
m_addrstart((map.m_globalmask == 0) ? start : start & map.m_globalmask),
m_addrend((map.m_globalmask == 0) ? end : end & map.m_globalmask),
m_addrmirror(0),
m_addrmask(0),
- m_share(NULL),
- m_region(NULL),
+ m_share(nullptr),
+ m_region(nullptr),
m_rgnoffs(0),
m_submap_bits(0),
- m_memory(NULL),
+ m_memory(nullptr),
m_bytestart(0),
m_byteend(0),
m_bytemirror(0),
@@ -336,18 +336,18 @@ address_map::address_map(device_t &device, address_spacenum spacenum)
throw emu_fatalerror("No memory address space configuration found for device '%s', space %d\n", device.tag(), spacenum);
// construct the internal device map (first so it takes priority)
- if (spaceconfig->m_internal_map != NULL)
+ if (spaceconfig->m_internal_map != nullptr)
(*spaceconfig->m_internal_map)(*this, device);
if (!spaceconfig->m_internal_map_delegate.isnull())
spaceconfig->m_internal_map_delegate(*this, device);
// append the map provided by the owner
- if (memintf->address_map(spacenum) != NULL)
+ if (memintf->address_map(spacenum) != nullptr)
(*memintf->address_map(spacenum))(*this, *device.owner());
else
{
// if the owner didn't provide a map, use the default device map
- if (spaceconfig->m_default_map != NULL)
+ if (spaceconfig->m_default_map != nullptr)
(*spaceconfig->m_default_map)(*this, device);
if (!spaceconfig->m_default_map_delegate.isnull())
spaceconfig->m_default_map_delegate(*this, device);
@@ -386,16 +386,16 @@ address_map::address_map(const address_space &space, offs_t start, offs_t end, i
address_map_entry *e;
switch(m_databits) {
case 8:
- e = add(device, start, end, (address_map_entry8 *)NULL);
+ e = add(device, start, end, (address_map_entry8 *)nullptr);
break;
case 16:
- e = add(device, start, end, (address_map_entry16 *)NULL);
+ e = add(device, start, end, (address_map_entry16 *)nullptr);
break;
case 32:
- e = add(device, start, end, (address_map_entry32 *)NULL);
+ e = add(device, start, end, (address_map_entry32 *)nullptr);
break;
case 64:
- e = add(device, start, end, (address_map_entry64 *)NULL);
+ e = add(device, start, end, (address_map_entry64 *)nullptr);
break;
default:
throw emu_fatalerror("Trying to dynamically map a device on a space with a corrupt databits width");
@@ -485,7 +485,7 @@ address_map_entry64 *address_map::add(device_t &device, offs_t start, offs_t end
void address_map::uplift_submaps(running_machine &machine, device_t &device, device_t &owner, endianness_t endian)
{
- address_map_entry *prev = 0;
+ address_map_entry *prev = nullptr;
address_map_entry *entry = m_entrylist.first();
while (entry)
{
@@ -493,7 +493,7 @@ void address_map::uplift_submaps(running_machine &machine, device_t &device, dev
{
std::string tag = owner.subtag(entry->m_read.m_tag);
device_t *mapdevice = machine.device(tag.c_str());
- if (mapdevice == NULL) {
+ if (mapdevice == nullptr) {
throw emu_fatalerror("Attempted to submap a non-existent device '%s' in space %d of device '%s'\n", tag.c_str(), m_spacenum, device.basetag());
}
// Grab the submap
diff --git a/src/emu/addrmap.h b/src/emu/addrmap.h
index 60776fadda2..0e767570b05 100644
--- a/src/emu/addrmap.h
+++ b/src/emu/addrmap.h
@@ -51,8 +51,8 @@ public:
: m_type(AMH_NONE),
m_bits(0),
m_mask(0),
- m_name(NULL),
- m_tag(NULL) { }
+ m_name(nullptr),
+ m_tag(nullptr) { }
map_handler_type m_type; // type of the handler
UINT8 m_bits; // width of the handler in bits, or 0 for default
diff --git a/src/emu/audit.cpp b/src/emu/audit.cpp
index 758bb508db0..714fadcc32e 100644
--- a/src/emu/audit.cpp
+++ b/src/emu/audit.cpp
@@ -26,7 +26,7 @@
media_auditor::media_auditor(const driver_enumerator &enumerator)
: m_enumerator(enumerator),
m_validation(AUDIT_VALIDATE_FULL),
- m_searchpath(NULL)
+ m_searchpath(nullptr)
{
}
@@ -55,13 +55,13 @@ const char *driverpath = m_enumerator.config().root_device().searchpath();
// iterate over devices and regions
device_iterator deviter(m_enumerator.config().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
{
// determine the search path for this source and iterate through the regions
m_searchpath = device->searchpath();
// now iterate over regions and ROMs within
- for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
+ for (const rom_entry *region = rom_first_region(*device); region != nullptr; region = rom_next_region(region))
{
// temporary hack: add the driver path & region name
std::string combinedpath = std::string(device->searchpath()).append(";").append(driverpath);
@@ -79,12 +79,12 @@ m_searchpath = combinedpath.c_str();
if (!hashes.flag(hash_collection::FLAG_NO_DUMP) && !ROM_ISOPTIONAL(rom))
{
required++;
- if (shared_device != NULL)
+ if (shared_device != nullptr)
shared_required++;
}
// audit a file
- audit_record *record = NULL;
+ audit_record *record = nullptr;
if (ROMREGION_ISROMDATA(region))
record = audit_one_rom(rom);
@@ -92,13 +92,13 @@ m_searchpath = combinedpath.c_str();
else if (ROMREGION_ISDISKDATA(region))
record = audit_one_disk(rom);
- if (record != NULL)
+ if (record != nullptr)
{
// count the number of files that are found.
- if (record->status() == audit_record::STATUS_GOOD || (record->status() == audit_record::STATUS_FOUND_INVALID && find_shared_device(*device, name, record->actual_hashes(), record->actual_length()) == NULL))
+ if (record->status() == audit_record::STATUS_GOOD || (record->status() == audit_record::STATUS_FOUND_INVALID && find_shared_device(*device, name, record->actual_hashes(), record->actual_length()) == nullptr))
{
found++;
- if (shared_device != NULL)
+ if (shared_device != nullptr)
shared_found++;
}
@@ -137,7 +137,7 @@ media_auditor::summary media_auditor::audit_device(device_t *device, const char
int required = 0;
// now iterate over regions and ROMs within
- for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
+ for (const rom_entry *region = rom_first_region(*device); region != nullptr; region = rom_next_region(region))
{
for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom))
{
@@ -150,7 +150,7 @@ media_auditor::summary media_auditor::audit_device(device_t *device, const char
}
// audit a file
- audit_record *record = NULL;
+ audit_record *record = nullptr;
if (ROMREGION_ISROMDATA(region))
record = audit_one_rom(rom);
@@ -159,7 +159,7 @@ media_auditor::summary media_auditor::audit_device(device_t *device, const char
record = audit_one_disk(rom);
// count the number of files that are found.
- if (record != NULL && (record->status() == audit_record::STATUS_GOOD || record->status() == audit_record::STATUS_FOUND_INVALID))
+ if (record != nullptr && (record->status() == audit_record::STATUS_GOOD || record->status() == audit_record::STATUS_FOUND_INVALID))
{
found++;
}
@@ -197,7 +197,7 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, soft
locationtag.append("%");
locationtag.append(swinfo->shortname());
locationtag.append("%");
- if (swinfo->parentname() != NULL)
+ if (swinfo->parentname() != nullptr)
{
locationtag.append(swinfo->parentname());
combinedpath.append(";").append(swinfo->parentname()).append(";").append(list_name).append(PATH_SEPARATOR).append(swinfo->parentname());
@@ -208,7 +208,7 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, soft
int required = 0;
// now iterate over software parts
- for ( software_part *part = swinfo->first_part(); part != NULL; part = part->next() )
+ for ( software_part *part = swinfo->first_part(); part != nullptr; part = part->next() )
{
// now iterate over regions
for ( const rom_entry *region = part->romdata(); region; region = rom_next_region( region ) )
@@ -225,7 +225,7 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, soft
}
// audit a file
- audit_record *record = NULL;
+ audit_record *record = nullptr;
if (ROMREGION_ISROMDATA(region))
{
record = audit_one_rom(rom);
@@ -237,7 +237,7 @@ media_auditor::summary media_auditor::audit_software(const char *list_name, soft
}
// count the number of files that are found.
- if (record != NULL && (record->status() == audit_record::STATUS_GOOD || record->status() == audit_record::STATUS_FOUND_INVALID))
+ if (record != nullptr && (record->status() == audit_record::STATUS_GOOD || record->status() == audit_record::STATUS_FOUND_INVALID))
{
found++;
}
@@ -271,18 +271,18 @@ media_auditor::summary media_auditor::audit_samples()
// iterate over sample entries
samples_device_iterator iterator(m_enumerator.config().root_device());
- for (samples_device *device = iterator.first(); device != NULL; device = iterator.next())
+ for (samples_device *device = iterator.first(); device != nullptr; device = iterator.next())
{
// by default we just search using the driver name
std::string searchpath(m_enumerator.driver().name);
// add the alternate path if present
samples_iterator iter(*device);
- if (iter.altbasename() != NULL)
+ if (iter.altbasename() != nullptr)
searchpath.append(";").append(iter.altbasename());
// iterate over samples in this entry
- for (const char *samplename = iter.first(); samplename != NULL; samplename = iter.next())
+ for (const char *samplename = iter.first(); samplename != nullptr; samplename = iter.next())
{
required++;
@@ -336,7 +336,7 @@ media_auditor::summary media_auditor::summarize(const char *name, std::string *o
// loop over records
summary overall_status = CORRECT;
- for (audit_record *record = m_record_list.first(); record != NULL; record = record->next())
+ for (audit_record *record = m_record_list.first(); record != nullptr; record = record->next())
{
summary best_new_status = INCORRECT;
@@ -345,7 +345,7 @@ media_auditor::summary media_auditor::summarize(const char *name, std::string *o
continue;
// output the game name, file name, and length (if applicable)
- if (output != NULL)
+ if (output != nullptr)
{
strcatprintf(*output,"%-12s: %s", name, record->name());
if (record->expected_length() > 0)
@@ -357,17 +357,17 @@ media_auditor::summary media_auditor::summarize(const char *name, std::string *o
switch (record->substatus())
{
case audit_record::SUBSTATUS_GOOD_NEEDS_REDUMP:
- if (output != NULL) strcatprintf(*output,"NEEDS REDUMP\n");
+ if (output != nullptr) strcatprintf(*output,"NEEDS REDUMP\n");
best_new_status = BEST_AVAILABLE;
break;
case audit_record::SUBSTATUS_FOUND_NODUMP:
- if (output != NULL) strcatprintf(*output,"NO GOOD DUMP KNOWN\n");
+ if (output != nullptr) strcatprintf(*output,"NO GOOD DUMP KNOWN\n");
best_new_status = BEST_AVAILABLE;
break;
case audit_record::SUBSTATUS_FOUND_BAD_CHECKSUM:
- if (output != NULL)
+ if (output != nullptr)
{
std::string tempstr;
strcatprintf(*output,"INCORRECT CHECKSUM:\n");
@@ -377,14 +377,14 @@ media_auditor::summary media_auditor::summarize(const char *name, std::string *o
break;
case audit_record::SUBSTATUS_FOUND_WRONG_LENGTH:
- if (output != NULL) strcatprintf(*output,"INCORRECT LENGTH: %" I64FMT "d bytes\n", record->actual_length());
+ if (output != nullptr) strcatprintf(*output,"INCORRECT LENGTH: %" I64FMT "d bytes\n", record->actual_length());
break;
case audit_record::SUBSTATUS_NOT_FOUND:
- if (output != NULL)
+ if (output != nullptr)
{
device_t *shared_device = record->shared_device();
- if (shared_device == NULL)
+ if (shared_device == nullptr)
strcatprintf(*output,"NOT FOUND\n");
else
strcatprintf(*output,"NOT FOUND (%s)\n", shared_device->shortname());
@@ -393,12 +393,12 @@ media_auditor::summary media_auditor::summarize(const char *name, std::string *o
break;
case audit_record::SUBSTATUS_NOT_FOUND_NODUMP:
- if (output != NULL) strcatprintf(*output,"NOT FOUND - NO GOOD DUMP KNOWN\n");
+ if (output != nullptr) strcatprintf(*output,"NOT FOUND - NO GOOD DUMP KNOWN\n");
best_new_status = BEST_AVAILABLE;
break;
case audit_record::SUBSTATUS_NOT_FOUND_OPTIONAL:
- if (output != NULL) strcatprintf(*output,"NOT FOUND BUT OPTIONAL\n");
+ if (output != nullptr) strcatprintf(*output,"NOT FOUND BUT OPTIONAL\n");
best_new_status = BEST_AVAILABLE;
break;
@@ -545,11 +545,11 @@ device_t *media_auditor::find_shared_device(device_t &device, const char *name,
bool dumped = !romhashes.flag(hash_collection::FLAG_NO_DUMP);
// special case for non-root devices
- device_t *highest_device = NULL;
- if (device.owner() != NULL)
+ device_t *highest_device = nullptr;
+ if (device.owner() != nullptr)
{
- for (const rom_entry *region = rom_first_region(device); region != NULL; region = rom_next_region(region))
- for (const rom_entry *rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
+ for (const rom_entry *region = rom_first_region(device); region != nullptr; region = rom_next_region(region))
+ for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
if (ROM_GETLENGTH(rom) == romlength)
{
hash_collection hashes(ROM_GETHASHDATA(rom));
@@ -563,7 +563,7 @@ device_t *media_auditor::find_shared_device(device_t &device, const char *name,
for (int drvindex = m_enumerator.find(m_enumerator.driver().parent); drvindex != -1; drvindex = m_enumerator.find(m_enumerator.driver(drvindex).parent))
{
device_iterator deviter(m_enumerator.config(drvindex).root_device());
- for (device_t *scandevice = deviter.first(); scandevice != NULL; scandevice = deviter.next())
+ for (device_t *scandevice = deviter.first(); scandevice != nullptr; scandevice = deviter.next())
for (const rom_entry *region = rom_first_region(*scandevice); region; region = rom_next_region(region))
for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom))
if (ROM_GETLENGTH(rom) == romlength)
@@ -584,26 +584,26 @@ device_t *media_auditor::find_shared_device(device_t &device, const char *name,
//-------------------------------------------------
audit_record::audit_record(const rom_entry &media, media_type type)
- : m_next(NULL),
+ : m_next(nullptr),
m_type(type),
m_status(STATUS_ERROR),
m_substatus(SUBSTATUS_ERROR),
m_name(ROM_GETNAME(&media)),
m_explength(rom_file_size(&media)),
m_length(0),
- m_shared_device(NULL)
+ m_shared_device(nullptr)
{
m_exphashes.from_internal_string(ROM_GETHASHDATA(&media));
}
audit_record::audit_record(const char *name, media_type type)
- : m_next(NULL),
+ : m_next(nullptr),
m_type(type),
m_status(STATUS_ERROR),
m_substatus(SUBSTATUS_ERROR),
m_name(name),
m_explength(0),
m_length(0),
- m_shared_device(NULL)
+ m_shared_device(nullptr)
{
}
diff --git a/src/emu/audit.h b/src/emu/audit.h
index 5989fe5a10e..d39ecbb3a91 100644
--- a/src/emu/audit.h
+++ b/src/emu/audit.h
@@ -149,12 +149,12 @@ public:
summary audit_device(device_t *device, const char *validation = AUDIT_VALIDATE_FULL);
summary audit_software(const char *list_name, software_info *swinfo, const char *validation = AUDIT_VALIDATE_FULL);
summary audit_samples();
- summary summarize(const char *name,std::string *output = NULL);
+ summary summarize(const char *name,std::string *output = nullptr);
private:
// internal helpers
audit_record *audit_one_rom(const rom_entry *rom);
- audit_record *audit_one_disk(const rom_entry *rom, const char *locationtag = NULL);
+ audit_record *audit_one_disk(const rom_entry *rom, const char *locationtag = nullptr);
void compute_status(audit_record &record, const rom_entry *rom, bool found);
device_t *find_shared_device(device_t &device, const char *name, const hash_collection &romhashes, UINT64 romlength);
diff --git a/src/emu/cheat.cpp b/src/emu/cheat.cpp
index b9bf7432770..8b1584bbd2a 100644
--- a/src/emu/cheat.cpp
+++ b/src/emu/cheat.cpp
@@ -145,14 +145,14 @@ cheat_parameter::cheat_parameter(cheat_manager &manager, symbol_table &symbols,
m_stepval = number_and_format(xml_get_attribute_int(&paramnode, "step", 1), xml_get_attribute_int_format(&paramnode, "step"));
// iterate over items
- for (xml_data_node *itemnode = xml_get_sibling(paramnode.child, "item"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "item"))
+ for (xml_data_node *itemnode = xml_get_sibling(paramnode.child, "item"); itemnode != nullptr; itemnode = xml_get_sibling(itemnode->next, "item"))
{
// check for NULL text
- if (itemnode->value == NULL || itemnode->value[0] == 0)
+ if (itemnode->value == nullptr || itemnode->value[0] == 0)
throw emu_fatalerror("%s.xml(%d): item is missing text\n", filename, itemnode->line);
// check for non-existant value
- if (xml_get_attribute(itemnode, "value") == NULL)
+ if (xml_get_attribute(itemnode, "value") == nullptr)
throw emu_fatalerror("%s.xml(%d): item is value\n", filename, itemnode->line);
// extract the parameters
@@ -185,7 +185,7 @@ const char *cheat_parameter::text()
else
{
strprintf(m_curtext, "??? (%d)", UINT32(m_value));
- for (item *curitem = m_itemlist.first(); curitem != NULL; curitem = curitem->next())
+ for (item *curitem = m_itemlist.first(); curitem != nullptr; curitem = curitem->next())
if (curitem->value() == m_value)
{
m_curtext.assign(curitem->text());
@@ -221,7 +221,7 @@ void cheat_parameter::save(emu_file &cheatfile) const
// iterate over items
else
{
- for (const item *curitem = m_itemlist.first(); curitem != NULL; curitem = curitem->next())
+ for (const item *curitem = m_itemlist.first(); curitem != nullptr; curitem = curitem->next())
cheatfile.printf("\t\t\t<item value=\"%s\">%s</item>\n", curitem->value().format(str), curitem->text());
cheatfile.printf("\t\t</parameter>\n");
}
@@ -263,11 +263,11 @@ bool cheat_parameter::set_prev_state()
// if not, we're an item cheat
else
{
- item *curitem, *previtem = NULL;
- for (curitem = m_itemlist.first(); curitem != NULL; previtem = curitem, curitem = curitem->next())
+ item *curitem, *previtem = nullptr;
+ for (curitem = m_itemlist.first(); curitem != nullptr; previtem = curitem, curitem = curitem->next())
if (curitem->value() == m_value)
break;
- if (previtem != NULL)
+ if (previtem != nullptr)
m_value = previtem->value();
}
@@ -296,10 +296,10 @@ bool cheat_parameter::set_next_state()
else
{
item *curitem;
- for (curitem = m_itemlist.first(); curitem != NULL; curitem = curitem->next())
+ for (curitem = m_itemlist.first(); curitem != nullptr; curitem = curitem->next())
if (curitem->value() == m_value)
break;
- if (curitem != NULL && curitem->next() != NULL)
+ if (curitem != nullptr && curitem->next() != nullptr)
m_value = curitem->next()->value();
}
@@ -331,7 +331,7 @@ cheat_script::cheat_script(cheat_manager &manager, symbol_table &symbols, const
throw emu_fatalerror("%s.xml(%d): invalid script state '%s'\n", filename, scriptnode.line, state);
// iterate over nodes within the script
- for (xml_data_node *entrynode = scriptnode.child; entrynode != NULL; entrynode = entrynode->next)
+ for (xml_data_node *entrynode = scriptnode.child; entrynode != nullptr; entrynode = entrynode->next)
{
// handle action nodes
if (strcmp(entrynode->name, "action") == 0)
@@ -362,7 +362,7 @@ void cheat_script::execute(cheat_manager &manager, UINT64 &argindex)
return;
// iterate over entries
- for (script_entry *entry = m_entrylist.first(); entry != NULL; entry = entry->next())
+ for (script_entry *entry = m_entrylist.first(); entry != nullptr; entry = entry->next())
entry->execute(manager, argindex);
}
@@ -386,7 +386,7 @@ void cheat_script::save(emu_file &cheatfile) const
cheatfile.printf(">\n");
// output entries
- for (const script_entry *entry = m_entrylist.first(); entry != NULL; entry = entry->next())
+ for (const script_entry *entry = m_entrylist.first(); entry != nullptr; entry = entry->next())
entry->save(cheatfile);
// close the tag
@@ -399,23 +399,23 @@ void cheat_script::save(emu_file &cheatfile) const
//-------------------------------------------------
cheat_script::script_entry::script_entry(cheat_manager &manager, symbol_table &symbols, const char *filename, xml_data_node &entrynode, bool isaction)
- : m_next(NULL),
+ : m_next(nullptr),
m_condition(&symbols),
m_expression(&symbols)
{
- const char *expression = NULL;
+ const char *expression = nullptr;
try
{
// read the condition if present
- expression = xml_get_attribute_string(&entrynode, "condition", NULL);
- if (expression != NULL)
+ expression = xml_get_attribute_string(&entrynode, "condition", nullptr);
+ if (expression != nullptr)
m_condition.parse(expression);
// if this is an action, parse the expression
if (isaction)
{
expression = entrynode.value;
- if (expression == NULL || expression[0] == 0)
+ if (expression == nullptr || expression[0] == 0)
throw emu_fatalerror("%s.xml(%d): missing expression in action tag\n", filename, entrynode.line);
m_expression.parse(expression);
}
@@ -424,8 +424,8 @@ cheat_script::script_entry::script_entry(cheat_manager &manager, symbol_table &s
else
{
// extract format
- const char *format = xml_get_attribute_string(&entrynode, "format", NULL);
- if (format == NULL || format[0] == 0)
+ const char *format = xml_get_attribute_string(&entrynode, "format", nullptr);
+ if (format == nullptr || format[0] == 0)
throw emu_fatalerror("%s.xml(%d): missing format in output tag\n", filename, entrynode.line);
m_format.assign(format);
@@ -442,7 +442,7 @@ cheat_script::script_entry::script_entry(cheat_manager &manager, symbol_table &s
// then parse arguments
int totalargs = 0;
- for (xml_data_node *argnode = xml_get_sibling(entrynode.child, "argument"); argnode != NULL; argnode = xml_get_sibling(argnode->next, "argument"))
+ for (xml_data_node *argnode = xml_get_sibling(entrynode.child, "argument"); argnode != nullptr; argnode = xml_get_sibling(argnode->next, "argument"))
{
output_argument &curarg = m_arglist.append(*global_alloc(output_argument(manager, symbols, filename, *argnode)));
@@ -504,7 +504,7 @@ void cheat_script::script_entry::execute(cheat_manager &manager, UINT64 &arginde
// iterate over arguments and evaluate them
UINT64 params[MAX_ARGUMENTS];
int curarg = 0;
- for (output_argument *arg = m_arglist.first(); arg != NULL; arg = arg->next())
+ for (output_argument *arg = m_arglist.first(); arg != nullptr; arg = arg->next())
curarg += arg->values(argindex, &params[curarg]);
// generate the astring
@@ -557,7 +557,7 @@ void cheat_script::script_entry::save(emu_file &cheatfile) const
else
{
cheatfile.printf(">\n");
- for (const output_argument *curarg = m_arglist.first(); curarg != NULL; curarg = curarg->next())
+ for (const output_argument *curarg = m_arglist.first(); curarg != nullptr; curarg = curarg->next())
curarg->save(cheatfile);
cheatfile.printf("\t\t\t</output>\n");
}
@@ -574,21 +574,21 @@ void cheat_script::script_entry::validate_format(const char *filename, int line)
{
// first count arguments
int argsprovided = 0;
- for (const output_argument *curarg = m_arglist.first(); curarg != NULL; curarg = curarg->next())
+ for (const output_argument *curarg = m_arglist.first(); curarg != nullptr; curarg = curarg->next())
argsprovided += curarg->count();
// now scan the string for valid argument usage
const char *p = strchr(m_format.c_str(), '%');
int argscounted = 0;
- while (p != NULL)
+ while (p != nullptr)
{
// skip past any valid attributes
p++;
- while (strchr("lh0123456789.-+ #", *p) != NULL)
+ while (strchr("lh0123456789.-+ #", *p) != nullptr)
p++;
// look for a valid type
- if (strchr("cdiouxX", *p) == NULL)
+ if (strchr("cdiouxX", *p) == nullptr)
throw emu_fatalerror("%s.xml(%d): invalid format specification \"%s\"\n", filename, line, m_format.c_str());
argscounted++;
@@ -609,7 +609,7 @@ void cheat_script::script_entry::validate_format(const char *filename, int line)
//-------------------------------------------------
cheat_script::script_entry::output_argument::output_argument(cheat_manager &manager, symbol_table &symbols, const char *filename, xml_data_node &argnode)
- : m_next(NULL),
+ : m_next(nullptr),
m_expression(&symbols),
m_count(0)
{
@@ -618,7 +618,7 @@ cheat_script::script_entry::output_argument::output_argument(cheat_manager &mana
// read the expression
const char *expression = argnode.value;
- if (expression == NULL || expression[0] == 0)
+ if (expression == nullptr || expression[0] == 0)
throw emu_fatalerror("%s.xml(%d): missing expression in argument tag\n", filename, argnode.line);
// parse it
@@ -681,7 +681,7 @@ void cheat_script::script_entry::output_argument::save(emu_file &cheatfile) cons
cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, const char *filename, xml_data_node &cheatnode)
: m_manager(manager),
- m_next(NULL),
+ m_next(nullptr),
m_symbols(&manager.machine(), &globaltable),
m_state(SCRIPT_STATE_OFF),
m_numtemp(DEFAULT_TEMP_VARIABLES),
@@ -699,8 +699,8 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons
m_numtemp = tempcount;
// get the description
- const char *description = xml_get_attribute_string(&cheatnode, "desc", NULL);
- if (description == NULL || description[0] == 0)
+ const char *description = xml_get_attribute_string(&cheatnode, "desc", nullptr);
+ if (description == nullptr || description[0] == 0)
throw emu_fatalerror("%s.xml(%d): empty or missing desc attribute on cheat\n", filename, cheatnode.line);
m_description = description;
@@ -714,36 +714,36 @@ cheat_entry::cheat_entry(cheat_manager &manager, symbol_table &globaltable, cons
// read the first comment node
xml_data_node *commentnode = xml_get_sibling(cheatnode.child, "comment");
- if (commentnode != NULL)
+ if (commentnode != nullptr)
{
// set the value if not NULL
- if (commentnode->value != NULL && commentnode->value[0] != 0)
+ if (commentnode->value != nullptr && commentnode->value[0] != 0)
m_comment.assign(commentnode->value);
// only one comment is kept
commentnode = xml_get_sibling(commentnode->next, "comment");
- if (commentnode != NULL)
+ if (commentnode != nullptr)
osd_printf_warning("%s.xml(%d): only one comment node is retained; ignoring additional nodes\n", filename, commentnode->line);
}
// read the first parameter node
xml_data_node *paramnode = xml_get_sibling(cheatnode.child, "parameter");
- if (paramnode != NULL)
+ if (paramnode != nullptr)
{
// load this parameter
m_parameter.reset(global_alloc(cheat_parameter(manager, m_symbols, filename, *paramnode)));
// only one parameter allowed
paramnode = xml_get_sibling(paramnode->next, "parameter");
- if (paramnode != NULL)
+ if (paramnode != nullptr)
osd_printf_warning("%s.xml(%d): only one parameter node allowed; ignoring additional nodes\n", filename, paramnode->line);
}
// read the script nodes
- for (xml_data_node *scriptnode = xml_get_sibling(cheatnode.child, "script"); scriptnode != NULL; scriptnode = xml_get_sibling(scriptnode->next, "script"))
+ for (xml_data_node *scriptnode = xml_get_sibling(cheatnode.child, "script"); scriptnode != nullptr; scriptnode = xml_get_sibling(scriptnode->next, "script"))
{
// load this entry
- cheat_script *curscript = global_alloc(cheat_script(manager, m_symbols, filename, *scriptnode));
+ auto curscript = global_alloc(cheat_script(manager, m_symbols, filename, *scriptnode));
// if we have a script already for this slot, it is an error
std::unique_ptr<cheat_script> &slot = script_for_state(curscript->state());
@@ -778,13 +778,13 @@ cheat_entry::~cheat_entry()
void cheat_entry::save(emu_file &cheatfile) const
{
// determine if we have scripts
- bool has_scripts = (m_off_script != NULL || m_on_script != NULL || m_run_script != NULL || m_change_script != NULL);
+ bool has_scripts = (m_off_script != nullptr || m_on_script != nullptr || m_run_script != nullptr || m_change_script != nullptr);
// output the cheat tag
cheatfile.printf("\t<cheat desc=\"%s\"", m_description.c_str());
if (m_numtemp != DEFAULT_TEMP_VARIABLES)
cheatfile.printf(" tempvariables=\"%d\"", m_numtemp);
- if (m_comment.empty() && m_parameter == NULL && !has_scripts)
+ if (m_comment.empty() && m_parameter == nullptr && !has_scripts)
cheatfile.printf(" />\n");
else
{
@@ -795,17 +795,17 @@ void cheat_entry::save(emu_file &cheatfile) const
cheatfile.printf("\t\t<comment><![CDATA[\n%s\n\t\t]]></comment>\n", m_comment.c_str());
// output the parameter, if present
- if (m_parameter != NULL)
+ if (m_parameter != nullptr)
m_parameter->save(cheatfile);
// output the script nodes
- if (m_on_script != NULL)
+ if (m_on_script != nullptr)
m_on_script->save(cheatfile);
- if (m_off_script != NULL)
+ if (m_off_script != nullptr)
m_off_script->save(cheatfile);
- if (m_change_script != NULL)
+ if (m_change_script != nullptr)
m_change_script->save(cheatfile);
- if (m_run_script != NULL)
+ if (m_run_script != nullptr)
m_run_script->save(cheatfile);
// close the cheat tag
@@ -885,7 +885,7 @@ bool cheat_entry::select_previous_state()
changed = set_state(SCRIPT_STATE_OFF);
// if we have a parameter, set the previous state
- else if (m_parameter != NULL)
+ else if (m_parameter != nullptr)
{
// if we're at our minimum, turn off
if (m_parameter->is_minimum())
@@ -924,7 +924,7 @@ bool cheat_entry::select_next_state()
changed = set_state(SCRIPT_STATE_RUN);
// if we have a parameter, set the next state
- else if (m_parameter != NULL)
+ else if (m_parameter != nullptr)
{
// if we're off, switch on to the minimum state
if (m_state == SCRIPT_STATE_OFF)
@@ -981,7 +981,7 @@ void cheat_entry::menu_text(std::string &description, std::string &state, UINT32
}
// if we have a value parameter, compute it
- else if (m_parameter != NULL)
+ else if (m_parameter != nullptr)
{
if (m_state == SCRIPT_STATE_OFF)
{
@@ -1060,8 +1060,8 @@ cheat_manager::cheat_manager(running_machine &machine)
// create a global symbol table
m_symtable.add("frame", symbol_table::READ_ONLY, &m_framecount);
- m_symtable.add("frombcd", NULL, 1, 1, execute_frombcd);
- m_symtable.add("tobcd", NULL, 1, 1, execute_tobcd);
+ m_symtable.add("frombcd", nullptr, 1, 1, execute_frombcd);
+ m_symtable.add("tobcd", nullptr, 1, 1, execute_tobcd);
// we rely on the debugger expression callbacks; if the debugger isn't
// enabled, we must jumpstart them manually
@@ -1091,7 +1091,7 @@ void cheat_manager::set_enable(bool enable)
if (!m_disabled && !enable)
{
// iterate over running cheats and execute any OFF Scripts
- for (cheat_entry *cheat = m_cheatlist.first(); cheat != NULL; cheat = cheat->next())
+ for (cheat_entry *cheat = m_cheatlist.first(); cheat != nullptr; cheat = cheat->next())
if (cheat->state() == SCRIPT_STATE_RUN)
cheat->execute_off_script();
machine().popmessage("Cheats Disabled");
@@ -1103,7 +1103,7 @@ void cheat_manager::set_enable(bool enable)
{
// iterate over running cheats and execute any ON Scripts
m_disabled = false;
- for (cheat_entry *cheat = m_cheatlist.first(); cheat != NULL; cheat = cheat->next())
+ for (cheat_entry *cheat = m_cheatlist.first(); cheat != nullptr; cheat = cheat->next())
if (cheat->state() == SCRIPT_STATE_RUN)
cheat->execute_on_script();
machine().popmessage("Cheats Enabled");
@@ -1134,13 +1134,13 @@ void cheat_manager::reload()
// load the cheat file, if it's a system that has a software list then try softlist_name/shortname.xml first,
// if it fails to load then try to load via crc32 - basename/crc32.xml ( eg. 01234567.xml )
image_interface_iterator iter(machine().root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
if (image->exists())
{
// if we are loading through a software list, try to load softlist_name/shortname.xml
// this allows the coexistence of arcade cheats with cheats for home conversions which
// have the same shortname
- if (image->software_entry() != NULL)
+ if (image->software_entry() != nullptr)
{
std::string filename;
strprintf(filename, "%s%s%s", image->software_list_name(), PATH_SEPARATOR, image->basename());
@@ -1195,7 +1195,7 @@ bool cheat_manager::save_all(const char *filename)
cheatfile.printf("<mamecheat version=\"%d\">\n", CHEAT_VERSION);
// iterate over cheats in the list and save them
- for (cheat_entry *cheat = m_cheatlist.first(); cheat != NULL; cheat = cheat->next())
+ for (cheat_entry *cheat = m_cheatlist.first(); cheat != nullptr; cheat = cheat->next())
cheat->save(cheatfile);
// close out the file
@@ -1228,7 +1228,7 @@ void cheat_manager::render_text(render_container &container)
machine().ui().draw_text_full(&container, m_output[linenum].c_str(),
0.0f, (float)linenum * machine().ui().get_line_height(), 1.0f,
m_justify[linenum], WRAP_NEVER, DRAW_OPAQUE,
- ARGB_WHITE, ARGB_BLACK, NULL, NULL);
+ ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
}
}
@@ -1350,11 +1350,11 @@ void cheat_manager::frame_update()
m_lastline = 0;
m_numlines = floor(1.0f / machine().ui().get_line_height());
m_numlines = MIN(m_numlines, ARRAY_LENGTH(m_output));
- for (int linenum = 0; linenum < ARRAY_LENGTH(m_output); linenum++)
- m_output[linenum].clear();
+ for (auto & elem : m_output)
+ elem.clear();
// iterate over running cheats and execute them
- for (cheat_entry *cheat = m_cheatlist.first(); cheat != NULL; cheat = cheat->next())
+ for (cheat_entry *cheat = m_cheatlist.first(); cheat != nullptr; cheat = cheat->next())
cheat->frame_update();
// increment the frame counter
@@ -1369,7 +1369,7 @@ void cheat_manager::frame_update()
void cheat_manager::load_cheats(const char *filename)
{
- xml_data_node *rootnode = NULL;
+ xml_data_node *rootnode = nullptr;
emu_file cheatfile(machine().options().cheat_path(), OPEN_FLAG_READ);
try
{
@@ -1382,18 +1382,18 @@ void cheat_manager::load_cheats(const char *filename)
osd_printf_verbose("Loading cheats file from %s\n", cheatfile.fullpath());
// read the XML file into internal data structures
- xml_parse_options options = { 0 };
+ xml_parse_options options = { nullptr };
xml_parse_error error;
options.error = &error;
rootnode = xml_file_read(cheatfile, &options);
// if unable to parse the file, just bail
- if (rootnode == NULL)
+ if (rootnode == nullptr)
throw emu_fatalerror("%s.xml(%d): error parsing XML (%s)\n", filename, error.error_line, error.error_message);
// find the layout node
xml_data_node *mamecheatnode = xml_get_sibling(rootnode->child, "mamecheat");
- if (mamecheatnode == NULL)
+ if (mamecheatnode == nullptr)
throw emu_fatalerror("%s.xml: missing mamecheatnode node", filename);
// validate the config data version
@@ -1402,15 +1402,15 @@ void cheat_manager::load_cheats(const char *filename)
throw emu_fatalerror("%s.xml(%d): Invalid cheat XML file: unsupported version", filename, mamecheatnode->line);
// parse all the elements
- for (xml_data_node *cheatnode = xml_get_sibling(mamecheatnode->child, "cheat"); cheatnode != NULL; cheatnode = xml_get_sibling(cheatnode->next, "cheat"))
+ for (xml_data_node *cheatnode = xml_get_sibling(mamecheatnode->child, "cheat"); cheatnode != nullptr; cheatnode = xml_get_sibling(cheatnode->next, "cheat"))
{
// load this entry
- cheat_entry *curcheat = global_alloc(cheat_entry(*this, m_symtable, filename, *cheatnode));
+ auto curcheat = global_alloc(cheat_entry(*this, m_symtable, filename, *cheatnode));
// make sure we're not a duplicate
- cheat_entry *scannode = NULL;
+ cheat_entry *scannode = nullptr;
if (REMOVE_DUPLICATE_CHEATS)
- for (scannode = m_cheatlist.first(); scannode != NULL; scannode = scannode->next())
+ for (scannode = m_cheatlist.first(); scannode != nullptr; scannode = scannode->next())
if (strcmp(scannode->description(), curcheat->description()) == 0)
{
osd_printf_verbose("Ignoring duplicate cheat '%s' from file %s\n", curcheat->description(), cheatfile.fullpath());
@@ -1418,7 +1418,7 @@ void cheat_manager::load_cheats(const char *filename)
}
// add to the end of the list
- if (scannode == NULL)
+ if (scannode == nullptr)
m_cheatlist.append(*curcheat);
else
global_free(curcheat);
@@ -1437,7 +1437,7 @@ void cheat_manager::load_cheats(const char *filename)
{
osd_printf_error("%s\n", err.string());
m_cheatlist.reset();
- if (rootnode != NULL)
+ if (rootnode != nullptr)
xml_file_free(rootnode);
}
}
diff --git a/src/emu/cheat.h b/src/emu/cheat.h
index a8094b3d189..197de382cd3 100644
--- a/src/emu/cheat.h
+++ b/src/emu/cheat.h
@@ -97,7 +97,7 @@ private:
public:
// construction/destruction
item(const char *text, UINT64 value, int valformat)
- : m_next(NULL),
+ : m_next(nullptr),
m_text(text),
m_value(value, valformat) { }
@@ -225,10 +225,10 @@ public:
const char *comment() const { return m_comment.c_str(); }
// script detection
- bool has_run_script() const { return (m_run_script != NULL); }
- bool has_on_script() const { return (m_on_script != NULL); }
- bool has_off_script() const { return (m_off_script != NULL); }
- bool has_change_script() const { return (m_change_script != NULL); }
+ bool has_run_script() const { return (m_run_script != nullptr); }
+ bool has_on_script() const { return (m_on_script != nullptr); }
+ bool has_off_script() const { return (m_off_script != nullptr); }
+ bool has_change_script() const { return (m_change_script != nullptr); }
// script execution
void execute_off_script() { if (has_off_script()) m_off_script->execute(m_manager, m_argindex); }
@@ -237,12 +237,12 @@ public:
void execute_change_script() { if (has_change_script()) m_change_script->execute(m_manager, m_argindex); }
// cheat classification
- bool is_text_only() const { return (m_parameter == NULL && !has_run_script() && !has_off_script() && !has_on_script()); }
- bool is_oneshot() const { return (m_parameter == NULL && !has_run_script() && !has_off_script() && has_on_script()); }
- bool is_onoff() const { return (m_parameter == NULL && (has_run_script() || (has_off_script() && has_on_script()))); }
- bool is_value_parameter() const { return (m_parameter != NULL && !m_parameter->has_itemlist()); }
- bool is_itemlist_parameter() const { return (m_parameter != NULL && m_parameter->has_itemlist()); }
- bool is_oneshot_parameter() const { return (m_parameter != NULL && !has_run_script() && !has_off_script() && has_change_script()); }
+ bool is_text_only() const { return (m_parameter == nullptr && !has_run_script() && !has_off_script() && !has_on_script()); }
+ bool is_oneshot() const { return (m_parameter == nullptr && !has_run_script() && !has_off_script() && has_on_script()); }
+ bool is_onoff() const { return (m_parameter == nullptr && (has_run_script() || (has_off_script() && has_on_script()))); }
+ bool is_value_parameter() const { return (m_parameter != nullptr && !m_parameter->has_itemlist()); }
+ bool is_itemlist_parameter() const { return (m_parameter != nullptr && m_parameter->has_itemlist()); }
+ bool is_oneshot_parameter() const { return (m_parameter != nullptr && !has_run_script() && !has_off_script() && has_change_script()); }
// actions
bool activate();
diff --git a/src/emu/clifront.cpp b/src/emu/clifront.cpp
index dcb557687f9..8df0df626b3 100644
--- a/src/emu/clifront.cpp
+++ b/src/emu/clifront.cpp
@@ -116,7 +116,7 @@ int cli_frontend::execute(int argc, char **argv)
if (*(m_options.software_name()) != 0)
{
const game_driver *system = m_options.system();
- if (system == NULL && *(m_options.system_name()) != 0)
+ if (system == nullptr && *(m_options.system_name()) != 0)
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name());
machine_config config(*system, m_options);
@@ -125,25 +125,25 @@ int cli_frontend::execute(int argc, char **argv)
throw emu_fatalerror(MAMERR_FATALERROR, "Error: unknown option: %s\n", m_options.software_name());
bool found = false;
- for (software_list_device *swlistdev = iter.first(); swlistdev != NULL; swlistdev = iter.next())
+ for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next())
{
software_info *swinfo = swlistdev->find(m_options.software_name());
- if (swinfo != NULL)
+ if (swinfo != nullptr)
{
// loop through all parts
- for (software_part *swpart = swinfo->first_part(); swpart != NULL; swpart = swpart->next())
+ for (software_part *swpart = swinfo->first_part(); swpart != nullptr; swpart = swpart->next())
{
const char *mount = swpart->feature("automount");
if (swpart->is_compatible(*swlistdev))
{
- if (mount == NULL || strcmp(mount,"no") != 0)
+ if (mount == nullptr || strcmp(mount,"no") != 0)
{
// search for an image device with the right interface
image_interface_iterator imgiter(config.root_device());
- for (device_image_interface *image = imgiter.first(); image != NULL; image = imgiter.next())
+ for (device_image_interface *image = imgiter.first(); image != nullptr; image = imgiter.next())
{
const char *interface = image->image_interface();
- if (interface != NULL)
+ if (interface != nullptr)
{
if (swpart->matches_interface(interface))
{
@@ -173,8 +173,8 @@ int cli_frontend::execute(int argc, char **argv)
}
if (!found)
{
- software_list_device::display_matches(config, NULL, m_options.software_name());
- throw emu_fatalerror(MAMERR_FATALERROR, NULL);
+ software_list_device::display_matches(config, nullptr, m_options.software_name());
+ throw emu_fatalerror(MAMERR_FATALERROR, nullptr);
}
}
@@ -182,7 +182,7 @@ int cli_frontend::execute(int argc, char **argv)
if (!m_options.parse_command_line(argc, argv, option_errors))
{
// if we failed, check for no command and a system name first; in that case error on the name
- if (*(m_options.command()) == 0 && m_options.system() == NULL && *(m_options.system_name()) != 0)
+ if (*(m_options.command()) == 0 && m_options.system() == nullptr && *(m_options.system_name()) != 0)
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name());
// otherwise, error on the options
@@ -214,7 +214,7 @@ int cli_frontend::execute(int argc, char **argv)
// if we can't find it, give an appropriate error
const game_driver *system = m_options.system();
- if (system == NULL && *(m_options.system_name()) != 0)
+ if (system == nullptr && *(m_options.system_name()) != 0)
throw emu_fatalerror(MAMERR_NO_SUCH_GAME, "Unknown system '%s'", m_options.system_name());
// otherwise just run the game
@@ -234,7 +234,7 @@ int cli_frontend::execute(int argc, char **argv)
// if a game was specified, wasn't a wildcard, and our error indicates this was the
// reason for failure, offer some suggestions
- if (m_result == MAMERR_NO_SUCH_GAME && *(m_options.system_name()) != 0 && strchr(m_options.system_name(), '*') == NULL && m_options.system() == NULL)
+ if (m_result == MAMERR_NO_SUCH_GAME && *(m_options.system_name()) != 0 && strchr(m_options.system_name(), '*') == nullptr && m_options.system() == nullptr)
{
// get the top 16 approximate matches
driver_enumerator drivlist(m_options);
@@ -244,9 +244,9 @@ int cli_frontend::execute(int argc, char **argv)
// print them out
osd_printf_error("\n\"%s\" approximately matches the following\n"
"supported %s (best match first):\n\n", m_options.system_name(),emulator_info::get_gamesnoun());
- for (int matchnum = 0; matchnum < ARRAY_LENGTH(matches); matchnum++)
- if (matches[matchnum] != -1)
- osd_printf_error("%-18s%s\n", drivlist.driver(matches[matchnum]).name, drivlist.driver(matches[matchnum]).description);
+ for (auto & matche : matches)
+ if (matche != -1)
+ osd_printf_error("%-18s%s\n", drivlist.driver(matche).name, drivlist.driver(matche).description);
}
}
catch (emu_exception &)
@@ -442,7 +442,7 @@ void cli_frontend::listcrc(const char *gamename)
while (drivlist.next())
{
device_iterator deviter(drivlist.config().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
for (const rom_entry *region = rom_first_region(*device); region; region = rom_next_region(region))
for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom))
{
@@ -481,7 +481,7 @@ void cli_frontend::listroms(const char *gamename)
// iterate through roms
device_iterator deviter(drivlist.config().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
for (const rom_entry *region = rom_first_region(*device); region; region = rom_next_region(region))
for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom))
{
@@ -546,10 +546,10 @@ void cli_frontend::listsamples(const char *gamename)
osd_printf_info("Samples required for driver \"%s\".\n", drivlist.driver().name);
// iterate over samples devices and print the samples from each one
- for (samples_device *device = iter.first(); device != NULL; device = iter.next())
+ for (samples_device *device = iter.first(); device != nullptr; device = iter.next())
{
samples_iterator sampiter(*device);
- for (const char *samplename = sampiter.first(); samplename != NULL; samplename = sampiter.next())
+ for (const char *samplename = sampiter.first(); samplename != nullptr; samplename = sampiter.next())
osd_printf_info("%s\n", samplename);
}
}
@@ -588,16 +588,16 @@ void cli_frontend::listdevices(const char *gamename)
// build a list of devices
device_iterator iter(drivlist.config().root_device());
std::vector<device_t *> device_list;
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device_list.push_back(device);
// sort them by tag
qsort(&device_list[0], device_list.size(), sizeof(device_list[0]), compare_devices);
// dump the results
- for (unsigned int index = 0; index < device_list.size(); index++)
+ for (auto device : device_list)
{
- device_t *device = device_list[index];
+
// extract the tag, stripping the leading colon
const char *tag = device->tag();
@@ -661,7 +661,7 @@ void cli_frontend::listslots(const char *gamename)
// iterate
slot_interface_iterator iter(drivlist.config().root_device());
bool first = true;
- for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (const device_slot_interface *slot = iter.first(); slot != nullptr; slot = iter.next())
{
if (slot->fixed()) continue;
// output the line, up to the list of extensions
@@ -670,7 +670,7 @@ void cli_frontend::listslots(const char *gamename)
bool first_option = true;
// get the options and print them
- for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
+ for (const device_slot_option *option = slot->first_option(); option != nullptr; option = option->next())
{
if (option->selectable())
{
@@ -722,7 +722,7 @@ void cli_frontend::listmedia(const char *gamename)
// iterate
image_interface_iterator iter(drivlist.config().root_device());
bool first = true;
- for (const device_image_interface *imagedev = iter.first(); imagedev != NULL; imagedev = iter.next())
+ for (const device_image_interface *imagedev = iter.first(); imagedev != nullptr; imagedev = iter.next())
{
// extract the shortname with parentheses
std::string paren_shortname;
@@ -826,9 +826,9 @@ void cli_frontend::verifyroms(const char *gamename)
{
machine_config &config = dummy_drivlist.config();
device_iterator iter(config.root_device());
- for (device_t *dev = iter.first(); dev != NULL; dev = iter.next())
+ for (device_t *dev = iter.first(); dev != nullptr; dev = iter.next())
{
- if (dev->owner() != NULL && (*(dev->shortname()) != 0) && dev->rom_region() != NULL && (device_map.add(dev->shortname(), 0, false) != TMERR_DUPLICATE)) {
+ if (dev->owner() != nullptr && (*(dev->shortname()) != 0) && dev->rom_region() != nullptr && (device_map.add(dev->shortname(), 0, false) != TMERR_DUPLICATE)) {
if (core_strwildcmp(gamename, dev->shortname()) == 0)
{
matched++;
@@ -877,9 +877,9 @@ void cli_frontend::verifyroms(const char *gamename)
}
slot_interface_iterator slotiter(config.root_device());
- for (const device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next())
+ for (const device_slot_interface *slot = slotiter.first(); slot != nullptr; slot = slotiter.next())
{
- for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
+ for (const device_slot_option *option = slot->first_option(); option != nullptr; option = option->next())
{
std::string temptag("_");
temptag.append(option->name());
@@ -887,7 +887,7 @@ void cli_frontend::verifyroms(const char *gamename)
// notify this device and all its subdevices that they are now configured
device_iterator subiter(*dev);
- for (device_t *device = subiter.first(); device != NULL; device = subiter.next())
+ for (device_t *device = subiter.first(); device != nullptr; device = subiter.next())
if (!device->configured())
device->config_complete();
@@ -895,7 +895,7 @@ void cli_frontend::verifyroms(const char *gamename)
if (core_strwildcmp(gamename, dev->shortname()) == 0)
{
matched++;
- if (dev->rom_region() != NULL)
+ if (dev->rom_region() != nullptr)
{
// audit the ROMs in this set
media_auditor::summary summary = auditor.audit_device(dev, AUDIT_VALIDATE_FAST);
@@ -1126,10 +1126,10 @@ void cli_frontend::output_single_softlist(FILE *out, software_list_device &swlis
std::string tempstr;
fprintf(out, "\t<softwarelist name=\"%s\" description=\"%s\">\n", swlistdev.list_name(), xml_normalize_string(swlistdev.description()));
- for (software_info *swinfo = swlistdev.first_software_info(); swinfo != NULL; swinfo = swinfo->next())
+ for (software_info *swinfo = swlistdev.first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
{
fprintf( out, "\t\t<software name=\"%s\"", swinfo->shortname() );
- if ( swinfo->parentname() != NULL )
+ if ( swinfo->parentname() != nullptr )
fprintf( out, " cloneof=\"%s\"", swinfo->parentname() );
if ( swinfo->supported() == SOFTWARE_SUPPORTED_PARTIAL )
fprintf( out, " supported=\"partial\"" );
@@ -1140,18 +1140,18 @@ void cli_frontend::output_single_softlist(FILE *out, software_list_device &swlis
fprintf( out, "\t\t\t<year>%s</year>\n", xml_normalize_string( swinfo->year() ) );
fprintf( out, "\t\t\t<publisher>%s</publisher>\n", xml_normalize_string( swinfo->publisher() ) );
- for (feature_list_item *flist = swinfo->other_info(); flist != NULL; flist = flist->next())
+ for (feature_list_item *flist = swinfo->other_info(); flist != nullptr; flist = flist->next())
fprintf( out, "\t\t\t<info name=\"%s\" value=\"%s\"/>\n", flist->name(), xml_normalize_string( flist->value() ) );
- for ( software_part *part = swinfo->first_part(); part != NULL; part = part->next() )
+ for ( software_part *part = swinfo->first_part(); part != nullptr; part = part->next() )
{
fprintf( out, "\t\t\t<part name=\"%s\"", part->name() );
- if ( part->interface() != NULL )
+ if ( part->interface() != nullptr )
fprintf( out, " interface=\"%s\"", part->interface() );
fprintf( out, ">\n");
- for (feature_list_item *flist = part->featurelist(); flist != NULL; flist = flist->next())
+ for (feature_list_item *flist = part->featurelist(); flist != nullptr; flist = flist->next())
fprintf( out, "\t\t\t\t<feature name=\"%s\" value=\"%s\" />\n", flist->name(), xml_normalize_string(flist->value()) );
/* TODO: display rom region information */
@@ -1261,9 +1261,9 @@ void cli_frontend::listsoftware(const char *gamename)
while (drivlist.next())
{
software_list_device_iterator iter(drivlist.config().root_device());
- for (software_list_device *swlistdev = iter.first(); swlistdev != NULL; swlistdev = iter.next())
+ for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next())
if (list_map.add(swlistdev->list_name(), 0, false) != TMERR_DUPLICATE)
- if (swlistdev->first_software_info() != NULL)
+ if (swlistdev->first_software_info() != nullptr)
{
if (isfirst) { fprintf(out, SOFTLIST_XML_BEGIN); isfirst = false; }
output_single_softlist(out, *swlistdev);
@@ -1304,13 +1304,13 @@ void cli_frontend::verifysoftware(const char *gamename)
matched++;
software_list_device_iterator iter(drivlist.config().root_device());
- for (software_list_device *swlistdev = iter.first(); swlistdev != NULL; swlistdev = iter.next())
+ for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next())
if (swlistdev->list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM)
if (list_map.add(swlistdev->list_name(), 0, false) != TMERR_DUPLICATE)
- if (swlistdev->first_software_info() != NULL)
+ if (swlistdev->first_software_info() != nullptr)
{
nrlists++;
- for (software_info *swinfo = swlistdev->first_software_info(); swinfo != NULL; swinfo = swinfo->next())
+ for (software_info *swinfo = swlistdev->first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
{
media_auditor::summary summary = auditor.audit_software(swlistdev->list_name(), swinfo, AUDIT_VALIDATE_FAST);
@@ -1392,9 +1392,9 @@ void cli_frontend::getsoftlist(const char *gamename)
while (drivlist.next())
{
software_list_device_iterator iter(drivlist.config().root_device());
- for (software_list_device *swlistdev = iter.first(); swlistdev != NULL; swlistdev = iter.next())
+ for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next())
if (core_strwildcmp(gamename, swlistdev->list_name()) == 0 && list_map.add(swlistdev->list_name(), 0, false) != TMERR_DUPLICATE)
- if (swlistdev->first_software_info() != NULL)
+ if (swlistdev->first_software_info() != nullptr)
{
if (isfirst) { fprintf( out, SOFTLIST_XML_BEGIN); isfirst = FALSE; }
output_single_softlist(out, *swlistdev);
@@ -1425,14 +1425,14 @@ void cli_frontend::verifysoftlist(const char *gamename)
while (drivlist.next())
{
software_list_device_iterator iter(drivlist.config().root_device());
- for (software_list_device *swlistdev = iter.first(); swlistdev != NULL; swlistdev = iter.next())
+ for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next())
if (core_strwildcmp(gamename, swlistdev->list_name()) == 0 && list_map.add(swlistdev->list_name(), 0, false) != TMERR_DUPLICATE)
- if (swlistdev->first_software_info() != NULL)
+ if (swlistdev->first_software_info() != nullptr)
{
matched++;
// Get the actual software list contents
- for (software_info *swinfo = swlistdev->first_software_info(); swinfo != NULL; swinfo = swinfo->next())
+ for (software_info *swinfo = swlistdev->first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
{
media_auditor::summary summary = auditor.audit_software(swlistdev->list_name(), swinfo, AUDIT_VALIDATE_FAST);
@@ -1614,12 +1614,12 @@ void cli_frontend::execute_commands(const char *exename)
};
// find the command
- for (int cmdindex = 0; cmdindex < ARRAY_LENGTH(info_commands); cmdindex++)
- if (strcmp(m_options.command(), info_commands[cmdindex].option) == 0)
+ for (auto & info_command : info_commands)
+ if (strcmp(m_options.command(), info_command.option) == 0)
{
// parse any relevant INI files before proceeding
const char *sysname = m_options.system_name();
- (this->*info_commands[cmdindex].function)((sysname[0] == 0) ? "*" : sysname);
+ (this->*info_command.function)((sysname[0] == 0) ? "*" : sysname);
return;
}
@@ -1685,10 +1685,10 @@ void media_identifier::identify(const char *filename)
{
// first try to open as a directory
osd_directory *directory = osd_opendir(filename);
- if (directory != NULL)
+ if (directory != nullptr)
{
// iterate over all files in the directory
- for (const osd_directory_entry *entry = osd_readdir(directory); entry != NULL; entry = osd_readdir(directory))
+ for (const osd_directory_entry *entry = osd_readdir(directory); entry != nullptr; entry = osd_readdir(directory))
if (entry->type == ENTTYPE_FILE)
{
std::string curfile = std::string(filename).append(PATH_SEPARATOR).append(entry->name);
@@ -1703,16 +1703,16 @@ void media_identifier::identify(const char *filename)
if (core_filename_ends_with(filename, ".7z"))
{
// first attempt to examine it as a valid _7Z file
- _7z_file *_7z = NULL;
+ _7z_file *_7z = nullptr;
_7z_error _7zerr = _7z_file_open(filename, &_7z);
- if (_7zerr == _7ZERR_NONE && _7z != NULL)
+ if (_7zerr == _7ZERR_NONE && _7z != nullptr)
{
// loop over entries in the .7z, skipping empty files and directories
for (int i = 0; i < _7z->db.db.NumFiles; i++)
{
const CSzFileItem *f = _7z->db.db.Files + i;
_7z->curr_file_idx = i;
- int namelen = SzArEx_GetFileNameUtf16(&_7z->db, i, NULL);
+ int namelen = SzArEx_GetFileNameUtf16(&_7z->db, i, nullptr);
std::vector<UINT16> temp(namelen);
dynamic_buffer temp2(namelen+1);
UINT8* temp3 = &temp2[0];
@@ -1744,12 +1744,12 @@ void media_identifier::identify(const char *filename)
else if (core_filename_ends_with(filename, ".zip"))
{
// first attempt to examine it as a valid ZIP file
- zip_file *zip = NULL;
+ zip_file *zip = nullptr;
zip_error ziperr = zip_file_open(filename, &zip);
- if (ziperr == ZIPERR_NONE && zip != NULL)
+ if (ziperr == ZIPERR_NONE && zip != nullptr)
{
// loop over entries in the ZIP, skipping empty files and directories
- for (const zip_file_header *entry = zip_file_first_file(zip); entry != NULL; entry = zip_file_next_file(zip))
+ for (const zip_file_header *entry = zip_file_first_file(zip); entry != nullptr; entry = zip_file_next_file(zip))
if (entry->uncompressed_length != 0)
{
// decompress data into RAM and identify it
@@ -1847,7 +1847,7 @@ void media_identifier::identify_data(const char *name, const UINT8 *data, int le
if (core_filename_ends_with(name, ".jed") && jed_parse(data, length, &jed) == JEDERR_NONE)
{
// now determine the new data length and allocate temporary memory for it
- length = jedbin_output(&jed, NULL, 0);
+ length = jedbin_output(&jed, nullptr, 0);
tempjed.resize(length);
jedbin_output(&jed, &tempjed[0], length);
data = &tempjed[0];
@@ -1894,12 +1894,12 @@ int media_identifier::find_by_hash(const hash_collection &hashes, int length)
{
// iterate over devices, regions and files within the region */
device_iterator deviter(m_drivlist.config().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
{
if (shortnames.add(device->shortname(), 0, FALSE) != TMERR_DUPLICATE)
{
- for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
- for (const rom_entry *rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
+ for (const rom_entry *region = rom_first_region(*device); region != nullptr; region = rom_next_region(region))
+ for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
{
hash_collection romhashes(ROM_GETHASHDATA(rom));
if (!romhashes.flag(hash_collection::FLAG_NO_DUMP) && hashes == romhashes)
@@ -1918,14 +1918,14 @@ int media_identifier::find_by_hash(const hash_collection &hashes, int length)
// next iterate over softlists
software_list_device_iterator iter(m_drivlist.config().root_device());
- for (software_list_device *swlistdev = iter.first(); swlistdev != NULL; swlistdev = iter.next())
+ for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next())
{
if (listnames.add(swlistdev->list_name(), 0, FALSE) != TMERR_DUPLICATE)
{
- for (software_info *swinfo = swlistdev->first_software_info(); swinfo != NULL; swinfo = swinfo->next())
- for (software_part *part = swinfo->first_part(); part != NULL; part = part->next())
- for (const rom_entry *region = part->romdata(); region != NULL; region = rom_next_region(region))
- for (const rom_entry *rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
+ for (software_info *swinfo = swlistdev->first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
+ for (software_part *part = swinfo->first_part(); part != nullptr; part = part->next())
+ for (const rom_entry *region = part->romdata(); region != nullptr; region = rom_next_region(region))
+ for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
{
hash_collection romhashes(ROM_GETHASHDATA(rom));
if (hashes == romhashes)
diff --git a/src/emu/cliopts.cpp b/src/emu/cliopts.cpp
index cfe55972844..ba2cb33afe9 100644
--- a/src/emu/cliopts.cpp
+++ b/src/emu/cliopts.cpp
@@ -16,18 +16,18 @@
const options_entry cli_options::s_option_entries[] =
{
/* core commands */
- { NULL, NULL, OPTION_HEADER, "CORE COMMANDS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE COMMANDS" },
{ CLICOMMAND_HELP ";h;?", "0", OPTION_COMMAND, "show help message" },
{ CLICOMMAND_VALIDATE ";valid", "0", OPTION_COMMAND, "perform driver validation on all game drivers" },
/* configuration commands */
- { NULL, NULL, OPTION_HEADER, "CONFIGURATION COMMANDS" },
+ { nullptr, nullptr, OPTION_HEADER, "CONFIGURATION COMMANDS" },
{ CLICOMMAND_CREATECONFIG ";cc", "0", OPTION_COMMAND, "create the default configuration file" },
{ CLICOMMAND_SHOWCONFIG ";sc", "0", OPTION_COMMAND, "display running parameters" },
{ CLICOMMAND_SHOWUSAGE ";su", "0", OPTION_COMMAND, "show this help" },
/* frontend commands */
- { NULL, NULL, OPTION_HEADER, "FRONTEND COMMANDS" },
+ { nullptr, nullptr, OPTION_HEADER, "FRONTEND COMMANDS" },
{ CLICOMMAND_LISTXML ";lx", "0", OPTION_COMMAND, "all available info on driver in XML format" },
{ CLICOMMAND_LISTFULL ";ll", "0", OPTION_COMMAND, "short name, full name" },
{ CLICOMMAND_LISTSOURCE ";ls", "0", OPTION_COMMAND, "driver sourcefile" },
@@ -46,7 +46,7 @@ const options_entry cli_options::s_option_entries[] =
{ CLICOMMAND_VERIFYSOFTWARE ";vsoft", "0", OPTION_COMMAND, "verify known software for the system" },
{ CLICOMMAND_GETSOFTLIST ";glist", "0", OPTION_COMMAND, "retrieve software list by name" },
{ CLICOMMAND_VERIFYSOFTLIST ";vlist", "0", OPTION_COMMAND, "verify software list by name" },
- { NULL }
+ { nullptr }
};
//**************************************************************************
diff --git a/src/emu/config.cpp b/src/emu/config.cpp
index 7eb77de9cfd..65dbea7ce38 100644
--- a/src/emu/config.cpp
+++ b/src/emu/config.cpp
@@ -61,7 +61,7 @@ static int config_save_xml(running_machine &machine, emu_file &file, int type);
void config_init(running_machine &machine)
{
- typelist = NULL;
+ typelist = nullptr;
}
@@ -80,7 +80,7 @@ void config_register(running_machine &machine, const char *nodename, config_save
/* allocate a new type */
newtype = auto_alloc(machine, config_type);
- newtype->next = NULL;
+ newtype->next = nullptr;
newtype->name = nodename;
newtype->load = load;
newtype->save = save;
@@ -106,7 +106,7 @@ int config_load_settings(running_machine &machine)
/* loop over all registrants and call their init function */
for (type = typelist; type; type = type->next)
- type->load(CONFIG_TYPE_INIT, NULL);
+ type->load(CONFIG_TYPE_INIT, nullptr);
/* now load the controller file */
if (controller[0] != 0)
@@ -136,7 +136,7 @@ int config_load_settings(running_machine &machine)
/* loop over all registrants and call their final function */
for (type = typelist; type; type = type->next)
- type->load(CONFIG_TYPE_FINAL, NULL);
+ type->load(CONFIG_TYPE_FINAL, nullptr);
/* if we didn't find a saved config, return 0 so the main core knows that it */
/* is the first time the game is run and it should diplay the disclaimer. */
@@ -150,7 +150,7 @@ void config_save_settings(running_machine &machine)
/* loop over all registrants and call their init function */
for (type = typelist; type; type = type->next)
- type->save(CONFIG_TYPE_INIT, NULL);
+ type->save(CONFIG_TYPE_INIT, nullptr);
/* save the defaults file */
emu_file file(machine.options().cfg_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
@@ -165,7 +165,7 @@ void config_save_settings(running_machine &machine)
/* loop over all registrants and call their final function */
for (type = typelist; type; type = type->next)
- type->save(CONFIG_TYPE_FINAL, NULL);
+ type->save(CONFIG_TYPE_FINAL, nullptr);
}
@@ -184,7 +184,7 @@ static int config_load_xml(running_machine &machine, emu_file &file, int which_t
int version, count;
/* read the file */
- root = xml_file_read(file, NULL);
+ root = xml_file_read(file, nullptr);
if (!root)
goto error;
@@ -288,13 +288,13 @@ static int config_save_xml(running_machine &machine, emu_file &file, int which_t
return 0;
/* create a config node */
- confignode = xml_add_child(root, "mameconfig", NULL);
+ confignode = xml_add_child(root, "mameconfig", nullptr);
if (!confignode)
goto error;
xml_set_attribute_int(confignode, "version", CONFIG_VERSION);
/* create a system node */
- systemnode = xml_add_child(confignode, "system", NULL);
+ systemnode = xml_add_child(confignode, "system", nullptr);
if (!systemnode)
goto error;
xml_set_attribute(systemnode, "name", (which_type == CONFIG_TYPE_DEFAULT) ? "default" : machine.system().name);
@@ -303,7 +303,7 @@ static int config_save_xml(running_machine &machine, emu_file &file, int which_t
/* loop over all registrants and call their save function */
for (type = typelist; type; type = type->next)
{
- xml_data_node *curnode = xml_add_child(systemnode, type->name, NULL);
+ xml_data_node *curnode = xml_add_child(systemnode, type->name, nullptr);
if (!curnode)
goto error;
type->save(which_type, curnode);
diff --git a/src/emu/crsshair.cpp b/src/emu/crsshair.cpp
index 8244d7692d5..88cfb8dac02 100644
--- a/src/emu/crsshair.cpp
+++ b/src/emu/crsshair.cpp
@@ -152,7 +152,7 @@ static void create_bitmap(running_machine &machine, int player)
rgb_t color = crosshair_colors[player];
/* if we have a bitmap and texture for this player, kill it */
- if (global.bitmap[player] == NULL) {
+ if (global.bitmap[player] == nullptr) {
global.bitmap[player] = global_alloc(bitmap_argb32);
global.texture[player] = machine.render().texture_alloc(render_texture::hq_scale);
}
@@ -162,7 +162,7 @@ static void create_bitmap(running_machine &machine, int player)
{
/* look for user specified file */
sprintf(filename, "%s.png", global.name[player]);
- render_load_png(*global.bitmap[player], crossfile, NULL, filename);
+ render_load_png(*global.bitmap[player], crossfile, nullptr, filename);
}
else
{
@@ -172,7 +172,7 @@ static void create_bitmap(running_machine &machine, int player)
/* look for default cross?.png in crsshair dir */
if (!global.bitmap[player]->valid())
- render_load_png(*global.bitmap[player], crossfile, NULL, filename);
+ render_load_png(*global.bitmap[player], crossfile, nullptr, filename);
}
/* if that didn't work, use the built-in one */
@@ -218,8 +218,8 @@ void crosshair_init(running_machine &machine)
global.auto_time = CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT;
/* determine who needs crosshairs */
- for (ioport_port *port = machine.ioport().first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = machine.ioport().first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->crosshair_axis() != CROSSHAIR_AXIS_NONE)
{
int player = field->player();
@@ -243,7 +243,7 @@ void crosshair_init(running_machine &machine)
config_register(machine, "crosshairs", config_saveload_delegate(FUNC(crosshair_load), &machine), config_saveload_delegate(FUNC(crosshair_save), &machine));
/* register the animation callback */
- if (machine.first_screen() != NULL)
+ if (machine.first_screen() != nullptr)
machine.first_screen()->register_vblank_callback(vblank_state_delegate(FUNC(animate), &machine));
}
@@ -259,10 +259,10 @@ static void crosshair_exit(running_machine &machine)
for (int player = 0; player < MAX_PLAYERS; player++)
{
machine.render().texture_free(global.texture[player]);
- global.texture[player] = NULL;
+ global.texture[player] = nullptr;
global_free(global.bitmap[player]);
- global.bitmap[player] = NULL;
+ global.bitmap[player] = nullptr;
}
}
@@ -424,7 +424,7 @@ static void crosshair_load(running_machine &machine, int config_type, xml_data_n
return;
/* might not have any data */
- if (parentnode == NULL)
+ if (parentnode == nullptr)
return;
/* loop and get player crosshair info */
@@ -457,7 +457,7 @@ static void crosshair_load(running_machine &machine, int config_type, xml_data_n
/* get, check, and store auto visibility time */
crosshairnode = xml_get_sibling(parentnode->child, "autotime");
- if (crosshairnode != NULL)
+ if (crosshairnode != nullptr)
{
auto_time = xml_get_attribute_int(crosshairnode, "val", CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT);
if ((auto_time >= CROSSHAIR_VISIBILITY_AUTOTIME_MIN) && (auto_time <= CROSSHAIR_VISIBILITY_AUTOTIME_MAX))
@@ -487,9 +487,9 @@ static void crosshair_save(running_machine &machine, int config_type, xml_data_n
if (global.used[player])
{
/* create a node */
- crosshairnode = xml_add_child(parentnode, "crosshair", NULL);
+ crosshairnode = xml_add_child(parentnode, "crosshair", nullptr);
- if (crosshairnode != NULL)
+ if (crosshairnode != nullptr)
{
int changed = FALSE;
@@ -519,9 +519,9 @@ static void crosshair_save(running_machine &machine, int config_type, xml_data_n
if (global.auto_time != CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT)
{
/* create a node */
- crosshairnode = xml_add_child(parentnode, "autotime", NULL);
+ crosshairnode = xml_add_child(parentnode, "autotime", nullptr);
- if (crosshairnode != NULL)
+ if (crosshairnode != nullptr)
xml_set_attribute_int(crosshairnode, "val", global.auto_time);
}
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index 60b25df1928..08eec1307bd 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -170,7 +170,7 @@ static void execute_dumpkbd(running_machine &machine, int ref, int params, const
INLINE int cheat_address_is_valid(address_space &space, offs_t address)
{
- return debug_cpu_translate(space, TRANSLATE_READ, &address) && (space.get_write_ptr(address) != NULL);
+ return debug_cpu_translate(space, TRANSLATE_READ, &address) && (space.get_write_ptr(address) != nullptr);
}
@@ -240,9 +240,9 @@ void debug_command_init(running_machine &machine)
int itemnum;
/* add a few simple global functions */
- symtable->add("min", NULL, 2, 2, execute_min);
- symtable->add("max", NULL, 2, 2, execute_max);
- symtable->add("if", NULL, 3, 3, execute_if);
+ symtable->add("min", nullptr, 2, 2, execute_min);
+ symtable->add("max", nullptr, 2, 2, execute_max);
+ symtable->add("if", nullptr, 3, 3, execute_if);
/* add all single-entry save state globals */
for (itemnum = 0; itemnum < MAX_GLOBALS; itemnum++)
@@ -252,7 +252,7 @@ void debug_command_init(running_machine &machine)
/* stop when we run out of items */
name = machine.save().indexed_item(itemnum, base, valsize, valcount);
- if (name == NULL)
+ if (name == nullptr)
break;
/* if this is a single-entry global, add it */
@@ -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 */
- if (param == NULL)
+ if (param == nullptr)
return TRUE;
/* evaluate the expression; success if no error */
@@ -540,10 +540,10 @@ int debug_command_parameter_cpu(running_machine &machine, const char *param, dev
UINT64 cpunum;
/* if no parameter, use the visible CPU */
- if (param == NULL)
+ if (param == nullptr)
{
*result = debug_cpu_get_visible_cpu(machine);
- if (*result == NULL)
+ if (*result == nullptr)
{
debug_console_printf(machine, "No valid CPU is currently selected\n");
return FALSE;
@@ -553,7 +553,7 @@ int debug_command_parameter_cpu(running_machine &machine, const char *param, dev
/* first look for a tag match */
*result = machine.device(param);
- if (*result != NULL)
+ if (*result != nullptr)
return TRUE;
/* then evaluate as an expression; on an error assume it was a tag */
@@ -570,7 +570,7 @@ int debug_command_parameter_cpu(running_machine &machine, const char *param, dev
/* if we got a valid one, return */
const UINT64 original_cpunum = cpunum;
execute_interface_iterator iter(machine.root_device());
- for (device_execute_interface *exec = iter.first(); exec != NULL; exec = iter.next())
+ for (device_execute_interface *exec = iter.first(); exec != nullptr; exec = iter.next())
{
if (cpunum-- == 0)
{
@@ -618,7 +618,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 */
- if (param == NULL)
+ if (param == nullptr)
return TRUE;
/* parse the expression; success if no error */
@@ -648,7 +648,7 @@ static int debug_command_parameter_command(running_machine &machine, const char
CMDERR err;
/* NULL parameter does nothing and returns no error */
- if (param == NULL)
+ if (param == nullptr)
return TRUE;
/* validate the comment; success if no error */
@@ -1009,7 +1009,7 @@ static void execute_focus(running_machine &machine, int ref, int params, const c
/* then loop over CPUs and set the ignore flags on all other CPUs */
execute_interface_iterator iter(machine.root_device());
- for (device_execute_interface *exec = iter.first(); exec != NULL; exec = iter.next())
+ for (device_execute_interface *exec = iter.first(); exec != nullptr; exec = iter.next())
if (&exec->device() != cpu)
exec->device().debug()->ignore(true);
debug_console_printf(machine, "Now focused on CPU '%s'\n", cpu->tag());
@@ -1029,7 +1029,7 @@ static void execute_ignore(running_machine &machine, int ref, int params, const
/* loop over all executable devices */
execute_interface_iterator iter(machine.root_device());
- for (device_execute_interface *exec = iter.first(); exec != NULL; exec = iter.next())
+ for (device_execute_interface *exec = iter.first(); exec != nullptr; exec = iter.next())
/* build up a comma-separated list */
if (!exec->device().debug()->observing())
@@ -1062,7 +1062,7 @@ static void execute_ignore(running_machine &machine, int ref, int params, const
/* make sure this isn't the last live CPU */
execute_interface_iterator iter(machine.root_device());
bool gotone = false;
- for (device_execute_interface *exec = iter.first(); exec != NULL; exec = iter.next())
+ for (device_execute_interface *exec = iter.first(); exec != nullptr; exec = iter.next())
if (&exec->device() != devicelist[paramnum] && exec->device().debug()->observing())
{
gotone = true;
@@ -1094,7 +1094,7 @@ static void execute_observe(running_machine &machine, int ref, int params, const
/* loop over all executable devices */
execute_interface_iterator iter(machine.root_device());
- for (device_execute_interface *exec = iter.first(); exec != NULL; exec = iter.next())
+ for (device_execute_interface *exec = iter.first(); exec != nullptr; exec = iter.next())
/* build up a comma-separated list */
if (exec->device().debug()->observing())
@@ -1145,7 +1145,7 @@ static void execute_comment(running_machine &machine, int ref, int params, const
return;
/* CPU parameter is implicit */
- if (!debug_command_parameter_cpu(machine, NULL, &cpu))
+ if (!debug_command_parameter_cpu(machine, nullptr, &cpu))
return;
/* make sure param 2 exists */
@@ -1175,7 +1175,7 @@ static void execute_comment_del(running_machine &machine, int ref, int params, c
return;
/* CPU parameter is implicit */
- if (!debug_command_parameter_cpu(machine, NULL, &cpu))
+ if (!debug_command_parameter_cpu(machine, nullptr, &cpu))
return;
/* If it's a number, it must be an address */
@@ -1206,12 +1206,12 @@ static void execute_comment_save(running_machine &machine, int ref, int params,
static void execute_bpset(running_machine &machine, int ref, int params, const char *param[])
{
device_t *cpu;
- const char *action = NULL;
+ const char *action = nullptr;
UINT64 address;
int bpnum;
/* CPU is implicit */
- if (!debug_command_parameter_cpu(machine, NULL, &cpu))
+ if (!debug_command_parameter_cpu(machine, nullptr, &cpu))
return;
/* param 1 is the address */
@@ -1228,7 +1228,7 @@ static void execute_bpset(running_machine &machine, int ref, int params, const c
return;
/* set the breakpoint */
- bpnum = cpu->debug()->breakpoint_set(address, (condition.is_empty()) ? NULL : condition.original_string(), action);
+ bpnum = cpu->debug()->breakpoint_set(address, (condition.is_empty()) ? nullptr : condition.original_string(), action);
debug_console_printf(machine, "Breakpoint %X set\n", bpnum);
}
@@ -1246,7 +1246,7 @@ static void execute_bpclear(running_machine &machine, int ref, int params, const
if (params == 0)
{
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->debug()->breakpoint_clear_all();
debug_console_printf(machine, "Cleared all breakpoints\n");
}
@@ -1258,7 +1258,7 @@ static void execute_bpclear(running_machine &machine, int ref, int params, const
{
device_iterator iter(machine.root_device());
bool found = false;
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (device->debug()->breakpoint_clear(bpindex))
found = true;
if (found)
@@ -1282,7 +1282,7 @@ static void execute_bpdisenable(running_machine &machine, int ref, int params, c
if (params == 0)
{
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->debug()->breakpoint_enable_all(ref);
if (ref == 0)
debug_console_printf(machine, "Disabled all breakpoints\n");
@@ -1297,7 +1297,7 @@ static void execute_bpdisenable(running_machine &machine, int ref, int params, c
{
device_iterator iter(machine.root_device());
bool found = false;
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (device->debug()->breakpoint_enable(bpindex, ref))
found = true;
if (found)
@@ -1320,13 +1320,13 @@ static void execute_bplist(running_machine &machine, int ref, int params, const
/* loop over all CPUs */
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
- if (device->debug()->breakpoint_first() != NULL)
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
+ if (device->debug()->breakpoint_first() != nullptr)
{
debug_console_printf(machine, "Device '%s' breakpoints:\n", device->tag());
/* loop over the breakpoints */
- for (device_debug::breakpoint *bp = device->debug()->breakpoint_first(); bp != NULL; bp = bp->next())
+ for (device_debug::breakpoint *bp = device->debug()->breakpoint_first(); bp != nullptr; bp = bp->next())
{
strprintf(buffer, "%c%4X @ %s", bp->enabled() ? ' ' : 'D', bp->index(), core_i64_hex_format(bp->address(), device->debug()->logaddrchars()));
if (std::string(bp->condition()).compare("1") != 0)
@@ -1351,13 +1351,13 @@ static void execute_bplist(running_machine &machine, int ref, int params, const
static void execute_wpset(running_machine &machine, int ref, int params, const char *param[])
{
address_space *space;
- const char *action = NULL;
+ const char *action = nullptr;
UINT64 address, length;
int type;
int wpnum;
/* CPU is implicit */
- if (!debug_command_parameter_cpu_space(machine, NULL, ref, space))
+ if (!debug_command_parameter_cpu_space(machine, nullptr, ref, space))
return;
/* param 1 is the address */
@@ -1391,7 +1391,7 @@ static void execute_wpset(running_machine &machine, int ref, int params, const c
return;
/* set the watchpoint */
- wpnum = space->device().debug()->watchpoint_set(*space, type, address, length, (condition.is_empty()) ? NULL : condition.original_string(), action);
+ wpnum = space->device().debug()->watchpoint_set(*space, type, address, length, (condition.is_empty()) ? nullptr : condition.original_string(), action);
debug_console_printf(machine, "Watchpoint %X set\n", wpnum);
}
@@ -1409,7 +1409,7 @@ static void execute_wpclear(running_machine &machine, int ref, int params, const
if (params == 0)
{
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->debug()->watchpoint_clear_all();
debug_console_printf(machine, "Cleared all watchpoints\n");
}
@@ -1421,7 +1421,7 @@ static void execute_wpclear(running_machine &machine, int ref, int params, const
{
device_iterator iter(machine.root_device());
bool found = false;
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (device->debug()->watchpoint_clear(wpindex))
found = true;
if (found)
@@ -1445,7 +1445,7 @@ static void execute_wpdisenable(running_machine &machine, int ref, int params, c
if (params == 0)
{
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->debug()->watchpoint_enable_all(ref);
if (ref == 0)
debug_console_printf(machine, "Disabled all watchpoints\n");
@@ -1460,7 +1460,7 @@ static void execute_wpdisenable(running_machine &machine, int ref, int params, c
{
device_iterator iter(machine.root_device());
bool found = false;
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (device->debug()->watchpoint_enable(wpindex, ref))
found = true;
if (found)
@@ -1483,9 +1483,9 @@ static void execute_wplist(running_machine &machine, int ref, int params, const
/* loop over all CPUs */
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
- if (device->debug()->watchpoint_first(spacenum) != NULL)
+ if (device->debug()->watchpoint_first(spacenum) != nullptr)
{
static const char *const types[] = { "unkn ", "read ", "write", "r/w " };
@@ -1493,7 +1493,7 @@ static void execute_wplist(running_machine &machine, int ref, int params, const
device->debug()->watchpoint_first(spacenum)->space().name());
/* loop over the watchpoints */
- for (device_debug::watchpoint *wp = device->debug()->watchpoint_first(spacenum); wp != NULL; wp = wp->next())
+ for (device_debug::watchpoint *wp = device->debug()->watchpoint_first(spacenum); wp != nullptr; wp = wp->next())
{
strprintf(buffer, "%c%4X @ %s-%s %s", wp->enabled() ? ' ' : 'D', wp->index(),
core_i64_hex_format(wp->space().byte_to_address(wp->address()), wp->space().addrchars()),
@@ -1521,11 +1521,11 @@ static void execute_wplist(running_machine &machine, int ref, int params, const
static void execute_rpset(running_machine &machine, int ref, int params, const char *param[])
{
device_t *cpu;
- const char *action = NULL;
+ const char *action = nullptr;
int bpnum;
/* CPU is implicit */
- if (!debug_command_parameter_cpu(machine, NULL, &cpu))
+ if (!debug_command_parameter_cpu(machine, nullptr, &cpu))
return;
/* param 1 is the condition */
@@ -1556,7 +1556,7 @@ static void execute_rpclear(running_machine &machine, int ref, int params, const
if (params == 0)
{
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->debug()->registerpoint_clear_all();
debug_console_printf(machine, "Cleared all registerpoints\n");
}
@@ -1568,7 +1568,7 @@ static void execute_rpclear(running_machine &machine, int ref, int params, const
{
device_iterator iter(machine.root_device());
bool found = false;
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (device->debug()->registerpoint_clear(rpindex))
found = true;
if (found)
@@ -1592,7 +1592,7 @@ static void execute_rpdisenable(running_machine &machine, int ref, int params, c
if (params == 0)
{
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->debug()->registerpoint_enable_all(ref);
if (ref == 0)
debug_console_printf(machine, "Disabled all registerpoints\n");
@@ -1607,7 +1607,7 @@ static void execute_rpdisenable(running_machine &machine, int ref, int params, c
{
device_iterator iter(machine.root_device());
bool found = false;
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (device->debug()->registerpoint_enable(rpindex, ref))
found = true;
if (found)
@@ -1630,17 +1630,17 @@ static void execute_rplist(running_machine &machine, int ref, int params, const
/* loop over all CPUs */
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
- if (device->debug()->registerpoint_first() != NULL)
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
+ if (device->debug()->registerpoint_first() != nullptr)
{
debug_console_printf(machine, "Device '%s' registerpoints:\n", device->tag());
/* loop over the breakpoints */
- for (device_debug::registerpoint *rp = device->debug()->registerpoint_first(); rp != NULL; rp = rp->next())
+ for (device_debug::registerpoint *rp = device->debug()->registerpoint_first(); rp != nullptr; rp = rp->next())
{
strprintf(buffer, "%c%4X ", rp->enabled() ? ' ' : 'D', rp->index());
strcatprintf(buffer, "if %s", rp->condition());
- if (rp->action() != NULL)
+ if (rp->action() != nullptr)
strcatprintf(buffer, " do %s", rp->action());
debug_console_printf(machine, "%s\n", buffer.c_str());
printed++;
@@ -1666,7 +1666,7 @@ static void execute_hotspot(running_machine &machine, int ref, int params, const
/* loop over CPUs and find live spots */
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (device->debug()->hotspot_tracking_enabled())
{
device->debug()->hotspot_track(0, 0);
@@ -1680,8 +1680,8 @@ static void execute_hotspot(running_machine &machine, int ref, int params, const
}
/* extract parameters */
- device_t *device = NULL;
- if (!debug_command_parameter_cpu(machine, (params > 0) ? param[0] : NULL, &device))
+ device_t *device = nullptr;
+ if (!debug_command_parameter_cpu(machine, (params > 0) ? param[0] : nullptr, &device))
return;
UINT64 count = 64;
if (!debug_command_parameter_number(machine, param[1], &count))
@@ -1719,7 +1719,7 @@ static void execute_stateload(running_machine &machine, int ref, int params, con
// Clear all PC & memory tracks
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
{
device->debug()->track_pc_data_clear();
device->debug()->track_mem_data_clear();
@@ -1744,7 +1744,7 @@ static void execute_save(running_machine &machine, int ref, int params, const ch
return;
if (!debug_command_parameter_number(machine, param[2], &length))
return;
- if (!debug_command_parameter_cpu_space(machine, (params > 3) ? param[3] : NULL, ref, space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 3) ? param[3] : nullptr, ref, space))
return;
/* determine the addresses to write */
@@ -1788,7 +1788,7 @@ static void execute_load(running_machine &machine, int ref, int params, const ch
return;
if (!debug_command_parameter_number(machine, param[2], &length))
return;
- if (!debug_command_parameter_cpu_space(machine, (params > 3) ? param[3] : NULL, ref, space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 3) ? param[3] : nullptr, ref, space))
return;
/* determine the addresses to read */
@@ -1842,7 +1842,7 @@ static void execute_dump(running_machine &machine, int ref, int params, const ch
return;
if (!debug_command_parameter_number(machine, param[4], &ascii))
return;
- if (!debug_command_parameter_cpu_space(machine, (params > 5) ? param[5] : NULL, ref, space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 5) ? param[5] : nullptr, ref, space))
return;
/* further validation */
@@ -1938,7 +1938,7 @@ static void execute_cheatinit(running_machine &machine, int ref, int params, con
memset(cheat_region, 0, sizeof(cheat_region));
/* validate parameters */
- if (!debug_command_parameter_cpu_space(machine, (params > 3) ? param[3] : NULL, AS_PROGRAM, space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 3) ? param[3] : nullptr, AS_PROGRAM, space))
return;
if (ref == 0)
@@ -1984,7 +1984,7 @@ static void execute_cheatinit(running_machine &machine, int ref, int params, con
/* initialize entire memory by default */
if (params <= 1)
{
- for (entry = space->map()->m_entrylist.first(); entry != NULL; entry = entry->next())
+ for (entry = space->map()->m_entrylist.first(); entry != nullptr; entry = entry->next())
{
cheat_region[region_count].offset = space->address_to_byte(entry->m_addrstart) & space->bytemask();
cheat_region[region_count].endoffset = space->address_to_byte(entry->m_addrend) & space->bytemask();
@@ -1992,9 +1992,9 @@ static void execute_cheatinit(running_machine &machine, int ref, int params, con
cheat_region[region_count].disabled = (entry->m_write.m_type == AMH_RAM) ? FALSE : TRUE;
/* disable double share regions */
- if (entry->m_share != NULL)
+ if (entry->m_share != nullptr)
for (i = 0; i < region_count; i++)
- if (cheat_region[i].share != NULL)
+ if (cheat_region[i].share != nullptr)
if (strcmp(cheat_region[i].share, entry->m_share) == 0)
cheat_region[region_count].disabled = TRUE;
@@ -2012,7 +2012,7 @@ static void execute_cheatinit(running_machine &machine, int ref, int params, con
/* force region to the specified range */
cheat_region[region_count].offset = space->address_to_byte(offset) & space->bytemask();
cheat_region[region_count].endoffset = space->address_to_byte(offset + length - 1) & space->bytemask();
- cheat_region[region_count].share = NULL;
+ cheat_region[region_count].share = nullptr;
cheat_region[region_count].disabled = FALSE;
region_count++;
}
@@ -2068,7 +2068,7 @@ static void execute_cheatinit(running_machine &machine, int ref, int params, con
}
/* give a detailed init message to avoid searches being mistakingly carried out on the wrong CPU */
- device_t *cpu = NULL;
+ device_t *cpu = nullptr;
debug_command_parameter_cpu(machine, cheat.cpu, &cpu);
debug_console_printf(machine, "%u cheat initialized for CPU index %s ( aka %s )\n", active_cheat, cheat.cpu, cpu->tag());
}
@@ -2245,7 +2245,7 @@ static void execute_cheatnext(running_machine &machine, int ref, int params, con
}
if (active_cheat <= 5)
- execute_cheatlist(machine, 0, 0, NULL);
+ execute_cheatlist(machine, 0, 0, nullptr);
debug_console_printf(machine, "%u cheats found\n", active_cheat);
}
@@ -2263,7 +2263,7 @@ static void execute_cheatlist(running_machine &machine, int ref, int params, con
UINT32 active_cheat = 0;
UINT64 cheatindex;
UINT64 sizemask;
- FILE *f = NULL;
+ FILE *f = nullptr;
if (!debug_command_parameter_cpu_space(machine, cheat.cpu, AS_PROGRAM, space))
return;
@@ -2366,7 +2366,7 @@ static void execute_find(running_machine &machine, int ref, int params, const ch
return;
if (!debug_command_parameter_number(machine, param[1], &length))
return;
- if (!debug_command_parameter_cpu_space(machine, NULL, ref, space))
+ if (!debug_command_parameter_cpu_space(machine, nullptr, ref, space))
return;
/* further validation */
@@ -2464,9 +2464,9 @@ static void execute_dasm(running_machine &machine, int ref, int params, const ch
return;
if (!debug_command_parameter_number(machine, param[3], &bytes))
return;
- if (!debug_command_parameter_cpu_space(machine, (params > 4) ? param[4] : NULL, AS_PROGRAM, space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 4) ? param[4] : nullptr, AS_PROGRAM, space))
return;
- if (!debug_command_parameter_cpu_space(machine, (params > 4) ? param[4] : NULL, AS_DECRYPTED_OPCODES, decrypted_space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 4) ? param[4] : nullptr, AS_DECRYPTED_OPCODES, decrypted_space))
decrypted_space = space;
/* determine the width of the bytes */
@@ -2535,7 +2535,7 @@ static void execute_dasm(running_machine &machine, int ref, int params, const ch
/* attempt to add the comment */
comment = space->device().debug()->comment_text(tempaddr);
- if (comment != NULL)
+ if (comment != nullptr)
{
/* somewhat arbitrary guess as to how long most disassembly lines will be [column 60] */
if (strlen(output) < 60)
@@ -2568,9 +2568,9 @@ static void execute_dasm(running_machine &machine, int ref, int params, const ch
static void execute_trace_internal(running_machine &machine, int ref, int params, const char *param[], int trace_over)
{
- const char *action = NULL;
+ const char *action = nullptr;
device_t *cpu;
- FILE *f = NULL;
+ FILE *f = nullptr;
const char *mode;
std::string filename = param[0];
@@ -2578,7 +2578,7 @@ static void execute_trace_internal(running_machine &machine, int ref, int params
strreplace(filename, "{game}", machine.basename());
/* validate parameters */
- if (!debug_command_parameter_cpu(machine, (params > 1) ? param[1] : NULL, &cpu))
+ if (!debug_command_parameter_cpu(machine, (params > 1) ? param[1] : nullptr, &cpu))
return;
if (!debug_command_parameter_command(machine, action = param[2]))
return;
@@ -2650,9 +2650,9 @@ static void execute_history(running_machine &machine, int ref, int params, const
{
/* validate parameters */
address_space *space, *decrypted_space;
- if (!debug_command_parameter_cpu_space(machine, (params > 0) ? param[0] : NULL, AS_PROGRAM, space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 0) ? param[0] : nullptr, AS_PROGRAM, space))
return;
- if (!debug_command_parameter_cpu_space(machine, (params > 0) ? param[0] : NULL, AS_DECRYPTED_OPCODES, decrypted_space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 0) ? param[0] : nullptr, AS_DECRYPTED_OPCODES, decrypted_space))
decrypted_space = space;
UINT64 count = device_debug::HISTORY_SIZE;
@@ -2700,8 +2700,8 @@ static void execute_trackpc(running_machine &machine, int ref, int params, const
return;
// Gather the cpu id (if present)
- device_t *cpu = NULL;
- if (!debug_command_parameter_cpu(machine, (params > 1) ? param[1] : NULL, &cpu))
+ device_t *cpu = nullptr;
+ if (!debug_command_parameter_cpu(machine, (params > 1) ? param[1] : nullptr, &cpu))
return;
// Should we clear the existing data?
@@ -2742,8 +2742,8 @@ static void execute_trackmem(running_machine &machine, int ref, int params, cons
return;
// Gather the cpu id (if present)
- device_t *cpu = NULL;
- if (!debug_command_parameter_cpu(machine, (params > 1) ? param[1] : NULL, &cpu))
+ device_t *cpu = nullptr;
+ if (!debug_command_parameter_cpu(machine, (params > 1) ? param[1] : nullptr, &cpu))
return;
// Should we clear the existing data?
@@ -2753,7 +2753,7 @@ static void execute_trackmem(running_machine &machine, int ref, int params, cons
// Get the address space for the given cpu
address_space *space;
- if (!debug_command_parameter_cpu_space(machine, (params > 1) ? param[1] : NULL, AS_PROGRAM, space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 1) ? param[1] : nullptr, AS_PROGRAM, space))
return;
// Inform the CPU it's time to start tracking memory writes
@@ -2780,13 +2780,13 @@ static void execute_pcatmem(running_machine &machine, int ref, int params, const
return;
// Gather the cpu id (if present)
- device_t *cpu = NULL;
- if (!debug_command_parameter_cpu(machine, (params > 1) ? param[1] : NULL, &cpu))
+ device_t *cpu = nullptr;
+ if (!debug_command_parameter_cpu(machine, (params > 1) ? param[1] : nullptr, &cpu))
return;
// Get the address space for the given cpu
address_space *space;
- if (!debug_command_parameter_cpu_space(machine, (params > 1) ? param[1] : NULL, ref, space))
+ if (!debug_command_parameter_cpu_space(machine, (params > 1) ? param[1] : nullptr, ref, space))
return;
// Get the value of memory at the address
@@ -2828,7 +2828,7 @@ static void execute_snap(running_machine &machine, int ref, int params, const ch
screen_device_iterator iter(machine.root_device());
screen_device *screen = iter.byindex(scrnum);
- if ((screen == NULL) || !machine.render().is_live(*screen))
+ if ((screen == nullptr) || !machine.render().is_live(*screen))
{
debug_console_printf(machine, "Invalid screen number '%d'\n", scrnum);
return;
@@ -2878,7 +2878,7 @@ static void execute_map(running_machine &machine, int ref, int params, const cha
return;
/* CPU is implicit */
- if (!debug_command_parameter_cpu_space(machine, NULL, ref, space))
+ if (!debug_command_parameter_cpu_space(machine, nullptr, ref, space))
return;
/* do the translation first */
@@ -2932,13 +2932,13 @@ static int CLIB_DECL symbol_sort_compare(const void *item1, const void *item2)
static void execute_symlist(running_machine &machine, int ref, int params, const char **param)
{
- device_t *cpu = NULL;
+ device_t *cpu = nullptr;
const char *namelist[1000];
symbol_table *symtable;
int symnum, count = 0;
- if (param[0] != NULL)
+ if (param[0] != nullptr)
{
/* validate parameters */
if (!debug_command_parameter_cpu(machine, param[0], &cpu))
@@ -2953,7 +2953,7 @@ static void execute_symlist(running_machine &machine, int ref, int params, const
}
/* gather names for all symbols */
- for (symbol_entry *entry = symtable->first(); entry != NULL; entry = entry->next())
+ for (symbol_entry *entry = symtable->first(); entry != nullptr; entry = entry->next())
{
/* only display "register" type symbols */
if (!entry->is_function())
@@ -2972,7 +2972,7 @@ static void execute_symlist(running_machine &machine, int ref, int params, const
for (symnum = 0; symnum < count; symnum++)
{
const symbol_entry *entry = symtable->find(namelist[symnum]);
- assert(entry != NULL);
+ assert(entry != nullptr);
UINT64 value = entry->value();
/* only display "register" type symbols */
@@ -3011,11 +3011,11 @@ static void execute_hardreset(running_machine &machine, int ref, int params, con
static void execute_images(running_machine &machine, int ref, int params, const char **param)
{
image_interface_iterator iter(machine.root_device());
- for (device_image_interface *img = iter.first(); img != NULL; img = iter.next())
+ for (device_image_interface *img = iter.first(); img != nullptr; img = iter.next())
{
debug_console_printf(machine, "%s: %s\n",img->brief_instance_name(),img->exists() ? img->filename() : "[empty slot]");
}
- if (iter.first() == NULL) {
+ if (iter.first() == nullptr) {
debug_console_printf(machine, "No image devices in this driver\n");
}
}
@@ -3028,7 +3028,7 @@ static void execute_mount(running_machine &machine, int ref, int params, const c
{
image_interface_iterator iter(machine.root_device());
bool done = false;
- for (device_image_interface *img = iter.first(); img != NULL; img = iter.next())
+ for (device_image_interface *img = iter.first(); img != nullptr; img = iter.next())
{
if (strcmp(img->brief_instance_name(),param[0])==0) {
if (img->load(param[1])==IMAGE_INIT_FAIL) {
@@ -3052,7 +3052,7 @@ static void execute_unmount(running_machine &machine, int ref, int params, const
{
image_interface_iterator iter(machine.root_device());
bool done = false;
- for (device_image_interface *img = iter.first(); img != NULL; img = iter.next())
+ for (device_image_interface *img = iter.first(); img != nullptr; img = iter.next())
{
if (strcmp(img->brief_instance_name(),param[0])==0) {
img->unload();
@@ -3085,13 +3085,13 @@ static void execute_input(running_machine &machine, int ref, int params, const c
static void execute_dumpkbd(running_machine &machine, int ref, int params, const char **param)
{
// was there a file specified?
- const char *filename = (params > 0) ? param[0] : NULL;
- FILE *file = NULL;
- if (filename != NULL)
+ const char *filename = (params > 0) ? param[0] : nullptr;
+ FILE *file = nullptr;
+ if (filename != nullptr)
{
// if so, open it
file = fopen(filename, "w");
- if (file == NULL)
+ if (file == nullptr)
{
debug_console_printf(machine, "Cannot open \"%s\"\n", filename);
return;
@@ -3102,12 +3102,12 @@ static void execute_dumpkbd(running_machine &machine, int ref, int params, const
std::string buffer = machine.ioport().natkeyboard().dump();
// and output it as appropriate
- if (file != NULL)
+ if (file != nullptr)
fprintf(file, "%s\n", buffer.c_str());
else
debug_console_printf(machine, "%s\n", buffer.c_str());
// cleanup
- if (file != NULL)
+ if (file != nullptr)
fclose(file);
}
diff --git a/src/emu/debug/debugcon.cpp b/src/emu/debug/debugcon.cpp
index 06a878b3367..b35d4afc690 100644
--- a/src/emu/debug/debugcon.cpp
+++ b/src/emu/debug/debugcon.cpp
@@ -110,14 +110,14 @@ static void debug_console_exit(running_machine &machine)
/* free allocated memory */
if (console_textbuf)
text_buffer_free(console_textbuf);
- console_textbuf = NULL;
+ console_textbuf = nullptr;
if (errorlog_textbuf)
text_buffer_free(errorlog_textbuf);
- errorlog_textbuf = NULL;
+ errorlog_textbuf = nullptr;
/* free the command list */
- commandlist = NULL;
+ commandlist = nullptr;
}
@@ -192,7 +192,7 @@ static void trim_parameter(char **paramptr, int keep_quotes)
static CMDERR internal_execute_command(running_machine &machine, int execute, int params, char **param)
{
- debug_command *cmd, *found = NULL;
+ debug_command *cmd, *found = nullptr;
int i, foundcount = 0;
char *p, *command;
size_t len;
@@ -216,12 +216,12 @@ static CMDERR internal_execute_command(running_machine &machine, int execute, in
else
{
params = 0;
- param[0] = NULL;
+ param[0] = nullptr;
}
/* search the command list */
len = strlen(command);
- for (cmd = commandlist; cmd != NULL; cmd = cmd->next)
+ for (cmd = commandlist; cmd != nullptr; cmd = cmd->next)
if (!strncmp(command, cmd->command, len))
{
foundcount++;
@@ -268,7 +268,7 @@ static CMDERR internal_execute_command(running_machine &machine, int execute, in
static CMDERR internal_parse_command(running_machine &machine, const char *original_command, int execute)
{
char command[MAX_COMMAND_LENGTH], parens[MAX_COMMAND_LENGTH];
- char *params[MAX_COMMAND_PARAMS] = { 0 };
+ char *params[MAX_COMMAND_PARAMS] = { nullptr };
CMDERR result;
char *command_start;
char *p, c = 0;
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index 8f399a1117a..3a95a823594 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -131,7 +131,7 @@ void debug_cpu_init(running_machine &machine)
/* add "wpaddr", "wpdata", "cycles", "cpunum", "logunmap" to the global symbol table */
global->symtable->add("wpaddr", symbol_table::READ_ONLY, &global->wpaddr);
global->symtable->add("wpdata", symbol_table::READ_ONLY, &global->wpdata);
- global->symtable->add("cpunum", NULL, get_cpunum);
+ global->symtable->add("cpunum", nullptr, get_cpunum);
global->symtable->add("beamx", (void *)first_screen, get_beamx);
global->symtable->add("beamy", (void *)first_screen, get_beamy);
global->symtable->add("frame", (void *)first_screen, get_frame);
@@ -148,7 +148,7 @@ void debug_cpu_init(running_machine &machine)
global->visiblecpu = machine.firstcpu;
/* add callback for breaking on VBLANK */
- if (machine.first_screen() != NULL)
+ if (machine.first_screen() != nullptr)
machine.first_screen()->register_vblank_callback(vblank_state_delegate(FUNC(on_vblank), &machine));
machine.add_notifier(MACHINE_NOTIFY_EXIT, machine_notify_delegate(FUNC(debug_cpu_exit), &machine));
@@ -172,8 +172,8 @@ void debug_cpu_flush_traces(running_machine &machine)
/* this can be called on exit even when no debugging is enabled, so
make sure the devdebug is valid before proceeding */
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
- if (device->debug() != NULL)
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
+ if (device->debug() != nullptr)
device->debug()->trace_flush();
}
@@ -213,7 +213,7 @@ int debug_cpu_within_instruction_hook(running_machine &machine)
int debug_cpu_is_stopped(running_machine &machine)
{
debugcpu_private *global = machine.debugcpu_data;
- return (global != NULL) ? (global->execution_state == EXECUTION_STATE_STOPPED) : false;
+ return (global != nullptr) ? (global->execution_state == EXECUTION_STATE_STOPPED) : false;
}
@@ -254,14 +254,14 @@ void debug_cpu_source_script(running_machine &machine, const char *file)
debugcpu_private *global = machine.debugcpu_data;
/* close any existing source file */
- if (global->source_file != NULL)
+ if (global->source_file != nullptr)
{
fclose(global->source_file);
- global->source_file = NULL;
+ global->source_file = nullptr;
}
/* open a new one if requested */
- if (file != NULL)
+ if (file != nullptr)
{
global->source_file = fopen(file, "r");
if (!global->source_file)
@@ -291,33 +291,33 @@ bool debug_comment_save(running_machine &machine)
// if we don't have a root, bail
xml_data_node *root = xml_file_create();
- if (root == NULL)
+ if (root == nullptr)
return false;
// wrap in a try/catch to handle errors
try
{
// create a comment node
- xml_data_node *commentnode = xml_add_child(root, "mamecommentfile", NULL);
- if (commentnode == NULL)
+ xml_data_node *commentnode = xml_add_child(root, "mamecommentfile", nullptr);
+ if (commentnode == nullptr)
throw emu_exception();
xml_set_attribute_int(commentnode, "version", COMMENT_VERSION);
// create a system node
- xml_data_node *systemnode = xml_add_child(commentnode, "system", NULL);
- if (systemnode == NULL)
+ xml_data_node *systemnode = xml_add_child(commentnode, "system", nullptr);
+ if (systemnode == nullptr)
throw emu_exception();
xml_set_attribute(systemnode, "name", machine.system().name);
// for each device
device_iterator iter(machine.root_device());
bool found_comments = false;
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (device->debug() && device->debug()->comment_count() > 0)
{
// create a node for this device
- xml_data_node *curnode = xml_add_child(systemnode, "cpu", NULL);
- if (curnode == NULL)
+ xml_data_node *curnode = xml_add_child(systemnode, "cpu", nullptr);
+ if (curnode == nullptr)
throw emu_exception();
xml_set_attribute(curnode, "tag", device->tag());
@@ -367,16 +367,16 @@ bool debug_comment_load(running_machine &machine)
return false;
// wrap in a try/catch to handle errors
- xml_data_node *root = xml_file_read(file, NULL);
+ xml_data_node *root = xml_file_read(file, nullptr);
try
{
// read the file
- if (root == NULL)
+ if (root == nullptr)
throw emu_exception();
// find the config node
xml_data_node *commentnode = xml_get_sibling(root->child, "mamecommentfile");
- if (commentnode == NULL)
+ if (commentnode == nullptr)
throw emu_exception();
// validate the config data version
@@ -394,7 +394,7 @@ bool debug_comment_load(running_machine &machine)
for (xml_data_node *cpunode = xml_get_sibling(systemnode->child, "cpu"); cpunode; cpunode = xml_get_sibling(cpunode->next, "cpu"))
{
device_t *device = machine.device(xml_get_attribute_string(cpunode, "tag", ""));
- if (device != NULL)
+ if (device != nullptr)
if (!device->debug()->comment_import(*cpunode))
throw emu_exception();
}
@@ -402,7 +402,7 @@ bool debug_comment_load(running_machine &machine)
catch (emu_exception &)
{
// clean up in case of error
- if (root != NULL)
+ if (root != nullptr)
xml_file_free(root);
return false;
}
@@ -1023,7 +1023,7 @@ static void debug_cpu_exit(running_machine &machine)
debugcpu_private *global = machine.debugcpu_data;
/* free the global symbol table */
- if (global != NULL)
+ if (global != nullptr)
global_free(global->symtable);
}
@@ -1049,9 +1049,9 @@ static void reset_transient_flags(running_machine &machine)
{
/* loop over CPUs and reset the transient flags */
device_iterator iter(machine.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->debug()->reset_transient_flag();
- machine.debugcpu_data->m_stop_when_not_device = NULL;
+ machine.debugcpu_data->m_stop_when_not_device = nullptr;
}
@@ -1065,7 +1065,7 @@ static void process_source_file(running_machine &machine)
debugcpu_private *global = machine.debugcpu_data;
/* loop until the file is exhausted or until we are executing again */
- while (global->source_file != NULL && global->execution_state == EXECUTION_STATE_STOPPED)
+ while (global->source_file != nullptr && global->execution_state == EXECUTION_STATE_STOPPED)
{
char buf[512];
int i;
@@ -1075,7 +1075,7 @@ static void process_source_file(running_machine &machine)
if (feof(global->source_file))
{
fclose(global->source_file);
- global->source_file = NULL;
+ global->source_file = nullptr;
return;
}
@@ -1129,7 +1129,7 @@ static UINT64 expression_read_memory(void *param, const char *name, expression_s
{
running_machine &machine = *(running_machine *)param;
UINT64 result = ~(UINT64)0 >> (64 - 8*size);
- device_t *device = NULL;
+ device_t *device = nullptr;
switch (spacenum)
{
@@ -1137,9 +1137,9 @@ static UINT64 expression_read_memory(void *param, const char *name, expression_s
case EXPSPACE_DATA_LOGICAL:
case EXPSPACE_IO_LOGICAL:
case EXPSPACE_SPACE3_LOGICAL:
- if (name != NULL)
+ if (name != nullptr)
device = expression_get_device(machine, name);
- if (device == NULL)
+ if (device == nullptr)
device = debug_cpu_get_visible_cpu(machine);
if (device->memory().has_space(AS_PROGRAM + (spacenum - EXPSPACE_PROGRAM_LOGICAL)))
{
@@ -1152,9 +1152,9 @@ static UINT64 expression_read_memory(void *param, const char *name, expression_s
case EXPSPACE_DATA_PHYSICAL:
case EXPSPACE_IO_PHYSICAL:
case EXPSPACE_SPACE3_PHYSICAL:
- if (name != NULL)
+ if (name != nullptr)
device = expression_get_device(machine, name);
- if (device == NULL)
+ if (device == nullptr)
device = debug_cpu_get_visible_cpu(machine);
if (device->memory().has_space(AS_PROGRAM + (spacenum - EXPSPACE_PROGRAM_PHYSICAL)))
{
@@ -1165,15 +1165,15 @@ static UINT64 expression_read_memory(void *param, const char *name, expression_s
case EXPSPACE_OPCODE:
case EXPSPACE_RAMWRITE:
- if (name != NULL)
+ if (name != nullptr)
device = expression_get_device(machine, name);
- if (device == NULL)
+ if (device == nullptr)
device = debug_cpu_get_visible_cpu(machine);
result = expression_read_program_direct(device->memory().space(AS_PROGRAM), (spacenum == EXPSPACE_OPCODE), address, size);
break;
case EXPSPACE_REGION:
- if (name == NULL)
+ if (name == nullptr)
break;
result = expression_read_memory_region(machine, name, address, size);
break;
@@ -1226,7 +1226,7 @@ static UINT64 expression_read_program_direct(address_space &space, int opcode, o
base = (UINT8 *)space.get_read_ptr(address & ~lowmask);
/* if we have a valid base, return the appropriate byte */
- if (base != NULL)
+ if (base != nullptr)
{
if (space.endianness() == ENDIANNESS_LITTLE)
result = base[BYTE8_XOR_LE(address) & lowmask];
@@ -1249,7 +1249,7 @@ static UINT64 expression_read_memory_region(running_machine &machine, const char
UINT64 result = ~(UINT64)0 >> (64 - 8*size);
/* make sure we get a valid base before proceeding */
- if (region != NULL)
+ if (region != nullptr)
{
/* call ourself recursively until we are byte-sized */
if (size > 1)
@@ -1295,7 +1295,7 @@ static UINT64 expression_read_memory_region(running_machine &machine, const char
static void expression_write_memory(void *param, const char *name, expression_space spacenum, UINT32 address, int size, UINT64 data)
{
running_machine &machine = *(running_machine *)param;
- device_t *device = NULL;
+ device_t *device = nullptr;
switch (spacenum)
{
@@ -1303,9 +1303,9 @@ static void expression_write_memory(void *param, const char *name, expression_sp
case EXPSPACE_DATA_LOGICAL:
case EXPSPACE_IO_LOGICAL:
case EXPSPACE_SPACE3_LOGICAL:
- if (name != NULL)
+ if (name != nullptr)
device = expression_get_device(machine, name);
- if (device == NULL)
+ if (device == nullptr)
device = debug_cpu_get_visible_cpu(machine);
if (device->memory().has_space(AS_PROGRAM + (spacenum - EXPSPACE_PROGRAM_LOGICAL)))
{
@@ -1318,9 +1318,9 @@ static void expression_write_memory(void *param, const char *name, expression_sp
case EXPSPACE_DATA_PHYSICAL:
case EXPSPACE_IO_PHYSICAL:
case EXPSPACE_SPACE3_PHYSICAL:
- if (name != NULL)
+ if (name != nullptr)
device = expression_get_device(machine, name);
- if (device == NULL)
+ if (device == nullptr)
device = debug_cpu_get_visible_cpu(machine);
if (device->memory().has_space(AS_PROGRAM + (spacenum - EXPSPACE_PROGRAM_PHYSICAL)))
{
@@ -1331,15 +1331,15 @@ static void expression_write_memory(void *param, const char *name, expression_sp
case EXPSPACE_OPCODE:
case EXPSPACE_RAMWRITE:
- if (name != NULL)
+ if (name != nullptr)
device = expression_get_device(machine, name);
- if (device == NULL)
+ if (device == nullptr)
device = debug_cpu_get_visible_cpu(machine);
expression_write_program_direct(device->memory().space(AS_PROGRAM), (spacenum == EXPSPACE_OPCODE), address, size, data);
break;
case EXPSPACE_REGION:
- if (name == NULL)
+ if (name == nullptr)
break;
expression_write_memory_region(machine, name, address, size, data);
break;
@@ -1398,7 +1398,7 @@ static void expression_write_program_direct(address_space &space, int opcode, of
base = (UINT8 *)space.get_read_ptr(address & ~lowmask);
/* if we have a valid base, write the appropriate byte */
- if (base != NULL)
+ if (base != nullptr)
{
if (space.endianness() == ENDIANNESS_LITTLE)
base[BYTE8_XOR_LE(address) & lowmask] = data;
@@ -1421,7 +1421,7 @@ static void expression_write_memory_region(running_machine &machine, const char
memory_region *region = machine.root_device().memregion(rgntag);
/* make sure we get a valid base before proceeding */
- if (region != NULL)
+ if (region != nullptr)
{
/* call ourself recursively until we are byte-sized */
if (size > 1)
@@ -1474,7 +1474,7 @@ static void expression_write_memory_region(running_machine &machine, const char
static expression_error::error_code expression_validate(void *param, const char *name, expression_space space)
{
running_machine &machine = *(running_machine *)param;
- device_t *device = NULL;
+ device_t *device = nullptr;
switch (space)
{
@@ -1482,13 +1482,13 @@ static expression_error::error_code expression_validate(void *param, const char
case EXPSPACE_DATA_LOGICAL:
case EXPSPACE_IO_LOGICAL:
case EXPSPACE_SPACE3_LOGICAL:
- if (name != NULL)
+ if (name != nullptr)
{
device = expression_get_device(machine, name);
- if (device == NULL)
+ if (device == nullptr)
return expression_error::INVALID_MEMORY_NAME;
}
- if (device == NULL)
+ if (device == nullptr)
device = debug_cpu_get_visible_cpu(machine);
if (!device->memory().has_space(AS_PROGRAM + (space - EXPSPACE_PROGRAM_LOGICAL)))
return expression_error::NO_SUCH_MEMORY_SPACE;
@@ -1498,13 +1498,13 @@ static expression_error::error_code expression_validate(void *param, const char
case EXPSPACE_DATA_PHYSICAL:
case EXPSPACE_IO_PHYSICAL:
case EXPSPACE_SPACE3_PHYSICAL:
- if (name != NULL)
+ if (name != nullptr)
{
device = expression_get_device(machine, name);
- if (device == NULL)
+ if (device == nullptr)
return expression_error::INVALID_MEMORY_NAME;
}
- if (device == NULL)
+ if (device == nullptr)
device = debug_cpu_get_visible_cpu(machine);
if (!device->memory().has_space(AS_PROGRAM + (space - EXPSPACE_PROGRAM_PHYSICAL)))
return expression_error::NO_SUCH_MEMORY_SPACE;
@@ -1512,22 +1512,22 @@ static expression_error::error_code expression_validate(void *param, const char
case EXPSPACE_OPCODE:
case EXPSPACE_RAMWRITE:
- if (name != NULL)
+ if (name != nullptr)
{
device = expression_get_device(machine, name);
- if (device == NULL)
+ if (device == nullptr)
return expression_error::INVALID_MEMORY_NAME;
}
- if (device == NULL)
+ if (device == nullptr)
device = debug_cpu_get_visible_cpu(machine);
if (!device->memory().has_space(AS_PROGRAM))
return expression_error::NO_SUCH_MEMORY_SPACE;
break;
case EXPSPACE_REGION:
- if (name == NULL)
+ if (name == nullptr)
return expression_error::MISSING_MEMORY_NAME;
- if (machine.root_device().memregion(name)->base() == NULL)
+ if (machine.root_device().memregion(name)->base() == nullptr)
return expression_error::INVALID_MEMORY_NAME;
break;
@@ -1550,7 +1550,7 @@ static expression_error::error_code expression_validate(void *param, const char
static UINT64 get_beamx(symbol_table &table, void *ref)
{
screen_device *screen = reinterpret_cast<screen_device *>(ref);
- return (screen != NULL) ? screen->hpos() : 0;
+ return (screen != nullptr) ? screen->hpos() : 0;
}
@@ -1561,7 +1561,7 @@ static UINT64 get_beamx(symbol_table &table, void *ref)
static UINT64 get_beamy(symbol_table &table, void *ref)
{
screen_device *screen = reinterpret_cast<screen_device *>(ref);
- return (screen != NULL) ? screen->vpos() : 0;
+ return (screen != nullptr) ? screen->vpos() : 0;
}
@@ -1572,7 +1572,7 @@ static UINT64 get_beamy(symbol_table &table, void *ref)
static UINT64 get_frame(symbol_table &table, void *ref)
{
screen_device *screen = reinterpret_cast<screen_device *>(ref);
- return (screen != NULL) ? screen->frame_number() : 0;
+ return (screen != nullptr) ? screen->frame_number() : 0;
}
@@ -1602,14 +1602,14 @@ static UINT64 get_cpunum(symbol_table &table, void *ref)
device_debug::device_debug(device_t &device)
: m_device(device),
- m_exec(NULL),
- m_memory(NULL),
- m_state(NULL),
- m_disasm(NULL),
+ m_exec(nullptr),
+ m_memory(nullptr),
+ m_state(nullptr),
+ m_disasm(nullptr),
m_flags(0),
m_symtable(&device, debug_cpu_get_global_symtable(device.machine())),
- m_instrhook(NULL),
- m_dasm_override(NULL),
+ m_instrhook(nullptr),
+ m_dasm_override(nullptr),
m_opwidth(0),
m_stepaddr(0),
m_stepsleft(0),
@@ -1621,9 +1621,9 @@ device_debug::device_debug(device_t &device)
m_total_cycles(0),
m_last_total_cycles(0),
m_pc_history_index(0),
- m_bplist(NULL),
- m_rplist(NULL),
- m_trace(NULL),
+ m_bplist(nullptr),
+ m_rplist(nullptr),
+ m_trace(nullptr),
m_hotspot_threshhold(0),
m_track_pc_set(),
m_track_pc(false),
@@ -1642,18 +1642,18 @@ device_debug::device_debug(device_t &device)
device.interface(m_disasm);
// set up state-related stuff
- if (m_state != NULL)
+ if (m_state != nullptr)
{
// add global symbol for cycles and totalcycles
- if (m_exec != NULL)
+ if (m_exec != nullptr)
{
- m_symtable.add("cycles", NULL, get_cycles);
- m_symtable.add("totalcycles", NULL, get_totalcycles);
- m_symtable.add("lastinstructioncycles", NULL, get_lastinstructioncycles);
+ m_symtable.add("cycles", nullptr, get_cycles);
+ m_symtable.add("totalcycles", nullptr, get_totalcycles);
+ m_symtable.add("lastinstructioncycles", nullptr, get_lastinstructioncycles);
}
// add entries to enable/disable unmap reporting for each space
- if (m_memory != NULL)
+ if (m_memory != nullptr)
{
if (m_memory->has_space(AS_PROGRAM))
m_symtable.add("logunmap", (void *)&m_memory->space(AS_PROGRAM), get_logunmap, set_logunmap);
@@ -1665,21 +1665,21 @@ device_debug::device_debug(device_t &device)
// add all registers into it
std::string tempstr;
- for (const device_state_entry *entry = m_state->state_first(); entry != NULL; entry = entry->next()) {
+ for (const device_state_entry *entry = m_state->state_first(); entry != nullptr; entry = entry->next()) {
strmakelower(tempstr.assign(entry->symbol()));
m_symtable.add(tempstr.c_str(), (void *)(FPTR)entry->index(), get_state, set_state);
}
}
// set up execution-related stuff
- if (m_exec != NULL)
+ if (m_exec != nullptr)
{
m_flags = DEBUG_FLAG_OBSERVING | DEBUG_FLAG_HISTORY;
m_opwidth = min_opcode_bytes();
// if no curpc, add one
- if (m_state != NULL && m_symtable.find("curpc") == NULL)
- m_symtable.add("curpc", NULL, get_current_pc);
+ if (m_state != nullptr && m_symtable.find("curpc") == nullptr)
+ m_symtable.add("curpc", nullptr, get_current_pc);
}
}
@@ -1711,13 +1711,13 @@ void device_debug::start_hook(const attotime &endtime)
assert((m_device.machine().debug_flags & DEBUG_FLAG_ENABLED) != 0);
// stash a pointer to the current live CPU
- assert(global->livecpu == NULL);
+ assert(global->livecpu == nullptr);
global->livecpu = &m_device;
// if we're a new device, stop now
- if (global->m_stop_when_not_device != NULL && global->m_stop_when_not_device != &m_device)
+ if (global->m_stop_when_not_device != nullptr && global->m_stop_when_not_device != &m_device)
{
- global->m_stop_when_not_device = NULL;
+ global->m_stop_when_not_device = nullptr;
global->execution_state = EXECUTION_STATE_STOPPED;
reset_transient_flags(m_device.machine());
}
@@ -1740,7 +1740,7 @@ void device_debug::start_hook(const attotime &endtime)
else if (&m_device == global->breakcpu)
{
global->execution_state = EXECUTION_STATE_STOPPED;
- global->breakcpu = NULL;
+ global->breakcpu = nullptr;
}
// if a VBLANK occurred, check on things
@@ -1777,7 +1777,7 @@ void device_debug::stop_hook()
assert(global->livecpu == &m_device);
// clear the live CPU
- global->livecpu = NULL;
+ global->livecpu = nullptr;
}
@@ -1847,7 +1847,7 @@ void device_debug::instruction_hook(offs_t curpc)
}
// are we tracing?
- if (m_trace != NULL)
+ if (m_trace != nullptr)
m_trace->update(curpc);
// per-instruction hook?
@@ -1914,7 +1914,7 @@ void device_debug::instruction_hook(offs_t curpc)
// reset any transient state
reset_transient_flags(m_device.machine());
- global->breakcpu = NULL;
+ global->breakcpu = nullptr;
// remember the last visible CPU in the debugger
global->visiblecpu = &m_device;
@@ -2010,7 +2010,7 @@ void device_debug::set_instruction_hook(debug_instruction_hook_func hook)
{
// set the hook and also the CPU's flag for fast knowledge of the hook
m_instrhook = hook;
- if (hook != NULL)
+ if (hook != nullptr)
m_flags |= DEBUG_FLAG_HOOKED;
else
m_flags &= ~DEBUG_FLAG_HOOKED;
@@ -2027,17 +2027,17 @@ offs_t device_debug::disassemble(char *buffer, offs_t pc, const UINT8 *oprom, co
offs_t result = 0;
// check for disassembler override
- if (m_dasm_override != NULL)
+ if (m_dasm_override != nullptr)
result = (*m_dasm_override)(m_device, buffer, pc, oprom, opram, 0);
// if we have a disassembler, run it
- if (result == 0 && m_disasm != NULL)
+ if (result == 0 && m_disasm != nullptr)
result = m_disasm->disassemble(buffer, pc, oprom, opram, 0);
// make sure we get good results
assert((result & DASMFLAG_LENGTHMASK) != 0);
#ifdef MAME_DEBUG
- if (m_memory != NULL && m_disasm != NULL)
+ if (m_memory != nullptr && m_disasm != nullptr)
{
address_space &space = m_memory->space(AS_PROGRAM);
int bytes = space.address_to_byte(result & DASMFLAG_LENGTHMASK);
@@ -2059,7 +2059,7 @@ void device_debug::ignore(bool ignore)
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
if (ignore)
m_flags &= ~DEBUG_FLAG_OBSERVING;
@@ -2080,7 +2080,7 @@ void device_debug::single_step(int numsteps)
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
m_stepsleft = numsteps;
m_stepaddr = ~0;
@@ -2098,7 +2098,7 @@ void device_debug::single_step_over(int numsteps)
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
m_stepsleft = numsteps;
m_stepaddr = ~0;
@@ -2116,7 +2116,7 @@ void device_debug::single_step_out()
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
m_stepsleft = 100;
m_stepaddr = ~0;
@@ -2134,7 +2134,7 @@ void device_debug::go(offs_t targetpc)
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
m_stopaddr = targetpc;
m_flags |= DEBUG_FLAG_STOP_PC;
@@ -2150,7 +2150,7 @@ void device_debug::go_vblank()
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
global->vblank_occurred = false;
m_flags |= DEBUG_FLAG_STOP_VBLANK;
@@ -2167,7 +2167,7 @@ void device_debug::go_interrupt(int irqline)
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
m_stopirq = irqline;
m_flags |= DEBUG_FLAG_STOP_INTERRUPT;
@@ -2184,7 +2184,7 @@ void device_debug::go_exception(int exception)
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
m_stopexception = exception;
m_flags |= DEBUG_FLAG_STOP_EXCEPTION;
@@ -2201,7 +2201,7 @@ void device_debug::go_milliseconds(UINT64 milliseconds)
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
m_stoptime = m_device.machine().time() + attotime::from_msec(milliseconds);
m_flags |= DEBUG_FLAG_STOP_TIME;
@@ -2218,7 +2218,7 @@ void device_debug::go_next_device()
{
debugcpu_private *global = m_device.machine().debugcpu_data;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
global->m_stop_when_not_device = &m_device;
global->execution_state = EXECUTION_STATE_RUNNING;
@@ -2235,7 +2235,7 @@ void device_debug::halt_on_next_instruction(const char *fmt, ...)
debugcpu_private *global = m_device.machine().debugcpu_data;
va_list arg;
- assert(m_exec != NULL);
+ assert(m_exec != nullptr);
// if something is pending on this CPU already, ignore this request
if (&m_device == global->breakcpu)
@@ -2250,7 +2250,7 @@ void device_debug::halt_on_next_instruction(const char *fmt, ...)
if (&m_device == global->livecpu)
{
global->execution_state = EXECUTION_STATE_STOPPED;
- if (global->livecpu != NULL)
+ if (global->livecpu != nullptr)
global->livecpu->debug()->compute_debug_flags();
}
else
@@ -2286,7 +2286,7 @@ int device_debug::breakpoint_set(offs_t address, const char *condition, const ch
bool device_debug::breakpoint_clear(int index)
{
// scan the list to see if we own this breakpoint
- for (breakpoint **bp = &m_bplist; *bp != NULL; bp = &(*bp)->m_next)
+ for (breakpoint **bp = &m_bplist; *bp != nullptr; bp = &(*bp)->m_next)
if ((*bp)->m_index == index)
{
breakpoint *deleteme = *bp;
@@ -2308,7 +2308,7 @@ bool device_debug::breakpoint_clear(int index)
void device_debug::breakpoint_clear_all()
{
// clear the head until we run out
- while (m_bplist != NULL)
+ while (m_bplist != nullptr)
breakpoint_clear(m_bplist->index());
}
@@ -2321,7 +2321,7 @@ void device_debug::breakpoint_clear_all()
bool device_debug::breakpoint_enable(int index, bool enable)
{
// scan the list to see if we own this breakpoint
- for (breakpoint *bp = m_bplist; bp != NULL; bp = bp->next())
+ for (breakpoint *bp = m_bplist; bp != nullptr; bp = bp->next())
if (bp->m_index == index)
{
bp->m_enabled = enable;
@@ -2342,7 +2342,7 @@ bool device_debug::breakpoint_enable(int index, bool enable)
void device_debug::breakpoint_enable_all(bool enable)
{
// apply the enable to all breakpoints we own
- for (breakpoint *bp = m_bplist; bp != NULL; bp = bp->next())
+ for (breakpoint *bp = m_bplist; bp != nullptr; bp = bp->next())
breakpoint_enable(bp->index(), enable);
}
@@ -2378,7 +2378,7 @@ bool device_debug::watchpoint_clear(int index)
{
// scan the list to see if we own this breakpoint
for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
- for (watchpoint **wp = &m_wplist[spacenum]; *wp != NULL; wp = &(*wp)->m_next)
+ for (watchpoint **wp = &m_wplist[spacenum]; *wp != nullptr; wp = &(*wp)->m_next)
if ((*wp)->m_index == index)
{
watchpoint *deleteme = *wp;
@@ -2402,7 +2402,7 @@ void device_debug::watchpoint_clear_all()
{
// clear the head until we run out
for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
- while (m_wplist[spacenum] != NULL)
+ while (m_wplist[spacenum] != nullptr)
watchpoint_clear(m_wplist[spacenum]->index());
}
@@ -2416,7 +2416,7 @@ bool device_debug::watchpoint_enable(int index, bool enable)
{
// scan the list to see if we own this watchpoint
for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
- for (watchpoint *wp = m_wplist[spacenum]; wp != NULL; wp = wp->next())
+ for (watchpoint *wp = m_wplist[spacenum]; wp != nullptr; wp = wp->next())
if (wp->m_index == index)
{
wp->m_enabled = enable;
@@ -2438,7 +2438,7 @@ void device_debug::watchpoint_enable_all(bool enable)
{
// apply the enable to all watchpoints we own
for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
- for (watchpoint *wp = m_wplist[spacenum]; wp != NULL; wp = wp->next())
+ for (watchpoint *wp = m_wplist[spacenum]; wp != nullptr; wp = wp->next())
watchpoint_enable(wp->index(), enable);
}
@@ -2471,7 +2471,7 @@ int device_debug::registerpoint_set(const char *condition, const char *action)
bool device_debug::registerpoint_clear(int index)
{
// scan the list to see if we own this registerpoint
- for (registerpoint **rp = &m_rplist; *rp != NULL; rp = &(*rp)->m_next)
+ for (registerpoint **rp = &m_rplist; *rp != nullptr; rp = &(*rp)->m_next)
if ((*rp)->m_index == index)
{
registerpoint *deleteme = *rp;
@@ -2493,7 +2493,7 @@ bool device_debug::registerpoint_clear(int index)
void device_debug::registerpoint_clear_all()
{
// clear the head until we run out
- while (m_rplist != NULL)
+ while (m_rplist != nullptr)
registerpoint_clear(m_rplist->index());
}
@@ -2506,7 +2506,7 @@ void device_debug::registerpoint_clear_all()
bool device_debug::registerpoint_enable(int index, bool enable)
{
// scan the list to see if we own this conditionpoint
- for (registerpoint *rp = m_rplist; rp != NULL; rp = rp->next())
+ for (registerpoint *rp = m_rplist; rp != nullptr; rp = rp->next())
if (rp->m_index == index)
{
rp->m_enabled = enable;
@@ -2527,7 +2527,7 @@ bool device_debug::registerpoint_enable(int index, bool enable)
void device_debug::registerpoint_enable_all(bool enable)
{
// apply the enable to all registerpoints we own
- for (registerpoint *rp = m_rplist; rp != NULL; rp = rp->next())
+ for (registerpoint *rp = m_rplist; rp != nullptr; rp = rp->next())
registerpoint_enable(rp->index(), enable);
}
@@ -2554,7 +2554,7 @@ void device_debug::hotspot_track(int numspots, int threshhold)
}
// update the watchpoint flags to include us
- if (m_memory != NULL && m_memory->has_space(AS_PROGRAM))
+ if (m_memory != nullptr && m_memory->has_space(AS_PROGRAM))
watchpoint_update_flags(m_memory->space(AS_PROGRAM));
}
@@ -2665,8 +2665,8 @@ bool device_debug::comment_remove(offs_t addr)
const char *device_debug::comment_text(offs_t addr) const
{
const UINT32 crc = compute_opcode_crc32(addr);
- std::set<dasm_comment>::iterator comment = m_comment_set.find(dasm_comment(addr, crc, "", 0));
- if (comment == m_comment_set.end()) return NULL;
+ auto comment = m_comment_set.find(dasm_comment(addr, crc, "", 0));
+ if (comment == m_comment_set.end()) return nullptr;
return comment->m_text.c_str();
}
@@ -2680,14 +2680,14 @@ bool device_debug::comment_export(xml_data_node &curnode)
{
// iterate through the comments
std::string crc_buf;
- for (std::set<dasm_comment>::iterator item = m_comment_set.begin(); item != m_comment_set.end(); ++item)
+ for (const auto & elem : m_comment_set)
{
- xml_data_node *datanode = xml_add_child(&curnode, "comment", xml_normalize_string(item->m_text.c_str()));
- if (datanode == NULL)
+ xml_data_node *datanode = xml_add_child(&curnode, "comment", xml_normalize_string(elem.m_text.c_str()));
+ if (datanode == nullptr)
return false;
- xml_set_attribute_int(datanode, "address", item->m_address);
- xml_set_attribute_int(datanode, "color", item->m_color);
- strprintf(crc_buf,"%08X", item->m_crc);
+ xml_set_attribute_int(datanode, "address", elem.m_address);
+ xml_set_attribute_int(datanode, "color", elem.m_color);
+ strprintf(crc_buf,"%08X", elem.m_crc);
xml_set_attribute(datanode, "crc", crc_buf.c_str());
}
return true;
@@ -2709,7 +2709,7 @@ bool device_debug::comment_import(xml_data_node &cpunode)
rgb_t color = xml_get_attribute_int(datanode, "color", 0);
UINT32 crc;
- sscanf(xml_get_attribute_string(datanode, "crc", 0), "%08X", &crc);
+ sscanf(xml_get_attribute_string(datanode, "crc", nullptr), "%08X", &crc);
// add the new comment
m_comment_set.insert(dasm_comment(address, crc, datanode->value, color));
@@ -2726,7 +2726,7 @@ bool device_debug::comment_import(xml_data_node &cpunode)
UINT32 device_debug::compute_opcode_crc32(offs_t pc) const
{
// Basically the same thing as dasm_wrapped, but with some tiny savings
- assert(m_memory != NULL);
+ assert(m_memory != nullptr);
// determine the adjusted PC
address_space &decrypted_space = m_memory->has_space(AS_DECRYPTED_OPCODES) ? m_memory->space(AS_DECRYPTED_OPCODES) : m_memory->space(AS_PROGRAM);
@@ -2760,10 +2760,10 @@ void device_debug::trace(FILE *file, bool trace_over, const char *action)
{
// delete any existing tracers
auto_free(m_device.machine(), m_trace);
- m_trace = NULL;
+ m_trace = nullptr;
// if we have a new file, make a new tracer
- if (file != NULL)
+ if (file != nullptr)
m_trace = auto_alloc(m_device.machine(), tracer(*this, *file, trace_over, action));
}
@@ -2775,7 +2775,7 @@ void device_debug::trace(FILE *file, bool trace_over, const char *action)
void device_debug::trace_printf(const char *fmt, ...)
{
- if (m_trace != NULL)
+ if (m_trace != nullptr)
{
va_list va;
va_start(va, fmt);
@@ -2813,7 +2813,7 @@ void device_debug::compute_debug_flags()
machine.debug_flags |= DEBUG_FLAG_CALL_HOOK;
// also call if we are tracing
- if (m_trace != NULL)
+ if (m_trace != nullptr)
machine.debug_flags |= DEBUG_FLAG_CALL_HOOK;
// if we are stopping at a particular time and that time is within the current timeslice, we need to be called
@@ -2865,7 +2865,7 @@ void device_debug::breakpoint_update_flags()
{
// see if there are any enabled breakpoints
m_flags &= ~DEBUG_FLAG_LIVE_BP;
- for (breakpoint *bp = m_bplist; bp != NULL; bp = bp->m_next)
+ for (breakpoint *bp = m_bplist; bp != nullptr; bp = bp->m_next)
if (bp->m_enabled)
{
m_flags |= DEBUG_FLAG_LIVE_BP;
@@ -2875,7 +2875,7 @@ void device_debug::breakpoint_update_flags()
if ( ! ( m_flags & DEBUG_FLAG_LIVE_BP ) )
{
// see if there are any enabled registerpoints
- for (registerpoint *rp = m_rplist; rp != NULL; rp = rp->m_next)
+ for (registerpoint *rp = m_rplist; rp != nullptr; rp = rp->m_next)
{
if (rp->m_enabled)
{
@@ -2886,7 +2886,7 @@ void device_debug::breakpoint_update_flags()
// push the flags out globally
debugcpu_private *global = m_device.machine().debugcpu_data;
- if (global->livecpu != NULL)
+ if (global->livecpu != nullptr)
global->livecpu->debug()->compute_debug_flags();
}
@@ -2899,7 +2899,7 @@ void device_debug::breakpoint_update_flags()
void device_debug::breakpoint_check(offs_t pc)
{
// see if we match
- for (breakpoint *bp = m_bplist; bp != NULL; bp = bp->m_next)
+ for (breakpoint *bp = m_bplist; bp != nullptr; bp = bp->m_next)
if (bp->hit(pc))
{
// halt in the debugger by default
@@ -2917,7 +2917,7 @@ void device_debug::breakpoint_check(offs_t pc)
}
// see if we have any matching registerpoints
- for (registerpoint *rp = m_rplist; rp != NULL; rp = rp->m_next)
+ for (registerpoint *rp = m_rplist; rp != nullptr; rp = rp->m_next)
{
if (rp->hit())
{
@@ -2956,7 +2956,7 @@ void device_debug::watchpoint_update_flags(address_space &space)
// see if there are any enabled breakpoints
bool enablewrite = false;
- for (watchpoint *wp = m_wplist[space.spacenum()]; wp != NULL; wp = wp->m_next)
+ for (watchpoint *wp = m_wplist[space.spacenum()]; wp != nullptr; wp = wp->m_next)
if (wp->m_enabled)
{
if (wp->m_type & WATCHPOINT_READ)
@@ -3029,7 +3029,7 @@ void device_debug::watchpoint_check(address_space &space, int type, offs_t addre
global->wpdata = value_to_write;
// see if we match
- for (watchpoint *wp = m_wplist[space.spacenum()]; wp != NULL; wp = wp->m_next)
+ for (watchpoint *wp = m_wplist[space.spacenum()]; wp != nullptr; wp = wp->m_next)
if (wp->hit(type, address, size))
{
// halt in the debugger by default
@@ -3046,7 +3046,7 @@ void device_debug::watchpoint_check(address_space &space, int type, offs_t addre
{
"0bytes", "byte", "word", "3bytes", "dword", "5bytes", "6bytes", "7bytes", "qword"
};
- offs_t pc = (space.device().debug()->m_state != NULL) ? space.device().debug()->m_state->pc() : 0;
+ offs_t pc = (space.device().debug()->m_state != nullptr) ? space.device().debug()->m_state->pc() : 0;
std::string buffer;
if (type & WATCHPOINT_WRITE)
@@ -3122,7 +3122,7 @@ void device_debug::hotspot_check(address_space &space, offs_t address)
UINT32 device_debug::dasm_wrapped(std::string &buffer, offs_t pc)
{
- assert(m_memory != NULL && m_disasm != NULL);
+ assert(m_memory != nullptr && m_disasm != nullptr);
// determine the adjusted PC
address_space &decrypted_space = m_memory->has_space(AS_DECRYPTED_OPCODES) ? m_memory->space(AS_DECRYPTED_OPCODES) : m_memory->space(AS_PROGRAM);
@@ -3260,12 +3260,12 @@ device_debug::breakpoint::breakpoint(device_debug* debugInterface,
const char *condition,
const char *action)
: m_debugInterface(debugInterface),
- m_next(NULL),
+ m_next(nullptr),
m_index(index),
m_enabled(true),
m_address(address),
- m_condition(&symbols, (condition != NULL) ? condition : "1"),
- m_action((action != NULL) ? action : "")
+ m_condition(&symbols, (condition != nullptr) ? condition : "1"),
+ m_action((action != nullptr) ? action : "")
{
}
@@ -3320,15 +3320,15 @@ device_debug::watchpoint::watchpoint(device_debug* debugInterface,
const char *condition,
const char *action)
: m_debugInterface(debugInterface),
- m_next(NULL),
+ m_next(nullptr),
m_space(space),
m_index(index),
m_enabled(true),
m_type(type),
m_address(space.address_to_byte(address) & space.bytemask()),
m_length(space.address_to_byte(length)),
- m_condition(&symbols, (condition != NULL) ? condition : "1"),
- m_action((action != NULL) ? action : "")
+ m_condition(&symbols, (condition != nullptr) ? condition : "1"),
+ m_action((action != nullptr) ? action : "")
{
}
@@ -3377,11 +3377,11 @@ bool device_debug::watchpoint::hit(int type, offs_t address, int size)
//-------------------------------------------------
device_debug::registerpoint::registerpoint(symbol_table &symbols, int index, const char *condition, const char *action)
- : m_next(NULL),
+ : m_next(nullptr),
m_index(index),
m_enabled(true),
- m_condition(&symbols, (condition != NULL) ? condition : "1"),
- m_action((action != NULL) ? action : "")
+ m_condition(&symbols, (condition != nullptr) ? condition : "1"),
+ m_action((action != nullptr) ? action : "")
{
}
@@ -3425,7 +3425,7 @@ bool device_debug::registerpoint::hit()
device_debug::tracer::tracer(device_debug &debug, FILE &file, bool trace_over, const char *action)
: m_debug(debug),
m_file(file),
- m_action((action != NULL) ? action : ""),
+ m_action((action != nullptr) ? action : ""),
m_loops(0),
m_nextdex(0),
m_trace_over(trace_over),
@@ -3463,8 +3463,8 @@ void device_debug::tracer::update(offs_t pc)
// check for a loop condition
int count = 0;
- for (int index = 0; index < ARRAY_LENGTH(m_history); index++)
- if (m_history[index] == pc)
+ for (auto & elem : m_history)
+ if (elem == pc)
count++;
// if more than 1 hit, just up the loop count and get out
@@ -3569,6 +3569,6 @@ device_debug::dasm_memory_access::dasm_memory_access(const address_spacenum& add
device_debug::dasm_comment::dasm_comment(offs_t address, UINT32 crc, const char *text, rgb_t color)
: dasm_pc_tag(address, crc),
m_text(text),
- m_color(color)
+ m_color(std::move(color))
{
}
diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h
index d337a7103f7..33c17253354 100644
--- a/src/emu/debug/debugcpu.h
+++ b/src/emu/debug/debugcpu.h
@@ -58,8 +58,8 @@ public:
symbol_table &symbols,
int index,
offs_t address,
- const char *condition = NULL,
- const char *action = NULL);
+ const char *condition = nullptr,
+ const char *action = nullptr);
// getters
const device_debug *debugInterface() const { return m_debugInterface; }
@@ -100,8 +100,8 @@ public:
int type,
offs_t address,
offs_t length,
- const char *condition = NULL,
- const char *action = NULL);
+ const char *condition = nullptr,
+ const char *action = nullptr);
// getters
const device_debug *debugInterface() const { return m_debugInterface; }
@@ -141,7 +141,7 @@ public:
public:
// construction/destruction
- registerpoint(symbol_table &symbols, int index, const char *condition, const char *action = NULL);
+ registerpoint(symbol_table &symbols, int index, const char *condition, const char *action = nullptr);
// getters
registerpoint *next() const { return m_next; }
@@ -170,10 +170,10 @@ public:
symbol_table &symtable() { return m_symtable; }
// commonly-used pass-throughs
- offs_t pc() const { return (m_state != NULL) ? m_state->pc() : 0; }
- int logaddrchars(address_spacenum spacenum = AS_0) const { return (m_memory != NULL && m_memory->has_space(spacenum)) ? m_memory->space(spacenum).logaddrchars() : 8; }
- int min_opcode_bytes() const { return (m_disasm != NULL) ? m_disasm->max_opcode_bytes() : 1; }
- int max_opcode_bytes() const { return (m_disasm != NULL) ? m_disasm->max_opcode_bytes() : 1; }
+ offs_t pc() const { return (m_state != nullptr) ? m_state->pc() : 0; }
+ int logaddrchars(address_spacenum spacenum = AS_0) const { return (m_memory != nullptr && m_memory->has_space(spacenum)) ? m_memory->space(spacenum).logaddrchars() : 8; }
+ int min_opcode_bytes() const { return (m_disasm != nullptr) ? m_disasm->max_opcode_bytes() : 1; }
+ int max_opcode_bytes() const { return (m_disasm != nullptr) ? m_disasm->max_opcode_bytes() : 1; }
device_t& device() const { return m_device; }
@@ -213,7 +213,7 @@ public:
// breakpoints
breakpoint *breakpoint_first() const { return m_bplist; }
- int breakpoint_set(offs_t address, const char *condition = NULL, const char *action = NULL);
+ int breakpoint_set(offs_t address, const char *condition = nullptr, const char *action = nullptr);
bool breakpoint_clear(int index);
void breakpoint_clear_all();
bool breakpoint_enable(int index, bool enable = true);
@@ -229,7 +229,7 @@ public:
// registerpoints
registerpoint *registerpoint_first() const { return m_rplist; }
- int registerpoint_set(const char *condition, const char *action = NULL);
+ int registerpoint_set(const char *condition, const char *action = nullptr);
bool registerpoint_clear(int index);
void registerpoint_clear_all();
bool registerpoint_enable(int index, bool enable = true);
@@ -268,7 +268,7 @@ public:
// tracing
void trace(FILE *file, bool trace_over, const char *action);
void trace_printf(const char *fmt, ...) ATTR_PRINTF(2,3);
- void trace_flush() { if (m_trace != NULL) m_trace->flush(); }
+ void trace_flush() { if (m_trace != nullptr) m_trace->flush(); }
void reset_transient_flag() { m_flags &= ~DEBUG_FLAG_TRANSIENT; }
diff --git a/src/emu/debug/debughlp.cpp b/src/emu/debug/debughlp.cpp
index 1dcb7a31477..fcfaeacd29f 100644
--- a/src/emu/debug/debughlp.cpp
+++ b/src/emu/debug/debughlp.cpp
@@ -1469,7 +1469,7 @@ static const help_item static_help_list[] =
const char *debug_get_help(const char *tag)
{
static char ambig_message[1024];
- const help_item *found = NULL;
+ const help_item *found = nullptr;
int i, msglen, foundcount = 0;
int taglen = (int)strlen(tag);
char tagcopy[256];
diff --git a/src/emu/debug/debugvw.cpp b/src/emu/debug/debugvw.cpp
index 9c6c76aba10..eea867f3a63 100644
--- a/src/emu/debug/debugvw.cpp
+++ b/src/emu/debug/debugvw.cpp
@@ -31,7 +31,7 @@
//-------------------------------------------------
debug_view_source::debug_view_source(const char *name, device_t *device)
- : m_next(NULL),
+ : m_next(nullptr),
m_name(name),
m_device(device),
m_is_octal(false)
@@ -67,9 +67,9 @@ debug_view_source::~debug_view_source()
//-------------------------------------------------
debug_view::debug_view(running_machine &machine, debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate)
- : m_next(NULL),
+ : m_next(nullptr),
m_type(type),
- m_source(NULL),
+ m_source(nullptr),
m_osdupdate(osdupdate),
m_osdprivate(osdprivate),
m_visible(80,10),
@@ -133,7 +133,7 @@ void debug_view::end_update()
void debug_view::flush_osd_updates()
{
- if (m_osd_update_pending && m_osdupdate != NULL)
+ if (m_osd_update_pending && m_osdupdate != nullptr)
(*m_osdupdate)(*this, m_osdprivate);
m_osd_update_pending = false;
}
@@ -236,7 +236,7 @@ void debug_view::set_source(const debug_view_source &source)
const debug_view_source *debug_view::source_for_device(device_t *device) const
{
- for (debug_view_source *source = m_source_list.first(); source != NULL; source = source->next())
+ for (debug_view_source *source = m_source_list.first(); source != nullptr; source = source->next())
if (device == source->device())
return source;
return m_source_list.first();
@@ -316,7 +316,7 @@ void debug_view::view_click(const int button, const debug_view_xy& pos)
debug_view_manager::debug_view_manager(running_machine &machine)
: m_machine(machine),
- m_viewlist(NULL)
+ m_viewlist(nullptr)
{
}
@@ -327,7 +327,7 @@ debug_view_manager::debug_view_manager(running_machine &machine)
debug_view_manager::~debug_view_manager()
{
- while (m_viewlist != NULL)
+ while (m_viewlist != nullptr)
{
debug_view *oldhead = m_viewlist;
m_viewlist = oldhead->m_next;
@@ -374,7 +374,7 @@ debug_view *debug_view_manager::alloc_view(debug_view_type type, debug_view_osd_
default:
fatalerror("Attempt to create invalid debug view type %d\n", type);
}
- return NULL;
+ return nullptr;
}
@@ -385,7 +385,7 @@ debug_view *debug_view_manager::alloc_view(debug_view_type type, debug_view_osd_
void debug_view_manager::free_view(debug_view &view)
{
// free us but only if we're in the list
- for (debug_view **viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next)
+ for (debug_view **viewptr = &m_viewlist; *viewptr != nullptr; viewptr = &(*viewptr)->m_next)
if (*viewptr == &view)
{
*viewptr = view.m_next;
@@ -403,7 +403,7 @@ void debug_view_manager::free_view(debug_view &view)
void debug_view_manager::update_all_except(debug_view_type type)
{
// loop over each view and force an update
- for (debug_view *view = m_viewlist; view != NULL; view = view->next())
+ for (debug_view *view = m_viewlist; view != nullptr; view = view->next())
if (type == DVT_NONE || type != view->type())
view->force_update();
}
@@ -416,7 +416,7 @@ void debug_view_manager::update_all_except(debug_view_type type)
void debug_view_manager::update_all(debug_view_type type)
{
// loop over each view and force an update
- for (debug_view *view = m_viewlist; view != NULL; view = view->next())
+ for (debug_view *view = m_viewlist; view != nullptr; view = view->next())
if (type == DVT_NONE || type == view->type())
view->force_update();
}
@@ -429,7 +429,7 @@ void debug_view_manager::update_all(debug_view_type type)
void debug_view_manager::flush_osd_updates()
{
- for (debug_view *view = m_viewlist; view != NULL; view = view->m_next)
+ for (debug_view *view = m_viewlist; view != nullptr; view = view->m_next)
view->flush_osd_updates();
}
@@ -441,7 +441,7 @@ void debug_view_manager::flush_osd_updates()
debug_view *debug_view_manager::append(debug_view *view)
{
debug_view **viewptr;
- for (viewptr = &m_viewlist; *viewptr != NULL; viewptr = &(*viewptr)->m_next) { }
+ for (viewptr = &m_viewlist; *viewptr != nullptr; viewptr = &(*viewptr)->m_next) { }
*viewptr = view;
return view;
}
@@ -482,7 +482,7 @@ debug_view_expression::~debug_view_expression()
void debug_view_expression::set_context(symbol_table *context)
{
- m_parsed.set_symbols((context != NULL) ? context : debug_cpu_get_global_symtable(machine()));
+ m_parsed.set_symbols((context != nullptr) ? context : debug_cpu_get_global_symtable(machine()));
m_dirty = true;
}
diff --git a/src/emu/debug/debugvw.h b/src/emu/debug/debugvw.h
index c813619aaa1..437e68d68f6 100644
--- a/src/emu/debug/debugvw.h
+++ b/src/emu/debug/debugvw.h
@@ -117,7 +117,7 @@ class debug_view_source
public:
// construction/destruction
- debug_view_source(const char *name, device_t *device = NULL);
+ debug_view_source(const char *name, device_t *device = nullptr);
virtual ~debug_view_source();
// getters
diff --git a/src/emu/debug/dvbpoints.cpp b/src/emu/debug/dvbpoints.cpp
index 2e4e16de68f..919f352842f 100644
--- a/src/emu/debug/dvbpoints.cpp
+++ b/src/emu/debug/dvbpoints.cpp
@@ -130,7 +130,7 @@ void debug_view_breakpoints::enumerate_sources()
// iterate over devices with disassembly interfaces
disasm_interface_iterator iter(machine().root_device());
- for (device_disasm_interface *dasm = iter.first(); dasm != NULL; dasm = iter.next())
+ for (device_disasm_interface *dasm = iter.first(); dasm != nullptr; dasm = iter.next())
{
std::string name;
strprintf(name, "%s '%s'", dasm->device().name(), dasm->device().tag());
@@ -203,11 +203,11 @@ void debug_view_breakpoints::pad_astring_to_length(std::string& str, int len)
void debug_view_breakpoints::gather_breakpoints()
{
m_buffer.resize(0);
- for (const debug_view_source *source = m_source_list.first(); source != NULL; source = source->next())
+ for (const debug_view_source *source = m_source_list.first(); source != nullptr; source = source->next())
{
// Collect
device_debug &debugInterface = *source->device()->debug();
- for (device_debug::breakpoint *bp = debugInterface.breakpoint_first(); bp != NULL; bp = bp->next())
+ for (device_debug::breakpoint *bp = debugInterface.breakpoint_first(); bp != nullptr; bp = bp->next())
m_buffer.push_back(bp);
}
diff --git a/src/emu/debug/dvbpoints.h b/src/emu/debug/dvbpoints.h
index 1ee3cdcb510..1867dcf2b6f 100644
--- a/src/emu/debug/dvbpoints.h
+++ b/src/emu/debug/dvbpoints.h
@@ -40,8 +40,8 @@ public:
protected:
// view overrides
- virtual void view_update();
- virtual void view_click(const int button, const debug_view_xy& pos);
+ virtual void view_update() override;
+ virtual void view_click(const int button, const debug_view_xy& pos) override;
private:
// internal helpers
diff --git a/src/emu/debug/dvdisasm.cpp b/src/emu/debug/dvdisasm.cpp
index afcd40dd0ef..e873b0be8bb 100644
--- a/src/emu/debug/dvdisasm.cpp
+++ b/src/emu/debug/dvdisasm.cpp
@@ -47,8 +47,8 @@ debug_view_disasm::debug_view_disasm(running_machine &machine, debug_view_osd_up
m_right_column(DASM_RIGHTCOL_RAW),
m_backwards_steps(3),
m_dasm_width(DEFAULT_DASM_WIDTH),
- m_last_direct_raw(NULL),
- m_last_direct_decrypted(NULL),
+ m_last_direct_raw(nullptr),
+ m_last_direct_decrypted(nullptr),
m_last_change_count(0),
m_last_pcbyte(0),
m_divider1(0),
@@ -63,7 +63,7 @@ debug_view_disasm::debug_view_disasm(running_machine &machine, debug_view_osd_up
// count the number of comments
int total_comments = 0;
- for (const debug_view_source *source = m_source_list.first(); source != NULL; source = source->next())
+ for (const debug_view_source *source = m_source_list.first(); source != nullptr; source = source->next())
{
const debug_view_disasm_source &dasmsource = downcast<const debug_view_disasm_source &>(*source);
total_comments += dasmsource.m_device.debug()->comment_count();
@@ -97,7 +97,7 @@ void debug_view_disasm::enumerate_sources()
// iterate over devices with disassembly interfaces
disasm_interface_iterator iter(machine().root_device());
std::string name;
- for (device_disasm_interface *dasm = iter.first(); dasm != NULL; dasm = iter.next())
+ for (device_disasm_interface *dasm = iter.first(); dasm != nullptr; dasm = iter.next())
{
strprintf(name,"%s '%s'", dasm->device().name(), dasm->device().tag());
m_source_list.append(*global_alloc(debug_view_disasm_source(name.c_str(), dasm->device())));
@@ -420,7 +420,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
// get and add the comment, if present
offs_t comment_address = source.m_space.byte_to_address(m_byteaddress[instr]);
const char *text = source.m_device.debug()->comment_text(comment_address);
- if (text != NULL)
+ if (text != nullptr)
sprintf(&destbuf[m_divider2], "// %.*s", row_width - m_divider2 - 4, text);
}
@@ -560,7 +560,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 != NULL; bp = bp->next())
+ for (device_debug::breakpoint *bp = source.m_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;
}
diff --git a/src/emu/debug/dvdisasm.h b/src/emu/debug/dvdisasm.h
index 202ffbe4d8c..29bb724b5a2 100644
--- a/src/emu/debug/dvdisasm.h
+++ b/src/emu/debug/dvdisasm.h
@@ -82,10 +82,10 @@ public:
protected:
// view overrides
- virtual void view_update();
- virtual void view_notify(debug_view_notification type);
- virtual void view_char(int chval);
- virtual void view_click(const int button, const debug_view_xy& pos);
+ virtual void view_update() override;
+ virtual void view_notify(debug_view_notification type) override;
+ virtual void view_char(int chval) override;
+ virtual void view_click(const int button, const debug_view_xy& pos) override;
private:
// internal helpers
diff --git a/src/emu/debug/dvmemory.cpp b/src/emu/debug/dvmemory.cpp
index c874de58053..88062c9209a 100644
--- a/src/emu/debug/dvmemory.cpp
+++ b/src/emu/debug/dvmemory.cpp
@@ -47,7 +47,7 @@ debug_view_memory_source::debug_view_memory_source(const char *name, address_spa
: debug_view_source(name, &space.device()),
m_space(&space),
m_memintf(dynamic_cast<device_memory_interface *>(&space.device())),
- m_base(NULL),
+ m_base(nullptr),
m_length(0),
m_offsetxor(0),
m_endianness(space.endianness()),
@@ -57,8 +57,8 @@ debug_view_memory_source::debug_view_memory_source(const char *name, address_spa
debug_view_memory_source::debug_view_memory_source(const char *name, memory_region &region)
: debug_view_source(name),
- m_space(NULL),
- m_memintf(NULL),
+ m_space(nullptr),
+ m_memintf(nullptr),
m_base(region.base()),
m_length(region.bytes()),
m_offsetxor(ENDIAN_VALUE_NE_NNE(region.endianness(), 0, region.bytewidth() - 1)),
@@ -69,8 +69,8 @@ debug_view_memory_source::debug_view_memory_source(const char *name, memory_regi
debug_view_memory_source::debug_view_memory_source(const char *name, void *base, int element_size, int num_elements)
: debug_view_source(name),
- m_space(NULL),
- m_memintf(NULL),
+ m_space(nullptr),
+ m_memintf(nullptr),
m_base(base),
m_length(element_size * num_elements),
m_offsetxor(0),
@@ -133,7 +133,7 @@ void debug_view_memory::enumerate_sources()
// first add all the devices' address spaces
memory_interface_iterator iter(machine().root_device());
- for (device_memory_interface *memintf = iter.first(); memintf != NULL; memintf = iter.next())
+ for (device_memory_interface *memintf = iter.first(); memintf != nullptr; memintf = iter.next())
if (&memintf->device() != &machine().root_device())
for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
if (memintf->has_space(spacenum))
@@ -144,7 +144,7 @@ void debug_view_memory::enumerate_sources()
}
// then add all the memory regions
- for (memory_region *region = machine().memory().first_region(); region != NULL; region = region->next())
+ for (memory_region *region = machine().memory().first_region(); region != nullptr; region = region->next())
{
strprintf(name, "Region '%s'", region->name());
m_source_list.append(*global_alloc(debug_view_memory_source(name.c_str(), *region)));
@@ -157,7 +157,7 @@ void debug_view_memory::enumerate_sources()
UINT32 valsize, valcount;
void *base;
const char *itemname = machine().save().indexed_item(itemnum, base, valsize, valcount);
- if (itemname == NULL)
+ if (itemname == nullptr)
break;
// add pretty much anything that's not a timer (we may wish to cull other items later)
@@ -195,10 +195,10 @@ void debug_view_memory::view_notify(debug_view_notification type)
if (m_bytes_per_chunk > 8)
m_bytes_per_chunk = 8;
m_data_format = m_bytes_per_chunk;
- if (source.m_space != NULL)
+ if (source.m_space != nullptr)
m_expression.set_context(&source.m_space->device().debug()->symtable());
else
- m_expression.set_context(NULL);
+ m_expression.set_context(nullptr);
}
}
@@ -262,7 +262,7 @@ void debug_view_memory::view_update()
if (effrow < m_total.y)
{
offs_t addrbyte = m_byte_offset + effrow * m_bytes_per_row;
- offs_t address = (source.m_space != NULL) ? source.m_space->byte_to_address(addrbyte) : addrbyte;
+ offs_t address = (source.m_space != nullptr) ? source.m_space->byte_to_address(addrbyte) : addrbyte;
char addrtext[20];
// generate the address
@@ -409,7 +409,7 @@ void debug_view_memory::view_char(int chval)
{
static const char hexvals[] = "0123456789abcdef";
char *hexchar = (char *)strchr(hexvals, tolower(chval));
- if (hexchar == NULL)
+ if (hexchar == nullptr)
break;
UINT64 data;
@@ -492,7 +492,7 @@ void debug_view_memory::recompute()
// determine the maximum address and address format string from the raw information
int addrchars;
- if (source.m_space != NULL)
+ if (source.m_space != nullptr)
{
m_maxaddr = m_no_translation ? source.m_space->bytemask() : source.m_space->logbytemask();
addrchars = m_no_translation ? source.m_space->addrchars() : source.m_space->logaddrchars();
@@ -510,7 +510,7 @@ void debug_view_memory::recompute()
strprintf(m_addrformat, "%%0%dX%*s", addrchars, 8 - addrchars, "");
// if we are viewing a space with a minimum chunk size, clamp the bytes per chunk
- if (source.m_space != NULL && source.m_space->byte_to_address(1) > 1)
+ if (source.m_space != nullptr && source.m_space->byte_to_address(1) > 1)
{
UINT32 min_bytes_per_chunk = source.m_space->byte_to_address(1);
while (m_bytes_per_chunk < min_bytes_per_chunk)
@@ -576,7 +576,7 @@ bool debug_view_memory::needs_recompute()
const debug_view_memory_source &source = downcast<const debug_view_memory_source &>(*m_source);
offs_t resultbyte;
- if (source.m_space != NULL)
+ if (source.m_space != nullptr)
resultbyte = source.m_space->address_to_byte(m_expression.value()) & source.m_space->logbytemask();
else
resultbyte = m_expression.value();
@@ -697,7 +697,7 @@ bool debug_view_memory::read(UINT8 size, offs_t offs, UINT64 &data)
const debug_view_memory_source &source = downcast<const debug_view_memory_source &>(*m_source);
// if no raw data, just use the standard debug routines
- if (source.m_space != NULL)
+ if (source.m_space != nullptr)
{
offs_t dummyaddr = offs;
@@ -750,7 +750,7 @@ void debug_view_memory::write(UINT8 size, offs_t offs, UINT64 data)
const debug_view_memory_source &source = downcast<const debug_view_memory_source &>(*m_source);
// if no raw data, just use the standard debug routines
- if (source.m_space != NULL)
+ if (source.m_space != nullptr)
{
switch (size)
{
diff --git a/src/emu/debug/dvmemory.h b/src/emu/debug/dvmemory.h
index c170a2cf617..4039136e558 100644
--- a/src/emu/debug/dvmemory.h
+++ b/src/emu/debug/dvmemory.h
@@ -67,10 +67,10 @@ public:
protected:
// view overrides
- virtual void view_notify(debug_view_notification type);
- virtual void view_update();
- virtual void view_char(int chval);
- virtual void view_click(const int button, const debug_view_xy& pos);
+ virtual void view_notify(debug_view_notification type) override;
+ virtual void view_update() override;
+ virtual void view_char(int chval) override;
+ virtual void view_click(const int button, const debug_view_xy& pos) override;
private:
struct cursor_pos
diff --git a/src/emu/debug/dvstate.cpp b/src/emu/debug/dvstate.cpp
index 8e5906be416..dd3f3d33f9c 100644
--- a/src/emu/debug/dvstate.cpp
+++ b/src/emu/debug/dvstate.cpp
@@ -44,7 +44,7 @@ debug_view_state::debug_view_state(running_machine &machine, debug_view_osd_upda
: debug_view(machine, DVT_STATE, osdupdate, osdprivate),
m_divider(0),
m_last_update(0),
- m_state_list(NULL)
+ m_state_list(nullptr)
{
// fail if no available sources
enumerate_sources();
@@ -76,7 +76,7 @@ void debug_view_state::enumerate_sources()
// iterate over devices that have state interfaces
state_interface_iterator iter(machine().root_device());
std::string name;
- for (device_state_interface *state = iter.first(); state != NULL; state = iter.next())
+ for (device_state_interface *state = iter.first(); state != nullptr; state = iter.next())
{
strprintf(name,"%s '%s'", state->device().name(), state->device().tag());
m_source_list.append(*global_alloc(debug_view_state_source(name.c_str(), state->device())));
@@ -94,7 +94,7 @@ void debug_view_state::enumerate_sources()
void debug_view_state::reset()
{
// free all items in the state list
- while (m_state_list != NULL)
+ while (m_state_list != nullptr)
{
state_item *oldhead = m_state_list;
m_state_list = oldhead->m_next;
@@ -141,7 +141,7 @@ void debug_view_state::recompute()
tailptr = &(*tailptr)->m_next;
// add all registers into it
- for (const device_state_entry *entry = source.m_stateintf->state_first(); entry != NULL; entry = entry->next())
+ for (const device_state_entry *entry = source.m_stateintf->state_first(); entry != nullptr; entry = entry->next())
if (entry->divider())
{
*tailptr = auto_alloc(machine(), state_item(REG_DIVIDER, "", 0));
@@ -157,7 +157,7 @@ void debug_view_state::recompute()
int count = 0;
int maxtaglen = 0;
int maxvallen = 0;
- for (state_item *item = m_state_list; item != NULL; item = item->m_next)
+ for (state_item *item = m_state_list; item != nullptr; item = item->m_next)
{
count++;
maxtaglen = MAX(maxtaglen, item->m_symbol.length());
@@ -202,12 +202,12 @@ void debug_view_state::view_update()
// get cycle count if we have an execute interface
const debug_view_state_source &source = downcast<const debug_view_state_source &>(*m_source);
UINT64 total_cycles = 0;
- if (source.m_execintf != NULL)
+ if (source.m_execintf != nullptr)
total_cycles = source.m_execintf->total_cycles();
// find the first entry
state_item *curitem = m_state_list;
- for (int index = 0; curitem != NULL && index < m_topleft.y; index++)
+ for (int index = 0; curitem != nullptr && index < m_topleft.y; index++)
curitem = curitem->m_next;
// loop over visible rows
@@ -218,7 +218,7 @@ void debug_view_state::view_update()
UINT32 col = 0;
// if this visible row is valid, add it to the buffer
- if (curitem != NULL)
+ if (curitem != nullptr)
{
UINT32 effcol = m_topleft.x;
UINT8 attrib = DCA_NORMAL;
@@ -239,7 +239,7 @@ void debug_view_state::view_update()
break;
case REG_CYCLES:
- if (source.m_execintf != NULL)
+ if (source.m_execintf != nullptr)
{
curitem->m_currval = source.m_execintf->cycles_remaining();
strprintf(valstr, "%-8d", (UINT32)curitem->m_currval);
@@ -247,7 +247,7 @@ void debug_view_state::view_update()
break;
case REG_BEAMX:
- if (screen != NULL)
+ if (screen != nullptr)
{
curitem->m_currval = screen->hpos();
strprintf(valstr, "%4d", (UINT32)curitem->m_currval);
@@ -255,7 +255,7 @@ void debug_view_state::view_update()
break;
case REG_BEAMY:
- if (screen != NULL)
+ if (screen != nullptr)
{
curitem->m_currval = screen->vpos();
strprintf(valstr, "%4d", (UINT32)curitem->m_currval);
@@ -263,7 +263,7 @@ void debug_view_state::view_update()
break;
case REG_FRAME:
- if (screen != NULL)
+ if (screen != nullptr)
{
curitem->m_currval = screen->frame_number();
strprintf(valstr, "%6d", (UINT32)curitem->m_currval);
@@ -336,7 +336,7 @@ void debug_view_state::view_update()
//-------------------------------------------------
debug_view_state::state_item::state_item(int index, const char *name, UINT8 valuechars)
- : m_next(NULL),
+ : m_next(nullptr),
m_lastval(0),
m_currval(0),
m_index(index),
diff --git a/src/emu/debug/dvstate.h b/src/emu/debug/dvstate.h
index 88930587d7b..909526ee5f6 100644
--- a/src/emu/debug/dvstate.h
+++ b/src/emu/debug/dvstate.h
@@ -50,8 +50,8 @@ class debug_view_state : public debug_view
protected:
// view overrides
- virtual void view_update();
- virtual void view_notify(debug_view_notification type);
+ virtual void view_update() override;
+ virtual void view_notify(debug_view_notification type) override;
private:
struct state_item
diff --git a/src/emu/debug/dvtext.cpp b/src/emu/debug/dvtext.cpp
index 80f1aa7982c..ce1d8abdb1b 100644
--- a/src/emu/debug/dvtext.cpp
+++ b/src/emu/debug/dvtext.cpp
@@ -79,7 +79,7 @@ void debug_view_textbuf::view_update()
UINT32 col = 0;
// if this visible row is valid, add it to the buffer
- if (line != NULL)
+ if (line != nullptr)
{
size_t len = strlen(line);
UINT32 effcol = m_topleft.x;
diff --git a/src/emu/debug/dvtext.h b/src/emu/debug/dvtext.h
index 12181e6c0e1..8ec67c3158c 100644
--- a/src/emu/debug/dvtext.h
+++ b/src/emu/debug/dvtext.h
@@ -31,8 +31,8 @@ protected:
protected:
// view overrides
- virtual void view_update();
- virtual void view_notify(debug_view_notification type);
+ virtual void view_update() override;
+ virtual void view_notify(debug_view_notification type) override;
private:
// internal state
diff --git a/src/emu/debug/dvwpoints.cpp b/src/emu/debug/dvwpoints.cpp
index c09cff91bf3..c1e346c62b2 100644
--- a/src/emu/debug/dvwpoints.cpp
+++ b/src/emu/debug/dvwpoints.cpp
@@ -152,7 +152,7 @@ void debug_view_watchpoints::enumerate_sources()
// iterate over devices with disassembly interfaces
disasm_interface_iterator iter(machine().root_device());
- for (device_disasm_interface *dasm = iter.first(); dasm != NULL; dasm = iter.next())
+ for (device_disasm_interface *dasm = iter.first(); dasm != nullptr; dasm = iter.next())
{
std::string name;
strprintf(name, "%s '%s'", dasm->device().name(), dasm->device().tag());
@@ -227,13 +227,13 @@ void debug_view_watchpoints::pad_astring_to_length(std::string& str, int len)
void debug_view_watchpoints::gather_watchpoints()
{
m_buffer.resize(0);
- for (const debug_view_source *source = m_source_list.first(); source != NULL; source = source->next())
+ for (const debug_view_source *source = m_source_list.first(); source != nullptr; source = source->next())
{
// Collect
device_debug &debugInterface = *source->device()->debug();
for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
{
- for (device_debug::watchpoint *wp = debugInterface.watchpoint_first(spacenum); wp != NULL; wp = wp->next())
+ for (device_debug::watchpoint *wp = debugInterface.watchpoint_first(spacenum); wp != nullptr; wp = wp->next())
m_buffer.push_back(wp);
}
}
diff --git a/src/emu/debug/dvwpoints.h b/src/emu/debug/dvwpoints.h
index e56c992cb8d..b7d899e7717 100644
--- a/src/emu/debug/dvwpoints.h
+++ b/src/emu/debug/dvwpoints.h
@@ -36,8 +36,8 @@ class debug_view_watchpoints : public debug_view
protected:
// view overrides
- virtual void view_update();
- virtual void view_click(const int button, const debug_view_xy& pos);
+ virtual void view_update() override;
+ virtual void view_click(const int button, const debug_view_xy& pos) override;
private:
// internal helpers
diff --git a/src/emu/debug/express.cpp b/src/emu/debug/express.cpp
index 4dbe76202b7..62324092a28 100644
--- a/src/emu/debug/express.cpp
+++ b/src/emu/debug/express.cpp
@@ -112,14 +112,14 @@ class integer_symbol_entry : public symbol_entry
{
public:
// construction/destruction
- integer_symbol_entry(symbol_table &table, const char *name, symbol_table::read_write rw, UINT64 *ptr = NULL);
+ integer_symbol_entry(symbol_table &table, const char *name, symbol_table::read_write rw, UINT64 *ptr = nullptr);
integer_symbol_entry(symbol_table &table, const char *name, UINT64 constval);
integer_symbol_entry(symbol_table &table, const char *name, void *ref, symbol_table::getter_func getter, symbol_table::setter_func setter);
// symbol access
- virtual bool is_lval() const;
- virtual UINT64 value() const;
- virtual void set_value(UINT64 newvalue);
+ virtual bool is_lval() const override;
+ virtual UINT64 value() const override;
+ virtual void set_value(UINT64 newvalue) override;
private:
// internal helpers
@@ -141,9 +141,9 @@ public:
function_symbol_entry(symbol_table &table, const char *name, void *ref, int minparams, int maxparams, symbol_table::execute_func execute);
// symbol access
- virtual bool is_lval() const;
- virtual UINT64 value() const;
- virtual void set_value(UINT64 newvalue);
+ virtual bool is_lval() const override;
+ virtual UINT64 value() const override;
+ virtual void set_value(UINT64 newvalue) override;
// execution helper
virtual UINT64 execute(int numparams, const UINT64 *paramlist);
@@ -204,7 +204,7 @@ const char *expression_error::code_string() const
//-------------------------------------------------
symbol_entry::symbol_entry(symbol_table &table, symbol_type type, const char *name, void *ref)
- : m_next(NULL),
+ : m_next(nullptr),
m_table(table),
m_type(type),
m_name(name),
@@ -232,9 +232,9 @@ symbol_entry::~symbol_entry()
//-------------------------------------------------
integer_symbol_entry::integer_symbol_entry(symbol_table &table, const char *name, symbol_table::read_write rw, UINT64 *ptr)
- : symbol_entry(table, SMT_INTEGER, name, (ptr == NULL) ? &m_value : ptr),
+ : symbol_entry(table, SMT_INTEGER, name, (ptr == nullptr) ? &m_value : ptr),
m_getter(internal_getter),
- m_setter((rw == symbol_table::READ_ONLY) ? NULL : internal_setter),
+ m_setter((rw == symbol_table::READ_ONLY) ? nullptr : internal_setter),
m_value(0)
{
}
@@ -243,7 +243,7 @@ integer_symbol_entry::integer_symbol_entry(symbol_table &table, const char *name
integer_symbol_entry::integer_symbol_entry(symbol_table &table, const char *name, UINT64 constval)
: symbol_entry(table, SMT_INTEGER, name, &m_value),
m_getter(internal_getter),
- m_setter(NULL),
+ m_setter(nullptr),
m_value(constval)
{
}
@@ -264,7 +264,7 @@ integer_symbol_entry::integer_symbol_entry(symbol_table &table, const char *name
bool integer_symbol_entry::is_lval() const
{
- return (m_setter != NULL);
+ return (m_setter != nullptr);
}
@@ -284,7 +284,7 @@ UINT64 integer_symbol_entry::value() const
void integer_symbol_entry::set_value(UINT64 newvalue)
{
- if (m_setter != NULL)
+ if (m_setter != nullptr)
(*m_setter)(m_table, m_ref, newvalue);
else
throw emu_fatalerror("Symbol '%s' is read-only", m_name.c_str());
@@ -387,10 +387,10 @@ UINT64 function_symbol_entry::execute(int numparams, const UINT64 *paramlist)
symbol_table::symbol_table(void *globalref, symbol_table *parent)
: m_parent(parent),
m_globalref(globalref),
- m_memory_param(NULL),
- m_memory_valid(NULL),
- m_memory_read(NULL),
- m_memory_write(NULL)
+ m_memory_param(nullptr),
+ m_memory_valid(nullptr),
+ m_memory_read(nullptr),
+ m_memory_write(nullptr)
{
}
@@ -460,13 +460,13 @@ void symbol_table::add(const char *name, void *ref, int minparams, int maxparams
symbol_entry *symbol_table::find_deep(const char *symbol)
{
// walk up the table hierarchy to find the owner
- for (symbol_table *symtable = this; symtable != NULL; symtable = symtable->m_parent)
+ for (symbol_table *symtable = this; symtable != nullptr; symtable = symtable->m_parent)
{
symbol_entry *entry = symtable->find(symbol);
- if (entry != NULL)
+ if (entry != nullptr)
return entry;
}
- return NULL;
+ return nullptr;
}
@@ -477,7 +477,7 @@ symbol_entry *symbol_table::find_deep(const char *symbol)
UINT64 symbol_table::value(const char *symbol)
{
symbol_entry *entry = find_deep(symbol);
- return (entry != NULL) ? entry->value() : 0;
+ return (entry != nullptr) ? entry->value() : 0;
}
@@ -488,7 +488,7 @@ UINT64 symbol_table::value(const char *symbol)
void symbol_table::set_value(const char *symbol, UINT64 value)
{
symbol_entry *entry = find_deep(symbol);
- if (entry != NULL)
+ if (entry != nullptr)
entry->set_value(value);
}
@@ -501,8 +501,8 @@ void symbol_table::set_value(const char *symbol, UINT64 value)
expression_error::error_code symbol_table::memory_valid(const char *name, expression_space space)
{
// walk up the table hierarchy to find the owner
- for (symbol_table *symtable = this; symtable != NULL; symtable = symtable->m_parent)
- if (symtable->m_memory_valid != NULL)
+ for (symbol_table *symtable = this; symtable != nullptr; symtable = symtable->m_parent)
+ if (symtable->m_memory_valid != nullptr)
{
expression_error::error_code err = (*symtable->m_memory_valid)(symtable->m_memory_param, name, space);
if (err != expression_error::NO_SUCH_MEMORY_SPACE)
@@ -519,11 +519,11 @@ expression_error::error_code symbol_table::memory_valid(const char *name, expres
UINT64 symbol_table::memory_value(const char *name, expression_space space, UINT32 offset, int size)
{
// walk up the table hierarchy to find the owner
- for (symbol_table *symtable = this; symtable != NULL; symtable = symtable->m_parent)
- if (symtable->m_memory_valid != NULL)
+ for (symbol_table *symtable = this; symtable != nullptr; symtable = symtable->m_parent)
+ if (symtable->m_memory_valid != nullptr)
{
expression_error::error_code err = (*symtable->m_memory_valid)(symtable->m_memory_param, name, space);
- if (err != expression_error::NO_SUCH_MEMORY_SPACE && symtable->m_memory_read != NULL)
+ if (err != expression_error::NO_SUCH_MEMORY_SPACE && symtable->m_memory_read != nullptr)
return (*symtable->m_memory_read)(symtable->m_memory_param, name, space, offset, size);
return 0;
}
@@ -538,11 +538,11 @@ UINT64 symbol_table::memory_value(const char *name, expression_space space, UINT
void symbol_table::set_memory_value(const char *name, expression_space space, UINT32 offset, int size, UINT64 value)
{
// walk up the table hierarchy to find the owner
- for (symbol_table *symtable = this; symtable != NULL; symtable = symtable->m_parent)
- if (symtable->m_memory_valid != NULL)
+ for (symbol_table *symtable = this; symtable != nullptr; symtable = symtable->m_parent)
+ if (symtable->m_memory_valid != nullptr)
{
expression_error::error_code err = (*symtable->m_memory_valid)(symtable->m_memory_param, name, space);
- if (err != expression_error::NO_SUCH_MEMORY_SPACE && symtable->m_memory_write != NULL)
+ if (err != expression_error::NO_SUCH_MEMORY_SPACE && symtable->m_memory_write != nullptr)
(*symtable->m_memory_write)(symtable->m_memory_param, name, space, offset, size, value);
return;
}
@@ -563,11 +563,11 @@ parsed_expression::parsed_expression(symbol_table *symtable, const char *express
m_token_stack_ptr(0)
{
// if we got an expression parse it
- if (expression != NULL)
+ if (expression != nullptr)
parse(expression);
// if we get a result pointer, execute it
- if (result != NULL)
+ if (result != nullptr)
*result = execute();
}
@@ -866,7 +866,7 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *&
{
static const char valid[] = "abcdefghijklmnopqrstuvwxyz0123456789_$#.:";
char val = tolower((UINT8)string[0]);
- if (val == 0 || strchr(valid, val) == NULL)
+ if (val == 0 || strchr(valid, val) == nullptr)
break;
buffer.append(&val, 1);
string++;
@@ -939,7 +939,7 @@ void parsed_expression::parse_symbol_or_number(parse_token &token, const char *&
// check for a symbol match
symbol_entry *symbol = m_symtable->find_deep(buffer.c_str());
- if (symbol != NULL)
+ if (symbol != nullptr)
{
token.configure_symbol(*symbol);
@@ -971,7 +971,7 @@ void parsed_expression::parse_number(parse_token &token, const char *string, int
// look up the number's value, stopping if not valid
static const char numbers[] = "0123456789abcdef";
const char *ptr = strchr(numbers, tolower((UINT8)*string));
- if (ptr == NULL)
+ if (ptr == nullptr)
break;
// if outside of the base, we also stop
@@ -1065,9 +1065,9 @@ void parsed_expression::parse_memory_operator(parse_token &token, const char *st
{
// if there is a '.', it means we have a name
const char *startstring = string;
- const char *namestring = NULL;
+ const char *namestring = nullptr;
const char *dot = strrchr(string, '.');
- if (dot != NULL)
+ if (dot != nullptr)
{
namestring = m_stringlist.append(*global_alloc(expression_string(string, dot - string)));
string = dot + 1;
@@ -1130,7 +1130,7 @@ void parsed_expression::parse_memory_operator(parse_token &token, const char *st
}
// validate the name
- if (m_symtable != NULL)
+ if (m_symtable != nullptr)
{
expression_error::error_code err = m_symtable->memory_valid(namestring, memspace);
if (err != expression_error::NONE)
@@ -1154,15 +1154,15 @@ void parsed_expression::normalize_operator(parse_token *prevtoken, parse_token &
{
// Determine if an open paren is part of a function or not
case TVL_LPAREN:
- if (prevtoken != NULL && prevtoken->is_operator(TVL_EXECUTEFUNC))
+ if (prevtoken != nullptr && prevtoken->is_operator(TVL_EXECUTEFUNC))
thistoken.set_function_separator();
break;
// Determine if ++ is a pre or post increment
case TVL_PLUSPLUS:
- if (nexttoken != NULL && (nexttoken->is_symbol() || (nexttoken->is_operator(TVL_MEMORYAT))))
+ if (nexttoken != nullptr && (nexttoken->is_symbol() || (nexttoken->is_operator(TVL_MEMORYAT))))
thistoken.configure_operator(TVL_PREINCREMENT, 2);
- else if (prevtoken != NULL && (prevtoken->is_symbol() || (prevtoken->is_operator(TVL_MEMORYAT))))
+ else if (prevtoken != nullptr && (prevtoken->is_symbol() || (prevtoken->is_operator(TVL_MEMORYAT))))
thistoken.configure_operator(TVL_POSTINCREMENT, 1);
else
throw expression_error(expression_error::SYNTAX, thistoken.offset());
@@ -1170,9 +1170,9 @@ void parsed_expression::normalize_operator(parse_token *prevtoken, parse_token &
// Determine if -- is a pre or post decrement
case TVL_MINUSMINUS:
- if (nexttoken != NULL && (nexttoken->is_symbol() || (nexttoken->is_operator(TVL_MEMORYAT))))
+ if (nexttoken != nullptr && (nexttoken->is_symbol() || (nexttoken->is_operator(TVL_MEMORYAT))))
thistoken.configure_operator(TVL_PREDECREMENT, 2);
- else if (prevtoken != NULL && (prevtoken->is_symbol() || (prevtoken->is_operator(TVL_MEMORYAT))))
+ else if (prevtoken != nullptr && (prevtoken->is_symbol() || (prevtoken->is_operator(TVL_MEMORYAT))))
thistoken.configure_operator(TVL_POSTDECREMENT, 1);
else
throw expression_error(expression_error::SYNTAX, thistoken.offset());
@@ -1183,7 +1183,7 @@ void parsed_expression::normalize_operator(parse_token *prevtoken, parse_token &
case TVL_SUBTRACT:
// Assume we're unary if we are the first token, or if the previous token is not
// a symbol, a number, or a right parenthesis
- if (prevtoken == NULL || (!prevtoken->is_symbol() && !prevtoken->is_number() && !prevtoken->is_operator(TVL_RPAREN)))
+ if (prevtoken == nullptr || (!prevtoken->is_symbol() && !prevtoken->is_number() && !prevtoken->is_operator(TVL_RPAREN)))
thistoken.configure_operator(thistoken.is_operator(TVL_ADD) ? TVL_UPLUS : TVL_UMINUS, 2);
break;
@@ -1192,7 +1192,7 @@ void parsed_expression::normalize_operator(parse_token *prevtoken, parse_token &
for (int lookback = 0; lookback < MAX_STACK_DEPTH; lookback++)
{
parse_token *peek = peek_token(lookback);
- if (peek == NULL)
+ if (peek == nullptr)
break;
// if we hit an execute function operator, or else a left parenthesis that is
@@ -1218,9 +1218,9 @@ void parsed_expression::infix_to_postfix()
simple_list<parse_token> stack;
// loop over all the original tokens
- parse_token *prev = NULL;
+ parse_token *prev = nullptr;
parse_token *next;
- for (parse_token *token = m_tokenlist.detach_all(); token != NULL; prev = token, token = next)
+ for (parse_token *token = m_tokenlist.detach_all(); token != nullptr; prev = token, token = next)
{
// pre-determine our next token
next = token->next();
@@ -1246,7 +1246,7 @@ void parsed_expression::infix_to_postfix()
{
// loop until we find our matching opener
parse_token *popped;
- while ((popped = stack.detach_head()) != NULL)
+ while ((popped = stack.detach_head()) != nullptr)
{
if (popped->is_operator(TVL_LPAREN))
break;
@@ -1254,7 +1254,7 @@ void parsed_expression::infix_to_postfix()
}
// if we didn't find an open paren, it's an error
- if (popped == NULL)
+ if (popped == nullptr)
throw expression_error(expression_error::UNBALANCED_PARENS, token->offset());
// free ourself and our matching opening parenthesis
@@ -1271,7 +1271,7 @@ void parsed_expression::infix_to_postfix()
// loop until we can't peek at the stack anymore
parse_token *peek;
- while ((peek = stack.first()) != NULL)
+ while ((peek = stack.first()) != nullptr)
{
// break if any of the above conditions are true
if (peek->is_operator(TVL_LPAREN))
@@ -1292,7 +1292,7 @@ void parsed_expression::infix_to_postfix()
// finish popping the stack
parse_token *popped;
- while ((popped = stack.detach_head()) != NULL)
+ while ((popped = stack.detach_head()) != nullptr)
{
// it is an error to have a left parenthesis still on the stack
if (popped->is_operator(TVL_LPAREN))
@@ -1342,7 +1342,7 @@ inline void parsed_expression::pop_token(parse_token &token)
inline parsed_expression::parse_token *parsed_expression::peek_token(int count)
{
if (m_token_stack_ptr <= count)
- return NULL;
+ return nullptr;
return &m_token_stack[m_token_stack_ptr - count - 1];
}
@@ -1395,7 +1395,7 @@ UINT64 parsed_expression::execute_tokens()
// loop over the entire sequence
parse_token t1, t2, result;
- for (parse_token *token = m_tokenlist.first(); token != NULL; token = token->next())
+ for (parse_token *token = m_tokenlist.first(); token != nullptr; token = token->next())
{
// symbols/numbers/strings just get pushed
if (!token->is_operator())
@@ -1641,7 +1641,7 @@ UINT64 parsed_expression::execute_tokens()
pop_token_rval(result);
// error if our stack isn't empty
- if (peek_token(0) != NULL)
+ if (peek_token(0) != nullptr)
throw expression_error(expression_error::SYNTAX, 0);
return result.value();
@@ -1658,13 +1658,13 @@ UINT64 parsed_expression::execute_tokens()
//-------------------------------------------------
parsed_expression::parse_token::parse_token(int offset)
- : m_next(NULL),
+ : m_next(nullptr),
m_type(INVALID),
m_offset(offset),
m_value(0),
m_flags(0),
- m_string(NULL),
- m_symbol(NULL)
+ m_string(nullptr),
+ m_symbol(nullptr)
{
}
@@ -1681,7 +1681,7 @@ UINT64 parsed_expression::parse_token::get_lval_value(symbol_table *table)
return m_symbol->value();
// or get the value from the memory callbacks
- else if (is_memory() && table != NULL)
+ else if (is_memory() && table != nullptr)
return table->memory_value(m_string, memory_space(), address(), 1 << memory_size());
return 0;
@@ -1700,7 +1700,7 @@ inline void parsed_expression::parse_token::set_lval_value(symbol_table *table,
m_symbol->set_value(value);
// or set the value via the memory callbacks
- else if (is_memory() && table != NULL)
+ else if (is_memory() && table != nullptr)
table->set_memory_value(m_string, memory_space(), address(), 1 << memory_size(), value);
}
@@ -1714,13 +1714,13 @@ void parsed_expression::execute_function(parse_token &token)
{
// pop off all pushed parameters
UINT64 funcparams[MAX_FUNCTION_PARAMS];
- symbol_entry *symbol = NULL;
+ symbol_entry *symbol = nullptr;
int paramcount = 0;
while (paramcount < MAX_FUNCTION_PARAMS)
{
// peek at the next token on the stack
parse_token *peek = peek_token(0);
- if (peek == NULL)
+ if (peek == nullptr)
throw expression_error(expression_error::INVALID_PARAM_COUNT, token.offset());
// if it is a function symbol, break out of the loop
diff --git a/src/emu/debug/express.h b/src/emu/debug/express.h
index 37f357b0830..fad3e478cf8 100644
--- a/src/emu/debug/express.h
+++ b/src/emu/debug/express.h
@@ -166,7 +166,7 @@ public:
};
// construction/destruction
- symbol_table(void *globalref, symbol_table *parent = NULL);
+ symbol_table(void *globalref, symbol_table *parent = nullptr);
// getters
symbol_entry *first() const { return m_symlist.first(); }
@@ -177,9 +177,9 @@ public:
void configure_memory(void *param, valid_func valid, read_func read, write_func write);
// symbol access
- void add(const char *name, read_write rw, UINT64 *ptr = NULL);
+ void add(const char *name, read_write rw, UINT64 *ptr = nullptr);
void add(const char *name, UINT64 constvalue);
- void add(const char *name, void *ref, getter_func getter, setter_func setter = NULL);
+ 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_deep(const char *name);
@@ -214,7 +214,7 @@ class parsed_expression
public:
// construction/destruction
parsed_expression(const parsed_expression &src) { copy(src); }
- parsed_expression(symbol_table *symtable = NULL, const char *expression = NULL, UINT64 *result = NULL);
+ parsed_expression(symbol_table *symtable = nullptr, const char *expression = nullptr, UINT64 *result = nullptr);
// operators
parsed_expression &operator=(const parsed_expression &src) { copy(src); return *this; }
@@ -331,7 +331,7 @@ private:
public:
// construction/destruction
expression_string(const char *string, int length = 0)
- : m_next(NULL),
+ : m_next(nullptr),
m_string(string, (length == 0) ? strlen(string) : length) { }
// operators
diff --git a/src/emu/debug/textbuf.cpp b/src/emu/debug/textbuf.cpp
index 52fd669a997..cd96be9cd5a 100644
--- a/src/emu/debug/textbuf.cpp
+++ b/src/emu/debug/textbuf.cpp
@@ -88,14 +88,14 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
/* allocate memory for the text buffer object */
text = (text_buffer *)global_alloc(text_buffer);
if (!text)
- return NULL;
+ return nullptr;
/* allocate memory for the buffer itself */
text->buffer = (char *)global_alloc_array(char, bytes);
if (!text->buffer)
{
global_free(text);
- return NULL;
+ return nullptr;
}
/* allocate memory for the lines array */
@@ -104,7 +104,7 @@ text_buffer *text_buffer_alloc(UINT32 bytes, UINT32 lines)
{
global_free_array(text->buffer);
global_free(text);
- return NULL;
+ return nullptr;
}
/* initialize the buffer description */
@@ -319,6 +319,6 @@ const char *text_buffer_get_seqnum_line(text_buffer *text, UINT32 seqnum)
UINT32 numlines = text_buffer_num_lines(text);
UINT32 index = seqnum - text->linestartseq;
if (index >= numlines)
- return NULL;
+ return nullptr;
return &text->buffer[text->lineoffs[(text->linestart + index) % text->linesize]];
}
diff --git a/src/emu/debugger.cpp b/src/emu/debugger.cpp
index d4ddd241389..b21e4ca779b 100644
--- a/src/emu/debugger.cpp
+++ b/src/emu/debugger.cpp
@@ -110,7 +110,7 @@ static void debugger_exit(running_machine &machine)
machine_entry **entryptr;
/* remove this machine from the list; it came down cleanly */
- for (entryptr = &machine_list; *entryptr != NULL; entryptr = &(*entryptr)->next)
+ for (entryptr = &machine_list; *entryptr != nullptr; entryptr = &(*entryptr)->next)
if ((*entryptr)->machine == &machine)
{
machine_entry *deleteme = *entryptr;
@@ -130,7 +130,7 @@ static void debugger_exit(running_machine &machine)
void debugger_flush_all_traces_on_abnormal_exit(void)
{
/* clear out the machine list and flush traces on each one */
- while (machine_list != NULL)
+ while (machine_list != nullptr)
{
machine_entry *deleteme = machine_list;
debug_cpu_flush_traces(*deleteme->machine);
diff --git a/src/emu/devcb.cpp b/src/emu/devcb.cpp
index 8a05625aabd..d54c25e530b 100644
--- a/src/emu/devcb.cpp
+++ b/src/emu/devcb.cpp
@@ -37,12 +37,12 @@ devcb_base::devcb_base(device_t &device, UINT64 defmask)
void devcb_base::reset(callback_type type)
{
m_type = type;
- m_target_tag = NULL;
+ m_target_tag = nullptr;
m_target_int = 0;
- m_space_tag = NULL;
+ m_space_tag = nullptr;
m_space_num = AS_0;
- m_space = NULL;
- m_target.ptr = NULL;
+ m_space = nullptr;
+ m_target.ptr = nullptr;
m_rshift = 0;
m_mask = ~U64(0);
}
@@ -56,8 +56,8 @@ void devcb_base::reset(callback_type type)
void devcb_base::resolve_ioport()
{
// attempt to resolve, fatal error if fail
- m_target.ioport = (m_target_tag != NULL) ? m_device.owner()->ioport(m_target_tag) : NULL;
- if (m_target.ioport == NULL)
+ m_target.ioport = (m_target_tag != nullptr) ? m_device.owner()->ioport(m_target_tag) : nullptr;
+ if (m_target.ioport == nullptr)
throw emu_fatalerror("Unable to resolve I/O port callback reference to '%s' in device '%s'\n", m_target_tag, m_device.tag());
}
@@ -70,8 +70,8 @@ void devcb_base::resolve_ioport()
void devcb_base::resolve_inputline()
{
// attempt to resolve, fatal error if fail
- m_target.device = (m_target_tag != NULL) ? m_device.owner()->subdevice(m_target_tag) : NULL;
- if (m_target.device == NULL)
+ m_target.device = (m_target_tag != nullptr) ? m_device.owner()->subdevice(m_target_tag) : nullptr;
+ if (m_target.device == nullptr)
throw emu_fatalerror("Unable to resolve device reference to '%s' in device '%s'\n", m_target_tag, m_device.tag());
// make sure we have an execute interface
@@ -89,8 +89,8 @@ void devcb_base::resolve_inputline()
void devcb_base::resolve_space()
{
// attempt to resolve, fatal error if fail
- device_t *spacedev = (m_space_tag != NULL) ? m_device.owner()->subdevice(m_space_tag) : NULL;
- if (spacedev == NULL)
+ device_t *spacedev = (m_space_tag != nullptr) ? m_device.owner()->subdevice(m_space_tag) : nullptr;
+ if (spacedev == nullptr)
throw emu_fatalerror("Unable to resolve device reference to '%s' in device '%s'\n", m_space_tag, m_device.tag());
if (!spacedev->memory().has_space(m_space_num))
throw emu_fatalerror("Unable to resolve device address space %d on '%s' in device '%s'\n", m_space_num, m_space_tag, m_device.tag());
@@ -109,7 +109,7 @@ void devcb_base::resolve_space()
devcb_read_base::devcb_read_base(device_t &device, UINT64 defmask)
: devcb_base(device, defmask),
- m_adapter(NULL)
+ m_adapter(nullptr)
{
}
@@ -141,7 +141,7 @@ void devcb_read_base::reset(callback_type type)
void devcb_read_base::resolve()
{
// first resolve any address spaces
- if (m_space_tag != NULL)
+ if (m_space_tag != nullptr)
resolve_space();
else
m_space = &downcast<driver_device &>(m_device.machine().root_device()).generic_space();
@@ -193,7 +193,7 @@ void devcb_read_base::resolve()
case CALLBACK_IOPORT:
resolve_ioport();
m_target_int = 0;
- m_adapter = (m_target.ioport == NULL) ? &devcb_read_base::read_constant_adapter : &devcb_read_base::read_ioport_adapter;
+ m_adapter = (m_target.ioport == nullptr) ? &devcb_read_base::read_constant_adapter : &devcb_read_base::read_ioport_adapter;
break;
case CALLBACK_LOG:
@@ -337,7 +337,7 @@ UINT64 devcb_read_base::read_constant_adapter(address_space &space, offs_t offse
devcb_write_base::devcb_write_base(device_t &device, UINT64 defmask)
: devcb_base(device, defmask),
- m_adapter(NULL)
+ m_adapter(nullptr)
{
}
@@ -369,7 +369,7 @@ void devcb_write_base::reset(callback_type type)
void devcb_write_base::resolve()
{
// first resolve any address spaces
- if (m_space_tag != NULL)
+ if (m_space_tag != nullptr)
resolve_space();
else
m_space = &downcast<driver_device &>(m_device.machine().root_device()).generic_space();
@@ -415,7 +415,7 @@ void devcb_write_base::resolve()
case CALLBACK_IOPORT:
resolve_ioport();
- m_adapter = (m_target.ioport == NULL) ? &devcb_write_base::write_noop_adapter : &devcb_write_base::write_ioport_adapter;
+ m_adapter = (m_target.ioport == nullptr) ? &devcb_write_base::write_noop_adapter : &devcb_write_base::write_ioport_adapter;
break;
case CALLBACK_LOG:
diff --git a/src/emu/devcb.h b/src/emu/devcb.h
index 9db94a78699..5aefb2b3429 100644
--- a/src/emu/devcb.h
+++ b/src/emu/devcb.h
@@ -296,7 +296,7 @@ class devcb_read_line : public devcb_read_base
public:
devcb_read_line(device_t &device) : devcb_read_base(device, 0xff) { }
int operator()() { return (this->*m_adapter)(*m_space, 0, U64(0xff)) & 1; }
- int operator()(address_space &space) { return (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, 0, U64(0xff)) & 1; }
+ int operator()(address_space &space) { return (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, 0, U64(0xff)) & 1; }
};
@@ -307,7 +307,7 @@ class devcb_read8 : public devcb_read_base
public:
devcb_read8(device_t &device) : devcb_read_base(device, 0xff) { }
UINT8 operator()(offs_t offset = 0, UINT8 mask = 0xff) { return (this->*m_adapter)(*m_space, offset, mask) & mask; }
- UINT8 operator()(address_space &space, offs_t offset = 0, UINT8 mask = 0xff) { return (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, offset, mask) & mask; }
+ UINT8 operator()(address_space &space, offs_t offset = 0, UINT8 mask = 0xff) { return (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, offset, mask) & mask; }
};
@@ -318,7 +318,7 @@ class devcb_read16 : public devcb_read_base
public:
devcb_read16(device_t &device) : devcb_read_base(device, 0xffff) { }
UINT16 operator()(offs_t offset = 0, UINT16 mask = 0xffff) { return (this->*m_adapter)(*m_space, offset, mask) & mask; }
- UINT16 operator()(address_space &space, offs_t offset = 0, UINT16 mask = 0xffff) { return (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, offset, mask) & mask; }
+ UINT16 operator()(address_space &space, offs_t offset = 0, UINT16 mask = 0xffff) { return (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, offset, mask) & mask; }
};
@@ -329,7 +329,7 @@ class devcb_read32 : public devcb_read_base
public:
devcb_read32(device_t &device) : devcb_read_base(device, 0xffffffff) { }
UINT32 operator()(offs_t offset = 0, UINT32 mask = 0xffffffff) { return (this->*m_adapter)(*m_space, offset, mask) & mask; }
- UINT32 operator()(address_space &space, offs_t offset = 0, UINT32 mask = 0xffffffff) { return (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, offset, mask) & mask; }
+ UINT32 operator()(address_space &space, offs_t offset = 0, UINT32 mask = 0xffffffff) { return (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, offset, mask) & mask; }
};
@@ -340,7 +340,7 @@ class devcb_read64 : public devcb_read_base
public:
devcb_read64(device_t &device) : devcb_read_base(device, U64(0xffffffffffffffff)) { }
UINT64 operator()(offs_t offset = 0, UINT64 mask = U64(0xffffffffffffffff)) { return (this->*m_adapter)(*m_space, offset, mask) & mask; }
- UINT64 operator()(address_space &space, offs_t offset = 0, UINT64 mask = U64(0xffffffffffffffff)) { return (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, offset, mask) & mask; }
+ UINT64 operator()(address_space &space, offs_t offset = 0, UINT64 mask = U64(0xffffffffffffffff)) { return (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, offset, mask) & mask; }
};
@@ -351,7 +351,7 @@ class devcb_write_line : public devcb_write_base
public:
devcb_write_line(device_t &device) : devcb_write_base(device, 0xff) { }
void operator()(int state) { (this->*m_adapter)(*m_space, 0, state & 1, U64(0xff)); }
- void operator()(address_space &space, int state) { (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, 0, state & 1, U64(0xff)); }
+ void operator()(address_space &space, int state) { (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, 0, state & 1, U64(0xff)); }
};
@@ -363,7 +363,7 @@ public:
devcb_write8(device_t &device) : devcb_write_base(device, 0xff) { }
void operator()(UINT8 data, UINT8 mask = 0xff) { (this->*m_adapter)(*m_space, 0, data, mask); }
void operator()(offs_t offset, UINT8 data, UINT8 mask = 0xff) { (this->*m_adapter)(*m_space, offset, data, mask); }
- void operator()(address_space &space, offs_t offset, UINT8 data, UINT8 mask = 0xff) { (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, offset, data, mask); }
+ void operator()(address_space &space, offs_t offset, UINT8 data, UINT8 mask = 0xff) { (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, offset, data, mask); }
};
@@ -375,7 +375,7 @@ public:
devcb_write16(device_t &device) : devcb_write_base(device, 0xffff) { }
void operator()(UINT16 data, UINT16 mask = 0xffff) { (this->*m_adapter)(*m_space, 0, data, mask); }
void operator()(offs_t offset, UINT16 data, UINT16 mask = 0xffff) { (this->*m_adapter)(*m_space, offset, data, mask); }
- void operator()(address_space &space, offs_t offset, UINT16 data, UINT16 mask = 0xffff) { (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, offset, data, mask); }
+ void operator()(address_space &space, offs_t offset, UINT16 data, UINT16 mask = 0xffff) { (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, offset, data, mask); }
};
@@ -387,7 +387,7 @@ public:
devcb_write32(device_t &device) : devcb_write_base(device, 0xffffffff) { }
void operator()(UINT32 data, UINT32 mask = 0xffffffff) { (this->*m_adapter)(*m_space, 0, data, mask); }
void operator()(offs_t offset, UINT32 data, UINT32 mask = 0xffffffff) { (this->*m_adapter)(*m_space, offset, data, mask); }
- void operator()(address_space &space, offs_t offset, UINT32 data, UINT32 mask = 0xffffffff) { (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, offset, data, mask); }
+ void operator()(address_space &space, offs_t offset, UINT32 data, UINT32 mask = 0xffffffff) { (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, offset, data, mask); }
};
@@ -399,7 +399,7 @@ public:
devcb_write64(device_t &device) : devcb_write_base(device, U64(0xffffffffffffffff)) { }
void operator()(UINT64 data, UINT64 mask = U64(0xffffffffffffffff)) { (this->*m_adapter)(*m_space, 0, data, mask); }
void operator()(offs_t offset, UINT64 data, UINT64 mask = U64(0xffffffffffffffff)) { (this->*m_adapter)(*m_space, offset, data, mask); }
- void operator()(address_space &space, offs_t offset, UINT64 data, UINT64 mask = U64(0xffffffffffffffff)) { (this->*m_adapter)((m_space_tag != NULL) ? *m_space : space, offset, data, mask); }
+ void operator()(address_space &space, offs_t offset, UINT64 data, UINT64 mask = U64(0xffffffffffffffff)) { (this->*m_adapter)((m_space_tag != nullptr) ? *m_space : space, offset, data, mask); }
};
diff --git a/src/emu/devdelegate.cpp b/src/emu/devdelegate.cpp
index 53a03763e4a..8917d5dfc3f 100644
--- a/src/emu/devdelegate.cpp
+++ b/src/emu/devdelegate.cpp
@@ -20,7 +20,7 @@
delegate_late_bind &device_delegate_helper::bound_object(device_t &search_root)
{
device_t *device = search_root.subdevice(m_device_name);
- if (device == NULL)
+ if (device == nullptr)
throw emu_fatalerror("Unable to locate device '%s' relative to '%s'\n", m_device_name, search_root.tag());
return *device;
}
@@ -33,5 +33,5 @@ delegate_late_bind &device_delegate_helper::bound_object(device_t &search_root)
const char *device_delegate_helper::safe_tag(device_t *object)
{
- return (object != NULL) ? object->tag() : "(unknown)";
+ return (object != nullptr) ? object->tag() : "(unknown)";
}
diff --git a/src/emu/devdelegate.h b/src/emu/devdelegate.h
index ba1b82ab8ee..ee8a361ceb9 100644
--- a/src/emu/devdelegate.h
+++ b/src/emu/devdelegate.h
@@ -50,7 +50,7 @@ class device_delegate : public delegate<_Signature>, device_delegate_helper
public:
// provide the same constructors as the base class
- device_delegate() : basetype(), device_delegate_helper(NULL) { }
+ device_delegate() : basetype(), device_delegate_helper(nullptr) { }
device_delegate(const basetype &src) : basetype(src), device_delegate_helper(src.m_device_name) { }
device_delegate(const basetype &src, delegate_late_bind &object) : basetype(src, object), device_delegate_helper(src.m_device_name) { }
template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object) : basetype(funcptr, name, object), device_delegate_helper(safe_tag(dynamic_cast<device_t *>(object))) { }
@@ -62,12 +62,12 @@ public:
// provide additional constructors that take a device name string
template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, const char *devname) : basetype(funcptr, name, (_FunctionClass *)0), device_delegate_helper(devname) { }
- template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, const char *devname, _FunctionClass *object) : basetype(funcptr, name, (_FunctionClass *)0), device_delegate_helper(devname) { }
+ template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::member_func_type funcptr, const char *name, const char *devname, _FunctionClass *object) : basetype(funcptr, name, (_FunctionClass *)nullptr), device_delegate_helper(devname) { }
#ifdef USE_STATIC_DELEGATE
template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::static_func_type funcptr, const char *name, const char *devname, _FunctionClass *object) : basetype(funcptr, name, (_FunctionClass *)0), device_delegate_helper(devname) { }
- template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, const char *devname, _FunctionClass *object) : basetype(funcptr, name, (_FunctionClass *)0), device_delegate_helper(devname) { }
- device_delegate(typename basetype::template traits<device_t>::static_func_type funcptr, const char *name) : basetype(funcptr, name, (device_t *)0), device_delegate_helper(NULL) { }
- device_delegate(typename basetype::template traits<device_t>::static_ref_func_type funcptr, const char *name) : basetype(funcptr, name, (device_t *)0), device_delegate_helper(NULL) { }
+ template<class _FunctionClass> device_delegate(typename basetype::template traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, const char *devname, _FunctionClass *object) : basetype(funcptr, name, (_FunctionClass *)nullptr), device_delegate_helper(devname) { }
+ device_delegate(typename basetype::template traits<device_t>::static_func_type funcptr, const char *name) : basetype(funcptr, name, (device_t *)nullptr), device_delegate_helper(NULL) { }
+ device_delegate(typename basetype::template traits<device_t>::static_ref_func_type funcptr, const char *name) : basetype(funcptr, name, (device_t *)nullptr), device_delegate_helper(NULL) { }
#endif
// and constructors that provide a search root
diff --git a/src/emu/devfind.cpp b/src/emu/devfind.cpp
index 0f6ee0a3a77..d251e56ce0b 100644
--- a/src/emu/devfind.cpp
+++ b/src/emu/devfind.cpp
@@ -44,15 +44,15 @@ void *finder_base::find_memregion(UINT8 width, size_t &length, bool required) co
{
// look up the region and return NULL if not found
memory_region *region = m_base.memregion(m_tag);
- if (region == NULL)
- return NULL;
+ if (region == nullptr)
+ return nullptr;
// check the width and warn if not correct
if (region->bytewidth() != width)
{
if (required)
osd_printf_warning("Region '%s' found but is width %d, not %d as requested\n", m_tag, region->bitwidth(), width*8);
- return NULL;
+ return nullptr;
}
// return results
@@ -69,15 +69,15 @@ void *finder_base::find_memshare(UINT8 width, size_t &bytes, bool required)
{
// look up the share and return NULL if not found
memory_share *share = m_base.memshare(m_tag);
- if (share == NULL)
- return NULL;
+ if (share == nullptr)
+ return nullptr;
// check the width and warn if not correct
if (width != 0 && share->bitwidth() != width)
{
if (required)
osd_printf_warning("Shared ptr '%s' found but is width %d, not %d as requested\n", m_tag, share->bitwidth(), width);
- return NULL;
+ return nullptr;
}
// return results
diff --git a/src/emu/devfind.h b/src/emu/devfind.h
index f18e8343588..16dd1f34911 100644
--- a/src/emu/devfind.h
+++ b/src/emu/devfind.h
@@ -76,12 +76,12 @@ public:
// construction/destruction
object_finder_base(device_t &base, const char *tag)
: finder_base(base, tag),
- m_target(NULL) { }
+ m_target(nullptr) { }
// operators to make use transparent
operator _ObjectClass *() const { return m_target; }
- virtual _ObjectClass *operator->() const { assert(m_target != NULL); return m_target; }
+ virtual _ObjectClass *operator->() const { assert(m_target != nullptr); return m_target; }
// getter for explicit fetching
_ObjectClass *target() const { return m_target; }
@@ -107,18 +107,18 @@ public:
: object_finder_base<_DeviceClass>(base, tag) { }
// make reference use transparent as well
- operator _DeviceClass &() { assert(object_finder_base<_DeviceClass>::m_target != NULL); return *object_finder_base<_DeviceClass>::m_target; }
+ operator _DeviceClass &() { assert(object_finder_base<_DeviceClass>::m_target != nullptr); return *object_finder_base<_DeviceClass>::m_target; }
// finder
virtual bool findit(bool isvalidation = false)
{
device_t *device = this->m_base.subdevice(this->m_tag);
this->m_target = dynamic_cast<_DeviceClass *>(device);
- if (device != NULL && this->m_target == NULL)
+ if (device != nullptr && this->m_target == nullptr)
{
this->printf_warning("Device '%s' found but is of incorrect type (actual type is %s)\n", this->m_tag, device->name());
}
- return this->report_missing(this->m_target != NULL, "device", _Required);
+ return this->report_missing(this->m_target != nullptr, "device", _Required);
}
};
@@ -154,11 +154,11 @@ public:
operator memory_region &() { assert(object_finder_base<memory_region>::m_target != NULL); return *object_finder_base<memory_region>::m_target; }
// finder
- virtual bool findit(bool isvalidation = false)
+ virtual bool findit(bool isvalidation = false) override
{
if (isvalidation) return true;
m_target = m_base.memregion(m_tag);
- return this->report_missing(m_target != NULL, "memory region", _Required);
+ return this->report_missing(m_target != nullptr, "memory region", _Required);
}
};
@@ -192,11 +192,11 @@ public:
operator memory_bank &() { assert(object_finder_base<memory_bank>::m_target != NULL); return *object_finder_base<memory_bank>::m_target; }
// finder
- virtual bool findit(bool isvalidation = false)
+ virtual bool findit(bool isvalidation = false) override
{
if (isvalidation) return true;
m_target = m_base.membank(m_tag);
- return this->report_missing(m_target != NULL, "memory bank", _Required);
+ return this->report_missing(m_target != nullptr, "memory bank", _Required);
}
};
@@ -230,14 +230,14 @@ public:
operator ioport_port &() { assert(object_finder_base<ioport_port>::m_target != NULL); return *object_finder_base<ioport_port>::m_target; }
// allow dereference even when target is NULL so read_safe() can be used
- ioport_port *operator->() const { return object_finder_base<ioport_port>::m_target; }
+ ioport_port *operator->() const override { return object_finder_base<ioport_port>::m_target; }
// finder
- virtual bool findit(bool isvalidation = false)
+ virtual bool findit(bool isvalidation = false) override
{
if (isvalidation) return true;
m_target = m_base.ioport(m_tag);
- return this->report_missing(m_target != NULL, "I/O port", _Required);
+ return this->report_missing(m_target != nullptr, "I/O port", _Required);
}
};
@@ -336,7 +336,7 @@ public:
{
if (isvalidation) return true;
this->m_target = reinterpret_cast<_PointerType *>(this->find_memregion(sizeof(_PointerType), m_length, _Required));
- return this->report_missing(this->m_target != NULL, "memory region", _Required);
+ return this->report_missing(this->m_target != nullptr, "memory region", _Required);
}
protected:
@@ -400,7 +400,7 @@ public:
{
if (isvalidation) return true;
this->m_target = reinterpret_cast<_PointerType *>(this->find_memshare(m_width, m_bytes, _Required));
- return this->report_missing(this->m_target != NULL, "shared pointer", _Required);
+ return this->report_missing(this->m_target != nullptr, "shared pointer", _Required);
}
protected:
diff --git a/src/emu/device.cpp b/src/emu/device.cpp
index 5983c7f665d..b29466d8875 100644
--- a/src/emu/device.cpp
+++ b/src/emu/device.cpp
@@ -31,12 +31,12 @@ device_t::device_t(const machine_config &mconfig, device_type type, const char *
m_searchpath(shortname),
m_source(source),
m_owner(owner),
- m_next(NULL),
+ m_next(nullptr),
- m_interface_list(NULL),
- m_execute(NULL),
- m_memory(NULL),
- m_state(NULL),
+ m_interface_list(nullptr),
+ m_execute(nullptr),
+ m_memory(nullptr),
+ m_state(nullptr),
m_configured_clock(clock),
m_unscaled_clock(clock),
@@ -44,21 +44,21 @@ device_t::device_t(const machine_config &mconfig, device_type type, const char *
m_clock_scale(1.0),
m_attoseconds_per_clock((clock == 0) ? 0 : HZ_TO_ATTOSECONDS(clock)),
- m_region(NULL),
+ m_region(nullptr),
m_machine_config(mconfig),
- m_static_config(NULL),
- m_input_defaults(NULL),
+ m_static_config(nullptr),
+ m_input_defaults(nullptr),
m_default_bios_tag(""),
- m_machine(NULL),
- m_save(NULL),
+ m_machine(nullptr),
+ m_save(nullptr),
m_basetag(tag),
m_config_complete(false),
m_started(false),
- m_auto_finder_list(NULL)
+ m_auto_finder_list(nullptr)
{
- if (owner != NULL)
- m_tag.assign((owner->owner() == NULL) ? "" : owner->tag()).append(":").append(tag);
+ if (owner != nullptr)
+ m_tag.assign((owner->owner() == nullptr) ? "" : owner->tag()).append(":").append(tag);
else
m_tag.assign(":");
static_set_clock(*this, clock);
@@ -85,8 +85,8 @@ device_t::~device_t()
memory_region *device_t::memregion(const char *_tag) const
{
// safety first
- if (this == NULL)
- return NULL;
+ if (this == nullptr)
+ return nullptr;
// build a fully-qualified name and look it up
return machine().memory().region(subtag(_tag).c_str());
@@ -101,8 +101,8 @@ memory_region *device_t::memregion(const char *_tag) const
memory_share *device_t::memshare(const char *_tag) const
{
// safety first
- if (this == NULL)
- return NULL;
+ if (this == nullptr)
+ return nullptr;
// build a fully-qualified name and look it up
return machine().memory().shared(subtag(_tag).c_str());
@@ -117,8 +117,8 @@ memory_share *device_t::memshare(const char *_tag) const
memory_bank *device_t::membank(const char *_tag) const
{
// safety first
- if (this == NULL)
- return NULL;
+ if (this == nullptr)
+ return nullptr;
// build a fully-qualified name and look it up
return machine().memory().bank(subtag(_tag).c_str());
@@ -133,8 +133,8 @@ memory_bank *device_t::membank(const char *_tag) const
ioport_port *device_t::ioport(const char *tag) const
{
// safety first
- if (this == NULL)
- return NULL;
+ if (this == nullptr)
+ return nullptr;
// build a fully-qualified name and look it up
return machine().ioport().port(subtag(tag).c_str());
@@ -149,8 +149,8 @@ ioport_port *device_t::ioport(const char *tag) const
std::string device_t::parameter(const char *tag) const
{
// safety first
- if (this == NULL)
- return NULL;
+ if (this == nullptr)
+ return nullptr;
// build a fully-qualified name and look it up
return machine().parameters().lookup(subtag(tag));
@@ -167,7 +167,7 @@ void device_t::static_set_clock(device_t &device, UINT32 clock)
// derive the clock from our owner if requested
if ((clock & 0xff000000) == 0xff000000)
{
- assert(device.m_owner != NULL);
+ assert(device.m_owner != nullptr);
clock = device.m_owner->m_configured_clock * ((clock >> 12) & 0xfff) / ((clock >> 0) & 0xfff);
}
@@ -184,7 +184,7 @@ void device_t::static_set_clock(device_t &device, UINT32 clock)
void device_t::config_complete()
{
// first notify the interfaces
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_config_complete();
// then notify the device itself
@@ -203,7 +203,7 @@ void device_t::config_complete()
void device_t::validity_check(validity_checker &valid) const
{
// validate via the interfaces
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_validity_check(valid);
// let the device itself validate
@@ -218,21 +218,21 @@ void device_t::validity_check(validity_checker &valid) const
void device_t::reset()
{
// let the interfaces do their pre-work
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_pre_reset();
// reset the device
device_reset();
// reset all child devices
- for (device_t *child = m_subdevice_list.first(); child != NULL; child = child->next())
+ for (device_t *child = m_subdevice_list.first(); child != nullptr; child = child->next())
child->reset();
// now allow for some post-child reset action
device_reset_after_children();
// let the interfaces do their post-work
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_post_reset();
}
@@ -335,7 +335,7 @@ void device_t::set_machine(running_machine &machine)
bool device_t::findit(bool isvalidation) const
{
bool allfound = true;
- for (finder_base *autodev = m_auto_finder_list; autodev != NULL; autodev = autodev->m_next)
+ for (finder_base *autodev = m_auto_finder_list; autodev != nullptr; autodev = autodev->m_next)
allfound &= autodev->findit(isvalidation);
return allfound;
}
@@ -354,7 +354,7 @@ void device_t::start()
throw emu_fatalerror("Missing some required objects, unable to proceed");
// let the interfaces do their pre-work
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_pre_start();
// remember the number of state registrations
@@ -375,7 +375,7 @@ void device_t::start()
}
// let the interfaces do their post-work
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_post_start();
// force an update of the clock
@@ -405,14 +405,14 @@ void device_t::start()
void device_t::stop()
{
// let the interfaces do their pre-work
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_pre_stop();
// stop the device
device_stop();
// let the interfaces do their post-work
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_post_stop();
// free any debugging info
@@ -420,7 +420,7 @@ void device_t::stop()
// we're now officially stopped, and the machine is off-limits
m_started = false;
- m_machine = NULL;
+ m_machine = nullptr;
}
@@ -431,7 +431,7 @@ void device_t::stop()
void device_t::debug_setup()
{
// notify the interface
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_debug_setup();
// notify the device
@@ -447,7 +447,7 @@ void device_t::debug_setup()
void device_t::pre_save()
{
// notify the interface
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_pre_save();
// notify the device
@@ -463,7 +463,7 @@ void device_t::pre_save()
void device_t::post_load()
{
// notify the interface
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_post_load();
// notify the device
@@ -479,7 +479,7 @@ void device_t::post_load()
void device_t::notify_clock_changed()
{
// first notify interfaces
- for (device_interface *intf = m_interface_list; intf != NULL; intf = intf->interface_next())
+ for (device_interface *intf = m_interface_list; intf != nullptr; intf = intf->interface_next())
intf->interface_clock_changed();
// then notify the device
@@ -518,7 +518,7 @@ void device_t::device_validity_check(validity_checker &valid) const
const rom_entry *device_t::device_rom_region() const
{
// none by default
- return NULL;
+ return nullptr;
}
@@ -531,7 +531,7 @@ const rom_entry *device_t::device_rom_region() const
machine_config_constructor device_t::device_mconfig_additions() const
{
// none by default
- return NULL;
+ return nullptr;
}
@@ -543,7 +543,7 @@ machine_config_constructor device_t::device_mconfig_additions() const
ioport_constructor device_t::device_input_ports() const
{
// none by default
- return NULL;
+ return nullptr;
}
@@ -660,16 +660,16 @@ device_t *device_t::subdevice_slow(const char *tag) const
// walk the device list to the final path
device_t *curdevice = &mconfig().root_device();
if (fulltag.length() > 1)
- for (int start = 1, end = fulltag.find_first_of(':', start); start != 0 && curdevice != NULL; start = end + 1, end = fulltag.find_first_of(':', start))
+ for (int start = 1, end = fulltag.find_first_of(':', start); start != 0 && curdevice != nullptr; start = end + 1, end = fulltag.find_first_of(':', start))
{
std::string part(fulltag, start, (end == -1) ? -1 : end - start);
- for (curdevice = curdevice->m_subdevice_list.first(); curdevice != NULL; curdevice = curdevice->next())
+ for (curdevice = curdevice->m_subdevice_list.first(); curdevice != nullptr; curdevice = curdevice->next())
if (part.compare(curdevice->m_basetag)==0)
break;
}
// if we got a match, add to the fast map
- if (curdevice != NULL)
+ if (curdevice != nullptr)
m_device_map.add(tag, curdevice);
return curdevice;
}
@@ -700,7 +700,7 @@ std::string device_t::subtag(const char *tag) const
// iterate over the tag, look for special path characters to resolve
const char *caret;
- while ((caret = strchr(tag, '^')) != NULL)
+ while ((caret = strchr(tag, '^')) != nullptr)
{
// copy everything up to there
result.append(tag, caret - tag);
@@ -744,8 +744,8 @@ device_t *device_t::add_subdevice(device_type type, const char *tag, UINT32 cloc
// apply any machine configuration owned by the device now
machine_config_constructor additions = device->machine_config_additions();
- if (additions != NULL)
- (*additions)(const_cast<machine_config &>(mconfig()), device, NULL);
+ if (additions != nullptr)
+ (*additions)(const_cast<machine_config &>(mconfig()), device, nullptr);
return device;
}
@@ -759,7 +759,7 @@ device_t *device_t::replace_subdevice(device_t &old, device_type type, const cha
{
// iterate over all devices and remove any references to the old device
device_iterator iter(mconfig().root_device());
- for (device_t *scan = iter.first(); scan != NULL; scan = iter.next())
+ for (device_t *scan = iter.first(); scan != nullptr; scan = iter.next())
scan->m_device_map.reset(); //remove(&old);
// create a new device, and substitute it for the old one
@@ -768,8 +768,8 @@ device_t *device_t::replace_subdevice(device_t &old, device_type type, const cha
// apply any machine configuration owned by the device now
machine_config_constructor additions = device->machine_config_additions();
- if (additions != NULL)
- (*additions)(const_cast<machine_config &>(mconfig()), device, NULL);
+ if (additions != nullptr)
+ (*additions)(const_cast<machine_config &>(mconfig()), device, nullptr);
return device;
}
@@ -782,7 +782,7 @@ void device_t::remove_subdevice(device_t &device)
{
// iterate over all devices and remove any references
device_iterator iter(mconfig().root_device());
- for (device_t *scan = iter.first(); scan != NULL; scan = iter.next())
+ for (device_t *scan = iter.first(); scan != nullptr; scan = iter.next())
scan->m_device_map.reset(); //remove(&device);
// remove from our list
@@ -806,7 +806,7 @@ finder_base *device_t::register_auto_finder(finder_base &autodev)
void device_t::popmessage(const char *format, ...) const
{
// if the format is NULL, it is a signal to clear the popmessage
- if (format == NULL)
+ if (format == nullptr)
machine().ui().popup_time(0, " ");
// otherwise, generate the buffer and call the UI to display the message
@@ -821,7 +821,7 @@ void device_t::popmessage(const char *format, ...) const
va_end(arg);
// pop it in the UI
- if (m_machine!=NULL) machine().ui().popup_time(temp.length() / 40 + 2, "%s", temp.c_str());
+ if (m_machine!=nullptr) machine().ui().popup_time(temp.length() / 40 + 2, "%s", temp.c_str());
}
}
@@ -836,7 +836,7 @@ void device_t::vlogerror(const char *format, va_list args) const
{
std::string fmt("[");
fmt += tag() + std::string("] ") + format;
- if (m_machine!=NULL) machine().vlogerror(fmt.c_str(), args);
+ if (m_machine!=nullptr) machine().vlogerror(fmt.c_str(), args);
}
//**************************************************************************
@@ -848,12 +848,12 @@ void device_t::vlogerror(const char *format, va_list args) const
//-------------------------------------------------
device_interface::device_interface(device_t &device, const char *type)
- : m_interface_next(NULL),
+ : m_interface_next(nullptr),
m_device(device),
m_type(type)
{
device_interface **tailptr;
- for (tailptr = &device.m_interface_list; *tailptr != NULL; tailptr = &(*tailptr)->m_interface_next) { }
+ for (tailptr = &device.m_interface_list; *tailptr != nullptr; tailptr = &(*tailptr)->m_interface_next) { }
*tailptr = this;
}
diff --git a/src/emu/device.h b/src/emu/device.h
index 0d23d253866..3047adbcea0 100644
--- a/src/emu/device.h
+++ b/src/emu/device.h
@@ -134,24 +134,24 @@ public:
// interface helpers
device_interface *first_interface() const { return m_interface_list; }
- template<class _DeviceClass> bool interface(_DeviceClass *&intf) { intf = dynamic_cast<_DeviceClass *>(this); return (intf != NULL); }
- template<class _DeviceClass> bool interface(_DeviceClass *&intf) const { intf = dynamic_cast<const _DeviceClass *>(this); return (intf != NULL); }
+ template<class _DeviceClass> bool interface(_DeviceClass *&intf) { intf = dynamic_cast<_DeviceClass *>(this); return (intf != nullptr); }
+ template<class _DeviceClass> bool interface(_DeviceClass *&intf) const { intf = dynamic_cast<const _DeviceClass *>(this); return (intf != nullptr); }
// specialized helpers for common core interfaces
- bool interface(device_execute_interface *&intf) { intf = m_execute; return (intf != NULL); }
- bool interface(device_execute_interface *&intf) const { intf = m_execute; return (intf != NULL); }
- bool interface(device_memory_interface *&intf) { intf = m_memory; return (intf != NULL); }
- bool interface(device_memory_interface *&intf) const { intf = m_memory; return (intf != NULL); }
- bool interface(device_state_interface *&intf) { intf = m_state; return (intf != NULL); }
- bool interface(device_state_interface *&intf) const { intf = m_state; return (intf != NULL); }
- device_execute_interface &execute() const { assert(m_execute != NULL); return *m_execute; }
- device_memory_interface &memory() const { assert(m_memory != NULL); return *m_memory; }
- device_state_interface &state() const { assert(m_state != NULL); return *m_state; }
+ bool interface(device_execute_interface *&intf) { intf = m_execute; return (intf != nullptr); }
+ bool interface(device_execute_interface *&intf) const { intf = m_execute; return (intf != nullptr); }
+ bool interface(device_memory_interface *&intf) { intf = m_memory; return (intf != nullptr); }
+ bool interface(device_memory_interface *&intf) const { intf = m_memory; return (intf != nullptr); }
+ bool interface(device_state_interface *&intf) { intf = m_state; return (intf != nullptr); }
+ bool interface(device_state_interface *&intf) const { intf = m_state; return (intf != nullptr); }
+ device_execute_interface &execute() const { assert(m_execute != nullptr); return *m_execute; }
+ device_memory_interface &memory() const { assert(m_memory != nullptr); return *m_memory; }
+ device_state_interface &state() const { assert(m_state != nullptr); return *m_state; }
// owned object helpers
device_t *first_subdevice() const { return m_subdevice_list.first(); }
std::string subtag(const char *tag) const;
- std::string siblingtag(const char *tag) const { return (this != NULL && m_owner != NULL) ? m_owner->subtag(tag) : std::string(tag); }
+ std::string siblingtag(const char *tag) const { return (this != nullptr && m_owner != nullptr) ? m_owner->subtag(tag) : std::string(tag); }
memory_region *memregion(const char *tag) const;
memory_share *memshare(const char *tag) const;
memory_bank *membank(const char *tag) const;
@@ -185,16 +185,16 @@ public:
UINT64 attotime_to_clocks(const attotime &duration) const;
// timer interfaces
- emu_timer *timer_alloc(device_timer_id id = 0, void *ptr = NULL);
- void timer_set(const attotime &duration, device_timer_id id = 0, int param = 0, void *ptr = NULL);
- void synchronize(device_timer_id id = 0, int param = 0, void *ptr = NULL) { timer_set(attotime::zero, id, param, ptr); }
+ emu_timer *timer_alloc(device_timer_id id = 0, void *ptr = nullptr);
+ void timer_set(const attotime &duration, device_timer_id id = 0, int param = 0, void *ptr = nullptr);
+ void synchronize(device_timer_id id = 0, int param = 0, void *ptr = nullptr) { timer_set(attotime::zero, id, param, ptr); }
void timer_expired(emu_timer &timer, device_timer_id id, int param, void *ptr) { device_timer(timer, id, param, ptr); }
// state saving interfaces
template<typename _ItemType>
- void ATTR_COLD save_item(_ItemType &value, const char *valname, int index = 0) { assert(m_save != NULL); m_save->save_item(this, name(), tag(), index, value, valname); }
+ void ATTR_COLD save_item(_ItemType &value, const char *valname, int index = 0) { assert(m_save != nullptr); m_save->save_item(this, name(), tag(), index, value, valname); }
template<typename _ItemType>
- void ATTR_COLD save_pointer(_ItemType *value, const char *valname, UINT32 count, int index = 0) { assert(m_save != NULL); m_save->save_pointer(this, name(), tag(), index, value, valname, count); }
+ void ATTR_COLD save_pointer(_ItemType *value, const char *valname, UINT32 count, int index = 0) { assert(m_save != nullptr); m_save->save_pointer(this, name(), tag(), index, value, valname, count); }
// debugging
device_debug *debug() const { return m_debug.get(); }
@@ -355,7 +355,7 @@ public:
// construction
device_iterator(device_t &root, int maxdepth = 255)
: m_root(&root),
- m_current(NULL),
+ m_current(nullptr),
m_curdepth(0),
m_maxdepth(maxdepth) { }
@@ -374,14 +374,14 @@ public:
{
// remember our starting position, and end immediately if we're NULL
device_t *start = m_current;
- if (start == NULL)
- return NULL;
+ if (start == nullptr)
+ return nullptr;
// search down first
if (m_curdepth < m_maxdepth)
{
m_current = start->first_subdevice();
- if (m_current != NULL)
+ if (m_current != nullptr)
{
m_curdepth++;
return m_current;
@@ -393,7 +393,7 @@ public:
{
// found a neighbor? great!
m_current = start->next();
- if (m_current != NULL)
+ if (m_current != nullptr)
return m_current;
// no? try our parent
@@ -402,14 +402,14 @@ public:
}
// returned to the top; we're done
- return m_current = NULL;
+ return m_current = nullptr;
}
// return the number of items available
int count()
{
int result = 0;
- for (device_t *item = first(); item != NULL; item = next())
+ for (device_t *item = first(); item != nullptr; item = next())
result++;
return result;
}
@@ -418,7 +418,7 @@ public:
int indexof(device_t &device)
{
int index = 0;
- for (device_t *item = first(); item != NULL; item = next(), index++)
+ for (device_t *item = first(); item != nullptr; item = next(), index++)
if (item == &device)
return index;
return -1;
@@ -427,10 +427,10 @@ public:
// return the indexed item in the list
device_t *byindex(int index)
{
- for (device_t *item = first(); item != NULL; item = next(), index--)
+ for (device_t *item = first(); item != nullptr; item = next(), index--)
if (index == 0)
return item;
- return NULL;
+ return nullptr;
}
private:
@@ -459,26 +459,26 @@ public:
// reset and return first item
_DeviceClass *first()
{
- for (device_t *device = m_iterator.first(); device != NULL; device = m_iterator.next())
+ for (device_t *device = m_iterator.first(); device != nullptr; device = m_iterator.next())
if (device->type() == _DeviceType)
return downcast<_DeviceClass *>(device);
- return NULL;
+ return nullptr;
}
// advance depth-first
_DeviceClass *next()
{
- for (device_t *device = m_iterator.next(); device != NULL; device = m_iterator.next())
+ for (device_t *device = m_iterator.next(); device != nullptr; device = m_iterator.next())
if (device->type() == _DeviceType)
return downcast<_DeviceClass *>(device);
- return NULL;
+ return nullptr;
}
// return the number of items available
int count()
{
int result = 0;
- for (_DeviceClass *item = first(); item != NULL; item = next())
+ for (_DeviceClass *item = first(); item != nullptr; item = next())
result++;
return result;
}
@@ -487,7 +487,7 @@ public:
int indexof(_DeviceClass &device)
{
int index = 0;
- for (_DeviceClass *item = first(); item != NULL; item = next(), index++)
+ for (_DeviceClass *item = first(); item != nullptr; item = next(), index++)
if (item == &device)
return index;
return -1;
@@ -496,10 +496,10 @@ public:
// return the indexed item in the list
_DeviceClass *byindex(int index)
{
- for (_DeviceClass *item = first(); item != NULL; item = next(), index--)
+ for (_DeviceClass *item = first(); item != nullptr; item = next(), index--)
if (index == 0)
return item;
- return NULL;
+ return nullptr;
}
private:
@@ -519,7 +519,7 @@ public:
// construction
device_interface_iterator(device_t &root, int maxdepth = 255)
: m_iterator(root, maxdepth),
- m_current(NULL) { }
+ m_current(nullptr) { }
// getters
_InterfaceClass *current() const { return m_current; }
@@ -527,26 +527,26 @@ public:
// reset and return first item
_InterfaceClass *first()
{
- for (device_t *device = m_iterator.first(); device != NULL; device = m_iterator.next())
+ for (device_t *device = m_iterator.first(); device != nullptr; device = m_iterator.next())
if (device->interface(m_current))
return m_current;
- return NULL;
+ return nullptr;
}
// advance depth-first
_InterfaceClass *next()
{
- for (device_t *device = m_iterator.next(); device != NULL; device = m_iterator.next())
+ for (device_t *device = m_iterator.next(); device != nullptr; device = m_iterator.next())
if (device->interface(m_current))
return m_current;
- return NULL;
+ return nullptr;
}
// return the number of items available
int count()
{
int result = 0;
- for (_InterfaceClass *item = first(); item != NULL; item = next())
+ for (_InterfaceClass *item = first(); item != nullptr; item = next())
result++;
return result;
}
@@ -555,7 +555,7 @@ public:
int indexof(_InterfaceClass &intrf)
{
int index = 0;
- for (_InterfaceClass *item = first(); item != NULL; item = next(), index++)
+ for (_InterfaceClass *item = first(); item != nullptr; item = next(), index++)
if (item == &intrf)
return index;
return -1;
@@ -590,16 +590,16 @@ private:
inline device_t *device_t::subdevice(const char *tag) const
{
// safety first
- if (this == NULL)
- return NULL;
+ if (this == nullptr)
+ return nullptr;
// empty string or NULL means this device
- if (tag == NULL || *tag == 0)
+ if (tag == nullptr || *tag == 0)
return const_cast<device_t *>(this);
// do a quick lookup and return that if possible
device_t *quick = m_device_map.find(tag);
- return (quick != NULL) ? quick : subdevice_slow(tag);
+ return (quick != nullptr) ? quick : subdevice_slow(tag);
}
@@ -611,22 +611,22 @@ inline device_t *device_t::subdevice(const char *tag) const
inline device_t *device_t::siblingdevice(const char *tag) const
{
// safety first
- if (this == NULL)
- return NULL;
+ if (this == nullptr)
+ return nullptr;
// empty string or NULL means this device
- if (tag == NULL || *tag == 0)
+ if (tag == nullptr || *tag == 0)
return const_cast<device_t *>(this);
// leading caret implies the owner, just skip it
if (tag[0] == '^') tag++;
// query relative to the parent, if we have one
- if (m_owner != NULL)
+ if (m_owner != nullptr)
return m_owner->subdevice(tag);
// otherwise, it's NULL unless the tag is absolute
- return (tag[0] == ':') ? subdevice(tag) : NULL;
+ return (tag[0] == ':') ? subdevice(tag) : nullptr;
}
#endif /* __DEVICE_H__ */
diff --git a/src/emu/diexec.cpp b/src/emu/diexec.cpp
index 1e9e6d487a9..7b4b530f75b 100644
--- a/src/emu/diexec.cpp
+++ b/src/emu/diexec.cpp
@@ -44,13 +44,13 @@ const int TRIGGER_SUSPENDTIME = -4000;
device_execute_interface::device_execute_interface(const machine_config &mconfig, device_t &device)
: device_interface(device, "execute"),
m_disabled(false),
- m_vblank_interrupt_screen(NULL),
+ m_vblank_interrupt_screen(nullptr),
m_timed_interrupt_period(attotime::zero),
m_is_octal(false),
- m_nextexec(NULL),
- m_timedint_timer(NULL),
+ m_nextexec(nullptr),
+ m_timedint_timer(nullptr),
m_profiler(PROFILER_IDLE),
- m_icountptr(NULL),
+ m_icountptr(nullptr),
m_cycles_running(0),
m_cycles_stolen(0),
m_suspend(0),
@@ -208,7 +208,7 @@ void device_execute_interface::abort_timeslice()
return;
// swallow the remaining cycles
- if (m_icountptr != NULL)
+ if (m_icountptr != nullptr)
{
int delta = *m_icountptr;
m_cycles_stolen += delta;
@@ -449,9 +449,9 @@ void device_execute_interface::interface_validity_check(validity_checker &valid)
if (!m_vblank_interrupt.isnull())
{
screen_device_iterator iter(device().mconfig().root_device());
- if (iter.first() == NULL)
+ if (iter.first() == nullptr)
osd_printf_error("VBLANK interrupt specified, but the driver is screenless\n");
- else if (m_vblank_interrupt_screen != NULL && device().siblingdevice(m_vblank_interrupt_screen) == NULL)
+ else if (m_vblank_interrupt_screen != nullptr && device().siblingdevice(m_vblank_interrupt_screen) == nullptr)
osd_printf_error("VBLANK interrupt references a non-existant screen tag '%s'\n", m_vblank_interrupt_screen);
}
@@ -497,7 +497,7 @@ void device_execute_interface::interface_pre_start()
void device_execute_interface::interface_post_start()
{
// make sure somebody set us up the icount
- assert_always(m_icountptr != NULL, "m_icountptr never initialized!");
+ assert_always(m_icountptr != nullptr, "m_icountptr never initialized!");
// register for save states
device().save_item(NAME(m_suspend));
@@ -540,16 +540,16 @@ void device_execute_interface::interface_pre_reset()
void device_execute_interface::interface_post_reset()
{
// reset the interrupt vectors and queues
- for (int line = 0; line < ARRAY_LENGTH(m_input); line++)
- m_input[line].reset();
+ for (auto & elem : m_input)
+ elem.reset();
// reconfingure VBLANK interrupts
- if (m_vblank_interrupt_screen != NULL)
+ if (m_vblank_interrupt_screen != nullptr)
{
// get the screen that will trigger the VBLANK
screen_device *screen = downcast<screen_device *>(device().machine().device(device().siblingtag(m_vblank_interrupt_screen).c_str()));
- assert(screen != NULL);
+ assert(screen != nullptr);
screen->register_vblank_callback(vblank_state_delegate(FUNC(device_execute_interface::on_vblank), this));
}
@@ -557,7 +557,7 @@ void device_execute_interface::interface_post_reset()
if (m_timed_interrupt_period != attotime::zero)
{
attotime timedint_period = m_timed_interrupt_period;
- assert(m_timedint_timer != NULL);
+ assert(m_timedint_timer != nullptr);
m_timedint_timer->adjust(timedint_period, 0, timedint_period);
}
}
@@ -712,7 +712,7 @@ void device_execute_interface::trigger_periodic_interrupt()
//-------------------------------------------------
device_execute_interface::device_input::device_input()
- : m_execute(NULL),
+ : m_execute(nullptr),
m_linenum(0),
m_stored_vector(0),
m_curvector(0),
diff --git a/src/emu/diexec.h b/src/emu/diexec.h
index cd0e0f947e4..7f9eb41bfcf 100644
--- a/src/emu/diexec.h
+++ b/src/emu/diexec.h
@@ -155,7 +155,7 @@ public:
static void static_set_irq_acknowledge_callback(device_t &device, device_irq_acknowledge_delegate callback);
// execution management
- device_scheduler &scheduler() const { assert(m_scheduler != NULL); return *m_scheduler; }
+ device_scheduler &scheduler() const { assert(m_scheduler != nullptr); return *m_scheduler; }
bool executing() const;
INT32 cycles_remaining() const;
void eat_cycles(int cycles);
@@ -211,12 +211,12 @@ protected:
virtual void execute_set_input(int linenum, int state);
// interface-level overrides
- virtual void interface_validity_check(validity_checker &valid) const;
- virtual void interface_pre_start();
- virtual void interface_post_start();
- virtual void interface_pre_reset();
- virtual void interface_post_reset();
- virtual void interface_clock_changed();
+ virtual void interface_validity_check(validity_checker &valid) const override;
+ virtual void interface_pre_start() override;
+ virtual void interface_post_start() override;
+ virtual void interface_pre_reset() override;
+ virtual void interface_post_reset() override;
+ virtual void interface_clock_changed() override;
// for use by devcpu for now...
IRQ_CALLBACK_MEMBER(standard_irq_callback_member);
diff --git a/src/emu/digfx.cpp b/src/emu/digfx.cpp
index 65e1224c061..bed430e64f0 100644
--- a/src/emu/digfx.cpp
+++ b/src/emu/digfx.cpp
@@ -23,10 +23,10 @@
device_gfx_interface::device_gfx_interface(const machine_config &mconfig, device_t &device,
const gfx_decode_entry *gfxinfo, const char *palette_tag)
: device_interface(device, "gfx"),
- m_palette(NULL),
+ m_palette(nullptr),
m_gfxdecodeinfo(gfxinfo),
m_palette_tag(palette_tag),
- m_palette_is_sibling(palette_tag == NULL),
+ m_palette_is_sibling(palette_tag == nullptr),
m_decoded(false)
{
}
@@ -78,7 +78,7 @@ void device_gfx_interface::static_set_palette(device_t &device, const char *tag)
void device_gfx_interface::interface_pre_start()
{
- if (m_palette_tag == NULL)
+ if (m_palette_tag == nullptr)
fatalerror("No palette specified for device '%s'\n", device().tag());
// find our palette device, either as a sibling device or subdevice
@@ -87,7 +87,7 @@ void device_gfx_interface::interface_pre_start()
else
m_palette = device().subdevice<palette_device>(m_palette_tag);
- if (m_palette == NULL)
+ if (m_palette == nullptr)
fatalerror("Device '%s' specifies nonexistent %sdevice '%s' as palette\n",
device().tag(),
(m_palette_is_sibling ? "sibling " : "sub"),
@@ -119,7 +119,7 @@ void device_gfx_interface::interface_post_start()
void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo)
{
// skip if nothing to do
- if (gfxdecodeinfo == NULL)
+ if (gfxdecodeinfo == nullptr)
return;
// local variables to hold mutable copies of gfx layout data
@@ -128,7 +128,7 @@ void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo)
std::vector<UINT32> extyoffs(0);
// loop over all elements
- for (int curgfx = 0; curgfx < MAX_GFX_ELEMENTS && gfxdecodeinfo[curgfx].gfxlayout != NULL; curgfx++)
+ for (int curgfx = 0; curgfx < MAX_GFX_ELEMENTS && gfxdecodeinfo[curgfx].gfxlayout != nullptr; curgfx++)
{
const gfx_decode_entry &gfx = gfxdecodeinfo[curgfx];
@@ -143,13 +143,13 @@ void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo)
UINT8 region_width;
endianness_t region_endianness;
- if (gfx.memory_region != NULL)
+ if (gfx.memory_region != nullptr)
{
device_t &basedevice = (GFXENTRY_ISDEVICE(gfx.flags)) ? device() : *device().owner();
if (GFXENTRY_ISRAM(gfx.flags))
{
memory_share *share = basedevice.memshare(gfx.memory_region);
- assert(share != NULL);
+ assert(share != nullptr);
region_length = 8 * share->bytes();
region_base = reinterpret_cast<UINT8 *>(share->ptr());
region_width = share->bytewidth();
@@ -158,7 +158,7 @@ void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo)
else
{
memory_region *region = basedevice.memregion(gfx.memory_region);
- assert(region != NULL);
+ assert(region != nullptr);
region_length = 8 * region->bytes();
region_base = region->base();
region_width = region->bytewidth();
@@ -168,7 +168,7 @@ void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo)
else
{
region_length = 0;
- region_base = NULL;
+ region_base = nullptr;
region_width = 1;
region_endianness = ENDIANNESS_NATIVE;
}
@@ -205,8 +205,8 @@ void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo)
// copy the X and Y offsets into our temporary arrays
extxoffs.resize(glcopy.width * xscale);
extyoffs.resize(glcopy.height * yscale);
- memcpy(&extxoffs[0], (glcopy.extxoffs != NULL) ? glcopy.extxoffs : glcopy.xoffset, glcopy.width * sizeof(UINT32));
- memcpy(&extyoffs[0], (glcopy.extyoffs != NULL) ? glcopy.extyoffs : glcopy.yoffset, glcopy.height * sizeof(UINT32));
+ memcpy(&extxoffs[0], (glcopy.extxoffs != nullptr) ? glcopy.extxoffs : glcopy.xoffset, glcopy.width * sizeof(UINT32));
+ memcpy(&extyoffs[0], (glcopy.extyoffs != nullptr) ? glcopy.extyoffs : glcopy.yoffset, glcopy.height * sizeof(UINT32));
// always use the extended offsets here
glcopy.extxoffs = &extxoffs[0];
@@ -276,7 +276,7 @@ void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo)
}
// allocate the graphics
- m_gfx[curgfx] = std::make_unique<gfx_element>(m_palette, glcopy, (region_base != NULL) ? region_base + gfx.start : NULL, xormask, gfx.total_color_codes, gfx.color_codes_start);
+ m_gfx[curgfx] = std::make_unique<gfx_element>(m_palette, glcopy, (region_base != nullptr) ? region_base + gfx.start : nullptr, xormask, gfx.total_color_codes, gfx.color_codes_start);
}
m_decoded = true;
@@ -291,7 +291,7 @@ void device_gfx_interface::decode_gfx(const gfx_decode_entry *gfxdecodeinfo)
void device_gfx_interface::interface_validity_check(validity_checker &valid) const
{
// validate palette tag
- if (m_palette_tag == NULL)
+ if (m_palette_tag == nullptr)
osd_printf_error("No palette specified for device '%s'\n", device().tag());
else
{
@@ -301,7 +301,7 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con
else
palette = device().subdevice<palette_device>(m_palette_tag);
- if (palette == NULL)
+ if (palette == nullptr)
osd_printf_error("Device '%s' specifies nonexistent %sdevice '%s' as palette\n",
device().tag(),
(m_palette_is_sibling ? "sibling " : "sub"),
@@ -312,14 +312,14 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con
return;
// validate graphics decoding entries
- for (int gfxnum = 0; gfxnum < MAX_GFX_ELEMENTS && m_gfxdecodeinfo[gfxnum].gfxlayout != NULL; gfxnum++)
+ for (int gfxnum = 0; gfxnum < MAX_GFX_ELEMENTS && m_gfxdecodeinfo[gfxnum].gfxlayout != nullptr; gfxnum++)
{
const gfx_decode_entry &gfx = m_gfxdecodeinfo[gfxnum];
const gfx_layout &layout = *gfx.gfxlayout;
// currently we are unable to validate RAM-based entries
const char *region = gfx.memory_region;
- if (region != NULL && GFXENTRY_ISROM(gfx.flags))
+ if (region != nullptr && GFXENTRY_ISROM(gfx.flags))
{
// resolve the region
std::string gfxregion;
@@ -372,9 +372,9 @@ void device_gfx_interface::interface_validity_check(validity_checker &valid) con
{
if (layout.planes > MAX_GFX_PLANES)
osd_printf_error("gfx[%d] planes > %d\n", gfxnum, MAX_GFX_PLANES);
- if (layout.width > MAX_GFX_SIZE && layout.extxoffs == NULL)
+ if (layout.width > MAX_GFX_SIZE && layout.extxoffs == nullptr)
osd_printf_error("gfx[%d] width > %d but missing extended xoffset info\n", gfxnum, MAX_GFX_SIZE);
- if (layout.height > MAX_GFX_SIZE && layout.extyoffs == NULL)
+ if (layout.height > MAX_GFX_SIZE && layout.extyoffs == nullptr)
osd_printf_error("gfx[%d] height > %d but missing extended yoffset info\n", gfxnum, MAX_GFX_SIZE);
}
}
diff --git a/src/emu/digfx.h b/src/emu/digfx.h
index 63f84d09c89..3dfe042f3f1 100644
--- a/src/emu/digfx.h
+++ b/src/emu/digfx.h
@@ -159,8 +159,8 @@ class palette_device;
struct gfx_layout
{
- UINT32 xoffs(int x) const { return (extxoffs != NULL) ? extxoffs[x] : xoffset[x]; }
- UINT32 yoffs(int y) const { return (extyoffs != NULL) ? extyoffs[y] : yoffset[y]; }
+ UINT32 xoffs(int x) const { return (extxoffs != nullptr) ? extxoffs[x] : xoffset[x]; }
+ UINT32 yoffs(int y) const { return (extyoffs != nullptr) ? extyoffs[y] : yoffset[y]; }
UINT16 width; // pixel width of each element
UINT16 height; // pixel height of each element
@@ -191,7 +191,7 @@ class device_gfx_interface : public device_interface
public:
// construction/destruction
device_gfx_interface(const machine_config &mconfig, device_t &device,
- const gfx_decode_entry *gfxinfo = NULL, const char *palette_tag = NULL);
+ const gfx_decode_entry *gfxinfo = nullptr, const char *palette_tag = nullptr);
virtual ~device_gfx_interface();
// static configuration
@@ -210,9 +210,9 @@ public:
protected:
// interface-level overrides
- virtual void interface_validity_check(validity_checker &valid) const;
- virtual void interface_pre_start();
- virtual void interface_post_start();
+ virtual void interface_validity_check(validity_checker &valid) const override;
+ virtual void interface_pre_start() override;
+ virtual void interface_post_start() override;
palette_device * m_palette; // pointer to the palette device
std::unique_ptr<gfx_element> m_gfx[MAX_GFX_ELEMENTS]; // array of pointers to graphic sets
diff --git a/src/emu/diimage.cpp b/src/emu/diimage.cpp
index 57a73dc66a8..c0104da34e2 100644
--- a/src/emu/diimage.cpp
+++ b/src/emu/diimage.cpp
@@ -56,17 +56,17 @@ const image_device_type_info device_image_interface::m_device_info_array[] =
device_image_interface::device_image_interface(const machine_config &mconfig, device_t &device)
: device_interface(device, "image"),
m_err(),
- m_file(NULL),
- m_mame_file(NULL),
- m_software_info_ptr(NULL),
- m_software_part_ptr(NULL),
+ m_file(nullptr),
+ m_mame_file(nullptr),
+ m_software_info_ptr(nullptr),
+ m_software_part_ptr(nullptr),
m_supported(0),
m_readonly(false),
m_created(false),
m_init_phase(false),
m_from_swlist(false),
m_create_format(0),
- m_create_args(NULL),
+ m_create_args(nullptr),
m_is_loading(FALSE)
{
}
@@ -93,7 +93,7 @@ const image_device_type_info *device_image_interface::find_device_type(iodevice_
if (m_device_info_array[i].m_type == type)
return &m_device_info_array[i];
}
- return NULL;
+ return nullptr;
}
//-------------------------------------------------
@@ -103,7 +103,7 @@ const image_device_type_info *device_image_interface::find_device_type(iodevice_
const char *device_image_interface::device_typename(iodevice_t type)
{
const image_device_type_info *info = find_device_type(type);
- return (info != NULL) ? info->m_name : NULL;
+ return (info != nullptr) ? info->m_name : nullptr;
}
//-------------------------------------------------
@@ -114,7 +114,7 @@ const char *device_image_interface::device_typename(iodevice_t type)
const char *device_image_interface::device_brieftypename(iodevice_t type)
{
const image_device_type_info *info = find_device_type(type);
- return (info != NULL) ? info->m_shortname : NULL;
+ return (info != nullptr) ? info->m_shortname : nullptr;
}
//-------------------------------------------------
@@ -200,10 +200,10 @@ image_error_t device_image_interface::set_image_filename(const char *filename)
const image_device_format *device_image_interface::device_get_named_creatable_format(const char *format_name)
{
- for (const image_device_format *format = m_formatlist.first(); format != NULL; format = format->next())
+ for (const image_device_format *format = m_formatlist.first(); format != nullptr; format = format->next())
if (strcmp(format->name(), format_name) == 0)
return format;
- return NULL;
+ return nullptr;
}
/****************************************************************************
@@ -257,7 +257,7 @@ void device_image_interface::seterror(image_error_t err, const char *message)
{
clear_error();
m_err = err;
- if (message != NULL)
+ if (message != nullptr)
{
m_err_message = message;
}
@@ -304,9 +304,9 @@ bool device_image_interface::try_change_working_directory(const char *subdir)
bool done = FALSE;
directory = osd_opendir(m_working_directory.c_str());
- if (directory != NULL)
+ if (directory != nullptr)
{
- while(!done && (entry = osd_readdir(directory)) != NULL)
+ while(!done && (entry = osd_readdir(directory)) != nullptr)
{
if (!core_stricmp(subdir, entry->name))
{
@@ -331,7 +331,7 @@ bool device_image_interface::try_change_working_directory(const char *subdir)
void device_image_interface::setup_working_directory()
{
- char *dst = NULL;
+ char *dst = nullptr;
osd_get_full_path(&dst,".");
/* first set up the working directory to be the starting directory */
@@ -374,8 +374,8 @@ UINT8 *device_image_interface::get_software_region(const char *tag)
{
char full_tag[256];
- if ( m_software_info_ptr == NULL || m_software_part_ptr == NULL )
- return NULL;
+ if ( m_software_info_ptr == nullptr || m_software_part_ptr == nullptr )
+ return nullptr;
sprintf( full_tag, "%s:%s", device().tag(), tag );
return device().machine().root_device().memregion( full_tag )->base();
@@ -401,7 +401,7 @@ UINT32 device_image_interface::get_software_region_length(const char *tag)
const char *device_image_interface::get_feature(const char *feature_name)
{
- return (m_software_part_ptr == NULL) ? NULL : m_software_part_ptr->feature(feature_name);
+ return (m_software_part_ptr == nullptr) ? nullptr : m_software_part_ptr->feature(feature_name);
}
@@ -546,14 +546,14 @@ bool device_image_interface::uses_file_extension(const char *file_extension) con
/* find the extensions */
std::string extensions(file_extensions());
char *ext = strtok((char*)extensions.c_str(),",");
- while (ext != NULL)
+ while (ext != nullptr)
{
if (!core_stricmp(ext, file_extension))
{
result = TRUE;
break;
}
- ext = strtok (NULL, ",");
+ ext = strtok (nullptr, ",");
}
return result;
}
@@ -569,7 +569,7 @@ bool device_image_interface::uses_file_extension(const char *file_extension) con
bool device_image_interface::is_loaded()
{
- return (m_file != NULL);
+ return (m_file != nullptr);
}
/*-------------------------------------------------
@@ -724,7 +724,7 @@ static void dump_wrong_and_correct_checksums(const hash_collection &hashes, cons
static int verify_length_and_hash(emu_file *file, const char *name, UINT32 explength, const hash_collection &hashes)
{
int retVal = 0;
- if (file==NULL) return 0;
+ if (file==nullptr) return 0;
/* verify length */
UINT32 actlength = file->size();
@@ -767,7 +767,7 @@ bool device_image_interface::load_software(software_list_device &swlist, const c
const rom_entry *region;
bool retVal = FALSE;
int warningcount = 0;
- for (region = start; region != NULL; region = rom_next_region(region))
+ for (region = start; region != nullptr; region = rom_next_region(region))
{
/* loop until we hit the end of this region */
const rom_entry *romp = region + 1;
@@ -782,7 +782,7 @@ bool device_image_interface::load_software(software_list_device &swlist, const c
bool has_crc = hash_collection(ROM_GETHASHDATA(romp)).crc(crc);
software_info *swinfo = swlist.find(swname);
- if (swinfo == NULL)
+ if (swinfo == nullptr)
return false;
UINT32 supported = swinfo->supported();
@@ -795,11 +795,11 @@ bool device_image_interface::load_software(software_list_device &swlist, const c
// " swlist % clonename % parentname "
// below, we have the code to split the elements and to create paths to load from
- while (swinfo != NULL)
+ while (swinfo != nullptr)
{
locationtag.append(swinfo->shortname()).append(breakstr);
const char *parentname = swinfo->parentname();
- swinfo = (parentname != NULL) ? swlist.find(parentname) : NULL;
+ swinfo = (parentname != nullptr) ? swlist.find(parentname) : nullptr;
}
// strip the final '%'
locationtag.erase(locationtag.length() - 1, 1);
@@ -831,16 +831,16 @@ bool device_image_interface::load_software(software_list_device &swlist, const c
// - if we are not using lists, we have regiontag only;
// - if we are using lists, we have: list/clonename, list/parentname, clonename, parentname
// try to load from list/setname
- if ((m_mame_file == NULL) && (tag2.c_str() != NULL))
+ if ((m_mame_file == nullptr) && (tag2.c_str() != nullptr))
filerr = common_process_file(device().machine().options(), tag2.c_str(), has_crc, crc, romp, &m_mame_file);
// try to load from list/parentname
- if ((m_mame_file == NULL) && (tag3.c_str() != NULL))
+ if ((m_mame_file == nullptr) && (tag3.c_str() != nullptr))
filerr = common_process_file(device().machine().options(), tag3.c_str(), has_crc, crc, romp, &m_mame_file);
// try to load from setname
- if ((m_mame_file == NULL) && (tag4.c_str() != NULL))
+ if ((m_mame_file == nullptr) && (tag4.c_str() != nullptr))
filerr = common_process_file(device().machine().options(), tag4.c_str(), has_crc, crc, romp, &m_mame_file);
// try to load from parentname
- if ((m_mame_file == NULL) && (tag5.c_str() != NULL))
+ if ((m_mame_file == nullptr) && (tag5.c_str() != nullptr))
filerr = common_process_file(device().machine().options(), tag5.c_str(), has_crc, crc, romp, &m_mame_file);
warningcount += verify_length_and_hash(m_mame_file,ROM_GETNAME(romp),ROM_GETLENGTH(romp),hash_collection(ROM_GETHASHDATA(romp)));
@@ -939,7 +939,7 @@ bool device_image_interface::load_internal(const char *path, bool is_create, int
if ( m_software_info_ptr )
{
// sanitize
- if (m_software_info_ptr->longname() == NULL || m_software_info_ptr->publisher() == NULL || m_software_info_ptr->year() == NULL)
+ if (m_software_info_ptr->longname() == nullptr || m_software_info_ptr->publisher() == nullptr || m_software_info_ptr->year() == nullptr)
fatalerror("Each entry in an XML list must have all of the following fields: description, publisher, year!\n");
// store
@@ -1009,7 +1009,7 @@ done:
bool device_image_interface::load(const char *path)
{
- return load_internal(path, FALSE, 0, NULL, FALSE);
+ return load_internal(path, FALSE, 0, nullptr, FALSE);
}
/*-------------------------------------------------
@@ -1022,9 +1022,9 @@ bool device_image_interface::open_image_file(emu_options &options)
if (*path != 0)
{
set_init_phase();
- if (load_internal(path, FALSE, 0, NULL, TRUE)==IMAGE_INIT_PASS)
+ if (load_internal(path, FALSE, 0, nullptr, TRUE)==IMAGE_INIT_PASS)
{
- if (software_entry()==NULL) return true;
+ if (software_entry()==nullptr) return true;
}
}
return false;
@@ -1065,7 +1065,7 @@ bool device_image_interface::finish_load()
}
m_is_loading = FALSE;
m_create_format = 0;
- m_create_args = NULL;
+ m_create_args = nullptr;
m_init_phase = FALSE;
return err;
}
@@ -1076,7 +1076,7 @@ bool device_image_interface::finish_load()
bool device_image_interface::create(const char *path, const image_device_format *create_format, option_resolution *create_args)
{
- int format_index = (create_format != NULL) ? m_formatlist.indexof(*create_format) : 0;
+ int format_index = (create_format != nullptr) ? m_formatlist.indexof(*create_format) : 0;
return load_internal(path, TRUE, format_index, create_args, FALSE);
}
@@ -1091,13 +1091,13 @@ void device_image_interface::clear()
if (m_mame_file)
{
global_free(m_mame_file);
- m_mame_file = NULL;
- m_file = NULL;
+ m_mame_file = nullptr;
+ m_file = nullptr;
} else {
if (m_file)
{
core_fclose(m_file);
- m_file = NULL;
+ m_file = nullptr;
}
}
@@ -1113,8 +1113,8 @@ void device_image_interface::clear()
m_filetype.clear();
m_full_software_name.clear();
- m_software_info_ptr = NULL;
- m_software_part_ptr = NULL;
+ m_software_info_ptr = nullptr;
+ m_software_part_ptr = nullptr;
m_software_list_name.clear();
}
@@ -1141,15 +1141,15 @@ void device_image_interface::update_names(const device_type device_type, const c
image_interface_iterator iter(device().mconfig().root_device());
int count = 0;
int index = -1;
- for (const device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (const device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
if (this == image)
index = count;
- if ((image->image_type() == image_type() && device_type==NULL) || (device_type==image->device().type()))
+ if ((image->image_type() == image_type() && device_type==nullptr) || (device_type==image->device().type()))
count++;
}
- const char *inst_name = (device_type!=NULL) ? inst : device_typename(image_type());
- const char *brief_name = (device_type!=NULL) ? brief : device_brieftypename(image_type());
+ const char *inst_name = (device_type!=nullptr) ? inst : device_typename(image_type());
+ const char *brief_name = (device_type!=nullptr) ? brief : device_brieftypename(image_type());
if (count > 1)
{
strprintf(m_instance_name,"%s%d", inst_name, index + 1);
@@ -1187,7 +1187,7 @@ void device_image_interface::software_name_split(const char *swlist_swname, std:
// if no colon, this is the swname by itself
const char *split1 = strchr(swlist_swname, ':');
- if (split1 == NULL)
+ if (split1 == nullptr)
{
swname.assign(swlist_swname);
return;
@@ -1195,7 +1195,7 @@ void device_image_interface::software_name_split(const char *swlist_swname, std:
// if one colon, it is the swname and swpart alone
const char *split2 = strchr(split1 + 1, ':');
- if (split2 == NULL)
+ if (split2 == nullptr)
{
swname.assign(swlist_swname, split1 - swlist_swname);
swpart.assign(split1 + 1);
@@ -1216,21 +1216,21 @@ software_part *device_image_interface::find_software_item(const char *path, bool
software_name_split(path, swlist_name, swinfo_name, swpart_name);
// determine interface
- const char *interface = NULL;
+ const char *interface = nullptr;
if (restrict_to_interface)
interface = image_interface();
// find the software list if explicitly specified
software_list_device_iterator deviter(device().mconfig().root_device());
- for (software_list_device *swlistdev = deviter.first(); swlistdev != NULL; swlistdev = deviter.next())
+ for (software_list_device *swlistdev = deviter.first(); swlistdev != nullptr; swlistdev = deviter.next())
{
if (swlist_name.compare(swlistdev->list_name())==0 || !(swlist_name.length() > 0))
{
software_info *info = swlistdev->find(swinfo_name.c_str());
- if (info != NULL)
+ if (info != nullptr)
{
software_part *part = info->find_part(swpart_name.c_str(), interface);
- if (part != NULL)
+ if (part != nullptr)
return part;
}
}
@@ -1242,17 +1242,17 @@ software_part *device_image_interface::find_software_item(const char *path, bool
// since the function cannot distinguish between this and the case
// path = swinfo_name:swpart_name
software_info *info = swlistdev->find(swpart_name.c_str());
- if (info != NULL)
+ if (info != nullptr)
{
- software_part *part = info->find_part(NULL, interface);
- if (part != NULL)
+ software_part *part = info->find_part(nullptr, interface);
+ if (part != nullptr)
return part;
}
}
}
// if explicitly specified and not found, just error here
- return NULL;
+ return nullptr;
}
@@ -1273,7 +1273,7 @@ bool device_image_interface::load_software_part(const char *path, software_part
{
// if no match has been found, we suggest similar shortnames
swpart = find_software_item(path, true);
- if (swpart == NULL)
+ if (swpart == nullptr)
{
software_list_device::display_matches(device().machine().config(), image_interface(), path);
return false;
@@ -1292,16 +1292,16 @@ bool device_image_interface::load_software_part(const char *path, software_part
// check requirements and load those images
const char *requirement = swpart->feature("requirement");
- if (requirement != NULL)
+ if (requirement != nullptr)
{
software_part *req_swpart = find_software_item(requirement, false);
- if (req_swpart != NULL)
+ if (req_swpart != nullptr)
{
image_interface_iterator imgiter(device().machine().root_device());
- for (device_image_interface *req_image = imgiter.first(); req_image != NULL; req_image = imgiter.next())
+ for (device_image_interface *req_image = imgiter.first(); req_image != nullptr; req_image = imgiter.next())
{
const char *interface = req_image->image_interface();
- if (interface != NULL)
+ if (interface != nullptr)
{
if (req_swpart->matches_interface(interface))
{
@@ -1333,10 +1333,10 @@ void device_image_interface::software_get_default_slot(std::string &result, cons
{
result.assign(default_card_slot);
software_part *swpart = find_software_item(path, true);
- if (swpart != NULL)
+ if (swpart != nullptr)
{
const char *slot = swpart->feature("slot");
- if (slot != NULL)
+ if (slot != nullptr)
result.assign(slot);
}
}
diff --git a/src/emu/diimage.h b/src/emu/diimage.h
index b2aa398396a..e699194fd6c 100644
--- a/src/emu/diimage.h
+++ b/src/emu/diimage.h
@@ -73,7 +73,7 @@ class image_device_format
public:
image_device_format(const char *name, const char *description, const char *extensions, const char *optspec)
- : m_next(NULL),
+ : m_next(nullptr),
m_name(name),
m_description(description),
m_extensions(extensions),
@@ -149,7 +149,7 @@ public:
virtual bool call_create(int format_type, option_resolution *format_options) { return FALSE; }
virtual void call_unload() { }
virtual void call_display() { }
- virtual device_image_partialhash_func get_partial_hash() const { return NULL; }
+ virtual device_image_partialhash_func get_partial_hash() const { return nullptr; }
virtual bool core_opens_image_file() const { return TRUE; }
virtual iodevice_t image_type() const = 0;
virtual bool is_readable() const = 0;
@@ -157,7 +157,7 @@ public:
virtual bool is_creatable() const = 0;
virtual bool must_be_loaded() const = 0;
virtual bool is_reset_on_load() const = 0;
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const = 0;
virtual const option_guide *create_option_guide() const = 0;
@@ -172,10 +172,10 @@ public:
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 NULL; else return m_image_name.c_str(); }
- const char *basename() { if (m_basename.empty()) return NULL; else return m_basename.c_str(); }
- const char *basename_noext() { if (m_basename_noext.empty()) return NULL; else return m_basename_noext.c_str(); }
- const char *filetype() { if (m_filetype.empty()) return NULL; else return m_filetype.c_str(); }
+ 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(); }
core_file *image_core_file() { return m_file; }
UINT64 length() { check_for_file(); return core_fsize(m_file); }
bool is_readonly() { return m_readonly; }
@@ -248,14 +248,14 @@ protected:
void clear_error();
- void check_for_file() { assert_always(m_file != NULL, "Illegal operation on unmounted image"); }
+ void check_for_file() { assert_always(m_file != nullptr, "Illegal operation on unmounted image"); }
void setup_working_directory();
bool try_change_working_directory(const char *subdir);
void run_hash(void (*partialhash)(hash_collection &, const unsigned char *, unsigned long, const char *), hash_collection &hashes, const char *types);
void image_checkhash();
- void update_names(const device_type device_type = NULL, const char *inst = NULL, const char *brief = NULL);
+ void update_names(const device_type device_type = nullptr, const char *inst = nullptr, const char *brief = nullptr);
software_part *find_software_item(const char *path, bool restrict_to_interface);
bool load_software_part(const char *path, software_part *&swpart);
diff --git a/src/emu/dimemory.cpp b/src/emu/dimemory.cpp
index 0306774feae..0650ebfab70 100644
--- a/src/emu/dimemory.cpp
+++ b/src/emu/dimemory.cpp
@@ -44,8 +44,8 @@ address_space_config::address_space_config()
m_addrbus_shift(0),
m_logaddr_width(0),
m_page_shift(0),
- m_internal_map(NULL),
- m_default_map(NULL)
+ m_internal_map(nullptr),
+ m_default_map(nullptr)
{
}
@@ -92,10 +92,10 @@ address_space_config::address_space_config(const char *name, endianness_t endian
m_addrbus_shift(addrshift),
m_logaddr_width(addrwidth),
m_page_shift(0),
- m_internal_map(NULL),
- m_default_map(NULL),
- m_internal_map_delegate(internal),
- m_default_map_delegate(defmap)
+ m_internal_map(nullptr),
+ m_default_map(nullptr),
+ m_internal_map_delegate(std::move(internal)),
+ m_default_map_delegate(std::move(defmap))
{
}
@@ -107,10 +107,10 @@ address_space_config::address_space_config(const char *name, endianness_t endian
m_addrbus_shift(addrshift),
m_logaddr_width(logwidth),
m_page_shift(pageshift),
- m_internal_map(NULL),
- m_default_map(NULL),
- m_internal_map_delegate(internal),
- m_default_map_delegate(defmap)
+ m_internal_map(nullptr),
+ m_default_map(nullptr),
+ m_internal_map_delegate(std::move(internal)),
+ m_default_map_delegate(std::move(defmap))
{
}
@@ -244,16 +244,16 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
{
const address_space_config *spaceconfig = space_config(spacenum);
- if (spaceconfig != NULL)
+ if (spaceconfig != nullptr)
{
int datawidth = spaceconfig->m_databus_width;
int alignunit = datawidth / 8;
// construct the maps
- ::address_map *map = global_alloc(::address_map(const_cast<device_t &>(device()), spacenum));
+ auto map = global_alloc(::address_map(const_cast<device_t &>(device()), spacenum));
// if this is an empty map, just skip it
- if (map->m_entrylist.first() == NULL)
+ if (map->m_entrylist.first() == nullptr)
{
global_free(map);
continue;
@@ -266,7 +266,7 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
osd_printf_error("Wrong memory handlers provided for %s space! (width = %d, memory = %08x)\n", spaceconfig->m_name, datawidth, map->m_databits);
// loop over entries and look for errors
- for (address_map_entry *entry = map->m_entrylist.first(); entry != NULL; entry = entry->next())
+ for (address_map_entry *entry = map->m_entrylist.first(); entry != nullptr; entry = entry->next())
{
UINT32 bytestart = spaceconfig->addr2byte(entry->m_addrstart);
UINT32 byteend = spaceconfig->addr2byte_end(entry->m_addrend);
@@ -295,14 +295,14 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
osd_printf_error("Wrong %s memory read handler start = %08x, end = %08x ALIGN = %d\n", spaceconfig->m_name, entry->m_addrstart, entry->m_addrend, alignunit);
// if this is a program space, auto-assign implicit ROM entries
- if (entry->m_read.m_type == AMH_ROM && entry->m_region == NULL)
+ if (entry->m_read.m_type == AMH_ROM && entry->m_region == nullptr)
{
entry->m_region = device().tag();
entry->m_rgnoffs = entry->m_addrstart;
}
// if this entry references a memory region, validate it
- if (entry->m_region != NULL && entry->m_share == 0)
+ if (entry->m_region != nullptr && entry->m_share == nullptr)
{
// make sure we can resolve the full path to the region
bool found = false;
@@ -310,8 +310,8 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
// look for the region
device_iterator deviter(device().mconfig().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
- for (const rom_entry *romp = rom_first_region(*device); romp != NULL && !found; romp = rom_next_region(romp))
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
+ for (const rom_entry *romp = rom_first_region(*device); romp != nullptr && !found; romp = rom_next_region(romp))
{
if (rom_region_name(*device, romp) == entry_region)
{
@@ -330,16 +330,16 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
// make sure all devices exist
// FIXME: This doesn't work! AMH_DEVICE_DELEGATE entries don't even set m_tag, the device tag is inside the proto-delegate
- if (entry->m_read.m_type == AMH_DEVICE_DELEGATE && entry->m_read.m_tag != NULL)
+ if (entry->m_read.m_type == AMH_DEVICE_DELEGATE && entry->m_read.m_tag != nullptr)
{
std::string temp(entry->m_read.m_tag);
- if (device().siblingdevice(temp.c_str()) == NULL)
+ if (device().siblingdevice(temp.c_str()) == nullptr)
osd_printf_error("%s space memory map entry references nonexistant device '%s'\n", spaceconfig->m_name, entry->m_read.m_tag);
}
- if (entry->m_write.m_type == AMH_DEVICE_DELEGATE && entry->m_write.m_tag != NULL)
+ if (entry->m_write.m_type == AMH_DEVICE_DELEGATE && entry->m_write.m_tag != nullptr)
{
std::string temp(entry->m_write.m_tag);
- if (device().siblingdevice(temp.c_str()) == NULL)
+ if (device().siblingdevice(temp.c_str()) == nullptr)
osd_printf_error("%s space memory map entry references nonexistant device '%s'\n", spaceconfig->m_name, entry->m_write.m_tag);
}
@@ -353,7 +353,7 @@ void device_memory_interface::interface_validity_check(validity_checker &valid)
valid.validate_tag(entry->m_read.m_tag);
if (entry->m_write.m_type == AMH_BANK)
valid.validate_tag(entry->m_write.m_tag);
- if (entry->m_share != NULL)
+ if (entry->m_share != nullptr)
valid.validate_tag(entry->m_share);
}
diff --git a/src/emu/dimemory.h b/src/emu/dimemory.h
index 5255aadb3da..66561b5a5cf 100644
--- a/src/emu/dimemory.h
+++ b/src/emu/dimemory.h
@@ -79,19 +79,19 @@ public:
virtual ~device_memory_interface();
// configuration access
- address_map_constructor address_map(address_spacenum spacenum = AS_0) const { return (spacenum < ARRAY_LENGTH(m_address_map)) ? m_address_map[spacenum] : NULL; }
+ address_map_constructor address_map(address_spacenum spacenum = AS_0) const { return (spacenum < ARRAY_LENGTH(m_address_map)) ? m_address_map[spacenum] : nullptr; }
const address_space_config *space_config(address_spacenum spacenum = AS_0) const { return memory_space_config(spacenum); }
// static inline configuration helpers
static void static_set_addrmap(device_t &device, address_spacenum spacenum, address_map_constructor map);
// basic information getters
- bool has_space(int index = 0) const { return (m_addrspace[index] != NULL); }
- bool has_space(address_spacenum index) const { return (m_addrspace[int(index)] != NULL); }
- bool has_configured_map(int index = 0) const { return (m_address_map[index] != NULL); }
- bool has_configured_map(address_spacenum index) const { return (m_address_map[int(index)] != NULL); }
- address_space &space(int index = 0) const { assert(m_addrspace[index] != NULL); return *m_addrspace[index]; }
- address_space &space(address_spacenum index) const { assert(m_addrspace[int(index)] != NULL); return *m_addrspace[int(index)]; }
+ bool has_space(int index = 0) const { return (m_addrspace[index] != nullptr); }
+ bool has_space(address_spacenum index) const { return (m_addrspace[int(index)] != nullptr); }
+ bool has_configured_map(int index = 0) const { return (m_address_map[index] != nullptr); }
+ bool has_configured_map(address_spacenum index) const { return (m_address_map[int(index)] != nullptr); }
+ address_space &space(int index = 0) const { assert(m_addrspace[index] != nullptr); return *m_addrspace[index]; }
+ address_space &space(address_spacenum index) const { assert(m_addrspace[int(index)] != nullptr); return *m_addrspace[int(index)]; }
// address space accessors
void set_address_space(address_spacenum spacenum, address_space &space);
@@ -119,7 +119,7 @@ protected:
virtual bool memory_readop(offs_t offset, int size, UINT64 &value);
// interface-level overrides
- virtual void interface_validity_check(validity_checker &valid) const;
+ virtual void interface_validity_check(validity_checker &valid) const override;
// configuration
address_map_constructor m_address_map[ADDRESS_SPACES]; // address maps for each address space
diff --git a/src/emu/dioutput.cpp b/src/emu/dioutput.cpp
index 54633f3acbd..32e1338d091 100644
--- a/src/emu/dioutput.cpp
+++ b/src/emu/dioutput.cpp
@@ -23,7 +23,7 @@
device_output_interface::device_output_interface(const machine_config &mconfig, device_t &device) :
device_interface(device, "output"),
m_output_index(0),
- m_output_name(NULL)
+ m_output_name(nullptr)
{
}
diff --git a/src/emu/dipty.cpp b/src/emu/dipty.cpp
index 97533eae976..bd1a166322f 100644
--- a/src/emu/dipty.cpp
+++ b/src/emu/dipty.cpp
@@ -13,7 +13,7 @@
device_pty_interface::device_pty_interface(const machine_config &mconfig, device_t &device)
: device_interface(device, "pty"),
- m_pty_master(NULL),
+ m_pty_master(nullptr),
m_slave_name(),
m_opened(false)
{
@@ -33,7 +33,7 @@ bool device_pty_interface::open(void)
m_slave_name.assign(buffer);
} else {
m_opened = false;
- m_pty_master = NULL;
+ m_pty_master = nullptr;
}
}
diff --git a/src/emu/diserial.cpp b/src/emu/diserial.cpp
index 3b679b47232..3e4c0b4c785 100644
--- a/src/emu/diserial.cpp
+++ b/src/emu/diserial.cpp
@@ -27,8 +27,8 @@ device_serial_interface::device_serial_interface(const machine_config &mconfig,
m_tra_flags(TRANSMIT_REGISTER_EMPTY),
m_tra_bit_count_transmitted(0),
m_tra_bit_count(0),
- m_rcv_clock(NULL),
- m_tra_clock(NULL),
+ m_rcv_clock(nullptr),
+ m_tra_clock(nullptr),
m_rcv_rate(attotime::never),
m_tra_rate(attotime::never),
m_rcv_line(0),
diff --git a/src/emu/diserial.h b/src/emu/diserial.h
index 38b34bfdf2c..185c6849a4d 100644
--- a/src/emu/diserial.h
+++ b/src/emu/diserial.h
@@ -122,7 +122,7 @@ protected:
virtual void rcv_complete() { }
// interface-level overrides
- virtual void interface_pre_start();
+ virtual void interface_pre_start() override;
// Must be called from device_timer in the underlying device
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
diff --git a/src/emu/dislot.cpp b/src/emu/dislot.cpp
index 304a6517a42..697eb673a9f 100644
--- a/src/emu/dislot.cpp
+++ b/src/emu/dislot.cpp
@@ -11,7 +11,7 @@
device_slot_interface::device_slot_interface(const machine_config &mconfig, device_t &device)
: device_interface(device, "slot"),
- m_default_option(NULL),
+ m_default_option(nullptr),
m_fixed(false)
{
}
@@ -21,13 +21,13 @@ device_slot_interface::~device_slot_interface()
}
device_slot_option::device_slot_option(const char *name, const device_type &devtype):
- m_next(NULL),
+ m_next(nullptr),
m_name(name),
m_devtype(devtype),
m_selectable(true),
- m_default_bios(NULL),
- m_machine_config(NULL),
- m_input_device_defaults(NULL),
+ m_default_bios(nullptr),
+ m_machine_config(nullptr),
+ m_input_device_defaults(nullptr),
m_clock(0)
{
}
@@ -44,7 +44,7 @@ void device_slot_interface::static_option_add(device_t &device, const char *name
device_slot_interface &intf = dynamic_cast<device_slot_interface &>(device);
device_slot_option *option = intf.option(name);
- if (option != NULL)
+ if (option != nullptr)
throw emu_fatalerror("slot '%s' duplicate option '%s\n", device.tag(), name);
intf.m_options.append(name, *global_alloc(device_slot_option(name, devtype)));
@@ -55,7 +55,7 @@ device_slot_option *device_slot_interface::static_option(device_t &device, const
device_slot_interface &intf = dynamic_cast<device_slot_interface &>(device);
device_slot_option *option = intf.option(name);
- if (option == NULL)
+ if (option == nullptr)
throw emu_fatalerror("slot '%s' has no option '%s\n", device.tag(), name);
return option;
@@ -64,7 +64,7 @@ device_slot_option *device_slot_interface::static_option(device_t &device, const
device_t* device_slot_interface::get_card_device()
{
const char *subtag;
- device_t *dev = NULL;
+ device_t *dev = nullptr;
std::string temp;
if (!device().mconfig().options().exists(device().tag()+1)) {
subtag = m_default_option;
@@ -72,9 +72,9 @@ device_t* device_slot_interface::get_card_device()
subtag = device().mconfig().options().main_value(temp,device().tag()+1);
}
if (subtag && *subtag != 0) {
- device_slot_card_interface *intf = NULL;
+ device_slot_card_interface *intf = nullptr;
dev = device().subdevice(subtag);
- if (dev!=NULL && !dev->interface(intf))
+ if (dev!=nullptr && !dev->interface(intf))
throw emu_fatalerror("get_card_device called for device '%s' with no slot card interface", dev->tag());
}
return dev;
diff --git a/src/emu/dislot.h b/src/emu/dislot.h
index a13d0e37e2d..3c89b1350d3 100644
--- a/src/emu/dislot.h
+++ b/src/emu/dislot.h
@@ -115,7 +115,7 @@ public:
bool fixed() const { return m_fixed; }
const char *default_option() const { return m_default_option; }
device_slot_option *first_option() const { return m_options.first(); }
- device_slot_option *option(const char *name) const { if (name) return m_options.find(name); return NULL; }
+ device_slot_option *option(const char *name) const { if (name) return m_options.find(name); return nullptr; }
virtual void get_default_card_software(std::string &result) { result.clear(); }
device_t *get_card_device();
diff --git a/src/emu/disound.cpp b/src/emu/disound.cpp
index e6c68737e0f..c1f4e49f4b6 100644
--- a/src/emu/disound.cpp
+++ b/src/emu/disound.cpp
@@ -91,7 +91,7 @@ int device_sound_interface::inputs() const
{
// scan the list counting streams we own and summing their inputs
int inputs = 0;
- for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != NULL; stream = stream->next())
+ for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != nullptr; stream = stream->next())
if (&stream->device() == &m_device)
inputs += stream->input_count();
return inputs;
@@ -107,7 +107,7 @@ int device_sound_interface::outputs() const
{
// scan the list counting streams we own and summing their outputs
int outputs = 0;
- for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != NULL; stream = stream->next())
+ for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != nullptr; stream = stream->next())
if (&stream->device() == &m_device)
outputs += stream->output_count();
return outputs;
@@ -125,7 +125,7 @@ sound_stream *device_sound_interface::input_to_stream_input(int inputnum, int &s
assert(inputnum >= 0);
// scan the list looking for streams owned by this device
- for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != NULL; stream = stream->next())
+ for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != nullptr; stream = stream->next())
if (&stream->device() == &m_device)
{
if (inputnum < stream->input_count())
@@ -137,7 +137,7 @@ sound_stream *device_sound_interface::input_to_stream_input(int inputnum, int &s
}
// not found
- return NULL;
+ return nullptr;
}
@@ -152,7 +152,7 @@ sound_stream *device_sound_interface::output_to_stream_output(int outputnum, int
assert(outputnum >= 0);
// scan the list looking for streams owned by this device
- for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != NULL; stream = stream->next())
+ for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != nullptr; stream = stream->next())
if (&stream->device() == &device())
{
if (outputnum < stream->output_count())
@@ -164,7 +164,7 @@ sound_stream *device_sound_interface::output_to_stream_output(int outputnum, int
}
// not found
- return NULL;
+ return nullptr;
}
@@ -177,7 +177,7 @@ void device_sound_interface::set_input_gain(int inputnum, float gain)
{
int stream_inputnum;
sound_stream *stream = input_to_stream_input(inputnum, stream_inputnum);
- if (stream != NULL)
+ if (stream != nullptr)
stream->set_input_gain(stream_inputnum, gain);
}
@@ -192,7 +192,7 @@ void device_sound_interface::set_output_gain(int outputnum, float gain)
// handle ALL_OUTPUTS as a special case
if (outputnum == ALL_OUTPUTS)
{
- for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != NULL; stream = stream->next())
+ for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != nullptr; stream = stream->next())
if (&stream->device() == &device())
for (int num = 0; num < stream->output_count(); num++)
stream->set_output_gain(num, gain);
@@ -203,7 +203,7 @@ void device_sound_interface::set_output_gain(int outputnum, float gain)
{
int stream_outputnum;
sound_stream *stream = output_to_stream_output(outputnum, stream_outputnum);
- if (stream != NULL)
+ if (stream != nullptr)
stream->set_output_gain(stream_outputnum, gain);
}
}
@@ -217,7 +217,7 @@ void device_sound_interface::set_output_gain(int outputnum, float gain)
int device_sound_interface::inputnum_from_device(device_t &source_device, int outputnum) const
{
int overall = 0;
- for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != NULL; stream = stream->next())
+ for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != nullptr; stream = stream->next())
if (&stream->device() == &device())
for (int inputnum = 0; inputnum < stream->input_count(); inputnum++, overall++)
if (stream->input_source_device(inputnum) == &source_device && stream->input_source_outputnum(inputnum) == outputnum)
@@ -235,16 +235,16 @@ int device_sound_interface::inputnum_from_device(device_t &source_device, int ou
void device_sound_interface::interface_validity_check(validity_checker &valid) const
{
// loop over all the routes
- for (const sound_route *route = first_route(); route != NULL; route = route->next())
+ for (const sound_route *route = first_route(); route != nullptr; route = route->next())
{
// find a device with the requested tag
const device_t *target = device().siblingdevice(route->m_target.c_str());
- if (target == NULL)
+ if (target == nullptr)
osd_printf_error("Attempting to route sound to non-existant device '%s'\n", route->m_target.c_str());
// if it's not a speaker or a sound device, error
const device_sound_interface *sound;
- if (target != NULL && target->type() != SPEAKER && !target->interface(sound))
+ if (target != nullptr && target->type() != SPEAKER && !target->interface(sound))
osd_printf_error("Attempting to route sound to a non-sound device '%s' (%s)\n", route->m_target.c_str(), target->name());
}
}
@@ -259,10 +259,10 @@ void device_sound_interface::interface_pre_start()
{
// scan all the sound devices
sound_interface_iterator iter(m_device.machine().root_device());
- for (device_sound_interface *sound = iter.first(); sound != NULL; sound = iter.next())
+ for (device_sound_interface *sound = iter.first(); sound != nullptr; sound = iter.next())
{
// scan each route on the device
- for (const sound_route *route = sound->first_route(); route != NULL; route = route->next())
+ for (const sound_route *route = sound->first_route(); route != nullptr; route = route->next())
{
// see if we are the target of this route; if we are, make sure the source device is started
device_t *target_device = sound->device().siblingdevice(route->m_target.c_str());
@@ -273,10 +273,10 @@ void device_sound_interface::interface_pre_start()
// now iterate through devices again and assign any auto-allocated inputs
m_auto_allocated_inputs = 0;
- for (device_sound_interface *sound = iter.first(); sound != NULL; sound = iter.next())
+ for (device_sound_interface *sound = iter.first(); sound != nullptr; sound = iter.next())
{
// scan each route on the device
- for (const sound_route *route = sound->first_route(); route != NULL; route = route->next())
+ for (const sound_route *route = sound->first_route(); route != nullptr; route = route->next())
{
// see if we are the target of this route
device_t *target_device = sound->device().siblingdevice(route->m_target.c_str());
@@ -299,10 +299,10 @@ void device_sound_interface::interface_post_start()
{
// iterate over all the sound devices
sound_interface_iterator iter(m_device.machine().root_device());
- for (device_sound_interface *sound = iter.first(); sound != NULL; sound = iter.next())
+ for (device_sound_interface *sound = iter.first(); sound != nullptr; sound = iter.next())
{
// scan each route on the device
- for (const sound_route *route = sound->first_route(); route != NULL; route = route->next())
+ for (const sound_route *route = sound->first_route(); route != nullptr; route = route->next())
{
// if we are the target of this route, hook it up
device_t *target_device = sound->device().siblingdevice(route->m_target.c_str());
@@ -317,13 +317,13 @@ void device_sound_interface::interface_post_start()
// find the output stream to connect from
int streamoutputnum;
sound_stream *outputstream = sound->output_to_stream_output(outputnum, streamoutputnum);
- if (outputstream == NULL)
+ if (outputstream == nullptr)
fatalerror("Sound device '%s' specifies route for non-existant output #%d\n", route->m_target.c_str(), outputnum);
// find the input stream to connect to
int streaminputnum;
sound_stream *inputstream = input_to_stream_input(inputnum++, streaminputnum);
- if (inputstream == NULL)
+ if (inputstream == nullptr)
fatalerror("Sound device '%s' targeted output #%d to non-existant device '%s' input %d\n", route->m_target.c_str(), outputnum, m_device.tag(), inputnum - 1);
// set the input
@@ -343,7 +343,7 @@ void device_sound_interface::interface_post_start()
void device_sound_interface::interface_pre_reset()
{
// update all streams on this device prior to reset
- for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != NULL; stream = stream->next())
+ for (sound_stream *stream = m_device.machine().sound().first_stream(); stream != nullptr; stream = stream->next())
if (&stream->device() == &device())
stream->update();
}
@@ -359,7 +359,7 @@ void device_sound_interface::interface_pre_reset()
//-------------------------------------------------
device_sound_interface::sound_route::sound_route(int output, int input, float gain, const char *target, UINT32 mixoutput)
- : m_next(NULL),
+ : m_next(nullptr),
m_output(output),
m_input(input),
m_mixoutput(mixoutput),
@@ -381,7 +381,7 @@ device_sound_interface::sound_route::sound_route(int output, int input, float ga
device_mixer_interface::device_mixer_interface(const machine_config &mconfig, device_t &device, int outputs)
: device_sound_interface(mconfig, device),
m_outputs(outputs),
- m_mixer_stream(NULL)
+ m_mixer_stream(nullptr)
{
}
@@ -417,8 +417,8 @@ void device_mixer_interface::interface_pre_start()
// iterate through all routes that point to us and note their mixer output
sound_interface_iterator iter(m_device.machine().root_device());
- for (device_sound_interface *sound = iter.first(); sound != NULL; sound = iter.next())
- for (const sound_route *route = sound->first_route(); route != NULL; route = route->next())
+ for (device_sound_interface *sound = iter.first(); sound != nullptr; sound = iter.next())
+ for (const sound_route *route = sound->first_route(); route != nullptr; route = route->next())
{
// see if we are the target of this route
device_t *target_device = sound->device().siblingdevice(route->m_target.c_str());
diff --git a/src/emu/disound.h b/src/emu/disound.h
index 949d03ce29e..7f6f6868b98 100644
--- a/src/emu/disound.h
+++ b/src/emu/disound.h
@@ -111,10 +111,10 @@ public:
protected:
// optional operation overrides
- virtual void interface_validity_check(validity_checker &valid) const;
- virtual void interface_pre_start();
- virtual void interface_post_start();
- virtual void interface_pre_reset();
+ virtual void interface_validity_check(validity_checker &valid) const override;
+ virtual void interface_pre_start() override;
+ virtual void interface_post_start() override;
+ virtual void interface_pre_reset() override;
// internal state
simple_list<sound_route> m_route_list; // list of sound routes
@@ -138,11 +138,11 @@ public:
protected:
// optional operation overrides
- virtual void interface_pre_start();
- virtual void interface_post_load();
+ virtual void interface_pre_start() override;
+ virtual void interface_post_load() override;
// sound interface overrides
- virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
+ virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
// internal state
UINT8 m_outputs; // number of outputs
diff --git a/src/emu/dispatch.h b/src/emu/dispatch.h
index 02e3108b8c3..f9442a658da 100644
--- a/src/emu/dispatch.h
+++ b/src/emu/dispatch.h
@@ -28,26 +28,26 @@ public:
devcb_line_dispatch_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
void init_fwd() {
- for(int i=0; i<N; i++)
- fwd_cb[i] = new devcb_write_line(*this);
+ for(auto & elem : fwd_cb)
+ elem = new devcb_write_line(*this);
}
virtual ~devcb_line_dispatch_device() {
- for(int i=0; i<N; i++)
- delete fwd_cb[i];
+ for(auto & elem : fwd_cb)
+ delete elem;
}
template<class _Object> static devcb_base &set_fwd_cb(device_t &device, int entry, _Object object) { return downcast<devcb_line_dispatch_device<N> &>(device).fwd_cb[entry]->set_callback(object); }
WRITE_LINE_MEMBER( in_w ) {
- for(int i=0; i<N; i++)
- (*(fwd_cb[i]))(state);
+ for(auto & elem : fwd_cb)
+ (*(elem))(state);
}
protected:
- virtual void device_start() {
- for(int i=0; i<N; i++)
- fwd_cb[i]->resolve_safe();
+ virtual void device_start() override {
+ for(auto & elem : fwd_cb)
+ elem->resolve_safe();
}
private:
diff --git a/src/emu/distate.cpp b/src/emu/distate.cpp
index 450fe412259..77ed3307946 100644
--- a/src/emu/distate.cpp
+++ b/src/emu/distate.cpp
@@ -51,7 +51,7 @@ const UINT64 device_state_entry::k_decimal_divisor[] =
device_state_entry::device_state_entry(int index, const char *symbol, void *dataptr, UINT8 size, device_state_interface *dev)
: m_device_state(dev),
- m_next(NULL),
+ m_next(nullptr),
m_index(index),
m_dataptr(dataptr),
m_datamask(0),
@@ -89,9 +89,9 @@ device_state_entry::device_state_entry(int index, const char *symbol, void *data
device_state_entry::device_state_entry(int index, device_state_interface *dev)
: m_device_state(dev),
- m_next(NULL),
+ m_next(nullptr),
m_index(index),
- m_dataptr(NULL),
+ m_dataptr(nullptr),
m_datamask(0),
m_datasize(0),
m_flags(DSF_DIVIDER),
@@ -114,7 +114,7 @@ device_state_entry &device_state_entry::formatstr(const char *_format)
// set the DSF_CUSTOM_STRING flag by formatting with a NULL string
m_flags &= ~DSF_CUSTOM_STRING;
std::string dummy;
- format(dummy, NULL);
+ format(dummy, nullptr);
return *this;
}
@@ -321,7 +321,7 @@ std::string &device_state_entry::format(std::string &dest, const char *string, b
case 's':
if (width == 0)
throw emu_fatalerror("Width required for %%s formats\n");
- if (string == NULL)
+ if (string == nullptr)
{
const_cast<device_state_entry *>(this)->m_flags |= DSF_CUSTOM_STRING;
return dest;
@@ -419,7 +419,7 @@ UINT64 device_state_interface::state_int(int index)
{
// NULL or out-of-range entry returns 0
const device_state_entry *entry = state_find_entry(index);
- if (entry == NULL)
+ if (entry == nullptr)
return 0;
// call the exporter before we do anything
@@ -440,7 +440,7 @@ std::string &device_state_interface::state_string(int index, std::string &dest)
{
// NULL or out-of-range entry returns bogus string
const device_state_entry *entry = state_find_entry(index);
- if (entry == NULL)
+ if (entry == nullptr)
return dest.assign("???");
// get the custom string if needed
@@ -462,7 +462,7 @@ int device_state_interface::state_string_max_length(int index)
{
// NULL or out-of-range entry returns bogus string
const device_state_entry *entry = state_find_entry(index);
- if (entry == NULL)
+ if (entry == nullptr)
return 3;
// ask the entry to format itself maximally
@@ -480,7 +480,7 @@ void device_state_interface::set_state_int(int index, UINT64 value)
{
// NULL or out-of-range entry is a no-op
const device_state_entry *entry = state_find_entry(index);
- if (entry == NULL)
+ if (entry == nullptr)
return;
// set the value
@@ -501,7 +501,7 @@ void device_state_interface::set_state_string(int index, const char *string)
{
// NULL or out-of-range entry is a no-op
const device_state_entry *entry = state_find_entry(index);
- if (entry == NULL)
+ if (entry == nullptr)
return;
// set the value
@@ -522,10 +522,10 @@ device_state_entry &device_state_interface::state_add(int index, const char *sym
{
// assert validity of incoming parameters
assert(size == 1 || size == 2 || size == 4 || size == 8);
- assert(symbol != NULL);
+ assert(symbol != nullptr);
// allocate new entry
- device_state_entry *entry = global_alloc(device_state_entry(index, symbol, data, size, this));
+ auto entry = global_alloc(device_state_entry(index, symbol, data, size, this));
// append to the end of the list
m_state_list.append(*entry);
@@ -545,7 +545,7 @@ device_state_entry &device_state_interface::state_add(int index, const char *sym
device_state_entry &device_state_interface::state_add_divider(int index)
{
// allocate new entry
- device_state_entry *entry = global_alloc(device_state_entry(index, this));
+ auto entry = global_alloc(device_state_entry(index, this));
// append to the end of the list
m_state_list.append(*entry);
@@ -622,10 +622,10 @@ const device_state_entry *device_state_interface::state_find_entry(int index)
return m_fast_state[index - FAST_STATE_MIN];
// otherwise, scan the first
- for (const device_state_entry *entry = m_state_list.first(); entry != NULL; entry = entry->m_next)
+ for (const device_state_entry *entry = m_state_list.first(); entry != nullptr; entry = entry->m_next)
if (entry->m_index == index)
return entry;
// handle failure by returning NULL
- return NULL;
+ return nullptr;
}
diff --git a/src/emu/distate.h b/src/emu/distate.h
index b8adb436f1c..f762bd9fb13 100644
--- a/src/emu/distate.h
+++ b/src/emu/distate.h
@@ -166,7 +166,7 @@ protected:
virtual void state_string_export(const device_state_entry &entry, std::string &str);
// internal operation overrides
- virtual void interface_post_start();
+ virtual void interface_post_start() override;
// find the entry for a given index
const device_state_entry *state_find_entry(int index);
@@ -197,7 +197,7 @@ typedef device_interface_iterator<device_state_interface> state_interface_iterat
inline offs_t device_t::safe_pc() const
{
- return (m_state != NULL) ? m_state->pc() : 0;
+ return (m_state != nullptr) ? m_state->pc() : 0;
}
@@ -208,7 +208,7 @@ inline offs_t device_t::safe_pc() const
inline offs_t device_t::safe_pcbase() const
{
- return (m_state != NULL) ? m_state->pcbase() : 0;
+ return (m_state != nullptr) ? m_state->pcbase() : 0;
}
diff --git a/src/emu/divideo.cpp b/src/emu/divideo.cpp
index 82433d93e88..2ba4d117a28 100644
--- a/src/emu/divideo.cpp
+++ b/src/emu/divideo.cpp
@@ -27,7 +27,7 @@ device_video_interface::device_video_interface(const machine_config &mconfig, de
: device_interface(device, "video"),
m_screen_required(screen_required),
m_screen_tag(s_unconfigured_screen_tag),
- m_screen(NULL)
+ m_screen(nullptr)
{
}
@@ -65,14 +65,14 @@ void device_video_interface::static_set_screen(device_t &device, const char *tag
void device_video_interface::interface_validity_check(validity_checker &valid) const
{
// only look up screens if we haven't explicitly requested no screen
- screen_device *screen = NULL;
- if (m_screen_tag != NULL)
+ screen_device *screen = nullptr;
+ if (m_screen_tag != nullptr)
{
// find the screen device if explicitly configured
if (strcmp(m_screen_tag, s_unconfigured_screen_tag) != 0)
{
screen = device().siblingdevice<screen_device>(m_screen_tag);
- if (screen == NULL)
+ if (screen == nullptr)
osd_printf_error("Screen '%s' not found, explicitly set for device '%s'\n", m_screen_tag, device().tag());
}
@@ -81,13 +81,13 @@ void device_video_interface::interface_validity_check(validity_checker &valid) c
{
screen_device_iterator iter(device().mconfig().root_device());
screen = iter.first();
- if (iter.next() != NULL)
+ if (iter.next() != nullptr)
osd_printf_error("No screen specified for device '%s', but multiple screens found\n", device().tag());
}
}
// error if no screen is found
- if (screen == NULL && m_screen_required)
+ if (screen == nullptr && m_screen_required)
osd_printf_error("Device '%s' requires a screen\n", device().tag());
}
@@ -100,13 +100,13 @@ void device_video_interface::interface_validity_check(validity_checker &valid) c
void device_video_interface::interface_pre_start()
{
// only look up screens if we haven't explicitly requested no screen
- if (m_screen_tag != NULL)
+ if (m_screen_tag != nullptr)
{
// find the screen device if explicitly configured
if (strcmp(m_screen_tag, s_unconfigured_screen_tag) != 0)
{
m_screen = device().siblingdevice<screen_device>(m_screen_tag);
- if (m_screen == NULL)
+ if (m_screen == nullptr)
throw emu_fatalerror("Screen '%s' not found, explicitly set for device '%s'", m_screen_tag, device().tag());
}
@@ -115,16 +115,16 @@ void device_video_interface::interface_pre_start()
{
screen_device_iterator iter(device().machine().root_device());
m_screen = iter.first();
- if (iter.next() != NULL)
+ if (iter.next() != nullptr)
throw emu_fatalerror("No screen specified for device '%s', but multiple screens found", device().tag());
}
}
// fatal error if no screen is found
- if (m_screen == NULL && m_screen_required)
+ if (m_screen == nullptr && m_screen_required)
throw emu_fatalerror("Device '%s' requires a screen", device().tag());
// if we have a screen and it's not started, wait for it
- if (m_screen != NULL && !m_screen->started())
+ if (m_screen != nullptr && !m_screen->started())
throw device_missing_dependencies();
}
diff --git a/src/emu/divideo.h b/src/emu/divideo.h
index 4057ef083c3..e50a1b5df08 100644
--- a/src/emu/divideo.h
+++ b/src/emu/divideo.h
@@ -50,8 +50,8 @@ public:
protected:
// optional operation overrides
- virtual void interface_validity_check(validity_checker &valid) const;
- virtual void interface_pre_start();
+ virtual void interface_validity_check(validity_checker &valid) const override;
+ virtual void interface_pre_start() override;
// configuration state
bool m_screen_required; // is a screen required?
diff --git a/src/emu/drawgfx.cpp b/src/emu/drawgfx.cpp
index 1c8a863bc84..2da798bfa97 100644
--- a/src/emu/drawgfx.cpp
+++ b/src/emu/drawgfx.cpp
@@ -87,7 +87,7 @@ gfxdecode_device::gfxdecode_device(const machine_config &mconfig, const char *ta
//-------------------------------------------------
gfx_element::gfx_element()
- : m_palette(NULL),
+ : m_palette(nullptr),
m_width(0),
m_height(0),
m_startx(0),
@@ -101,9 +101,9 @@ gfx_element::gfx_element()
m_total_colors(0),
m_line_modulo(0),
m_char_modulo(0),
- m_srcdata(NULL),
+ m_srcdata(nullptr),
m_dirtyseq(1),
- m_gfxdata(NULL),
+ m_gfxdata(nullptr),
m_layout_is_raw(false),
m_layout_planes(0),
m_layout_xormask(0),
@@ -151,9 +151,9 @@ gfx_element::gfx_element(palette_device *palette, const gfx_layout &gl, const UI
m_total_colors(total_colors),
m_line_modulo(0),
m_char_modulo(0),
- m_srcdata(NULL),
+ m_srcdata(nullptr),
m_dirtyseq(1),
- m_gfxdata(NULL),
+ m_gfxdata(nullptr),
m_layout_is_raw(false),
m_layout_planes(0),
m_layout_xormask(xormask),
@@ -198,7 +198,7 @@ void gfx_element::set_layout(const gfx_layout &gl, const UINT8 *srcdata)
m_char_modulo = gl.charincrement / 8;
// RAW graphics must have a pointer up front
- assert(srcdata != NULL);
+ assert(srcdata != nullptr);
m_gfxdata = const_cast<UINT8 *>(srcdata);
}
@@ -573,7 +573,7 @@ void gfx_element::transtable(bitmap_ind16 &dest, const rectangle &cliprect,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
const UINT8 *pentable)
{
- assert(pentable != NULL);
+ assert(pentable != nullptr);
// render
color = colorbase() + granularity() * (color % colors());
@@ -587,7 +587,7 @@ void gfx_element::transtable(bitmap_rgb32 &dest, const rectangle &cliprect,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
const UINT8 *pentable)
{
- assert(pentable != NULL);
+ assert(pentable != nullptr);
// render
const pen_t *paldata = m_palette->pens() + colorbase() + granularity() * (color % colors());
@@ -859,7 +859,7 @@ void gfx_element::zoom_transtable(bitmap_ind16 &dest, const rectangle &cliprect,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 scalex, UINT32 scaley, const UINT8 *pentable)
{
- assert(pentable != NULL);
+ assert(pentable != nullptr);
// non-zoom case
if (scalex == 0x10000 && scaley == 0x10000)
@@ -877,7 +877,7 @@ void gfx_element::zoom_transtable(bitmap_rgb32 &dest, const rectangle &cliprect,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
UINT32 scalex, UINT32 scaley, const UINT8 *pentable)
{
- assert(pentable != NULL);
+ assert(pentable != nullptr);
// non-zoom case
if (scalex == 0x10000 && scaley == 0x10000)
@@ -1144,7 +1144,7 @@ void gfx_element::prio_transtable(bitmap_ind16 &dest, const rectangle &cliprect,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
bitmap_ind8 &priority, UINT32 pmask, const UINT8 *pentable)
{
- assert(pentable != NULL);
+ assert(pentable != nullptr);
// high bit of the mask is implicitly on
pmask |= 1 << 31;
@@ -1160,7 +1160,7 @@ void gfx_element::prio_transtable(bitmap_rgb32 &dest, const rectangle &cliprect,
UINT32 code, UINT32 color, int flipx, int flipy, INT32 destx, INT32 desty,
bitmap_ind8 &priority, UINT32 pmask, const UINT8 *pentable)
{
- assert(pentable != NULL);
+ assert(pentable != nullptr);
// high bit of the mask is implicitly on
pmask |= 1 << 31;
@@ -1465,7 +1465,7 @@ void gfx_element::prio_zoom_transtable(bitmap_ind16 &dest, const rectangle &clip
UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask,
const UINT8 *pentable)
{
- assert(pentable != NULL);
+ assert(pentable != nullptr);
// non-zoom case
if (scalex == 0x10000 && scaley == 0x10000)
@@ -1486,7 +1486,7 @@ void gfx_element::prio_zoom_transtable(bitmap_rgb32 &dest, const rectangle &clip
UINT32 scalex, UINT32 scaley, bitmap_ind8 &priority, UINT32 pmask,
const UINT8 *pentable)
{
- assert(pentable != NULL);
+ assert(pentable != nullptr);
// non-zoom case
if (scalex == 0x10000 && scaley == 0x10000)
@@ -1680,7 +1680,7 @@ void gfx_element::alphastore(bitmap_rgb32 &dest, const rectangle &cliprect,
assert(dest.bpp() == 32);
assert(dest.format() == BITMAP_FORMAT_ARGB32);
- assert(alphatable != NULL);
+ assert(alphatable != nullptr);
/* if we have a fixed alpha, call the standard drawgfx_transpen */
if (fixedalpha == 0xff)
@@ -1730,7 +1730,7 @@ void gfx_element::alphatable(bitmap_rgb32 &dest, const rectangle &cliprect,
}
assert(dest.bpp() == 32);
- assert(alphatable != NULL);
+ assert(alphatable != nullptr);
/* get final code and color, and grab lookup tables */
code %= elements();
@@ -1759,7 +1759,7 @@ void draw_scanline8(bitmap_ind16 &bitmap, INT32 destx, INT32 desty, INT32 length
DECLARE_NO_PRIORITY;
// palette lookup case
- if (paldata != NULL)
+ if (paldata != nullptr)
DRAWSCANLINE_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
// raw copy case
@@ -1772,7 +1772,7 @@ void draw_scanline8(bitmap_rgb32 &bitmap, INT32 destx, INT32 desty, INT32 length
DECLARE_NO_PRIORITY;
// palette lookup case
- if (paldata != NULL)
+ if (paldata != nullptr)
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
// raw copy case
@@ -1791,7 +1791,7 @@ void draw_scanline16(bitmap_ind16 &bitmap, INT32 destx, INT32 desty, INT32 lengt
DECLARE_NO_PRIORITY;
// palette lookup case
- if (paldata != NULL)
+ if (paldata != nullptr)
DRAWSCANLINE_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
// raw copy case
@@ -1804,7 +1804,7 @@ void draw_scanline16(bitmap_rgb32 &bitmap, INT32 destx, INT32 desty, INT32 lengt
DECLARE_NO_PRIORITY;
// palette lookup case
- if (paldata != NULL)
+ if (paldata != nullptr)
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
// raw copy case
@@ -1823,7 +1823,7 @@ void draw_scanline32(bitmap_ind16 &bitmap, INT32 destx, INT32 desty, INT32 lengt
DECLARE_NO_PRIORITY;
// palette lookup case
- if (paldata != NULL)
+ if (paldata != nullptr)
DRAWSCANLINE_CORE(UINT16, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
// raw copy case
@@ -1836,7 +1836,7 @@ void draw_scanline32(bitmap_rgb32 &bitmap, INT32 destx, INT32 desty, INT32 lengt
DECLARE_NO_PRIORITY;
// palette lookup case
- if (paldata != NULL)
+ if (paldata != nullptr)
DRAWSCANLINE_CORE(UINT32, PIXEL_OP_REMAP_OPAQUE, NO_PRIORITY);
// raw copy case
@@ -1986,10 +1986,10 @@ static inline void copyscrollbitmap_trans_common(_BitmapClass &dest, _BitmapClas
if (numrows == 0 && numcols == 0)
return copybitmap_trans(dest, src, 0, 0, 0, 0, cliprect, trans_pen);
- assert(numrows != 0 || rowscroll == NULL);
- assert(numrows == 0 || rowscroll != NULL);
- assert(numcols != 0 || colscroll == NULL);
- assert(numcols == 0 || colscroll != NULL);
+ assert(numrows != 0 || rowscroll == nullptr);
+ assert(numrows == 0 || rowscroll != nullptr);
+ assert(numcols != 0 || colscroll == nullptr);
+ assert(numcols == 0 || colscroll != nullptr);
// fully scrolling X,Y playfield
if (numrows <= 1 && numcols <= 1)
diff --git a/src/emu/drawgfx.h b/src/emu/drawgfx.h
index 1bc1cd0124c..a8be4a5f286 100644
--- a/src/emu/drawgfx.h
+++ b/src/emu/drawgfx.h
@@ -455,7 +455,7 @@ public:
gfxdecode_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
protected:
- virtual void device_start() {};
+ virtual void device_start() override {};
};
GFXDECODE_EXTERN(empty);
diff --git a/src/emu/drivenum.cpp b/src/emu/drivenum.cpp
index b504366f12d..99d3498c6a4 100644
--- a/src/emu/drivenum.cpp
+++ b/src/emu/drivenum.cpp
@@ -35,7 +35,7 @@ driver_list::driver_list()
int driver_list::find(const char *name)
{
// if no name, bail
- if (name == NULL)
+ if (name == nullptr)
return -1;
// create a dummy item for comparison purposes
@@ -45,7 +45,7 @@ int driver_list::find(const char *name)
// binary search to find it
const game_driver **result = reinterpret_cast<const game_driver **>(bsearch(&driverptr, s_drivers_sorted, s_driver_count, sizeof(*s_drivers_sorted), driver_sort_callback));
- return (result == NULL) ? -1 : result - s_drivers_sorted;
+ return (result == nullptr) ? -1 : result - s_drivers_sorted;
}
@@ -57,11 +57,11 @@ int driver_list::find(const char *name)
bool driver_list::matches(const char *wildstring, const char *string)
{
// can only match internal drivers if the wildstring starts with an underscore
- if (string[0] == '_' && (wildstring == NULL || wildstring[0] != '_'))
+ if (string[0] == '_' && (wildstring == nullptr || wildstring[0] != '_'))
return false;
// match everything else normally
- return (wildstring == NULL || core_strwildcmp(wildstring, string) == 0);
+ return (wildstring == nullptr || core_strwildcmp(wildstring, string) == 0);
}
@@ -187,9 +187,17 @@ machine_config &driver_enumerator::config(int index, emu_options &options) const
assert(index >= 0 && index < s_driver_count);
// if we don't have it cached, add it
- if (m_config[index] == NULL)
+ if (m_config[index] == nullptr)
{
+ // if our cache is full, release the head entry
+ if (m_config_cache.size() == CONFIG_CACHE_COUNT)
+ {
+ int first = m_config_cache.front();
+ m_config[first] = nullptr;
+ m_config_cache.erase(m_config_cache.begin());
+ }
m_config[index] = std::make_unique<machine_config>(*s_drivers_sorted[index], options);
+ m_config_cache.push_back(index);
}
return *m_config[index];
}
@@ -307,7 +315,7 @@ void driver_enumerator::find_approximate_matches(const char *string, int count,
#undef rand
// if no name, pick random entries
- if (string == NULL || string[0] == 0)
+ if (string == nullptr || string[0] == 0)
{
// seed the RNG first
srand(osd_ticks());
@@ -392,11 +400,11 @@ void driver_enumerator::release_current() const
return;
// skip if we haven't cached a config
- if (m_config[m_current] == NULL)
+ if (m_config[m_current] == nullptr)
return;
// iterate over software lists in this entry and reset
software_list_device_iterator deviter(m_config[m_current]->root_device());
- for (software_list_device *swlistdev = deviter.first(); swlistdev != NULL; swlistdev = deviter.next())
+ for (software_list_device *swlistdev = deviter.first(); swlistdev != nullptr; swlistdev = deviter.next())
swlistdev->release();
}
diff --git a/src/emu/drivenum.h b/src/emu/drivenum.h
index 91dc1e711f7..e3bf3117861 100644
--- a/src/emu/drivenum.h
+++ b/src/emu/drivenum.h
@@ -103,7 +103,7 @@ public:
using driver_list::compatible_with;
// filtering/iterating
- int filter(const char *string = NULL);
+ int filter(const char *string = nullptr);
int filter(const game_driver &driver);
void include_all();
void exclude_all() { memset(&m_included[0], 0, sizeof(m_included[0]) * s_driver_count); m_filtered_count = 0; }
@@ -119,12 +119,15 @@ private:
// internal helpers
void release_current() const;
+ static const int CONFIG_CACHE_COUNT = 100;
+
// internal state
int m_current;
int m_filtered_count;
emu_options & m_options;
std::vector<UINT8> m_included;
mutable std::vector<std::unique_ptr<machine_config>> m_config;
+ mutable std::vector<int> m_config_cache;
};
#endif
diff --git a/src/emu/driver.cpp b/src/emu/driver.cpp
index 377d82c05c9..ee4ec8bebdb 100644
--- a/src/emu/driver.cpp
+++ b/src/emu/driver.cpp
@@ -33,10 +33,10 @@ ADDRESS_MAP_END
//-------------------------------------------------
driver_device::driver_device(const machine_config &mconfig, device_type type, const char *tag)
- : device_t(mconfig, type, "Driver Device", tag, NULL, 0, "", __FILE__),
+ : device_t(mconfig, type, "Driver Device", tag, nullptr, 0, "", __FILE__),
device_memory_interface(mconfig, *this),
- m_space_config("generic", ENDIANNESS_LITTLE, 8, 32, 0, NULL, *ADDRESS_MAP_NAME(generic)),
- m_system(NULL),
+ m_space_config("generic", ENDIANNESS_LITTLE, 8, 32, 0, nullptr, *ADDRESS_MAP_NAME(generic)),
+ m_system(nullptr),
m_latch_clear_value(0),
m_flip_screen_x(0),
m_flip_screen_y(0)
@@ -202,12 +202,12 @@ void driver_device::device_start()
{
// reschedule ourselves to be last
device_iterator iter(*this);
- for (device_t *test = iter.first(); test != NULL; test = iter.next())
+ for (device_t *test = iter.first(); test != nullptr; test = iter.next())
if (test != this && !test->started())
throw device_missing_dependencies();
// call the game-specific init
- if (m_system->driver_init != NULL)
+ if (m_system->driver_init != nullptr)
(*m_system->driver_init)(machine());
// finish image devices init process
@@ -274,7 +274,7 @@ void driver_device::device_reset_after_children()
const address_space_config *driver_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
diff --git a/src/emu/driver.h b/src/emu/driver.h
index fc3e389a7ce..9a122bbdf42 100644
--- a/src/emu/driver.h
+++ b/src/emu/driver.h
@@ -106,7 +106,7 @@ public:
virtual ~driver_device();
// getters
- const game_driver &system() const { assert(m_system != NULL); return *m_system; }
+ const game_driver &system() const { assert(m_system != nullptr); return *m_system; }
// indexes into our generic callbacks
enum callback_type
@@ -247,13 +247,13 @@ protected:
virtual void video_reset();
// device-level overrides
- virtual const rom_entry *device_rom_region() const;
- virtual ioport_constructor device_input_ports() const;
- virtual void device_start();
- virtual void device_reset_after_children();
+ virtual const rom_entry *device_rom_region() const override;
+ virtual ioport_constructor device_input_ports() const override;
+ virtual void device_start() override;
+ virtual void device_reset_after_children() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const;
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
private:
// helpers
void irq_pulse_clear(void *ptr, INT32 param);
@@ -282,7 +282,7 @@ private:
template<class _DriverClass>
device_t *driver_device_creator(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
{
- assert(owner == NULL);
+ assert(owner == nullptr);
assert(clock == 0);
return global_alloc_clear(_DriverClass(mconfig, &driver_device_creator<_DriverClass>, tag));
}
diff --git a/src/emu/drivers/empty.cpp b/src/emu/drivers/empty.cpp
index 215af57190b..9c48a6c8b26 100644
--- a/src/emu/drivers/empty.cpp
+++ b/src/emu/drivers/empty.cpp
@@ -26,7 +26,7 @@ public:
{
}
- virtual void machine_start()
+ virtual void machine_start() override
{
// force the UI to show the game select screen
ui_menu_select_game::force_game_select(machine(), &machine().render().ui_container());
diff --git a/src/emu/drivers/testcpu.cpp b/src/emu/drivers/testcpu.cpp
index 4ee9e30271c..51bfa457694 100644
--- a/src/emu/drivers/testcpu.cpp
+++ b/src/emu/drivers/testcpu.cpp
@@ -33,12 +33,12 @@ public:
: driver_device(mconfig, type, tag),
m_cpu(*this, "maincpu"),
m_ram(*this, "ram"),
- m_space(NULL)
+ m_space(nullptr)
{
}
// timer callback; used to wrest control of the system
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override
{
static const UINT32 sample_instructions[] =
{
@@ -52,11 +52,11 @@ public:
};
// iterate over instructions
- for (int instnum = 0; instnum < ARRAY_LENGTH(sample_instructions); instnum++)
+ for (auto & sample_instruction : sample_instructions)
{
// write the instruction to execute, followed by a BLR which will terminate the
// basic block in the DRC
- m_space->write_dword(RAM_BASE, sample_instructions[instnum]);
+ m_space->write_dword(RAM_BASE, sample_instruction);
m_space->write_dword(RAM_BASE + 4, 0x4e800020);
// initialize the register state
@@ -92,7 +92,7 @@ public:
}
// startup code; do basic configuration and set a timer to go off immediately
- virtual void machine_start()
+ virtual void machine_start() override
{
// find the CPU's address space
m_space = &m_cpu->space(AS_PROGRAM);
diff --git a/src/emu/emualloc.cpp b/src/emu/emualloc.cpp
index 02642b44922..a43faae522c 100644
--- a/src/emu/emualloc.cpp
+++ b/src/emu/emualloc.cpp
@@ -40,8 +40,8 @@ resource_pool::resource_pool(int hash_size)
: m_hash_size(hash_size),
m_listlock(osd_lock_alloc()),
m_hash(hash_size),
- m_ordered_head(NULL),
- m_ordered_tail(NULL)
+ m_ordered_head(nullptr),
+ m_ordered_tail(nullptr)
{
memset(&m_hash[0], 0, hash_size*sizeof(m_hash[0]));
}
@@ -56,7 +56,7 @@ resource_pool::resource_pool(int hash_size)
resource_pool::~resource_pool()
{
clear();
- if (m_listlock != NULL)
+ if (m_listlock != nullptr)
osd_lock_free(m_listlock);
}
@@ -82,15 +82,15 @@ void resource_pool::add(resource_pool_item &item, size_t size, const char *type)
// find the entry to insert after
resource_pool_item *insert_after;
- for (insert_after = m_ordered_tail; insert_after != NULL; insert_after = insert_after->m_ordered_prev)
+ for (insert_after = m_ordered_tail; insert_after != nullptr; insert_after = insert_after->m_ordered_prev)
if (insert_after->m_id < item.m_id)
break;
// insert into the appropriate spot
- if (insert_after != NULL)
+ if (insert_after != nullptr)
{
item.m_ordered_next = insert_after->m_ordered_next;
- if (item.m_ordered_next != NULL)
+ if (item.m_ordered_next != nullptr)
item.m_ordered_next->m_ordered_prev = &item;
else
m_ordered_tail = &item;
@@ -100,11 +100,11 @@ void resource_pool::add(resource_pool_item &item, size_t size, const char *type)
else
{
item.m_ordered_next = m_ordered_head;
- if (item.m_ordered_next != NULL)
+ if (item.m_ordered_next != nullptr)
item.m_ordered_next->m_ordered_prev = &item;
else
m_ordered_tail = &item;
- item.m_ordered_prev = NULL;
+ item.m_ordered_prev = nullptr;
m_ordered_head = &item;
}
@@ -120,14 +120,14 @@ void resource_pool::add(resource_pool_item &item, size_t size, const char *type)
void resource_pool::remove(void *ptr)
{
// ignore NULLs
- if (ptr == NULL)
+ if (ptr == nullptr)
return;
// search for the item
osd_lock_acquire(m_listlock);
int hashval = reinterpret_cast<FPTR>(ptr) % m_hash_size;
- for (resource_pool_item **scanptr = &m_hash[hashval]; *scanptr != NULL; scanptr = &(*scanptr)->m_next)
+ for (resource_pool_item **scanptr = &m_hash[hashval]; *scanptr != nullptr; scanptr = &(*scanptr)->m_next)
// must match the pointer
if ((*scanptr)->m_ptr == ptr)
@@ -137,11 +137,11 @@ void resource_pool::remove(void *ptr)
*scanptr = deleteme->m_next;
// remove from ordered list
- if (deleteme->m_ordered_prev != NULL)
+ if (deleteme->m_ordered_prev != nullptr)
deleteme->m_ordered_prev->m_ordered_next = deleteme->m_ordered_next;
else
m_ordered_head = deleteme->m_ordered_next;
- if (deleteme->m_ordered_next != NULL)
+ if (deleteme->m_ordered_next != nullptr)
deleteme->m_ordered_next->m_ordered_prev = deleteme->m_ordered_prev;
else
m_ordered_tail = deleteme->m_ordered_prev;
@@ -169,7 +169,7 @@ resource_pool_item *resource_pool::find(void *ptr)
int hashval = reinterpret_cast<FPTR>(ptr) % m_hash_size;
resource_pool_item *item;
- for (item = m_hash[hashval]; item != NULL; item = item->m_next)
+ for (item = m_hash[hashval]; item != nullptr; item = item->m_next)
if (item->m_ptr == ptr)
break;
@@ -192,8 +192,8 @@ bool resource_pool::contains(void *_ptrstart, void *_ptrend)
// search for the item
osd_lock_acquire(m_listlock);
- resource_pool_item *item = NULL;
- for (item = m_ordered_head; item != NULL; item = item->m_ordered_next)
+ resource_pool_item *item = nullptr;
+ for (item = m_ordered_head; item != nullptr; item = item->m_ordered_next)
{
UINT8 *objstart = reinterpret_cast<UINT8 *>(item->m_ptr);
UINT8 *objend = objstart + item->m_size;
@@ -204,7 +204,7 @@ bool resource_pool::contains(void *_ptrstart, void *_ptrend)
found:
osd_lock_release(m_listlock);
- return (item != NULL);
+ return (item != nullptr);
}
@@ -218,7 +218,7 @@ void resource_pool::clear()
// important: delete from earliest to latest; this allows objects to clean up after
// themselves if they wish
- while (m_ordered_head != NULL)
+ while (m_ordered_head != nullptr)
remove(m_ordered_head->m_ptr);
osd_lock_release(m_listlock);
diff --git a/src/emu/emualloc.h b/src/emu/emualloc.h
index 3a47180b517..192f1fca85e 100644
--- a/src/emu/emualloc.h
+++ b/src/emu/emualloc.h
@@ -60,9 +60,9 @@ private:
public:
resource_pool_item(void *ptr, size_t size)
- : m_next(NULL),
- m_ordered_next(NULL),
- m_ordered_prev(NULL),
+ : m_next(nullptr),
+ m_ordered_next(nullptr),
+ m_ordered_prev(nullptr),
m_ptr(ptr),
m_size(size),
m_id(~(UINT64)0) { }
diff --git a/src/emu/emucore.cpp b/src/emu/emucore.cpp
index 9d8917d22ea..26c23ac19fe 100644
--- a/src/emu/emucore.cpp
+++ b/src/emu/emucore.cpp
@@ -15,7 +15,7 @@
emu_fatalerror::emu_fatalerror(const char *format, ...)
: code(0)
{
- if (format == NULL)
+ if (format == nullptr)
{
text[0] = '\0';
}
@@ -32,7 +32,7 @@ emu_fatalerror::emu_fatalerror(const char *format, ...)
emu_fatalerror::emu_fatalerror(const char *format, va_list ap)
: code(0)
{
- if (format == NULL)
+ if (format == nullptr)
{
text[0] = '\0';
}
@@ -46,7 +46,7 @@ emu_fatalerror::emu_fatalerror(const char *format, va_list ap)
emu_fatalerror::emu_fatalerror(int _exitcode, const char *format, ...)
: code(_exitcode)
{
- if (format == NULL)
+ if (format == nullptr)
{
text[0] = '\0';
}
@@ -62,7 +62,7 @@ emu_fatalerror::emu_fatalerror(int _exitcode, const char *format, ...)
emu_fatalerror::emu_fatalerror(int _exitcode, const char *format, va_list ap)
: code(_exitcode)
{
- if (format == NULL)
+ if (format == nullptr)
{
text[0] = '\0';
}
diff --git a/src/emu/emucore.h b/src/emu/emucore.h
index c26b0423493..ae631cecd79 100644
--- a/src/emu/emucore.h
+++ b/src/emu/emucore.h
@@ -321,7 +321,7 @@ inline _Dest downcast(_Source *src)
try {
if (dynamic_cast<_Dest>(src) != src)
{
- if (dynamic_cast<const device_t *>(src) != NULL)
+ if (dynamic_cast<const device_t *>(src) != nullptr)
report_bad_device_cast(dynamic_cast<const device_t *>(src), typeid(src), typeid(_Dest));
else
report_bad_cast(typeid(src), typeid(_Dest));
@@ -342,7 +342,7 @@ inline _Dest downcast(_Source &src)
try {
if (&dynamic_cast<_Dest>(src) != &src)
{
- if (dynamic_cast<const device_t *>(&src) != NULL)
+ if (dynamic_cast<const device_t *>(&src) != nullptr)
report_bad_device_cast(dynamic_cast<const device_t *>(&src), typeid(src), typeid(_Dest));
else
report_bad_cast(typeid(src), typeid(_Dest));
diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp
index 7fb6d51ef9e..11938000fe7 100644
--- a/src/emu/emuopts.cpp
+++ b/src/emu/emuopts.cpp
@@ -23,16 +23,16 @@
const options_entry emu_options::s_option_entries[] =
{
// unadorned options - only a single one supported at the moment
- { OPTION_SYSTEMNAME, NULL, OPTION_STRING, NULL },
- { OPTION_SOFTWARENAME, NULL, OPTION_STRING, NULL },
+ { OPTION_SYSTEMNAME, nullptr, OPTION_STRING, nullptr },
+ { OPTION_SOFTWARENAME, nullptr, OPTION_STRING, nullptr },
// config options
- { NULL, NULL, OPTION_HEADER, "CORE CONFIGURATION OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE CONFIGURATION OPTIONS" },
{ OPTION_READCONFIG ";rc", "1", OPTION_BOOLEAN, "enable loading of configuration files" },
{ OPTION_WRITECONFIG ";wc", "0", OPTION_BOOLEAN, "writes configuration to (driver).ini on exit" },
// seach path options
- { NULL, NULL, OPTION_HEADER, "CORE SEARCH PATH OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE SEARCH PATH OPTIONS" },
{ OPTION_MEDIAPATH ";rp;biospath;bp", "roms", OPTION_STRING, "path to ROMsets and hard disk images" },
{ OPTION_HASHPATH ";hash_directory;hash", "hash", OPTION_STRING, "path to hash files" },
{ OPTION_SAMPLEPATH ";sp", "samples", OPTION_STRING, "path to samplesets" },
@@ -44,7 +44,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_CROSSHAIRPATH, "crosshair", OPTION_STRING, "path to crosshair files" },
// output directory options
- { NULL, NULL, OPTION_HEADER, "CORE OUTPUT DIRECTORY OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE OUTPUT DIRECTORY OPTIONS" },
{ OPTION_CFG_DIRECTORY, "cfg", OPTION_STRING, "directory to save configurations" },
{ OPTION_NVRAM_DIRECTORY, "nvram", OPTION_STRING, "directory to save nvram contents" },
{ OPTION_INPUT_DIRECTORY, "inp", OPTION_STRING, "directory to save input device logs" },
@@ -54,17 +54,17 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_COMMENT_DIRECTORY, "comments", OPTION_STRING, "directory to save debugger comments" },
// state/playback options
- { NULL, NULL, OPTION_HEADER, "CORE STATE/PLAYBACK OPTIONS" },
- { OPTION_STATE, NULL, OPTION_STRING, "saved state to load" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE STATE/PLAYBACK OPTIONS" },
+ { OPTION_STATE, nullptr, OPTION_STRING, "saved state to load" },
{ OPTION_AUTOSAVE, "0", OPTION_BOOLEAN, "enable automatic restore at startup, and automatic save at exit time" },
- { OPTION_PLAYBACK ";pb", NULL, OPTION_STRING, "playback an input file" },
- { OPTION_RECORD ";rec", NULL, OPTION_STRING, "record an input file" },
- { OPTION_MNGWRITE, NULL, OPTION_STRING, "optional filename to write a MNG movie of the current session" },
- { OPTION_AVIWRITE, NULL, OPTION_STRING, "optional filename to write an AVI movie of the current session" },
+ { OPTION_PLAYBACK ";pb", nullptr, OPTION_STRING, "playback an input file" },
+ { OPTION_RECORD ";rec", nullptr, OPTION_STRING, "record an input file" },
+ { OPTION_MNGWRITE, nullptr, OPTION_STRING, "optional filename to write a MNG movie of the current session" },
+ { OPTION_AVIWRITE, nullptr, OPTION_STRING, "optional filename to write an AVI movie of the current session" },
#ifdef MAME_DEBUG
{ OPTION_DUMMYWRITE, "0", OPTION_BOOLEAN, "indicates if a snapshot should be created if each frame" },
#endif
- { OPTION_WAVWRITE, NULL, OPTION_STRING, "optional filename to write a WAV file of the current session" },
+ { OPTION_WAVWRITE, nullptr, OPTION_STRING, "optional filename to write a WAV file of the current session" },
{ OPTION_SNAPNAME, "%g/%i", OPTION_STRING, "override of the default snapshot/movie naming; %g == gamename, %i == index" },
{ OPTION_SNAPSIZE, "auto", OPTION_STRING, "specify snapshot/movie resolution (<width>x<height>) or 'auto' to use minimal size " },
{ OPTION_SNAPVIEW, "internal", OPTION_STRING, "specify snapshot/movie view or 'internal' to use internal pixel-aspect views" },
@@ -73,7 +73,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_BURNIN, "0", OPTION_BOOLEAN, "create burn-in snapshots for each screen" },
// performance options
- { NULL, NULL, OPTION_HEADER, "CORE PERFORMANCE OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE PERFORMANCE OPTIONS" },
{ OPTION_AUTOFRAMESKIP ";afs", "0", OPTION_BOOLEAN, "enable automatic frameskip selection" },
{ OPTION_FRAMESKIP ";fs(0-10)", "0", OPTION_INTEGER, "set frameskip to fixed value, 0-10 (autoframeskip must be disabled)" },
{ OPTION_SECONDS_TO_RUN ";str", "0", OPTION_INTEGER, "number of emulated seconds to run before automatically exiting" },
@@ -83,7 +83,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_REFRESHSPEED ";rs", "0", OPTION_BOOLEAN, "automatically adjusts the speed of gameplay to keep the refresh rate lower than the screen" },
// rotation options
- { NULL, NULL, OPTION_HEADER, "CORE ROTATION OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE ROTATION OPTIONS" },
{ OPTION_ROTATE, "1", OPTION_BOOLEAN, "rotate the game screen according to the game's orientation needs it" },
{ OPTION_ROR, "0", OPTION_BOOLEAN, "rotate screen clockwise 90 degrees" },
{ OPTION_ROL, "0", OPTION_BOOLEAN, "rotate screen counterclockwise 90 degrees" },
@@ -93,7 +93,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_FLIPY, "0", OPTION_BOOLEAN, "flip screen upside-down" },
// artwork options
- { NULL, NULL, OPTION_HEADER, "CORE ARTWORK OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE ARTWORK OPTIONS" },
{ OPTION_ARTWORK_CROP ";artcrop", "0", OPTION_BOOLEAN, "crop artwork to game screen size" },
{ OPTION_USE_BACKDROPS ";backdrop", "1", OPTION_BOOLEAN, "enable backdrops if artwork is enabled and available" },
{ OPTION_USE_OVERLAYS ";overlay", "1", OPTION_BOOLEAN, "enable overlays if artwork is enabled and available" },
@@ -102,7 +102,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_USE_MARQUEES ";marquee", "1", OPTION_BOOLEAN, "enable marquees if artwork is enabled and available" },
// screen options
- { NULL, NULL, OPTION_HEADER, "CORE SCREEN OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE SCREEN OPTIONS" },
{ OPTION_BRIGHTNESS "(0.1-2.0)", "1.0", OPTION_FLOAT, "default game screen brightness correction" },
{ OPTION_CONTRAST "(0.1-2.0)", "1.0", OPTION_FLOAT, "default game screen contrast correction" },
{ OPTION_GAMMA "(0.1-3.0)", "1.0", OPTION_FLOAT, "default game screen gamma correction" },
@@ -110,7 +110,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_EFFECT, "none", OPTION_STRING, "name of a PNG file to use for visual effects, or 'none'" },
// vector options
- { NULL, NULL, OPTION_HEADER, "CORE VECTOR OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE VECTOR OPTIONS" },
{ OPTION_ANTIALIAS ";aa", "1", OPTION_BOOLEAN, "use antialiasing when drawing vectors" },
{ OPTION_BEAM_WIDTH_MIN, "1.0", OPTION_FLOAT, "set vector beam width minimum" },
{ OPTION_BEAM_WIDTH_MAX, "1.0", OPTION_FLOAT, "set vector beam width maximum" },
@@ -118,15 +118,15 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_FLICKER, "0", OPTION_FLOAT, "set vector flicker effect" },
// sound options
- { NULL, NULL, OPTION_HEADER, "CORE SOUND OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE SOUND OPTIONS" },
{ OPTION_SAMPLERATE ";sr(1000-1000000)", "48000", OPTION_INTEGER, "set sound output sample rate" },
{ OPTION_SAMPLES, "1", OPTION_BOOLEAN, "enable the use of external samples if available" },
{ OPTION_VOLUME ";vol", "0", OPTION_INTEGER, "sound volume in decibels (-32 min, 0 max)" },
// input options
- { NULL, NULL, OPTION_HEADER, "CORE INPUT OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE INPUT OPTIONS" },
{ OPTION_COIN_LOCKOUT ";coinlock", "1", OPTION_BOOLEAN, "enable coin lockouts to actually lock out coins" },
- { OPTION_CTRLR, NULL, OPTION_STRING, "preconfigure for specified controller" },
+ { OPTION_CTRLR, nullptr, OPTION_STRING, "preconfigure for specified controller" },
{ OPTION_MOUSE, "0", OPTION_BOOLEAN, "enable mouse input" },
{ OPTION_JOYSTICK ";joy", "1", OPTION_BOOLEAN, "enable joystick input" },
{ OPTION_LIGHTGUN ";gun", "0", OPTION_BOOLEAN, "enable lightgun input" },
@@ -143,7 +143,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_COIN_IMPULSE, "0", OPTION_INTEGER, "set coin impulse time (n<0 disable impulse, n==0 obey driver, 0<n set time n)" },
// input autoenable options
- { NULL, NULL, OPTION_HEADER, "CORE INPUT AUTOMATIC ENABLE OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE INPUT AUTOMATIC ENABLE OPTIONS" },
{ OPTION_PADDLE_DEVICE ";paddle", "keyboard", OPTION_STRING, "enable (none|keyboard|mouse|lightgun|joystick) if a paddle control is present" },
{ OPTION_ADSTICK_DEVICE ";adstick", "keyboard", OPTION_STRING, "enable (none|keyboard|mouse|lightgun|joystick) if an analog joystick control is present" },
{ OPTION_PEDAL_DEVICE ";pedal", "keyboard", OPTION_STRING, "enable (none|keyboard|mouse|lightgun|joystick) if a pedal control is present" },
@@ -154,38 +154,38 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_MOUSE_DEVICE, "mouse", OPTION_STRING, "enable (none|keyboard|mouse|lightgun|joystick) if a mouse control is present" },
// debugging options
- { NULL, NULL, OPTION_HEADER, "CORE DEBUGGING OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE DEBUGGING OPTIONS" },
{ OPTION_VERBOSE ";v", "0", OPTION_BOOLEAN, "display additional diagnostic information" },
{ OPTION_LOG, "0", OPTION_BOOLEAN, "generate an error.log file" },
{ OPTION_OSLOG, "0", OPTION_BOOLEAN, "output error.log data to the system debugger" },
{ OPTION_DEBUG ";d", "0", OPTION_BOOLEAN, "enable/disable debugger" },
{ OPTION_UPDATEINPAUSE, "0", OPTION_BOOLEAN, "keep calling video updates while in pause" },
- { OPTION_DEBUGSCRIPT, NULL, OPTION_STRING, "script for debugger" },
+ { OPTION_DEBUGSCRIPT, nullptr, OPTION_STRING, "script for debugger" },
// comm options
- { NULL, NULL, OPTION_HEADER, "CORE COMM OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE COMM OPTIONS" },
{ OPTION_COMM_LOCAL_HOST, "0.0.0.0", OPTION_STRING, "local address to bind to" },
{ OPTION_COMM_LOCAL_PORT, "15112", OPTION_STRING, "local port to bind to" },
{ OPTION_COMM_REMOTE_HOST, "127.0.0.1", OPTION_STRING, "remote address to connect to" },
{ OPTION_COMM_REMOTE_PORT, "15112", OPTION_STRING, "remote port to connect to" },
// misc options
- { NULL, NULL, OPTION_HEADER, "CORE MISC OPTIONS" },
+ { nullptr, nullptr, OPTION_HEADER, "CORE MISC OPTIONS" },
{ OPTION_DRC, "1", OPTION_BOOLEAN, "enable DRC cpu core if available" },
{ OPTION_DRC_USE_C, "0", OPTION_BOOLEAN, "force DRC use C backend" },
{ OPTION_DRC_LOG_UML, "0", OPTION_BOOLEAN, "write DRC UML disassembly log" },
{ OPTION_DRC_LOG_NATIVE, "0", OPTION_BOOLEAN, "write DRC native disassembly log" },
- { OPTION_BIOS, NULL, OPTION_STRING, "select the system BIOS to use" },
+ { OPTION_BIOS, nullptr, OPTION_STRING, "select the system BIOS to use" },
{ OPTION_CHEAT ";c", "0", OPTION_BOOLEAN, "enable cheat subsystem" },
{ OPTION_SKIP_GAMEINFO, "0", OPTION_BOOLEAN, "skip displaying the information screen at startup" },
{ OPTION_UI_FONT, "default", OPTION_STRING, "specify a font to use" },
- { OPTION_RAMSIZE ";ram", NULL, OPTION_STRING, "size of RAM (if supported by driver)" },
+ { OPTION_RAMSIZE ";ram", nullptr, OPTION_STRING, "size of RAM (if supported by driver)" },
{ OPTION_CONFIRM_QUIT, "0", OPTION_BOOLEAN, "display confirm quit screen on exit" },
{ OPTION_UI_MOUSE, "0", OPTION_BOOLEAN, "display ui mouse cursor" },
- { OPTION_AUTOBOOT_COMMAND ";ab", NULL, OPTION_STRING, "command to execute after machine boot" },
+ { OPTION_AUTOBOOT_COMMAND ";ab", nullptr, OPTION_STRING, "command to execute after machine boot" },
{ OPTION_AUTOBOOT_DELAY, "2", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" },
- { OPTION_AUTOBOOT_SCRIPT ";script", NULL, OPTION_STRING, "lua script to execute after machine boot" },
- { NULL }
+ { OPTION_AUTOBOOT_SCRIPT ";script", nullptr, OPTION_STRING, "lua script to execute after machine boot" },
+ { nullptr }
};
@@ -218,7 +218,7 @@ bool emu_options::add_slot_options(bool isfirstpass)
{
// look up the system configured by name; if no match, do nothing
const game_driver *cursystem = system();
- if (cursystem == NULL)
+ if (cursystem == nullptr)
return false;
machine_config config(*cursystem, *this);
@@ -228,7 +228,7 @@ bool emu_options::add_slot_options(bool isfirstpass)
// create the configuration
int starting_count = options_count();
slot_interface_iterator iter(config.root_device());
- for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (const device_slot_interface *slot = iter.first(); slot != nullptr; slot = iter.next())
{
// skip fixed slots
if (slot->fixed())
@@ -236,7 +236,7 @@ bool emu_options::add_slot_options(bool isfirstpass)
// first device? add the header as to be pretty
if (isfirstpass && first)
- add_entry(NULL, "SLOT DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
+ add_entry(nullptr, "SLOT DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
first = false;
// retrieve info about the device instance
@@ -246,13 +246,13 @@ bool emu_options::add_slot_options(bool isfirstpass)
// add the option
UINT32 flags = OPTION_STRING | OPTION_FLAG_DEVICE;
const char *defvalue = slot->default_option();
- if (defvalue != NULL)
+ if (defvalue != nullptr)
{
const device_slot_option *option = slot->option(defvalue);
- if (option != NULL && !option->selectable())
+ if (option != nullptr && !option->selectable())
flags |= OPTION_FLAG_INTERNAL;
}
- add_entry(name, NULL, flags, defvalue, true);
+ add_entry(name, nullptr, flags, defvalue, true);
}
}
return (options_count() != starting_count);
@@ -268,17 +268,17 @@ void emu_options::update_slot_options()
{
// look up the system configured by name; if no match, do nothing
const game_driver *cursystem = system();
- if (cursystem == NULL)
+ if (cursystem == nullptr)
return;
machine_config config(*cursystem, *this);
// iterate through all slot devices
slot_interface_iterator iter(config.root_device());
- for (device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (device_slot_interface *slot = iter.first(); slot != nullptr; slot = iter.next())
{
// retrieve info about the device instance
const char *name = slot->device().tag() + 1;
- if (exists(name) && slot->first_option() != NULL)
+ if (exists(name) && slot->first_option() != nullptr)
{
std::string defvalue;
slot->get_default_card_software(defvalue);
@@ -286,7 +286,7 @@ void emu_options::update_slot_options()
{
set_default_value(name, defvalue.c_str());
const device_slot_option *option = slot->option(defvalue.c_str());
- set_flag(name, ~OPTION_FLAG_INTERNAL, (option != NULL && !option->selectable()) ? OPTION_FLAG_INTERNAL : 0);
+ set_flag(name, ~OPTION_FLAG_INTERNAL, (option != nullptr && !option->selectable()) ? OPTION_FLAG_INTERNAL : 0);
}
}
}
@@ -304,18 +304,18 @@ void emu_options::add_device_options(bool isfirstpass)
{
// look up the system configured by name; if no match, do nothing
const game_driver *cursystem = system();
- if (cursystem == NULL)
+ if (cursystem == nullptr)
return;
machine_config config(*cursystem, *this);
// iterate through all image devices
bool first = true;
image_interface_iterator iter(config.root_device());
- for (const device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (const device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
// first device? add the header as to be pretty
if (first && isfirstpass)
- add_entry(NULL, "IMAGE DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
+ add_entry(nullptr, "IMAGE DEVICES", OPTION_HEADER | OPTION_FLAG_DEVICE);
first = false;
// retrieve info about the device instance
@@ -326,7 +326,7 @@ void emu_options::add_device_options(bool isfirstpass)
// add the option
if (!exists(image->instance_name()))
- add_entry(option_name.c_str(), NULL, OPTION_STRING | OPTION_FLAG_DEVICE, NULL, true);
+ add_entry(option_name.c_str(), nullptr, OPTION_STRING | OPTION_FLAG_DEVICE, nullptr, true);
}
}
@@ -339,7 +339,7 @@ void emu_options::remove_device_options()
{
// iterate through options and remove interesting ones
entry *nextentry;
- for (entry *curentry = first(); curentry != NULL; curentry = nextentry)
+ for (entry *curentry = first(); curentry != nullptr; curentry = nextentry)
{
// pre-fetch the next entry in case we delete this one
nextentry = curentry->next();
@@ -373,7 +373,7 @@ bool emu_options::parse_slot_devices(int argc, char *argv[], std::string &error_
// add device options and reparse
add_device_options(true);
- if (name != NULL && exists(name))
+ if (name != nullptr && exists(name))
set_value(name, value, OPTION_PRIORITY_CMDLINE, error_string);
core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
@@ -399,7 +399,7 @@ bool emu_options::parse_command_line(int argc, char *argv[], std::string &error_
{
// parse as normal
core_options::parse_command_line(argc, argv, OPTION_PRIORITY_CMDLINE, error_string);
- bool result = parse_slot_devices(argc, argv, error_string, NULL, NULL);
+ bool result = parse_slot_devices(argc, argv, error_string, nullptr, nullptr);
update_cached_options();
return result;
}
@@ -426,7 +426,7 @@ void emu_options::parse_standard_inis(std::string &error_string)
// if we have a valid system driver, parse system-specific INI files
const game_driver *cursystem = system();
- if (cursystem == NULL)
+ if (cursystem == nullptr)
return;
// parse "vertical.ini" or "horizont.ini"
@@ -446,7 +446,7 @@ void emu_options::parse_standard_inis(std::string &error_string)
machine_config config(*cursystem, *this);
screen_device_iterator iter(config.root_device());
- for (const screen_device *device = iter.first(); device != NULL; device = iter.next())
+ for (const screen_device *device = iter.first(); device != nullptr; device = iter.next())
{
// parse "raster.ini" for raster games
if (device->screen_type() == SCREEN_TYPE_RASTER)
@@ -502,7 +502,7 @@ const game_driver *emu_options::system() const
{
std::string tempstr;
int index = driver_list::find(core_filename_extract_base(tempstr, system_name(), true).c_str());
- return (index != -1) ? &driver_list::driver(index) : NULL;
+ return (index != -1) ? &driver_list::driver(index) : nullptr;
}
@@ -560,7 +560,7 @@ bool emu_options::parse_one_ini(const char *basename, int priority, std::string
bool result = parse_ini_file((core_file&)file, priority, OPTION_PRIORITY_DRIVER_INI, error);
// append errors if requested
- if (!error.empty() && error_string != NULL)
+ if (!error.empty() && error_string != nullptr)
strcatprintf(*error_string, "While parsing %s:\n%s\n", file.fullpath(), error.c_str());
return result;
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index 9e8485bde29..3bd7cd8afd6 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -374,7 +374,7 @@ private:
void update_slot_options();
// INI parsing helper
- bool parse_one_ini(const char *basename, int priority, std::string *error_string = NULL);
+ bool parse_one_ini(const char *basename, int priority, std::string *error_string = nullptr);
// cache frequently used options in members
void update_cached_options();
diff --git a/src/emu/emupal.cpp b/src/emu/emupal.cpp
index 53841d93581..e3d2dcd97a1 100644
--- a/src/emu/emupal.cpp
+++ b/src/emu/emupal.cpp
@@ -30,10 +30,10 @@ palette_device::palette_device(const machine_config &mconfig, const char *tag, d
m_endianness(),
m_endianness_supplied(false),
m_raw_to_rgb(raw_to_rgb_converter()),
- m_palette(NULL),
- m_pens(NULL),
+ m_palette(nullptr),
+ m_pens(nullptr),
m_format(),
- m_shadow_table(NULL),
+ m_shadow_table(nullptr),
m_shadow_group(0),
m_hilight_group(0),
m_white_pen(0),
@@ -234,7 +234,7 @@ void palette_device::set_shadow_dRGB32(int mode, int dr, int dg, int db, bool no
// only applies to RGB direct modes
assert(m_format != BITMAP_FORMAT_IND16);
- assert(stable.base != NULL);
+ assert(stable.base != nullptr);
// clamp the deltas (why?)
if (dr < -0xff) dr = -0xff; else if (dr > 0xff) dr = 0xff;
@@ -302,7 +302,7 @@ inline void palette_device::update_for_write(offs_t byte_offset, int bytes_modif
for (int index = 0; index < count; index++)
{
UINT32 data = m_paletteram.read(base + index);
- if (m_paletteram_ext.base() != NULL)
+ if (m_paletteram_ext.base() != nullptr)
data |= m_paletteram_ext.read(base + index) << (8 * bpe);
if (indirect)
@@ -410,7 +410,7 @@ void palette_device::device_start()
// find the memory, if present
const memory_share *share = memshare(tag());
- if (share != NULL)
+ if (share != nullptr)
{
// find the extended (split) memory, if present
std::string tag_ext = std::string(tag()).append("_ext");
@@ -421,7 +421,7 @@ void palette_device::device_start()
// determine bytes per entry and configure
int bytes_per_entry = m_raw_to_rgb.bytes_per_entry();
- if (share_ext == NULL)
+ if (share_ext == nullptr)
m_paletteram.set(*share, bytes_per_entry);
else
{
@@ -435,7 +435,7 @@ void palette_device::device_start()
// forcing width only makes sense when narrower than the native bus width
assert_always(m_membits < share->bitwidth(), "Improper use of MCFG_PALETTE_MEMBITS");
m_paletteram.set_membits(m_membits);
- if (share_ext != NULL)
+ if (share_ext != nullptr)
m_paletteram_ext.set_membits(m_membits);
}
@@ -443,14 +443,14 @@ void palette_device::device_start()
if (m_endianness_supplied)
{
// forcing endianness only makes sense when the RAM is narrower than the palette format and not split
- assert_always((share_ext == NULL && m_paletteram.membits() / 8 < bytes_per_entry), "Improper use of MCFG_PALETTE_ENDIANNESS");
+ assert_always((share_ext == nullptr && m_paletteram.membits() / 8 < bytes_per_entry), "Improper use of MCFG_PALETTE_ENDIANNESS");
m_paletteram.set_endianness(m_endianness);
}
}
// reset all our data
screen_device *device = machine().first_screen();
- m_format = (device != NULL) ? device->format() : BITMAP_FORMAT_INVALID;
+ m_format = (device != nullptr) ? device->format() : BITMAP_FORMAT_INVALID;
// allocate the palette
if (m_entries > 0)
@@ -540,7 +540,7 @@ void palette_device::device_post_load()
void palette_device::device_stop()
{
// dereference the palette
- if (m_palette != NULL)
+ if (m_palette != nullptr)
m_palette->deref();
}
@@ -638,7 +638,7 @@ void palette_device::allocate_color_tables()
break;
default:
- m_pens = NULL;
+ m_pens = nullptr;
break;
}
}
@@ -713,7 +713,7 @@ void palette_device::configure_rgb_shadows(int mode, float factor)
// verify the shadow table
assert(mode >= 0 && mode < ARRAY_LENGTH(m_shadow_tables));
shadow_table_data &stable = m_shadow_tables[mode];
- assert(stable.base != NULL);
+ assert(stable.base != nullptr);
// regenerate the table
int ifactor = int(factor * 256.0f);
diff --git a/src/emu/emupal.h b/src/emu/emupal.h
index 1b6bfb296a5..b06a5b43d7f 100644
--- a/src/emu/emupal.h
+++ b/src/emu/emupal.h
@@ -309,7 +309,7 @@ class raw_to_rgb_converter
public:
// constructor
- raw_to_rgb_converter(int bytes_per_entry = 0, raw_to_rgb_func func = NULL)
+ raw_to_rgb_converter(int bytes_per_entry = 0, raw_to_rgb_func func = nullptr)
: m_bytes_per_entry(bytes_per_entry),
m_func(func) { }
@@ -458,11 +458,11 @@ public:
void update() { if (!m_init.isnull()) m_init(*this); }
protected:
// device-level overrides
- virtual void device_validity_check(validity_checker &valid) const;
- virtual void device_start();
- virtual void device_pre_save();
- virtual void device_post_load();
- virtual void device_stop();
+ virtual void device_validity_check(validity_checker &valid) const override;
+ virtual void device_start() override;
+ virtual void device_pre_save() override;
+ virtual void device_post_load() override;
+ virtual void device_stop() override;
void allocate_palette();
void allocate_color_tables();
diff --git a/src/emu/fileio.cpp b/src/emu/fileio.cpp
index 68efdb021a3..8c982d03f19 100644
--- a/src/emu/fileio.cpp
+++ b/src/emu/fileio.cpp
@@ -47,13 +47,13 @@ bool path_iterator::next(std::string &buffer, const char *name)
// copy up to the next semicolon
const char *semi = strchr(m_current, ';');
- if (semi == NULL)
+ if (semi == nullptr)
semi = m_current + strlen(m_current);
buffer.assign(m_current, semi - m_current);
m_current = (*semi == 0) ? semi : semi + 1;
// append the name if we have one
- if (name != NULL)
+ if (name != nullptr)
{
// compute the full pathname
if (buffer.length() > 0)
@@ -78,7 +78,7 @@ bool path_iterator::next(std::string &buffer, const char *name)
file_enumerator::file_enumerator(const char *searchpath)
: m_iterator(searchpath),
- m_curdir(NULL)/*,
+ m_curdir(nullptr)/*,
m_buflen(0)*/
{
}
@@ -91,7 +91,7 @@ file_enumerator::file_enumerator(const char *searchpath)
file_enumerator::~file_enumerator()
{
// close anything open
- if (m_curdir != NULL)
+ if (m_curdir != nullptr)
osd_closedir(m_curdir);
}
@@ -107,11 +107,11 @@ const osd_directory_entry *file_enumerator::next()
while (1)
{
// if no open directory, get the next path
- while (m_curdir == NULL)
+ while (m_curdir == nullptr)
{
// if we fail to get anything more, we're done
if (!m_iterator.next(m_pathbuffer))
- return NULL;
+ return nullptr;
// open the path
m_curdir = osd_opendir(m_pathbuffer.c_str());
@@ -119,12 +119,12 @@ const osd_directory_entry *file_enumerator::next()
// get the next entry from the current directory
const osd_directory_entry *result = osd_readdir(m_curdir);
- if (result != NULL)
+ if (result != nullptr)
return result;
// we're done; close this directory
osd_closedir(m_curdir);
- m_curdir = NULL;
+ m_curdir = nullptr;
}
}
@@ -139,14 +139,14 @@ const osd_directory_entry *file_enumerator::next()
//-------------------------------------------------
emu_file::emu_file(UINT32 openflags)
- : m_file(NULL),
+ : m_file(nullptr),
m_iterator(""),
m_mediapaths(""),
m_crc(0),
m_openflags(openflags),
- m_zipfile(NULL),
+ m_zipfile(nullptr),
m_ziplength(0),
- m__7zfile(NULL),
+ m__7zfile(nullptr),
m__7zlength(0),
m_remove_on_close(false),
m_restrict_to_mediapath(false)
@@ -157,14 +157,14 @@ emu_file::emu_file(UINT32 openflags)
}
emu_file::emu_file(const char *searchpath, UINT32 openflags)
- : m_file(NULL),
+ : m_file(nullptr),
m_iterator(searchpath),
m_mediapaths(searchpath),
m_crc(0),
m_openflags(openflags),
- m_zipfile(NULL),
+ m_zipfile(nullptr),
m_ziplength(0),
- m__7zfile(NULL),
+ m__7zfile(nullptr),
m__7zlength(0),
m_remove_on_close(false),
m_restrict_to_mediapath(false)
@@ -195,7 +195,7 @@ emu_file::operator core_file *()
{
// load the ZIP file now if we haven't yet
if (compressed_file_ready())
- return NULL;
+ return nullptr;
// return the core file
return m_file;
@@ -235,7 +235,7 @@ hash_collection &emu_file::hashes(const char *types)
// load the ZIP file if needed
if (compressed_file_ready())
return m_hashes;
- if (m_file == NULL)
+ if (m_file == nullptr)
return m_hashes;
// if we have ZIP data, just hash that directly
@@ -253,7 +253,7 @@ hash_collection &emu_file::hashes(const char *types)
// read the data if we can
const UINT8 *filedata = (const UINT8 *)core_fbuffer(m_file);
- if (filedata == NULL)
+ if (filedata == nullptr)
return m_hashes;
// compute the hash
@@ -341,7 +341,7 @@ file_error emu_file::open(const char *name1, const char *name2, const char *name
file_error emu_file::open_next()
{
// if we're open from a previous attempt, close up now
- if (m_file != NULL)
+ if (m_file != nullptr)
close();
// loop over paths
@@ -397,17 +397,17 @@ file_error emu_file::open_ram(const void *data, UINT32 length)
void emu_file::close()
{
// close files and free memory
- if (m__7zfile != NULL)
+ if (m__7zfile != nullptr)
_7z_file_close(m__7zfile);
- m__7zfile = NULL;
+ m__7zfile = nullptr;
- if (m_zipfile != NULL)
+ if (m_zipfile != nullptr)
zip_file_close(m_zipfile);
- m_zipfile = NULL;
+ m_zipfile = nullptr;
- if (m_file != NULL)
+ if (m_file != nullptr)
core_fclose(m_file);
- m_file = NULL;
+ m_file = nullptr;
m__7zdata.clear();
m_zipdata.clear();
@@ -442,10 +442,10 @@ file_error emu_file::compress(int level)
bool emu_file::compressed_file_ready(void)
{
// load the ZIP file now if we haven't yet
- if (m__7zfile != NULL && load__7zped_file() != FILERR_NONE)
+ if (m__7zfile != nullptr && load__7zped_file() != FILERR_NONE)
return true;
- if (m_zipfile != NULL && load_zipped_file() != FILERR_NONE)
+ if (m_zipfile != nullptr && load_zipped_file() != FILERR_NONE)
return true;
return false;
@@ -462,7 +462,7 @@ int emu_file::seek(INT64 offset, int whence)
return 1;
// seek if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_fseek(m_file, offset, whence);
return 1;
@@ -480,7 +480,7 @@ UINT64 emu_file::tell()
return 0;
// tell if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_ftell(m_file);
return 0;
@@ -498,7 +498,7 @@ bool emu_file::eof()
return 0;
// return EOF if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_feof(m_file);
return 0;
@@ -512,14 +512,14 @@ bool emu_file::eof()
UINT64 emu_file::size()
{
// use the ZIP length if present
- if (m__7zfile != NULL)
+ if (m__7zfile != nullptr)
return m__7zlength;
- if (m_zipfile != NULL)
+ if (m_zipfile != nullptr)
return m_ziplength;
// return length if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_fsize(m_file);
return 0;
@@ -537,7 +537,7 @@ UINT32 emu_file::read(void *buffer, UINT32 length)
return 0;
// read the data if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_fread(m_file, buffer, length);
return 0;
@@ -555,7 +555,7 @@ int emu_file::getc()
return EOF;
// read the data if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_fgetc(m_file);
return EOF;
@@ -573,7 +573,7 @@ int emu_file::ungetc(int c)
return 1;
// read the data if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_ungetc(c, m_file);
return 1;
@@ -588,13 +588,13 @@ char *emu_file::gets(char *s, int n)
{
// load the ZIP file now if we haven't yet
if (compressed_file_ready())
- return NULL;
+ return nullptr;
// read the data if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_fgets(s, n, m_file);
- return NULL;
+ return nullptr;
}
@@ -605,7 +605,7 @@ char *emu_file::gets(char *s, int n)
UINT32 emu_file::write(const void *buffer, UINT32 length)
{
// write the data if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_fwrite(m_file, buffer, length);
return 0;
@@ -619,7 +619,7 @@ UINT32 emu_file::write(const void *buffer, UINT32 length)
int emu_file::puts(const char *s)
{
// write the data if we can
- if (m_file != NULL)
+ if (m_file != nullptr)
return core_fputs(m_file, s);
return 0;
@@ -648,7 +648,7 @@ int CLIB_DECL emu_file::printf(const char *fmt, ...)
int emu_file::vprintf(const char *fmt, va_list va)
{
// write the data if we can
- return (m_file != NULL) ? core_vfprintf(m_file, fmt, va) : 0;
+ return (m_file != nullptr) ? core_vfprintf(m_file, fmt, va) : 0;
}
@@ -662,7 +662,7 @@ bool emu_file::part_of_mediapath(std::string path)
bool result = false;
std::string mediapath;
m_mediapaths.reset();
- while (m_mediapaths.next(mediapath, NULL) && !result) {
+ while (m_mediapaths.next(mediapath, nullptr) && !result) {
if (path.compare(mediapath.substr(0, mediapath.length())))
result = true;
}
@@ -710,25 +710,25 @@ file_error emu_file::attempt_zipped()
// see if we can find a file with the right name and (if available) crc
const zip_file_header *header;
- for (header = zip_file_first_file(zip); header != NULL; header = zip_file_next_file(zip))
+ for (header = zip_file_first_file(zip); header != nullptr; header = zip_file_next_file(zip))
if (zip_filename_match(*header, filename) && (!(m_openflags & OPEN_FLAG_HAS_CRC) || header->crc == m_crc))
break;
// if that failed, look for a file with the right crc, but the wrong filename
- if (header == NULL && (m_openflags & OPEN_FLAG_HAS_CRC))
- for (header = zip_file_first_file(zip); header != NULL; header = zip_file_next_file(zip))
+ if (header == nullptr && (m_openflags & OPEN_FLAG_HAS_CRC))
+ for (header = zip_file_first_file(zip); header != nullptr; header = zip_file_next_file(zip))
if (header->crc == m_crc && !zip_header_is_path(*header))
break;
// if that failed, look for a file with the right name; reporting a bad checksum
// is more helpful and less confusing than reporting "rom not found"
- if (header == NULL)
- for (header = zip_file_first_file(zip); header != NULL; header = zip_file_next_file(zip))
+ if (header == nullptr)
+ for (header = zip_file_first_file(zip); header != nullptr; header = zip_file_next_file(zip))
if (zip_filename_match(*header, filename))
break;
// if we got it, read the data
- if (header != NULL)
+ if (header != nullptr)
{
m_zipfile = zip;
m_ziplength = header->uncompressed_length;
@@ -751,9 +751,9 @@ file_error emu_file::attempt_zipped()
file_error emu_file::load_zipped_file()
{
- assert(m_file == NULL);
+ assert(m_file == nullptr);
assert(m_zipdata.empty());
- assert(m_zipfile != NULL);
+ assert(m_zipfile != nullptr);
// allocate some memory
m_zipdata.resize(m_ziplength);
@@ -776,7 +776,7 @@ file_error emu_file::load_zipped_file()
// close out the ZIP file
zip_file_close(m_zipfile);
- m_zipfile = NULL;
+ m_zipfile = nullptr;
return FILERR_NONE;
}
@@ -880,9 +880,9 @@ file_error emu_file::attempt__7zped()
file_error emu_file::load__7zped_file()
{
- assert(m_file == NULL);
+ assert(m_file == nullptr);
assert(m__7zdata.empty());
- assert(m__7zfile != NULL);
+ assert(m__7zfile != nullptr);
// allocate some memory
m__7zdata.resize(m__7zlength);
@@ -905,6 +905,6 @@ file_error emu_file::load__7zped_file()
// close out the _7Z file
_7z_file_close(m__7zfile);
- m__7zfile = NULL;
+ m__7zfile = nullptr;
return FILERR_NONE;
}
diff --git a/src/emu/fileio.h b/src/emu/fileio.h
index 1377eca6bb9..39f3b0b8dc5 100644
--- a/src/emu/fileio.h
+++ b/src/emu/fileio.h
@@ -42,7 +42,7 @@ public:
path_iterator(const char *searchpath);
// getters
- bool next(std::string &buffer, const char *name = NULL);
+ bool next(std::string &buffer, const char *name = nullptr);
// reset
void reset() { m_current = m_base; m_index = 0; }
@@ -92,7 +92,7 @@ public:
// getters
operator core_file *();
operator core_file &();
- bool is_open() const { return (m_file != NULL); }
+ bool is_open() const { return (m_file != nullptr); }
const char *filename() const { return m_filename.c_str(); }
const char *fullpath() const { return m_fullpath.c_str(); }
UINT32 openflags() const { return m_openflags; }
@@ -102,7 +102,7 @@ public:
// setters
void remove_on_close() { m_remove_on_close = true; }
- void set_openflags(UINT32 openflags) { assert(m_file == NULL); m_openflags = openflags; }
+ void set_openflags(UINT32 openflags) { assert(m_file == nullptr); m_openflags = openflags; }
void set_restrict_to_mediapath(bool rtmp = true) { m_restrict_to_mediapath = rtmp; }
// open/close
diff --git a/src/emu/hash.cpp b/src/emu/hash.cpp
index 3ada8eb2690..20894f4fa3e 100644
--- a/src/emu/hash.cpp
+++ b/src/emu/hash.cpp
@@ -36,7 +36,7 @@ const char *hash_collection::HASH_TYPES_ALL = "RS";
hash_collection::hash_collection()
: m_has_crc32(false),
m_has_sha1(false),
- m_creator(NULL)
+ m_creator(nullptr)
{
}
@@ -44,7 +44,7 @@ hash_collection::hash_collection()
hash_collection::hash_collection(const char *string)
: m_has_crc32(false),
m_has_sha1(false),
- m_creator(NULL)
+ m_creator(nullptr)
{
from_internal_string(string);
}
@@ -53,7 +53,7 @@ hash_collection::hash_collection(const char *string)
hash_collection::hash_collection(const hash_collection &src)
: m_has_crc32(false),
m_has_sha1(false),
- m_creator(NULL)
+ m_creator(nullptr)
{
copyfrom(src);
}
@@ -136,7 +136,7 @@ void hash_collection::reset()
m_flags.clear();
m_has_crc32 = m_has_sha1 = false;
delete m_creator;
- m_creator = NULL;
+ m_creator = nullptr;
}
@@ -339,14 +339,14 @@ void hash_collection::begin(const char *types)
m_creator = new hash_creator;
// by default use all types
- if (types == NULL)
+ if (types == nullptr)
m_creator->m_doing_crc32 = m_creator->m_doing_sha1 = true;
// otherwise, just allocate the ones that are specified
else
{
- m_creator->m_doing_crc32 = (strchr(types, HASH_CRC) != NULL);
- m_creator->m_doing_sha1 = (strchr(types, HASH_SHA1) != NULL);
+ m_creator->m_doing_crc32 = (strchr(types, HASH_CRC) != nullptr);
+ m_creator->m_doing_sha1 = (strchr(types, HASH_SHA1) != nullptr);
}
}
@@ -357,7 +357,7 @@ void hash_collection::begin(const char *types)
void hash_collection::buffer(const UINT8 *data, UINT32 length)
{
- assert(m_creator != NULL);
+ assert(m_creator != nullptr);
// append to each active hash
if (m_creator->m_doing_crc32)
@@ -373,7 +373,7 @@ void hash_collection::buffer(const UINT8 *data, UINT32 length)
void hash_collection::end()
{
- assert(m_creator != NULL);
+ assert(m_creator != nullptr);
// finish up the CRC32
if (m_creator->m_doing_crc32)
@@ -391,7 +391,7 @@ void hash_collection::end()
// nuke the creator
delete m_creator;
- m_creator = NULL;
+ m_creator = nullptr;
}
@@ -412,5 +412,5 @@ void hash_collection::copyfrom(const hash_collection &src)
m_sha1 = src.m_sha1;
// don't copy creators
- m_creator = NULL;
+ m_creator = nullptr;
}
diff --git a/src/emu/hash.h b/src/emu/hash.h
index 6f066b237a0..52d5c6bf3b6 100644
--- a/src/emu/hash.h
+++ b/src/emu/hash.h
@@ -89,10 +89,10 @@ public:
bool from_internal_string(const char *string);
// creation
- void begin(const char *types = NULL);
+ void begin(const char *types = nullptr);
void buffer(const UINT8 *data, UINT32 length);
void end();
- void compute(const UINT8 *data, UINT32 length, const char *types = NULL) { begin(types); buffer(data, length); end(); }
+ void compute(const UINT8 *data, UINT32 length, const char *types = nullptr) { begin(types); buffer(data, length); end(); }
private:
// internal helpers
diff --git a/src/emu/hashfile.cpp b/src/emu/hashfile.cpp
index c4735191780..374a09f5176 100644
--- a/src/emu/hashfile.cpp
+++ b/src/emu/hashfile.cpp
@@ -198,7 +198,7 @@ static void start_handler(void *data, const char *tagname, const char **attribut
if (!strcmp(tagname, "hash"))
{
// we are now examining a hash tag
- name = NULL;
+ name = nullptr;
// device = IO_COUNT;
while(attributes[0])
@@ -264,7 +264,7 @@ static void start_handler(void *data, const char *tagname, const char **attribut
break;
case HASH_POS_HASH:
- text_dest = NULL;
+ text_dest = nullptr;
if (!strcmp(tagname, "year")) {
}
@@ -296,7 +296,7 @@ static void start_handler(void *data, const char *tagname, const char **attribut
static void end_handler(void *data, const char *name)
{
struct hash_parse_state *state = (struct hash_parse_state *) data;
- state->text_dest = NULL;
+ state->text_dest = nullptr;
state->pos = (hash_parse_position) (state->pos - 1);
switch(state->pos)
@@ -310,7 +310,7 @@ static void end_handler(void *data, const char *name)
{
if (state->use_proc)
(*state->use_proc)(state->hashfile, state->param, state->hi);
- state->hi = NULL;
+ state->hi = nullptr;
}
break;
}
@@ -373,7 +373,7 @@ static void hashfile_parse(hash_file *hashfile,
memcallbacks.malloc_fcn = expat_malloc;
memcallbacks.realloc_fcn = expat_realloc;
memcallbacks.free_fcn = expat_free;
- state.parser = XML_ParserCreate_MM(NULL, &memcallbacks, NULL);
+ state.parser = XML_ParserCreate_MM(nullptr, &memcallbacks, nullptr);
if (!state.parser)
goto done;
@@ -428,8 +428,8 @@ static void preload_use_proc(hash_file *hashfile, void *param, hash_info *hi)
hash_file *hashfile_open(emu_options &options, const char *sysname, int is_preload,
void (*error_proc)(const char *message))
{
- hash_file *hashfile = NULL;
- object_pool *pool = NULL;
+ hash_file *hashfile = nullptr;
+ object_pool *pool = nullptr;
file_error filerr;
/* create a pool for this hash file */
@@ -453,19 +453,19 @@ hash_file *hashfile_open(emu_options &options, const char *sysname, int is_prelo
if (filerr != FILERR_NONE)
{
global_free(hashfile->file);
- hashfile->file = NULL;
+ hashfile->file = nullptr;
goto error;
}
if (is_preload)
- hashfile_parse(hashfile, NULL, preload_use_proc, hashfile->error_proc, NULL);
+ hashfile_parse(hashfile, nullptr, preload_use_proc, hashfile->error_proc, nullptr);
return hashfile;
error:
- if (hashfile != NULL)
+ if (hashfile != nullptr)
hashfile_close(hashfile);
- return NULL;
+ return nullptr;
}
@@ -522,11 +522,11 @@ const hash_info *hashfile_lookup(hash_file *hashfile, const hash_collection *has
int i;
param.hashes = hashes;
- param.hi = NULL;
+ param.hi = nullptr;
for (i = 0; i < hashfile->preloaded_hash_count; i++)
{
- if (singular_selector_proc(hashfile, &param, NULL, hashfile->preloaded_hashes[i]->hashes))
+ if (singular_selector_proc(hashfile, &param, nullptr, hashfile->preloaded_hashes[i]->hashes))
return hashfile->preloaded_hashes[i];
}
@@ -535,7 +535,7 @@ const hash_info *hashfile_lookup(hash_file *hashfile, const hash_collection *has
return param.hi;
}
-const char *extra_info = NULL;
+const char *extra_info = nullptr;
bool read_hash_config(device_image_interface &image, const char *sysname, std::string &result)
{
@@ -543,7 +543,7 @@ bool read_hash_config(device_image_interface &image, const char *sysname, std::s
const hash_info *info;
/* open the hash file */
- hashfile = hashfile_open(image.device().mconfig().options(), sysname, FALSE, NULL);
+ hashfile = hashfile_open(image.device().mconfig().options(), sysname, FALSE, nullptr);
if (!hashfile)
return false;
@@ -567,7 +567,7 @@ bool hashfile_extrainfo(device_image_interface &image, std::string &result)
{
/* now read the hash file */
image.crc();
- extra_info = NULL;
+ extra_info = nullptr;
int drv = driver_list::find(*image.device().mconfig().options().system());
int compat, open = drv;
bool hashfound;
diff --git a/src/emu/image.cpp b/src/emu/image.cpp
index b9b8b89dc41..ab7f7406854 100644
--- a/src/emu/image.cpp
+++ b/src/emu/image.cpp
@@ -47,7 +47,7 @@ static UINT64 image_fsize_thunk(void *file)
struct io_procs image_ioprocs =
{
- NULL,
+ nullptr,
image_fseek_thunk,
image_fread_thunk,
image_fwrite_thunk,
@@ -69,20 +69,20 @@ static void image_dirs_load(running_machine &machine, int config_type, xml_data_
const char *dev_instance;
const char *working_directory;
- if ((config_type == CONFIG_TYPE_GAME) && (parentnode != NULL))
+ if ((config_type == CONFIG_TYPE_GAME) && (parentnode != nullptr))
{
for (node = xml_get_sibling(parentnode->child, "device"); node; node = xml_get_sibling(node->next, "device"))
{
- dev_instance = xml_get_attribute_string(node, "instance", NULL);
+ dev_instance = xml_get_attribute_string(node, "instance", nullptr);
- if ((dev_instance != NULL) && (dev_instance[0] != '\0'))
+ if ((dev_instance != nullptr) && (dev_instance[0] != '\0'))
{
image_interface_iterator iter(machine.root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
if (!strcmp(dev_instance, image->instance_name())) {
- working_directory = xml_get_attribute_string(node, "directory", NULL);
- if (working_directory != NULL)
+ working_directory = xml_get_attribute_string(node, "directory", nullptr);
+ if (working_directory != nullptr)
image->set_working_directory(working_directory);
}
}
@@ -107,12 +107,12 @@ static void image_dirs_save(running_machine &machine, int config_type, xml_data_
if (config_type == CONFIG_TYPE_GAME)
{
image_interface_iterator iter(machine.root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
dev_instance = image->instance_name();
- node = xml_add_child(parentnode, "device", NULL);
- if (node != NULL)
+ node = xml_add_child(parentnode, "device", nullptr);
+ if (node != nullptr)
{
xml_set_attribute(node, "instance", dev_instance);
xml_set_attribute(node, "directory", image->working_directory());
@@ -131,7 +131,7 @@ static int write_config(emu_options &options, const char *filename, const game_d
char buffer[128];
int retval = 1;
- if (gamedrv != NULL)
+ if (gamedrv != nullptr)
{
sprintf(buffer, "%s.ini", gamedrv->name);
filename = buffer;
@@ -162,7 +162,7 @@ static void image_options_extract(running_machine &machine)
int index = 0;
image_interface_iterator iter(machine.root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
const char *filename = image->filename();
@@ -176,7 +176,7 @@ static void image_options_extract(running_machine &machine)
/* write the config, if appropriate */
if (machine.options().write_config())
- write_config(machine.options(), NULL, &machine.system());
+ write_config(machine.options(), nullptr, &machine.system());
}
/*-------------------------------------------------
@@ -190,7 +190,7 @@ void image_unload_all(running_machine &machine)
image_options_extract(machine);
image_interface_iterator iter(machine.root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
// unload this image
image->unload();
@@ -207,12 +207,12 @@ void image_device_init(running_machine &machine)
/* make sure that any required devices have been allocated */
image_interface_iterator iter(machine.root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
/* is an image specified for this image */
image_name = machine.options().value(image->instance_name());
- if ((image_name != NULL) && (image_name[0] != '\0'))
+ if ((image_name != nullptr) && (image_name[0] != '\0'))
{
/* mark init state */
image->set_init_phase();
@@ -249,9 +249,9 @@ std::string &image_mandatory_scan(running_machine &machine, std::string &mandato
mandatory.clear();
// make sure that any required image has a mounted file
image_interface_iterator iter(machine.root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
- if (image->filename() == NULL && image->must_be_loaded())
+ if (image->filename() == nullptr && image->must_be_loaded())
mandatory.append("\"").append(image->instance_name()).append("\", ");
}
return mandatory;
@@ -266,7 +266,7 @@ void image_postdevice_init(running_machine &machine)
{
/* make sure that any required devices have been allocated */
image_interface_iterator iter(machine.root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
int result = image->finish_load();
/* did the image load fail? */
diff --git a/src/emu/info.cpp b/src/emu/info.cpp
index 2127de32b6f..fdf5e1c9a5c 100644
--- a/src/emu/info.cpp
+++ b/src/emu/info.cpp
@@ -175,7 +175,7 @@ const char info_xml_creator::s_dtd_string[] =
//-------------------------------------------------
info_xml_creator::info_xml_creator(driver_enumerator &drivlist)
- : m_output(NULL),
+ : m_output(nullptr),
m_drivlist(drivlist),
m_lookup_options(m_drivlist.options())
{
@@ -242,7 +242,7 @@ void info_xml_creator::output_one()
ioport_list portlist;
std::string errors;
device_iterator iter(config.root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
portlist.append(*device, errors);
// print the header and the game name
@@ -251,9 +251,9 @@ void info_xml_creator::output_one()
// strip away any path information from the source_file and output it
const char *start = strrchr(driver.source_file, '/');
- if (start == NULL)
+ if (start == nullptr)
start = strrchr(driver.source_file, '\\');
- if (start == NULL)
+ if (start == nullptr)
start = driver.source_file - 1;
fprintf(m_output, " sourcefile=\"%s\"", xml_normalize_string(start + 1));
@@ -277,15 +277,15 @@ void info_xml_creator::output_one()
fprintf(m_output, ">\n");
// output game description
- if (driver.description != NULL)
+ if (driver.description != nullptr)
fprintf(m_output, "\t\t<description>%s</description>\n", xml_normalize_string(driver.description));
// print the year only if is a number or another allowed character (? or +)
- if (driver.year != NULL && strspn(driver.year, "0123456789?+") == strlen(driver.year))
+ if (driver.year != nullptr && strspn(driver.year, "0123456789?+") == strlen(driver.year))
fprintf(m_output, "\t\t<year>%s</year>\n", xml_normalize_string(driver.year));
// print the manufacturer information
- if (driver.manufacturer != NULL)
+ if (driver.manufacturer != nullptr)
fprintf(m_output, "\t\t<manufacturer>%s</manufacturer>\n", xml_normalize_string(driver.manufacturer));
// now print various additional information
@@ -322,17 +322,17 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag)
bool has_speaker = FALSE, has_input = FALSE;
// check if the device adds speakers to the system
sound_interface_iterator snditer(device);
- if (snditer.first() != NULL)
+ if (snditer.first() != nullptr)
has_speaker = TRUE;
// generate input list
ioport_list portlist;
std::string errors;
device_iterator iptiter(device);
- for (device_t *dev = iptiter.first(); dev != NULL; dev = iptiter.next())
+ for (device_t *dev = iptiter.first(); dev != nullptr; dev = iptiter.next())
portlist.append(*dev, errors);
// check if the device adds player inputs (other than dsw and configs) to the system
- for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = portlist.first(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->type() >= IPT_START1 && field->type() < IPT_UI_FIRST)
{
has_input = TRUE;
@@ -354,7 +354,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag)
output_rom(device);
samples_device *samples = dynamic_cast<samples_device*>(&device);
- if (samples==NULL) output_sample(device); // ignore samples_device itself
+ if (samples==nullptr) output_sample(device); // ignore samples_device itself
output_chips(device, devtag);
output_display(device, devtag);
@@ -394,9 +394,9 @@ void info_xml_creator::output_devices()
{
// first, run through devices with roms which belongs to the default configuration
device_iterator deviter(m_drivlist.config().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
{
- if (device->owner() != NULL && device->shortname()!= NULL && strlen(device->shortname())!=0)
+ if (device->owner() != nullptr && device->shortname()!= nullptr && strlen(device->shortname())!=0)
{
if (shortnames.add(device->shortname(), 0, FALSE) != TMERR_DUPLICATE)
output_one_device(*device, device->tag());
@@ -405,9 +405,9 @@ void info_xml_creator::output_devices()
// then, run through slot devices
slot_interface_iterator iter(m_drivlist.config().root_device());
- for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (const device_slot_interface *slot = iter.first(); slot != nullptr; slot = iter.next())
{
- for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
+ for (const device_slot_option *option = slot->first_option(); option != nullptr; option = option->next())
{
std::string temptag("_");
temptag.append(option->name());
@@ -415,7 +415,7 @@ void info_xml_creator::output_devices()
// notify this device and all its subdevices that they are now configured
device_iterator subiter(*dev);
- for (device_t *device = subiter.first(); device != NULL; device = subiter.next())
+ for (device_t *device = subiter.first(); device != nullptr; device = subiter.next())
if (!device->configured())
device->config_complete();
@@ -424,9 +424,9 @@ void info_xml_creator::output_devices()
// also, check for subdevices with ROMs (a few devices are missed otherwise, e.g. MPU401)
device_iterator deviter2(*dev);
- for (device_t *device = deviter2.first(); device != NULL; device = deviter2.next())
+ for (device_t *device = deviter2.first(); device != nullptr; device = deviter2.next())
{
- if (device->owner() == dev && device->shortname()!= NULL && strlen(device->shortname())!=0)
+ if (device->owner() == dev && device->shortname()!= nullptr && strlen(device->shortname())!=0)
{
if (shortnames.add(device->shortname(), 0, FALSE) != TMERR_DUPLICATE)
output_one_device(*device, device->tag());
@@ -448,8 +448,8 @@ void info_xml_creator::output_devices()
void info_xml_creator::output_device_roms()
{
device_iterator deviter(m_drivlist.config().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
- if (device->owner() != NULL && device->shortname()!= NULL && strlen(device->shortname())!=0)
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
+ if (device->owner() != nullptr && device->shortname()!= nullptr && strlen(device->shortname())!=0)
fprintf(m_output, "\t\t<device_ref name=\"%s\"/>\n", xml_normalize_string(device->shortname()));
}
@@ -463,10 +463,10 @@ void info_xml_creator::output_sampleof()
{
// iterate over sample devices
samples_device_iterator iter(m_drivlist.config().root_device());
- for (samples_device *device = iter.first(); device != NULL; device = iter.next())
+ for (samples_device *device = iter.first(); device != nullptr; device = iter.next())
{
samples_iterator sampiter(*device);
- if (sampiter.altbasename() != NULL)
+ if (sampiter.altbasename() != nullptr)
{
fprintf(m_output, " sampleof=\"%s\"", xml_normalize_string(sampiter.altbasename()));
@@ -485,7 +485,7 @@ void info_xml_creator::output_sampleof()
void info_xml_creator::output_bios()
{
// skip if no ROMs
- if (m_drivlist.driver().rom == NULL)
+ if (m_drivlist.driver().rom == nullptr)
return;
// iterate over ROM entries and look for BIOSes
@@ -512,7 +512,7 @@ void info_xml_creator::output_rom(device_t &device)
{
// iterate over 3 different ROM "types": BIOS, ROMs, DISKs
for (int rom_type = 0; rom_type < 3; rom_type++)
- for (const rom_entry *region = rom_first_region(device); region != NULL; region = rom_next_region(region))
+ for (const rom_entry *region = rom_first_region(device); region != nullptr; region = rom_next_region(region))
{
bool is_disk = ROMREGION_ISDISKDATA(region);
@@ -521,12 +521,12 @@ void info_xml_creator::output_rom(device_t &device)
continue;
// iterate through ROM entries
- for (const rom_entry *rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
+ for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
{
bool is_bios = ROM_GETBIOSFLAGS(rom);
const char *name = ROM_GETNAME(rom);
int offset = ROM_GETOFFSET(rom);
- const char *merge_name = NULL;
+ const char *merge_name = nullptr;
char bios_name[100];
// BIOS ROMs only apply to bioses
@@ -538,7 +538,7 @@ void info_xml_creator::output_rom(device_t &device)
if (!hashes.flag(hash_collection::FLAG_NO_DUMP))
merge_name = get_merge_name(hashes);
if (&device != &m_drivlist.config().root_device())
- merge_name = NULL;
+ merge_name = nullptr;
// scan for a BIOS name
bios_name[0] = 0;
if (!is_disk && is_bios)
@@ -561,9 +561,9 @@ void info_xml_creator::output_rom(device_t &device)
output.append("\t\t<disk");
// add name, merge, bios, and size tags */
- if (name != NULL && name[0] != 0)
+ if (name != nullptr && name[0] != 0)
strcatprintf(output," name=\"%s\"", xml_normalize_string(name));
- if (merge_name != NULL)
+ if (merge_name != nullptr)
strcatprintf(output," merge=\"%s\"", xml_normalize_string(merge_name));
if (bios_name[0] != 0)
strcatprintf(output," bios=\"%s\"", xml_normalize_string(bios_name));
@@ -615,11 +615,11 @@ void info_xml_creator::output_sample(device_t &device)
{
// iterate over sample devices
samples_device_iterator sampiter(device);
- for (samples_device *samples = sampiter.first(); samples != NULL; samples = sampiter.next())
+ for (samples_device *samples = sampiter.first(); samples != nullptr; samples = sampiter.next())
{
samples_iterator iter(*samples);
tagmap_t<int> already_printed;
- for (const char *samplename = iter.first(); samplename != NULL; samplename = iter.next())
+ for (const char *samplename = iter.first(); samplename != nullptr; samplename = iter.next())
{
// filter out duplicates
if (already_printed.add(samplename, 1) == TMERR_DUPLICATE)
@@ -641,7 +641,7 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag)
{
// iterate over executable devices
execute_interface_iterator execiter(device);
- for (device_execute_interface *exec = execiter.first(); exec != NULL; exec = execiter.next())
+ for (device_execute_interface *exec = execiter.first(); exec != nullptr; exec = execiter.next())
{
if (strcmp(exec->device().tag(), device.tag()))
{
@@ -659,7 +659,7 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag)
// iterate over sound devices
sound_interface_iterator sounditer(device);
- for (device_sound_interface *sound = sounditer.first(); sound != NULL; sound = sounditer.next())
+ for (device_sound_interface *sound = sounditer.first(); sound != nullptr; sound = sounditer.next())
{
if (strcmp(sound->device().tag(), device.tag()))
{
@@ -687,7 +687,7 @@ void info_xml_creator::output_display(device_t &device, const char *root_tag)
{
// iterate over screens
screen_device_iterator iter(device);
- for (const screen_device *screendev = iter.first(); screendev != NULL; screendev = iter.next())
+ for (const screen_device *screendev = iter.first(); screendev != nullptr; screendev = iter.next())
{
if (strcmp(screendev->tag(), device.tag()))
{
@@ -777,7 +777,7 @@ void info_xml_creator::output_sound(device_t &device)
// if we have no sound, zero m_output the speaker count
sound_interface_iterator snditer(device);
- if (snditer.first() == NULL)
+ if (snditer.first() == nullptr)
speakers = 0;
fprintf(m_output, "\t\t<sound channels=\"%d\"/>\n", speakers);
@@ -841,8 +841,8 @@ void info_xml_creator::output_input(const ioport_list &portlist)
bool gambling = false;
// iterate over the ports
- for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = portlist.first(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
{
int analogtype = -1;
@@ -1046,20 +1046,20 @@ void info_xml_creator::output_input(const ioport_list &portlist)
}
// output analog types
- for (int type = 0; type < ANALOG_TYPE_COUNT; type++)
- if (control_info[type].type != NULL)
+ for (auto & elem : control_info)
+ if (elem.type != nullptr)
{
- fprintf(m_output, "\t\t\t<control type=\"%s\"", xml_normalize_string(control_info[type].type));
- if (control_info[type].min != 0 || control_info[type].max != 0)
+ fprintf(m_output, "\t\t\t<control type=\"%s\"", xml_normalize_string(elem.type));
+ if (elem.min != 0 || elem.max != 0)
{
- fprintf(m_output, " minimum=\"%d\"", control_info[type].min);
- fprintf(m_output, " maximum=\"%d\"", control_info[type].max);
+ fprintf(m_output, " minimum=\"%d\"", elem.min);
+ fprintf(m_output, " maximum=\"%d\"", elem.max);
}
- if (control_info[type].sensitivity != 0)
- fprintf(m_output, " sensitivity=\"%d\"", control_info[type].sensitivity);
- if (control_info[type].keydelta != 0)
- fprintf(m_output, " keydelta=\"%d\"", control_info[type].keydelta);
- if (control_info[type].reverse)
+ if (elem.sensitivity != 0)
+ fprintf(m_output, " sensitivity=\"%d\"", elem.sensitivity);
+ if (elem.keydelta != 0)
+ fprintf(m_output, " keydelta=\"%d\"", elem.keydelta);
+ if (elem.reverse)
fprintf(m_output, " reverse=\"yes\"");
fprintf(m_output, "/>\n");
@@ -1091,8 +1091,8 @@ void info_xml_creator::output_input(const ioport_list &portlist)
void info_xml_creator::output_switches(const ioport_list &portlist, const char *root_tag, int type, const char *outertag, const char *innertag)
{
// iterate looking for DIP switches
- for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = portlist.first(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->type() == type)
{
std::string output;
@@ -1106,7 +1106,7 @@ void info_xml_creator::output_switches(const ioport_list &portlist, const char *
strcatprintf(output,"\t\t<%s name=\"%s\" tag=\"%s\" mask=\"%u\">\n", outertag, normalized_field_name.c_str(), normalized_newtag.c_str(), field->mask());
// loop over settings
- for (ioport_setting *setting = field->first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = field->first_setting(); setting != nullptr; setting = setting->next())
{
strcatprintf(output,"\t\t\t<%s name=\"%s\" value=\"%u\"%s/>\n", innertag, xml_normalize_string(setting->name()), setting->value(), setting->value() == field->defvalue() ? " default=\"yes\"" : "");
}
@@ -1125,10 +1125,10 @@ void info_xml_creator::output_switches(const ioport_list &portlist, const char *
void info_xml_creator::output_ports(const ioport_list &portlist)
{
// cycle through ports
- for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
+ for (ioport_port *port = portlist.first(); port != nullptr; port = port->next())
{
fprintf(m_output,"\t\t<port tag=\"%s\">\n",port->tag());
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
{
if(field->is_analog())
fprintf(m_output,"\t\t\t<analog mask=\"%u\"/>\n",field->mask());
@@ -1147,8 +1147,8 @@ void info_xml_creator::output_ports(const ioport_list &portlist)
void info_xml_creator::output_adjusters(const ioport_list &portlist)
{
// iterate looking for Adjusters
- for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = portlist.first(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->type() == IPT_ADJUSTER)
fprintf(m_output, "\t\t<adjuster name=\"%s\" default=\"%d\"/>\n", xml_normalize_string(field->name()), field->defvalue());
}
@@ -1224,7 +1224,7 @@ void info_xml_creator::output_driver()
void info_xml_creator::output_images(device_t &device, const char *root_tag)
{
image_interface_iterator iter(device);
- for (const device_image_interface *imagedev = iter.first(); imagedev != NULL; imagedev = iter.next())
+ for (const device_image_interface *imagedev = iter.first(); imagedev != nullptr; imagedev = iter.next())
{
if (strcmp(imagedev->device().tag(), device.tag()))
{
@@ -1259,12 +1259,12 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
std::string extensions(imagedev->file_extensions());
char *ext = strtok((char *)extensions.c_str(), ",");
- while (ext != NULL)
+ while (ext != nullptr)
{
fprintf(m_output, "\t\t\t<extension");
fprintf(m_output, " name=\"%s\"", xml_normalize_string(ext));
fprintf(m_output, "/>\n");
- ext = strtok(NULL, ",");
+ ext = strtok(nullptr, ",");
}
fprintf(m_output, "\t\t</device>\n");
@@ -1280,7 +1280,7 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag)
void info_xml_creator::output_slots(device_t &device, const char *root_tag)
{
slot_interface_iterator iter(device);
- for (const device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (const device_slot_interface *slot = iter.first(); slot != nullptr; slot = iter.next())
{
if (slot->fixed()) continue; // or shall we list these as non-configurable?
@@ -1297,7 +1297,7 @@ void info_xml_creator::output_slots(device_t &device, const char *root_tag)
fprintf(m_output, " interface=\"%s\"", xml_normalize_string(slot->slot_interface()));
*/
- for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
+ for (const device_slot_option *option = slot->first_option(); option != nullptr; option = option->next())
{
if (option->selectable())
{
@@ -1332,7 +1332,7 @@ void info_xml_creator::output_slots(device_t &device, const char *root_tag)
void info_xml_creator::output_software_list()
{
software_list_device_iterator iter(m_drivlist.config().root_device());
- for (const software_list_device *swlist = iter.first(); swlist != NULL; swlist = iter.next())
+ for (const software_list_device *swlist = iter.first(); swlist != nullptr; swlist = iter.next())
{
fprintf(m_output, "\t\t<softwarelist name=\"%s\" ", swlist->list_name());
fprintf(m_output, "status=\"%s\" ", (swlist->list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM) ? "original" : "compatible");
@@ -1353,11 +1353,11 @@ void info_xml_creator::output_software_list()
void info_xml_creator::output_ramoptions()
{
ram_device_iterator iter(m_drivlist.config().root_device());
- for (const ram_device *ram = iter.first(); ram != NULL; ram = iter.next())
+ for (const ram_device *ram = iter.first(); ram != nullptr; ram = iter.next())
{
fprintf(m_output, "\t\t<ramoption default=\"1\">%u</ramoption>\n", ram->default_size());
- if (ram->extra_options() != NULL)
+ if (ram->extra_options() != nullptr)
{
std::string options(ram->extra_options());
for (int start = 0, end = options.find_first_of(',');; start = end + 1, end = options.find_first_of(',', start))
@@ -1381,13 +1381,13 @@ void info_xml_creator::output_ramoptions()
const char *info_xml_creator::get_merge_name(const hash_collection &romhashes)
{
// walk the parent chain
- const char *merge_name = NULL;
+ const char *merge_name = nullptr;
for (int clone_of = m_drivlist.find(m_drivlist.driver().parent); clone_of != -1; clone_of = m_drivlist.find(m_drivlist.driver(clone_of).parent))
{
// look in the parent's ROMs
device_t *device = &m_drivlist.config(clone_of, m_lookup_options).root_device();
- for (const rom_entry *pregion = rom_first_region(*device); pregion != NULL; pregion = rom_next_region(pregion))
- for (const rom_entry *prom = rom_first_file(pregion); prom != NULL; prom = rom_next_file(prom))
+ for (const rom_entry *pregion = rom_first_region(*device); pregion != nullptr; pregion = rom_next_region(pregion))
+ for (const rom_entry *prom = rom_first_file(pregion); prom != nullptr; prom = rom_next_file(prom))
{
hash_collection phashes(ROM_GETHASHDATA(prom));
if (!phashes.flag(hash_collection::FLAG_NO_DUMP) && romhashes == phashes)
diff --git a/src/emu/inpttype.h b/src/emu/inpttype.h
index 849fea74d61..79843fdff34 100644
--- a/src/emu/inpttype.h
+++ b/src/emu/inpttype.h
@@ -755,33 +755,33 @@ void construct_core_types_UI(simple_list<input_type_entry> &typelist)
void construct_core_types_OSD(simple_list<input_type_entry> &typelist)
{
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_1, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_2, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_3, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_4, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_5, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_6, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_7, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_8, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_9, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_10, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_11, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_12, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_13, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_14, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_15, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_16, NULL, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_1, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_2, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_3, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_4, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_5, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_6, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_7, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_8, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_9, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_10, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_11, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_12, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_13, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_14, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_15, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, UI, OSD_16, nullptr, input_seq() )
}
void construct_core_types_invalid(simple_list<input_type_entry> &typelist)
{
- INPUT_PORT_DIGITAL_TYPE( 0, INVALID, UNKNOWN, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, INVALID, UNUSED, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, INVALID, SPECIAL, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, INVALID, OTHER, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, INVALID, ADJUSTER, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, INVALID, DIPSWITCH, NULL, input_seq() )
- INPUT_PORT_DIGITAL_TYPE( 0, INVALID, CONFIG, NULL, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, INVALID, UNKNOWN, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, INVALID, UNUSED, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, INVALID, SPECIAL, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, INVALID, OTHER, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, INVALID, ADJUSTER, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, INVALID, DIPSWITCH, nullptr, input_seq() )
+ INPUT_PORT_DIGITAL_TYPE( 0, INVALID, CONFIG, nullptr, input_seq() )
}
void construct_core_types(simple_list<input_type_entry> &typelist)
diff --git a/src/emu/input.cpp b/src/emu/input.cpp
index 5e50d3e66fc..2d19e6b1bf4 100644
--- a/src/emu/input.cpp
+++ b/src/emu/input.cpp
@@ -54,9 +54,9 @@ public:
input_device_switch_item(input_device &device, const char *name, void *internal, input_item_id itemid, item_get_state_func getstate);
// readers
- virtual INT32 read_as_switch(input_item_modifier modifier);
- virtual INT32 read_as_relative(input_item_modifier modifier);
- virtual INT32 read_as_absolute(input_item_modifier modifier);
+ virtual INT32 read_as_switch(input_item_modifier modifier) override;
+ virtual INT32 read_as_relative(input_item_modifier modifier) override;
+ virtual INT32 read_as_absolute(input_item_modifier modifier) override;
// steadykey helper
bool steadykey_changed();
@@ -79,9 +79,9 @@ public:
input_device_relative_item(input_device &device, const char *name, void *internal, input_item_id itemid, item_get_state_func getstate);
// readers
- virtual INT32 read_as_switch(input_item_modifier modifier);
- virtual INT32 read_as_relative(input_item_modifier modifier);
- virtual INT32 read_as_absolute(input_item_modifier modifier);
+ virtual INT32 read_as_switch(input_item_modifier modifier) override;
+ virtual INT32 read_as_relative(input_item_modifier modifier) override;
+ virtual INT32 read_as_absolute(input_item_modifier modifier) override;
};
@@ -95,9 +95,9 @@ public:
input_device_absolute_item(input_device &device, const char *name, void *internal, input_item_id itemid, item_get_state_func getstate);
// readers
- virtual INT32 read_as_switch(input_item_modifier modifier);
- virtual INT32 read_as_relative(input_item_modifier modifier);
- virtual INT32 read_as_absolute(input_item_modifier modifier);
+ virtual INT32 read_as_switch(input_item_modifier modifier) override;
+ virtual INT32 read_as_relative(input_item_modifier modifier) override;
+ virtual INT32 read_as_absolute(input_item_modifier modifier) override;
};
@@ -119,7 +119,7 @@ struct code_string_table
for (const code_string_table *current = this; current->m_code != ~0; current++)
if (current->m_code == code)
return current->m_string;
- return NULL;
+ return nullptr;
}
UINT32 m_code;
@@ -411,7 +411,7 @@ static const code_string_table itemid_token_table[] =
{ ITEM_ID_ADD_RELATIVE15,"ADDREL15" },
{ ITEM_ID_ADD_RELATIVE16,"ADDREL16" },
- { ~0U, NULL }
+ { ~0U, nullptr }
};
@@ -509,7 +509,7 @@ bool joystick_map::parse(const char *mapstring)
const char *ptr = strchr(validchars, *mapstring++);
// invalid characters exit immediately
- if (ptr == NULL)
+ if (ptr == nullptr)
return false;
m_map[rownum][colnum] = charmap[ptr - validchars];
}
@@ -532,11 +532,11 @@ bool joystick_map::parse(const char *mapstring)
const char *joystick_map::to_string(std::string &str) const
{
strprintf(str, "%s\n", m_origstring.c_str());
- for (int rownum = 0; rownum < 9; rownum++)
+ for (auto & elem : m_map)
{
str.append(" ");
- for (int colnum = 0; colnum < 9; colnum++)
- switch (m_map[rownum][colnum])
+ for (auto & elem_colnum : elem)
+ switch (elem_colnum)
{
case JOYSTICK_MAP_UP | JOYSTICK_MAP_LEFT: str.append("7"); break;
case JOYSTICK_MAP_UP: str.append("8"); break;
@@ -594,7 +594,7 @@ input_code::input_code(input_device &device, input_item_id itemid)
{
assert(itemid < ITEM_ID_ABSOLUTE_MAXIMUM);
input_device_item *item = device.item(itemid);
- assert(item != NULL);
+ assert(item != nullptr);
m_internal = ((device.devclass() & 0xf) << 28) | ((device.devindex() & 0xff) << 20) | ((item->itemclass() & 0xf) << 16) | (ITEM_MODIFIER_NONE << 12) | (item->itemid() & 0xfff);
}
@@ -673,10 +673,10 @@ bool input_seq::is_valid() const
input_item_class lastclass = ITEM_CLASS_INVALID;
input_code lastcode = INPUT_CODE_INVALID;
int positive_code_count = 0;
- for (int seqnum = 0; seqnum < ARRAY_LENGTH(m_code); seqnum++)
+ for (auto code : m_code)
{
// invalid codes are never permitted
- input_code code = m_code[seqnum];
+
if (code == INPUT_CODE_INVALID)
return false;
@@ -773,9 +773,9 @@ void input_seq::backspace()
void input_seq::replace(input_code oldcode, input_code newcode)
{
- for (int codenum = 0; codenum < ARRAY_LENGTH(m_code); codenum++)
- if (m_code[codenum] == oldcode)
- m_code[codenum] = newcode;
+ for (auto & elem : m_code)
+ if (elem == oldcode)
+ elem = newcode;
}
@@ -827,20 +827,20 @@ input_device::input_device(input_class &_class, int devindex, const char *name,
input_item_id input_device::add_item(const char *name, input_item_id itemid, item_get_state_func getstate, void *internal)
{
assert_always(machine().phase() == MACHINE_PHASE_INIT, "Can only call input_device::add_item at init time!");
- assert(name != NULL);
+ assert(name != nullptr);
assert(itemid > ITEM_ID_INVALID && itemid < ITEM_ID_MAXIMUM);
- assert(getstate != NULL);
+ assert(getstate != nullptr);
// if we have a generic ID, pick a new internal one
input_item_id originalid = itemid;
if (itemid >= ITEM_ID_OTHER_SWITCH && itemid <= ITEM_ID_OTHER_AXIS_RELATIVE)
for (itemid = (input_item_id)(ITEM_ID_MAXIMUM + 1); itemid <= ITEM_ID_ABSOLUTE_MAXIMUM; ++itemid)
- if (m_item[itemid] == NULL)
+ if (m_item[itemid] == nullptr)
break;
assert(itemid <= ITEM_ID_ABSOLUTE_MAXIMUM);
// make sure we don't have any overlap
- assert(m_item[itemid] == NULL);
+ assert(m_item[itemid] == nullptr);
// determine the class and create the appropriate item class
switch (m_class.standard_item_class(originalid))
@@ -921,7 +921,7 @@ void input_device::apply_steadykey() const
for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= m_maxitem; ++itemid)
{
input_device_item *item = m_item[itemid].get();
- if (item != NULL && item->itemclass() == ITEM_CLASS_SWITCH)
+ if (item != nullptr && item->itemclass() == ITEM_CLASS_SWITCH)
if (downcast<input_device_switch_item *>(item)->steadykey_changed())
anything_changed = true;
}
@@ -931,7 +931,7 @@ void input_device::apply_steadykey() const
for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= m_maxitem; ++itemid)
{
input_device_item *item = m_item[itemid].get();
- if (item != NULL && item->itemclass() == ITEM_CLASS_SWITCH)
+ if (item != nullptr && item->itemclass() == ITEM_CLASS_SWITCH)
downcast<input_device_switch_item *>(item)->steadykey_update_to_current();
}
}
@@ -968,7 +968,7 @@ input_device *input_class::add_device(const char *name, void *internal)
// find the next empty index
int devindex;
for (devindex = 0; devindex < DEVICE_INDEX_MAXIMUM; devindex++)
- if (m_device[devindex] == NULL)
+ if (m_device[devindex] == nullptr)
break;
// call through
@@ -978,9 +978,9 @@ input_device *input_class::add_device(const char *name, void *internal)
input_device *input_class::add_device(int devindex, const char *name, void *internal)
{
assert_always(machine().phase() == MACHINE_PHASE_INIT, "Can only call input_class::add_device at init time!");
- assert(name != NULL);
+ assert(name != nullptr);
assert(devindex >= 0 && devindex < DEVICE_INDEX_MAXIMUM);
- assert(m_device[devindex] == NULL);
+ assert(m_device[devindex] == nullptr);
// allocate a new device
m_device[devindex] = std::make_unique<input_device>(*this, devindex, name, internal);
@@ -1023,7 +1023,7 @@ void input_class::frame_callback()
{
// iterate over all devices in our class
for (int devnum = 0; devnum <= m_maxindex; devnum++)
- if (m_device[devnum] != NULL)
+ if (m_device[devnum] != nullptr)
m_device[devnum]->apply_steadykey();
}
@@ -1073,7 +1073,7 @@ INT32 input_manager::code_value(input_code code)
{
// return 0 for any invalid devices
input_device *device = device_from_code(code);
- if (device == NULL)
+ if (device == nullptr)
break;
// also return 0 if the device class is disabled
@@ -1098,7 +1098,7 @@ INT32 input_manager::code_value(input_code code)
// lookup the item for the appropriate index
code.set_device_index(curindex);
input_device_item *item = item_from_code(code);
- if (item == NULL)
+ if (item == nullptr)
continue;
// process items according to their native type
@@ -1186,7 +1186,7 @@ void input_manager::reset_polling()
{
// fetch the device; ignore if NULL
input_device *device = m_class[devclass]->device(devnum);
- if (device == NULL)
+ if (device == nullptr)
continue;
// iterate over items within each device
@@ -1194,7 +1194,7 @@ void input_manager::reset_polling()
{
// for any non-switch items, set memory equal to the current value
input_device_item *item = device->item(itemid);
- if (item != NULL && item->itemclass() != ITEM_CLASS_SWITCH)
+ if (item != nullptr && item->itemclass() != ITEM_CLASS_SWITCH)
item->set_memory(code_value(input_code(*device, itemid)));
}
}
@@ -1213,14 +1213,14 @@ input_code input_manager::poll_switches()
{
// fetch the device; ignore if NULL
input_device *device = m_class[devclass]->device(devnum);
- if (device == NULL)
+ if (device == nullptr)
continue;
// iterate over items within each device
for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); ++itemid)
{
input_device_item *item = device->item(itemid);
- if (item != NULL)
+ if (item != nullptr)
{
input_code code(*device, itemid);
@@ -1293,14 +1293,14 @@ input_code input_manager::poll_keyboard_switches()
{
// fetch the device; ignore if NULL
input_device *device = m_keyboard_class.device(devnum);
- if (device == NULL)
+ if (device == nullptr)
continue;
// iterate over items within each device
for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); ++itemid)
{
input_device_item *item = device->item(itemid);
- if (item != NULL && item->itemclass() == ITEM_CLASS_SWITCH)
+ if (item != nullptr && item->itemclass() == ITEM_CLASS_SWITCH)
{
input_code code(*device, itemid);
if (code_pressed_once(code))
@@ -1367,14 +1367,14 @@ input_code input_manager::poll_axes()
{
// fetch the device; ignore if NULL
input_device *device = m_class[devclass]->device(devnum);
- if (device == NULL)
+ if (device == nullptr)
continue;
// iterate over items within each device
for (input_item_id itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); ++itemid)
{
input_device_item *item = device->item(itemid);
- if (item != NULL && item->itemclass() != ITEM_CLASS_SWITCH)
+ if (item != nullptr && item->itemclass() != ITEM_CLASS_SWITCH)
{
input_code code(*device, itemid);
if (code_check_axis(*item, code))
@@ -1401,7 +1401,7 @@ input_device *input_manager::device_from_code(input_code code) const
return m_class[devclass]->device(code.device_index());
// otherwise, return NULL
- return NULL;
+ return nullptr;
}
@@ -1414,8 +1414,8 @@ input_device_item *input_manager::item_from_code(input_code code) const
{
// first get the device; if none, then we don't have an item
input_device *device = device_from_code(code);
- if (device == NULL)
- return NULL;
+ if (device == nullptr)
+ return nullptr;
// then return the device's item
return device->item(code.item_id());
@@ -1430,8 +1430,8 @@ input_device_item *input_manager::item_from_code(input_code code) const
void input_manager::reset_memory()
{
// reset all entries in switch memory to invalid
- for (int memnum = 0; memnum < ARRAY_LENGTH(m_switch_memory); memnum++)
- m_switch_memory[memnum] = INPUT_CODE_INVALID;
+ for (auto & elem : m_switch_memory)
+ elem = INPUT_CODE_INVALID;
}
@@ -1447,7 +1447,7 @@ input_code input_manager::code_from_itemid(input_item_id itemid) const
for (int devnum = 0; devnum <= m_class[devclass]->maxindex(); devnum++)
{
input_device *device = m_class[devclass]->device(devnum);
- if (device != NULL && device->item(itemid) != NULL)
+ if (device != nullptr && device->item(itemid) != nullptr)
return input_code(*device, itemid);
}
@@ -1466,7 +1466,7 @@ const char *input_manager::code_name(std::string &str, input_code code) const
// if nothing there, return an empty string
input_device_item *item = item_from_code(code);
- if (item == NULL)
+ if (item == nullptr)
return str.c_str();
// determine the devclass part
@@ -1505,7 +1505,7 @@ const char *input_manager::code_name(std::string &str, input_code code) const
str.append(" ").append(devindex);
if (devcode[0] != 0)
str.append(" ").append(devcode);
- if (modifier != NULL)
+ if (modifier != nullptr)
str.append(" ").append(modifier);
// delete any leading spaces
@@ -1531,14 +1531,14 @@ const char *input_manager::code_to_token(std::string &str, input_code code) cons
// determine the itemid part; look up in the table if we don't have a token
input_device_item *item = item_from_code(code);
- const char *devcode = (item != NULL) ? item->token() : "UNKNOWN";
+ const char *devcode = (item != nullptr) ? item->token() : "UNKNOWN";
// determine the modifier part
const char *modifier = (*modifier_token_table)[code.item_modifier()];
// determine the itemclass part; if we match the native class, we don't include this
const char *itemclass = "";
- if (item == NULL || item->itemclass() != code.item_class())
+ if (item == nullptr || item->itemclass() != code.item_class())
itemclass = (*itemclass_token_table)[code.item_class()];
// concatenate the strings
@@ -1547,7 +1547,7 @@ const char *input_manager::code_to_token(std::string &str, input_code code) cons
str.append("_").append(devindex);
if (devcode[0] != 0)
str.append("_").append(devcode);
- if (modifier != NULL)
+ if (modifier != nullptr)
str.append("_").append(modifier);
if (itemclass[0] != 0)
str.append("_").append(itemclass);
@@ -1569,10 +1569,10 @@ input_code input_manager::code_from_token(const char *_token)
{
// make a token up to the next underscore
char *score = (char *)strchr(_token, '_');
- token[numtokens++].assign(_token, (score == NULL) ? strlen(_token) : (score - _token));
+ token[numtokens++].assign(_token, (score == nullptr) ? strlen(_token) : (score - _token));
// if we hit the end, we're done, else advance our pointer
- if (score == NULL)
+ if (score == nullptr)
break;
_token = score + 1;
}
@@ -1607,14 +1607,14 @@ input_code input_manager::code_from_token(const char *_token)
{
// if this is an invalid device, we have nothing to look up
input_device *device = m_class[devclass]->device(devindex);
- if (device == NULL)
+ if (device == nullptr)
return INPUT_CODE_INVALID;
// if not a standard code, look it up in the device specific codes
for (itemid = ITEM_ID_FIRST_VALID; itemid <= device->maxitem(); ++itemid)
{
input_device_item *item = device->item(itemid);
- if (item != NULL && token[curtok].compare(item->token()) == 0)
+ if (item != nullptr && token[curtok].compare(item->token()) == 0)
{
// take the itemclass from the item
itemclass = item->itemclass();
@@ -1811,7 +1811,7 @@ void input_manager::seq_poll_start(input_item_class itemclass, const input_seq *
m_poll_seq.reset();
// grab the starting sequence to append to, and append an OR
- if (startseq != NULL)
+ if (startseq != nullptr)
{
m_poll_seq = *startseq;
if (m_poll_seq.length() > 0)
@@ -2079,7 +2079,7 @@ bool input_manager::set_global_joystick_map(const char *mapstring)
for (int joynum = 0; joynum <= m_joystick_class.maxindex(); joynum++)
{
input_device *device = m_joystick_class.device(joynum);
- if (device != NULL)
+ if (device != nullptr)
device->set_joystick_map(map);
}
return true;
@@ -2106,7 +2106,7 @@ input_device_item::input_device_item(input_device &device, const char *name, voi
m_memory(0)
{
// use a standard token name for know item IDs
- if (itemid <= ITEM_ID_MAXIMUM && (*itemid_token_table)[itemid] != NULL)
+ if (itemid <= ITEM_ID_MAXIMUM && (*itemid_token_table)[itemid] != nullptr)
m_token.assign((*itemid_token_table)[itemid]);
// otherwise, create a tokenized name
@@ -2160,7 +2160,7 @@ INT32 input_device_switch_item::read_as_switch(input_item_modifier modifier)
if (m_itemid == ITEM_ID_BUTTON1)
{
input_device_item *button2_item = m_device.item(ITEM_ID_BUTTON2);
- if (button2_item != NULL)
+ if (button2_item != nullptr)
return button2_item->update_value() | update_value();
}
@@ -2310,7 +2310,7 @@ INT32 input_device_absolute_item::read_as_switch(input_item_modifier modifier)
{
input_device_item *xaxis_item = m_device.item(ITEM_ID_XAXIS);
input_device_item *yaxis_item = m_device.item(ITEM_ID_YAXIS);
- if (xaxis_item != NULL && yaxis_item != NULL)
+ if (xaxis_item != nullptr && yaxis_item != nullptr)
{
// determine which item we didn't update, and update it
assert(this == xaxis_item || this == yaxis_item);
@@ -2364,7 +2364,7 @@ INT32 input_device_absolute_item::read_as_absolute(input_item_modifier modifier)
{
// if it is pressed, return (min,max)
input_device_item *button2_item = m_device.item(ITEM_ID_BUTTON2);
- if (button2_item != NULL && button2_item->update_value())
+ if (button2_item != nullptr && button2_item->update_value())
result = (m_itemid == ITEM_ID_XAXIS) ? INPUT_ABSOLUTE_MIN : INPUT_ABSOLUTE_MAX;
}
diff --git a/src/emu/input.h b/src/emu/input.h
index da2b6a2b3ec..b0f006d3fd9 100644
--- a/src/emu/input.h
+++ b/src/emu/input.h
@@ -558,7 +558,7 @@ public:
bool lightgun_reload_button() const { return m_lightgun_reload_button; }
// item management
- input_item_id add_item(const char *name, input_item_id itemid, item_get_state_func getstate, void *internal = NULL);
+ input_item_id add_item(const char *name, input_item_id itemid, item_get_state_func getstate, void *internal = nullptr);
void set_joystick_map(const joystick_map &map) { m_joymap = map; }
// helpers
@@ -595,7 +595,7 @@ public:
// getters
input_manager &manager() const { return m_manager; }
running_machine &machine() const;
- input_device *device(int index) const { return (index <= m_maxindex) ? m_device[index].get() : NULL; }
+ input_device *device(int index) const { return (index <= m_maxindex) ? m_device[index].get() : nullptr; }
input_device_class devclass() const { return m_devclass; }
int maxindex() const { return m_maxindex; }
bool enabled() const { return m_enabled; }
@@ -606,8 +606,8 @@ public:
void set_multi(bool multi = true) { m_multi = multi; }
// device management
- input_device *add_device(const char *name, void *internal = NULL);
- input_device *add_device(int devindex, const char *name, void *internal = NULL);
+ input_device *add_device(const char *name, void *internal = nullptr);
+ input_device *add_device(int devindex, const char *name, void *internal = nullptr);
// misc helpers
input_item_class standard_item_class(input_item_id itemid);
@@ -637,7 +637,7 @@ public:
// getters
running_machine &machine() const { return m_machine; }
- input_class &device_class(input_device_class devclass) { assert(devclass < ARRAY_LENGTH(m_class)); assert(m_class[devclass] != NULL); return *m_class[devclass]; }
+ input_class &device_class(input_device_class devclass) { assert(devclass < ARRAY_LENGTH(m_class)); assert(m_class[devclass] != nullptr); return *m_class[devclass]; }
// input code readers
INT32 code_value(input_code code);
@@ -663,7 +663,7 @@ public:
INT32 seq_axis_value(const input_seq &seq, input_item_class &itemclass);
// input sequence polling
- void seq_poll_start(input_item_class itemclass, const input_seq *startseq = NULL);
+ void seq_poll_start(input_item_class itemclass, const input_seq *startseq = nullptr);
bool seq_poll();
const input_seq &seq_poll_final() const { return m_poll_seq; }
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index 19694f1fd9d..9bb43f0c4ec 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -191,296 +191,296 @@ static const char *const seqtypestrings[] = { "standard", "increment", "decremen
// master character info table
static const char_info charinfo[] =
{
- { 0x0008, "Backspace", NULL }, // Backspace
+ { 0x0008, "Backspace", nullptr }, // Backspace
{ 0x0009, "Tab", " " }, // Tab
- { 0x000c, "Clear", NULL }, // Clear
- { 0x000d, "Enter", NULL }, // Enter
- { 0x001a, "Esc", NULL }, // Esc
+ { 0x000c, "Clear", nullptr }, // Clear
+ { 0x000d, "Enter", nullptr }, // Enter
+ { 0x001a, "Esc", nullptr }, // Esc
{ 0x0020, "Space", " " }, // Space
- { 0x0061, NULL, "A" }, // a
- { 0x0062, NULL, "B" }, // b
- { 0x0063, NULL, "C" }, // c
- { 0x0064, NULL, "D" }, // d
- { 0x0065, NULL, "E" }, // e
- { 0x0066, NULL, "F" }, // f
- { 0x0067, NULL, "G" }, // g
- { 0x0068, NULL, "H" }, // h
- { 0x0069, NULL, "I" }, // i
- { 0x006a, NULL, "J" }, // j
- { 0x006b, NULL, "K" }, // k
- { 0x006c, NULL, "L" }, // l
- { 0x006d, NULL, "M" }, // m
- { 0x006e, NULL, "N" }, // n
- { 0x006f, NULL, "O" }, // o
- { 0x0070, NULL, "P" }, // p
- { 0x0071, NULL, "Q" }, // q
- { 0x0072, NULL, "R" }, // r
- { 0x0073, NULL, "S" }, // s
- { 0x0074, NULL, "T" }, // t
- { 0x0075, NULL, "U" }, // u
- { 0x0076, NULL, "V" }, // v
- { 0x0077, NULL, "W" }, // w
- { 0x0078, NULL, "X" }, // x
- { 0x0079, NULL, "Y" }, // y
- { 0x007a, NULL, "Z" }, // z
- { 0x00a0, NULL, " " }, // non breaking space
- { 0x00a1, NULL, "!" }, // inverted exclaimation mark
- { 0x00a6, NULL, "|" }, // broken bar
- { 0x00a9, NULL, "(c)" }, // copyright sign
- { 0x00ab, NULL, "<<" }, // left pointing double angle
- { 0x00ae, NULL, "(r)" }, // registered sign
- { 0x00bb, NULL, ">>" }, // right pointing double angle
- { 0x00bc, NULL, "1/4" }, // vulgar fraction one quarter
- { 0x00bd, NULL, "1/2" }, // vulgar fraction one half
- { 0x00be, NULL, "3/4" }, // vulgar fraction three quarters
- { 0x00bf, NULL, "?" }, // inverted question mark
- { 0x00c0, NULL, "A" }, // 'A' grave
- { 0x00c1, NULL, "A" }, // 'A' acute
- { 0x00c2, NULL, "A" }, // 'A' circumflex
- { 0x00c3, NULL, "A" }, // 'A' tilde
- { 0x00c4, NULL, "A" }, // 'A' diaeresis
- { 0x00c5, NULL, "A" }, // 'A' ring above
- { 0x00c6, NULL, "AE" }, // 'AE' ligature
- { 0x00c7, NULL, "C" }, // 'C' cedilla
- { 0x00c8, NULL, "E" }, // 'E' grave
- { 0x00c9, NULL, "E" }, // 'E' acute
- { 0x00ca, NULL, "E" }, // 'E' circumflex
- { 0x00cb, NULL, "E" }, // 'E' diaeresis
- { 0x00cc, NULL, "I" }, // 'I' grave
- { 0x00cd, NULL, "I" }, // 'I' acute
- { 0x00ce, NULL, "I" }, // 'I' circumflex
- { 0x00cf, NULL, "I" }, // 'I' diaeresis
- { 0x00d0, NULL, "D" }, // 'ETH'
- { 0x00d1, NULL, "N" }, // 'N' tilde
- { 0x00d2, NULL, "O" }, // 'O' grave
- { 0x00d3, NULL, "O" }, // 'O' acute
- { 0x00d4, NULL, "O" }, // 'O' circumflex
- { 0x00d5, NULL, "O" }, // 'O' tilde
- { 0x00d6, NULL, "O" }, // 'O' diaeresis
- { 0x00d7, NULL, "X" }, // multiplication sign
- { 0x00d8, NULL, "O" }, // 'O' stroke
- { 0x00d9, NULL, "U" }, // 'U' grave
- { 0x00da, NULL, "U" }, // 'U' acute
- { 0x00db, NULL, "U" }, // 'U' circumflex
- { 0x00dc, NULL, "U" }, // 'U' diaeresis
- { 0x00dd, NULL, "Y" }, // 'Y' acute
- { 0x00df, NULL, "SS" }, // sharp S
- { 0x00e0, NULL, "a" }, // 'a' grave
- { 0x00e1, NULL, "a" }, // 'a' acute
- { 0x00e2, NULL, "a" }, // 'a' circumflex
- { 0x00e3, NULL, "a" }, // 'a' tilde
- { 0x00e4, NULL, "a" }, // 'a' diaeresis
- { 0x00e5, NULL, "a" }, // 'a' ring above
- { 0x00e6, NULL, "ae" }, // 'ae' ligature
- { 0x00e7, NULL, "c" }, // 'c' cedilla
- { 0x00e8, NULL, "e" }, // 'e' grave
- { 0x00e9, NULL, "e" }, // 'e' acute
- { 0x00ea, NULL, "e" }, // 'e' circumflex
- { 0x00eb, NULL, "e" }, // 'e' diaeresis
- { 0x00ec, NULL, "i" }, // 'i' grave
- { 0x00ed, NULL, "i" }, // 'i' acute
- { 0x00ee, NULL, "i" }, // 'i' circumflex
- { 0x00ef, NULL, "i" }, // 'i' diaeresis
- { 0x00f0, NULL, "d" }, // 'eth'
- { 0x00f1, NULL, "n" }, // 'n' tilde
- { 0x00f2, NULL, "o" }, // 'o' grave
- { 0x00f3, NULL, "o" }, // 'o' acute
- { 0x00f4, NULL, "o" }, // 'o' circumflex
- { 0x00f5, NULL, "o" }, // 'o' tilde
- { 0x00f6, NULL, "o" }, // 'o' diaeresis
- { 0x00f8, NULL, "o" }, // 'o' stroke
- { 0x00f9, NULL, "u" }, // 'u' grave
- { 0x00fa, NULL, "u" }, // 'u' acute
- { 0x00fb, NULL, "u" }, // 'u' circumflex
- { 0x00fc, NULL, "u" }, // 'u' diaeresis
- { 0x00fd, NULL, "y" }, // 'y' acute
- { 0x00ff, NULL, "y" }, // 'y' diaeresis
- { 0x2010, NULL, "-" }, // hyphen
- { 0x2011, NULL, "-" }, // non-breaking hyphen
- { 0x2012, NULL, "-" }, // figure dash
- { 0x2013, NULL, "-" }, // en dash
- { 0x2014, NULL, "-" }, // em dash
- { 0x2015, NULL, "-" }, // horizontal dash
- { 0x2018, NULL, "\'" }, // left single quotation mark
- { 0x2019, NULL, "\'" }, // right single quotation mark
- { 0x201a, NULL, "\'" }, // single low quotation mark
- { 0x201b, NULL, "\'" }, // single high reversed quotation mark
- { 0x201c, NULL, "\"" }, // left double quotation mark
- { 0x201d, NULL, "\"" }, // right double quotation mark
- { 0x201e, NULL, "\"" }, // double low quotation mark
- { 0x201f, NULL, "\"" }, // double high reversed quotation mark
- { 0x2024, NULL, "." }, // one dot leader
- { 0x2025, NULL, ".." }, // two dot leader
- { 0x2026, NULL, "..." }, // horizontal ellipsis
- { 0x2047, NULL, "??" }, // double question mark
- { 0x2048, NULL, "?!" }, // question exclamation mark
- { 0x2049, NULL, "!?" }, // exclamation question mark
- { 0xff01, NULL, "!" }, // fullwidth exclamation point
- { 0xff02, NULL, "\"" }, // fullwidth quotation mark
- { 0xff03, NULL, "#" }, // fullwidth number sign
- { 0xff04, NULL, "$" }, // fullwidth dollar sign
- { 0xff05, NULL, "%" }, // fullwidth percent sign
- { 0xff06, NULL, "&" }, // fullwidth ampersand
- { 0xff07, NULL, "\'" }, // fullwidth apostrophe
- { 0xff08, NULL, "(" }, // fullwidth left parenthesis
- { 0xff09, NULL, ")" }, // fullwidth right parenthesis
- { 0xff0a, NULL, "*" }, // fullwidth asterisk
- { 0xff0b, NULL, "+" }, // fullwidth plus
- { 0xff0c, NULL, "," }, // fullwidth comma
- { 0xff0d, NULL, "-" }, // fullwidth minus
- { 0xff0e, NULL, "." }, // fullwidth period
- { 0xff0f, NULL, "/" }, // fullwidth slash
- { 0xff10, NULL, "0" }, // fullwidth zero
- { 0xff11, NULL, "1" }, // fullwidth one
- { 0xff12, NULL, "2" }, // fullwidth two
- { 0xff13, NULL, "3" }, // fullwidth three
- { 0xff14, NULL, "4" }, // fullwidth four
- { 0xff15, NULL, "5" }, // fullwidth five
- { 0xff16, NULL, "6" }, // fullwidth six
- { 0xff17, NULL, "7" }, // fullwidth seven
- { 0xff18, NULL, "8" }, // fullwidth eight
- { 0xff19, NULL, "9" }, // fullwidth nine
- { 0xff1a, NULL, ":" }, // fullwidth colon
- { 0xff1b, NULL, ";" }, // fullwidth semicolon
- { 0xff1c, NULL, "<" }, // fullwidth less than sign
- { 0xff1d, NULL, "=" }, // fullwidth equals sign
- { 0xff1e, NULL, ">" }, // fullwidth greater than sign
- { 0xff1f, NULL, "?" }, // fullwidth question mark
- { 0xff20, NULL, "@" }, // fullwidth at sign
- { 0xff21, NULL, "A" }, // fullwidth 'A'
- { 0xff22, NULL, "B" }, // fullwidth 'B'
- { 0xff23, NULL, "C" }, // fullwidth 'C'
- { 0xff24, NULL, "D" }, // fullwidth 'D'
- { 0xff25, NULL, "E" }, // fullwidth 'E'
- { 0xff26, NULL, "F" }, // fullwidth 'F'
- { 0xff27, NULL, "G" }, // fullwidth 'G'
- { 0xff28, NULL, "H" }, // fullwidth 'H'
- { 0xff29, NULL, "I" }, // fullwidth 'I'
- { 0xff2a, NULL, "J" }, // fullwidth 'J'
- { 0xff2b, NULL, "K" }, // fullwidth 'K'
- { 0xff2c, NULL, "L" }, // fullwidth 'L'
- { 0xff2d, NULL, "M" }, // fullwidth 'M'
- { 0xff2e, NULL, "N" }, // fullwidth 'N'
- { 0xff2f, NULL, "O" }, // fullwidth 'O'
- { 0xff30, NULL, "P" }, // fullwidth 'P'
- { 0xff31, NULL, "Q" }, // fullwidth 'Q'
- { 0xff32, NULL, "R" }, // fullwidth 'R'
- { 0xff33, NULL, "S" }, // fullwidth 'S'
- { 0xff34, NULL, "T" }, // fullwidth 'T'
- { 0xff35, NULL, "U" }, // fullwidth 'U'
- { 0xff36, NULL, "V" }, // fullwidth 'V'
- { 0xff37, NULL, "W" }, // fullwidth 'W'
- { 0xff38, NULL, "X" }, // fullwidth 'X'
- { 0xff39, NULL, "Y" }, // fullwidth 'Y'
- { 0xff3a, NULL, "Z" }, // fullwidth 'Z'
- { 0xff3b, NULL, "[" }, // fullwidth left bracket
- { 0xff3c, NULL, "\\" }, // fullwidth backslash
- { 0xff3d, NULL, "]" }, // fullwidth right bracket
- { 0xff3e, NULL, "^" }, // fullwidth caret
- { 0xff3f, NULL, "_" }, // fullwidth underscore
- { 0xff40, NULL, "`" }, // fullwidth backquote
- { 0xff41, NULL, "a" }, // fullwidth 'a'
- { 0xff42, NULL, "b" }, // fullwidth 'b'
- { 0xff43, NULL, "c" }, // fullwidth 'c'
- { 0xff44, NULL, "d" }, // fullwidth 'd'
- { 0xff45, NULL, "e" }, // fullwidth 'e'
- { 0xff46, NULL, "f" }, // fullwidth 'f'
- { 0xff47, NULL, "g" }, // fullwidth 'g'
- { 0xff48, NULL, "h" }, // fullwidth 'h'
- { 0xff49, NULL, "i" }, // fullwidth 'i'
- { 0xff4a, NULL, "j" }, // fullwidth 'j'
- { 0xff4b, NULL, "k" }, // fullwidth 'k'
- { 0xff4c, NULL, "l" }, // fullwidth 'l'
- { 0xff4d, NULL, "m" }, // fullwidth 'm'
- { 0xff4e, NULL, "n" }, // fullwidth 'n'
- { 0xff4f, NULL, "o" }, // fullwidth 'o'
- { 0xff50, NULL, "p" }, // fullwidth 'p'
- { 0xff51, NULL, "q" }, // fullwidth 'q'
- { 0xff52, NULL, "r" }, // fullwidth 'r'
- { 0xff53, NULL, "s" }, // fullwidth 's'
- { 0xff54, NULL, "t" }, // fullwidth 't'
- { 0xff55, NULL, "u" }, // fullwidth 'u'
- { 0xff56, NULL, "v" }, // fullwidth 'v'
- { 0xff57, NULL, "w" }, // fullwidth 'w'
- { 0xff58, NULL, "x" }, // fullwidth 'x'
- { 0xff59, NULL, "y" }, // fullwidth 'y'
- { 0xff5a, NULL, "z" }, // fullwidth 'z'
- { 0xff5b, NULL, "{" }, // fullwidth left brace
- { 0xff5c, NULL, "|" }, // fullwidth vertical bar
- { 0xff5d, NULL, "}" }, // fullwidth right brace
- { 0xff5e, NULL, "~" }, // fullwidth tilde
- { 0xff5f, NULL, "((" }, // fullwidth double left parenthesis
- { 0xff60, NULL, "))" }, // fullwidth double right parenthesis
- { 0xffe0, NULL, "\xC2\xA2" }, // fullwidth cent sign
- { 0xffe1, NULL, "\xC2\xA3" }, // fullwidth pound sign
- { 0xffe4, NULL, "\xC2\xA4" }, // fullwidth broken bar
- { 0xffe5, NULL, "\xC2\xA5" }, // fullwidth yen sign
- { 0xffe6, NULL, "\xE2\x82\xA9" }, // fullwidth won sign
- { 0xffe9, NULL, "\xE2\x86\x90" }, // fullwidth left arrow
- { 0xffea, NULL, "\xE2\x86\x91" }, // fullwidth up arrow
- { 0xffeb, NULL, "\xE2\x86\x92" }, // fullwidth right arrow
- { 0xffec, NULL, "\xE2\x86\x93" }, // fullwidth down arrow
- { 0xffed, NULL, "\xE2\x96\xAA" }, // fullwidth solid box
- { 0xffee, NULL, "\xE2\x97\xA6" }, // fullwidth open circle
- { UCHAR_SHIFT_1, "Shift", NULL }, // Shift key
- { UCHAR_SHIFT_2, "Ctrl", NULL }, // Ctrl key
- { UCHAR_MAMEKEY(F1), "F1", NULL }, // F1 function key
- { UCHAR_MAMEKEY(F2), "F2", NULL }, // F2 function key
- { UCHAR_MAMEKEY(F3), "F3", NULL }, // F3 function key
- { UCHAR_MAMEKEY(F4), "F4", NULL }, // F4 function key
- { UCHAR_MAMEKEY(F5), "F5", NULL }, // F5 function key
- { UCHAR_MAMEKEY(F6), "F6", NULL }, // F6 function key
- { UCHAR_MAMEKEY(F7), "F7", NULL }, // F7 function key
- { UCHAR_MAMEKEY(F8), "F8", NULL }, // F8 function key
- { UCHAR_MAMEKEY(F9), "F9", NULL }, // F9 function key
- { UCHAR_MAMEKEY(F10), "F10", NULL }, // F10 function key
- { UCHAR_MAMEKEY(F11), "F11", NULL }, // F11 function key
- { UCHAR_MAMEKEY(F12), "F12", NULL }, // F12 function key
- { UCHAR_MAMEKEY(F13), "F13", NULL }, // F13 function key
- { UCHAR_MAMEKEY(F14), "F14", NULL }, // F14 function key
- { UCHAR_MAMEKEY(F15), "F15", NULL }, // F15 function key
+ { 0x0061, nullptr, "A" }, // a
+ { 0x0062, nullptr, "B" }, // b
+ { 0x0063, nullptr, "C" }, // c
+ { 0x0064, nullptr, "D" }, // d
+ { 0x0065, nullptr, "E" }, // e
+ { 0x0066, nullptr, "F" }, // f
+ { 0x0067, nullptr, "G" }, // g
+ { 0x0068, nullptr, "H" }, // h
+ { 0x0069, nullptr, "I" }, // i
+ { 0x006a, nullptr, "J" }, // j
+ { 0x006b, nullptr, "K" }, // k
+ { 0x006c, nullptr, "L" }, // l
+ { 0x006d, nullptr, "M" }, // m
+ { 0x006e, nullptr, "N" }, // n
+ { 0x006f, nullptr, "O" }, // o
+ { 0x0070, nullptr, "P" }, // p
+ { 0x0071, nullptr, "Q" }, // q
+ { 0x0072, nullptr, "R" }, // r
+ { 0x0073, nullptr, "S" }, // s
+ { 0x0074, nullptr, "T" }, // t
+ { 0x0075, nullptr, "U" }, // u
+ { 0x0076, nullptr, "V" }, // v
+ { 0x0077, nullptr, "W" }, // w
+ { 0x0078, nullptr, "X" }, // x
+ { 0x0079, nullptr, "Y" }, // y
+ { 0x007a, nullptr, "Z" }, // z
+ { 0x00a0, nullptr, " " }, // non breaking space
+ { 0x00a1, nullptr, "!" }, // inverted exclaimation mark
+ { 0x00a6, nullptr, "|" }, // broken bar
+ { 0x00a9, nullptr, "(c)" }, // copyright sign
+ { 0x00ab, nullptr, "<<" }, // left pointing double angle
+ { 0x00ae, nullptr, "(r)" }, // registered sign
+ { 0x00bb, nullptr, ">>" }, // right pointing double angle
+ { 0x00bc, nullptr, "1/4" }, // vulgar fraction one quarter
+ { 0x00bd, nullptr, "1/2" }, // vulgar fraction one half
+ { 0x00be, nullptr, "3/4" }, // vulgar fraction three quarters
+ { 0x00bf, nullptr, "?" }, // inverted question mark
+ { 0x00c0, nullptr, "A" }, // 'A' grave
+ { 0x00c1, nullptr, "A" }, // 'A' acute
+ { 0x00c2, nullptr, "A" }, // 'A' circumflex
+ { 0x00c3, nullptr, "A" }, // 'A' tilde
+ { 0x00c4, nullptr, "A" }, // 'A' diaeresis
+ { 0x00c5, nullptr, "A" }, // 'A' ring above
+ { 0x00c6, nullptr, "AE" }, // 'AE' ligature
+ { 0x00c7, nullptr, "C" }, // 'C' cedilla
+ { 0x00c8, nullptr, "E" }, // 'E' grave
+ { 0x00c9, nullptr, "E" }, // 'E' acute
+ { 0x00ca, nullptr, "E" }, // 'E' circumflex
+ { 0x00cb, nullptr, "E" }, // 'E' diaeresis
+ { 0x00cc, nullptr, "I" }, // 'I' grave
+ { 0x00cd, nullptr, "I" }, // 'I' acute
+ { 0x00ce, nullptr, "I" }, // 'I' circumflex
+ { 0x00cf, nullptr, "I" }, // 'I' diaeresis
+ { 0x00d0, nullptr, "D" }, // 'ETH'
+ { 0x00d1, nullptr, "N" }, // 'N' tilde
+ { 0x00d2, nullptr, "O" }, // 'O' grave
+ { 0x00d3, nullptr, "O" }, // 'O' acute
+ { 0x00d4, nullptr, "O" }, // 'O' circumflex
+ { 0x00d5, nullptr, "O" }, // 'O' tilde
+ { 0x00d6, nullptr, "O" }, // 'O' diaeresis
+ { 0x00d7, nullptr, "X" }, // multiplication sign
+ { 0x00d8, nullptr, "O" }, // 'O' stroke
+ { 0x00d9, nullptr, "U" }, // 'U' grave
+ { 0x00da, nullptr, "U" }, // 'U' acute
+ { 0x00db, nullptr, "U" }, // 'U' circumflex
+ { 0x00dc, nullptr, "U" }, // 'U' diaeresis
+ { 0x00dd, nullptr, "Y" }, // 'Y' acute
+ { 0x00df, nullptr, "SS" }, // sharp S
+ { 0x00e0, nullptr, "a" }, // 'a' grave
+ { 0x00e1, nullptr, "a" }, // 'a' acute
+ { 0x00e2, nullptr, "a" }, // 'a' circumflex
+ { 0x00e3, nullptr, "a" }, // 'a' tilde
+ { 0x00e4, nullptr, "a" }, // 'a' diaeresis
+ { 0x00e5, nullptr, "a" }, // 'a' ring above
+ { 0x00e6, nullptr, "ae" }, // 'ae' ligature
+ { 0x00e7, nullptr, "c" }, // 'c' cedilla
+ { 0x00e8, nullptr, "e" }, // 'e' grave
+ { 0x00e9, nullptr, "e" }, // 'e' acute
+ { 0x00ea, nullptr, "e" }, // 'e' circumflex
+ { 0x00eb, nullptr, "e" }, // 'e' diaeresis
+ { 0x00ec, nullptr, "i" }, // 'i' grave
+ { 0x00ed, nullptr, "i" }, // 'i' acute
+ { 0x00ee, nullptr, "i" }, // 'i' circumflex
+ { 0x00ef, nullptr, "i" }, // 'i' diaeresis
+ { 0x00f0, nullptr, "d" }, // 'eth'
+ { 0x00f1, nullptr, "n" }, // 'n' tilde
+ { 0x00f2, nullptr, "o" }, // 'o' grave
+ { 0x00f3, nullptr, "o" }, // 'o' acute
+ { 0x00f4, nullptr, "o" }, // 'o' circumflex
+ { 0x00f5, nullptr, "o" }, // 'o' tilde
+ { 0x00f6, nullptr, "o" }, // 'o' diaeresis
+ { 0x00f8, nullptr, "o" }, // 'o' stroke
+ { 0x00f9, nullptr, "u" }, // 'u' grave
+ { 0x00fa, nullptr, "u" }, // 'u' acute
+ { 0x00fb, nullptr, "u" }, // 'u' circumflex
+ { 0x00fc, nullptr, "u" }, // 'u' diaeresis
+ { 0x00fd, nullptr, "y" }, // 'y' acute
+ { 0x00ff, nullptr, "y" }, // 'y' diaeresis
+ { 0x2010, nullptr, "-" }, // hyphen
+ { 0x2011, nullptr, "-" }, // non-breaking hyphen
+ { 0x2012, nullptr, "-" }, // figure dash
+ { 0x2013, nullptr, "-" }, // en dash
+ { 0x2014, nullptr, "-" }, // em dash
+ { 0x2015, nullptr, "-" }, // horizontal dash
+ { 0x2018, nullptr, "\'" }, // left single quotation mark
+ { 0x2019, nullptr, "\'" }, // right single quotation mark
+ { 0x201a, nullptr, "\'" }, // single low quotation mark
+ { 0x201b, nullptr, "\'" }, // single high reversed quotation mark
+ { 0x201c, nullptr, "\"" }, // left double quotation mark
+ { 0x201d, nullptr, "\"" }, // right double quotation mark
+ { 0x201e, nullptr, "\"" }, // double low quotation mark
+ { 0x201f, nullptr, "\"" }, // double high reversed quotation mark
+ { 0x2024, nullptr, "." }, // one dot leader
+ { 0x2025, nullptr, ".." }, // two dot leader
+ { 0x2026, nullptr, "..." }, // horizontal ellipsis
+ { 0x2047, nullptr, "??" }, // double question mark
+ { 0x2048, nullptr, "?!" }, // question exclamation mark
+ { 0x2049, nullptr, "!?" }, // exclamation question mark
+ { 0xff01, nullptr, "!" }, // fullwidth exclamation point
+ { 0xff02, nullptr, "\"" }, // fullwidth quotation mark
+ { 0xff03, nullptr, "#" }, // fullwidth number sign
+ { 0xff04, nullptr, "$" }, // fullwidth dollar sign
+ { 0xff05, nullptr, "%" }, // fullwidth percent sign
+ { 0xff06, nullptr, "&" }, // fullwidth ampersand
+ { 0xff07, nullptr, "\'" }, // fullwidth apostrophe
+ { 0xff08, nullptr, "(" }, // fullwidth left parenthesis
+ { 0xff09, nullptr, ")" }, // fullwidth right parenthesis
+ { 0xff0a, nullptr, "*" }, // fullwidth asterisk
+ { 0xff0b, nullptr, "+" }, // fullwidth plus
+ { 0xff0c, nullptr, "," }, // fullwidth comma
+ { 0xff0d, nullptr, "-" }, // fullwidth minus
+ { 0xff0e, nullptr, "." }, // fullwidth period
+ { 0xff0f, nullptr, "/" }, // fullwidth slash
+ { 0xff10, nullptr, "0" }, // fullwidth zero
+ { 0xff11, nullptr, "1" }, // fullwidth one
+ { 0xff12, nullptr, "2" }, // fullwidth two
+ { 0xff13, nullptr, "3" }, // fullwidth three
+ { 0xff14, nullptr, "4" }, // fullwidth four
+ { 0xff15, nullptr, "5" }, // fullwidth five
+ { 0xff16, nullptr, "6" }, // fullwidth six
+ { 0xff17, nullptr, "7" }, // fullwidth seven
+ { 0xff18, nullptr, "8" }, // fullwidth eight
+ { 0xff19, nullptr, "9" }, // fullwidth nine
+ { 0xff1a, nullptr, ":" }, // fullwidth colon
+ { 0xff1b, nullptr, ";" }, // fullwidth semicolon
+ { 0xff1c, nullptr, "<" }, // fullwidth less than sign
+ { 0xff1d, nullptr, "=" }, // fullwidth equals sign
+ { 0xff1e, nullptr, ">" }, // fullwidth greater than sign
+ { 0xff1f, nullptr, "?" }, // fullwidth question mark
+ { 0xff20, nullptr, "@" }, // fullwidth at sign
+ { 0xff21, nullptr, "A" }, // fullwidth 'A'
+ { 0xff22, nullptr, "B" }, // fullwidth 'B'
+ { 0xff23, nullptr, "C" }, // fullwidth 'C'
+ { 0xff24, nullptr, "D" }, // fullwidth 'D'
+ { 0xff25, nullptr, "E" }, // fullwidth 'E'
+ { 0xff26, nullptr, "F" }, // fullwidth 'F'
+ { 0xff27, nullptr, "G" }, // fullwidth 'G'
+ { 0xff28, nullptr, "H" }, // fullwidth 'H'
+ { 0xff29, nullptr, "I" }, // fullwidth 'I'
+ { 0xff2a, nullptr, "J" }, // fullwidth 'J'
+ { 0xff2b, nullptr, "K" }, // fullwidth 'K'
+ { 0xff2c, nullptr, "L" }, // fullwidth 'L'
+ { 0xff2d, nullptr, "M" }, // fullwidth 'M'
+ { 0xff2e, nullptr, "N" }, // fullwidth 'N'
+ { 0xff2f, nullptr, "O" }, // fullwidth 'O'
+ { 0xff30, nullptr, "P" }, // fullwidth 'P'
+ { 0xff31, nullptr, "Q" }, // fullwidth 'Q'
+ { 0xff32, nullptr, "R" }, // fullwidth 'R'
+ { 0xff33, nullptr, "S" }, // fullwidth 'S'
+ { 0xff34, nullptr, "T" }, // fullwidth 'T'
+ { 0xff35, nullptr, "U" }, // fullwidth 'U'
+ { 0xff36, nullptr, "V" }, // fullwidth 'V'
+ { 0xff37, nullptr, "W" }, // fullwidth 'W'
+ { 0xff38, nullptr, "X" }, // fullwidth 'X'
+ { 0xff39, nullptr, "Y" }, // fullwidth 'Y'
+ { 0xff3a, nullptr, "Z" }, // fullwidth 'Z'
+ { 0xff3b, nullptr, "[" }, // fullwidth left bracket
+ { 0xff3c, nullptr, "\\" }, // fullwidth backslash
+ { 0xff3d, nullptr, "]" }, // fullwidth right bracket
+ { 0xff3e, nullptr, "^" }, // fullwidth caret
+ { 0xff3f, nullptr, "_" }, // fullwidth underscore
+ { 0xff40, nullptr, "`" }, // fullwidth backquote
+ { 0xff41, nullptr, "a" }, // fullwidth 'a'
+ { 0xff42, nullptr, "b" }, // fullwidth 'b'
+ { 0xff43, nullptr, "c" }, // fullwidth 'c'
+ { 0xff44, nullptr, "d" }, // fullwidth 'd'
+ { 0xff45, nullptr, "e" }, // fullwidth 'e'
+ { 0xff46, nullptr, "f" }, // fullwidth 'f'
+ { 0xff47, nullptr, "g" }, // fullwidth 'g'
+ { 0xff48, nullptr, "h" }, // fullwidth 'h'
+ { 0xff49, nullptr, "i" }, // fullwidth 'i'
+ { 0xff4a, nullptr, "j" }, // fullwidth 'j'
+ { 0xff4b, nullptr, "k" }, // fullwidth 'k'
+ { 0xff4c, nullptr, "l" }, // fullwidth 'l'
+ { 0xff4d, nullptr, "m" }, // fullwidth 'm'
+ { 0xff4e, nullptr, "n" }, // fullwidth 'n'
+ { 0xff4f, nullptr, "o" }, // fullwidth 'o'
+ { 0xff50, nullptr, "p" }, // fullwidth 'p'
+ { 0xff51, nullptr, "q" }, // fullwidth 'q'
+ { 0xff52, nullptr, "r" }, // fullwidth 'r'
+ { 0xff53, nullptr, "s" }, // fullwidth 's'
+ { 0xff54, nullptr, "t" }, // fullwidth 't'
+ { 0xff55, nullptr, "u" }, // fullwidth 'u'
+ { 0xff56, nullptr, "v" }, // fullwidth 'v'
+ { 0xff57, nullptr, "w" }, // fullwidth 'w'
+ { 0xff58, nullptr, "x" }, // fullwidth 'x'
+ { 0xff59, nullptr, "y" }, // fullwidth 'y'
+ { 0xff5a, nullptr, "z" }, // fullwidth 'z'
+ { 0xff5b, nullptr, "{" }, // fullwidth left brace
+ { 0xff5c, nullptr, "|" }, // fullwidth vertical bar
+ { 0xff5d, nullptr, "}" }, // fullwidth right brace
+ { 0xff5e, nullptr, "~" }, // fullwidth tilde
+ { 0xff5f, nullptr, "((" }, // fullwidth double left parenthesis
+ { 0xff60, nullptr, "))" }, // fullwidth double right parenthesis
+ { 0xffe0, nullptr, "\xC2\xA2" }, // fullwidth cent sign
+ { 0xffe1, nullptr, "\xC2\xA3" }, // fullwidth pound sign
+ { 0xffe4, nullptr, "\xC2\xA4" }, // fullwidth broken bar
+ { 0xffe5, nullptr, "\xC2\xA5" }, // fullwidth yen sign
+ { 0xffe6, nullptr, "\xE2\x82\xA9" }, // fullwidth won sign
+ { 0xffe9, nullptr, "\xE2\x86\x90" }, // fullwidth left arrow
+ { 0xffea, nullptr, "\xE2\x86\x91" }, // fullwidth up arrow
+ { 0xffeb, nullptr, "\xE2\x86\x92" }, // fullwidth right arrow
+ { 0xffec, nullptr, "\xE2\x86\x93" }, // fullwidth down arrow
+ { 0xffed, nullptr, "\xE2\x96\xAA" }, // fullwidth solid box
+ { 0xffee, nullptr, "\xE2\x97\xA6" }, // fullwidth open circle
+ { UCHAR_SHIFT_1, "Shift", nullptr }, // Shift key
+ { UCHAR_SHIFT_2, "Ctrl", nullptr }, // Ctrl key
+ { UCHAR_MAMEKEY(F1), "F1", nullptr }, // F1 function key
+ { UCHAR_MAMEKEY(F2), "F2", nullptr }, // F2 function key
+ { UCHAR_MAMEKEY(F3), "F3", nullptr }, // F3 function key
+ { UCHAR_MAMEKEY(F4), "F4", nullptr }, // F4 function key
+ { UCHAR_MAMEKEY(F5), "F5", nullptr }, // F5 function key
+ { UCHAR_MAMEKEY(F6), "F6", nullptr }, // F6 function key
+ { UCHAR_MAMEKEY(F7), "F7", nullptr }, // F7 function key
+ { UCHAR_MAMEKEY(F8), "F8", nullptr }, // F8 function key
+ { UCHAR_MAMEKEY(F9), "F9", nullptr }, // F9 function key
+ { UCHAR_MAMEKEY(F10), "F10", nullptr }, // F10 function key
+ { UCHAR_MAMEKEY(F11), "F11", nullptr }, // F11 function key
+ { UCHAR_MAMEKEY(F12), "F12", nullptr }, // F12 function key
+ { UCHAR_MAMEKEY(F13), "F13", nullptr }, // F13 function key
+ { UCHAR_MAMEKEY(F14), "F14", nullptr }, // F14 function key
+ { UCHAR_MAMEKEY(F15), "F15", nullptr }, // F15 function key
{ UCHAR_MAMEKEY(ESC), "Esc", "\033" }, // Esc key
- { UCHAR_MAMEKEY(INSERT), "Insert", NULL }, // Insert key
+ { UCHAR_MAMEKEY(INSERT), "Insert", nullptr }, // Insert key
{ UCHAR_MAMEKEY(DEL), "Delete", "\010" }, // Delete key
{ UCHAR_MAMEKEY(HOME), "Home", "\014" }, // Home key
- { UCHAR_MAMEKEY(END), "End", NULL }, // End key
- { UCHAR_MAMEKEY(PGUP), "Page Up", NULL }, // Page Up key
- { UCHAR_MAMEKEY(PGDN), "Page Down", NULL }, // Page Down key
- { UCHAR_MAMEKEY(LEFT), "Cursor Left", NULL }, // Cursor Left
- { UCHAR_MAMEKEY(RIGHT), "Cursor Right", NULL }, // Cursor Right
- { UCHAR_MAMEKEY(UP), "Cursor Up", NULL }, // Cursor Up
- { UCHAR_MAMEKEY(DOWN), "Cursor Down", NULL }, // Cursor Down
- { UCHAR_MAMEKEY(0_PAD), "Keypad 0", NULL }, // 0 on the numeric keypad
- { UCHAR_MAMEKEY(1_PAD), "Keypad 1", NULL }, // 1 on the numeric keypad
- { UCHAR_MAMEKEY(2_PAD), "Keypad 2", NULL }, // 2 on the numeric keypad
- { UCHAR_MAMEKEY(3_PAD), "Keypad 3", NULL }, // 3 on the numeric keypad
- { UCHAR_MAMEKEY(4_PAD), "Keypad 4", NULL }, // 4 on the numeric keypad
- { UCHAR_MAMEKEY(5_PAD), "Keypad 5", NULL }, // 5 on the numeric keypad
- { UCHAR_MAMEKEY(6_PAD), "Keypad 6", NULL }, // 6 on the numeric keypad
- { UCHAR_MAMEKEY(7_PAD), "Keypad 7", NULL }, // 7 on the numeric keypad
- { UCHAR_MAMEKEY(8_PAD), "Keypad 8", NULL }, // 8 on the numeric keypad
- { UCHAR_MAMEKEY(9_PAD), "Keypad 9", NULL }, // 9 on the numeric keypad
- { UCHAR_MAMEKEY(SLASH_PAD), "Keypad /", NULL }, // / on the numeric keypad
- { UCHAR_MAMEKEY(ASTERISK), "Keypad *", NULL }, // * on the numeric keypad
- { UCHAR_MAMEKEY(MINUS_PAD), "Keypad -", NULL }, // - on the numeric Keypad
- { UCHAR_MAMEKEY(PLUS_PAD), "Keypad +", NULL }, // + on the numeric Keypad
- { UCHAR_MAMEKEY(DEL_PAD), "Keypad .", NULL }, // . on the numeric keypad
- { UCHAR_MAMEKEY(ENTER_PAD), "Keypad Enter", NULL }, // Enter on the numeric keypad
- { UCHAR_MAMEKEY(PRTSCR), "Print Screen", NULL }, // Print Screen key
- { UCHAR_MAMEKEY(PAUSE), "Pause", NULL }, // Pause key
- { UCHAR_MAMEKEY(LSHIFT), "Left Shift", NULL }, // Left Shift key
- { UCHAR_MAMEKEY(RSHIFT), "Right Shift", NULL }, // Right Shift key
- { UCHAR_MAMEKEY(LCONTROL), "Left Ctrl", NULL }, // Left Control key
- { UCHAR_MAMEKEY(RCONTROL), "Right Ctrl", NULL }, // Right Control key
- { UCHAR_MAMEKEY(LALT), "Left Alt", NULL }, // Left Alt key
- { UCHAR_MAMEKEY(RALT), "Right Alt", NULL }, // Right Alt key
- { UCHAR_MAMEKEY(SCRLOCK), "Scroll Lock", NULL }, // Scroll Lock key
- { UCHAR_MAMEKEY(NUMLOCK), "Num Lock", NULL }, // Num Lock key
- { UCHAR_MAMEKEY(CAPSLOCK), "Caps Lock", NULL }, // Caps Lock key
- { UCHAR_MAMEKEY(LWIN), "Left Win", NULL }, // Left Win key
- { UCHAR_MAMEKEY(RWIN), "Right Win", NULL }, // Right Win key
- { UCHAR_MAMEKEY(MENU), "Menu", NULL }, // Menu key
- { UCHAR_MAMEKEY(CANCEL), "Break", NULL } // Break/Pause key
+ { UCHAR_MAMEKEY(END), "End", nullptr }, // End key
+ { UCHAR_MAMEKEY(PGUP), "Page Up", nullptr }, // Page Up key
+ { UCHAR_MAMEKEY(PGDN), "Page Down", nullptr }, // Page Down key
+ { UCHAR_MAMEKEY(LEFT), "Cursor Left", nullptr }, // Cursor Left
+ { UCHAR_MAMEKEY(RIGHT), "Cursor Right", nullptr }, // Cursor Right
+ { UCHAR_MAMEKEY(UP), "Cursor Up", nullptr }, // Cursor Up
+ { UCHAR_MAMEKEY(DOWN), "Cursor Down", nullptr }, // Cursor Down
+ { UCHAR_MAMEKEY(0_PAD), "Keypad 0", nullptr }, // 0 on the numeric keypad
+ { UCHAR_MAMEKEY(1_PAD), "Keypad 1", nullptr }, // 1 on the numeric keypad
+ { UCHAR_MAMEKEY(2_PAD), "Keypad 2", nullptr }, // 2 on the numeric keypad
+ { UCHAR_MAMEKEY(3_PAD), "Keypad 3", nullptr }, // 3 on the numeric keypad
+ { UCHAR_MAMEKEY(4_PAD), "Keypad 4", nullptr }, // 4 on the numeric keypad
+ { UCHAR_MAMEKEY(5_PAD), "Keypad 5", nullptr }, // 5 on the numeric keypad
+ { UCHAR_MAMEKEY(6_PAD), "Keypad 6", nullptr }, // 6 on the numeric keypad
+ { UCHAR_MAMEKEY(7_PAD), "Keypad 7", nullptr }, // 7 on the numeric keypad
+ { UCHAR_MAMEKEY(8_PAD), "Keypad 8", nullptr }, // 8 on the numeric keypad
+ { UCHAR_MAMEKEY(9_PAD), "Keypad 9", nullptr }, // 9 on the numeric keypad
+ { UCHAR_MAMEKEY(SLASH_PAD), "Keypad /", nullptr }, // / on the numeric keypad
+ { UCHAR_MAMEKEY(ASTERISK), "Keypad *", nullptr }, // * on the numeric keypad
+ { UCHAR_MAMEKEY(MINUS_PAD), "Keypad -", nullptr }, // - on the numeric Keypad
+ { UCHAR_MAMEKEY(PLUS_PAD), "Keypad +", nullptr }, // + on the numeric Keypad
+ { UCHAR_MAMEKEY(DEL_PAD), "Keypad .", nullptr }, // . on the numeric keypad
+ { UCHAR_MAMEKEY(ENTER_PAD), "Keypad Enter", nullptr }, // Enter on the numeric keypad
+ { UCHAR_MAMEKEY(PRTSCR), "Print Screen", nullptr }, // Print Screen key
+ { UCHAR_MAMEKEY(PAUSE), "Pause", nullptr }, // Pause key
+ { UCHAR_MAMEKEY(LSHIFT), "Left Shift", nullptr }, // Left Shift key
+ { UCHAR_MAMEKEY(RSHIFT), "Right Shift", nullptr }, // Right Shift key
+ { UCHAR_MAMEKEY(LCONTROL), "Left Ctrl", nullptr }, // Left Control key
+ { UCHAR_MAMEKEY(RCONTROL), "Right Ctrl", nullptr }, // Right Control key
+ { UCHAR_MAMEKEY(LALT), "Left Alt", nullptr }, // Left Alt key
+ { UCHAR_MAMEKEY(RALT), "Right Alt", nullptr }, // Right Alt key
+ { UCHAR_MAMEKEY(SCRLOCK), "Scroll Lock", nullptr }, // Scroll Lock key
+ { UCHAR_MAMEKEY(NUMLOCK), "Num Lock", nullptr }, // Num Lock key
+ { UCHAR_MAMEKEY(CAPSLOCK), "Caps Lock", nullptr }, // Caps Lock key
+ { UCHAR_MAMEKEY(LWIN), "Left Win", nullptr }, // Left Win key
+ { UCHAR_MAMEKEY(RWIN), "Right Win", nullptr }, // Right Win key
+ { UCHAR_MAMEKEY(MENU), "Menu", nullptr }, // Menu key
+ { UCHAR_MAMEKEY(CANCEL), "Break", nullptr } // Break/Pause key
};
@@ -643,7 +643,7 @@ void ioport_list::append(device_t &device, std::string &errorbuf)
{
// no constructor, no list
ioport_constructor constructor = device.input_ports();
- if (constructor == NULL)
+ if (constructor == nullptr)
return;
// reset error buffer
@@ -653,7 +653,7 @@ void ioport_list::append(device_t &device, std::string &errorbuf)
(*constructor)(device, *this, errorbuf);
// collapse fields and sort the list
- for (ioport_port *port = first(); port != NULL; port = port->next())
+ for (ioport_port *port = first(); port != nullptr; port = port->next())
port->collapse_fields(errorbuf);
}
@@ -668,7 +668,7 @@ void ioport_list::append(device_t &device, std::string &errorbuf)
//-------------------------------------------------
input_type_entry::input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard)
- : m_next(NULL),
+ : m_next(nullptr),
m_type(type),
m_group(group),
m_player(player),
@@ -679,7 +679,7 @@ input_type_entry::input_type_entry(ioport_type type, ioport_group group, int pla
}
input_type_entry::input_type_entry(ioport_type type, ioport_group group, int player, const char *token, const char *name, input_seq standard, input_seq decrement, input_seq increment)
- : m_next(NULL),
+ : m_next(nullptr),
m_type(type),
m_group(group),
m_player(player),
@@ -726,7 +726,7 @@ void input_type_entry::restore_default_seq()
//-------------------------------------------------
digital_joystick::digital_joystick(int player, int number)
- : m_next(NULL),
+ : m_next(nullptr),
m_player(player),
m_number(number),
m_current(0),
@@ -762,9 +762,9 @@ void digital_joystick::frame_update()
m_current = 0;
// read all the associated ports
- running_machine *machine = NULL;
+ running_machine *machine = nullptr;
for (direction_t direction = JOYDIR_UP; direction < JOYDIR_COUNT; ++direction)
- for (const simple_list_wrapper<ioport_field> *i = m_field[direction].first(); i != NULL; i = i->next())
+ for (const simple_list_wrapper<ioport_field> *i = m_field[direction].first(); i != nullptr; i = i->next())
{
machine = &i->object()->machine();
if (machine->input().seq_pressed(i->object()->seq(SEQ_TYPE_STANDARD)))
@@ -837,7 +837,7 @@ natural_keyboard::natural_keyboard(running_machine &machine)
m_bufend(0),
m_status_keydown(false),
m_last_cr(false),
- m_timer(NULL),
+ m_timer(nullptr),
m_current_rate(attotime::zero)
{
m_queue_chars = ioport_queue_chars_delegate();
@@ -898,7 +898,7 @@ void natural_keyboard::post(unicode_char ch)
{
const keycode_map_entry *code = find_code(ch);
std::string tempstr;
- machine().logerror("natural_keyboard::post(): code=%i (%s) field->name='%s'\n", int(ch), unicode_to_string(tempstr, ch), (code != NULL && code->field[0] != NULL) ? code->field[0]->name() : "<null>");
+ machine().logerror("natural_keyboard::post(): code=%i (%s) field->name='%s'\n", int(ch), unicode_to_string(tempstr, ch), (code != nullptr && code->field[0] != nullptr) ? code->field[0]->name() : "<null>");
}
// can we post this key in the queue directly?
@@ -909,7 +909,7 @@ void natural_keyboard::post(unicode_char ch)
else if (can_post_alternate(ch))
{
const char_info *info = char_info::find(ch);
- assert(info != NULL && info->alternate != NULL);
+ assert(info != nullptr && info->alternate != nullptr);
const char *altstring = info->alternate;
while (*altstring != 0)
{
@@ -1036,13 +1036,13 @@ void natural_keyboard::post_coded(const char *text, size_t length, const attotim
// look for escape characters
if (ch == '{')
- for (int codenum = 0; codenum < ARRAY_LENGTH(codes); codenum++)
+ for (auto & code : codes)
{
- size_t keylen = strlen(codes[codenum].key);
+ size_t keylen = strlen(code.key);
if (curpos + keylen + 2 <= length)
- if (core_strnicmp(codes[codenum].key, &text[curpos + 1], keylen) == 0 && text[curpos + keylen + 1] == '}')
+ if (core_strnicmp(code.key, &text[curpos + 1], keylen) == 0 && text[curpos + keylen + 1] == '}')
{
- ch = codes[codenum].code;
+ ch = code.code;
increment = keylen + 2;
}
}
@@ -1064,13 +1064,13 @@ void natural_keyboard::post_coded(const char *text, size_t length, const attotim
void natural_keyboard::build_codes(ioport_manager &manager)
{
// iterate over shift keys
- ioport_field *shift[UCHAR_SHIFT_END + 1 - UCHAR_SHIFT_BEGIN] = { 0 };
+ ioport_field *shift[UCHAR_SHIFT_END + 1 - UCHAR_SHIFT_BEGIN] = { nullptr };
for (int curshift = 0; curshift <= ARRAY_LENGTH(shift); curshift++)
- if (curshift == 0 || shift[curshift - 1] != NULL)
+ if (curshift == 0 || shift[curshift - 1] != nullptr)
// iterate over ports and fields
- for (ioport_port *port = manager.first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = manager.first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->type() == IPT_KEYBOARD)
{
// fetch the code, ignoring 0
@@ -1089,7 +1089,7 @@ void natural_keyboard::build_codes(ioport_manager &manager)
if (curshift == 0)
{
newcode.field[0] = field;
- newcode.field[1] = 0;
+ newcode.field[1] = nullptr;
}
else
{
@@ -1122,7 +1122,7 @@ bool natural_keyboard::can_post_directly(unicode_char ch)
// otherwise, it depends on the input codes
const keycode_map_entry *code = find_code(ch);
- return (code != NULL && code->field[0] != NULL);
+ return (code != nullptr && code->field[0] != nullptr);
}
@@ -1134,11 +1134,11 @@ bool natural_keyboard::can_post_directly(unicode_char ch)
bool natural_keyboard::can_post_alternate(unicode_char ch)
{
const char_info *info = char_info::find(ch);
- if (info == NULL)
+ if (info == nullptr)
return false;
const char *altstring = info->alternate;
- if (altstring == NULL)
+ if (altstring == nullptr)
return false;
while (*altstring != 0)
@@ -1274,12 +1274,12 @@ const char *natural_keyboard::unicode_to_string(std::string &buffer, unicode_cha
const natural_keyboard::keycode_map_entry *natural_keyboard::find_code(unicode_char ch) const
{
- for (unsigned int index = 0; index < m_keycode_map.size(); index++)
+ for (auto & elem : m_keycode_map)
{
- if (m_keycode_map[index].ch == ch)
- return &m_keycode_map[index];
+ if (elem.ch == ch)
+ return &elem;
}
- return NULL;
+ return nullptr;
}
@@ -1295,8 +1295,8 @@ void natural_keyboard::frame_update(ioport_port &port, ioport_value &digital)
{
// loop through this character's component codes
const keycode_map_entry *code = find_code(m_buffer[m_bufbegin]);
- if (code != NULL)
- for (int fieldnum = 0; fieldnum < ARRAY_LENGTH(code->field) && code->field[fieldnum] != NULL; fieldnum++)
+ if (code != nullptr)
+ for (int fieldnum = 0; fieldnum < ARRAY_LENGTH(code->field) && code->field[fieldnum] != nullptr; fieldnum++)
if (&code->field[fieldnum]->port() == &port)
digital |= code->field[fieldnum]->mask();
}
@@ -1311,8 +1311,8 @@ const char *natural_keyboard::key_name(std::string &str, unicode_char ch)
{
// attempt to get the string from the character info table
const char_info *ci = char_info::find(ch);
- const char *result = (ci != NULL) ? ci->name : NULL;
- if (result != NULL)
+ const char *result = (ci != nullptr) ? ci->name : nullptr;
+ if (result != nullptr)
str.assign(result);
// if that doesn't work, convert to UTF-8
@@ -1341,10 +1341,10 @@ std::string natural_keyboard::dump()
const size_t left_column_width = 24;
// loop through all codes
- for (unsigned int index = 0; index < m_keycode_map.size(); index++)
+ for (auto & code : m_keycode_map)
{
// describe the character code
- const natural_keyboard::keycode_map_entry &code = m_keycode_map[index];
+
strcatprintf(buffer,"%08X (%s) ", code.ch, unicode_to_string(tempstr, code.ch));
// pad with spaces
@@ -1352,7 +1352,7 @@ std::string natural_keyboard::dump()
buffer.push_back(' ');
// identify the keys used
- for (int field = 0; field < ARRAY_LENGTH(code.field) && code.field[field] != 0; field++)
+ for (int field = 0; field < ARRAY_LENGTH(code.field) && code.field[field] != nullptr; field++)
strcatprintf(buffer, "%s'%s'", (field > 0) ? ", " : "", code.field[field]->name());
// carriage return
@@ -1399,7 +1399,7 @@ bool ioport_condition::eval() const
void ioport_condition::initialize(device_t &device)
{
- if (m_tag != NULL)
+ if (m_tag != nullptr)
m_port = device.ioport(m_tag);
}
@@ -1414,7 +1414,7 @@ void ioport_condition::initialize(device_t &device)
//-------------------------------------------------
ioport_setting::ioport_setting(ioport_field &field, ioport_value _value, const char *_name)
- : m_next(NULL),
+ : m_next(nullptr),
m_field(field),
m_value(_value),
m_name(_name)
@@ -1432,7 +1432,7 @@ ioport_setting::ioport_setting(ioport_field &field, ioport_value _value, const c
//-------------------------------------------------
ioport_diplocation::ioport_diplocation(const char *name, UINT8 swnum, bool invert)
- : m_next(NULL),
+ : m_next(nullptr),
m_name(name),
m_number(swnum),
m_invert(invert)
@@ -1450,7 +1450,7 @@ ioport_diplocation::ioport_diplocation(const char *name, UINT8 swnum, bool inver
//-------------------------------------------------
ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value defvalue, ioport_value maskbits, const char *name)
- : m_next(NULL),
+ : m_next(nullptr),
m_port(port),
m_modcount(port.modcount()),
m_mask(maskbits),
@@ -1460,8 +1460,8 @@ ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value def
m_flags(0),
m_impulse(0),
m_name(name),
- m_read_param(NULL),
- m_write_param(NULL),
+ m_read_param(nullptr),
+ m_write_param(nullptr),
m_digital_value(false),
m_min(0),
m_max(maskbits),
@@ -1473,7 +1473,7 @@ ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value def
m_crosshair_offset(0),
m_crosshair_altaxis(0),
m_full_turn_count(0),
- m_remap_table(NULL),
+ m_remap_table(nullptr),
m_way(0)
{
// reset sequences and chars
@@ -1485,10 +1485,10 @@ ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value def
if (type == IPT_DIPSWITCH || type == IPT_CONFIG)
{
const input_device_default *def = device().input_ports_defaults();
- if (def != NULL)
+ if (def != nullptr)
{
const char *fulltag = port.tag();
- for ( ; def->tag != NULL; def++)
+ for ( ; def->tag != nullptr; def++)
if (device().subtag(def->tag) == fulltag && def->mask == m_mask)
m_defvalue = def->defvalue & m_mask;
}
@@ -1518,9 +1518,9 @@ ioport_field::~ioport_field()
const char *ioport_field::name() const
{
// if we have a non-default name, use that
- if (m_live != NULL && !m_live->name.empty())
+ if (m_live != nullptr && !m_live->name.empty())
return m_live->name.c_str();
- if (m_name != NULL)
+ if (m_name != nullptr)
return m_name;
// otherwise, return the name associated with the type
@@ -1536,7 +1536,7 @@ const char *ioport_field::name() const
const input_seq &ioport_field::seq(input_seq_type seqtype) const
{
// if no live state, return default
- if (m_live == NULL)
+ if (m_live == nullptr)
return defseq(seqtype);
// if the field is disabled, return no key
@@ -1633,7 +1633,7 @@ ioport_type_class ioport_field::type_class() const
break;
case 0:
- if (m_name != NULL && m_name != (const char *)-1)
+ if (m_name != nullptr && m_name != (const char *)-1)
result = INPUT_CLASS_MISC;
else
result = INPUT_CLASS_INTERNAL;
@@ -1683,11 +1683,11 @@ void ioport_field::get_user_settings(user_settings &settings)
settings.seq[seqtype] = seq(seqtype);
// if there's a list of settings or we're an adjuster, copy the current value
- if (first_setting() != NULL || m_type == IPT_ADJUSTER)
+ if (first_setting() != nullptr || m_type == IPT_ADJUSTER)
settings.value = m_live->value;
// if there's analog data, extract the analog settings
- if (m_live->analog != NULL)
+ if (m_live->analog != nullptr)
{
settings.sensitivity = m_live->analog->sensitivity();
settings.delta = m_live->analog->delta();
@@ -1721,11 +1721,11 @@ void ioport_field::set_user_settings(const user_settings &settings)
}
// if there's a list of settings or we're an adjuster, copy the current value
- if (first_setting() != NULL || m_type == IPT_ADJUSTER)
+ if (first_setting() != nullptr || m_type == IPT_ADJUSTER)
m_live->value = settings.value;
// if there's analog data, extract the analog settings
- if (m_live->analog != NULL)
+ if (m_live->analog != nullptr)
{
m_live->analog->m_sensitivity = settings.sensitivity;
m_live->analog->m_delta = settings.delta;
@@ -1749,10 +1749,10 @@ void ioport_field::set_user_settings(const user_settings &settings)
const char *ioport_field::setting_name() const
{
// only makes sense if we have settings
- assert(first_setting() != NULL);
+ assert(first_setting() != nullptr);
// scan the list of settings looking for a match on the current value
- for (ioport_setting *setting = first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = first_setting(); setting != nullptr; setting = setting->next())
if (setting->enabled())
if (setting->value() == m_live->value)
return setting->name();
@@ -1769,10 +1769,10 @@ const char *ioport_field::setting_name() const
bool ioport_field::has_previous_setting() const
{
// only makes sense if we have settings
- assert(first_setting() != NULL);
+ assert(first_setting() != nullptr);
// scan the list of settings looking for a match on the current value
- for (ioport_setting *setting = first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = first_setting(); setting != nullptr; setting = setting->next())
if (setting->enabled())
return (setting->value() != m_live->value);
@@ -1788,18 +1788,18 @@ bool ioport_field::has_previous_setting() const
void ioport_field::select_previous_setting()
{
// only makes sense if we have settings
- assert(first_setting() != NULL);
+ assert(first_setting() != nullptr);
// scan the list of settings looking for a match on the current value
- ioport_setting *prevsetting = NULL;
+ ioport_setting *prevsetting = nullptr;
bool found_match = false;
- for (ioport_setting *setting = first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = first_setting(); setting != nullptr; setting = setting->next())
if (setting->enabled())
{
if (setting->value() == m_live->value)
{
found_match = true;
- if (prevsetting != NULL)
+ if (prevsetting != nullptr)
break;
}
prevsetting = setting;
@@ -1808,13 +1808,13 @@ void ioport_field::select_previous_setting()
// if we didn't find a matching value, select the first
if (!found_match)
{
- for (prevsetting = first_setting(); prevsetting != NULL; prevsetting = prevsetting->next())
+ for (prevsetting = first_setting(); prevsetting != nullptr; prevsetting = prevsetting->next())
if (prevsetting->enabled())
break;
}
// update the value to the previous one
- if (prevsetting != NULL)
+ if (prevsetting != nullptr)
m_live->value = prevsetting->value();
}
@@ -1827,11 +1827,11 @@ void ioport_field::select_previous_setting()
bool ioport_field::has_next_setting() const
{
// only makes sense if we have settings
- assert(first_setting() != NULL);
+ assert(first_setting() != nullptr);
// scan the list of settings looking for a match on the current value
bool found = false;
- for (ioport_setting *setting = first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = first_setting(); setting != nullptr; setting = setting->next())
if (setting->enabled())
{
if (found)
@@ -1852,30 +1852,30 @@ bool ioport_field::has_next_setting() const
void ioport_field::select_next_setting()
{
// only makes sense if we have settings
- assert(first_setting() != NULL);
+ assert(first_setting() != nullptr);
// scan the list of settings looking for a match on the current value
- ioport_setting *nextsetting = NULL;
+ ioport_setting *nextsetting = nullptr;
ioport_setting *setting;
- for (setting = first_setting(); setting != NULL; setting = setting->next())
+ for (setting = first_setting(); setting != nullptr; setting = setting->next())
if (setting->enabled())
if (setting->value() == m_live->value)
break;
// if we found one, scan forward for the next valid one
- if (setting != NULL)
- for (nextsetting = setting->next(); nextsetting != NULL; nextsetting = nextsetting->next())
+ if (setting != nullptr)
+ for (nextsetting = setting->next(); nextsetting != nullptr; nextsetting = nextsetting->next())
if (nextsetting->enabled())
break;
// if we hit the end, search from the beginning
- if (nextsetting == NULL)
- for (nextsetting = first_setting(); nextsetting != NULL; nextsetting = nextsetting->next())
+ if (nextsetting == nullptr)
+ for (nextsetting = first_setting(); nextsetting != nullptr; nextsetting = nextsetting->next())
if (nextsetting->enabled())
break;
// update the value to the previous one
- if (nextsetting != NULL)
+ if (nextsetting != nullptr)
m_live->value = nextsetting->value();
}
@@ -1892,7 +1892,7 @@ void ioport_field::frame_update(ioport_value &result, bool mouse_down)
return;
// handle analog inputs first
- if (m_live->analog != NULL)
+ if (m_live->analog != nullptr)
{
m_live->analog->frame_update(machine());
return;
@@ -1957,7 +1957,7 @@ void ioport_field::frame_update(ioport_value &result, bool mouse_down)
curstate = false;
// additional logic to restrict digital joysticks
- if (curstate && !m_digital_value && !mouse_down && m_live->joystick != NULL && m_way != 16 && !machine().options().joystick_contradictory())
+ if (curstate && !m_digital_value && !mouse_down && m_live->joystick != nullptr && m_way != 16 && !machine().options().joystick_contradictory())
{
UINT8 mask = (m_way == 4) ? m_live->joystick->current4way() : m_live->joystick->current();
if (!(mask & (1 << m_live->joydir)))
@@ -2043,21 +2043,21 @@ void ioport_field::crosshair_position(float &x, float &y, bool &gotx, bool &goty
void ioport_field::expand_diplocation(const char *location, std::string &errorbuf)
{
// if nothing present, bail
- if (location == NULL)
+ if (location == nullptr)
return;
m_diploclist.reset();
// parse the string
std::string name; // Don't move this variable inside the loop, lastname's lifetime depends on it being outside
- const char *lastname = NULL;
+ const char *lastname = nullptr;
const char *curentry = location;
int entries = 0;
while (*curentry != 0)
{
// find the end of this entry
const char *comma = strchr(curentry, ',');
- if (comma == NULL)
+ if (comma == nullptr)
comma = curentry + strlen(curentry);
// extract it to tempbuf
@@ -2069,7 +2069,7 @@ void ioport_field::expand_diplocation(const char *location, std::string &errorbu
const char *colon = strchr(tempstr.c_str(), ':');
// allocate and copy the name if it is present
- if (colon != NULL)
+ if (colon != nullptr)
{
lastname = name.assign(number, colon - number).c_str();
number = colon + 1;
@@ -2078,7 +2078,7 @@ void ioport_field::expand_diplocation(const char *location, std::string &errorbu
// otherwise, just copy the last name
else
{
- if (lastname == NULL)
+ if (lastname == nullptr)
{
strcatprintf(errorbuf, "Switch location '%s' missing switch name!\n", location);
lastname = (char *)"UNK";
@@ -2135,7 +2135,7 @@ void ioport_field::init_live_state(analog_field *analog)
m_condition.initialize(device());
- for (ioport_setting *setting = first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = first_setting(); setting != nullptr; setting = setting->next())
setting->condition().initialize(setting->device());
}
@@ -2151,7 +2151,7 @@ void ioport_field::init_live_state(analog_field *analog)
ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog)
: analog(analog),
- joystick(NULL),
+ joystick(nullptr),
value(field.defvalue()),
impulse(0),
last(0),
@@ -2170,7 +2170,7 @@ ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog)
}
// Name keyboard key names
- if (field.type_class() == INPUT_CLASS_KEYBOARD && field.specific_name() == NULL)
+ if (field.type_class() == INPUT_CLASS_KEYBOARD && field.specific_name() == nullptr)
{
// loop through each character on the field
std::string tempstr;
@@ -2202,7 +2202,7 @@ ioport_field_live::ioport_field_live(ioport_field &field, analog_field *analog)
//-------------------------------------------------
ioport_port::ioport_port(device_t &owner, const char *tag)
- : m_next(NULL),
+ : m_next(nullptr),
m_device(owner),
m_tag(tag),
m_modcount(0),
@@ -2250,10 +2250,10 @@ ioport_manager &ioport_port::manager() const
ioport_field *ioport_port::field(ioport_value mask)
{
// if we got the port, look for the field
- for (ioport_field *field = first_field(); field != NULL; field = field->next())
+ for (ioport_field *field = first_field(); field != nullptr; field = field->next())
if ((field->mask() & mask) != 0)
return field;
- return NULL;
+ return nullptr;
}
@@ -2269,14 +2269,14 @@ ioport_value ioport_port::read()
ioport_value result = m_live->digital;
// insert dynamic read values
- for (dynamic_field *dynfield = m_live->readlist.first(); dynfield != NULL; dynfield = dynfield->next())
+ for (dynamic_field *dynfield = m_live->readlist.first(); dynfield != nullptr; dynfield = dynfield->next())
dynfield->read(result);
// apply active high/low state to digital and dynamic read inputs
result ^= m_live->defvalue;
// insert analog portions
- for (analog_field *analog = m_live->analoglist.first(); analog != NULL; analog = analog->next())
+ for (analog_field *analog = m_live->analoglist.first(); analog != nullptr; analog = analog->next())
analog->read(result);
return result;
@@ -2291,7 +2291,7 @@ void ioport_port::write(ioport_value data, ioport_value mem_mask)
{
// call device line write handlers
COMBINE_DATA(&m_live->outputvalue);
- for (dynamic_field *dynfield = m_live->writelist.first(); dynfield != NULL; dynfield = dynfield->next())
+ for (dynamic_field *dynfield = m_live->writelist.first(); dynfield != nullptr; dynfield = dynfield->next())
if (dynfield->field().type() == IPT_OUTPUT)
dynfield->write(m_live->outputvalue ^ dynfield->field().defvalue());
}
@@ -2307,7 +2307,7 @@ void ioport_port::frame_update(ioport_field *mouse_field)
m_live->digital = 0;
// now loop back and modify based on the inputs
- for (ioport_field *field = first_field(); field != NULL; field = field->next())
+ for (ioport_field *field = first_field(); field != nullptr; field = field->next())
field->frame_update(m_live->digital, field == mouse_field);
// hook for MESS's natural keyboard support
@@ -2327,7 +2327,7 @@ void ioport_port::collapse_fields(std::string &errorbuf)
// remove the whole list and start from scratch
ioport_field *field = m_fieldlist.detach_all();
- while (field != NULL)
+ while (field != nullptr)
{
// if this modcount doesn't match, reset
if (field->modcount() != lastmodcount)
@@ -2361,7 +2361,7 @@ void ioport_port::insert_field(ioport_field &newfield, ioport_value &disallowedb
// first modify/nuke any entries that intersect our maskbits
ioport_field *nextfield;
- for (ioport_field *field = first_field(); field != NULL; field = nextfield)
+ for (ioport_field *field = first_field(); field != nullptr; field = nextfield)
{
nextfield = field->next();
if ((field->mask() & newfield.mask()) != 0 &&
@@ -2381,7 +2381,7 @@ void ioport_port::insert_field(ioport_field &newfield, ioport_value &disallowedb
// scan forward to find where to insert ourselves
ioport_field *field;
- for (field = first_field(); field != NULL; field = field->next())
+ for (field = first_field(); field != nullptr; field = field->next())
if (field->mask() > lowbit)
break;
@@ -2415,10 +2415,10 @@ ioport_port_live::ioport_port_live(ioport_port &port)
outputvalue(0)
{
// iterate over fields
- for (ioport_field *field = port.first_field(); field != NULL; field = field->next())
+ for (ioport_field *field = port.first_field(); field != nullptr; field = field->next())
{
// allocate analog state if it's analog
- analog_field *analog = NULL;
+ analog_field *analog = nullptr;
if (field->is_analog())
analog = &analoglist.append(*global_alloc(analog_field(*field)));
@@ -2480,7 +2480,7 @@ time_t ioport_manager::initialize()
// if we have a token list, proceed
device_iterator iter(machine().root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
{
std::string errors;
m_portlist.append(*device, errors);
@@ -2490,14 +2490,14 @@ time_t ioport_manager::initialize()
// renumber player numbers for controller ports
int player_offset = 0;
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
{
int players = 0;
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
{
if (&port->device()==device)
{
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->type_class()==INPUT_CLASS_CONTROLLER)
{
if (players < field->player() + 1) players = field->player() + 1;
@@ -2509,7 +2509,7 @@ time_t ioport_manager::initialize()
}
// allocate live structures to mirror the configuration
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
port->init_live_state();
// handle autoselection of devices
@@ -2525,9 +2525,9 @@ time_t ioport_manager::initialize()
// look for 4-way diagonal joysticks and change the default map if we find any
const char *joystick_map_default = machine().options().joystick_map();
if (joystick_map_default[0] == 0 || strcmp(joystick_map_default, "auto") == 0)
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
- if (field->live().joystick != NULL && field->rotated())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
+ if (field->live().joystick != nullptr && field->rotated())
{
machine().input().set_global_joystick_map(joystick_map_4way_diagonal);
break;
@@ -2545,8 +2545,8 @@ time_t ioport_manager::initialize()
m_has_bioses = false;
// scan the input port array to see what options we need to enable
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
{
if (field->type() == IPT_DIPSWITCH)
m_has_dips = true;
@@ -2556,7 +2556,7 @@ time_t ioport_manager::initialize()
m_has_analog = true;
}
device_iterator deviter(machine().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
if (device->rom_region())
for (const rom_entry *rom = device->rom_region(); !ROMENTRY_ISEND(rom); rom++)
if (ROMENTRY_ISSYSTEM_BIOS(rom)) { m_has_bioses= true; break; }
@@ -2583,7 +2583,7 @@ void ioport_manager::init_port_types()
machine().osd().customize_input_type_list(m_typelist);
// now iterate over the OSD-modified types
- for (input_type_entry *curtype = first_type(); curtype != NULL; curtype = curtype->next())
+ for (input_type_entry *curtype = first_type(); curtype != nullptr; curtype = curtype->next())
{
// first copy all the OSD-updated sequences into our current state
curtype->restore_default_seq();
@@ -2634,9 +2634,9 @@ void ioport_manager::init_autoselect_devices(int type1, int type2, int type3, co
osd_printf_error("Invalid %s value %s; reverting to keyboard\n", option, stemp);
// only scan the list if we haven't already enabled this class of control
- if (first_port() != NULL && !machine().input().device_class(autoenable).enabled())
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ if (first_port() != nullptr && !machine().input().device_class(autoenable).enabled())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
// if this port type is in use, apply the autoselect criteria
if ((type1 != 0 && field->type() == type1) || (type2 != 0 && field->type() == type2) || (type3 != 0 && field->type() == type3))
@@ -2670,7 +2670,7 @@ const char *ioport_manager::type_name(ioport_type type, UINT8 player)
{
// if we have a machine, use the live state and quick lookup
input_type_entry *entry = m_type_to_entry[type][player];
- if (entry != NULL)
+ if (entry != nullptr)
return entry->name();
// if we find nothing, return an invalid group
@@ -2686,7 +2686,7 @@ const char *ioport_manager::type_name(ioport_type type, UINT8 player)
ioport_group ioport_manager::type_group(ioport_type type, int player)
{
input_type_entry *entry = m_type_to_entry[type][player];
- if (entry != NULL)
+ if (entry != nullptr)
return entry->group();
// if we find nothing, return an invalid group
@@ -2706,7 +2706,7 @@ const input_seq &ioport_manager::type_seq(ioport_type type, int player, input_se
// if we have a machine, use the live state and quick lookup
input_type_entry *entry = m_type_to_entry[type][player];
- if (entry != NULL)
+ if (entry != nullptr)
return entry->seq(seqtype);
// if we find nothing, return an empty sequence
@@ -2722,7 +2722,7 @@ const input_seq &ioport_manager::type_seq(ioport_type type, int player, input_se
void ioport_manager::set_type_seq(ioport_type type, int player, input_seq_type seqtype, const input_seq &newseq)
{
input_type_entry *entry = m_type_to_entry[type][player];
- if (entry != NULL)
+ if (entry != nullptr)
entry->m_seq[seqtype] = newseq;
}
@@ -2745,8 +2745,8 @@ bool ioport_manager::type_pressed(ioport_type type, int player)
bool ioport_manager::type_class_present(ioport_type_class inputclass)
{
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->type_class() == inputclass)
return true;
return false;
@@ -2761,8 +2761,8 @@ bool ioport_manager::type_class_present(ioport_type_class inputclass)
bool ioport_manager::has_keyboard() const
{
// iterate over ports and fields
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
{
// if we are at init, check IPT_KEYBOARD
if (!m_safe_to_read && field->type() == IPT_KEYBOARD)
@@ -2784,8 +2784,8 @@ bool ioport_manager::has_keyboard() const
int ioport_manager::count_players() const
{
int max_player = 0;
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->type_class() == INPUT_CLASS_CONTROLLER && max_player <= field->player() + 1)
max_player = field->player() + 1;
@@ -2802,8 +2802,8 @@ bool ioport_manager::crosshair_position(int player, float &x, float &y)
{
// read all the lightgun values
bool gotx = false, goty = false;
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->player() == player && field->crosshair_axis() != CROSSHAIR_AXIS_NONE && field->enabled())
{
field->crosshair_position(x, y, gotx, goty);
@@ -2828,14 +2828,14 @@ void ioport_manager::update_defaults()
for (int loopnum = 0; loopnum < 2; loopnum++)
{
// loop over all input ports
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
{
// only clear on the first pass
if (loopnum == 0)
port->live().defvalue = 0;
// first compute the default value for the entire port
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (field->enabled())
port->live().defvalue = (port->live().defvalue & ~field->mask()) | (field->live().value & field->mask());
}
@@ -2851,7 +2851,7 @@ void ioport_manager::update_defaults()
digital_joystick &ioport_manager::digjoystick(int player, int number)
{
// find it in the list
- for (digital_joystick *joystick = m_joystick_list.first(); joystick != NULL; joystick = joystick->next())
+ for (digital_joystick *joystick = m_joystick_list.first(); joystick != nullptr; joystick = joystick->next())
if (joystick->player() == player && joystick->number() == number)
return *joystick;
@@ -2891,7 +2891,7 @@ g_profiler.start(PROFILER_INPUT);
m_last_frame_time = curtime;
// update the digital joysticks
- for (digital_joystick *joystick = m_joystick_list.first(); joystick != NULL; joystick = joystick->next())
+ for (digital_joystick *joystick = m_joystick_list.first(); joystick != nullptr; joystick = joystick->next())
joystick->frame_update();
// compute default values for all the ports
@@ -2903,21 +2903,21 @@ g_profiler.start(PROFILER_INPUT);
render_target *mouse_target = ui_input_find_mouse(machine(), &mouse_target_x, &mouse_target_y, &mouse_button);
// if the button is pressed, map the point and determine what was hit
- ioport_field *mouse_field = NULL;
- if (mouse_button && mouse_target != NULL)
+ ioport_field *mouse_field = nullptr;
+ if (mouse_button && mouse_target != nullptr)
{
- ioport_port *port = NULL;
+ ioport_port *port = nullptr;
ioport_value mask;
float x, y;
if (mouse_target->map_point_input(mouse_target_x, mouse_target_y, port, mask, x, y))
{
- if (port != NULL)
+ if (port != nullptr)
mouse_field = port->field(mask);
}
}
// loop over all input ports
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
{
port->frame_update(mouse_field);
@@ -2927,7 +2927,7 @@ g_profiler.start(PROFILER_INPUT);
// call device line write handlers
ioport_value newvalue = port->read();
- for (dynamic_field *dynfield = port->live().writelist.first(); dynfield != NULL; dynfield = dynfield->next())
+ for (dynamic_field *dynfield = port->live().writelist.first(); dynfield != nullptr; dynfield = dynfield->next())
if (dynfield->field().type() != IPT_OUTPUT)
dynfield->write(newvalue);
}
@@ -2968,7 +2968,7 @@ void ioport_manager::load_config(int config_type, xml_data_node *parentnode)
}
// early exit if no data to parse
- if (parentnode == NULL)
+ if (parentnode == nullptr)
return;
// iterate over all the remap nodes for controller configs only
@@ -2992,7 +2992,7 @@ void ioport_manager::load_config(int config_type, xml_data_node *parentnode)
{
// with a valid type, parse out the new sequence
input_seq_type seqtype = token_to_seq_type(xml_get_attribute_string(seqnode, "type", ""));
- if (seqtype != -1 && seqnode->value != NULL)
+ if (seqtype != -1 && seqnode->value != nullptr)
{
if (strcmp(seqnode->value, "NONE") == 0)
newseq[seqtype].set();
@@ -3011,7 +3011,7 @@ void ioport_manager::load_config(int config_type, xml_data_node *parentnode)
// after applying the controller config, push that back into the backup, since that is
// what we will diff against
if (config_type == CONFIG_TYPE_CONTROLLER)
- for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next())
+ for (input_type_entry *entry = m_typelist.first(); entry != nullptr; entry = entry->next())
for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
entry->defseq(seqtype) = entry->seq(seqtype);
}
@@ -3026,7 +3026,7 @@ void ioport_manager::load_remap_table(xml_data_node *parentnode)
{
// count items first so we can allocate
int count = 0;
- for (xml_data_node *remapnode = xml_get_sibling(parentnode->child, "remap"); remapnode != NULL; remapnode = xml_get_sibling(remapnode->next, "remap"))
+ for (xml_data_node *remapnode = xml_get_sibling(parentnode->child, "remap"); remapnode != nullptr; remapnode = xml_get_sibling(remapnode->next, "remap"))
count++;
// if we have some, deal with them
@@ -3038,7 +3038,7 @@ void ioport_manager::load_remap_table(xml_data_node *parentnode)
// build up the remap table
count = 0;
- for (xml_data_node *remapnode = xml_get_sibling(parentnode->child, "remap"); remapnode != NULL; remapnode = xml_get_sibling(remapnode->next, "remap"))
+ for (xml_data_node *remapnode = xml_get_sibling(parentnode->child, "remap"); remapnode != nullptr; remapnode = xml_get_sibling(remapnode->next, "remap"))
{
input_code origcode = machine().input().code_from_token(xml_get_attribute_string(remapnode, "origcode", ""));
input_code newcode = machine().input().code_from_token(xml_get_attribute_string(remapnode, "newcode", ""));
@@ -3052,7 +3052,7 @@ void ioport_manager::load_remap_table(xml_data_node *parentnode)
// loop over the remapping table, then over default ports, replacing old with new
for (int remapnum = 0; remapnum < count; remapnum++)
- for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next())
+ for (input_type_entry *entry = m_typelist.first(); entry != nullptr; entry = entry->next())
for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
entry->m_seq[seqtype].replace(oldtable[remapnum], newtable[remapnum]);
}
@@ -3067,7 +3067,7 @@ void ioport_manager::load_remap_table(xml_data_node *parentnode)
bool ioport_manager::load_default_config(xml_data_node *portnode, int type, int player, const input_seq *newseq)
{
// find a matching port in the list
- for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next())
+ for (input_type_entry *entry = m_typelist.first(); entry != nullptr; entry = entry->next())
if (entry->type() == type && entry->player() == player)
{
for (input_seq_type seqtype = SEQ_TYPE_STANDARD; seqtype < SEQ_TYPE_TOTAL; ++seqtype)
@@ -3088,14 +3088,14 @@ bool ioport_manager::load_default_config(xml_data_node *portnode, int type, int
bool ioport_manager::load_game_config(xml_data_node *portnode, int type, int player, const input_seq *newseq)
{
// read the mask, index, and defvalue attributes
- const char *tag = xml_get_attribute_string(portnode, "tag", NULL);
+ const char *tag = xml_get_attribute_string(portnode, "tag", nullptr);
ioport_value mask = xml_get_attribute_int(portnode, "mask", 0);
ioport_value defvalue = xml_get_attribute_int(portnode, "defvalue", 0);
// find the port we want; if no tag, search them all
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
- if (tag == NULL || strcmp(port->tag(), tag) == 0)
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
+ if (tag == nullptr || strcmp(port->tag(), tag) == 0)
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
// find the matching mask and defvalue
if (field->type() == type && field->player() == player &&
@@ -3108,14 +3108,14 @@ bool ioport_manager::load_game_config(xml_data_node *portnode, int type, int pla
// fetch configurable attributes
// for non-analog fields
- if (field->live().analog == NULL)
+ if (field->live().analog == nullptr)
{
// fetch the value
field->live().value = xml_get_attribute_int(portnode, "value", field->defvalue());
// fetch yes/no for toggle setting
- const char *togstring = xml_get_attribute_string(portnode, "toggle", NULL);
- if (togstring != NULL)
+ const char *togstring = xml_get_attribute_string(portnode, "toggle", nullptr);
+ if (togstring != nullptr)
field->live().toggle = (strcmp(togstring, "yes") == 0);
}
@@ -3128,8 +3128,8 @@ bool ioport_manager::load_game_config(xml_data_node *portnode, int type, int pla
field->live().analog->m_sensitivity = xml_get_attribute_int(portnode, "sensitivity", field->sensitivity());
// fetch yes/no for reverse setting
- const char *revstring = xml_get_attribute_string(portnode, "reverse", NULL);
- if (revstring != NULL)
+ const char *revstring = xml_get_attribute_string(portnode, "reverse", nullptr);
+ if (revstring != nullptr)
field->live().analog->m_reverse = (strcmp(revstring, "yes") == 0);
}
return true;
@@ -3152,7 +3152,7 @@ bool ioport_manager::load_game_config(xml_data_node *portnode, int type, int pla
void ioport_manager::save_config(int config_type, xml_data_node *parentnode)
{
// if no parentnode, ignore
- if (parentnode == NULL)
+ if (parentnode == nullptr)
return;
// default ports save differently
@@ -3179,7 +3179,7 @@ void ioport_manager::save_sequence(xml_data_node *parentnode, input_seq_type typ
// add the new node
xml_data_node *seqnode = xml_add_child(parentnode, "newseq", seqstring.c_str());
- if (seqnode != NULL)
+ if (seqnode != nullptr)
xml_set_attribute(seqnode, "type", seqtypestrings[type]);
}
@@ -3214,7 +3214,7 @@ bool ioport_manager::save_this_input_field_type(ioport_type type)
void ioport_manager::save_default_inputs(xml_data_node *parentnode)
{
// iterate over ports
- for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next())
+ for (input_type_entry *entry = m_typelist.first(); entry != nullptr; entry = entry->next())
{
// only save if this port is a type we save
if (save_this_input_field_type(entry->type()))
@@ -3229,8 +3229,8 @@ void ioport_manager::save_default_inputs(xml_data_node *parentnode)
if (seqtype < SEQ_TYPE_TOTAL)
{
// add a new port node
- xml_data_node *portnode = xml_add_child(parentnode, "port", NULL);
- if (portnode != NULL)
+ xml_data_node *portnode = xml_add_child(parentnode, "port", nullptr);
+ if (portnode != nullptr)
{
// add the port information and attributes
std::string tempstr;
@@ -3255,8 +3255,8 @@ void ioport_manager::save_default_inputs(xml_data_node *parentnode)
void ioport_manager::save_game_inputs(xml_data_node *parentnode)
{
// iterate over ports
- for (ioport_port *port = first_port(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = first_port(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
if (save_this_input_field_type(field->type()))
{
// determine if we changed
@@ -3284,8 +3284,8 @@ void ioport_manager::save_game_inputs(xml_data_node *parentnode)
if (changed)
{
// add a new port node
- xml_data_node *portnode = xml_add_child(parentnode, "port", NULL);
- if (portnode != NULL)
+ xml_data_node *portnode = xml_add_child(parentnode, "port", nullptr);
+ if (portnode != nullptr)
{
// add the identifying information and attributes
std::string tempstr;
@@ -3424,7 +3424,7 @@ void ioport_manager::playback_end(const char *message)
m_playback_file.close();
// pop a message
- if (message != NULL)
+ if (message != nullptr)
machine().popmessage("Playback Ended\nReason: %s", message);
// display speed stats
@@ -3476,7 +3476,7 @@ void ioport_manager::playback_port(ioport_port &port)
playback_read(port.live().digital);
// loop over analog ports and save their data
- for (analog_field *analog = port.live().analoglist.first(); analog != NULL; analog = analog->next())
+ for (analog_field *analog = port.live().analoglist.first(); analog != nullptr; analog = analog->next())
{
// read current and previous values
playback_read(analog->m_accum);
@@ -3570,7 +3570,7 @@ void ioport_manager::record_end(const char *message)
m_record_file.close();
// pop a message
- if (message != NULL)
+ if (message != nullptr)
machine().popmessage("Recording Ended\nReason: %s", message);
}
}
@@ -3610,7 +3610,7 @@ void ioport_manager::record_port(ioport_port &port)
record_write(port.live().digital);
// loop over analog ports and save their data
- for (analog_field *analog = port.live().analoglist.first(); analog != NULL; analog = analog->next())
+ for (analog_field *analog = port.live().analoglist.first(); analog != nullptr; analog = analog->next())
{
// store current and previous values
record_write(analog->m_accum);
@@ -3637,9 +3637,9 @@ ioport_configurer::ioport_configurer(device_t &owner, ioport_list &portlist, std
: m_owner(owner),
m_portlist(portlist),
m_errorbuf(errorbuf),
- m_curport(NULL),
- m_curfield(NULL),
- m_cursetting(NULL)
+ m_curport(nullptr),
+ m_curfield(nullptr),
+ m_cursetting(nullptr)
{
}
@@ -3652,8 +3652,8 @@ ioport_configurer::ioport_configurer(device_t &owner, ioport_list &portlist, std
const char *ioport_configurer::string_from_token(const char *string)
{
// 0 is an invalid index
- if (string == NULL)
- return NULL;
+ if (string == nullptr)
+ return nullptr;
// if the index is greater than the count, assume it to be a pointer
if (FPTR(string) >= INPUT_STRING_COUNT)
@@ -3689,8 +3689,8 @@ void ioport_configurer::port_alloc(const char *tag)
// add it to the list, and reset current field/setting
m_curport = &m_portlist.append(fulltag.c_str(), *global_alloc(ioport_port(m_owner, fulltag.c_str())));
- m_curfield = NULL;
- m_cursetting = NULL;
+ m_curfield = nullptr;
+ m_cursetting = nullptr;
}
@@ -3706,13 +3706,13 @@ void ioport_configurer::port_modify(const char *tag)
// find the existing port
m_curport = m_portlist.find(fulltag.c_str());
- if (m_curport == NULL)
+ if (m_curport == nullptr)
throw emu_fatalerror("Requested to modify nonexistent port '%s'", fulltag.c_str());
// bump the modification count, and reset current field/setting
m_curport->m_modcount++;
- m_curfield = NULL;
- m_cursetting = NULL;
+ m_curfield = nullptr;
+ m_cursetting = nullptr;
}
@@ -3723,7 +3723,7 @@ void ioport_configurer::port_modify(const char *tag)
void ioport_configurer::field_alloc(ioport_type type, ioport_value defval, ioport_value mask, const char *name)
{
// make sure we have a port
- if (m_curport == NULL)
+ if (m_curport == nullptr)
throw emu_fatalerror("alloc_field called with no active port (mask=%X defval=%X)\n", mask, defval);
// append the field
if (type != IPT_UNKNOWN && type != IPT_UNUSED)
@@ -3731,7 +3731,7 @@ void ioport_configurer::field_alloc(ioport_type type, ioport_value defval, iopor
m_curfield = &m_curport->m_fieldlist.append(*global_alloc(ioport_field(*m_curport, type, defval, mask, string_from_token(name))));
// reset the current setting
- m_cursetting = NULL;
+ m_cursetting = nullptr;
}
@@ -3769,7 +3769,7 @@ void ioport_configurer::field_add_code(input_seq_type which, input_code code)
void ioport_configurer::setting_alloc(ioport_value value, const char *name)
{
// make sure we have a field
- if (m_curfield == NULL)
+ if (m_curfield == nullptr)
throw emu_fatalerror("alloc_setting called with no active field (value=%X name=%s)\n", value, name);
m_cursetting = global_alloc(ioport_setting(*m_curfield, value & m_curfield->mask(), string_from_token(name)));
@@ -3785,7 +3785,7 @@ void ioport_configurer::setting_alloc(ioport_value value, const char *name)
void ioport_configurer::set_condition(ioport_condition::condition_t condition, const char *tag, ioport_value mask, ioport_value value)
{
- ioport_condition &target = (m_cursetting != NULL) ? m_cursetting->condition() : m_curfield->condition();
+ ioport_condition &target = (m_cursetting != nullptr) ? m_cursetting->condition() : m_curfield->condition();
target.set(condition, tag, mask, value);
}
@@ -3807,14 +3807,14 @@ void ioport_configurer::onoff_alloc(const char *name, ioport_value defval, iopor
}
// expand the diplocation
- if (diplocation != NULL)
+ if (diplocation != nullptr)
field_set_diplocation(diplocation);
// allocate settings
setting_alloc(defval & mask, DEF_STR(Off));
setting_alloc(~defval & mask, DEF_STR(On));
// clear cursettings set by setting_alloc
- m_cursetting = NULL;
+ m_cursetting = nullptr;
}
@@ -3844,7 +3844,7 @@ const char_info *char_info::find(unicode_char target)
else
return &charinfo[middle];
}
- return NULL;
+ return nullptr;
}
@@ -3853,7 +3853,7 @@ const char_info *char_info::find(unicode_char target)
//-------------------------------------------------
dynamic_field::dynamic_field(ioport_field &field)
- : m_next(NULL),
+ : m_next(nullptr),
m_field(field),
m_shift(0),
m_oldval(field.defvalue())
@@ -3911,7 +3911,7 @@ void dynamic_field::write(ioport_value newval)
//-------------------------------------------------
analog_field::analog_field(ioport_field &field)
- : m_next(NULL),
+ : m_next(nullptr),
m_field(field),
m_shift(0),
m_adjdefvalue(field.defvalue() & field.mask()),
@@ -4339,7 +4339,7 @@ void analog_field::read(ioport_value &result)
value = apply_settings(value);
// remap the value if needed
- if (m_field.remap_table() != NULL)
+ if (m_field.remap_table() != nullptr)
value = m_field.remap_table()[value];
// invert bits if needed
@@ -4381,8 +4381,8 @@ ioport_type ioport_manager::token_to_input_type(const char *string, int &player)
return ioport_type(ipnum);
// find the token in the list
- for (input_type_entry *entry = m_typelist.first(); entry != NULL; entry = entry->next())
- if (entry->token() != NULL && !strcmp(entry->token(), string))
+ for (input_type_entry *entry = m_typelist.first(); entry != nullptr; entry = entry->next())
+ if (entry->token() != nullptr && !strcmp(entry->token(), string))
{
player = entry->player();
return entry->type();
@@ -4403,7 +4403,7 @@ const char *ioport_manager::input_type_to_token(std::string &str, ioport_type ty
{
// look up the port and return the token
input_type_entry *entry = m_type_to_entry[type][player];
- if (entry != NULL)
+ if (entry != nullptr)
return str.assign(entry->token()).c_str();
// if that fails, carry on
diff --git a/src/emu/ioport.h b/src/emu/ioport.h
index fc42ae805d8..ddb653b5926 100644
--- a/src/emu/ioport.h
+++ b/src/emu/ioport.h
@@ -900,7 +900,7 @@ public:
bool none() const { return (m_condition == ALWAYS); }
// configuration
- void reset() { set(ALWAYS, NULL, 0, 0); }
+ void reset() { set(ALWAYS, nullptr, 0, 0); }
void set(condition_t condition, const char *tag, ioport_value mask, ioport_value value)
{
m_condition = condition;
@@ -1003,7 +1003,7 @@ class ioport_field
public:
// construction/destruction
- ioport_field(ioport_port &port, ioport_type type, ioport_value defvalue, ioport_value maskbits, const char *name = NULL);
+ ioport_field(ioport_port &port, ioport_type type, ioport_value defvalue, ioport_value maskbits, const char *name = nullptr);
~ioport_field();
// getters
@@ -1225,7 +1225,7 @@ private:
std::unique_ptr<ioport_port_live> m_live; // live state of port (NULL if not live)
};
-inline ioport_value read_safe(ioport_port *port, ioport_value defval) { return (port == NULL) ? defval : port->read(); }
+inline ioport_value read_safe(ioport_port *port, ioport_value defval) { return (port == nullptr) ? defval : port->read(); }
@@ -1424,13 +1424,13 @@ private:
template<typename _Type> _Type playback_read(_Type &result);
time_t playback_init();
- void playback_end(const char *message = NULL);
+ void playback_end(const char *message = nullptr);
void playback_frame(const attotime &curtime);
void playback_port(ioport_port &port);
template<typename _Type> void record_write(_Type value);
void record_init();
- void record_end(const char *message = NULL);
+ void record_end(const char *message = nullptr);
void record_frame(const attotime &curtime);
void record_port(ioport_port &port);
@@ -1482,7 +1482,7 @@ public:
void port_modify(const char *tag);
// field helpers
- void field_alloc(ioport_type type, ioport_value defval, ioport_value mask, const char *name = NULL);
+ void field_alloc(ioport_type type, ioport_value defval, ioport_value mask, const char *name = nullptr);
void field_add_char(unicode_char ch);
void field_add_code(input_seq_type which, input_code code);
void field_set_way(int way) const { m_curfield->m_way = way; }
@@ -1505,8 +1505,8 @@ public:
void field_set_analog_wraps() const { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_WRAPS; }
void field_set_remap_table(const ioport_value *table) { m_curfield->m_remap_table = table; }
void field_set_analog_invert() const { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_INVERT; }
- void field_set_dynamic_read(ioport_field_read_delegate delegate, void *param = NULL) const { m_curfield->m_read = delegate; m_curfield->m_read_param = param; }
- void field_set_dynamic_write(ioport_field_write_delegate delegate, void *param = NULL) const { m_curfield->m_write = delegate; m_curfield->m_write_param = param; }
+ void field_set_dynamic_read(ioport_field_read_delegate delegate, void *param = nullptr) const { m_curfield->m_read = delegate; m_curfield->m_read_param = param; }
+ void field_set_dynamic_write(ioport_field_write_delegate delegate, void *param = nullptr) const { m_curfield->m_write = delegate; m_curfield->m_write_param = param; }
void field_set_diplocation(const char *location) const { m_curfield->expand_diplocation(location, m_errorbuf); }
// setting helpers
diff --git a/src/emu/luaengine.cpp b/src/emu/luaengine.cpp
index 867e5fa992c..0aa4b45deb1 100644
--- a/src/emu/luaengine.cpp
+++ b/src/emu/luaengine.cpp
@@ -34,13 +34,13 @@
(fputs(p, stdout), fflush(stdout), /* show prompt */ \
fgets(b, LUA_MAXINPUT, stdin) != NULL) /* get line */
-static lua_State *globalL = NULL;
+static lua_State *globalL = nullptr;
#define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout)
#define luai_writeline() (luai_writestring("\n", 1), fflush(stdout))
const char *const lua_engine::tname_ioport = "lua.ioport";
-lua_engine* lua_engine::luaThis = NULL;
+lua_engine* lua_engine::luaThis = nullptr;
extern "C" {
int luaopen_lsqlite3(lua_State *L);
@@ -49,7 +49,7 @@ extern "C" {
static void lstop(lua_State *L, lua_Debug *ar)
{
(void)ar; /* unused arg. */
- lua_sethook(L, NULL, 0, 0);
+ lua_sethook(L, nullptr, 0, 0);
luaL_error(L, "interrupted!");
}
@@ -65,7 +65,7 @@ int lua_engine::report(int status) {
if (status != LUA_OK && !lua_isnil(m_lua_state, -1))
{
const char *msg = lua_tostring(m_lua_state, -1);
- if (msg == NULL) msg = "(error object is not a string)";
+ if (msg == nullptr) msg = "(error object is not a string)";
lua_writestringerror("%s\n", msg);
lua_pop(m_lua_state, 1);
/* force a complete garbage collection in case of errors */
@@ -124,7 +124,7 @@ int lua_engine::incomplete(int status)
lua_engine::hook::hook()
{
- L = NULL;
+ L = nullptr;
cb = -1;
}
@@ -138,7 +138,7 @@ void lua_engine::hook::set(lua_State *_L, int idx)
luaL_unref(L, LUA_REGISTRYINDEX, cb);
if (lua_isnil(_L, idx)) {
- L = NULL;
+ L = nullptr;
cb = -1;
} else {
@@ -162,7 +162,7 @@ void lua_engine::hook::call(lua_engine *engine, lua_State *T, int nparam)
void lua_engine::resume(lua_State *L, int nparam, lua_State *root)
{
- int s = lua_resume(L, NULL, nparam);
+ int s = lua_resume(L, nullptr, nparam);
switch(s) {
case LUA_OK:
if(!root) {
@@ -301,7 +301,7 @@ int lua_engine::emu_wait(lua_State *L)
{
luaL_argcheck(L, lua_isnumber(L, 1), 1, "waiting duration expected");
machine().scheduler().timer_set(attotime::from_double(lua_tonumber(L, 1)), timer_expired_delegate(FUNC(lua_engine::resume), this), 0, L);
- return lua_yieldk(L, 0, 0, 0);
+ return lua_yieldk(L, 0, 0, nullptr);
}
int lua_engine::l_emu_wait(lua_State *L)
@@ -330,7 +330,7 @@ void lua_engine::emu_hook_output(lua_State *L)
hook_output_cb.set(L, 1);
if (!output_notifier_set) {
- output_set_notifier(NULL, s_output_notifier, this);
+ output_set_notifier(nullptr, s_output_notifier, this);
output_notifier_set = true;
}
}
@@ -356,7 +356,7 @@ void lua_engine::emu_set_hook(lua_State *L)
if (strcmp(hookname, "output") == 0) {
hook_output_cb.set(L, 1);
if (!output_notifier_set) {
- output_set_notifier(NULL, s_output_notifier, this);
+ output_set_notifier(nullptr, s_output_notifier, this);
output_notifier_set = true;
}
} else if (strcmp(hookname, "frame") == 0) {
@@ -376,7 +376,7 @@ luabridge::LuaRef lua_engine::l_machine_get_screens(const running_machine *r)
lua_State *L = luaThis->m_lua_state;
luabridge::LuaRef screens_table = luabridge::LuaRef::newTable(L);
- for (device_t *dev = r->first_screen(); dev != NULL; dev = dev->next()) {
+ for (device_t *dev = r->first_screen(); dev != nullptr; dev = dev->next()) {
screen_device *sc = dynamic_cast<screen_device *>(dev);
if (sc && sc->configured() && sc->started() && sc->type()) {
screens_table[sc->tag()] = sc;
@@ -407,7 +407,7 @@ luabridge::LuaRef lua_engine::l_machine_get_devices(const running_machine *r)
luabridge::LuaRef lua_engine::devtree_dfs(device_t *root, luabridge::LuaRef devs_table)
{
if (root) {
- for (device_t *dev = root->first_subdevice(); dev != NULL; dev = dev->next()) {
+ for (device_t *dev = root->first_subdevice(); dev != nullptr; dev = dev->next()) {
if (dev && dev->configured() && dev->started()) {
devs_table[dev->tag()] = dev;
devtree_dfs(dev, devs_table);
@@ -447,7 +447,7 @@ luabridge::LuaRef lua_engine::l_dev_get_states(const device_t *d)
device_t *dev = const_cast<device_t *>(d);
lua_State *L = luaThis->m_lua_state;
luabridge::LuaRef st_table = luabridge::LuaRef::newTable(L);
- for (const device_state_entry *s = dev->state().state_first(); s != NULL; s = s->next()) {
+ for (const device_state_entry *s = dev->state().state_first(); s != nullptr; s = s->next()) {
// XXX: refrain from exporting non-visible entries?
if (s) {
st_table[s->symbol()] = const_cast<device_state_entry *>(s);
@@ -723,7 +723,7 @@ int lua_engine::lua_screen::l_draw_text(lua_State *L)
ui_manager &ui = sc->machine().ui();
ui.draw_text_full(&rc, msg, x, y , (1.0f - x),
JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, textcolor,
- UI_TEXT_BG_COLOR, NULL, NULL);
+ UI_TEXT_BG_COLOR, nullptr, nullptr);
return 0;
}
@@ -733,13 +733,13 @@ void *lua_engine::checkparam(lua_State *L, int idx, const char *tname)
const char *name;
if(!lua_getmetatable(L, idx))
- return 0;
+ return nullptr;
lua_rawget(L, LUA_REGISTRYINDEX);
name = lua_tostring(L, -1);
if(!name || strcmp(name, tname)) {
lua_pop(L, 1);
- return 0;
+ return nullptr;
}
lua_pop(L, 1);
@@ -785,7 +785,7 @@ int lua_engine::luaopen_ioport(lua_State *L)
{
static const struct luaL_Reg ioport_funcs [] = {
{ "write", l_ioport_write },
- { NULL, NULL } /* sentinel */
+ { nullptr, nullptr } /* sentinel */
};
luaL_newmetatable(L, tname_ioport);
@@ -875,7 +875,7 @@ static void *serve_lua(void *param)
lua_engine::lua_engine()
{
- m_machine = NULL;
+ m_machine = nullptr;
luaThis = this;
m_lua_state = luaL_newstate(); /* create state */
output_notifier_set = false;
@@ -908,7 +908,7 @@ lua_engine::~lua_engine()
void lua_engine::update_machine()
{
lua_newtable(m_lua_state);
- if (m_machine!=NULL)
+ if (m_machine!=nullptr)
{
// Create the ioport array
ioport_port *port = machine().ioport().first_port();
@@ -1032,7 +1032,7 @@ void lua_engine::start_console()
bool lua_engine::frame_hook()
{
bool is_cb_hooked = false;
- if (m_machine != NULL) {
+ if (m_machine != nullptr) {
// invoke registered callback (if any)
is_cb_hooked = hook_frame_cb.active();
if (is_cb_hooked) {
diff --git a/src/emu/luaengine.h b/src/emu/luaengine.h
index 7f9018d3759..9bc6275100e 100644
--- a/src/emu/luaengine.h
+++ b/src/emu/luaengine.h
@@ -46,7 +46,7 @@ public:
void periodic_check();
bool frame_hook();
- void resume(lua_State *L, int nparam = 0, lua_State *root = NULL);
+ void resume(lua_State *L, int nparam = 0, lua_State *root = nullptr);
void set_machine(running_machine *machine) { m_machine = machine; update_machine(); }
private:
struct hook {
@@ -57,7 +57,7 @@ private:
void set(lua_State *L, int idx);
lua_State *precall();
void call(lua_engine *engine, lua_State *T, int nparam);
- bool active() const { return L != NULL; }
+ bool active() const { return L != nullptr; }
};
static const char *const tname_ioport;
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 375ff153a48..16b11f5a970 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -115,13 +115,13 @@ osd_interface &running_machine::osd() const
//-------------------------------------------------
running_machine::running_machine(const machine_config &_config, machine_manager &manager)
- : firstcpu(NULL),
- primary_screen(NULL),
+ : firstcpu(nullptr),
+ primary_screen(nullptr),
debug_flags(0),
- romload_data(NULL),
- ui_input_data(NULL),
- debugcpu_data(NULL),
- generic_machine_data(NULL),
+ romload_data(nullptr),
+ ui_input_data(nullptr),
+ debugcpu_data(nullptr),
+ generic_machine_data(nullptr),
m_config(_config),
m_system(_config.gamedrv()),
m_manager(manager),
@@ -129,14 +129,14 @@ running_machine::running_machine(const machine_config &_config, machine_manager
m_paused(false),
m_hard_reset_pending(false),
m_exit_pending(false),
- m_soft_reset_timer(NULL),
+ m_soft_reset_timer(nullptr),
m_rand_seed(0x9d14abd7),
m_ui_active(_config.options().ui_active()),
m_basename(_config.gamedrv().name),
m_sample_rate(_config.options().sample_rate()),
m_saveload_schedule(SLS_NONE),
m_saveload_schedule_time(attotime::zero),
- m_saveload_searchpath(NULL),
+ m_saveload_searchpath(nullptr),
m_save(*this),
m_memory(*this),
@@ -148,12 +148,12 @@ running_machine::running_machine(const machine_config &_config, machine_manager
// set the machine on all devices
device_iterator iter(root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->set_machine(*this);
// find devices
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
- if (dynamic_cast<cpu_device *>(device) != NULL)
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
+ if (dynamic_cast<cpu_device *>(device) != nullptr)
{
firstcpu = downcast<cpu_device *>(device);
break;
@@ -185,10 +185,10 @@ running_machine::~running_machine()
const char *running_machine::describe_context()
{
device_execute_interface *executing = m_scheduler.currently_executing();
- if (executing != NULL)
+ if (executing != nullptr)
{
cpu_device *cpu = dynamic_cast<cpu_device *>(&executing->device());
- if (cpu != NULL)
+ if (cpu != nullptr)
strprintf(m_context, "'%s' (%s)", cpu->tag(), core_i64_format(cpu->pc(), cpu->space(AS_PROGRAM).logaddrchars(), cpu->is_octal()));
}
else
@@ -257,7 +257,7 @@ void running_machine::start()
// initialize the watchdog
m_watchdog_counter = 0;
m_watchdog_timer = m_scheduler.timer_alloc(timer_expired_delegate(FUNC(running_machine::watchdog_fired), this));
- if (config().m_watchdog_vblank_count != 0 && primary_screen != NULL)
+ if (config().m_watchdog_vblank_count != 0 && primary_screen != nullptr)
primary_screen->register_vblank_callback(vblank_state_delegate(FUNC(running_machine::watchdog_vblank), this));
save().save_item(NAME(m_watchdog_enabled));
save().save_item(NAME(m_watchdog_counter));
@@ -530,7 +530,7 @@ void running_machine::schedule_soft_reset()
std::string running_machine::get_statename(const char *option)
{
std::string statename_str("");
- if (option == NULL || option[0] == 0)
+ if (option == nullptr || option[0] == 0)
statename_str.assign("%g");
else
statename_str.assign(option);
@@ -578,7 +578,7 @@ std::string running_machine::get_statename(const char *option)
// verify that there is such a device for this system
image_interface_iterator iter(root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
// get the device name
std::string tempdevname(image->brief_instance_name());
@@ -587,7 +587,7 @@ std::string running_machine::get_statename(const char *option)
if (devname_str.compare(tempdevname) == 0)
{
// verify that such a device has an image mounted
- if (image->basename_noext() != NULL)
+ if (image->basename_noext() != nullptr)
{
std::string filename(image->basename_noext());
@@ -624,7 +624,7 @@ void running_machine::set_saveload_filename(const char *filename)
// free any existing request and allocate a copy of the requested name
if (osd_is_absolute_path(filename))
{
- m_saveload_searchpath = NULL;
+ m_saveload_searchpath = nullptr;
m_saveload_pending_file.assign(filename);
}
else
@@ -794,7 +794,7 @@ void running_machine::add_logerror_callback(logerror_callback callback)
void running_machine::popmessage(const char *format, ...) const
{
// if the format is NULL, it is a signal to clear the popmessage
- if (format == NULL)
+ if (format == nullptr)
ui().popup_time(0, " ");
// otherwise, generate the buffer and call the UI to display the message
@@ -978,7 +978,7 @@ void running_machine::handle_saveload()
// unschedule the operation
cancel:
m_saveload_pending_file.clear();
- m_saveload_searchpath = NULL;
+ m_saveload_searchpath = nullptr;
m_saveload_schedule = SLS_NONE;
}
@@ -1094,7 +1094,7 @@ void running_machine::watchdog_vblank(screen_device &screen, bool vblank_state)
void running_machine::logfile_callback(const running_machine &machine, const char *buffer)
{
- if (machine.m_logfile != NULL)
+ if (machine.m_logfile != nullptr)
machine.m_logfile->puts(buffer);
}
@@ -1112,14 +1112,14 @@ void running_machine::start_all_devices()
// iterate over all devices
int failed_starts = 0;
device_iterator iter(root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (!device->started())
{
// attempt to start the device, catching any expected exceptions
try
{
// if the device doesn't have a machine yet, set it first
- if (device->m_machine == NULL)
+ if (device->m_machine == nullptr)
device->set_machine(*this);
// now start the device
@@ -1170,7 +1170,7 @@ void running_machine::stop_all_devices()
// iterate over devices and stop them
device_iterator iter(root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->stop();
}
@@ -1183,7 +1183,7 @@ void running_machine::stop_all_devices()
void running_machine::presave_all_devices()
{
device_iterator iter(root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->pre_save();
}
@@ -1196,7 +1196,7 @@ void running_machine::presave_all_devices()
void running_machine::postload_all_devices()
{
device_iterator iter(root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
device->post_load();
}
@@ -1210,14 +1210,14 @@ const char *running_machine::image_parent_basename(device_t *device)
device_t *dev = device;
while(dev != &root_device())
{
- device_image_interface *intf = NULL;
- if (dev!=NULL && dev->interface(intf))
+ device_image_interface *intf = nullptr;
+ if (dev!=nullptr && dev->interface(intf))
{
return intf->basename_noext();
}
dev = dev->owner();
}
- return NULL;
+ return nullptr;
}
/*-------------------------------------------------
@@ -1237,7 +1237,7 @@ std::string &running_machine::nvram_filename(std::string &result, device_t &devi
{
// add per software nvrams into one folder
const char *software = image_parent_basename(&device);
- if (software!=NULL && strlen(software)>0)
+ if (software!=nullptr && strlen(software)>0)
{
result.append(PATH_SEPARATOR).append(software);
}
@@ -1256,7 +1256,7 @@ std::string &running_machine::nvram_filename(std::string &result, device_t &devi
void running_machine::nvram_load()
{
nvram_interface_iterator iter(root_device());
- for (device_nvram_interface *nvram = iter.first(); nvram != NULL; nvram = iter.next())
+ for (device_nvram_interface *nvram = iter.first(); nvram != nullptr; nvram = iter.next())
{
std::string filename;
emu_file file(options().nvram_directory(), OPEN_FLAG_READ);
@@ -1278,7 +1278,7 @@ void running_machine::nvram_load()
void running_machine::nvram_save()
{
nvram_interface_iterator iter(root_device());
- for (device_nvram_interface *nvram = iter.first(); nvram != NULL; nvram = iter.next())
+ for (device_nvram_interface *nvram = iter.first(); nvram != nullptr; nvram = iter.next())
{
std::string filename;
emu_file file(options().nvram_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
@@ -1298,7 +1298,7 @@ void running_machine::nvram_save()
//-------------------------------------------------
running_machine::notifier_callback_item::notifier_callback_item(machine_notify_delegate func)
- : m_func(func)
+ : m_func(std::move(func))
{
}
diff --git a/src/emu/machine.h b/src/emu/machine.h
index 9f3ed6de3e8..755e8466384 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -253,8 +253,8 @@ private:
void set_saveload_filename(const char *filename);
std::string get_statename(const char *statename_opt);
void handle_saveload();
- void soft_reset(void *ptr = NULL, INT32 param = 0);
- void watchdog_fired(void *ptr = NULL, INT32 param = 0);
+ void soft_reset(void *ptr = nullptr, INT32 param = 0);
+ void watchdog_fired(void *ptr = nullptr, INT32 param = 0);
void watchdog_vblank(screen_device &screen, bool vblank_state);
const char *image_parent_basename(device_t *device);
std::string &nvram_filename(std::string &result, device_t &device);
diff --git a/src/emu/machine/generic.cpp b/src/emu/machine/generic.cpp
index 636b65f3581..2f4b94fb718 100644
--- a/src/emu/machine/generic.cpp
+++ b/src/emu/machine/generic.cpp
@@ -128,7 +128,7 @@ static void counters_load(running_machine &machine, int config_type, xml_data_no
return;
/* might not have any data */
- if (parentnode == NULL)
+ if (parentnode == nullptr)
return;
/* iterate over coins nodes */
@@ -141,7 +141,7 @@ static void counters_load(running_machine &machine, int config_type, xml_data_no
/* get the single tickets node */
ticketnode = xml_get_sibling(parentnode->child, "tickets");
- if (ticketnode != NULL)
+ if (ticketnode != nullptr)
state->dispensed_tickets = xml_get_attribute_int(ticketnode, "number", 0);
}
@@ -164,8 +164,8 @@ static void counters_save(running_machine &machine, int config_type, xml_data_no
for (i = 0; i < COIN_COUNTERS; i++)
if (state->coin_count[i] != 0)
{
- xml_data_node *coinnode = xml_add_child(parentnode, "coins", NULL);
- if (coinnode != NULL)
+ xml_data_node *coinnode = xml_add_child(parentnode, "coins", nullptr);
+ if (coinnode != nullptr)
{
xml_set_attribute_int(coinnode, "index", i);
xml_set_attribute_int(coinnode, "number", state->coin_count[i]);
@@ -175,8 +175,8 @@ static void counters_save(running_machine &machine, int config_type, xml_data_no
/* output tickets */
if (state->dispensed_tickets != 0)
{
- xml_data_node *tickets = xml_add_child(parentnode, "tickets", NULL);
- if (tickets != NULL)
+ xml_data_node *tickets = xml_add_child(parentnode, "tickets", nullptr);
+ if (tickets != nullptr)
xml_set_attribute_int(tickets, "number", state->dispensed_tickets);
}
}
diff --git a/src/emu/mame.cpp b/src/emu/mame.cpp
index 8ec83710330..f3ca9059a8d 100644
--- a/src/emu/mame.cpp
+++ b/src/emu/mame.cpp
@@ -81,7 +81,7 @@
// MACHINE MANAGER
//**************************************************************************
-machine_manager* machine_manager::m_manager = NULL;
+machine_manager* machine_manager::m_manager = nullptr;
osd_interface &machine_manager::osd() const
{
@@ -111,8 +111,8 @@ machine_manager::machine_manager(emu_options &options,osd_interface &osd)
: m_osd(osd),
m_options(options),
m_lua(global_alloc(lua_engine)),
- m_new_driver_pending(NULL),
- m_machine(NULL)
+ m_new_driver_pending(nullptr),
+ m_machine(nullptr)
{
}
@@ -124,7 +124,7 @@ machine_manager::machine_manager(emu_options &options,osd_interface &osd)
machine_manager::~machine_manager()
{
global_free(m_lua);
- m_manager = NULL;
+ m_manager = nullptr;
}
@@ -169,11 +169,11 @@ int machine_manager::execute()
m_lua->initialize();
while (error == MAMERR_NONE && !exit_pending)
{
- m_new_driver_pending = NULL;
+ m_new_driver_pending = nullptr;
// if no driver, use the internal empty driver
const game_driver *system = m_options.system();
- if (system == NULL)
+ if (system == nullptr)
{
system = &GAME_NAME(___empty);
if (firstgame)
@@ -191,7 +191,7 @@ int machine_manager::execute()
}
// otherwise, perform validity checks before anything else
- if (system != NULL)
+ if (system != nullptr)
{
validity_checker valid(m_options);
valid.check_shared_source(*system);
@@ -237,7 +237,7 @@ int machine_manager::execute()
exit_pending = true;
// machine will go away when we exit scope
- set_machine(NULL);
+ set_machine(nullptr);
}
// return an error
return error;
diff --git a/src/emu/mconfig.cpp b/src/emu/mconfig.cpp
index 8bee637c50e..1d3b5a2effd 100644
--- a/src/emu/mconfig.cpp
+++ b/src/emu/mconfig.cpp
@@ -26,17 +26,17 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
m_watchdog_vblank_count(0),
m_watchdog_time(attotime::zero),
m_force_no_drc(false),
- m_default_layout(NULL),
+ m_default_layout(nullptr),
m_gamedrv(gamedrv),
m_options(options)
{
// construct the config
- (*gamedrv.machine_config)(*this, NULL, NULL);
+ (*gamedrv.machine_config)(*this, nullptr, nullptr);
bool is_selected_driver = core_stricmp(gamedrv.name,options.system_name())==0;
// intialize slot devices - make sure that any required devices have been allocated
slot_interface_iterator slotiter(root_device());
- for (device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next())
+ for (device_slot_interface *slot = slotiter.first(); slot != nullptr; slot = slotiter.next())
{
device_t &owner = slot->device();
std::string temp;
@@ -45,7 +45,7 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
if (!is_selected_driver || !options.exists(owner.tag()+1))
selval = slot->default_option();
- if (selval != NULL && *selval != 0)
+ if (selval != nullptr && *selval != 0)
{
const device_slot_option *option = slot->option(selval);
@@ -54,11 +54,11 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
device_t *new_dev = device_add(&owner, option->name(), option->devtype(), option->clock());
const char *default_bios = option->default_bios();
- if (default_bios != NULL)
+ if (default_bios != nullptr)
device_t::static_set_default_bios_tag(*new_dev, default_bios);
machine_config_constructor additions = option->machine_config();
- if (additions != NULL)
+ if (additions != nullptr)
(*additions)(const_cast<machine_config &>(*this), new_dev, new_dev);
const input_device_default *input_device_defaults = option->input_device_defaults();
@@ -75,7 +75,7 @@ machine_config::machine_config(const game_driver &gamedrv, emu_options &options)
// then notify all devices that their configuration is complete
device_iterator iter(root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
if (!device->configured())
device->config_complete();
}
@@ -125,7 +125,7 @@ device_t *machine_config::device_add(device_t *owner, const char *tag, device_ty
assert(next != tag);
std::string part(tag, next-tag);
device_t *curdevice;
- for (curdevice = owner->m_subdevice_list.first(); curdevice != NULL; curdevice = curdevice->next())
+ for (curdevice = owner->m_subdevice_list.first(); curdevice != nullptr; curdevice = curdevice->next())
if (part.compare(curdevice->m_basetag)==0)
break;
if (!curdevice)
@@ -137,17 +137,17 @@ device_t *machine_config::device_add(device_t *owner, const char *tag, device_ty
assert(tag[0]);
// if there's an owner, let the owner do the work
- if (owner != NULL)
+ if (owner != nullptr)
return owner->add_subdevice(type, tag, clock);
// otherwise, allocate the device directly
- assert(m_root_device == NULL);
+ assert(m_root_device == nullptr);
m_root_device.reset((*type)(*this, tag, owner, clock));
// apply any machine configuration owned by the device now
machine_config_constructor additions = m_root_device->machine_config_additions();
- if (additions != NULL)
- (*additions)(*this, m_root_device.get(), NULL);
+ if (additions != nullptr)
+ (*additions)(*this, m_root_device.get(), nullptr);
return m_root_device.get();
}
@@ -160,9 +160,9 @@ device_t *machine_config::device_add(device_t *owner, const char *tag, device_ty
device_t *machine_config::device_replace(device_t *owner, const char *tag, device_type type, UINT32 clock)
{
// find the original device by this name (must exist)
- assert(owner != NULL);
+ assert(owner != nullptr);
device_t *device = owner->subdevice(tag);
- if (device == NULL)
+ if (device == nullptr)
{
osd_printf_warning("Warning: attempting to replace non-existent device '%s'\n", tag);
return device_add(owner, tag, type, clock);
@@ -181,17 +181,17 @@ device_t *machine_config::device_replace(device_t *owner, const char *tag, devic
device_t *machine_config::device_remove(device_t *owner, const char *tag)
{
// find the original device by this name (must exist)
- assert(owner != NULL);
+ assert(owner != nullptr);
device_t *device = owner->subdevice(tag);
- if (device == NULL)
+ if (device == nullptr)
{
osd_printf_warning("Warning: attempting to remove non-existent device '%s'\n", tag);
- return NULL;
+ return nullptr;
}
// let the device's owner do the work
device->owner()->remove_subdevice(*device);
- return NULL;
+ return nullptr;
}
@@ -203,10 +203,10 @@ device_t *machine_config::device_remove(device_t *owner, const char *tag)
device_t *machine_config::device_find(device_t *owner, const char *tag)
{
// find the original device by this name (must exist)
- assert(owner != NULL);
+ assert(owner != nullptr);
device_t *device = owner->subdevice(tag);
- assert(device != NULL);
- if (device == NULL)
+ assert(device != nullptr);
+ if (device == nullptr)
throw emu_fatalerror("Unable to find device '%s'\n", tag);
// return the device
diff --git a/src/emu/memarray.cpp b/src/emu/memarray.cpp
index 94662f0c7b0..03161f000bf 100644
--- a/src/emu/memarray.cpp
+++ b/src/emu/memarray.cpp
@@ -20,13 +20,13 @@
//-------------------------------------------------
memory_array::memory_array()
- : m_base(NULL),
+ : m_base(nullptr),
m_bytes(0),
m_membits(0),
m_endianness(ENDIANNESS_LITTLE),
m_bytes_per_entry(0),
- m_read_entry(NULL),
- m_write_entry(NULL)
+ m_read_entry(nullptr),
+ m_write_entry(nullptr)
{
}
@@ -38,7 +38,7 @@ memory_array::memory_array()
void memory_array::set(void *base, UINT32 bytes, int membits, endianness_t endianness, int bpe)
{
// validate inputs
- assert(base != NULL);
+ assert(base != nullptr);
assert(bytes > 0);
assert(membits == 8 || membits == 16 || membits == 32 || membits == 64);
assert(bpe == 1 || bpe == 2 || bpe == 4);
diff --git a/src/emu/memory.cpp b/src/emu/memory.cpp
index 6f89681d5d3..598ffab9ac6 100644
--- a/src/emu/memory.cpp
+++ b/src/emu/memory.cpp
@@ -336,15 +336,15 @@ public:
// construction/destruction
handler_entry_read(UINT8 width, endianness_t endianness, UINT8 **rambaseptr)
: handler_entry(width, endianness, rambaseptr),
- m_ioport(NULL)
+ m_ioport(nullptr)
{
}
- virtual void copy(handler_entry *entry);
+ virtual void copy(handler_entry *entry) override;
// getters
- virtual const char *name() const;
- virtual const char *subunit_name(int entry) const;
+ virtual const char *name() const override;
+ virtual const char *subunit_name(int entry) const override;
// configure delegate callbacks
void set_delegate(read8_delegate delegate, UINT64 mask = 0);
@@ -372,7 +372,7 @@ private:
_UintType read_stub_ioport(address_space &space, offs_t offset, _UintType mask) { return m_ioport->read(); }
// internal helper
- virtual void remove_subunit(int entry);
+ virtual void remove_subunit(int entry) override;
// internal state
access_handler m_read;
@@ -399,15 +399,15 @@ public:
// construction/destruction
handler_entry_write(UINT8 width, endianness_t endianness, UINT8 **rambaseptr)
: handler_entry(width, endianness, rambaseptr),
- m_ioport(NULL)
+ m_ioport(nullptr)
{
}
- virtual void copy(handler_entry *entry);
+ virtual void copy(handler_entry *entry) override;
// getters
- virtual const char *name() const;
- virtual const char *subunit_name(int entry) const;
+ virtual const char *name() const override;
+ virtual const char *subunit_name(int entry) const override;
// configure delegate callbacks
void set_delegate(write8_delegate delegate, UINT64 mask = 0);
@@ -435,7 +435,7 @@ private:
void write_stub_ioport(address_space &space, offs_t offset, _UintType data, _UintType mask) { m_ioport->write(data, mask); }
// internal helper
- virtual void remove_subunit(int entry);
+ virtual void remove_subunit(int entry) override;
// internal state
access_handler m_write;
@@ -450,12 +450,12 @@ class handler_entry_setoffset : public handler_entry
public:
// construction/destruction
handler_entry_setoffset()
- : handler_entry(0, ENDIANNESS_LITTLE, NULL)
+ : handler_entry(0, ENDIANNESS_LITTLE, nullptr)
{
}
- const char *name() const { return m_setoffset.name(); }
- const char *subunit_name(int entry) const { return "no subunit"; }
+ const char *name() const override { return m_setoffset.name(); }
+ const char *subunit_name(int entry) const override { return "no subunit"; }
// Call through only if the setoffset handler has been late-bound before
// (i.e. if it was declared in the address map)
@@ -468,7 +468,7 @@ private:
setoffset_delegate m_setoffset;
// We do not have subunits for setoffset
// Accordingly, we need not implement unused functions.
- void remove_subunit(int entry) { }
+ void remove_subunit(int entry) override { }
};
// ======================> handler_entry_proxy
@@ -479,19 +479,19 @@ template<typename _HandlerEntry>
class handler_entry_proxy
{
public:
- handler_entry_proxy(const std::list<_HandlerEntry *> &_handlers, UINT64 _mask) : handlers(_handlers), mask(_mask) {}
+ handler_entry_proxy(std::list<_HandlerEntry *> _handlers, UINT64 _mask) : handlers(std::move(_handlers)), mask(_mask) {}
handler_entry_proxy(const handler_entry_proxy<_HandlerEntry> &hep) : handlers(hep.handlers), mask(hep.mask) {}
// forward delegate callbacks configuration
template<typename _delegate> void set_delegate(_delegate delegate) const {
- for (typename std::list<_HandlerEntry *>::const_iterator i = handlers.begin(); i != handlers.end(); ++i)
- (*i)->set_delegate(delegate, mask);
+ for (const auto & elem : handlers)
+ (elem)->set_delegate(delegate, mask);
}
// forward I/O port access configuration
void set_ioport(ioport_port &ioport) const {
- for (typename std::list<_HandlerEntry *>::const_iterator i = handlers.begin(); i != handlers.end(); ++i)
- (*i)->set_ioport(ioport);
+ for (const auto & elem : handlers)
+ (elem)->set_ioport(ioport);
}
private:
@@ -653,7 +653,7 @@ public:
virtual ~address_table_read();
// getters
- virtual handler_entry &handler(UINT32 index) const;
+ virtual handler_entry &handler(UINT32 index) const override;
handler_entry_read &handler_read(UINT32 index) const { assert(index < ARRAY_LENGTH(m_handlers)); return *m_handlers[index]; }
// range getter
@@ -726,7 +726,7 @@ public:
virtual ~address_table_write();
// getters
- virtual handler_entry &handler(UINT32 index) const;
+ virtual handler_entry &handler(UINT32 index) const override;
handler_entry_write &handler_write(UINT32 index) const { assert(index < ARRAY_LENGTH(m_handlers)); return *m_handlers[index]; }
// range getter
@@ -792,8 +792,8 @@ public:
: address_table(space, large)
{
// allocate handlers for each entry, prepopulating the bankptrs for banks
- for (int entrynum = 0; entrynum < ARRAY_LENGTH(m_handlers); entrynum++)
- m_handlers[entrynum] = std::make_unique<handler_entry_setoffset>();
+ for (auto & elem : m_handlers)
+ elem = std::make_unique<handler_entry_setoffset>();
// Watchpoints and unmap states do not make sense for setoffset
m_handlers[STATIC_NOP]->set_delegate(setoffset_delegate(FUNC(address_table_setoffset::nop_so), this));
@@ -804,7 +804,7 @@ public:
{
}
- handler_entry &handler(UINT32 index) const { assert(index < ARRAY_LENGTH(m_handlers)); return *m_handlers[index]; }
+ handler_entry &handler(UINT32 index) const override { assert(index < ARRAY_LENGTH(m_handlers)); return *m_handlers[index]; }
handler_entry_setoffset &handler_setoffset(UINT32 index) const { assert(index < ARRAY_LENGTH(m_handlers)); return *m_handlers[index]; }
// range getter
@@ -997,16 +997,16 @@ public:
}
// accessors
- virtual address_table_read &read() { return m_read; }
- virtual address_table_write &write() { return m_write; }
- virtual address_table_setoffset &setoffset() { return m_setoffset; }
+ virtual address_table_read &read() override { return m_read; }
+ virtual address_table_write &write() override { return m_write; }
+ virtual address_table_setoffset &setoffset() override { return m_setoffset; }
// watchpoint control
- virtual void enable_read_watchpoints(bool enable = true) { m_read.enable_watchpoints(enable); }
- virtual void enable_write_watchpoints(bool enable = true) { m_write.enable_watchpoints(enable); }
+ virtual void enable_read_watchpoints(bool enable = true) override { m_read.enable_watchpoints(enable); }
+ virtual void enable_write_watchpoints(bool enable = true) override { m_write.enable_watchpoints(enable); }
// generate accessor table
- virtual void accessors(data_accessors &accessors) const
+ virtual void accessors(data_accessors &accessors) const override
{
accessors.read_byte = reinterpret_cast<UINT8 (*)(address_space &, offs_t)>(&read_byte_static);
accessors.read_word = reinterpret_cast<UINT16 (*)(address_space &, offs_t)>(&read_word_static);
@@ -1025,7 +1025,7 @@ public:
}
// return a pointer to the read bank, or NULL if none
- virtual void *get_read_ptr(offs_t byteaddress)
+ virtual void *get_read_ptr(offs_t byteaddress) override
{
// perform the lookup
byteaddress &= m_bytemask;
@@ -1034,12 +1034,12 @@ public:
// 8-bit case: RAM/ROM
if (entry > STATIC_BANKMAX)
- return NULL;
+ return nullptr;
return handler.ramptr(handler.byteoffset(byteaddress));
}
// return a pointer to the write bank, or NULL if none
- virtual void *get_write_ptr(offs_t byteaddress)
+ virtual void *get_write_ptr(offs_t byteaddress) override
{
// perform the lookup
byteaddress &= m_bytemask;
@@ -1048,7 +1048,7 @@ public:
// 8-bit case: RAM/ROM
if (entry > STATIC_BANKMAX)
- return NULL;
+ return nullptr;
return handler.ramptr(handler.byteoffset(byteaddress));
}
@@ -1400,7 +1400,7 @@ public:
// Allows to announce a pending read or write operation on this address.
// The user of the address_space calls a set_address operation which leads
// to some particular set_offset operation for an entry in the address map.
- void set_address(offs_t address)
+ void set_address(offs_t address) override
{
offs_t byteaddress = address & m_bytemask;
UINT32 entry = setoffset_lookup(byteaddress);
@@ -1411,33 +1411,33 @@ public:
}
// virtual access to these functions
- UINT8 read_byte(offs_t address) { return (NATIVE_BITS == 8) ? read_native(address & ~NATIVE_MASK) : read_direct<UINT8, true>(address, 0xff); }
- UINT16 read_word(offs_t address) { return (NATIVE_BITS == 16) ? read_native(address & ~NATIVE_MASK) : read_direct<UINT16, true>(address, 0xffff); }
- UINT16 read_word(offs_t address, UINT16 mask) { return read_direct<UINT16, true>(address, mask); }
- UINT16 read_word_unaligned(offs_t address) { return read_direct<UINT16, false>(address, 0xffff); }
- UINT16 read_word_unaligned(offs_t address, UINT16 mask) { return read_direct<UINT16, false>(address, mask); }
- UINT32 read_dword(offs_t address) { return (NATIVE_BITS == 32) ? read_native(address & ~NATIVE_MASK) : read_direct<UINT32, true>(address, 0xffffffff); }
- UINT32 read_dword(offs_t address, UINT32 mask) { return read_direct<UINT32, true>(address, mask); }
- UINT32 read_dword_unaligned(offs_t address) { return read_direct<UINT32, false>(address, 0xffffffff); }
- UINT32 read_dword_unaligned(offs_t address, UINT32 mask) { return read_direct<UINT32, false>(address, mask); }
- UINT64 read_qword(offs_t address) { return (NATIVE_BITS == 64) ? read_native(address & ~NATIVE_MASK) : read_direct<UINT64, true>(address, U64(0xffffffffffffffff)); }
- UINT64 read_qword(offs_t address, UINT64 mask) { return read_direct<UINT64, true>(address, mask); }
- UINT64 read_qword_unaligned(offs_t address) { return read_direct<UINT64, false>(address, U64(0xffffffffffffffff)); }
- UINT64 read_qword_unaligned(offs_t address, UINT64 mask) { return read_direct<UINT64, false>(address, mask); }
-
- void write_byte(offs_t address, UINT8 data) { if (NATIVE_BITS == 8) write_native(address & ~NATIVE_MASK, data); else write_direct<UINT8, true>(address, data, 0xff); }
- void write_word(offs_t address, UINT16 data) { if (NATIVE_BITS == 16) write_native(address & ~NATIVE_MASK, data); else write_direct<UINT16, true>(address, data, 0xffff); }
- void write_word(offs_t address, UINT16 data, UINT16 mask) { write_direct<UINT16, true>(address, data, mask); }
- void write_word_unaligned(offs_t address, UINT16 data) { write_direct<UINT16, false>(address, data, 0xffff); }
- void write_word_unaligned(offs_t address, UINT16 data, UINT16 mask) { write_direct<UINT16, false>(address, data, mask); }
- void write_dword(offs_t address, UINT32 data) { if (NATIVE_BITS == 32) write_native(address & ~NATIVE_MASK, data); else write_direct<UINT32, true>(address, data, 0xffffffff); }
- void write_dword(offs_t address, UINT32 data, UINT32 mask) { write_direct<UINT32, true>(address, data, mask); }
- void write_dword_unaligned(offs_t address, UINT32 data) { write_direct<UINT32, false>(address, data, 0xffffffff); }
- void write_dword_unaligned(offs_t address, UINT32 data, UINT32 mask) { write_direct<UINT32, false>(address, data, mask); }
- void write_qword(offs_t address, UINT64 data) { if (NATIVE_BITS == 64) write_native(address & ~NATIVE_MASK, data); else write_direct<UINT64, true>(address, data, U64(0xffffffffffffffff)); }
- void write_qword(offs_t address, UINT64 data, UINT64 mask) { write_direct<UINT64, true>(address, data, mask); }
- void write_qword_unaligned(offs_t address, UINT64 data) { write_direct<UINT64, false>(address, data, U64(0xffffffffffffffff)); }
- void write_qword_unaligned(offs_t address, UINT64 data, UINT64 mask) { write_direct<UINT64, false>(address, data, mask); }
+ UINT8 read_byte(offs_t address) override { return (NATIVE_BITS == 8) ? read_native(address & ~NATIVE_MASK) : read_direct<UINT8, true>(address, 0xff); }
+ UINT16 read_word(offs_t address) override { return (NATIVE_BITS == 16) ? read_native(address & ~NATIVE_MASK) : read_direct<UINT16, true>(address, 0xffff); }
+ UINT16 read_word(offs_t address, UINT16 mask) override { return read_direct<UINT16, true>(address, mask); }
+ UINT16 read_word_unaligned(offs_t address) override { return read_direct<UINT16, false>(address, 0xffff); }
+ UINT16 read_word_unaligned(offs_t address, UINT16 mask) override { return read_direct<UINT16, false>(address, mask); }
+ UINT32 read_dword(offs_t address) override { return (NATIVE_BITS == 32) ? read_native(address & ~NATIVE_MASK) : read_direct<UINT32, true>(address, 0xffffffff); }
+ UINT32 read_dword(offs_t address, UINT32 mask) override { return read_direct<UINT32, true>(address, mask); }
+ UINT32 read_dword_unaligned(offs_t address) override { return read_direct<UINT32, false>(address, 0xffffffff); }
+ UINT32 read_dword_unaligned(offs_t address, UINT32 mask) override { return read_direct<UINT32, false>(address, mask); }
+ UINT64 read_qword(offs_t address) override { return (NATIVE_BITS == 64) ? read_native(address & ~NATIVE_MASK) : read_direct<UINT64, true>(address, U64(0xffffffffffffffff)); }
+ UINT64 read_qword(offs_t address, UINT64 mask) override { return read_direct<UINT64, true>(address, mask); }
+ UINT64 read_qword_unaligned(offs_t address) override { return read_direct<UINT64, false>(address, U64(0xffffffffffffffff)); }
+ UINT64 read_qword_unaligned(offs_t address, UINT64 mask) override { return read_direct<UINT64, false>(address, mask); }
+
+ void write_byte(offs_t address, UINT8 data) override { if (NATIVE_BITS == 8) write_native(address & ~NATIVE_MASK, data); else write_direct<UINT8, true>(address, data, 0xff); }
+ void write_word(offs_t address, UINT16 data) override { if (NATIVE_BITS == 16) write_native(address & ~NATIVE_MASK, data); else write_direct<UINT16, true>(address, data, 0xffff); }
+ void write_word(offs_t address, UINT16 data, UINT16 mask) override { write_direct<UINT16, true>(address, data, mask); }
+ void write_word_unaligned(offs_t address, UINT16 data) override { write_direct<UINT16, false>(address, data, 0xffff); }
+ void write_word_unaligned(offs_t address, UINT16 data, UINT16 mask) override { write_direct<UINT16, false>(address, data, mask); }
+ void write_dword(offs_t address, UINT32 data) override { if (NATIVE_BITS == 32) write_native(address & ~NATIVE_MASK, data); else write_direct<UINT32, true>(address, data, 0xffffffff); }
+ void write_dword(offs_t address, UINT32 data, UINT32 mask) override { write_direct<UINT32, true>(address, data, mask); }
+ void write_dword_unaligned(offs_t address, UINT32 data) override { write_direct<UINT32, false>(address, data, 0xffffffff); }
+ void write_dword_unaligned(offs_t address, UINT32 data, UINT32 mask) override { write_direct<UINT32, false>(address, data, mask); }
+ void write_qword(offs_t address, UINT64 data) override { if (NATIVE_BITS == 64) write_native(address & ~NATIVE_MASK, data); else write_direct<UINT64, true>(address, data, U64(0xffffffffffffffff)); }
+ void write_qword(offs_t address, UINT64 data, UINT64 mask) override { write_direct<UINT64, true>(address, data, mask); }
+ void write_qword_unaligned(offs_t address, UINT64 data) override { write_direct<UINT64, false>(address, data, U64(0xffffffffffffffff)); }
+ void write_qword_unaligned(offs_t address, UINT64 data, UINT64 mask) override { write_direct<UINT64, false>(address, data, mask); }
// static access to these functions
static UINT8 read_byte_static(this_type &space, offs_t address) { return (NATIVE_BITS == 8) ? space.read_native(address & ~NATIVE_MASK) : space.read_direct<UINT8, true>(address, 0xff); }
@@ -1523,33 +1523,33 @@ void memory_manager::initialize()
{
// loop over devices and spaces within each device
memory_interface_iterator iter(machine().root_device());
- for (device_memory_interface *memory = iter.first(); memory != NULL; memory = iter.next())
+ for (device_memory_interface *memory = iter.first(); memory != nullptr; memory = iter.next())
for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
{
// if there is a configuration for this space, we need an address space
const address_space_config *spaceconfig = memory->space_config(spacenum);
- if (spaceconfig != NULL)
+ if (spaceconfig != nullptr)
m_spacelist.append(address_space::allocate(*this, *spaceconfig, *memory, spacenum));
}
// construct and preprocess the address_map for each space
- for (address_space *space = m_spacelist.first(); space != NULL; space = space->next())
+ for (address_space *space = m_spacelist.first(); space != nullptr; space = space->next())
space->prepare_map();
// create the handlers from the resulting address maps
- for (address_space *space = m_spacelist.first(); space != NULL; space = space->next())
+ for (address_space *space = m_spacelist.first(); space != nullptr; space = space->next())
space->populate_from_map();
// allocate memory needed to back each address space
- for (address_space *space = m_spacelist.first(); space != NULL; space = space->next())
+ for (address_space *space = m_spacelist.first(); space != nullptr; space = space->next())
space->allocate_memory();
// find all the allocated pointers
- for (address_space *space = m_spacelist.first(); space != NULL; space = space->next())
+ for (address_space *space = m_spacelist.first(); space != nullptr; space = space->next())
space->locate_memory();
// disable logging of unmapped access when no one receives it
- for (address_space *space = m_spacelist.first(); space != NULL; space = space->next())
+ for (address_space *space = m_spacelist.first(); space != nullptr; space = space->next())
{
if (!machine().options().log() && !machine().options().oslog() && !(machine().debug_flags & DEBUG_FLAG_ENABLED))
space->set_log_unmap(false);
@@ -1574,11 +1574,11 @@ void memory_manager::initialize()
void memory_manager::dump(FILE *file)
{
// skip if we can't open the file
- if (file == NULL)
+ if (file == nullptr)
return;
// loop over address spaces
- for (address_space *space = m_spacelist.first(); space != NULL; space = space->next())
+ for (address_space *space = m_spacelist.first(); space != nullptr; space = space->next())
{
fprintf(file, "\n\n"
"====================================================\n"
@@ -1604,7 +1604,7 @@ memory_region *memory_manager::region_alloc(const char *name, UINT32 length, UIN
osd_printf_verbose("Region '%s' created\n", name);
// make sure we don't have a region of the same name; also find the end of the list
memory_region *info = m_regionlist.find(name);
- if (info != NULL)
+ if (info != nullptr)
fatalerror("region_alloc called with duplicate region name \"%s\"\n", name);
// allocate the region
@@ -1647,7 +1647,7 @@ static void generate_memdump(running_machine &machine)
void memory_manager::bank_reattach()
{
// for each non-anonymous bank, explicitly reset its entry
- for (memory_bank *bank = m_banklist.first(); bank != NULL; bank = bank->next())
+ for (memory_bank *bank = m_banklist.first(); bank != nullptr; bank = bank->next())
if (!bank->anonymous() && bank->entry() != BANK_ENTRY_UNSPECIFIED)
bank->set_entry(bank->entry());
}
@@ -1663,7 +1663,7 @@ void memory_manager::bank_reattach()
//-------------------------------------------------
address_space::address_space(memory_manager &manager, device_memory_interface &memory, address_spacenum spacenum, bool large)
- : m_next(NULL),
+ : m_next(nullptr),
m_config(*memory.space_config(spacenum)),
m_device(memory.device()),
m_addrmask(0xffffffffUL >> (32 - m_config.m_addrbus_width)),
@@ -1805,8 +1805,8 @@ inline void address_space::adjust_addresses(offs_t &start, offs_t &end, offs_t &
void address_space::prepare_map()
{
- memory_region *devregion = (m_spacenum == AS_0) ? machine().root_device().memregion(m_device.tag()) : NULL;
- UINT32 devregionsize = (devregion != NULL) ? devregion->bytes() : 0;
+ memory_region *devregion = (m_spacenum == AS_0) ? machine().root_device().memregion(m_device.tag()) : nullptr;
+ UINT32 devregionsize = (devregion != nullptr) ? devregion->bytes() : 0;
// allocate the address map
m_map = std::make_unique<address_map>(m_device, m_spacenum);
@@ -1823,7 +1823,7 @@ void address_space::prepare_map()
}
// make a pass over the address map, adjusting for the device and getting memory pointers
- for (address_map_entry *entry = m_map->m_entrylist.first(); entry != NULL; entry = entry->next())
+ for (address_map_entry *entry = m_map->m_entrylist.first(); entry != nullptr; entry = entry->next())
{
// computed adjusted addresses first
entry->m_bytestart = entry->m_addrstart;
@@ -1833,20 +1833,20 @@ void address_space::prepare_map()
adjust_addresses(entry->m_bytestart, entry->m_byteend, entry->m_bytemask, entry->m_bytemirror);
// if we have a share entry, add it to our map
- if (entry->m_share != NULL)
+ if (entry->m_share != nullptr)
{
// if we can't find it, add it to our map
std::string fulltag = entry->m_devbase.subtag(entry->m_share);
- if (manager().m_sharelist.find(fulltag.c_str()) == NULL)
+ if (manager().m_sharelist.find(fulltag.c_str()) == nullptr)
{
VPRINTF(("Creating share '%s' of length 0x%X\n", fulltag.c_str(), entry->m_byteend + 1 - entry->m_bytestart));
- memory_share *share = global_alloc(memory_share(m_map->m_databits, entry->m_byteend + 1 - entry->m_bytestart, endianness()));
+ auto share = global_alloc(memory_share(m_map->m_databits, entry->m_byteend + 1 - entry->m_bytestart, endianness()));
manager().m_sharelist.append(fulltag.c_str(), *share);
}
}
// if this is a ROM handler without a specified region, attach it to the implicit region
- if (m_spacenum == AS_0 && entry->m_read.m_type == AMH_ROM && entry->m_region == NULL)
+ if (m_spacenum == AS_0 && entry->m_read.m_type == AMH_ROM && entry->m_region == nullptr)
{
// make sure it fits within the memory region before doing so, however
if (entry->m_byteend < devregionsize)
@@ -1857,14 +1857,14 @@ void address_space::prepare_map()
}
// validate adjusted addresses against implicit regions
- if (entry->m_region != NULL && entry->m_share == NULL)
+ if (entry->m_region != nullptr && entry->m_share == nullptr)
{
// determine full tag
std::string fulltag = entry->m_devbase.subtag(entry->m_region);
// find the region
memory_region *region = machine().root_device().memregion(fulltag.c_str());
- if (region == NULL)
+ if (region == nullptr)
fatalerror("Error: device '%s' %s space memory map entry %X-%X references non-existant region \"%s\"\n", m_device.tag(), m_name, entry->m_addrstart, entry->m_addrend, entry->m_region);
// validate the region
@@ -1873,7 +1873,7 @@ void address_space::prepare_map()
}
// convert any region-relative entries to their memory pointers
- if (entry->m_region != NULL)
+ if (entry->m_region != nullptr)
{
// determine full tag
std::string fulltag = entry->m_devbase.subtag(entry->m_region);
@@ -1898,15 +1898,15 @@ void address_space::prepare_map()
void address_space::populate_from_map(address_map *map)
{
// no map specified, use the space-specific one
- if (map == NULL)
+ if (map == nullptr)
map = m_map.get();
// no map, nothing to do
- if (map == NULL)
+ if (map == nullptr)
return;
// install the handlers, using the original, unadjusted memory map
- const address_map_entry *last_entry = NULL;
+ const address_map_entry *last_entry = nullptr;
while (last_entry != map->m_entrylist.first())
{
// find the entry before the last one we processed
@@ -1944,7 +1944,7 @@ void address_space::populate_map_entry(const address_map_entry &entry, read_or_w
// fall through to the RAM case otherwise
case AMH_RAM:
- install_ram_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, readorwrite, NULL);
+ install_ram_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror, readorwrite, nullptr);
break;
case AMH_NOP:
@@ -1976,14 +1976,14 @@ void address_space::populate_map_entry(const address_map_entry &entry, read_or_w
case AMH_PORT:
install_readwrite_port(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror,
- (readorwrite == ROW_READ) ? data.m_tag : NULL,
- (readorwrite == ROW_WRITE) ? data.m_tag : NULL);
+ (readorwrite == ROW_READ) ? data.m_tag : nullptr,
+ (readorwrite == ROW_WRITE) ? data.m_tag : nullptr);
break;
case AMH_BANK:
install_bank_generic(entry.m_addrstart, entry.m_addrend, entry.m_addrmask, entry.m_addrmirror,
- (readorwrite == ROW_READ) ? data.m_tag : NULL,
- (readorwrite == ROW_WRITE) ? data.m_tag : NULL);
+ (readorwrite == ROW_READ) ? data.m_tag : nullptr,
+ (readorwrite == ROW_WRITE) ? data.m_tag : nullptr);
break;
case AMH_DEVICE_SUBMAP:
@@ -2014,22 +2014,22 @@ void address_space::allocate_memory()
// make a first pass over the memory map and track blocks with hardcoded pointers
// we do this to make sure they are found by space_find_backing_memory first
memory_block *prev_memblock_tail = blocklist.last();
- for (address_map_entry *entry = m_map->m_entrylist.first(); entry != NULL; entry = entry->next())
- if (entry->m_memory != NULL)
+ for (address_map_entry *entry = m_map->m_entrylist.first(); entry != nullptr; entry = entry->next())
+ if (entry->m_memory != nullptr)
blocklist.append(*global_alloc(memory_block(*this, entry->m_bytestart, entry->m_byteend, entry->m_memory)));
// loop over all blocks just allocated and assign pointers from them
- address_map_entry *unassigned = NULL;
- memory_block *first_new_block = (prev_memblock_tail != NULL) ? prev_memblock_tail->next() : blocklist.first();
- for (memory_block *memblock = first_new_block; memblock != NULL; memblock = memblock->next())
+ address_map_entry *unassigned = nullptr;
+ memory_block *first_new_block = (prev_memblock_tail != nullptr) ? prev_memblock_tail->next() : blocklist.first();
+ for (memory_block *memblock = first_new_block; memblock != nullptr; memblock = memblock->next())
unassigned = block_assign_intersecting(memblock->bytestart(), memblock->byteend(), memblock->data());
// if we don't have an unassigned pointer yet, try to find one
- if (unassigned == NULL)
- unassigned = block_assign_intersecting(~0, 0, NULL);
+ if (unassigned == nullptr)
+ unassigned = block_assign_intersecting(~0, 0, nullptr);
// loop until we've assigned all memory in this space
- while (unassigned != NULL)
+ while (unassigned != nullptr)
{
// work in MEMORY_BLOCK_CHUNK-sized chunks
offs_t curblockstart = unassigned->m_bytestart / MEMORY_BLOCK_CHUNK;
@@ -2042,8 +2042,8 @@ void address_space::allocate_memory()
changed = false;
// scan for unmapped blocks in the adjusted map
- for (address_map_entry *entry = m_map->m_entrylist.first(); entry != NULL; entry = entry->next())
- if (entry->m_memory == NULL && entry != unassigned && needs_backing_store(entry))
+ for (address_map_entry *entry = m_map->m_entrylist.first(); entry != nullptr; entry = entry->next())
+ if (entry->m_memory == nullptr && entry != unassigned && needs_backing_store(entry))
{
// get block start/end blocks for this block
offs_t blockstart = entry->m_bytestart / MEMORY_BLOCK_CHUNK;
@@ -2079,12 +2079,12 @@ void address_space::allocate_memory()
void address_space::locate_memory()
{
// once this is done, find the starting bases for the banks
- for (memory_bank *bank = manager().m_banklist.first(); bank != NULL; bank = bank->next())
- if (bank->base() == NULL && bank->references_space(*this, ROW_READWRITE))
+ for (memory_bank *bank = manager().m_banklist.first(); bank != nullptr; bank = bank->next())
+ if (bank->base() == nullptr && bank->references_space(*this, ROW_READWRITE))
{
// set the initial bank pointer
- for (address_map_entry *entry = m_map->m_entrylist.first(); entry != NULL; entry = entry->next())
- if (entry->m_bytestart == bank->bytestart() && entry->m_memory != NULL)
+ for (address_map_entry *entry = m_map->m_entrylist.first(); entry != nullptr; entry = entry->next())
+ if (entry->m_bytestart == bank->bytestart() && entry->m_memory != nullptr)
{
bank->set_base(entry->m_memory);
VPRINTF(("assigned bank '%s' pointer to memory from range %08X-%08X [%p]\n", bank->tag(), entry->m_addrstart, entry->m_addrend, entry->m_memory));
@@ -2107,17 +2107,17 @@ void address_space::locate_memory()
address_map_entry *address_space::block_assign_intersecting(offs_t bytestart, offs_t byteend, UINT8 *base)
{
- address_map_entry *unassigned = NULL;
+ address_map_entry *unassigned = nullptr;
// loop over the adjusted map and assign memory to any blocks we can
- for (address_map_entry *entry = m_map->m_entrylist.first(); entry != NULL; entry = entry->next())
+ for (address_map_entry *entry = m_map->m_entrylist.first(); entry != nullptr; entry = entry->next())
{
// if we haven't assigned this block yet, see if we have a mapped shared pointer for it
- if (entry->m_memory == NULL && entry->m_share != NULL)
+ if (entry->m_memory == nullptr && entry->m_share != nullptr)
{
std::string fulltag = entry->m_devbase.subtag(entry->m_share);
memory_share *share = manager().m_sharelist.find(fulltag.c_str());
- if (share != NULL && share->ptr() != NULL)
+ if (share != nullptr && share->ptr() != nullptr)
{
entry->m_memory = share->ptr();
VPRINTF(("memory range %08X-%08X -> shared_ptr '%s' [%p]\n", entry->m_addrstart, entry->m_addrend, entry->m_share, entry->m_memory));
@@ -2129,18 +2129,18 @@ address_map_entry *address_space::block_assign_intersecting(offs_t bytestart, of
}
// otherwise, look for a match in this block
- if (entry->m_memory == NULL && entry->m_bytestart >= bytestart && entry->m_byteend <= byteend)
+ if (entry->m_memory == nullptr && entry->m_bytestart >= bytestart && entry->m_byteend <= byteend)
{
entry->m_memory = base + (entry->m_bytestart - bytestart);
VPRINTF(("memory range %08X-%08X -> found in block from %08X-%08X [%p]\n", entry->m_addrstart, entry->m_addrend, bytestart, byteend, entry->m_memory));
}
// if we're the first match on a shared pointer, assign it now
- if (entry->m_memory != NULL && entry->m_share != NULL)
+ if (entry->m_memory != nullptr && entry->m_share != nullptr)
{
std::string fulltag = entry->m_devbase.subtag(entry->m_share);
memory_share *share = manager().m_sharelist.find(fulltag.c_str());
- if (share != NULL && share->ptr() == NULL)
+ if (share != nullptr && share->ptr() == nullptr)
{
share->set_ptr(entry->m_memory);
VPRINTF(("setting shared_ptr '%s' = %p\n", entry->m_share, entry->m_memory));
@@ -2148,7 +2148,7 @@ address_map_entry *address_space::block_assign_intersecting(offs_t bytestart, of
}
// keep track of the first unassigned entry
- if (entry->m_memory == NULL && unassigned == NULL && needs_backing_store(entry))
+ if (entry->m_memory == nullptr && unassigned == nullptr && needs_backing_store(entry))
unassigned = entry;
}
@@ -2248,25 +2248,25 @@ void address_space::install_readwrite_port(offs_t addrstart, offs_t addrend, off
VPRINTF(("address_space::install_readwrite_port(%s-%s mask=%s mirror=%s, read=\"%s\" / write=\"%s\")\n",
core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars),
core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars),
- (rtag != NULL) ? rtag : "(none)", (wtag != NULL) ? wtag : "(none)"));
+ (rtag != nullptr) ? rtag : "(none)", (wtag != nullptr) ? wtag : "(none)"));
// read handler
- if (rtag != NULL)
+ if (rtag != nullptr)
{
// find the port
ioport_port *port = machine().root_device().ioport(device().siblingtag(rtag).c_str());
- if (port == NULL)
+ if (port == nullptr)
throw emu_fatalerror("Attempted to map non-existent port '%s' for read in space %s of device '%s'\n", rtag, m_name, m_device.tag());
// map the range and set the ioport
read().handler_map_range(addrstart, addrend, addrmask, addrmirror).set_ioport(*port);
}
- if (wtag != NULL)
+ if (wtag != nullptr)
{
// find the port
ioport_port *port = machine().root_device().ioport(device().siblingtag(wtag).c_str());
- if (port == NULL)
+ if (port == nullptr)
fatalerror("Attempted to map non-existent port '%s' for write in space %s of device '%s'\n", wtag, m_name, m_device.tag());
// map the range and set the ioport
@@ -2288,10 +2288,10 @@ void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_
VPRINTF(("address_space::install_readwrite_bank(%s-%s mask=%s mirror=%s, read=\"%s\" / write=\"%s\")\n",
core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars),
core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars),
- (rtag != NULL) ? rtag : "(none)", (wtag != NULL) ? wtag : "(none)"));
+ (rtag != nullptr) ? rtag : "(none)", (wtag != nullptr) ? wtag : "(none)"));
// map the read bank
- if (rtag != NULL)
+ if (rtag != nullptr)
{
std::string fulltag = device().siblingtag(rtag);
memory_bank &bank = bank_find_or_allocate(fulltag.c_str(), addrstart, addrend, addrmask, addrmirror, ROW_READ);
@@ -2299,7 +2299,7 @@ void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_
}
// map the write bank
- if (wtag != NULL)
+ if (wtag != nullptr)
{
std::string fulltag = device().siblingtag(wtag);
memory_bank &bank = bank_find_or_allocate(fulltag.c_str(), addrstart, addrend, addrmask, addrmirror, ROW_WRITE);
@@ -2316,16 +2316,16 @@ void address_space::install_bank_generic(offs_t addrstart, offs_t addrend, offs_
VPRINTF(("address_space::install_readwrite_bank(%s-%s mask=%s mirror=%s, read=\"%s\" / write=\"%s\")\n",
core_i64_hex_format(addrstart, m_addrchars), core_i64_hex_format(addrend, m_addrchars),
core_i64_hex_format(addrmask, m_addrchars), core_i64_hex_format(addrmirror, m_addrchars),
- (rbank != NULL) ? rbank->tag() : "(none)", (wbank != NULL) ? wbank->tag() : "(none)"));
+ (rbank != nullptr) ? rbank->tag() : "(none)", (wbank != nullptr) ? wbank->tag() : "(none)"));
// map the read bank
- if (rbank != NULL)
+ if (rbank != nullptr)
{
read().map_range(addrstart, addrend, addrmask, addrmirror, rbank->index());
}
// map the write bank
- if (wbank != NULL)
+ if (wbank != nullptr)
{
write().map_range(addrstart, addrend, addrmask, addrmirror, wbank->index());
}
@@ -2352,23 +2352,23 @@ void *address_space::install_ram_generic(offs_t addrstart, offs_t addrend, offs_
if (readorwrite == ROW_READ || readorwrite == ROW_READWRITE)
{
// find a bank and map it
- memory_bank &bank = bank_find_or_allocate(NULL, addrstart, addrend, addrmask, addrmirror, ROW_READ);
+ memory_bank &bank = bank_find_or_allocate(nullptr, addrstart, addrend, addrmask, addrmirror, ROW_READ);
read().map_range(addrstart, addrend, addrmask, addrmirror, bank.index());
// if we are provided a pointer, set it
- if (baseptr != NULL)
+ if (baseptr != nullptr)
bank.set_base(baseptr);
// if we don't have a bank pointer yet, try to find one
- if (bank.base() == NULL)
+ if (bank.base() == nullptr)
{
void *backing = find_backing_memory(addrstart, addrend);
- if (backing != NULL)
+ if (backing != nullptr)
bank.set_base(backing);
}
// if we still don't have a pointer, and we're past the initialization phase, allocate a new block
- if (bank.base() == NULL && manager().m_initialized)
+ if (bank.base() == nullptr && manager().m_initialized)
{
if (machine().phase() >= MACHINE_PHASE_RESET)
fatalerror("Attempted to call install_ram_generic() after initialization time without a baseptr!\n");
@@ -2381,23 +2381,23 @@ void *address_space::install_ram_generic(offs_t addrstart, offs_t addrend, offs_
if (readorwrite == ROW_WRITE || readorwrite == ROW_READWRITE)
{
// find a bank and map it
- memory_bank &bank = bank_find_or_allocate(NULL, addrstart, addrend, addrmask, addrmirror, ROW_WRITE);
+ memory_bank &bank = bank_find_or_allocate(nullptr, addrstart, addrend, addrmask, addrmirror, ROW_WRITE);
write().map_range(addrstart, addrend, addrmask, addrmirror, bank.index());
// if we are provided a pointer, set it
- if (baseptr != NULL)
+ if (baseptr != nullptr)
bank.set_base(baseptr);
// if we don't have a bank pointer yet, try to find one
- if (bank.base() == NULL)
+ if (bank.base() == nullptr)
{
void *backing = find_backing_memory(addrstart, addrend);
- if (backing != NULL)
+ if (backing != nullptr)
bank.set_base(backing);
}
// if we still don't have a pointer, and we're past the initialization phase, allocate a new block
- if (bank.base() == NULL && manager().m_initialized)
+ if (bank.base() == nullptr && manager().m_initialized)
{
if (machine().phase() >= MACHINE_PHASE_RESET)
fatalerror("Attempted to call install_ram_generic() after initialization time without a baseptr!\n");
@@ -2555,15 +2555,15 @@ void *address_space::find_backing_memory(offs_t addrstart, offs_t addrend)
VPRINTF(("address_space::find_backing_memory('%s',%s,%08X-%08X) -> ", m_device.tag(), m_name, bytestart, byteend));
- if (m_map == NULL)
- return NULL;
+ if (m_map == nullptr)
+ return nullptr;
// look in the address map first
- for (address_map_entry *entry = m_map->m_entrylist.first(); entry != NULL; entry = entry->next())
+ for (address_map_entry *entry = m_map->m_entrylist.first(); entry != nullptr; entry = entry->next())
{
offs_t maskstart = bytestart & entry->m_bytemask;
offs_t maskend = byteend & entry->m_bytemask;
- if (entry->m_memory != NULL && maskstart >= entry->m_bytestart && maskend <= entry->m_byteend)
+ if (entry->m_memory != nullptr && maskstart >= entry->m_bytestart && maskend <= entry->m_byteend)
{
VPRINTF(("found in entry %08X-%08X [%p]\n", entry->m_addrstart, entry->m_addrend, (UINT8 *)entry->m_memory + (maskstart - entry->m_bytestart)));
return (UINT8 *)entry->m_memory + (maskstart - entry->m_bytestart);
@@ -2571,7 +2571,7 @@ void *address_space::find_backing_memory(offs_t addrstart, offs_t addrend)
}
// if not found there, look in the allocated blocks
- for (memory_block *block = manager().m_blocklist.first(); block != NULL; block = block->next())
+ for (memory_block *block = manager().m_blocklist.first(); block != nullptr; block = block->next())
if (block->contains(*this, bytestart, byteend))
{
VPRINTF(("found in allocated memory block %08X-%08X [%p]\n", block->bytestart(), block->byteend(), block->data() + (bytestart - block->bytestart())));
@@ -2579,7 +2579,7 @@ void *address_space::find_backing_memory(offs_t addrstart, offs_t addrend)
}
VPRINTF(("did not find\n"));
- return NULL;
+ return nullptr;
}
@@ -2592,11 +2592,11 @@ void *address_space::find_backing_memory(offs_t addrstart, offs_t addrend)
bool address_space::needs_backing_store(const address_map_entry *entry)
{
// if we are sharing, and we don't have a pointer yet, create one
- if (entry->m_share != NULL)
+ if (entry->m_share != nullptr)
{
std::string fulltag = entry->m_devbase.subtag(entry->m_share);
memory_share *share = manager().m_sharelist.find(fulltag.c_str());
- if (share != NULL && share->ptr() == NULL)
+ if (share != nullptr && share->ptr() == nullptr)
return true;
}
@@ -2607,7 +2607,7 @@ bool address_space::needs_backing_store(const address_map_entry *entry)
// if we're reading from RAM or from ROM outside of address space 0 or its region, then yes, we do need backing
memory_region *region = machine().root_device().memregion(m_device.tag());
if (entry->m_read.m_type == AMH_RAM ||
- (entry->m_read.m_type == AMH_ROM && (m_spacenum != AS_0 || region == NULL || entry->m_addrstart >= region->bytes())))
+ (entry->m_read.m_type == AMH_ROM && (m_spacenum != AS_0 || region == nullptr || entry->m_addrstart >= region->bytes())))
return true;
// all other cases don't need backing
@@ -2636,24 +2636,24 @@ memory_bank &address_space::bank_find_or_allocate(const char *tag, offs_t addrst
adjust_addresses(bytestart, byteend, bytemask, bytemirror);
// if this bank is named, look it up
- memory_bank *membank = NULL;
- if (tag != NULL)
+ memory_bank *membank = nullptr;
+ if (tag != nullptr)
membank = manager().bank(tag);
// else try to find an exact match
else
- for (membank = manager().m_banklist.first(); membank != NULL; membank = membank->next())
+ for (membank = manager().m_banklist.first(); membank != nullptr; membank = membank->next())
if (membank->anonymous() && membank->references_space(*this, ROW_READWRITE) && membank->matches_exactly(bytestart, byteend))
break;
// if we don't have a bank yet, find a free one
- if (membank == NULL)
+ if (membank == nullptr)
{
// handle failure
int banknum = manager().m_banknext++;
if (banknum > STATIC_BANKMAX)
{
- if (tag != NULL)
+ if (tag != nullptr)
throw emu_fatalerror("Unable to allocate new bank '%s'", tag);
else
throw emu_fatalerror("Unable to allocate bank for RAM/ROM area %X-%X\n", bytestart, byteend);
@@ -2662,7 +2662,7 @@ memory_bank &address_space::bank_find_or_allocate(const char *tag, offs_t addrst
// if no tag, create a unique one
membank = global_alloc(memory_bank(*this, banknum, bytestart, byteend, tag));
std::string temptag;
- if (tag == NULL) {
+ if (tag == nullptr) {
strprintf(temptag, "anon_%p", (void *) membank);
tag = temptag.c_str();
}
@@ -2912,8 +2912,8 @@ void address_table::setup_range_masked(offs_t addrstart, offs_t addrend, offs_t
curentry.configure(bytestart, byteend, bytemask);
// Populate it wherever needed
- for (std::list<subrange>::const_iterator j = i->second.begin(); j != i->second.end(); ++j)
- populate_range(j->start, j->end, entry);
+ for (const auto & elem : i->second)
+ populate_range(elem.start, elem.end, entry);
// Add it in the "to be setup" list
entries.push_back(entry);
@@ -3477,7 +3477,7 @@ const char *address_table::handler_name(UINT16 entry) const
{
// banks have names
if (entry >= STATIC_BANK1 && entry <= STATIC_BANKMAX)
- for (memory_bank *info = m_space.manager().first_bank(); info != NULL; info = info->next())
+ for (memory_bank *info = m_space.manager().first_bank(); info != nullptr; info = info->next())
if (info->index() == entry)
return info->name();
@@ -3505,7 +3505,7 @@ address_table_read::address_table_read(address_space &space, bool large)
// allocate handlers for each entry, prepopulating the bankptrs for banks
for (int entrynum = 0; entrynum < ARRAY_LENGTH(m_handlers); entrynum++)
{
- UINT8 **bankptr = (entrynum >= STATIC_BANK1 && entrynum <= STATIC_BANKMAX) ? space.manager().bank_pointer_addr(entrynum) : NULL;
+ UINT8 **bankptr = (entrynum >= STATIC_BANK1 && entrynum <= STATIC_BANKMAX) ? space.manager().bank_pointer_addr(entrynum) : nullptr;
m_handlers[entrynum] = std::make_unique<handler_entry_read>(space.data_width(), space.endianness(), bankptr);
}
@@ -3579,7 +3579,7 @@ address_table_write::address_table_write(address_space &space, bool large)
// allocate handlers for each entry, prepopulating the bankptrs for banks
for (int entrynum = 0; entrynum < ARRAY_LENGTH(m_handlers); entrynum++)
{
- UINT8 **bankptr = (entrynum >= STATIC_BANK1 && entrynum <= STATIC_BANKMAX) ? space.manager().bank_pointer_addr(entrynum) : NULL;
+ UINT8 **bankptr = (entrynum >= STATIC_BANK1 && entrynum <= STATIC_BANKMAX) ? space.manager().bank_pointer_addr(entrynum) : nullptr;
m_handlers[entrynum] = std::make_unique<handler_entry_write>(space.data_width(), space.endianness(), bankptr);
}
@@ -3654,7 +3654,7 @@ handler_entry &address_table_write::handler(UINT32 index) const
direct_read_data::direct_read_data(address_space &space)
: m_space(space),
- m_ptr(NULL),
+ m_ptr(nullptr),
m_bytemask(space.bytemask()),
m_bytestart(1),
m_byteend(0),
@@ -3728,13 +3728,13 @@ direct_read_data::direct_range *direct_read_data::find_range(offs_t byteaddress,
entry = m_space.read().lookup_live_nowp(byteaddress);
// scan our table
- for (direct_range *range = m_rangelist[entry].first(); range != NULL; range = range->next())
+ for (direct_range *range = m_rangelist[entry].first(); range != nullptr; range = range->next())
if (byteaddress >= range->m_bytestart && byteaddress <= range->m_byteend)
return range;
// didn't find out; allocate a new one
direct_range *range = m_freerangelist.first();
- if (range != NULL)
+ if (range != nullptr)
m_freerangelist.detach(*range);
else
range = global_alloc(direct_range);
@@ -3755,18 +3755,18 @@ direct_read_data::direct_range *direct_read_data::find_range(offs_t byteaddress,
void direct_read_data::remove_intersecting_ranges(offs_t bytestart, offs_t byteend)
{
// loop over all entries
- for (int entry = 0; entry < ARRAY_LENGTH(m_rangelist); entry++)
+ for (auto & elem : m_rangelist)
{
// loop over all ranges in this entry's list
direct_range *nextrange;
- for (direct_range *range = m_rangelist[entry].first(); range != NULL; range = nextrange)
+ for (direct_range *range = elem.first(); range != nullptr; range = nextrange)
{
nextrange = range->next();
// if we intersect, remove and add to the free range list
if (bytestart <= range->m_byteend && byteend >= range->m_bytestart)
{
- m_rangelist[entry].detach(*range);
+ elem.detach(*range);
m_freerangelist.prepend(*range);
}
}
@@ -3812,7 +3812,7 @@ void direct_read_data::explicit_configure(offs_t bytestart, offs_t byteend, offs
//-------------------------------------------------
memory_block::memory_block(address_space &space, offs_t bytestart, offs_t byteend, void *memory)
- : m_next(NULL),
+ : m_next(nullptr),
m_machine(space.machine()),
m_space(space),
m_bytestart(bytestart),
@@ -3822,7 +3822,7 @@ memory_block::memory_block(address_space &space, offs_t bytestart, offs_t byteen
VPRINTF(("block_allocate('%s',%s,%08X,%08X,%p)\n", space.device().tag(), space.name(), bytestart, byteend, memory));
// allocate a block if needed
- if (m_data == NULL)
+ if (m_data == nullptr)
{
offs_t length = byteend + 1 - bytestart;
if (length < 4096)
@@ -3841,7 +3841,7 @@ memory_block::memory_block(address_space &space, offs_t bytestart, offs_t byteen
// register for saving, but only if we're not part of a memory region
memory_region *region;
- for (region = space.machine().memory().first_region(); region != NULL; region = region->next())
+ for (region = space.machine().memory().first_region(); region != nullptr; region = region->next())
if (m_data >= region->base() && (m_data + (byteend - bytestart + 1)) < region->end())
{
VPRINTF(("skipping save of this memory block as it is covered by a memory region\n"));
@@ -3849,12 +3849,12 @@ memory_block::memory_block(address_space &space, offs_t bytestart, offs_t byteen
}
// if we didn't find a match, register
- if (region == NULL)
+ if (region == nullptr)
{
int bytes_per_element = space.data_width() / 8;
std::string name;
strprintf(name,"%08x-%08x", bytestart, byteend);
- space.machine().save().save_memory(NULL, "memory", space.device().tag(), space.spacenum(), name.c_str(), m_data, bytes_per_element, (UINT32)(byteend + 1 - bytestart) / bytes_per_element);
+ space.machine().save().save_memory(nullptr, "memory", space.device().tag(), space.spacenum(), name.c_str(), m_data, bytes_per_element, (UINT32)(byteend + 1 - bytestart) / bytes_per_element);
}
}
@@ -3878,17 +3878,17 @@ memory_block::~memory_block()
//-------------------------------------------------
memory_bank::memory_bank(address_space &space, int index, offs_t bytestart, offs_t byteend, const char *tag)
- : m_next(NULL),
+ : m_next(nullptr),
m_machine(space.machine()),
m_baseptr(space.manager().bank_pointer_addr(index)),
m_index(index),
- m_anonymous(tag == NULL),
+ m_anonymous(tag == nullptr),
m_bytestart(bytestart),
m_byteend(byteend),
m_curentry(BANK_ENTRY_UNSPECIFIED)
{
// generate an internal tag if we don't have one
- if (tag == NULL)
+ if (tag == nullptr)
{
strprintf(m_tag,"~%d~", index);
strprintf(m_name,"Internal bank #%d", index);
@@ -3900,7 +3900,7 @@ memory_bank::memory_bank(address_space &space, int index, offs_t bytestart, offs
}
if (!m_anonymous && space.machine().save().registration_allowed())
- space.machine().save().save_item(NULL, "memory", m_tag.c_str(), 0, NAME(m_curentry));
+ space.machine().save().save_item(nullptr, "memory", m_tag.c_str(), 0, NAME(m_curentry));
}
@@ -3921,7 +3921,7 @@ memory_bank::~memory_bank()
bool memory_bank::references_space(address_space &space, read_or_write readorwrite) const
{
- for (bank_reference *ref = m_reflist.first(); ref != NULL; ref = ref->next())
+ for (bank_reference *ref = m_reflist.first(); ref != nullptr; ref = ref->next())
if (ref->matches(space, readorwrite))
return true;
return false;
@@ -3950,7 +3950,7 @@ void memory_bank::add_reference(address_space &space, read_or_write readorwrite)
void memory_bank::invalidate_references()
{
// invalidate all the direct references to any referenced address spaces
- for (bank_reference *ref = m_reflist.first(); ref != NULL; ref = ref->next())
+ for (bank_reference *ref = m_reflist.first(); ref != nullptr; ref = ref->next())
ref->space().direct().force_update();
}
@@ -3962,7 +3962,7 @@ void memory_bank::invalidate_references()
void memory_bank::set_base(void *base)
{
// NULL is not an option
- if (base == NULL)
+ if (base == nullptr)
throw emu_fatalerror("memory_bank::set_base called NULL base");
// set the base and invalidate any referencing spaces
@@ -3983,7 +3983,7 @@ void memory_bank::set_entry(int entrynum)
throw emu_fatalerror("memory_bank::set_entry called for anonymous bank");
if (entrynum < 0 || entrynum >= int(m_entry.size()))
throw emu_fatalerror("memory_bank::set_entry called with out-of-range entry %d", entrynum);
- if (m_entry[entrynum].m_ptr == NULL)
+ if (m_entry[entrynum].m_ptr == nullptr)
throw emu_fatalerror("memory_bank::set_entry called for bank '%s' with invalid bank entry %d", m_tag.c_str(), entrynum);
m_curentry = entrynum;
@@ -4026,7 +4026,7 @@ void memory_bank::configure_entry(int entrynum, void *base)
m_entry[entrynum].m_ptr = reinterpret_cast<UINT8 *>(base);
// if the bank base is not configured, and we're the first entry, set us up
- if (*m_baseptr == NULL && entrynum == 0)
+ if (*m_baseptr == nullptr && entrynum == 0)
*m_baseptr = m_entry[entrynum].m_ptr;
}
@@ -4053,7 +4053,7 @@ void memory_bank::configure_entries(int startentry, int numentries, void *base,
memory_region::memory_region(running_machine &machine, const char *name, UINT32 length, UINT8 width, endianness_t endian)
: m_machine(machine),
- m_next(NULL),
+ m_next(nullptr),
m_name(name),
m_buffer(length),
m_endianness(endian),
@@ -4115,7 +4115,7 @@ void handler_entry::copy(handler_entry *entry)
m_bytestart = entry->m_bytestart;
m_byteend = entry->m_byteend;
m_bytemask = entry->m_bytemask;
- m_rambaseptr = 0;
+ m_rambaseptr = nullptr;
m_subunits = entry->m_subunits;
memcpy(m_subunit_infos, entry->m_subunit_infos, m_subunits*sizeof(subunit_info));
m_invsubmask = entry->m_invsubmask;
@@ -4318,7 +4318,7 @@ const char *handler_entry_read::name() const
case 32: return m_read.r32.name();
case 64: return m_read.r64.name();
}
- return NULL;
+ return nullptr;
}
//-------------------------------------------------
@@ -4335,7 +4335,7 @@ const char *handler_entry_read::subunit_name(int entry) const
case 32: return m_subread[entry].r32.name();
case 64: return m_subread[entry].r64.name();
}
- return NULL;
+ return nullptr;
}
@@ -4631,7 +4631,7 @@ const char *handler_entry_write::name() const
case 32: return m_write.w32.name();
case 64: return m_write.w64.name();
}
- return NULL;
+ return nullptr;
}
@@ -4649,7 +4649,7 @@ const char *handler_entry_write::subunit_name(int entry) const
case 32: return m_subwrite[entry].w32.name();
case 64: return m_subwrite[entry].w64.name();
}
- return NULL;
+ return nullptr;
}
diff --git a/src/emu/memory.h b/src/emu/memory.h
index 2d7e5ff2ca0..e04ac52f1b4 100644
--- a/src/emu/memory.h
+++ b/src/emu/memory.h
@@ -148,7 +148,7 @@ public:
public:
// construction
direct_range()
- : m_next(NULL),
+ : m_next(nullptr),
m_bytestart(0),
m_byteend(~0) { }
@@ -214,8 +214,8 @@ class address_space_config
public:
// construction/destruction
address_space_config();
- address_space_config(const char *name, endianness_t endian, UINT8 datawidth, UINT8 addrwidth, INT8 addrshift = 0, address_map_constructor internal = NULL, address_map_constructor defmap = NULL);
- address_space_config(const char *name, endianness_t endian, UINT8 datawidth, UINT8 addrwidth, INT8 addrshift, UINT8 logwidth, UINT8 pageshift, address_map_constructor internal = NULL, address_map_constructor defmap = NULL);
+ address_space_config(const char *name, endianness_t endian, UINT8 datawidth, UINT8 addrwidth, INT8 addrshift = 0, address_map_constructor internal = nullptr, address_map_constructor defmap = nullptr);
+ address_space_config(const char *name, endianness_t endian, UINT8 datawidth, UINT8 addrwidth, INT8 addrshift, UINT8 logwidth, UINT8 pageshift, address_map_constructor internal = nullptr, address_map_constructor defmap = nullptr);
address_space_config(const char *name, endianness_t endian, UINT8 datawidth, UINT8 addrwidth, INT8 addrshift, address_map_delegate internal, address_map_delegate defmap = address_map_delegate());
address_space_config(const char *name, endianness_t endian, UINT8 datawidth, UINT8 addrwidth, INT8 addrshift, UINT8 logwidth, UINT8 pageshift, address_map_delegate internal, address_map_delegate defmap = address_map_delegate());
@@ -376,23 +376,23 @@ public:
void install_read_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_read_bank(addrstart, addrend, 0, 0, bank); }
void install_write_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_write_bank(addrstart, addrend, 0, 0, bank); }
void install_readwrite_bank(offs_t addrstart, offs_t addrend, memory_bank *bank) { install_readwrite_bank(addrstart, addrend, 0, 0, bank); }
- void *install_rom(offs_t addrstart, offs_t addrend, void *baseptr = NULL) { return install_rom(addrstart, addrend, 0, 0, baseptr); }
- void *install_writeonly(offs_t addrstart, offs_t addrend, void *baseptr = NULL) { return install_writeonly(addrstart, addrend, 0, 0, baseptr); }
- void *install_ram(offs_t addrstart, offs_t addrend, void *baseptr = NULL) { return install_ram(addrstart, addrend, 0, 0, baseptr); }
+ void *install_rom(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { return install_rom(addrstart, addrend, 0, 0, baseptr); }
+ void *install_writeonly(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { return install_writeonly(addrstart, addrend, 0, 0, baseptr); }
+ void *install_ram(offs_t addrstart, offs_t addrend, void *baseptr = nullptr) { return install_ram(addrstart, addrend, 0, 0, baseptr); }
// install ports, banks, RAM (with mirror/mask)
- void install_read_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *rtag) { install_readwrite_port(addrstart, addrend, addrmask, addrmirror, rtag, NULL); }
- void install_write_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *wtag) { install_readwrite_port(addrstart, addrend, addrmask, addrmirror, NULL, wtag); }
+ void install_read_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *rtag) { install_readwrite_port(addrstart, addrend, addrmask, addrmirror, rtag, nullptr); }
+ void install_write_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *wtag) { install_readwrite_port(addrstart, addrend, addrmask, addrmirror, nullptr, wtag); }
void install_readwrite_port(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *rtag, const char *wtag);
- void install_read_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, tag, NULL); }
- void install_write_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, NULL, tag); }
+ void install_read_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, tag, nullptr); }
+ void install_write_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, nullptr, tag); }
void install_readwrite_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, const char *tag) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, tag, tag); }
- void install_read_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, bank, NULL); }
- void install_write_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, NULL, bank); }
+ void install_read_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, bank, nullptr); }
+ void install_write_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, nullptr, bank); }
void install_readwrite_bank(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, memory_bank *bank) { install_bank_generic(addrstart, addrend, addrmask, addrmirror, bank, bank); }
- void *install_rom(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = NULL) { return install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READ, baseptr); }
- void *install_writeonly(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = NULL) { return install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_WRITE, baseptr); }
- void *install_ram(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = NULL) { return install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READWRITE, baseptr); }
+ void *install_rom(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { return install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READ, baseptr); }
+ void *install_writeonly(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { return install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_WRITE, baseptr); }
+ void *install_ram(offs_t addrstart, offs_t addrend, offs_t addrmask, offs_t addrmirror, void *baseptr = nullptr) { return install_ram_generic(addrstart, addrend, addrmask, addrmirror, ROW_READWRITE, baseptr); }
// install device memory maps
template <typename T> void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(address_map &map, device_t &device), int bits = 0, UINT64 unitmask = 0) {
@@ -436,7 +436,7 @@ public:
// setup
void prepare_map();
- void populate_from_map(address_map *map = NULL);
+ void populate_from_map(address_map *map = nullptr);
void allocate_memory();
void locate_memory();
@@ -495,7 +495,7 @@ class memory_block
public:
// construction/destruction
- memory_block(address_space &space, offs_t bytestart, offs_t byteend, void *memory = NULL);
+ memory_block(address_space &space, offs_t bytestart, offs_t byteend, void *memory = nullptr);
~memory_block();
// getters
@@ -539,7 +539,7 @@ class memory_bank
public:
// construction/destruction
bank_reference(address_space &space, read_or_write readorwrite)
- : m_next(NULL),
+ : m_next(nullptr),
m_space(space),
m_readorwrite(readorwrite) { }
@@ -568,7 +568,7 @@ class memory_bank
public:
// construction/destruction
- memory_bank(address_space &space, int index, offs_t bytestart, offs_t byteend, const char *tag = NULL);
+ memory_bank(address_space &space, int index, offs_t bytestart, offs_t byteend, const char *tag = nullptr);
~memory_bank();
// getters
@@ -630,8 +630,8 @@ class memory_share
public:
// construction/destruction
- memory_share(UINT8 width, size_t bytes, endianness_t endianness, void *ptr = NULL)
- : m_next(NULL),
+ memory_share(UINT8 width, size_t bytes, endianness_t endianness, void *ptr = nullptr)
+ : m_next(nullptr),
m_ptr(ptr),
m_bytes(bytes),
m_endianness(endianness),
@@ -643,7 +643,7 @@ public:
memory_share *next() const { return m_next; }
// NOTE: this being NULL in a C++ member function can lead to undefined behavior.
// However, it is relied on throughout MAME, so will remain for now.
- void *ptr() const { if (this == NULL) return NULL; return m_ptr; }
+ void *ptr() const { if (this == nullptr) return nullptr; return m_ptr; }
size_t bytes() const { return m_bytes; }
endianness_t endianness() const { return m_endianness; }
UINT8 bitwidth() const { return m_bitwidth; }
@@ -682,9 +682,9 @@ public:
// getters
running_machine &machine() const { return m_machine; }
memory_region *next() const { return m_next; }
- UINT8 *base() { return (this != NULL) ? &m_buffer[0] : NULL; }
- UINT8 *end() { return (this != NULL) ? base() + m_buffer.size() : NULL; }
- UINT32 bytes() const { return (this != NULL) ? m_buffer.size() : 0; }
+ UINT8 *base() { return (this != nullptr) ? &m_buffer[0] : nullptr; }
+ UINT8 *end() { return (this != nullptr) ? base() + m_buffer.size() : nullptr; }
+ UINT32 bytes() const { return (this != nullptr) ? m_buffer.size() : 0; }
const char *name() const { return m_name.c_str(); }
// flag expansion
@@ -883,7 +883,7 @@ inline void *direct_read_data::read_ptr(offs_t byteaddress, offs_t directxor)
{
if (address_is_valid(byteaddress))
return &m_ptr[(byteaddress ^ directxor) & m_bytemask];
- return NULL;
+ return nullptr;
}
diff --git a/src/emu/network.cpp b/src/emu/network.cpp
index ceb557cdefd..5bcd8173618 100644
--- a/src/emu/network.cpp
+++ b/src/emu/network.cpp
@@ -20,22 +20,22 @@
static void network_load(running_machine &machine, int config_type, xml_data_node *parentnode)
{
xml_data_node *node;
- if ((config_type == CONFIG_TYPE_GAME) && (parentnode != NULL))
+ if ((config_type == CONFIG_TYPE_GAME) && (parentnode != nullptr))
{
for (node = xml_get_sibling(parentnode->child, "device"); node; node = xml_get_sibling(node->next, "device"))
{
- const char *tag = xml_get_attribute_string(node, "tag", NULL);
+ const char *tag = xml_get_attribute_string(node, "tag", nullptr);
- if ((tag != NULL) && (tag[0] != '\0'))
+ if ((tag != nullptr) && (tag[0] != '\0'))
{
network_interface_iterator iter(machine.root_device());
- for (device_network_interface *network = iter.first(); network != NULL; network = iter.next())
+ for (device_network_interface *network = iter.first(); network != nullptr; network = iter.next())
{
if (!strcmp(tag, network->device().tag())) {
int interface = xml_get_attribute_int(node, "interface", 0);
network->set_interface(interface);
- const char *mac_addr = xml_get_attribute_string(node, "mac", NULL);
- if (mac_addr != NULL && strlen(mac_addr)==17) {
+ const char *mac_addr = xml_get_attribute_string(node, "mac", nullptr);
+ if (mac_addr != nullptr && strlen(mac_addr)==17) {
char mac[7];
unsigned int mac_num[6];
sscanf (mac_addr,"%02x:%02x:%02x:%02x:%02x:%02x",&mac_num[0],&mac_num[1],&mac_num[2],&mac_num[3],&mac_num[4],&mac_num[5]);
@@ -58,10 +58,10 @@ static void network_save(running_machine &machine, int config_type, xml_data_nod
if (config_type == CONFIG_TYPE_GAME)
{
network_interface_iterator iter(machine.root_device());
- for (device_network_interface *network = iter.first(); network != NULL; network = iter.next())
+ for (device_network_interface *network = iter.first(); network != nullptr; network = iter.next())
{
- node = xml_add_child(parentnode, "device", NULL);
- if (node != NULL)
+ node = xml_add_child(parentnode, "device", nullptr);
+ if (node != nullptr)
{
xml_set_attribute(node, "tag", network->device().tag());
xml_set_attribute_int(node, "interface", network->get_interface());
diff --git a/src/emu/output.cpp b/src/emu/output.cpp
index 54d2d91e85a..e2e919dfaa3 100644
--- a/src/emu/output.cpp
+++ b/src/emu/output.cpp
@@ -26,7 +26,7 @@ class output_notify
{
public:
output_notify(output_notifier_func callback, void *param)
- : m_next(NULL),
+ : m_next(nullptr),
m_notifier(callback),
m_param(param) { }
@@ -94,11 +94,11 @@ INLINE output_item *find_item(const char *string)
output_item *item;
/* use the hash as a starting point and find an entry */
- for (item = itemtable[hash % HASH_SIZE]; item != NULL; item = item->next)
+ for (item = itemtable[hash % HASH_SIZE]; item != nullptr; item = item->next)
if (item->hash == hash && strcmp(string, item->name.c_str()) == 0)
return item;
- return NULL;
+ return nullptr;
}
@@ -108,7 +108,7 @@ INLINE output_item *find_item(const char *string)
INLINE output_item *create_new_item(const char *outname, INT32 value)
{
- output_item *item = global_alloc(output_item);
+ auto item = global_alloc(output_item);
UINT32 hash = get_hash(outname);
/* fill in the data */
@@ -174,7 +174,7 @@ static void output_exit(running_machine &machine)
/* remove all items */
for (hash = 0; hash < HASH_SIZE; hash++)
- for (item = itemtable[hash]; item != NULL; )
+ for (item = itemtable[hash]; item != nullptr; )
{
output_item *next = item->next;
@@ -198,7 +198,7 @@ void output_set_value(const char *outname, INT32 value)
INT32 oldval;
/* if no item of that name, create a new one and send the item's state */
- if (item == NULL)
+ if (item == nullptr)
{
item = create_new_item(outname, value);
oldval = value + 1;
@@ -215,11 +215,11 @@ void output_set_value(const char *outname, INT32 value)
if (oldval != value)
{
/* call the local notifiers first */
- for (output_notify *notify = item->notifylist.first(); notify != NULL; notify = notify->next())
+ for (output_notify *notify = item->notifylist.first(); notify != nullptr; notify = notify->next())
(*notify->m_notifier)(outname, value, notify->m_param);
/* call the global notifiers next */
- for (output_notify *notify = global_notifylist.first(); notify != NULL; notify = notify->next())
+ for (output_notify *notify = global_notifylist.first(); notify != nullptr; notify = notify->next())
(*notify->m_notifier)(outname, value, notify->m_param);
}
}
@@ -261,7 +261,7 @@ INT32 output_get_value(const char *outname)
output_item *item = find_item(outname);
/* if no item, value is 0 */
- if (item == NULL)
+ if (item == nullptr)
return 0;
return item->value;
}
@@ -302,12 +302,12 @@ INT32 output_get_indexed_value(const char *basename, int index)
void output_set_notifier(const char *outname, output_notifier_func callback, void *param)
{
/* if an item is specified, find it */
- if (outname != NULL)
+ if (outname != nullptr)
{
output_item *item = find_item(outname);
/* if no item of that name, create a new one */
- if (item == NULL)
+ if (item == nullptr)
item = create_new_item(outname, 0);
item->notifylist.append(*global_alloc(output_notify(callback, param)));
}
@@ -328,7 +328,7 @@ void output_notify_all(output_notifier_func callback, void *param)
/* remove all items */
for (hash = 0; hash < HASH_SIZE; hash++)
- for (item = itemtable[hash]; item != NULL; item = item->next)
+ for (item = itemtable[hash]; item != nullptr; item = item->next)
(*callback)(item->name.c_str(), item->value, param);
}
@@ -343,7 +343,7 @@ UINT32 output_name_to_id(const char *outname)
output_item *item = find_item(outname);
/* if no item, ID is 0 */
- if (item == NULL)
+ if (item == nullptr)
return 0;
return item->id;
}
@@ -361,10 +361,10 @@ const char *output_id_to_name(UINT32 id)
/* remove all items */
for (hash = 0; hash < HASH_SIZE; hash++)
- for (item = itemtable[hash]; item != NULL; item = item->next)
+ for (item = itemtable[hash]; item != nullptr; item = item->next)
if (item->id == id)
return item->name.c_str();
/* nothing found, return NULL */
- return NULL;
+ return nullptr;
}
diff --git a/src/emu/profiler.cpp b/src/emu/profiler.cpp
index 668d57964c2..102f0358e09 100644
--- a/src/emu/profiler.cpp
+++ b/src/emu/profiler.cpp
@@ -105,7 +105,7 @@ void real_profiler_state::reset(bool enabled)
else
{
// magic value to indicate disabled
- m_filoptr = NULL;
+ m_filoptr = nullptr;
}
}
@@ -212,10 +212,10 @@ void real_profiler_state::update_text(running_machine &machine)
if (curtype >= PROFILER_DEVICE_FIRST && curtype <= PROFILER_DEVICE_MAX)
strcatprintf(m_text, "'%s'", iter.byindex(curtype - PROFILER_DEVICE_FIRST)->tag());
else
- for (int nameindex = 0; nameindex < ARRAY_LENGTH(names); nameindex++)
- if (names[nameindex].type == curtype)
+ for (auto & name : names)
+ if (name.type == curtype)
{
- m_text.append(names[nameindex].string);
+ m_text.append(name.string);
break;
}
diff --git a/src/emu/profiler.h b/src/emu/profiler.h
index ceb1afee877..9309b130df2 100644
--- a/src/emu/profiler.h
+++ b/src/emu/profiler.h
@@ -91,7 +91,7 @@ public:
// getters
bool enabled() const
{
- return m_filoptr != NULL;
+ return m_filoptr != nullptr;
}
const char *text(running_machine &machine);
diff --git a/src/emu/render.cpp b/src/emu/render.cpp
index 712c8287a32..0f9bc97d77d 100644
--- a/src/emu/render.cpp
+++ b/src/emu/render.cpp
@@ -182,7 +182,7 @@ inline item_layer get_layer_and_blendmode(const layout_view &view, int index, in
// screens (add) + overlays (RGB multiply) + backdrop (add) + bezels (alpha) + cpanels (alpha) + marquees (alpha)
const int *layer_order = layer_order_standard;
- if (view.first_item(ITEM_LAYER_BACKDROP) != NULL && view.first_item(ITEM_LAYER_BACKDROP)->next() != NULL && view.first_item(ITEM_LAYER_OVERLAY) == NULL)
+ if (view.first_item(ITEM_LAYER_BACKDROP) != nullptr && view.first_item(ITEM_LAYER_BACKDROP)->next() != nullptr && view.first_item(ITEM_LAYER_OVERLAY) == nullptr)
layer_order = layer_order_alternate;
// select the layer
@@ -268,7 +268,7 @@ inline void render_primitive_list::add_reference(void *refptr)
inline bool render_primitive_list::has_reference(void *refptr) const
{
// skip if we already have one
- for (reference *ref = m_reflist.first(); ref != NULL; ref = ref->next())
+ for (reference *ref = m_reflist.first(); ref != nullptr; ref = ref->next())
if (ref->m_refptr == refptr)
return true;
return false;
@@ -328,13 +328,13 @@ void render_primitive_list::append_or_return(render_primitive &prim, bool clippe
//-------------------------------------------------
render_texture::render_texture()
- : m_manager(NULL),
- m_next(NULL),
- m_bitmap(NULL),
+ : m_manager(nullptr),
+ m_next(nullptr),
+ m_bitmap(nullptr),
m_format(TEXFORMAT_ARGB32),
m_osddata(~0L),
- m_scaler(NULL),
- m_param(NULL),
+ m_scaler(nullptr),
+ m_param(nullptr),
m_curseq(0)
{
m_sbounds.set(0, -1, 0, -1);
@@ -360,7 +360,7 @@ render_texture::~render_texture()
void render_texture::reset(render_manager &manager, texture_scaler_func scaler, void *param)
{
m_manager = &manager;
- if (scaler != NULL)
+ if (scaler != nullptr)
{
assert(m_format == TEXFORMAT_ARGB32);
m_scaler = scaler;
@@ -377,17 +377,17 @@ void render_texture::reset(render_manager &manager, texture_scaler_func scaler,
void render_texture::release()
{
// free all scaled versions
- for (int scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
+ for (auto & elem : m_scaled)
{
- m_manager->invalidate_all(m_scaled[scalenum].bitmap);
- global_free(m_scaled[scalenum].bitmap);
- m_scaled[scalenum].bitmap = NULL;
- m_scaled[scalenum].seqid = 0;
+ m_manager->invalidate_all(elem.bitmap);
+ global_free(elem.bitmap);
+ elem.bitmap = nullptr;
+ elem.seqid = 0;
}
// invalidate references to the original bitmap as well
m_manager->invalidate_all(m_bitmap);
- m_bitmap = NULL;
+ m_bitmap = nullptr;
m_sbounds.set(0, -1, 0, -1);
m_format = TEXFORMAT_ARGB32;
m_curseq = 0;
@@ -404,10 +404,10 @@ void render_texture::set_bitmap(bitmap_t &bitmap, const rectangle &sbounds, text
// ensure we have a valid palette for palettized modes
if (format == TEXFORMAT_PALETTE16 || format == TEXFORMAT_PALETTEA16)
- assert(bitmap.palette() != NULL);
+ assert(bitmap.palette() != nullptr);
// invalidate references to the old bitmap
- if (&bitmap != m_bitmap && m_bitmap != NULL)
+ if (&bitmap != m_bitmap && m_bitmap != nullptr)
m_manager->invalidate_all(m_bitmap);
// set the new bitmap/palette
@@ -416,15 +416,15 @@ void render_texture::set_bitmap(bitmap_t &bitmap, const rectangle &sbounds, text
m_format = format;
// invalidate all scaled versions
- for (int scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
+ for (auto & elem : m_scaled)
{
- if (m_scaled[scalenum].bitmap != NULL)
+ if (elem.bitmap != nullptr)
{
- m_manager->invalidate_all(m_scaled[scalenum].bitmap);
- global_free(m_scaled[scalenum].bitmap);
+ m_manager->invalidate_all(elem.bitmap);
+ global_free(elem.bitmap);
}
- m_scaled[scalenum].bitmap = NULL;
- m_scaled[scalenum].seqid = 0;
+ elem.bitmap = nullptr;
+ elem.seqid = 0;
}
}
@@ -459,7 +459,7 @@ void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t
texinfo.osddata = m_osddata;
// are we scaler-free? if so, just return the source bitmap
- if (m_scaler == NULL || (m_bitmap != NULL && swidth == dwidth && sheight == dheight))
+ if (m_scaler == nullptr || (m_bitmap != nullptr && swidth == dwidth && sheight == dheight))
{
// add a reference and set up the source bitmap
primlist.add_reference(m_bitmap);
@@ -474,17 +474,17 @@ void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t
{
// make sure we can recover the original argb32 bitmap
bitmap_argb32 dummy;
- bitmap_argb32 &srcbitmap = (m_bitmap != NULL) ? downcast<bitmap_argb32 &>(*m_bitmap) : dummy;
+ bitmap_argb32 &srcbitmap = (m_bitmap != nullptr) ? downcast<bitmap_argb32 &>(*m_bitmap) : dummy;
// is it a size we already have?
- scaled_texture *scaled = NULL;
+ scaled_texture *scaled = nullptr;
int scalenum;
for (scalenum = 0; scalenum < ARRAY_LENGTH(m_scaled); scalenum++)
{
scaled = &m_scaled[scalenum];
// we need a non-NULL bitmap with matching dest size
- if (scaled->bitmap != NULL && dwidth == scaled->bitmap->width() && dheight == scaled->bitmap->height())
+ if (scaled->bitmap != nullptr && dwidth == scaled->bitmap->width() && dheight == scaled->bitmap->height())
break;
}
@@ -501,7 +501,7 @@ void render_texture::get_scaled(UINT32 dwidth, UINT32 dheight, render_texinfo &t
// throw out any existing entries
scaled = &m_scaled[lowest];
- if (scaled->bitmap != NULL)
+ if (scaled->bitmap != nullptr)
{
m_manager->invalidate_all(scaled->bitmap);
global_free(scaled->bitmap);
@@ -540,7 +540,7 @@ const rgb_t *render_texture::get_adjusted_palette(render_container &container)
case TEXFORMAT_PALETTE16:
case TEXFORMAT_PALETTEA16:
- assert(m_bitmap->palette() != NULL);
+ assert(m_bitmap->palette() != nullptr);
// return our adjusted palette
return container.bcg_lookup_table(m_format, m_bitmap->palette());
@@ -551,14 +551,14 @@ const rgb_t *render_texture::get_adjusted_palette(render_container &container)
// if no adjustment necessary, return NULL
if (!container.has_brightness_contrast_gamma_changes())
- return NULL;
+ return nullptr;
return container.bcg_lookup_table(m_format);
default:
assert(FALSE);
}
- return NULL;
+ return nullptr;
}
@@ -572,17 +572,17 @@ const rgb_t *render_texture::get_adjusted_palette(render_container &container)
//-------------------------------------------------
render_container::render_container(render_manager &manager, screen_device *screen)
- : m_next(NULL),
+ : m_next(nullptr),
m_manager(manager),
m_screen(screen),
- m_overlaybitmap(NULL),
- m_overlaytexture(NULL)
+ m_overlaybitmap(nullptr),
+ m_overlaytexture(nullptr)
{
// make sure it is empty
empty();
// if we have a screen, read and apply the options
- if (m_screen != NULL)
+ if (m_screen != nullptr)
{
// set the initial orientation and brightness/contrast/gamma
m_user.m_orientation = manager.machine().system().flags & ORIENTATION_MASK;
@@ -622,7 +622,7 @@ void render_container::set_overlay(bitmap_argb32 *bitmap)
// set the new data and allocate the texture
m_overlaybitmap = bitmap;
- if (m_overlaybitmap != NULL)
+ if (m_overlaybitmap != nullptr)
{
m_overlaytexture = m_manager.texture_alloc(render_container::overlay_scale);
m_overlaytexture->set_bitmap(*bitmap, bitmap->cliprect(), TEXFORMAT_ARGB32);
@@ -737,7 +737,7 @@ const rgb_t *render_container::bcg_lookup_table(int texformat, palette_t *palett
return m_bcglookup256;
default:
- return NULL;
+ return nullptr;
}
}
@@ -788,7 +788,7 @@ render_container::item &render_container::add_generic(UINT8 type, float x0, floa
newitem->m_flags = 0;
newitem->m_internal = 0;
newitem->m_width = 0;
- newitem->m_texture = NULL;
+ newitem->m_texture = nullptr;
// add the item to the container
return m_itemlist.append(*newitem);
@@ -844,7 +844,7 @@ void render_container::recompute_lookups()
void render_container::update_palette()
{
// skip if no client
- if (m_palclient == NULL)
+ if (m_palclient == nullptr)
return;
// get the dirty list
@@ -852,7 +852,7 @@ void render_container::update_palette()
const UINT32 *dirty = m_palclient->dirty_list(mindirty, maxdirty);
// iterate over dirty items and update them
- if (dirty != NULL)
+ if (dirty != nullptr)
{
palette_t &palette = m_palclient->palette();
const rgb_t *adjusted_palette = palette.entry_list_adjusted();
@@ -911,9 +911,9 @@ render_container::user_settings::user_settings()
//-------------------------------------------------
render_target::render_target(render_manager &manager, const char *layoutfile, UINT32 flags)
- : m_next(NULL),
+ : m_next(nullptr),
m_manager(manager),
- m_curview(NULL),
+ m_curview(nullptr),
m_flags(flags),
m_listindex(0),
m_width(640),
@@ -921,7 +921,7 @@ render_target::render_target(render_manager &manager, const char *layoutfile, UI
m_pixel_aspect(0.0f),
m_max_refresh(0),
m_orientation(0),
- m_base_view(NULL),
+ m_base_view(nullptr),
m_base_orientation(ROT0),
m_maxtexwidth(65536),
m_maxtexheight(65536),
@@ -962,7 +962,7 @@ render_target::render_target(render_manager &manager, const char *layoutfile, UI
set_view(0);
// make us the UI target if there is none
- if (!hidden() && manager.m_ui_target == NULL)
+ if (!hidden() && manager.m_ui_target == nullptr)
manager.set_ui_target(*this);
}
@@ -1021,7 +1021,7 @@ void render_target::set_bounds(INT32 width, INT32 height, float pixel_aspect)
void render_target::set_view(int viewindex)
{
layout_view *view = view_by_index(viewindex);
- if (view != NULL)
+ if (view != nullptr)
{
m_curview = view;
view->recompute(m_layerconfig);
@@ -1048,14 +1048,14 @@ void render_target::set_max_texture_size(int maxwidth, int maxheight)
int render_target::configured_view(const char *viewname, int targetindex, int numtargets)
{
- layout_view *view = NULL;
+ layout_view *view = nullptr;
int viewindex;
// auto view just selects the nth view
if (strcmp(viewname, "auto") != 0)
{
// scan for a matching view name
- for (view = view_by_index(viewindex = 0); view != NULL; view = view_by_index(++viewindex))
+ for (view = view_by_index(viewindex = 0); view != nullptr; view = view_by_index(++viewindex))
if (core_strnicmp(view->name(), viewname, strlen(viewname)) == 0)
break;
}
@@ -1063,7 +1063,7 @@ int render_target::configured_view(const char *viewname, int targetindex, int nu
// if we don't have a match, default to the nth view
screen_device_iterator iter(m_manager.machine().root_device());
int scrcount = iter.count();
- if (view == NULL && scrcount > 0)
+ if (view == nullptr && scrcount > 0)
{
// if we have enough targets to be one per screen, assign in order
if (numtargets >= scrcount)
@@ -1072,12 +1072,12 @@ int render_target::configured_view(const char *viewname, int targetindex, int nu
screen_device *screen = iter.byindex(ourindex);
// find the first view with this screen and this screen only
- for (view = view_by_index(viewindex = 0); view != NULL; view = view_by_index(++viewindex))
+ for (view = view_by_index(viewindex = 0); view != nullptr; view = view_by_index(++viewindex))
{
const render_screen_list &viewscreens = view->screens();
if (viewscreens.count() == 0)
{
- view = NULL;
+ view = nullptr;
break;
}
else if (viewscreens.count() == viewscreens.contains(*screen))
@@ -1086,9 +1086,9 @@ int render_target::configured_view(const char *viewname, int targetindex, int nu
}
// otherwise, find the first view that has all the screens
- if (view == NULL)
+ if (view == nullptr)
{
- for (view = view_by_index(viewindex = 0); view != NULL; view = view_by_index(++viewindex))
+ for (view = view_by_index(viewindex = 0); view != nullptr; view = view_by_index(++viewindex))
{
const render_screen_list &viewscreens = view->screens();
if (viewscreens.count() == 0)
@@ -1096,10 +1096,10 @@ int render_target::configured_view(const char *viewname, int targetindex, int nu
if (viewscreens.count() >= scrcount)
{
screen_device *screen;
- for (screen = iter.first(); screen != NULL; screen = iter.next())
+ for (screen = iter.first(); screen != nullptr; screen = iter.next())
if (!viewscreens.contains(*screen))
break;
- if (screen == NULL)
+ if (screen == nullptr)
break;
}
}
@@ -1107,7 +1107,7 @@ int render_target::configured_view(const char *viewname, int targetindex, int nu
}
// make sure it's a valid view
- return (view != NULL) ? view_index(*view) : 0;
+ return (view != nullptr) ? view_index(*view) : 0;
}
@@ -1118,7 +1118,7 @@ int render_target::configured_view(const char *viewname, int targetindex, int nu
const char *render_target::view_name(int viewindex)
{
layout_view *view = view_by_index(viewindex);
- return (view != NULL) ? view->name() : NULL;
+ return (view != nullptr) ? view->name() : nullptr;
}
@@ -1131,7 +1131,7 @@ const char *render_target::view_name(int viewindex)
const render_screen_list &render_target::view_screens(int viewindex)
{
layout_view *view = view_by_index(viewindex);
- return (view != NULL) ? view->screens() : s_empty_screen_list;
+ return (view != nullptr) ? view->screens() : s_empty_screen_list;
}
@@ -1201,15 +1201,15 @@ void render_target::compute_minimum_size(INT32 &minwidth, INT32 &minheight)
return;
}
- if (m_curview == NULL)
+ if (m_curview == nullptr)
throw emu_fatalerror("Mandatory artwork is missing");
// scan the current view for all screens
for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; ++layer)
// iterate over items in the layer
- for (layout_view::item *curitem = m_curview->first_item(layer); curitem != NULL; curitem = curitem->next())
- if (curitem->screen() != NULL)
+ for (layout_view::item *curitem = m_curview->first_item(layer); curitem != nullptr; curitem = curitem->next())
+ if (curitem->screen() != nullptr)
{
// use a hard-coded default visible area for vector screens
screen_device *screen = curitem->screen();
@@ -1261,7 +1261,7 @@ void render_target::compute_minimum_size(INT32 &minwidth, INT32 &minheight)
render_primitive_list &render_target::get_primitives()
{
// remember the base values if this is the first frame
- if (m_base_view == NULL)
+ if (m_base_view == nullptr)
m_base_view = m_curview;
// switch to the next primitive list
@@ -1295,7 +1295,7 @@ render_primitive_list &render_target::get_primitives()
if (m_curview->layer_enabled(layer))
{
// iterate over items in the layer
- for (layout_view::item *curitem = m_curview->first_item(layer); curitem != NULL; curitem = curitem->next())
+ for (layout_view::item *curitem = m_curview->first_item(layer); curitem != nullptr; curitem = curitem->next())
{
// first apply orientation to the bounds
render_bounds bounds = curitem->bounds();
@@ -1316,7 +1316,7 @@ render_primitive_list &render_target::get_primitives()
item_xform.no_center = false;
// if there is no associated element, it must be a screen element
- if (curitem->screen() != NULL)
+ if (curitem->screen() != nullptr)
add_container_primitives(list, item_xform, curitem->screen()->container(), blendmode);
else
add_element_primitives(list, item_xform, *curitem->element(), curitem->state(), blendmode);
@@ -1330,7 +1330,7 @@ render_primitive_list &render_target::get_primitives()
render_primitive *prim = list.alloc(render_primitive::QUAD);
set_render_bounds_xy(&prim->bounds, 0.0f, 0.0f, (float)m_width, (float)m_height);
set_render_color(&prim->color, 1.0f, 1.0f, 1.0f, 1.0f);
- prim->texture.base = NULL;
+ prim->texture.base = nullptr;
prim->flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
list.append(*prim);
@@ -1339,14 +1339,14 @@ render_primitive_list &render_target::get_primitives()
prim = list.alloc(render_primitive::QUAD);
set_render_bounds_xy(&prim->bounds, 1.0f, 1.0f, (float)(m_width - 1), (float)(m_height - 1));
set_render_color(&prim->color, 1.0f, 0.0f, 0.0f, 0.0f);
- prim->texture.base = NULL;
+ prim->texture.base = nullptr;
prim->flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
list.append(*prim);
}
}
// process the debug containers
- for (render_container *debug = m_debug_containers.first(); debug != NULL; debug = debug->next())
+ for (render_container *debug = m_debug_containers.first(); debug != nullptr; debug = debug->next())
{
object_transform ui_xform;
ui_xform.xoffs = 0;
@@ -1408,7 +1408,7 @@ bool render_target::map_point_container(INT32 target_x, INT32 target_y, render_c
bool render_target::map_point_input(INT32 target_x, INT32 target_y, ioport_port *&input_port, ioport_value &input_mask, float &input_x, float &input_y)
{
- return map_point_internal(target_x, target_y, NULL, input_x, input_y, input_port, input_mask);;
+ return map_point_internal(target_x, target_y, nullptr, input_x, input_y, input_port, input_mask);;
}
@@ -1421,9 +1421,9 @@ bool render_target::map_point_input(INT32 target_x, INT32 target_y, ioport_port
void render_target::invalidate_all(void *refptr)
{
// iterate through all our primitive lists
- for (int listnum = 0; listnum < ARRAY_LENGTH(m_primlist); listnum++)
+ for (auto & list : m_primlist)
{
- render_primitive_list &list = m_primlist[listnum];
+
// if we have a reference to this object, release our list
list.acquire_lock();
@@ -1472,9 +1472,9 @@ void render_target::debug_top(render_container &container)
void render_target::resolve_tags()
{
- for (layout_file *file = m_filelist.first(); file != NULL; file = file->next())
+ for (layout_file *file = m_filelist.first(); file != nullptr; file = file->next())
{
- for (layout_view *view = file->first_view(); view != NULL; view = view->next())
+ for (layout_view *view = file->first_view(); view != nullptr; view = view->next())
{
view->resolve_tags();
}
@@ -1503,7 +1503,7 @@ void render_target::load_layout_files(const char *layoutfile, bool singlefile)
bool have_default = false;
// if there's an explicit file, load that first
const char *basename = m_manager.machine().basename();
- if (layoutfile != NULL)
+ if (layoutfile != nullptr)
have_default |= load_layout_file(basename, layoutfile);
// if we're only loading this file, we know our final result
@@ -1518,10 +1518,10 @@ void render_target::load_layout_files(const char *layoutfile, bool singlefile)
have_default |= true;
// if a default view has been specified, use that as a fallback
- if (system.default_layout != NULL)
- have_default |= load_layout_file(NULL, system.default_layout);
- if (m_manager.machine().config().m_default_layout != NULL)
- have_default |= load_layout_file(NULL, m_manager.machine().config().m_default_layout);
+ if (system.default_layout != nullptr)
+ have_default |= load_layout_file(nullptr, system.default_layout);
+ if (m_manager.machine().config().m_default_layout != nullptr)
+ have_default |= load_layout_file(nullptr, m_manager.machine().config().m_default_layout);
// try to load another file based on the parent driver name
int cloneof = driver_list::clone(system);
@@ -1537,34 +1537,34 @@ void render_target::load_layout_files(const char *layoutfile, bool singlefile)
if (screens == 1)
{
if (system.flags & ORIENTATION_SWAP_XY)
- load_layout_file(NULL, layout_vertical);
+ load_layout_file(nullptr, layout_vertical);
else
- load_layout_file(NULL, layout_horizont);
+ load_layout_file(nullptr, layout_horizont);
assert_always(m_filelist.count() > 0, "Couldn't parse default layout??");
}
if (!have_default)
{
if (screens == 0)
{
- load_layout_file(NULL, layout_noscreens);
+ load_layout_file(nullptr, layout_noscreens);
assert_always(m_filelist.count() > 0, "Couldn't parse default layout??");
}
else
if (screens == 2)
{
- load_layout_file(NULL, layout_dualhsxs);
+ load_layout_file(nullptr, layout_dualhsxs);
assert_always(m_filelist.count() > 0, "Couldn't parse default layout??");
}
else
if (screens == 3)
{
- load_layout_file(NULL, layout_triphsxs);
+ load_layout_file(nullptr, layout_triphsxs);
assert_always(m_filelist.count() > 0, "Couldn't parse default layout??");
}
else
if (screens == 4)
{
- load_layout_file(NULL, layout_quadhsxs);
+ load_layout_file(nullptr, layout_quadhsxs);
assert_always(m_filelist.count() > 0, "Couldn't parse default layout??");
}
}
@@ -1581,14 +1581,14 @@ bool render_target::load_layout_file(const char *dirname, const char *filename)
// if the first character of the "file" is an open brace, assume it is an XML string
xml_data_node *rootnode;
if (filename[0] == '<')
- rootnode = xml_string_read(filename, NULL);
+ rootnode = xml_string_read(filename, nullptr);
// otherwise, assume it is a file
else
{
// build the path and optionally prepend the directory
std::string fname = std::string(filename).append(".lay");
- if (dirname != NULL)
+ if (dirname != nullptr)
fname.insert(0, PATH_SEPARATOR).insert(0, dirname);
// attempt to open the file; bail if we can't
@@ -1598,11 +1598,11 @@ bool render_target::load_layout_file(const char *dirname, const char *filename)
return false;
// read the file
- rootnode = xml_file_read(layoutfile, NULL);
+ rootnode = xml_file_read(layoutfile, nullptr);
}
// if we didn't get a properly-formatted XML file, record a warning and exit
- if (rootnode == NULL)
+ if (rootnode == nullptr)
{
if (filename[0] != '<')
osd_printf_warning("Improperly formatted XML file '%s', ignoring\n", filename);
@@ -1683,7 +1683,7 @@ void render_target::add_container_primitives(render_primitive_list &list, const
}
// iterate over elements
- for (render_container::item *curitem = container.first_item(); curitem != NULL; curitem = curitem->next())
+ for (render_container::item *curitem = container.first_item(); curitem != nullptr; curitem = curitem->next())
{
// compute the oriented bounds
render_bounds bounds = curitem->bounds();
@@ -1745,7 +1745,7 @@ void render_target::add_container_primitives(render_primitive_list &list, const
normalize_bounds(prim->bounds);
// get the scaled bitmap and set the resulting palette
- if (curitem->texture() != NULL)
+ if (curitem->texture() != nullptr)
{
// determine the final orientation
int finalorient = orientation_add(PRIMFLAG_GET_TEXORIENT(curitem->flags()), container_xform.orientation);
@@ -1782,11 +1782,11 @@ void render_target::add_container_primitives(render_primitive_list &list, const
prim->color.b = container.apply_brightness_contrast_gamma_fp(prim->color.b);
// no texture -- set the basic flags
- prim->texture.base = NULL;
+ prim->texture.base = nullptr;
prim->flags = (curitem->flags() &~ PRIMFLAG_BLENDMODE_MASK) | PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
// apply clipping
- clipped = render_clip_quad(&prim->bounds, &cliprect, NULL);
+ clipped = render_clip_quad(&prim->bounds, &cliprect, nullptr);
}
break;
}
@@ -1796,7 +1796,7 @@ void render_target::add_container_primitives(render_primitive_list &list, const
}
// add the overlay if it exists
- if (container.overlay() != NULL && m_layerconfig.screen_overlay_enabled())
+ if (container.overlay() != nullptr && m_layerconfig.screen_overlay_enabled())
{
INT32 width, height;
@@ -1840,7 +1840,7 @@ void render_target::add_element_primitives(render_primitive_list &list, const ob
// get a pointer to the relevant texture
render_texture *texture = element.state_texture(state);
- if (texture != NULL)
+ if (texture != nullptr)
{
render_primitive *prim = list.alloc(render_primitive::QUAD);
@@ -1898,7 +1898,7 @@ bool render_target::map_point_internal(INT32 target_x, INT32 target_y, render_co
// default to point not mapped
mapped_x = -1.0;
mapped_y = -1.0;
- mapped_input_port = NULL;
+ mapped_input_port = nullptr;
mapped_input_mask = 0;
// convert target coordinates to float
@@ -1910,7 +1910,7 @@ bool render_target::map_point_internal(INT32 target_x, INT32 target_y, render_co
target_fy = (float)target_y / m_height;
}
// explicitly check for the UI container
- if (container != NULL && container == &m_manager.ui_container())
+ if (container != nullptr && container == &m_manager.ui_container())
{
// this hit test went against the UI container
if (target_fx >= 0.0f && target_fx < 1.0f && target_fy >= 0.0f && target_fy < 1.0f)
@@ -1931,13 +1931,13 @@ bool render_target::map_point_internal(INT32 target_x, INT32 target_y, render_co
if (m_curview->layer_enabled(layer))
{
// iterate over items in the layer
- for (layout_view::item *item = m_curview->first_item(layer); item != NULL; item = item->next())
+ for (layout_view::item *item = m_curview->first_item(layer); item != nullptr; item = item->next())
{
bool checkit;
// if we're looking for a particular container, verify that we have the right one
- if (container != NULL)
- checkit = (item->screen() != NULL && &item->screen()->container() == container);
+ if (container != nullptr)
+ checkit = (item->screen() != nullptr && &item->screen()->container() == container);
// otherwise, assume we're looking for an input
else
@@ -1967,12 +1967,12 @@ bool render_target::map_point_internal(INT32 target_x, INT32 target_y, render_co
layout_view *render_target::view_by_index(int index) const
{
// scan the list of views within each layout, skipping those that don't apply
- for (layout_file *file = m_filelist.first(); file != NULL; file = file->next())
- for (layout_view *view = file->first_view(); view != NULL; view = view->next())
+ for (layout_file *file = m_filelist.first(); file != nullptr; file = file->next())
+ for (layout_view *view = file->first_view(); view != nullptr; view = view->next())
if (!(m_flags & RENDER_CREATE_NO_ART) || !view->has_art())
if (index-- == 0)
return view;
- return NULL;
+ return nullptr;
}
@@ -1987,8 +1987,8 @@ int render_target::view_index(layout_view &targetview) const
int index = 0;
// scan the list of views within each layout, skipping those that don't apply
- for (layout_file *file = m_filelist.first(); file != NULL; file = file->next())
- for (layout_view *view = file->first_view(); view != NULL; view = view->next())
+ for (layout_file *file = m_filelist.first(); file != nullptr; file = file->next())
+ for (layout_view *view = file->first_view(); view != nullptr; view = view->next())
if (!(m_flags & RENDER_CREATE_NO_ART) || !view->has_art())
{
if (&targetview == view)
@@ -2006,12 +2006,12 @@ int render_target::view_index(layout_view &targetview) const
void render_target::config_load(xml_data_node &targetnode)
{
// find the view
- const char *viewname = xml_get_attribute_string(&targetnode, "view", NULL);
- if (viewname != NULL)
+ const char *viewname = xml_get_attribute_string(&targetnode, "view", nullptr);
+ if (viewname != nullptr)
for (int viewnum = 0; viewnum < 1000; viewnum++)
{
const char *testname = view_name(viewnum);
- if (testname == NULL)
+ if (testname == nullptr)
break;
if (!strcmp(viewname, testname))
{
@@ -2307,7 +2307,7 @@ void render_target::add_clear_extents(render_primitive_list &list)
render_primitive *prim = list.alloc(render_primitive::QUAD);
set_render_bounds_xy(&prim->bounds, (float)x0, (float)y0, (float)x1, (float)y1);
set_render_color(&prim->color, 1.0f, 0.0f, 0.0f, 0.0f);
- prim->texture.base = NULL;
+ prim->texture.base = nullptr;
prim->flags = PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA);
clearlist.append(*prim);
}
@@ -2338,7 +2338,7 @@ void render_target::add_clear_and_optimize_primitive_list(render_primitive_list
init_clear_extents();
// scan the list until we hit an intersection quad or a line
- for (render_primitive *prim = list.first(); prim != NULL; prim = prim->next())
+ for (render_primitive *prim = list.first(); prim != nullptr; prim = prim->next())
{
// switch off the type
switch (prim->type)
@@ -2361,7 +2361,7 @@ void render_target::add_clear_and_optimize_primitive_list(render_primitive_list
{
// RGB multiply will multiply against 0, leaving nothing
set_render_color(&prim->color, 1.0f, 0.0f, 0.0f, 0.0f);
- prim->texture.base = NULL;
+ prim->texture.base = nullptr;
prim->flags = (prim->flags & ~PRIMFLAG_BLENDMODE_MASK) | PRIMFLAG_BLENDMODE(BLENDMODE_NONE);
}
else
@@ -2400,7 +2400,7 @@ done:
render_manager::render_manager(running_machine &machine)
: m_machine(machine),
- m_ui_target(NULL),
+ m_ui_target(nullptr),
m_live_textures(0),
m_ui_container(global_alloc(render_container(*this)))
{
@@ -2409,7 +2409,7 @@ render_manager::render_manager(running_machine &machine)
// create one container per screen
screen_device_iterator iter(machine.root_device());
- for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
+ for (screen_device *screen = iter.first(); screen != nullptr; screen = iter.next())
screen->set_container(*container_alloc(screen));
}
@@ -2436,7 +2436,7 @@ render_manager::~render_manager()
bool render_manager::is_live(screen_device &screen) const
{
// iterate over all live targets and or together their screen masks
- for (render_target *target = m_targetlist.first(); target != NULL; target = target->next())
+ for (render_target *target = m_targetlist.first(); target != nullptr; target = target->next())
if (!target->hidden() && target->view_screens(target->view()).contains(screen))
return true;
return false;
@@ -2452,7 +2452,7 @@ float render_manager::max_update_rate() const
{
// iterate over all live targets and or together their screen masks
float minimum = 0;
- for (render_target *target = m_targetlist.first(); target != NULL; target = target->next())
+ for (render_target *target = m_targetlist.first(); target != nullptr; target = target->next())
if (target->max_update_rate() != 0)
{
if (minimum == 0)
@@ -2481,7 +2481,7 @@ render_target *render_manager::target_alloc(const char *layoutfile, UINT32 flags
void render_manager::target_free(render_target *target)
{
- if (target != NULL)
+ if (target != nullptr)
m_targetlist.remove(*target);
}
@@ -2493,11 +2493,11 @@ void render_manager::target_free(render_target *target)
render_target *render_manager::target_by_index(int index) const
{
// count up the targets until we hit the requested index
- for (render_target *target = m_targetlist.first(); target != NULL; target = target->next())
+ for (render_target *target = m_targetlist.first(); target != nullptr; target = target->next())
if (!target->hidden())
if (index-- == 0)
return target;
- return NULL;
+ return nullptr;
}
@@ -2511,7 +2511,7 @@ float render_manager::ui_aspect(render_container *rc)
int orient;
float aspect;
- if (rc == m_ui_container || rc == NULL) {
+ if (rc == m_ui_container || rc == nullptr) {
// ui container, aggregated multi-screen target
orient = orientation_add(m_ui_target->orientation(), m_ui_container->orientation());
@@ -2565,7 +2565,7 @@ render_texture *render_manager::texture_alloc(texture_scaler_func scaler, void *
void render_manager::texture_free(render_texture *texture)
{
- if (texture != NULL)
+ if (texture != nullptr)
{
m_live_textures--;
texture->release();
@@ -2602,11 +2602,11 @@ void render_manager::font_free(render_font *font)
void render_manager::invalidate_all(void *refptr)
{
// permit NULL
- if (refptr == NULL)
+ if (refptr == nullptr)
return;
// loop over targets
- for (render_target *target = m_targetlist.first(); target != NULL; target = target->next())
+ for (render_target *target = m_targetlist.first(); target != nullptr; target = target->next())
target->invalidate_all(refptr);
}
@@ -2617,7 +2617,7 @@ void render_manager::invalidate_all(void *refptr)
void render_manager::resolve_tags()
{
- for (render_target *target = m_targetlist.first(); target != NULL; target = target->next())
+ for (render_target *target = m_targetlist.first(); target != nullptr; target = target->next())
{
target->resolve_tags();
}
@@ -2630,8 +2630,8 @@ void render_manager::resolve_tags()
render_container *render_manager::container_alloc(screen_device *screen)
{
- render_container *container = global_alloc(render_container(*this, screen));
- if (screen != NULL)
+ auto container = global_alloc(render_container(*this, screen));
+ if (screen != nullptr)
m_screen_container_list.append(*container);
return container;
}
@@ -2659,15 +2659,15 @@ void render_manager::config_load(int config_type, xml_data_node *parentnode)
return;
// might not have any data
- if (parentnode == NULL)
+ if (parentnode == nullptr)
return;
// check the UI target
xml_data_node *uinode = xml_get_sibling(parentnode->child, "interface");
- if (uinode != NULL)
+ if (uinode != nullptr)
{
render_target *target = target_by_index(xml_get_attribute_int(uinode, "target", 0));
- if (target != NULL)
+ if (target != nullptr)
set_ui_target(*target);
}
@@ -2675,7 +2675,7 @@ void render_manager::config_load(int config_type, xml_data_node *parentnode)
for (xml_data_node *targetnode = xml_get_sibling(parentnode->child, "target"); targetnode; targetnode = xml_get_sibling(targetnode->next, "target"))
{
render_target *target = target_by_index(xml_get_attribute_int(targetnode, "index", -1));
- if (target != NULL)
+ if (target != nullptr)
target->config_load(*targetnode);
}
@@ -2721,8 +2721,8 @@ void render_manager::config_save(int config_type, xml_data_node *parentnode)
if (m_ui_target->index() != 0)
{
// create a node for it
- xml_data_node *uinode = xml_add_child(parentnode, "interface", NULL);
- if (uinode != NULL)
+ xml_data_node *uinode = xml_add_child(parentnode, "interface", nullptr);
+ if (uinode != nullptr)
xml_set_attribute_int(uinode, "target", m_ui_target->index());
}
@@ -2731,22 +2731,22 @@ void render_manager::config_save(int config_type, xml_data_node *parentnode)
{
// get this target and break when we fail
render_target *target = target_by_index(targetnum);
- if (target == NULL)
+ if (target == nullptr)
break;
// create a node
- xml_data_node *targetnode = xml_add_child(parentnode, "target", NULL);
- if (targetnode != NULL && !target->config_save(*targetnode))
+ xml_data_node *targetnode = xml_add_child(parentnode, "target", nullptr);
+ if (targetnode != nullptr && !target->config_save(*targetnode))
xml_delete_node(targetnode);
}
// iterate over screen containers
int scrnum = 0;
- for (render_container *container = m_screen_container_list.first(); container != NULL; container = container->next(), scrnum++)
+ for (render_container *container = m_screen_container_list.first(); container != nullptr; container = container->next(), scrnum++)
{
// create a node
- xml_data_node *screennode = xml_add_child(parentnode, "screen", NULL);
- if (screennode != NULL)
+ xml_data_node *screennode = xml_add_child(parentnode, "screen", nullptr);
+ if (screennode != nullptr)
{
bool changed = false;
diff --git a/src/emu/render.h b/src/emu/render.h
index 7b675d04177..e4136ded0d1 100644
--- a/src/emu/render.h
+++ b/src/emu/render.h
@@ -223,7 +223,7 @@ class render_screen_list
public:
// construction/destruction
item(screen_device &screen)
- : m_next(NULL),
+ : m_next(nullptr),
m_screen(screen) { }
// state
@@ -243,7 +243,7 @@ public:
int contains(screen_device &screen) const
{
int count = 0;
- for (item *curitem = m_list.first(); curitem != NULL; curitem = curitem->m_next)
+ for (item *curitem = m_list.first(); curitem != nullptr; curitem = curitem->m_next)
if (&curitem->m_screen == &screen) count++;
return count;
}
@@ -308,8 +308,8 @@ public:
type(),
flags(0),
width(0),
- container(NULL),
- m_next(NULL)
+ container(nullptr),
+ m_next(nullptr)
{}
// render primitive types
@@ -408,7 +408,7 @@ class render_texture
~render_texture();
// reset before re-use
- void reset(render_manager &manager, texture_scaler_func scaler = NULL, void *param = NULL);
+ void reset(render_manager &manager, texture_scaler_func scaler = nullptr, void *param = nullptr);
// release resources when freed
void release();
@@ -468,7 +468,7 @@ class render_container
friend class render_target;
// construction/destruction
- render_container(render_manager &manager, screen_device *screen = NULL);
+ render_container(render_manager &manager, screen_device *screen = nullptr);
~render_container();
public:
@@ -514,13 +514,13 @@ public:
void add_quad(float x0, float y0, float x1, float y1, rgb_t argb, render_texture *texture, UINT32 flags);
void add_char(float x0, float y0, float height, float aspect, rgb_t argb, render_font &font, UINT16 ch);
void add_point(float x0, float y0, float diameter, rgb_t argb, UINT32 flags) { add_line(x0, y0, x0, y0, diameter, argb, flags); }
- void add_rect(float x0, float y0, float x1, float y1, rgb_t argb, UINT32 flags) { add_quad(x0, y0, x1, y1, argb, NULL, flags); }
+ void add_rect(float x0, float y0, float x1, float y1, rgb_t argb, UINT32 flags) { add_quad(x0, y0, x1, y1, argb, nullptr, flags); }
// brightness/contrast/gamma helpers
bool has_brightness_contrast_gamma_changes() const { return (m_user.m_brightness != 1.0f || m_user.m_contrast != 1.0f || m_user.m_gamma != 1.0f); }
UINT8 apply_brightness_contrast_gamma(UINT8 value);
float apply_brightness_contrast_gamma_fp(float value);
- const rgb_t *bcg_lookup_table(int texformat, palette_t *palette = NULL);
+ const rgb_t *bcg_lookup_table(int texformat, palette_t *palette = nullptr);
private:
// an item describes a high level primitive that is added to a container
@@ -530,7 +530,7 @@ private:
friend class simple_list<item>;
public:
- item() : m_next(NULL), m_type(0), m_flags(0), m_internal(0), m_width(0), m_texture(NULL) { }
+ item() : m_next(nullptr), m_type(0), m_flags(0), m_internal(0), m_width(0), m_texture(nullptr) { }
// getters
item *next() const { return m_next; }
@@ -873,7 +873,7 @@ class render_target
friend class render_manager;
// construction/destruction
- render_target(render_manager &manager, const char *layoutfile = NULL, UINT32 flags = 0);
+ render_target(render_manager &manager, const char *layoutfile = nullptr, UINT32 flags = 0);
~render_target();
public:
@@ -1024,25 +1024,25 @@ public:
float max_update_rate() const;
// targets
- render_target *target_alloc(const char *layoutfile = NULL, UINT32 flags = 0);
+ render_target *target_alloc(const char *layoutfile = nullptr, UINT32 flags = 0);
void target_free(render_target *target);
render_target *first_target() const { return m_targetlist.first(); }
render_target *target_by_index(int index) const;
// UI targets
- render_target &ui_target() const { assert(m_ui_target != NULL); return *m_ui_target; }
+ render_target &ui_target() const { assert(m_ui_target != nullptr); return *m_ui_target; }
void set_ui_target(render_target &target) { m_ui_target = &target; }
- float ui_aspect(render_container *rc = NULL);
+ float ui_aspect(render_container *rc = nullptr);
// UI containers
- render_container &ui_container() const { assert(m_ui_container != NULL); return *m_ui_container; }
+ render_container &ui_container() const { assert(m_ui_container != nullptr); return *m_ui_container; }
// textures
- render_texture *texture_alloc(texture_scaler_func scaler = NULL, void *param = NULL);
+ render_texture *texture_alloc(texture_scaler_func scaler = nullptr, void *param = nullptr);
void texture_free(render_texture *texture);
// fonts
- render_font *font_alloc(const char *filename = NULL);
+ render_font *font_alloc(const char *filename = nullptr);
void font_free(render_font *font);
// reference tracking
@@ -1053,7 +1053,7 @@ public:
private:
// containers
- render_container *container_alloc(screen_device *screen = NULL);
+ render_container *container_alloc(screen_device *screen = nullptr);
void container_free(render_container *container);
// config callbacks
diff --git a/src/emu/rendersw.inc b/src/emu/rendersw.inc
index 3ab326a5459..a7dcbac0191 100644
--- a/src/emu/rendersw.inc
+++ b/src/emu/rendersw.inc
@@ -610,7 +610,7 @@ private:
INT32 endx = setup.endx;
// ensure all parameters are valid
- assert(prim.texture.palette != NULL);
+ assert(prim.texture.palette != nullptr);
// fast case: no coloring, no alpha
if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a))
@@ -718,7 +718,7 @@ private:
INT32 endx = setup.endx;
// ensure all parameters are valid
- assert(prim.texture.palette != NULL);
+ assert(prim.texture.palette != nullptr);
// fast case: no coloring, no alpha
if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a))
@@ -811,7 +811,7 @@ private:
INT32 endx = setup.endx;
// ensure all parameters are valid
- assert(prim.texture.palette != NULL);
+ assert(prim.texture.palette != nullptr);
// fast case: no coloring, no alpha
if (prim.color.r >= 1.0f && prim.color.g >= 1.0f && prim.color.b >= 1.0f && is_opaque(prim.color.a))
@@ -918,7 +918,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -965,7 +965,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1022,7 +1022,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1088,7 +1088,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1139,7 +1139,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1196,7 +1196,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1262,7 +1262,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1325,7 +1325,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1396,7 +1396,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1467,7 +1467,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1546,7 +1546,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1601,7 +1601,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1665,7 +1665,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1738,7 +1738,7 @@ private:
INT32 curv = setup.startv + (y - setup.starty) * setup.dvdy;
// no lookup case
- if (palbase == NULL)
+ if (palbase == nullptr)
{
// loop over cols
for (INT32 x = setup.startx; x < endx; x++)
@@ -1910,7 +1910,7 @@ public:
static void draw_primitives(const render_primitive_list &primlist, void *dstdata, UINT32 width, UINT32 height, UINT32 pitch)
{
// loop over the list and render each element
- for (const render_primitive *prim = primlist.first(); prim != NULL; prim = prim->next())
+ for (const render_primitive *prim = primlist.first(); prim != nullptr; prim = prim->next())
switch (prim->type)
{
case render_primitive::LINE:
diff --git a/src/emu/rendfont.cpp b/src/emu/rendfont.cpp
index dea9f32db4a..63ff7dc47de 100644
--- a/src/emu/rendfont.cpp
+++ b/src/emu/rendfont.cpp
@@ -33,7 +33,7 @@ inline const char *next_line(const char *ptr)
// if we hit the end, return NULL
if (*ptr == 0)
- return NULL;
+ return nullptr;
// eat the trailing linefeed if present
if (*++ptr == 10)
@@ -83,15 +83,15 @@ render_font::render_font(render_manager &manager, const char *filename)
m_yoffs(0),
m_scale(1.0f),
m_rawsize(0),
- m_osdfont(NULL)
+ m_osdfont(nullptr)
{
memset(m_glyphs, 0, sizeof(m_glyphs));
// if this is an OSD font, we're done
- if (filename != NULL)
+ if (filename != nullptr)
{
m_osdfont = manager.machine().osd().font_alloc();
- if (m_osdfont != NULL)
+ if (m_osdfont != nullptr)
{
if (m_osdfont->open(manager.machine().options().font_path(), filename, m_height))
{
@@ -100,16 +100,16 @@ render_font::render_font(render_manager &manager, const char *filename)
return;
}
global_free(m_osdfont);
- m_osdfont = NULL;
+ m_osdfont = nullptr;
}
}
// if the filename is 'default' default to 'ui.bdf' for backwards compatibility
- if (filename != NULL && core_stricmp(filename, "default") == 0)
+ if (filename != nullptr && core_stricmp(filename, "default") == 0)
filename = "ui.bdf";
// attempt to load the cached version of the font first
- if (filename != NULL && load_cached_bdf(filename))
+ if (filename != nullptr && load_cached_bdf(filename))
return;
// load the raw data instead
@@ -127,19 +127,19 @@ render_font::render_font(render_manager &manager, const char *filename)
render_font::~render_font()
{
// free all the subtables
- for (int tablenum = 0; tablenum < 256; tablenum++)
- if (m_glyphs[tablenum])
+ for (auto & elem : m_glyphs)
+ if (elem)
{
for (unsigned int charnum = 0; charnum < 256; charnum++)
{
- glyph &gl = m_glyphs[tablenum][charnum];
+ glyph &gl = elem[charnum];
m_manager.texture_free(gl.texture);
}
- delete[] m_glyphs[tablenum];
+ delete[] elem;
}
// release the OSD font
- if (m_osdfont != NULL)
+ if (m_osdfont != nullptr)
{
m_osdfont->close();
global_free(m_osdfont);
@@ -178,7 +178,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
else
{
// punt if nothing there
- if (gl.bmwidth == 0 || gl.bmheight == 0 || gl.rawdata == NULL)
+ if (gl.bmwidth == 0 || gl.bmheight == 0 || gl.rawdata == nullptr)
return;
// allocate a new bitmap of the size we need
@@ -191,7 +191,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
for (int y = 0; y < gl.bmheight; y++)
{
int desty = y + m_height + m_yoffs - gl.yoffs - gl.bmheight;
- UINT32 *dest = (desty >= 0 && desty < m_height) ? &gl.bitmap.pix32(desty) : NULL;
+ UINT32 *dest = (desty >= 0 && desty < m_height) ? &gl.bitmap.pix32(desty) : nullptr;
// text format
if (m_format == FF_TEXT)
@@ -214,7 +214,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
}
// expand the four bits
- if (dest != NULL)
+ if (dest != nullptr)
{
*dest++ = (bits & 8) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
*dest++ = (bits & 4) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
@@ -234,7 +234,7 @@ void render_font::char_expand(unicode_char chnum, glyph &gl)
{
if (accumbit == 7)
accum = *ptr++;
- if (dest != NULL)
+ if (dest != nullptr)
*dest++ = (accum & (1 << accumbit)) ? rgb_t(0xff,0xff,0xff,0xff) : rgb_t(0x00,0xff,0xff,0xff);
accumbit = (accumbit - 1) & 7;
}
@@ -296,7 +296,7 @@ void render_font::get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height
return;
// if no texture, fill the target
- if (gl.texture == NULL)
+ if (gl.texture == nullptr)
{
dest.fill(0);
return;
@@ -304,7 +304,7 @@ void render_font::get_scaled_bitmap_and_bounds(bitmap_argb32 &dest, float height
// scale the font
bitmap_argb32 tempbitmap(&dest.pix(0), bounds.width(), bounds.height(), dest.rowpixels());
- render_texture::hq_scale(tempbitmap, gl.bitmap, gl.bitmap.cliprect(), NULL);
+ render_texture::hq_scale(tempbitmap, gl.bitmap, gl.bitmap.cliprect(), nullptr);
}
@@ -450,7 +450,7 @@ bool render_font::load_bdf()
// first find the FONTBOUNDINGBOX tag
const char *ptr;
- for (ptr = &m_rawdata[0]; ptr != NULL; ptr = next_line(ptr))
+ for (ptr = &m_rawdata[0]; ptr != nullptr; ptr = next_line(ptr))
{
// we only care about a tiny few fields
if (strncmp(ptr, "FONTBOUNDINGBOX ", 16) == 0)
@@ -467,7 +467,7 @@ bool render_font::load_bdf()
// now scan for characters
int charcount = 0;
- for ( ; ptr != NULL; ptr = next_line(ptr))
+ for ( ; ptr != nullptr; ptr = next_line(ptr))
{
// stop at ENDFONT
if (strncmp(ptr, "ENDFONT", 7) == 0)
@@ -477,12 +477,12 @@ bool render_font::load_bdf()
if (strncmp(ptr, "STARTCHAR ", 10) == 0)
{
int bmwidth = -1, bmheight = -1, xoffs = -1, yoffs = -1;
- const char *rawdata = NULL;
+ const char *rawdata = nullptr;
int charnum = -1;
int width = -1;
// scan for interesting per-character tags
- for ( ; ptr != NULL; ptr = next_line(ptr))
+ for ( ; ptr != nullptr; ptr = next_line(ptr))
{
// ENCODING tells us which character
if (strncmp(ptr, "ENCODING ", 9) == 0)
@@ -510,13 +510,13 @@ bool render_font::load_bdf()
else if (strncmp(ptr, "BITMAP", 6) == 0)
{
// stash the raw pointer and scan for the end of the character
- for (rawdata = ptr = next_line(ptr); ptr != NULL && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) { }
+ for (rawdata = ptr = next_line(ptr); ptr != nullptr && strncmp(ptr, "ENDCHAR", 7) != 0; ptr = next_line(ptr)) { }
break;
}
}
// if we have everything, allocate a new character
- if (charnum >= 0 && charnum < 65536 && rawdata != NULL && bmwidth >= 0 && bmheight >= 0)
+ if (charnum >= 0 && charnum < 65536 && rawdata != nullptr && bmwidth >= 0 && bmheight >= 0)
{
// if we don't have a subtable yet, make one
if (!m_glyphs[charnum / 256])
@@ -705,10 +705,10 @@ bool render_font::save_cached(const char *filename, UINT32 hash)
for (int y = 0; y < gl.bmheight; y++)
{
int desty = y + m_height + m_yoffs - gl.yoffs - gl.bmheight;
- const UINT32 *src = (desty >= 0 && desty < m_height) ? &gl.bitmap.pix32(desty) : NULL;
+ const UINT32 *src = (desty >= 0 && desty < m_height) ? &gl.bitmap.pix32(desty) : nullptr;
for (int x = 0; x < gl.bmwidth; x++)
{
- if (src != NULL && rgb_t(src[x]).a() != 0)
+ if (src != nullptr && rgb_t(src[x]).a() != 0)
accum |= 1 << accbit;
if (accbit-- == 0)
{
@@ -731,7 +731,7 @@ bool render_font::save_cached(const char *filename, UINT32 hash)
// free the bitmap and texture
m_manager.texture_free(gl.texture);
gl.bitmap.reset();
- gl.texture = NULL;
+ gl.texture = nullptr;
}
// compute the table entry
diff --git a/src/emu/rendfont.h b/src/emu/rendfont.h
index 13d06be7dd9..aced202260d 100644
--- a/src/emu/rendfont.h
+++ b/src/emu/rendfont.h
@@ -56,8 +56,8 @@ private:
: width(0),
xoffs(0), yoffs(0),
bmwidth(0), bmheight(0),
- rawdata(NULL),
- texture(NULL) { }
+ rawdata(nullptr),
+ texture(nullptr) { }
INT32 width; // width from this character to the next
INT32 xoffs, yoffs; // X and Y offset from baseline to top,left of bitmap
diff --git a/src/emu/rendlay.cpp b/src/emu/rendlay.cpp
index 7e90ed81d44..582ed75fef2 100644
--- a/src/emu/rendlay.cpp
+++ b/src/emu/rendlay.cpp
@@ -164,7 +164,7 @@ static int get_variable_value(running_machine &machine, const char *string, char
// screen 0 parameters
screen_device_iterator iter(machine.root_device());
int scrnum = 0;
- for (const screen_device *device = iter.first(); device != NULL; device = iter.next(), scrnum++)
+ for (const screen_device *device = iter.first(); device != nullptr; device = iter.next(), scrnum++)
{
// native X aspect factor
sprintf(temp, "~scr%dnativexaspect~", scrnum);
@@ -220,15 +220,15 @@ static int get_variable_value(running_machine &machine, const char *string, char
static const char *xml_get_attribute_string_with_subst(running_machine &machine, xml_data_node &node, const char *attribute, const char *defvalue)
{
- const char *str = xml_get_attribute_string(&node, attribute, NULL);
+ const char *str = xml_get_attribute_string(&node, attribute, nullptr);
static char buffer[1000];
// if nothing, just return the default
- if (str == NULL)
+ if (str == nullptr)
return defvalue;
// if no tildes, don't worry
- if (strchr(str, '~') == NULL)
+ if (strchr(str, '~') == nullptr)
return str;
// make a copy of the string, doing substitutions along the way
@@ -257,11 +257,11 @@ static const char *xml_get_attribute_string_with_subst(running_machine &machine,
static int xml_get_attribute_int_with_subst(running_machine &machine, xml_data_node &node, const char *attribute, int defvalue)
{
- const char *string = xml_get_attribute_string_with_subst(machine, node, attribute, NULL);
+ const char *string = xml_get_attribute_string_with_subst(machine, node, attribute, nullptr);
int value;
unsigned int uvalue;
- if (string == NULL)
+ if (string == nullptr)
return defvalue;
if (string[0] == '$')
return (sscanf(&string[1], "%X", &uvalue) == 1) ? uvalue : defvalue;
@@ -281,10 +281,10 @@ static int xml_get_attribute_int_with_subst(running_machine &machine, xml_data_n
static float xml_get_attribute_float_with_subst(running_machine &machine, xml_data_node &node, const char *attribute, float defvalue)
{
- const char *string = xml_get_attribute_string_with_subst(machine, node, attribute, NULL);
+ const char *string = xml_get_attribute_string_with_subst(machine, node, attribute, nullptr);
float value;
- if (string == NULL || sscanf(string, "%f", &value) != 1)
+ if (string == nullptr || sscanf(string, "%f", &value) != 1)
return defvalue;
return value;
}
@@ -297,7 +297,7 @@ static float xml_get_attribute_float_with_subst(running_machine &machine, xml_da
void parse_bounds(running_machine &machine, xml_data_node *boundsnode, render_bounds &bounds)
{
// skip if nothing
- if (boundsnode == NULL)
+ if (boundsnode == nullptr)
{
bounds.x0 = bounds.y0 = 0.0f;
bounds.x1 = bounds.y1 = 1.0f;
@@ -305,7 +305,7 @@ void parse_bounds(running_machine &machine, xml_data_node *boundsnode, render_bo
}
// parse out the data
- if (xml_get_attribute(boundsnode, "left") != NULL)
+ if (xml_get_attribute(boundsnode, "left") != nullptr)
{
// left/right/top/bottom format
bounds.x0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "left", 0.0f);
@@ -313,7 +313,7 @@ void parse_bounds(running_machine &machine, xml_data_node *boundsnode, render_bo
bounds.y0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "top", 0.0f);
bounds.y1 = xml_get_attribute_float_with_subst(machine, *boundsnode, "bottom", 1.0f);
}
- else if (xml_get_attribute(boundsnode, "x") != NULL)
+ else if (xml_get_attribute(boundsnode, "x") != nullptr)
{
// x/y/width/height format
bounds.x0 = xml_get_attribute_float_with_subst(machine, *boundsnode, "x", 0.0f);
@@ -338,7 +338,7 @@ void parse_bounds(running_machine &machine, xml_data_node *boundsnode, render_bo
void parse_color(running_machine &machine, xml_data_node *colornode, render_color &color)
{
// skip if nothing
- if (colornode == NULL)
+ if (colornode == nullptr)
{
color.r = color.g = color.b = color.a = 1.0f;
return;
@@ -366,7 +366,7 @@ void parse_color(running_machine &machine, xml_data_node *colornode, render_colo
static void parse_orientation(running_machine &machine, xml_data_node *orientnode, int &orientation)
{
// skip if nothing
- if (orientnode == NULL)
+ if (orientnode == nullptr)
{
orientation = ROT0;
return;
@@ -401,14 +401,14 @@ static void parse_orientation(running_machine &machine, xml_data_node *orientnod
//-------------------------------------------------
layout_element::layout_element(running_machine &machine, xml_data_node &elemnode, const char *dirname)
- : m_next(NULL),
+ : m_next(nullptr),
m_machine(machine),
m_defstate(0),
m_maxstate(0)
{
// extract the name
- const char *name = xml_get_attribute_string_with_subst(machine, elemnode, "name", NULL);
- if (name == NULL)
+ const char *name = xml_get_attribute_string_with_subst(machine, elemnode, "name", nullptr);
+ if (name == nullptr)
throw emu_fatalerror("All layout elements must have a name!\n");
m_name = name;
@@ -418,7 +418,7 @@ layout_element::layout_element(running_machine &machine, xml_data_node &elemnode
// parse components in order
bool first = true;
render_bounds bounds = { 0 };
- for (xml_data_node *compnode = elemnode.child; compnode != NULL; compnode = compnode->next)
+ for (xml_data_node *compnode = elemnode.child; compnode != nullptr; compnode = compnode->next)
{
// allocate a new component
component &newcomp = m_complist.append(*global_alloc(component(machine, *compnode, dirname)));
@@ -453,7 +453,7 @@ layout_element::layout_element(running_machine &machine, xml_data_node &elemnode
m_maxstate = 65536;
}
- if (m_complist.first() != NULL)
+ if (m_complist.first() != nullptr)
{
// determine the scale/offset for normalization
float xoffs = bounds.x0;
@@ -462,7 +462,7 @@ layout_element::layout_element(running_machine &machine, xml_data_node &elemnode
float yscale = 1.0f / (bounds.y1 - bounds.y0);
// normalize all the component bounds
- for (component *curcomp = m_complist.first(); curcomp != NULL; curcomp = curcomp->next())
+ for (component *curcomp = m_complist.first(); curcomp != nullptr; curcomp = curcomp->next())
{
curcomp->m_bounds.x0 = (curcomp->m_bounds.x0 - xoffs) * xscale;
curcomp->m_bounds.x1 = (curcomp->m_bounds.x1 - xoffs) * xscale;
@@ -494,7 +494,7 @@ layout_element::~layout_element()
render_texture *layout_element::state_texture(int state)
{
assert(state <= m_maxstate);
- if (m_elemtex[state].m_texture == NULL)
+ if (m_elemtex[state].m_texture == nullptr)
{
m_elemtex[state].m_element = this;
m_elemtex[state].m_state = state;
@@ -515,7 +515,7 @@ void layout_element::element_scale(bitmap_argb32 &dest, bitmap_argb32 &source, c
texture *elemtex = (texture *)param;
// iterate over components that are part of the current state
- for (component *curcomp = elemtex->m_element->m_complist.first(); curcomp != NULL; curcomp = curcomp->next())
+ for (component *curcomp = elemtex->m_element->m_complist.first(); curcomp != nullptr; curcomp = curcomp->next())
if (curcomp->m_state == -1 || curcomp->m_state == elemtex->m_state)
{
// get the local scaled bounds
@@ -541,8 +541,8 @@ void layout_element::element_scale(bitmap_argb32 &dest, bitmap_argb32 &source, c
//-------------------------------------------------
layout_element::texture::texture()
- : m_element(NULL),
- m_texture(NULL),
+ : m_element(nullptr),
+ m_texture(nullptr),
m_state(0)
{
}
@@ -554,7 +554,7 @@ layout_element::texture::texture()
layout_element::texture::~texture()
{
- if (m_element != NULL)
+ if (m_element != nullptr)
m_element->machine().render().texture_free(m_texture);
}
@@ -569,12 +569,12 @@ layout_element::texture::~texture()
//-------------------------------------------------
layout_element::component::component(running_machine &machine, xml_data_node &compnode, const char *dirname)
- : m_next(NULL),
+ : m_next(nullptr),
m_type(CTYPE_INVALID),
m_state(0)
{
- for (int i=0;i<MAX_BITMAPS;i++)
- m_hasalpha[i] = false;
+ for (auto & elem : m_hasalpha)
+ elem = false;
// fetch common data
m_state = xml_get_attribute_int_with_subst(machine, compnode, "state", -1);
@@ -585,7 +585,7 @@ layout_element::component::component(running_machine &machine, xml_data_node &co
if (strcmp(compnode.name, "image") == 0)
{
m_type = CTYPE_IMAGE;
- if (dirname != NULL)
+ if (dirname != nullptr)
m_dirname = dirname;
m_imagefile[0] = xml_get_attribute_string_with_subst(machine, compnode, "file", "");
m_alphafile[0] = xml_get_attribute_string_with_subst(machine, compnode, "alphafile", "");
@@ -644,7 +644,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
- if (dirname != NULL)
+ if (dirname != nullptr)
m_dirname = dirname;
for (int i=0;i<m_numstops;i++)
@@ -1310,7 +1310,7 @@ void layout_element::component::draw_beltreel(running_machine &machine, bitmap_a
void layout_element::component::load_bitmap()
{
// load the basic bitmap
- assert(m_file[0] != NULL);
+ assert(m_file[0] != nullptr);
m_hasalpha[0] = render_load_png(m_bitmap[0], *m_file[0], m_dirname.c_str(), m_imagefile[0].c_str());
// load the alpha bitmap if specified
@@ -1339,7 +1339,7 @@ void layout_element::component::load_bitmap()
void layout_element::component::load_reel_bitmap(int number)
{
// load the basic bitmap
- assert(m_file != NULL);
+ assert(m_file != nullptr);
/*m_hasalpha[number] = */ render_load_png(m_bitmap[number], *m_file[number], m_dirname.c_str(), m_imagefile[number].c_str());
// load the alpha bitmap if specified
@@ -2130,7 +2130,7 @@ void layout_element::component::apply_skew(bitmap_argb32 &dest, int skewwidth)
//-------------------------------------------------
layout_view::layout_view(running_machine &machine, xml_data_node &viewnode, simple_list<layout_element> &elemlist)
- : m_next(NULL),
+ : m_next(nullptr),
m_aspect(1.0f),
m_scraspect(1.0f)
{
@@ -2140,31 +2140,31 @@ layout_view::layout_view(running_machine &machine, xml_data_node &viewnode, simp
// if we have a bounds item, load it
xml_data_node *boundsnode = xml_get_sibling(viewnode.child, "bounds");
m_expbounds.x0 = m_expbounds.y0 = m_expbounds.x1 = m_expbounds.y1 = 0;
- if (boundsnode != NULL)
+ if (boundsnode != nullptr)
parse_bounds(machine, xml_get_sibling(boundsnode, "bounds"), m_expbounds);
// load backdrop items
- for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "backdrop"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "backdrop"))
+ for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "backdrop"); itemnode != nullptr; itemnode = xml_get_sibling(itemnode->next, "backdrop"))
m_backdrop_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
// load screen items
- for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "screen"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "screen"))
+ for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "screen"); itemnode != nullptr; itemnode = xml_get_sibling(itemnode->next, "screen"))
m_screen_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
// load overlay items
- for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "overlay"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "overlay"))
+ for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "overlay"); itemnode != nullptr; itemnode = xml_get_sibling(itemnode->next, "overlay"))
m_overlay_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
// load bezel items
- for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "bezel"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "bezel"))
+ for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "bezel"); itemnode != nullptr; itemnode = xml_get_sibling(itemnode->next, "bezel"))
m_bezel_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
// load cpanel items
- for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "cpanel"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "cpanel"))
+ for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "cpanel"); itemnode != nullptr; itemnode = xml_get_sibling(itemnode->next, "cpanel"))
m_cpanel_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
// load marquee items
- for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "marquee"); itemnode != NULL; itemnode = xml_get_sibling(itemnode->next, "marquee"))
+ for (xml_data_node *itemnode = xml_get_sibling(viewnode.child, "marquee"); itemnode != nullptr; itemnode = xml_get_sibling(itemnode->next, "marquee"))
m_marquee_list.append(*global_alloc(item(machine, *itemnode, elemlist)));
// recompute the data for the view based on a default layer config
@@ -2196,7 +2196,7 @@ layout_view::item *layout_view::first_item(item_layer layer) const
case ITEM_LAYER_BEZEL: return m_bezel_list.first();
case ITEM_LAYER_CPANEL: return m_cpanel_list.first();
case ITEM_LAYER_MARQUEE: return m_marquee_list.first();
- default: return NULL;
+ default: return nullptr;
}
}
@@ -2231,7 +2231,7 @@ void layout_view::recompute(render_layer_config layerconfig)
// only do it if requested
if (m_layenabled[layer])
- for (item *curitem = first_item(layer); curitem != NULL; curitem = curitem->next())
+ for (item *curitem = first_item(layer); curitem != nullptr; curitem = curitem->next())
{
// accumulate bounds
if (first)
@@ -2241,7 +2241,7 @@ void layout_view::recompute(render_layer_config layerconfig)
first = false;
// accumulate screen bounds
- if (curitem->m_screen != NULL)
+ if (curitem->m_screen != nullptr)
{
if (scrfirst)
m_scrbounds = curitem->m_rawbounds;
@@ -2292,7 +2292,7 @@ void layout_view::recompute(render_layer_config layerconfig)
// normalize all the item bounds
for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; ++layer)
- for (item *curitem = first_item(layer); curitem != NULL; curitem = curitem->next())
+ for (item *curitem = first_item(layer); curitem != nullptr; curitem = curitem->next())
{
curitem->m_bounds.x0 = target_bounds.x0 + (curitem->m_rawbounds.x0 - xoffs) * xscale;
curitem->m_bounds.x1 = target_bounds.x0 + (curitem->m_rawbounds.x1 - xoffs) * xscale;
@@ -2310,7 +2310,7 @@ void layout_view::resolve_tags()
{
for (item_layer layer = ITEM_LAYER_FIRST; layer < ITEM_LAYER_MAX; ++layer)
{
- for (item *curitem = first_item(layer); curitem != NULL; curitem = curitem->next())
+ for (item *curitem = first_item(layer); curitem != nullptr; curitem = curitem->next())
{
curitem->resolve_tags();
}
@@ -2328,11 +2328,11 @@ void layout_view::resolve_tags()
//-------------------------------------------------
layout_view::item::item(running_machine &machine, xml_data_node &itemnode, simple_list<layout_element> &elemlist)
- : m_next(NULL),
- m_element(NULL),
- m_input_port(NULL),
+ : m_next(nullptr),
+ m_element(nullptr),
+ m_input_port(nullptr),
m_input_mask(0),
- m_screen(NULL),
+ m_screen(nullptr),
m_orientation(ROT0)
{
// allocate a copy of the output name
@@ -2342,16 +2342,16 @@ layout_view::item::item(running_machine &machine, xml_data_node &itemnode, simpl
m_input_tag = xml_get_attribute_string_with_subst(machine, itemnode, "inputtag", "");
// find the associated element
- const char *name = xml_get_attribute_string_with_subst(machine, itemnode, "element", NULL);
- if (name != NULL)
+ const char *name = xml_get_attribute_string_with_subst(machine, itemnode, "element", nullptr);
+ if (name != nullptr)
{
// search the list of elements for a match
- for (m_element = elemlist.first(); m_element != NULL; m_element = m_element->next())
+ for (m_element = elemlist.first(); m_element != nullptr; m_element = m_element->next())
if (strcmp(name, m_element->name()) == 0)
break;
// error if not found
- if (m_element == NULL)
+ if (m_element == nullptr)
throw emu_fatalerror("Unable to find layout element %s", name);
}
@@ -2363,7 +2363,7 @@ layout_view::item::item(running_machine &machine, xml_data_node &itemnode, simpl
m_screen = iter.byindex(index);
}
m_input_mask = xml_get_attribute_int_with_subst(machine, itemnode, "inputmask", 0);
- if (m_output_name[0] != 0 && m_element != NULL)
+ if (m_output_name[0] != 0 && m_element != nullptr)
output_set_value(m_output_name.c_str(), m_element->default_state());
parse_bounds(machine, xml_get_sibling(itemnode.child, "bounds"), m_rawbounds);
parse_color(machine, xml_get_sibling(itemnode.child, "color"), m_color);
@@ -2372,12 +2372,12 @@ layout_view::item::item(running_machine &machine, xml_data_node &itemnode, simpl
// sanity checks
if (strcmp(itemnode.name, "screen") == 0)
{
- if (m_screen == NULL)
+ if (m_screen == nullptr)
throw emu_fatalerror("Layout references invalid screen index %d", index);
}
else
{
- if (m_element == NULL)
+ if (m_element == nullptr)
throw emu_fatalerror("Layout item of type %s require an element tag", itemnode.name);
}
@@ -2404,7 +2404,7 @@ layout_view::item::~item()
render_container *layout_view::item::screen_container(running_machine &machine) const
{
- return (m_screen != NULL) ? &m_screen->container() : NULL;
+ return (m_screen != nullptr) ? &m_screen->container() : nullptr;
}
@@ -2416,7 +2416,7 @@ int layout_view::item::state() const
{
int state = 0;
- assert(m_element != NULL);
+ assert(m_element != nullptr);
// if configured to an output, fetch the output value
if (m_output_name[0] != 0)
@@ -2425,10 +2425,10 @@ int layout_view::item::state() const
// if configured to an input, fetch the input value
else if (m_input_tag[0] != 0)
{
- if (m_input_port != NULL)
+ if (m_input_port != nullptr)
{
ioport_field *field = m_input_port->field(m_input_mask);
- if (field != NULL)
+ if (field != nullptr)
state = ((m_input_port->read() ^ field->defvalue()) & m_input_mask) ? 1 : 0;
}
}
@@ -2460,11 +2460,11 @@ void layout_view::item::resolve_tags()
//-------------------------------------------------
layout_file::layout_file(running_machine &machine, xml_data_node &rootnode, const char *dirname)
- : m_next(NULL)
+ : m_next(nullptr)
{
// find the layout node
xml_data_node *mamelayoutnode = xml_get_sibling(rootnode.child, "mamelayout");
- if (mamelayoutnode == NULL)
+ if (mamelayoutnode == nullptr)
throw emu_fatalerror("Invalid XML file: missing mamelayout node");
// validate the config data version
@@ -2473,11 +2473,11 @@ layout_file::layout_file(running_machine &machine, xml_data_node &rootnode, cons
throw emu_fatalerror("Invalid XML file: unsupported version");
// parse all the elements
- for (xml_data_node *elemnode = xml_get_sibling(mamelayoutnode->child, "element"); elemnode != NULL; elemnode = xml_get_sibling(elemnode->next, "element"))
+ for (xml_data_node *elemnode = xml_get_sibling(mamelayoutnode->child, "element"); elemnode != nullptr; elemnode = xml_get_sibling(elemnode->next, "element"))
m_elemlist.append(*global_alloc(layout_element(machine, *elemnode, dirname)));
// parse all the views
- for (xml_data_node *viewnode = xml_get_sibling(mamelayoutnode->child, "view"); viewnode != NULL; viewnode = xml_get_sibling(viewnode->next, "view"))
+ for (xml_data_node *viewnode = xml_get_sibling(mamelayoutnode->child, "view"); viewnode != nullptr; viewnode = xml_get_sibling(viewnode->next, "view"))
m_viewlist.append(*global_alloc(layout_view(machine, *viewnode, m_elemlist)));
}
diff --git a/src/emu/rendutil.cpp b/src/emu/rendutil.cpp
index 872533583b5..1a487536455 100644
--- a/src/emu/rendutil.cpp
+++ b/src/emu/rendutil.cpp
@@ -370,7 +370,7 @@ int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_qu
{
float frac = (clip->y0 - bounds->y0) / (bounds->y1 - bounds->y0);
bounds->y0 = clip->y0;
- if (texcoords != NULL)
+ if (texcoords != nullptr)
{
texcoords->tl.u += (texcoords->bl.u - texcoords->tl.u) * frac;
texcoords->tl.v += (texcoords->bl.v - texcoords->tl.v) * frac;
@@ -384,7 +384,7 @@ int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_qu
{
float frac = (bounds->y1 - clip->y1) / (bounds->y1 - bounds->y0);
bounds->y1 = clip->y1;
- if (texcoords != NULL)
+ if (texcoords != nullptr)
{
texcoords->bl.u -= (texcoords->bl.u - texcoords->tl.u) * frac;
texcoords->bl.v -= (texcoords->bl.v - texcoords->tl.v) * frac;
@@ -398,7 +398,7 @@ int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_qu
{
float frac = (clip->x0 - bounds->x0) / (bounds->x1 - bounds->x0);
bounds->x0 = clip->x0;
- if (texcoords != NULL)
+ if (texcoords != nullptr)
{
texcoords->tl.u += (texcoords->tr.u - texcoords->tl.u) * frac;
texcoords->tl.v += (texcoords->tr.v - texcoords->tl.v) * frac;
@@ -412,7 +412,7 @@ int render_clip_quad(render_bounds *bounds, const render_bounds *clip, render_qu
{
float frac = (bounds->x1 - clip->x1) / (bounds->x1 - bounds->x0);
bounds->x1 = clip->x1;
- if (texcoords != NULL)
+ if (texcoords != nullptr)
{
texcoords->tr.u -= (texcoords->tr.u - texcoords->tl.u) * frac;
texcoords->tr.v -= (texcoords->tr.v - texcoords->tl.v) * frac;
@@ -536,7 +536,7 @@ bool render_load_png(bitmap_argb32 &bitmap, emu_file &file, const char *dirname,
// open the file
std::string fname;
- if (dirname == NULL)
+ if (dirname == nullptr)
fname.assign(filename);
else
fname.assign(dirname).append(PATH_SEPARATOR).append(filename);
diff --git a/src/emu/romload.cpp b/src/emu/romload.cpp
index a43adc4f58b..c5de902a482 100644
--- a/src/emu/romload.cpp
+++ b/src/emu/romload.cpp
@@ -37,7 +37,7 @@ class open_chd
public:
open_chd(const char *region)
- : m_next(NULL),
+ : m_next(nullptr),
m_region(region) { }
open_chd *next() const { return m_next; }
@@ -56,7 +56,7 @@ private:
struct romload_private
{
- running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
+ running_machine &machine() const { assert(m_machine != nullptr); return *m_machine; }
running_machine *m_machine; /* machine object where needed */
@@ -93,7 +93,7 @@ file_error common_process_file(emu_options &options, const char *location, const
{
file_error filerr;
- if (location != NULL && strcmp(location, "") != 0)
+ if (location != nullptr && strcmp(location, "") != 0)
filerr = image_file.open(location, PATH_SEPARATOR, ROM_GETNAME(romp), ext);
else
filerr = image_file.open(ROM_GETNAME(romp), ext);
@@ -114,7 +114,7 @@ file_error common_process_file(emu_options &options, const char *location, bool
if (filerr != FILERR_NONE)
{
global_free(*image_file);
- *image_file = NULL;
+ *image_file = nullptr;
}
return filerr;
}
@@ -131,10 +131,10 @@ file_error common_process_file(emu_options &options, const char *location, bool
chd_file *get_disk_handle(running_machine &machine, const char *region)
{
- for (open_chd *curdisk = machine.romload_data->chd_list.first(); curdisk != NULL; curdisk = curdisk->next())
+ for (open_chd *curdisk = machine.romload_data->chd_list.first(); curdisk != nullptr; curdisk = curdisk->next())
if (strcmp(curdisk->region(), region) == 0)
return &curdisk->chd();
- return NULL;
+ return nullptr;
}
@@ -145,7 +145,7 @@ chd_file *get_disk_handle(running_machine &machine, const char *region)
int set_disk_handle(running_machine &machine, const char *region, const char *fullpath)
{
- open_chd *chd = global_alloc(open_chd(region));
+ auto chd = global_alloc(open_chd(region));
chd_error err = chd->orig_chd().open(fullpath);
if (err == CHDERR_NONE)
machine.romload_data->chd_list.append(*chd);
@@ -170,7 +170,7 @@ const rom_entry *rom_first_region(const device_t &device)
const rom_entry *romp = device.rom_region();
while (romp && ROMENTRY_ISPARAMETER(romp))
romp++;
- return (romp != NULL && !ROMENTRY_ISEND(romp)) ? romp : NULL;
+ return (romp != nullptr && !ROMENTRY_ISEND(romp)) ? romp : nullptr;
}
@@ -186,7 +186,7 @@ const rom_entry *rom_next_region(const rom_entry *romp)
romp++;
while (ROMENTRY_ISPARAMETER(romp))
romp++;
- return ROMENTRY_ISEND(romp) ? NULL : romp;
+ return ROMENTRY_ISEND(romp) ? nullptr : romp;
}
@@ -200,7 +200,7 @@ const rom_entry *rom_first_file(const rom_entry *romp)
romp++;
while (!ROMENTRY_ISFILE(romp) && !ROMENTRY_ISREGIONEND(romp))
romp++;
- return ROMENTRY_ISREGIONEND(romp) ? NULL : romp;
+ return ROMENTRY_ISREGIONEND(romp) ? nullptr : romp;
}
@@ -214,7 +214,7 @@ const rom_entry *rom_next_file(const rom_entry *romp)
romp++;
while (!ROMENTRY_ISFILE(romp) && !ROMENTRY_ISREGIONEND(romp))
romp++;
- return ROMENTRY_ISREGIONEND(romp) ? NULL : romp;
+ return ROMENTRY_ISREGIONEND(romp) ? nullptr : romp;
}
@@ -228,7 +228,7 @@ const rom_entry *rom_first_parameter(const device_t &device)
const rom_entry *romp = device.rom_region();
while (romp && !ROMENTRY_ISEND(romp) && !ROMENTRY_ISPARAMETER(romp))
romp++;
- return (romp != NULL && !ROMENTRY_ISEND(romp)) ? romp : NULL;
+ return (romp != nullptr && !ROMENTRY_ISEND(romp)) ? romp : nullptr;
}
@@ -242,7 +242,7 @@ const rom_entry *rom_next_parameter(const rom_entry *romp)
romp++;
while (!ROMENTRY_ISREGIONEND(romp) && !ROMENTRY_ISPARAMETER(romp))
romp++;
- return ROMENTRY_ISEND(romp) ? NULL : romp;
+ return ROMENTRY_ISEND(romp) ? nullptr : romp;
}
@@ -335,7 +335,7 @@ static void CLIB_DECL ATTR_PRINTF(1,2) debugload(const char *string, ...)
static void determine_bios_rom(romload_private *romdata, device_t *device, const char *specbios)
{
- const char *defaultname = NULL;
+ const char *defaultname = nullptr;
const rom_entry *rom;
int default_no = 1;
int bios_count = 0;
@@ -359,7 +359,7 @@ static void determine_bios_rom(romload_private *romdata, device_t *device, const
sprintf(bios_number, "%d", bios_flags - 1);
if (core_stricmp(bios_number, specbios) == 0 || core_stricmp(biosname, specbios) == 0)
device->set_system_bios(bios_flags);
- if (defaultname != NULL && core_stricmp(biosname, defaultname) == 0)
+ if (defaultname != nullptr && core_stricmp(biosname, defaultname) == 0)
default_no = bios_flags;
bios_count++;
}
@@ -368,7 +368,7 @@ static void determine_bios_rom(romload_private *romdata, device_t *device, const
if (device->system_bios() == 0 && bios_count > 0)
{
/* if we got neither an empty string nor 'default' then warn the user */
- if (specbios[0] != 0 && strcmp(specbios, "default") != 0 && romdata != NULL)
+ if (specbios[0] != 0 && strcmp(specbios, "default") != 0 && romdata != nullptr)
{
strcatprintf(romdata->errorstring, "%s: invalid bios\n", specbios);
romdata->errors++;
@@ -397,9 +397,9 @@ static void count_roms(romload_private *romdata)
/* loop over regions, then over files */
device_iterator deviter(romdata->machine().config().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
- for (region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
- for (rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
+ for (region = rom_first_region(*device); region != nullptr; region = rom_next_region(region))
+ for (rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
if (ROM_GETBIOSFLAGS(rom) == 0 || ROM_GETBIOSFLAGS(rom) == device->system_bios())
{
romdata->romstotal++;
@@ -488,7 +488,7 @@ static void dump_wrong_and_correct_checksums(romload_private *romdata, const has
static void verify_length_and_hash(romload_private *romdata, const char *name, UINT32 explength, const hash_collection &hashes)
{
/* we've already complained if there is no file */
- if (romdata->file == NULL)
+ if (romdata->file == nullptr)
return;
/* verify length */
@@ -533,7 +533,7 @@ static void display_loading_rom_message(romload_private *romdata, const char *na
{
char buffer[200];
- if (name != NULL)
+ if (name != nullptr)
sprintf(buffer, "Loading %s (%d%%)", from_list ? "Software" : emulator_info::get_capstartgamenoun(), (UINT32)(100 * (UINT64)romdata->romsloadedsize / (UINT64)romdata->romstotalsize));
else
sprintf(buffer, "Loading Complete");
@@ -551,7 +551,7 @@ static void display_loading_rom_message(romload_private *romdata, const char *na
static void display_rom_load_results(romload_private *romdata, bool from_list)
{
/* final status display */
- display_loading_rom_message(romdata, NULL, from_list);
+ display_loading_rom_message(romdata, nullptr, from_list);
/* if we had errors, they are fatal */
if (romdata->errors != 0)
@@ -584,7 +584,7 @@ static void region_post_process(romload_private *romdata, const char *rgntag, bo
int i, j;
// do nothing if no region
- if (region == NULL)
+ if (region == nullptr)
return;
LOG(("+ datawidth=%dbit endian=%s\n", region->bitwidth(),
@@ -634,8 +634,8 @@ static int open_rom_file(romload_private *romdata, const char *regiontag, const
/* attempt reading up the chain through the parents. It automatically also
attempts any kind of load by checksum supported by the archives. */
- romdata->file = NULL;
- for (int drv = driver_list::find(romdata->machine().system()); romdata->file == NULL && drv != -1; drv = driver_list::clone(drv)) {
+ romdata->file = nullptr;
+ for (int drv = driver_list::find(romdata->machine().system()); romdata->file == nullptr && drv != -1; drv = driver_list::clone(drv)) {
if (tried_file_names.length() != 0)
tried_file_names += " ";
tried_file_names += driver_list::driver(drv).name;
@@ -643,7 +643,7 @@ static int open_rom_file(romload_private *romdata, const char *regiontag, const
}
/* if the region is load by name, load the ROM from there */
- if (romdata->file == NULL && regiontag != NULL)
+ if (romdata->file == nullptr && regiontag != nullptr)
{
// check if we are dealing with softwarelists. if so, locationtag
// is actually a concatenation of: listname + setname + parentname
@@ -697,25 +697,25 @@ static int open_rom_file(romload_private *romdata, const char *regiontag, const
else
{
// try to load from list/setname
- if ((romdata->file == NULL) && (tag2.c_str() != NULL))
+ if ((romdata->file == nullptr) && (tag2.c_str() != nullptr))
{
tried_file_names += " " + tag2;
filerr = common_process_file(romdata->machine().options(), tag2.c_str(), has_crc, crc, romp, &romdata->file);
}
// try to load from list/parentname
- if ((romdata->file == NULL) && has_parent && (tag3.c_str() != NULL))
+ if ((romdata->file == nullptr) && has_parent && (tag3.c_str() != nullptr))
{
tried_file_names += " " + tag3;
filerr = common_process_file(romdata->machine().options(), tag3.c_str(), has_crc, crc, romp, &romdata->file);
}
// try to load from setname
- if ((romdata->file == NULL) && (tag4.c_str() != NULL))
+ if ((romdata->file == nullptr) && (tag4.c_str() != nullptr))
{
tried_file_names += " " + tag4;
filerr = common_process_file(romdata->machine().options(), tag4.c_str(), has_crc, crc, romp, &romdata->file);
}
// try to load from parentname
- if ((romdata->file == NULL) && has_parent && (tag5.c_str() != NULL))
+ if ((romdata->file == nullptr) && has_parent && (tag5.c_str() != nullptr))
{
tried_file_names += " " + tag5;
filerr = common_process_file(romdata->machine().options(), tag5.c_str(), has_crc, crc, romp, &romdata->file);
@@ -740,7 +740,7 @@ static int open_rom_file(romload_private *romdata, const char *regiontag, const
static int rom_fread(romload_private *romdata, UINT8 *buffer, int length, const rom_entry *parent_region)
{
/* files just pass through */
- if (romdata->file != NULL)
+ if (romdata->file != nullptr)
return romdata->file->read(buffer, length);
/* otherwise, fill with randomness unless it was already specifically erased */
@@ -910,7 +910,7 @@ static void copy_rom_data(romload_private *romdata, const rom_entry *romp)
/* make sure the source was valid */
memory_region *region = romdata->machine().root_device().memregion(srcrgntag);
- if (region == NULL)
+ if (region == nullptr)
fatalerror("Error in RomModule definition: COPY from an invalid region\n");
/* make sure we find within the region space */
@@ -999,19 +999,19 @@ static void process_rom_entries(romload_private *romdata, const char *regiontag,
}
/* reseek to the start and clear the baserom so we don't reverify */
- if (romdata->file != NULL)
+ if (romdata->file != nullptr)
romdata->file->seek(0, SEEK_SET);
- baserom = NULL;
+ baserom = nullptr;
explength = 0;
}
while (ROMENTRY_ISRELOAD(romp));
/* close the file */
- if (romdata->file != NULL)
+ if (romdata->file != nullptr)
{
LOG(("Closing ROM file\n"));
global_free(romdata->file);
- romdata->file = NULL;
+ romdata->file = nullptr;
}
}
else
@@ -1041,10 +1041,10 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_
filerr = common_process_file(options, driver_list::driver(searchdrv).name, ".chd", romp, image_file);
if (filerr != FILERR_NONE)
- filerr = common_process_file(options, NULL, ".chd", romp, image_file);
+ filerr = common_process_file(options, nullptr, ".chd", romp, image_file);
/* look for the disk in the locationtag too */
- if (filerr != FILERR_NONE && locationtag != NULL)
+ if (filerr != FILERR_NONE && locationtag != nullptr)
{
// check if we are dealing with softwarelists. if so, locationtag
// is actually a concatenation of: listname + setname + parentname
@@ -1095,19 +1095,19 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_
else
{
// try to load from list/setname
- if ((filerr != FILERR_NONE) && (tag2.c_str() != NULL))
+ if ((filerr != FILERR_NONE) && (tag2.c_str() != nullptr))
filerr = common_process_file(options, tag2.c_str(), ".chd", romp, image_file);
// try to load from list/parentname (if any)
- if ((filerr != FILERR_NONE) && has_parent && (tag3.c_str() != NULL))
+ if ((filerr != FILERR_NONE) && has_parent && (tag3.c_str() != nullptr))
filerr = common_process_file(options, tag3.c_str(), ".chd", romp, image_file);
// try to load from setname
- if ((filerr != FILERR_NONE) && (tag4.c_str() != NULL))
+ if ((filerr != FILERR_NONE) && (tag4.c_str() != nullptr))
filerr = common_process_file(options, tag4.c_str(), ".chd", romp, image_file);
// try to load from parentname (if any)
- if ((filerr != FILERR_NONE) && has_parent && (tag5.c_str() != NULL))
+ if ((filerr != FILERR_NONE) && has_parent && (tag5.c_str() != nullptr))
filerr = common_process_file(options, tag5.c_str(), ".chd", romp, image_file);
// only for CHD we also try to load from list/
- if ((filerr != FILERR_NONE) && (tag1.c_str() != NULL))
+ if ((filerr != FILERR_NONE) && (tag1.c_str() != nullptr))
{
tag1.erase(tag1.length() - 1, 1); // remove the PATH_SEPARATOR
filerr = common_process_file(options, tag1.c_str(), ".chd", romp, image_file);
@@ -1136,10 +1136,10 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_
{
machine_config config(driver_list::driver(drv), options);
device_iterator deviter(config.root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
- for (region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
+ for (region = rom_first_region(*device); region != nullptr; region = rom_next_region(region))
if (ROMREGION_ISDISKDATA(region))
- for (rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
+ for (rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
/* look for a differing name but with the same hash data */
if (strcmp(ROM_GETNAME(romp), ROM_GETNAME(rom)) != 0 &&
@@ -1151,7 +1151,7 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_
filerr = common_process_file(options, driver_list::driver(searchdrv).name, ".chd", rom, image_file);
if (filerr != FILERR_NONE)
- filerr = common_process_file(options, NULL, ".chd", rom, image_file);
+ filerr = common_process_file(options, nullptr, ".chd", rom, image_file);
/* did the file open succeed? */
if (filerr == FILERR_NONE)
@@ -1227,7 +1227,7 @@ static void process_disk_entries(romload_private *romdata, const char *regiontag
/* handle files */
if (ROMENTRY_ISFILE(romp))
{
- open_chd *chd = global_alloc(open_chd(regiontag));
+ auto chd = global_alloc(open_chd(regiontag));
hash_collection hashes(ROM_GETHASHDATA(romp));
chd_error err;
@@ -1296,7 +1296,7 @@ static void normalize_flags_for_device(running_machine &machine, const char *rgn
if (device->interface(memory))
{
const address_space_config *spaceconfig = memory->space_config();
- if (spaceconfig != NULL)
+ if (spaceconfig != nullptr)
{
int buswidth;
@@ -1345,7 +1345,7 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c
romdata->romsloadedsize = 0;
software_info *swinfo = swlist.find(swname);
- if (swinfo != NULL)
+ if (swinfo != nullptr)
{
UINT32 supported = swinfo->supported();
if (supported == SOFTWARE_SUPPORTED_PARTIAL)
@@ -1365,11 +1365,11 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c
locationtag.append(breakstr);
- while (swinfo != NULL)
+ while (swinfo != nullptr)
{
locationtag.append(swinfo->shortname()).append(breakstr);
const char *parentname = swinfo->parentname();
- swinfo = (parentname != NULL) ? swlist.find(parentname) : NULL;
+ swinfo = (parentname != nullptr) ? swlist.find(parentname) : nullptr;
}
// strip the final '%'
locationtag.erase(locationtag.length() - 1, 1);
@@ -1377,7 +1377,7 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c
/* loop until we hit the end */
- for (region = start_region; region != NULL; region = rom_next_region(region))
+ for (region = start_region; region != nullptr; region = rom_next_region(region))
{
UINT32 regionlength = ROMREGION_GETLENGTH(region);
@@ -1391,9 +1391,9 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c
endianness_t endianness = ROMREGION_ISBIGENDIAN(region) ? ENDIANNESS_BIG : ENDIANNESS_LITTLE;
UINT8 width = ROMREGION_GETWIDTH(region) / 8;
memory_region *memregion = romdata->machine().root_device().memregion(regiontag.c_str());
- if (memregion != NULL)
+ if (memregion != nullptr)
{
- if (romdata->machine().device(regiontag.c_str()) != NULL)
+ if (romdata->machine().device(regiontag.c_str()) != nullptr)
normalize_flags_for_device(romdata->machine(), regiontag.c_str(), width, endianness);
/* clear old region (todo: should be moved to an image unload function) */
@@ -1419,7 +1419,7 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c
#endif
/* update total number of roms */
- for (const rom_entry *rom = rom_first_file(region); rom != NULL; rom = rom_next_file(rom))
+ for (const rom_entry *rom = rom_first_file(region); rom != nullptr; rom = rom_next_file(rom))
{
romdata->romstotal++;
romdata->romstotalsize += rom_file_size(rom);
@@ -1433,7 +1433,7 @@ void load_software_part_region(device_t &device, software_list_device &swlist, c
}
/* now go back and post-process all the regions */
- for (region = start_region; region != NULL; region = rom_next_region(region))
+ for (region = start_region; region != nullptr; region = rom_next_region(region))
{
regiontag = device.subtag(ROMREGION_GETTAG(region));
region_post_process(romdata, regiontag.c_str(), ROMREGION_ISINVERTED(region));
@@ -1454,8 +1454,8 @@ static void process_region_list(romload_private *romdata)
/* loop until we hit the end */
device_iterator deviter(romdata->machine().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
- for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
+ for (const rom_entry *region = rom_first_region(*device); region != nullptr; region = rom_next_region(region))
{
UINT32 regionlength = ROMREGION_GETLENGTH(region);
@@ -1470,7 +1470,7 @@ static void process_region_list(romload_private *romdata)
/* if this is a device region, override with the device width and endianness */
UINT8 width = ROMREGION_GETWIDTH(region) / 8;
endianness_t endianness = ROMREGION_ISBIGENDIAN(region) ? ENDIANNESS_BIG : ENDIANNESS_LITTLE;
- if (romdata->machine().device(regiontag.c_str()) != NULL)
+ if (romdata->machine().device(regiontag.c_str()) != nullptr)
normalize_flags_for_device(romdata->machine(), regiontag.c_str(), width, endianness);
/* remember the base and length */
@@ -1495,20 +1495,20 @@ static void process_region_list(romload_private *romdata)
process_rom_entries(romdata, device->shortname(), region, region + 1, device, FALSE);
}
else if (ROMREGION_ISDISKDATA(region))
- process_disk_entries(romdata, regiontag.c_str(), region, region + 1, NULL);
+ process_disk_entries(romdata, regiontag.c_str(), region, region + 1, nullptr);
}
/* now go back and post-process all the regions */
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
- for (const rom_entry *region = rom_first_region(*device); region != NULL; region = rom_next_region(region))
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
+ for (const rom_entry *region = rom_first_region(*device); region != nullptr; region = rom_next_region(region))
{
regiontag = rom_region_name(*device, region);
region_post_process(romdata, regiontag.c_str(), ROMREGION_ISINVERTED(region));
}
/* and finally register all per-game parameters */
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
- for (const rom_entry *param = rom_first_parameter(*device); param != NULL; param = rom_next_parameter(param))
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
+ for (const rom_entry *param = rom_first_parameter(*device); param != nullptr; param = rom_next_parameter(param))
{
regiontag = rom_parameter_name(*device, param);
romdata->machine().parameters().add(regiontag, rom_parameter_value(param));
@@ -1536,7 +1536,7 @@ void rom_init(running_machine &machine)
/* figure out which BIOS we are using */
device_iterator deviter(romdata->machine().config().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next()) {
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next()) {
if (device->rom_region()) {
const char *specbios;
std::string temp;
diff --git a/src/emu/save.cpp b/src/emu/save.cpp
index 4af850163c2..4a5b3ef7ebf 100644
--- a/src/emu/save.cpp
+++ b/src/emu/save.cpp
@@ -88,8 +88,8 @@ void save_manager::allow_registration(bool allowed)
const char *save_manager::indexed_item(int index, void *&base, UINT32 &valsize, UINT32 &valcount) const
{
state_entry *entry = m_entry_list.find(index);
- if (entry == NULL)
- return NULL;
+ if (entry == nullptr)
+ return nullptr;
base = entry->m_data;
valsize = entry->m_typesize;
@@ -111,7 +111,7 @@ void save_manager::register_presave(save_prepost_delegate func)
fatalerror("Attempt to register callback function after state registration is closed!\n");
// scan for duplicates and push through to the end
- for (state_callback *cb = m_presave_list.first(); cb != NULL; cb = cb->next())
+ for (state_callback *cb = m_presave_list.first(); cb != nullptr; cb = cb->next())
if (cb->m_func == func)
fatalerror("Duplicate save state function (%s/%s)\n", cb->m_func.name(), func.name());
@@ -132,7 +132,7 @@ void save_manager::register_postload(save_prepost_delegate func)
fatalerror("Attempt to register callback function after state registration is closed!\n");
// scan for duplicates and push through to the end
- for (state_callback *cb = m_postload_list.first(); cb != NULL; cb = cb->next())
+ for (state_callback *cb = m_postload_list.first(); cb != nullptr; cb = cb->next())
if (cb->m_func == func)
fatalerror("Duplicate save state function (%s/%s)\n", cb->m_func.name(), func.name());
@@ -162,14 +162,14 @@ void save_manager::save_memory(device_t *device, const char *module, const char
// create the full name
std::string totalname;
- if (tag != NULL)
+ if (tag != nullptr)
strprintf(totalname, "%s/%s/%X/%s", module, tag, index, name);
else
strprintf(totalname, "%s/%X/%s", module, index, name);
// look for duplicates and an entry to insert in front of
- state_entry *insert_after = NULL;
- for (state_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next())
+ state_entry *insert_after = nullptr;
+ for (state_entry *entry = m_entry_list.first(); entry != nullptr; entry = entry->next())
{
// stop when we find an entry whose name is after ours
if (entry->m_name.compare(totalname)>0)
@@ -203,7 +203,7 @@ save_error save_manager::check_file(running_machine &machine, emu_file &file, co
UINT8 header[HEADER_SIZE];
if (file.read(header, sizeof(header)) != sizeof(header))
{
- if (errormsg != NULL)
+ if (errormsg != nullptr)
(*errormsg)("Could not read %s save file header",emulator_info::get_appname());
return STATERR_READ_ERROR;
}
@@ -220,7 +220,7 @@ save_error save_manager::check_file(running_machine &machine, emu_file &file, co
void save_manager::dispatch_postload()
{
- for (state_callback *func = m_postload_list.first(); func != NULL; func = func->next())
+ for (state_callback *func = m_postload_list.first(); func != nullptr; func = func->next())
func->m_func();
}
@@ -244,14 +244,14 @@ save_error save_manager::read_file(emu_file &file)
// verify the header and report an error if it doesn't match
UINT32 sig = signature();
- if (validate_header(header, machine().system().name, sig, NULL, "Error: ") != STATERR_NONE)
+ if (validate_header(header, machine().system().name, sig, nullptr, "Error: ") != STATERR_NONE)
return STATERR_INVALID_HEADER;
// determine whether or not to flip the data when done
bool flip = NATIVE_ENDIAN_VALUE_LE_BE((header[9] & SS_MSB_FIRST) != 0, (header[9] & SS_MSB_FIRST) == 0);
// read all the data, flipping if necessary
- for (state_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next())
+ for (state_entry *entry = m_entry_list.first(); entry != nullptr; entry = entry->next())
{
UINT32 totalsize = entry->m_typesize * entry->m_typecount;
if (file.read(entry->m_data, totalsize) != totalsize)
@@ -276,7 +276,7 @@ save_error save_manager::read_file(emu_file &file)
void save_manager::dispatch_presave()
{
- for (state_callback *func = m_presave_list.first(); func != NULL; func = func->next())
+ for (state_callback *func = m_presave_list.first(); func != nullptr; func = func->next())
func->m_func();
}
@@ -310,7 +310,7 @@ save_error save_manager::write_file(emu_file &file)
dispatch_presave();
// then write all the data
- for (state_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next())
+ for (state_entry *entry = m_entry_list.first(); entry != nullptr; entry = entry->next())
{
UINT32 totalsize = entry->m_typesize * entry->m_typecount;
if (file.write(entry->m_data, totalsize) != totalsize)
@@ -329,7 +329,7 @@ UINT32 save_manager::signature() const
{
// iterate over entries
UINT32 crc = 0;
- for (state_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next())
+ for (state_entry *entry = m_entry_list.first(); entry != nullptr; entry = entry->next())
{
// add the entry name to the CRC
crc = core_crc32(crc, (UINT8 *)entry->m_name.c_str(), entry->m_name.length());
@@ -351,7 +351,7 @@ UINT32 save_manager::signature() const
void save_manager::dump_registry() const
{
- for (state_entry *entry = m_entry_list.first(); entry != NULL; entry = entry->next())
+ for (state_entry *entry = m_entry_list.first(); entry != nullptr; entry = entry->next())
LOG(("%s: %d x %d\n", entry->m_name.c_str(), entry->m_typesize, entry->m_typecount));
}
@@ -367,7 +367,7 @@ save_error save_manager::validate_header(const UINT8 *header, const char *gamena
// check magic number
if (memcmp(header, emulator_info::get_state_magic_num(), 8))
{
- if (errormsg != NULL)
+ if (errormsg != nullptr)
(*errormsg)("%sThis is not a %s save file", error_prefix,emulator_info::get_appname());
return STATERR_INVALID_HEADER;
}
@@ -375,15 +375,15 @@ save_error save_manager::validate_header(const UINT8 *header, const char *gamena
// check save state version
if (header[8] != SAVE_VERSION)
{
- if (errormsg != NULL)
+ if (errormsg != nullptr)
(*errormsg)("%sWrong version in save file (version %d, expected %d)", error_prefix, header[8], SAVE_VERSION);
return STATERR_INVALID_HEADER;
}
// check gamename, if we were asked to
- if (gamename != NULL && strncmp(gamename, (const char *)&header[0x0a], 0x1c - 0x0a))
+ if (gamename != nullptr && strncmp(gamename, (const char *)&header[0x0a], 0x1c - 0x0a))
{
- if (errormsg != NULL)
+ if (errormsg != nullptr)
(*errormsg)("%s'File is not a valid savestate file for game '%s'.", error_prefix, gamename);
return STATERR_INVALID_HEADER;
}
@@ -394,7 +394,7 @@ save_error save_manager::validate_header(const UINT8 *header, const char *gamena
UINT32 rawsig = *(UINT32 *)&header[0x1c];
if (signature != LITTLE_ENDIANIZE_INT32(rawsig))
{
- if (errormsg != NULL)
+ if (errormsg != nullptr)
(*errormsg)("%sIncompatible save file (signature %08x, expected %08x)", error_prefix, LITTLE_ENDIANIZE_INT32(rawsig), signature);
return STATERR_INVALID_HEADER;
}
@@ -408,8 +408,8 @@ save_error save_manager::validate_header(const UINT8 *header, const char *gamena
//-------------------------------------------------
save_manager::state_callback::state_callback(save_prepost_delegate callback)
- : m_next(NULL),
- m_func(callback)
+ : m_next(nullptr),
+ m_func(std::move(callback))
{
}
@@ -419,7 +419,7 @@ save_manager::state_callback::state_callback(save_prepost_delegate callback)
//-------------------------------------------------
state_entry::state_entry(void *data, const char *name, device_t *device, const char *module, const char *tag, int index, UINT8 size, UINT32 count)
- : m_next(NULL),
+ : m_next(nullptr),
m_data(data),
m_name(name),
m_device(device),
diff --git a/src/emu/save.h b/src/emu/save.h
index 41cc4a07fb4..b4c2c3c2186 100644
--- a/src/emu/save.h
+++ b/src/emu/save.h
@@ -148,9 +148,9 @@ public:
// global memory registration
template<typename _ItemType>
- void save_item(_ItemType &value, const char *valname, int index = 0) { save_item(NULL, "global", NULL, index, value, valname); }
+ void save_item(_ItemType &value, const char *valname, int index = 0) { save_item(nullptr, "global", nullptr, index, value, valname); }
template<typename _ItemType>
- void save_pointer(_ItemType *value, const char *valname, UINT32 count, int index = 0) { save_pointer(NULL, "global", NULL, index, value, valname, count); }
+ void save_pointer(_ItemType *value, const char *valname, UINT32 count, int index = 0) { save_pointer(nullptr, "global", nullptr, index, value, valname, count); }
// file processing
static save_error check_file(running_machine &machine, emu_file &file, const char *gamename, void (CLIB_DECL *errormsg)(const char *fmt, ...));
diff --git a/src/emu/schedule.cpp b/src/emu/schedule.cpp
index 43a26ebb1fd..925364aab07 100644
--- a/src/emu/schedule.cpp
+++ b/src/emu/schedule.cpp
@@ -45,17 +45,17 @@ enum
//-------------------------------------------------
emu_timer::emu_timer()
- : m_machine(NULL),
- m_next(NULL),
- m_prev(NULL),
+ : m_machine(nullptr),
+ m_next(nullptr),
+ m_prev(nullptr),
m_param(0),
- m_ptr(NULL),
+ m_ptr(nullptr),
m_enabled(false),
m_temporary(false),
m_period(attotime::zero),
m_start(attotime::zero),
m_expire(attotime::never),
- m_device(NULL),
+ m_device(nullptr),
m_id(0)
{
}
@@ -79,8 +79,8 @@ emu_timer &emu_timer::init(running_machine &machine, timer_expired_delegate call
{
// ensure the entire timer state is clean
m_machine = &machine;
- m_next = NULL;
- m_prev = NULL;
+ m_next = nullptr;
+ m_prev = nullptr;
m_callback = callback;
m_param = 0;
m_ptr = ptr;
@@ -89,7 +89,7 @@ emu_timer &emu_timer::init(running_machine &machine, timer_expired_delegate call
m_period = attotime::never;
m_start = machine.time();
m_expire = attotime::never;
- m_device = NULL;
+ m_device = nullptr;
m_id = 0;
// if we're not temporary, register ourselves with the save state system
@@ -111,8 +111,8 @@ emu_timer &emu_timer::init(device_t &device, device_timer_id id, void *ptr, bool
{
// ensure the entire timer state is clean
m_machine = &device.machine();
- m_next = NULL;
- m_prev = NULL;
+ m_next = nullptr;
+ m_prev = nullptr;
m_callback = timer_expired_delegate();
m_param = 0;
m_ptr = ptr;
@@ -241,11 +241,11 @@ void emu_timer::register_save()
std::string name;
// for non-device timers, it is an index based on the callback function name
- if (m_device == NULL)
+ if (m_device == nullptr)
{
name = m_callback.name();
- for (emu_timer *curtimer = machine().scheduler().first_timer(); curtimer != NULL; curtimer = curtimer->next())
- if (!curtimer->m_temporary && curtimer->m_device == NULL && strcmp(curtimer->m_callback.name(), m_callback.name()) == 0)
+ for (emu_timer *curtimer = machine().scheduler().first_timer(); curtimer != nullptr; curtimer = curtimer->next())
+ if (!curtimer->m_temporary && curtimer->m_device == nullptr && strcmp(curtimer->m_callback.name(), m_callback.name()) == 0)
index++;
}
@@ -253,8 +253,8 @@ void emu_timer::register_save()
else
{
strprintf(name,"%s/%d", m_device->tag(), m_id);
- for (emu_timer *curtimer = machine().scheduler().first_timer(); curtimer != NULL; curtimer = curtimer->next())
- if (!curtimer->m_temporary && curtimer->m_device != NULL && curtimer->m_device == m_device && curtimer->m_id == m_id)
+ for (emu_timer *curtimer = machine().scheduler().first_timer(); curtimer != nullptr; curtimer = curtimer->next())
+ if (!curtimer->m_temporary && curtimer->m_device != nullptr && curtimer->m_device == m_device && curtimer->m_id == m_id)
index++;
}
@@ -293,7 +293,7 @@ inline void emu_timer::schedule_next_period()
void emu_timer::dump() const
{
machine().logerror("%p: en=%d temp=%d exp=%15s start=%15s per=%15s param=%d ptr=%p", this, m_enabled, m_temporary, m_expire.as_string(PRECISION), m_start.as_string(PRECISION), m_period.as_string(PRECISION), m_param, m_ptr);
- if (m_device == NULL)
+ if (m_device == nullptr)
machine().logerror(" cb=%s\n", m_callback.name());
else
machine().logerror(" dev=%s id=%d\n", m_device->tag(), m_id);
@@ -311,18 +311,18 @@ void emu_timer::dump() const
device_scheduler::device_scheduler(running_machine &machine) :
m_machine(machine),
- m_executing_device(NULL),
- m_execute_list(NULL),
+ m_executing_device(nullptr),
+ m_execute_list(nullptr),
m_basetime(attotime::zero),
- m_timer_list(NULL),
- m_callback_timer(NULL),
+ m_timer_list(nullptr),
+ m_callback_timer(nullptr),
m_callback_timer_modified(false),
m_callback_timer_expire_time(attotime::zero),
m_suspend_changes_pending(true),
m_quantum_minimum(ATTOSECONDS_IN_NSEC(1) / 1000)
{
// append a single never-expiring timer so there is always one in the list
- m_timer_list = &m_timer_allocator.alloc()->init(machine, timer_expired_delegate(), NULL, true);
+ m_timer_list = &m_timer_allocator.alloc()->init(machine, timer_expired_delegate(), nullptr, true);
m_timer_list->adjust(attotime::never);
// register global states
@@ -339,7 +339,7 @@ device_scheduler::device_scheduler(running_machine &machine) :
device_scheduler::~device_scheduler()
{
// remove all timers
- while (m_timer_list != NULL)
+ while (m_timer_list != nullptr)
m_timer_allocator.reclaim(m_timer_list->release());
}
@@ -351,12 +351,12 @@ device_scheduler::~device_scheduler()
attotime device_scheduler::time() const
{
// if we're currently in a callback, use the timer's expiration time as a base
- if (m_callback_timer != NULL)
+ if (m_callback_timer != nullptr)
return m_callback_timer_expire_time;
// if we're executing as a particular CPU, use its local time as a base
// otherwise, return the global base time
- return (m_executing_device != NULL) ? m_executing_device->local_time() : m_basetime;
+ return (m_executing_device != nullptr) ? m_executing_device->local_time() : m_basetime;
}
@@ -368,7 +368,7 @@ attotime device_scheduler::time() const
bool device_scheduler::can_save() const
{
// if any live temporary timers exit, fail
- for (emu_timer *timer = m_timer_list; timer != NULL; timer = timer->next())
+ for (emu_timer *timer = m_timer_list; timer != nullptr; timer = timer->next())
if (timer->m_temporary && !timer->expire().is_never())
{
machine().logerror("Failed save state attempt due to anonymous timers:\n");
@@ -389,7 +389,7 @@ bool device_scheduler::can_save() const
inline void device_scheduler::apply_suspend_changes()
{
UINT32 suspendchanged = 0;
- for (device_execute_interface *exec = m_execute_list; exec != NULL; exec = exec->m_nextexec)
+ for (device_execute_interface *exec = m_execute_list; exec != nullptr; exec = exec->m_nextexec)
{
suspendchanged |= exec->m_suspend ^ exec->m_nextsuspend;
exec->m_suspend = exec->m_nextsuspend;
@@ -415,7 +415,7 @@ void device_scheduler::timeslice()
bool call_debugger = ((machine().debug_flags & DEBUG_FLAG_ENABLED) != 0);
// build the execution list if we don't have one yet
- if (UNEXPECTED(m_execute_list == NULL))
+ if (UNEXPECTED(m_execute_list == nullptr))
rebuild_execute_list();
// if the current quantum has expired, find a new one
@@ -440,7 +440,7 @@ void device_scheduler::timeslice()
apply_suspend_changes();
// loop over all CPUs
- for (device_execute_interface *exec = m_execute_list; exec != NULL; exec = exec->m_nextexec)
+ for (device_execute_interface *exec = m_execute_list; exec != nullptr; exec = exec->m_nextexec)
{
// only process if this CPU is executing or truly halted (not yielding)
// and if our target is later than the CPU's current time (coarse check)
@@ -504,7 +504,7 @@ void device_scheduler::timeslice()
}
}
}
- m_executing_device = NULL;
+ m_executing_device = nullptr;
// update the base time
m_basetime = target;
@@ -522,7 +522,7 @@ void device_scheduler::timeslice()
void device_scheduler::abort_timeslice()
{
- if (m_executing_device != NULL)
+ if (m_executing_device != nullptr)
m_executing_device->abort_timeslice();
}
@@ -534,7 +534,7 @@ void device_scheduler::abort_timeslice()
void device_scheduler::trigger(int trigid, const attotime &after)
{
// ensure we have a list of executing devices
- if (m_execute_list == NULL)
+ if (m_execute_list == nullptr)
rebuild_execute_list();
// if we have a non-zero time, schedule a timer
@@ -543,7 +543,7 @@ void device_scheduler::trigger(int trigid, const attotime &after)
// send the trigger to everyone who cares
else
- for (device_execute_interface *exec = m_execute_list; exec != NULL; exec = exec->m_nextexec)
+ for (device_execute_interface *exec = m_execute_list; exec != nullptr; exec = exec->m_nextexec)
exec->trigger(trigid);
}
@@ -627,7 +627,7 @@ void device_scheduler::timer_set(const attotime &duration, device_t &device, dev
void device_scheduler::eat_all_cycles()
{
- for (device_execute_interface *exec = m_execute_list; exec != NULL; exec = exec->m_nextexec)
+ for (device_execute_interface *exec = m_execute_list; exec != nullptr; exec = exec->m_nextexec)
exec->eat_cycles(1000000000);
}
@@ -663,7 +663,7 @@ void device_scheduler::postload()
{
// remove all timers and make a private list of permanent ones
simple_list<emu_timer> private_list;
- while (m_timer_list != NULL)
+ while (m_timer_list != nullptr)
{
emu_timer &timer = *m_timer_list;
@@ -678,7 +678,7 @@ void device_scheduler::postload()
// now re-insert them; this effectively re-sorts them by time
emu_timer *timer;
- while ((timer = private_list.detach_head()) != NULL)
+ while ((timer = private_list.detach_head()) != nullptr)
timer_list_insert(*timer);
m_suspend_changes_pending = true;
@@ -698,17 +698,17 @@ void device_scheduler::postload()
void device_scheduler::compute_perfect_interleave()
{
// ensure we have a list of executing devices
- if (m_execute_list == NULL)
+ if (m_execute_list == nullptr)
rebuild_execute_list();
// start with the first one
device_execute_interface *first = m_execute_list;
- if (first != NULL)
+ if (first != nullptr)
{
// start with a huge time factor and find the 2nd smallest cycle time
attoseconds_t smallest = first->minimum_quantum();
attoseconds_t perfect = ATTOSECONDS_PER_SECOND - 1;
- for (device_execute_interface *exec = first->m_nextexec; exec != NULL; exec = exec->m_nextexec)
+ for (device_execute_interface *exec = first->m_nextexec; exec != nullptr; exec = exec->m_nextexec)
{
// find the 2nd smallest cycle interval
attoseconds_t curquantum = exec->minimum_quantum();
@@ -726,7 +726,7 @@ void device_scheduler::compute_perfect_interleave()
{
// adjust all the actuals; this doesn't affect the current
m_quantum_minimum = perfect;
- for (quantum_slot *quant = m_quantum_list.first(); quant != NULL; quant = quant->next())
+ for (quantum_slot *quant = m_quantum_list.first(); quant != nullptr; quant = quant->next())
quant->m_actual = MAX(quant->m_requested, m_quantum_minimum);
}
}
@@ -742,7 +742,7 @@ void device_scheduler::compute_perfect_interleave()
void device_scheduler::rebuild_execute_list()
{
// if we haven't yet set a scheduling quantum, do it now
- if (m_quantum_list.first() == NULL)
+ if (m_quantum_list.first() == nullptr)
{
// set the core scheduling quantum
attotime min_quantum = machine().config().m_minimum_quantum;
@@ -755,7 +755,7 @@ void device_scheduler::rebuild_execute_list()
if (!machine().config().m_perfect_cpu_quantum.empty())
{
device_t *device = machine().device(machine().config().m_perfect_cpu_quantum.c_str());
- if (device == NULL)
+ if (device == nullptr)
fatalerror("Device '%s' specified for perfect interleave is not present!\n", machine().config().m_perfect_cpu_quantum.c_str());
device_execute_interface *exec;
@@ -774,18 +774,18 @@ void device_scheduler::rebuild_execute_list()
// start with an empty list
device_execute_interface **active_tailptr = &m_execute_list;
- *active_tailptr = NULL;
+ *active_tailptr = nullptr;
// also make an empty list of suspended devices
- device_execute_interface *suspend_list = NULL;
+ device_execute_interface *suspend_list = nullptr;
device_execute_interface **suspend_tailptr = &suspend_list;
// iterate over all devices
execute_interface_iterator iter(machine().root_device());
- for (device_execute_interface *exec = iter.first(); exec != NULL; exec = iter.next())
+ for (device_execute_interface *exec = iter.first(); exec != nullptr; exec = iter.next())
{
// append to the appropriate list
- exec->m_nextexec = NULL;
+ exec->m_nextexec = nullptr;
if (exec->m_suspend == 0)
{
*active_tailptr = exec;
@@ -814,8 +814,8 @@ emu_timer &device_scheduler::timer_list_insert(emu_timer &timer)
const attotime &expire = timer.m_enabled ? timer.m_expire : attotime::never;
// loop over the timer list
- emu_timer *prevtimer = NULL;
- for (emu_timer *curtimer = m_timer_list; curtimer != NULL; prevtimer = curtimer, curtimer = curtimer->next())
+ emu_timer *prevtimer = nullptr;
+ for (emu_timer *curtimer = m_timer_list; curtimer != nullptr; prevtimer = curtimer, curtimer = curtimer->next())
{
// if the current list entry expires after us, we should be inserted before it
if (curtimer->m_expire > expire)
@@ -824,7 +824,7 @@ emu_timer &device_scheduler::timer_list_insert(emu_timer &timer)
timer.m_prev = curtimer->m_prev;
timer.m_next = curtimer;
- if (curtimer->m_prev != NULL)
+ if (curtimer->m_prev != nullptr)
curtimer->m_prev->m_next = &timer;
else
m_timer_list = &timer;
@@ -835,13 +835,13 @@ emu_timer &device_scheduler::timer_list_insert(emu_timer &timer)
}
// need to insert after the last one
- if (prevtimer != NULL)
+ if (prevtimer != nullptr)
prevtimer->m_next = &timer;
else
m_timer_list = &timer;
timer.m_prev = prevtimer;
- timer.m_next = NULL;
+ timer.m_next = nullptr;
return timer;
}
@@ -854,12 +854,12 @@ emu_timer &device_scheduler::timer_list_insert(emu_timer &timer)
emu_timer &device_scheduler::timer_list_remove(emu_timer &timer)
{
// remove it from the list
- if (timer.m_prev != NULL)
+ if (timer.m_prev != nullptr)
timer.m_prev->m_next = timer.m_next;
else
m_timer_list = timer.m_next;
- if (timer.m_next != NULL)
+ if (timer.m_next != nullptr)
timer.m_next->m_prev = timer.m_prev;
return timer;
@@ -893,7 +893,7 @@ inline void device_scheduler::execute_timers()
{
g_profiler.start(PROFILER_TIMER_CALLBACK);
- if (timer.m_device != NULL)
+ if (timer.m_device != nullptr)
{
LOG(("execute_timers: timer device %s timer %d\n", timer.m_device->tag(), timer.m_id));
timer.m_device->timer_expired(timer, timer.m_id, timer.m_param, timer.m_ptr);
@@ -908,7 +908,7 @@ inline void device_scheduler::execute_timers()
}
// clear the callback timer global
- m_callback_timer = NULL;
+ m_callback_timer = nullptr;
// reset or remove the timer, but only if it wasn't modified during the callback
if (!m_callback_timer_modified)
@@ -940,9 +940,9 @@ void device_scheduler::add_scheduling_quantum(const attotime &quantum, const att
const attoseconds_t quantum_attos = quantum.attoseconds();
// figure out where to insert ourselves, expiring any quanta that are out-of-date
- quantum_slot *insert_after = NULL;
+ quantum_slot *insert_after = nullptr;
quantum_slot *next;
- for (quantum_slot *quant = m_quantum_list.first(); quant != NULL; quant = next)
+ for (quantum_slot *quant = m_quantum_list.first(); quant != nullptr; quant = next)
{
// if this quantum is expired, nuke it
next = quant->next();
@@ -955,7 +955,7 @@ void device_scheduler::add_scheduling_quantum(const attotime &quantum, const att
}
// if we found an exact match, just take the maximum expiry time
- if (insert_after != NULL && insert_after->m_requested == quantum_attos)
+ if (insert_after != nullptr && insert_after->m_requested == quantum_attos)
insert_after->m_expire = max(insert_after->m_expire, expire);
// otherwise, allocate a new quantum and insert it after the one we picked
@@ -978,7 +978,7 @@ void device_scheduler::dump_timers() const
{
machine().logerror("=============================================\n");
machine().logerror("Timer Dump: Time = %15s\n", time().as_string(PRECISION));
- for (emu_timer *timer = first_timer(); timer != NULL; timer = timer->next())
+ for (emu_timer *timer = first_timer(); timer != nullptr; timer = timer->next())
timer->dump();
machine().logerror("=============================================\n");
}
diff --git a/src/emu/schedule.h b/src/emu/schedule.h
index a2d8660ef4f..2f3a7f8a23a 100644
--- a/src/emu/schedule.h
+++ b/src/emu/schedule.h
@@ -68,7 +68,7 @@ class emu_timer
public:
// getters
emu_timer *next() const { return m_next; }
- running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
+ running_machine &machine() const { assert(m_machine != nullptr); return *m_machine; }
bool enabled() const { return m_enabled; }
int param() const { return m_param; }
void *ptr() const { return m_ptr; }
@@ -138,22 +138,22 @@ public:
void suspend_resume_changed() { m_suspend_changes_pending = true; }
// timers, specified by callback/name
- emu_timer *timer_alloc(timer_expired_delegate callback, void *ptr = NULL);
- void timer_set(const attotime &duration, timer_expired_delegate callback, int param = 0, void *ptr = NULL);
- void timer_pulse(const attotime &period, timer_expired_delegate callback, int param = 0, void *ptr = NULL);
- void synchronize(timer_expired_delegate callback = timer_expired_delegate(), int param = 0, void *ptr = NULL) { timer_set(attotime::zero, callback, param, ptr); }
+ emu_timer *timer_alloc(timer_expired_delegate callback, void *ptr = nullptr);
+ void timer_set(const attotime &duration, timer_expired_delegate callback, int param = 0, void *ptr = nullptr);
+ void timer_pulse(const attotime &period, timer_expired_delegate callback, int param = 0, void *ptr = nullptr);
+ void synchronize(timer_expired_delegate callback = timer_expired_delegate(), int param = 0, void *ptr = nullptr) { timer_set(attotime::zero, callback, param, ptr); }
// timers with old-skool callbacks
#ifdef USE_STATIC_DELEGATE
- emu_timer *timer_alloc(timer_expired_func callback, const char *name, void *ptr = NULL) { return timer_alloc(timer_expired_delegate(callback, name, &machine()), ptr); }
- void timer_set(const attotime &duration, timer_expired_func callback, const char *name, int param = 0, void *ptr = NULL) { timer_set(duration, timer_expired_delegate(callback, name, &machine()), param, ptr); }
- void timer_pulse(const attotime &period, timer_expired_func callback, const char *name, int param = 0, void *ptr = NULL) { timer_pulse(period, timer_expired_delegate(callback, name, &machine()), param, ptr); }
- void synchronize(timer_expired_func callback, const char *name = NULL, int param = 0, void *ptr = NULL) { timer_set(attotime::zero, callback, name, param, ptr); }
+ emu_timer *timer_alloc(timer_expired_func callback, const char *name, void *ptr = nullptr) { return timer_alloc(timer_expired_delegate(callback, name, &machine()), ptr); }
+ void timer_set(const attotime &duration, timer_expired_func callback, const char *name, int param = 0, void *ptr = nullptr) { timer_set(duration, timer_expired_delegate(callback, name, &machine()), param, ptr); }
+ void timer_pulse(const attotime &period, timer_expired_func callback, const char *name, int param = 0, void *ptr = nullptr) { timer_pulse(period, timer_expired_delegate(callback, name, &machine()), param, ptr); }
+ void synchronize(timer_expired_func callback, const char *name = nullptr, int param = 0, void *ptr = nullptr) { timer_set(attotime::zero, callback, name, param, ptr); }
#endif
// timers, specified by device/id; generally devices should use the device_t methods instead
- emu_timer *timer_alloc(device_t &device, device_timer_id id = 0, void *ptr = NULL);
- void timer_set(const attotime &duration, device_t &device, device_timer_id id = 0, int param = 0, void *ptr = NULL);
+ emu_timer *timer_alloc(device_t &device, device_timer_id id = 0, void *ptr = nullptr);
+ void timer_set(const attotime &duration, device_t &device, device_timer_id id = 0, int param = 0, void *ptr = nullptr);
// debugging
void dump_timers() const;
diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp
index 84b343bdc81..2ae1269cdd8 100644
--- a/src/emu/screen.cpp
+++ b/src/emu/screen.cpp
@@ -55,7 +55,7 @@ screen_device::screen_device(const machine_config &mconfig, const char *tag, dev
m_yscale(1.0f),
m_palette(*this),
m_video_attributes(0),
- m_container(NULL),
+ m_container(nullptr),
m_width(100),
m_height(100),
m_visarea(0, 99, 0, 99),
@@ -73,10 +73,10 @@ screen_device::screen_device(const machine_config &mconfig, const char *tag, dev
m_vblank_period(0),
m_vblank_start_time(attotime::zero),
m_vblank_end_time(attotime::zero),
- m_vblank_begin_timer(NULL),
- m_vblank_end_timer(NULL),
- m_scanline0_timer(NULL),
- m_scanline_timer(NULL),
+ m_vblank_begin_timer(nullptr),
+ m_vblank_end_timer(nullptr),
+ m_scanline0_timer(nullptr),
+ m_scanline_timer(nullptr),
m_frame_number(0),
m_partial_updates_this_frame(0)
{
@@ -267,9 +267,9 @@ void screen_device::device_validity_check(validity_checker &valid) const
osd_printf_error("Invalid (zero) refresh rate\n");
texture_format texformat = !m_screen_update_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32;
- if (m_palette == NULL && texformat == TEXFORMAT_PALETTE16)
+ if (m_palette == nullptr && texformat == TEXFORMAT_PALETTE16)
osd_printf_error("Screen does not have palette defined\n");
- if (m_palette != NULL && texformat == TEXFORMAT_RGB32)
+ if (m_palette != nullptr && texformat == TEXFORMAT_RGB32)
osd_printf_warning("Screen does not need palette defined\n");
}
@@ -286,16 +286,16 @@ void screen_device::device_start()
m_screen_vblank.bind_relative_to(*owner());
// if we have a palette and it's not started, wait for it
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
// configure bitmap formats and allocate screen bitmaps
texture_format texformat = !m_screen_update_ind16.isnull() ? TEXFORMAT_PALETTE16 : TEXFORMAT_RGB32;
- for (int index = 0; index < ARRAY_LENGTH(m_bitmap); index++)
+ for (auto & elem : m_bitmap)
{
- m_bitmap[index].set_format(format(), texformat);
- register_screen_bitmap(m_bitmap[index]);
+ elem.set_format(format(), texformat);
+ register_screen_bitmap(elem);
}
register_screen_bitmap(m_priority);
@@ -348,7 +348,7 @@ void screen_device::device_start()
// load the effect overlay
const char *overname = machine().options().effect();
- if (overname != NULL && strcmp(overname, "none") != 0)
+ if (overname != nullptr && strcmp(overname, "none") != 0)
load_effect_overlay(overname);
// register items for saving
@@ -553,11 +553,11 @@ void screen_device::realloc_screen_bitmaps()
INT32 effheight = MAX(m_height, m_visarea.max_y + 1);
// reize all registered screen bitmaps
- for (auto_bitmap_item *item = m_auto_bitmap_list.first(); item != NULL; item = item->next())
+ for (auto_bitmap_item *item = m_auto_bitmap_list.first(); item != nullptr; item = item->next())
item->m_bitmap.resize(effwidth, effheight);
// re-set up textures
- if (m_palette != NULL)
+ if (m_palette != nullptr)
{
m_bitmap[0].set_palette(m_palette->palette());
m_bitmap[1].set_palette(m_palette->palette());
@@ -899,12 +899,12 @@ void screen_device::register_vblank_callback(vblank_state_delegate vblank_callba
// check if we already have this callback registered
callback_item *item;
- for (item = m_callback_list.first(); item != NULL; item = item->next())
+ for (item = m_callback_list.first(); item != nullptr; item = item->next())
if (item->m_callback == vblank_callback)
break;
// if not found, register
- if (item == NULL)
+ if (item == nullptr)
m_callback_list.append(*global_alloc(callback_item(vblank_callback)));
}
@@ -921,7 +921,7 @@ void screen_device::register_screen_bitmap(bitmap_t &bitmap)
// if allocating now, just do it
bitmap.allocate(width(), height());
- if (m_palette != NULL)
+ if (m_palette != nullptr)
bitmap.set_palette(m_palette->palette());
}
@@ -942,7 +942,7 @@ void screen_device::vblank_begin()
machine().video().frame_update();
// call the screen specific callbacks
- for (callback_item *item = m_callback_list.first(); item != NULL; item = item->next())
+ for (callback_item *item = m_callback_list.first(); item != nullptr; item = item->next())
item->m_callback(*this, true);
if (!m_screen_vblank.isnull())
m_screen_vblank(*this, true);
@@ -966,7 +966,7 @@ void screen_device::vblank_begin()
void screen_device::vblank_end()
{
// call the screen specific callbacks
- for (callback_item *item = m_callback_list.first(); item != NULL; item = item->next())
+ for (callback_item *item = m_callback_list.first(); item != nullptr; item = item->next())
item->m_callback(*this, false);
if (!m_screen_vblank.isnull())
m_screen_vblank(*this, false);
@@ -1143,7 +1143,7 @@ void screen_device::finalize_burnin()
file_error filerr = file.open(machine().basename(), PATH_SEPARATOR "burnin-", this->tag()+1, ".png") ;
if (filerr == FILERR_NONE)
{
- png_info pnginfo = { 0 };
+ png_info pnginfo = { nullptr };
// png_error pngerr;
char text[256];
@@ -1154,7 +1154,7 @@ void screen_device::finalize_burnin()
png_add_text(&pnginfo, "System", text);
// now do the actual work
- png_write_bitmap(file, &pnginfo, finalmap, 0, NULL);
+ png_write_bitmap(file, &pnginfo, finalmap, 0, nullptr);
// free any data allocated
png_free(&pnginfo);
@@ -1177,7 +1177,7 @@ void screen_device::load_effect_overlay(const char *filename)
// load the file
emu_file file(machine().options().art_path(), OPEN_FLAG_READ);
- render_load_png(m_screen_overlay_bitmap, file, NULL, fullname.c_str());
+ render_load_png(m_screen_overlay_bitmap, file, nullptr, fullname.c_str());
if (m_screen_overlay_bitmap.valid())
m_container->set_overlay(&m_screen_overlay_bitmap);
else
diff --git a/src/emu/screen.h b/src/emu/screen.h
index 0a12c92f6b3..31487c7d4ea 100644
--- a/src/emu/screen.h
+++ b/src/emu/screen.h
@@ -8,6 +8,8 @@
***************************************************************************/
+#include <utility>
+
#pragma once
#ifndef __EMU_H__
@@ -76,8 +78,8 @@ class screen_bitmap
{
private:
// internal helpers
- bitmap_t &live() { assert(m_live != NULL); return *m_live; }
- const bitmap_t &live() const { assert(m_live != NULL); return *m_live; }
+ bitmap_t &live() { assert(m_live != nullptr); return *m_live; }
+ const bitmap_t &live() const { assert(m_live != nullptr); return *m_live; }
public:
// construction/destruction
@@ -126,7 +128,7 @@ public:
{
case BITMAP_FORMAT_IND16: m_live = &m_ind16; break;
case BITMAP_FORMAT_RGB32: m_live = &m_rgb32; break;
- default: m_live = NULL; break;
+ default: m_live = nullptr; break;
}
m_ind16.reset();
m_rgb32.reset();
@@ -193,7 +195,7 @@ public:
static void static_set_video_attributes(device_t &device, UINT32 flags);
// information getters
- render_container &container() const { assert(m_container != NULL); return *m_container; }
+ render_container &container() const { assert(m_container != nullptr); return *m_container; }
bitmap_ind8 &priority() { return m_priority; }
palette_device *palette() { return m_palette; }
@@ -216,7 +218,7 @@ public:
attotime time_until_vblank_end() const;
attotime time_until_update() const { return (m_video_attributes & VIDEO_UPDATE_AFTER_VBLANK) ? time_until_vblank_end() : time_until_vblank_start(); }
attotime scan_period() const { return attotime(0, m_scantime); }
- attotime frame_period() const { return (this == NULL) ? DEFAULT_FRAME_PERIOD : attotime(0, m_frame_period); };
+ attotime frame_period() const { return (this == nullptr) ? DEFAULT_FRAME_PERIOD : attotime(0, m_frame_period); };
UINT64 frame_number() const { return m_frame_number; }
// updating
@@ -248,12 +250,12 @@ private:
};
// device-level overrides
- virtual void device_validity_check(validity_checker &valid) const;
- virtual void device_start();
- virtual void device_reset();
- virtual void device_stop();
- virtual void device_post_load();
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
+ virtual void device_validity_check(validity_checker &valid) const override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_stop() override;
+ virtual void device_post_load() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// internal helpers
void set_container(render_container &container) { m_container = &container; }
@@ -319,8 +321,8 @@ private:
{
public:
callback_item(vblank_state_delegate callback)
- : m_next(NULL),
- m_callback(callback) { }
+ : m_next(nullptr),
+ m_callback(std::move(callback)) { }
callback_item *next() const { return m_next; }
callback_item * m_next;
@@ -333,7 +335,7 @@ private:
{
public:
auto_bitmap_item(bitmap_t &bitmap)
- : m_next(NULL),
+ : m_next(nullptr),
m_bitmap(bitmap) { }
auto_bitmap_item *next() const { return m_next; }
@@ -455,13 +457,13 @@ typedef device_type_iterator<&device_creator<screen_device>, screen_device> scre
template<class _FunctionClass>
inline screen_update_ind16_delegate screen_update_delegate_smart(UINT32 (_FunctionClass::*callback)(screen_device &, bitmap_ind16 &, const rectangle &), const char *name, const char *devname)
{
- return screen_update_ind16_delegate(callback, name, devname, (_FunctionClass *)0);
+ return screen_update_ind16_delegate(callback, name, devname, (_FunctionClass *)nullptr);
}
template<class _FunctionClass>
inline screen_update_rgb32_delegate screen_update_delegate_smart(UINT32 (_FunctionClass::*callback)(screen_device &, bitmap_rgb32 &, const rectangle &), const char *name, const char *devname)
{
- return screen_update_rgb32_delegate(callback, name, devname, (_FunctionClass *)0);
+ return screen_update_rgb32_delegate(callback, name, devname, (_FunctionClass *)nullptr);
}
diff --git a/src/emu/softlist.cpp b/src/emu/softlist.cpp
index ce0aee13a92..1e1fd1718f8 100644
--- a/src/emu/softlist.cpp
+++ b/src/emu/softlist.cpp
@@ -45,7 +45,7 @@ private:
// internal parsing helpers
const char *filename() const { return m_list.filename(); }
- const char *infoname() const { return (m_current_info != NULL) ? m_current_info->shortname() : "???"; }
+ const char *infoname() const { return (m_current_info != nullptr) ? m_current_info->shortname() : "???"; }
int line() const { return XML_GetCurrentLineNumber(m_parser); }
int column() const { return XML_GetCurrentColumnNumber(m_parser); }
const char *parser_error() const { return XML_ErrorString(XML_GetErrorCode(m_parser)); }
@@ -107,7 +107,7 @@ const device_type SOFTWARE_LIST = &device_creator<software_list_device>;
//-------------------------------------------------
software_part::software_part(software_info &info, const char *name, const char *interface)
- : m_next(NULL),
+ : m_next(nullptr),
m_info(info),
m_name(name),
m_interface(interface)
@@ -125,13 +125,13 @@ software_part::software_part(software_info &info, const char *name, const char *
const char *software_part::feature(const char *feature_name) const
{
- assert(feature_name != NULL);
+ assert(feature_name != nullptr);
// scan the feature list for an entry matching feature_name and return the value
- for (const feature_list_item *feature = m_featurelist.first(); feature != NULL; feature = feature->next())
+ for (const feature_list_item *feature = m_featurelist.first(); feature != nullptr; feature = feature->next())
if (strcmp(feature->name(), feature_name) == 0)
return feature->value();
- return NULL;
+ return nullptr;
}
@@ -146,7 +146,7 @@ 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
const char *compatibility = feature("compatibility");
const char *filter = swlistdev.filter();
- if (compatibility == NULL || filter == NULL)
+ if (compatibility == nullptr || filter == nullptr)
return true;
// copy the comma-delimited strings and ensure they end with a final comma
@@ -172,7 +172,7 @@ bool software_part::is_compatible(const software_list_device &swlistdev) const
bool software_part::matches_interface(const char *interface_list) const
{
// if we have no interface, then we match by default
- if (m_interface == NULL)
+ if (m_interface == nullptr)
return true;
// copy the comma-delimited interface list and ensure it ends with a final comma
@@ -194,21 +194,21 @@ bool software_part::matches_interface(const char *interface_list) const
//-------------------------------------------------
software_info::software_info(software_list_device &list, const char *name, const char *parent, const char *supported)
- : m_next(NULL),
+ : m_next(nullptr),
m_list(list),
m_supported(SOFTWARE_SUPPORTED_YES),
m_shortname(name),
- m_longname(NULL),
+ m_longname(nullptr),
m_parentname(parent),
- m_year(NULL),
- m_publisher(NULL)
+ m_year(nullptr),
+ m_publisher(nullptr)
{
// ensure strings we are passed are in the string pool
assert(list.string_pool_contains(name));
assert(list.string_pool_contains(parent));
// handle the supported flag if provided
- if (supported != NULL)
+ if (supported != nullptr)
{
if (strcmp(supported, "partial") == 0)
m_supported = SOFTWARE_SUPPORTED_PARTIAL;
@@ -226,21 +226,21 @@ software_info::software_info(software_list_device &list, const char *name, const
software_part *software_info::find_part(const char *partname, const char *interface)
{
// if neither partname nor interface supplied, then we just return the first entry
- if (partname != NULL && strlen(partname)==0) partname = NULL;
+ if (partname != nullptr && strlen(partname)==0) partname = nullptr;
- if (partname == NULL && interface == NULL)
+ if (partname == nullptr && interface == nullptr)
return m_partdata.first();
// look for the part by name and match against the interface if provided
- for (software_part *part = m_partdata.first(); part != NULL; part = part->next())
- if (partname != NULL && strcmp(partname, part->name()) == 0)
+ for (software_part *part = m_partdata.first(); part != nullptr; part = part->next())
+ if (partname != nullptr && strcmp(partname, part->name()) == 0)
{
- if (interface == NULL || part->matches_interface(interface))
+ if (interface == nullptr || part->matches_interface(interface))
return part;
}
- else if (partname == NULL && part->matches_interface(interface))
+ else if (partname == nullptr && part->matches_interface(interface))
return part;
- return NULL;
+ return nullptr;
}
@@ -255,7 +255,7 @@ bool software_info::has_multiple_parts(const char *interface) const
int count = 0;
// increment the count for each match and stop if we hit more than 1
- for (software_part *part = first_part(); part != NULL; part = part->next())
+ for (software_part *part = first_part(); part != nullptr; part = part->next())
if (part->matches_interface(interface))
if (++count > 1)
return true;
@@ -276,10 +276,10 @@ bool software_info::has_multiple_parts(const char *interface) const
software_list_device::software_list_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SOFTWARE_LIST, "Software list", tag, owner, clock, "software_list", __FILE__),
m_list_type(SOFTWARE_LIST_ORIGINAL_SYSTEM),
- m_filter(NULL),
+ m_filter(nullptr),
m_parsed(false),
m_file(mconfig.options().hash_path(), OPEN_FLAG_READ),
- m_description(NULL)
+ m_description(nullptr)
{
}
@@ -326,7 +326,7 @@ void software_list_device::device_start()
void software_list_device::find_approx_matches(const char *name, int matches, software_info **list, const char *interface)
{
// if no name, return
- if (name == NULL || name[0] == 0)
+ if (name == nullptr || name[0] == 0)
return;
// initialize everyone's states
@@ -334,14 +334,14 @@ void software_list_device::find_approx_matches(const char *name, int matches, so
for (int matchnum = 0; matchnum < matches; matchnum++)
{
penalty[matchnum] = 9999;
- list[matchnum] = NULL;
+ list[matchnum] = nullptr;
}
// iterate over our info (will cause a parse if needed)
- for (software_info *swinfo = first_software_info(); swinfo != NULL; swinfo = swinfo->next())
+ for (software_info *swinfo = first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
{
software_part *part = swinfo->first_part();
- if ((interface == NULL || part->matches_interface(interface)) && part->is_compatible(*this))
+ if ((interface == nullptr || part->matches_interface(interface)) && part->is_compatible(*this))
{
// pick the best match between driver name and description
int longpenalty = driver_list::penalty_compare(name, swinfo->longname());
@@ -377,7 +377,7 @@ void software_list_device::release()
{
osd_printf_verbose("Resetting %s\n", m_file.filename());
m_parsed = false;
- m_description = NULL;
+ m_description = nullptr;
m_errors.clear();
m_infolist.reset();
m_stringpool.reset();
@@ -393,10 +393,10 @@ software_list_device *software_list_device::find_by_name(const machine_config &c
{
// iterate over each device in the system and find a match
software_list_device_iterator deviter(config.root_device());
- for (software_list_device *swlistdev = deviter.first(); swlistdev != NULL; swlistdev = deviter.next())
+ for (software_list_device *swlistdev = deviter.first(); swlistdev != nullptr; swlistdev = deviter.next())
if (strcmp(swlistdev->list_name(), name) == 0)
return swlistdev;
- return NULL;
+ return nullptr;
}
@@ -415,14 +415,14 @@ void software_list_device::display_matches(const machine_config &config, const c
"supported software items (best match first):\n\n", name);
// iterate through lists
- for (software_list_device *swlistdev = deviter.first(); swlistdev != NULL; swlistdev = deviter.next())
+ for (software_list_device *swlistdev = deviter.first(); swlistdev != nullptr; swlistdev = deviter.next())
{
// get the top 16 approximate matches for the selected device interface (i.e. only carts for cartslot, etc.)
- software_info *matches[16] = { 0 };
+ software_info *matches[16] = { nullptr };
swlistdev->find_approx_matches(name, ARRAY_LENGTH(matches), matches, interface);
// if we found some, print them
- if (matches[0] != 0)
+ if (matches[0] != nullptr)
{
// different output depending on original system or compatible
if (swlistdev->list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM)
@@ -431,9 +431,9 @@ void software_list_device::display_matches(const machine_config &config, const c
osd_printf_error("* Compatible software list \"%s\" (%s) matches: \n", swlistdev->list_name(), swlistdev->description());
// print them out
- for (int softnum = 0; softnum < ARRAY_LENGTH(matches); softnum++)
- if (matches[softnum] != NULL)
- osd_printf_error("%-18s%s\n", matches[softnum]->shortname(), matches[softnum]->longname());
+ for (auto & matche : matches)
+ if (matche != nullptr)
+ osd_printf_error("%-18s%s\n", matche->shortname(), matche->longname());
osd_printf_error("\n");
}
@@ -450,13 +450,13 @@ 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
- if (look_for == NULL)
- return NULL;
+ if (look_for == nullptr)
+ return nullptr;
- bool iswild = strchr(look_for, '*') != NULL || strchr(look_for, '?');
+ bool iswild = strchr(look_for, '*') != nullptr || strchr(look_for, '?');
// find a match (will cause a parse if needed when calling first_software_info)
- for (prev = (prev != NULL) ? prev->next() : first_software_info(); prev != NULL; prev = prev->next())
+ for (prev = (prev != nullptr) ? prev->next() : first_software_info(); prev != nullptr; prev = prev->next())
if ((iswild && core_strwildcmp(look_for, prev->shortname()) == 0) || core_stricmp(look_for, prev->shortname()) == 0)
break;
@@ -525,7 +525,7 @@ void software_list_device::internal_validity_check(validity_checker &valid)
softlist_map names;
softlist_map descriptions;
- for (software_info *swinfo = first_software_info(); swinfo != NULL; swinfo = swinfo->next())
+ for (software_info *swinfo = first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
{
// first parse and output core errors if any
if (m_errors.length() > 0)
@@ -537,21 +537,21 @@ void software_list_device::internal_validity_check(validity_checker &valid)
// Now check if the xml data is valid:
// Did we lost any description?
- if (swinfo->longname() == NULL)
+ if (swinfo->longname() == nullptr)
{
osd_printf_error("%s: %s has no description\n", filename(), swinfo->shortname());
break;
}
// Did we lost any year?
- if (swinfo->year() == NULL)
+ if (swinfo->year() == nullptr)
{
osd_printf_error("%s: %s has no year\n", filename(), swinfo->shortname());
break;
}
// Did we lost any publisher?
- if (swinfo->publisher() == NULL)
+ if (swinfo->publisher() == nullptr)
{
osd_printf_error("%s: %s has no publisher\n", filename(), swinfo->shortname());
break;
@@ -579,7 +579,7 @@ void software_list_device::internal_validity_check(validity_checker &valid)
osd_printf_error("%s: %s is a duplicate description (%s)\n", filename(), swinfo->longname(), swinfo->shortname());
bool is_clone = false;
- if (swinfo->parentname() != NULL)
+ if (swinfo->parentname() != nullptr)
{
is_clone = true;
if (strcmp(swinfo->parentname(), swinfo->shortname()) == 0)
@@ -591,9 +591,9 @@ void software_list_device::internal_validity_check(validity_checker &valid)
// make sure the parent exists
software_info *swinfo2 = find(swinfo->parentname());
- if (swinfo2 == NULL)
+ if (swinfo2 == nullptr)
osd_printf_error("%s: parent '%s' software for '%s' not found\n", filename(), swinfo->parentname(), swinfo->shortname());
- else if (swinfo2->parentname() != NULL)
+ else if (swinfo2->parentname() != nullptr)
osd_printf_error("%s: %s is a clone of a clone\n", filename(), swinfo->shortname());
}
@@ -611,19 +611,19 @@ void software_list_device::internal_validity_check(validity_checker &valid)
}
softlist_map part_names;
- for (software_part *part = swinfo->first_part(); part != NULL; part = part->next())
+ for (software_part *part = swinfo->first_part(); part != nullptr; part = part->next())
{
- if (part->interface() == NULL)
+ if (part->interface() == nullptr)
osd_printf_error("%s: %s has a part (%s) without interface\n", filename(), swinfo->shortname(), part->name());
- if (part->romdata() == NULL)
+ if (part->romdata() == nullptr)
osd_printf_error("%s: %s has a part (%s) with no data\n", filename(), swinfo->shortname(), part->name());
if (part_names.add(part->name(), swinfo, false) == TMERR_DUPLICATE)
osd_printf_error("%s: %s has a part (%s) whose name is duplicate\n", filename(), swinfo->shortname(), part->name());
- for (const rom_entry *data = part->romdata(); data->_name != NULL; data++)
- if (data->_hashdata != NULL)
+ for (const rom_entry *data = part->romdata(); data->_name != nullptr; data++)
+ if (data->_hashdata != nullptr)
{
// make sure the hash is valid
hash_collection hashes;
@@ -652,8 +652,8 @@ softlist_parser::softlist_parser(software_list_device &list, std::string &errors
m_errors(errors),
m_done(false),
m_data_accum_expected(false),
- m_current_info(NULL),
- m_current_part(NULL),
+ m_current_info(nullptr),
+ m_current_part(nullptr),
m_pos(POS_ROOT)
{
osd_printf_verbose("Parsing %s\n", m_list.m_file.filename());
@@ -665,8 +665,8 @@ softlist_parser::softlist_parser(software_list_device &list, std::string &errors
memcallbacks.free_fcn = expat_free;
// create the parser
- m_parser = XML_ParserCreate_MM(NULL, &memcallbacks, NULL);
- if (m_parser == NULL)
+ m_parser = XML_ParserCreate_MM(nullptr, &memcallbacks, nullptr);
+ if (m_parser == nullptr)
throw std::bad_alloc();
// set the handlers
@@ -708,7 +708,7 @@ void *softlist_parser::expat_malloc(size_t size)
void *softlist_parser::expat_realloc(void *ptr, size_t size)
{
- if (ptr != NULL) global_free_array((UINT8 *)ptr);
+ if (ptr != nullptr) global_free_array((UINT8 *)ptr);
return global_alloc_array_clear(UINT8, size);
}
@@ -775,16 +775,16 @@ void softlist_parser::parse_attributes(const char **attributes, int numattrs, co
void softlist_parser::add_rom_entry(const char *name, const char *hashdata, UINT32 offset, UINT32 length, UINT32 flags)
{
// get the current part
- if (m_current_part == NULL)
+ if (m_current_part == nullptr)
{
parse_error("ROM entry added in invalid context");
return;
}
// make sure we don't add duplicate regions
- if (name != NULL && (flags & ROMENTRY_TYPEMASK) == ROMENTRYTYPE_REGION)
- for (unsigned int romentry = 0; romentry < m_current_part->m_romdata.size(); romentry++)
- if (m_current_part->m_romdata[romentry]._name != NULL && strcmp(m_current_part->m_romdata[romentry]._name, name) == 0)
+ if (name != nullptr && (flags & ROMENTRY_TYPEMASK) == ROMENTRYTYPE_REGION)
+ for (auto & elem : m_current_part->m_romdata)
+ if (elem._name != nullptr && strcmp(elem._name, name) == 0)
parse_error("Duplicated dataarea %s in software %s", name, infoname());
// create the new entry and append it
@@ -852,12 +852,12 @@ void softlist_parser::end_handler(void *data, const char *name)
break;
case POS_MAIN:
- state->m_current_info = NULL;
+ state->m_current_info = nullptr;
break;
case POS_SOFT:
state->parse_soft_end(name);
- state->m_current_part = NULL;
+ state->m_current_part = nullptr;
break;
case POS_PART:
@@ -906,10 +906,10 @@ void softlist_parser::parse_root_start(const char *tagname, const char **attribu
if (strcmp(tagname, "softwarelist") == 0)
{
static const char *attrnames[] = { "name", "description" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
- if (attrvalues[1] != NULL)
+ if (attrvalues[1] != nullptr)
m_list.m_description = m_list.add_string(attrvalues[1]);
}
else
@@ -928,10 +928,10 @@ void softlist_parser::parse_main_start(const char *tagname, const char **attribu
if (strcmp(tagname, "software") == 0)
{
static const char *attrnames[] = { "name", "cloneof", "supported" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
- if (attrvalues[0] != NULL)
+ if (attrvalues[0] != nullptr)
m_current_info = &m_list.m_infolist.append(*global_alloc(software_info(m_list, m_list.add_string(attrvalues[0]), m_list.add_string(attrvalues[1]), attrvalues[2])));
else
parse_error("No name defined for item");
@@ -949,7 +949,7 @@ void softlist_parser::parse_main_start(const char *tagname, const char **attribu
void softlist_parser::parse_soft_start(const char *tagname, const char **attributes)
{
// get the current info; error if none
- if (m_current_info == NULL)
+ if (m_current_info == nullptr)
{
parse_error("Tag %s found outside of software context", tagname);
return;
@@ -971,10 +971,10 @@ void softlist_parser::parse_soft_start(const char *tagname, const char **attribu
else if (strcmp(tagname, "info") == 0)
{
static const char *attrnames[] = { "name", "value" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
- if (attrvalues[0] != NULL && attrvalues[1] != NULL)
+ if (attrvalues[0] != nullptr && attrvalues[1] != nullptr)
m_current_info->m_other_info.append(*global_alloc(feature_list_item(m_list.add_string(attrvalues[0]), m_list.add_string(attrvalues[1]))));
else
parse_error("Incomplete other_info definition");
@@ -984,10 +984,10 @@ void softlist_parser::parse_soft_start(const char *tagname, const char **attribu
else if (strcmp(tagname, "sharedfeat") == 0)
{
static const char *attrnames[] = { "name", "value" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
- if (attrvalues[0] != NULL && attrvalues[1] != NULL)
+ if (attrvalues[0] != nullptr && attrvalues[1] != nullptr)
m_current_info->m_shared_info.append(*global_alloc(feature_list_item(m_list.add_string(attrvalues[0]), m_list.add_string(attrvalues[1]))));
else
parse_error("Incomplete sharedfeat definition");
@@ -997,10 +997,10 @@ void softlist_parser::parse_soft_start(const char *tagname, const char **attribu
else if (strcmp(tagname, "part" ) == 0)
{
static const char *attrnames[] = { "name", "interface" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
- if (attrvalues[0] != NULL && attrvalues[1] != NULL && strcmp(attrvalues[0], "") != 0 && strcmp(attrvalues[1], "") != 0)
+ if (attrvalues[0] != nullptr && attrvalues[1] != nullptr && strcmp(attrvalues[0], "") != 0 && strcmp(attrvalues[1], "") != 0)
m_current_part = &m_current_info->m_partdata.append(*global_alloc(software_part(*m_current_info, m_list.add_string(attrvalues[0]), m_list.add_string(attrvalues[1]))));
else
parse_error("Incomplete part definition");
@@ -1018,7 +1018,7 @@ void softlist_parser::parse_soft_start(const char *tagname, const char **attribu
void softlist_parser::parse_part_start(const char *tagname, const char **attributes)
{
// get the current part; error if none
- if (m_current_part == NULL)
+ if (m_current_part == nullptr)
{
parse_error("Tag %s found outside of part context", tagname);
return;
@@ -1028,17 +1028,17 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu
if (strcmp(tagname, "dataarea") == 0)
{
static const char *attrnames[] = { "name", "size", "width", "endianness" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
- if (attrvalues[0] != NULL && attrvalues[1] != NULL && strcmp(attrvalues[0], "") != 0 && strcmp(attrvalues[1], "") != 0)
+ if (attrvalues[0] != nullptr && attrvalues[1] != nullptr && strcmp(attrvalues[0], "") != 0 && strcmp(attrvalues[1], "") != 0)
{
// handle region attributes
const char *width = attrvalues[2];
const char *endianness = attrvalues[3];
UINT32 regionflags = ROMENTRYTYPE_REGION;
- if (width != NULL)
+ if (width != nullptr)
{
if (strcmp(width, "8") == 0)
regionflags |= ROMREGION_8BIT;
@@ -1051,7 +1051,7 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu
else
parse_error("Invalid dataarea width");
}
- if (endianness != NULL)
+ if (endianness != nullptr)
{
if (strcmp(endianness, "little") == 0)
regionflags |= ROMREGION_LE;
@@ -1061,7 +1061,7 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu
parse_error("Invalid dataarea endianness");
}
- add_rom_entry(attrvalues[0], NULL, 0, strtol(attrvalues[1], NULL, 0), regionflags);
+ add_rom_entry(attrvalues[0], nullptr, 0, strtol(attrvalues[1], nullptr, 0), regionflags);
}
else
parse_error("Incomplete dataarea definition");
@@ -1071,11 +1071,11 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu
else if (strcmp(tagname, "diskarea") == 0)
{
static const char *attrnames[] = { "name" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
- if (attrvalues[0] != NULL)
- add_rom_entry(attrvalues[0], NULL, 0, 1, ROMENTRYTYPE_REGION | ROMREGION_DATATYPEDISK);
+ if (attrvalues[0] != nullptr)
+ add_rom_entry(attrvalues[0], nullptr, 0, 1, ROMENTRYTYPE_REGION | ROMREGION_DATATYPEDISK);
else
parse_error("Incomplete diskarea definition");
}
@@ -1084,10 +1084,10 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu
else if (strcmp(tagname, "feature") == 0)
{
static const char *attrnames[] = { "name", "value" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
- if (attrvalues[0] != NULL)
+ if (attrvalues[0] != nullptr)
m_current_part->m_featurelist.append(*global_alloc(feature_list_item(m_list.add_string(attrvalues[0]), m_list.add_string(attrvalues[1]))));
else
parse_error("Incomplete feature definition");
@@ -1109,7 +1109,7 @@ void softlist_parser::parse_part_start(const char *tagname, const char **attribu
void softlist_parser::parse_data_start(const char *tagname, const char **attributes)
{
// get the current part; error if none
- if (m_current_part == NULL)
+ if (m_current_part == nullptr)
{
parse_error("Tag %s found outside of part context", tagname);
return;
@@ -1119,7 +1119,7 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
if (strcmp(tagname, "rom") == 0)
{
static const char *attrnames[] = { "name", "size", "crc", "sha1", "offset", "value", "status", "loadflag" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
const char *name = attrvalues[0];
@@ -1130,34 +1130,34 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
const char *value = attrvalues[5];
const char *status = attrvalues[6];
const char *loadflag = attrvalues[7];
- if (sizestr != NULL && offsetstr != NULL)
+ if (sizestr != nullptr && offsetstr != nullptr)
{
- UINT32 length = strtol(sizestr, NULL, 0);
- UINT32 offset = strtol(offsetstr, NULL, 0);
-
- if (loadflag != NULL && strcmp(loadflag, "reload") == 0)
- add_rom_entry(NULL, NULL, offset, length, ROMENTRYTYPE_RELOAD | ROM_INHERITFLAGS);
- else if (loadflag != NULL && strcmp(loadflag, "reload_plain") == 0)
- add_rom_entry(NULL, NULL, offset, length, ROMENTRYTYPE_RELOAD);
- else if (loadflag != NULL && strcmp(loadflag, "continue") == 0)
- add_rom_entry(NULL, NULL, offset, length, ROMENTRYTYPE_CONTINUE | ROM_INHERITFLAGS);
- else if (loadflag != NULL && strcmp(loadflag, "fill") == 0)
- add_rom_entry(NULL, (const char *)(FPTR)(strtol(value, NULL, 0) & 0xff), offset, length, ROMENTRYTYPE_FILL);
- else if (name != NULL)
+ UINT32 length = strtol(sizestr, nullptr, 0);
+ UINT32 offset = strtol(offsetstr, nullptr, 0);
+
+ if (loadflag != nullptr && strcmp(loadflag, "reload") == 0)
+ add_rom_entry(nullptr, nullptr, offset, length, ROMENTRYTYPE_RELOAD | ROM_INHERITFLAGS);
+ else if (loadflag != nullptr && strcmp(loadflag, "reload_plain") == 0)
+ 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, "fill") == 0)
+ add_rom_entry(nullptr, (const char *)(FPTR)(strtol(value, nullptr, 0) & 0xff), offset, length, ROMENTRYTYPE_FILL);
+ else if (name != nullptr)
{
- bool baddump = (status != NULL && strcmp(status, "baddump") == 0);
- bool nodump = (status != NULL && strcmp(status, "nodump") == 0);
+ bool baddump = (status != nullptr && strcmp(status, "baddump") == 0);
+ bool nodump = (status != nullptr && strcmp(status, "nodump") == 0);
std::string hashdata;
if (nodump)
{
strprintf(hashdata, "%s", NO_DUMP);
- if (crc != NULL && sha1 != NULL)
+ if (crc != nullptr && sha1 != nullptr)
parse_error("No need for hash definition");
}
else
{
- if (crc != NULL && sha1 != NULL)
+ if (crc != nullptr && sha1 != nullptr)
strprintf(hashdata, "%c%s%c%s%s", hash_collection::HASH_CRC, crc, hash_collection::HASH_SHA1, sha1, (baddump ? BAD_DUMP : ""));
else
parse_error("Incomplete rom hash definition");
@@ -1165,15 +1165,15 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
// Handle loadflag attribute
int romflags = 0;
- if (loadflag != NULL && strcmp(loadflag, "load16_word_swap") == 0)
+ if (loadflag != nullptr && strcmp(loadflag, "load16_word_swap") == 0)
romflags = ROM_GROUPWORD | ROM_REVERSE;
- else if (loadflag != NULL && strcmp(loadflag, "load16_byte") == 0)
+ else if (loadflag != nullptr && strcmp(loadflag, "load16_byte") == 0)
romflags = ROM_SKIP(1);
- else if (loadflag != NULL && strcmp(loadflag, "load32_word_swap") == 0)
+ else if (loadflag != nullptr && strcmp(loadflag, "load32_word_swap") == 0)
romflags = ROM_GROUPWORD | ROM_REVERSE | ROM_SKIP(2);
- else if (loadflag != NULL && strcmp(loadflag, "load32_word") == 0)
+ else if (loadflag != nullptr && strcmp(loadflag, "load32_word") == 0)
romflags = ROM_GROUPWORD | ROM_SKIP(2);
- else if (loadflag != NULL && strcmp(loadflag, "load32_byte") == 0)
+ else if (loadflag != nullptr && strcmp(loadflag, "load32_byte") == 0)
romflags = ROM_SKIP(3);
add_rom_entry(name, hashdata.c_str(), offset, length, ROMENTRYTYPE_ROM | romflags);
@@ -1189,24 +1189,24 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
else if (strcmp(tagname, "disk") == 0)
{
static const char *attrnames[] = { "name", "sha1", "status", "writeable" };
- const char *attrvalues[ARRAY_LENGTH(attrnames)] = { 0 };
+ const char *attrvalues[ARRAY_LENGTH(attrnames)] = { nullptr };
parse_attributes(attributes, ARRAY_LENGTH(attrnames), attrnames, attrvalues);
const char *name = attrvalues[0];
const char *sha1 = attrvalues[1];
const char *status = attrvalues[2];
const char *writeablestr = attrvalues[3];
- if (name != NULL && sha1 != NULL)
+ if (name != nullptr && sha1 != nullptr)
{
- bool baddump = (status != NULL && strcmp(status, "baddump") == 0);
- bool nodump = (status != NULL && strcmp(status, "nodump" ) == 0);
- bool writeable = (writeablestr != NULL && strcmp(writeablestr, "yes") == 0);
+ bool baddump = (status != nullptr && strcmp(status, "baddump") == 0);
+ bool nodump = (status != nullptr && strcmp(status, "nodump" ) == 0);
+ bool writeable = (writeablestr != nullptr && strcmp(writeablestr, "yes") == 0);
std::string hashdata;
strprintf(hashdata, "%c%s%s", hash_collection::HASH_SHA1, sha1, (nodump ? NO_DUMP : (baddump ? BAD_DUMP : "")));
add_rom_entry(name, hashdata.c_str(), 0, 0, ROMENTRYTYPE_ROM | (writeable ? DISK_READWRITE : DISK_READONLY));
}
- else if (status == NULL || !strcmp(status, "nodump")) // a no_dump chd is not an incomplete entry
+ else if (status == nullptr || !strcmp(status, "nodump")) // a no_dump chd is not an incomplete entry
parse_error("Incomplete disk definition");
}
@@ -1225,7 +1225,7 @@ void softlist_parser::parse_data_start(const char *tagname, const char **attribu
void softlist_parser::parse_soft_end(const char *tagname)
{
- assert(m_current_info != NULL);
+ assert(m_current_info != nullptr);
// <description>
if (strcmp(tagname, "description") == 0)
@@ -1243,18 +1243,18 @@ void softlist_parser::parse_soft_end(const char *tagname)
else if (strcmp(tagname, "part") == 0)
{
// get the last part
- assert(m_current_part != NULL);
- if (m_current_part == NULL)
+ assert(m_current_part != nullptr);
+ if (m_current_part == nullptr)
return;
// was any dataarea/rom information encountered? if so, add a terminator
- if (m_current_part->romdata() != NULL)
- add_rom_entry(NULL, NULL, 0, 0, ROMENTRYTYPE_END);
+ if (m_current_part->romdata() != nullptr)
+ add_rom_entry(nullptr, nullptr, 0, 0, ROMENTRYTYPE_END);
// get the info; if present, copy shared data (we assume name/value strings live
// in the string pool and don't need to be reallocated)
- if (m_current_info != NULL)
- for (feature_list_item *item = m_current_info->shared_info(); item != NULL; item = item->next())
+ if (m_current_info != nullptr)
+ for (feature_list_item *item = m_current_info->shared_info(); item != nullptr; item = item->next())
m_current_part->m_featurelist.append(*global_alloc(feature_list_item(item->name(), item->value())));
}
}
diff --git a/src/emu/softlist.h b/src/emu/softlist.h
index b500ab4f018..63ce6f0da20 100644
--- a/src/emu/softlist.h
+++ b/src/emu/softlist.h
@@ -76,8 +76,8 @@ class feature_list_item
public:
// construction/destruction
- feature_list_item(const char *name = NULL, const char *value = NULL)
- : m_next(NULL),
+ feature_list_item(const char *name = nullptr, const char *value = nullptr)
+ : m_next(nullptr),
m_name(name),
m_value(value) { }
@@ -104,7 +104,7 @@ class software_part
public:
// construction/destruction
- software_part(software_info &info, const char *name = NULL, const char *interface = NULL);
+ software_part(software_info &info, const char *name = nullptr, const char *interface = nullptr);
// getters
software_part *next() const { return m_next; }
@@ -112,7 +112,7 @@ public:
const char *name() const { return m_name; }
const char *interface() const { return m_interface; }
feature_list_item *featurelist() const { return m_featurelist.first(); }
- rom_entry *romdata(unsigned int index = 0) { return (index < m_romdata.size()) ? &m_romdata[index] : NULL; }
+ rom_entry *romdata(unsigned int index = 0) { return (index < m_romdata.size()) ? &m_romdata[index] : nullptr; }
// helpers
bool is_compatible(const software_list_device &swlist) const;
@@ -158,7 +158,7 @@ public:
software_part *last_part() const { return m_partdata.last(); }
// additional operations
- software_part *find_part(const char *partname, const char *interface = NULL);
+ software_part *find_part(const char *partname, const char *interface = nullptr);
bool has_multiple_parts(const char *interface) const;
private:
@@ -205,7 +205,7 @@ public:
const char *errors_string() { if (!m_parsed) parse(); return m_errors.c_str(); }
// operations
- software_info *find(const char *look_for, software_info *prev = NULL);
+ software_info *find(const char *look_for, software_info *prev = nullptr);
software_info *first_software_info() { if (!m_parsed) parse(); return m_infolist.first(); }
void find_approx_matches(const char *name, int matches, software_info **list, const char *interface);
void release();
@@ -224,8 +224,8 @@ protected:
void internal_validity_check(validity_checker &valid) ATTR_COLD;
// device-level overrides
- virtual void device_start();
- virtual void device_validity_check(validity_checker &valid) const ATTR_COLD;
+ virtual void device_start() override;
+ virtual void device_validity_check(validity_checker &valid) const override ATTR_COLD;
// configuration state
std::string m_list_name;
diff --git a/src/emu/sound.cpp b/src/emu/sound.cpp
index f24fb56980b..dbfc8813ec7 100644
--- a/src/emu/sound.cpp
+++ b/src/emu/sound.cpp
@@ -50,7 +50,7 @@ const attotime sound_manager::STREAMS_UPDATE_ATTOTIME = attotime::from_hz(STREAM
sound_stream::sound_stream(device_t &device, int inputs, int outputs, int sample_rate, stream_update_delegate callback)
: m_device(device),
- m_next(NULL),
+ m_next(nullptr),
m_sample_rate(sample_rate),
m_new_sample_rate(0),
m_attoseconds_per_sample(0),
@@ -64,7 +64,7 @@ sound_stream::sound_stream(device_t &device, int inputs, int outputs, int sample
m_output_sampindex(0),
m_output_update_sampindex(0),
m_output_base_sampindex(0),
- m_callback(callback)
+ m_callback(std::move(callback))
{
// get the device's sound interface
device_sound_interface *sound;
@@ -100,7 +100,7 @@ sound_stream::sound_stream(device_t &device, int inputs, int outputs, int sample
m_sync_timer = m_device.machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sound_stream::sync_update), this));
}
else
- m_sync_timer = NULL;
+ m_sync_timer = nullptr;
// force an update to the sample rates; this will cause everything to be recomputed
// and will generate the initial resample buffers for our inputs
@@ -170,7 +170,7 @@ const char *sound_stream::input_name(int inputnum, std::string &str) const
strprintf(str, "%s '%s': ", m_device.name(), m_device.tag());
// if we have a source, indicate where the sound comes from by device name and tag
- if (m_input[inputnum].m_source != NULL && m_input[inputnum].m_source->m_stream != NULL)
+ if (m_input[inputnum].m_source != nullptr && m_input[inputnum].m_source->m_stream != nullptr)
{
device_t &source = m_input[inputnum].m_source->m_stream->device();
strcatprintf(str, "%s '%s'", source.name(), source.tag());
@@ -183,7 +183,7 @@ const char *sound_stream::input_name(int inputnum, std::string &str) const
// then look for a match on the output number
sound_stream *outstream;
int streamoutputnum;
- for (int outputnum = 0; (outstream = sound->output_to_stream_output(outputnum, streamoutputnum)) != NULL; outputnum++)
+ for (int outputnum = 0; (outstream = sound->output_to_stream_output(outputnum, streamoutputnum)) != nullptr; outputnum++)
if (outstream == m_input[inputnum].m_source->m_stream && m_input[inputnum].m_source == &outstream->m_output[streamoutputnum])
{
strcatprintf(str, " Ch.%d", outputnum);
@@ -203,7 +203,7 @@ const char *sound_stream::input_name(int inputnum, std::string &str) const
device_t *sound_stream::input_source_device(int inputnum) const
{
assert(inputnum >= 0 && inputnum < m_input.size());
- return (m_input[inputnum].m_source != NULL) ? &m_input[inputnum].m_source->m_stream->device() : NULL;
+ return (m_input[inputnum].m_source != nullptr) ? &m_input[inputnum].m_source->m_stream->device() : nullptr;
}
@@ -215,7 +215,7 @@ device_t *sound_stream::input_source_device(int inputnum) const
int sound_stream::input_source_outputnum(int inputnum) const
{
assert(inputnum >= 0 && inputnum < m_input.size());
- return (m_input[inputnum].m_source != NULL) ? (m_input[inputnum].m_source - &m_input[inputnum].m_source->m_stream->m_output[0]) : -1;
+ return (m_input[inputnum].m_source != nullptr) ? (m_input[inputnum].m_source - &m_input[inputnum].m_source->m_stream->m_output[0]) : -1;
}
@@ -233,21 +233,21 @@ void sound_stream::set_input(int index, sound_stream *input_stream, int output_i
fatalerror("Fatal error: stream_set_input attempted to configure non-existant input %d (%d max)\n", index, int(m_input.size()));
// make sure it's a valid output
- if (input_stream != NULL && output_index >= input_stream->m_output.size())
+ if (input_stream != nullptr && output_index >= input_stream->m_output.size())
fatalerror("Fatal error: stream_set_input attempted to use a non-existant output %d (%d max)\n", output_index, int(m_output.size()));
// if this input is already wired, update the dependent info
stream_input &input = m_input[index];
- if (input.m_source != NULL)
+ if (input.m_source != nullptr)
input.m_source->m_dependents--;
// wire it up
- input.m_source = (input_stream != NULL) ? &input_stream->m_output[output_index] : NULL;
+ input.m_source = (input_stream != nullptr) ? &input_stream->m_output[output_index] : nullptr;
input.m_gain = int(0x100 * gain);
input.m_user_gain = 0x100;
// update the dependent info
- if (input.m_source != NULL)
+ if (input.m_source != nullptr)
input.m_source->m_dependents++;
// update sample rates now that we know the input
@@ -402,9 +402,9 @@ void sound_stream::update_with_accounting(bool second_tick)
{
// if we have samples to move, do so for each output
if (output_bufindex > 0)
- for (unsigned int outputnum = 0; outputnum < m_output.size(); outputnum++)
+ for (auto & output : m_output)
{
- stream_output &output = m_output[outputnum];
+
memmove(&output.m_buffer[0], &output.m_buffer[samples_to_lose], sizeof(output.m_buffer[0]) * (output_bufindex - samples_to_lose));
}
@@ -440,8 +440,8 @@ void sound_stream::apply_sample_rate_changes()
m_output_base_sampindex = m_output_sampindex - m_max_samples_per_update;
// clear out the buffer
- for (unsigned int outputnum = 0; outputnum < m_output.size(); outputnum++)
- memset(&m_output[outputnum].m_buffer[0], 0, m_max_samples_per_update * sizeof(m_output[outputnum].m_buffer[0]));
+ for (auto & elem : m_output)
+ memset(&elem.m_buffer[0], 0, m_max_samples_per_update * sizeof(elem.m_buffer[0]));
}
@@ -457,10 +457,10 @@ void sound_stream::recompute_sample_rate_data()
{
m_sample_rate = 0;
// When synchronous, pick the sample rate for the inputs, if any
- for (unsigned int inputnum = 0; inputnum < m_input.size(); inputnum++)
+ for (auto & input : m_input)
{
- stream_input &input = m_input[inputnum];
- if (input.m_source != NULL)
+
+ if (input.m_source != nullptr)
{
if (!m_sample_rate)
m_sample_rate = input.m_source->m_stream->m_sample_rate;
@@ -483,11 +483,11 @@ void sound_stream::recompute_sample_rate_data()
allocate_output_buffers();
// iterate over each input
- for (unsigned int inputnum = 0; inputnum < m_input.size(); inputnum++)
+ for (auto & input : m_input)
{
// if we have a source, see if its sample rate changed
- stream_input &input = m_input[inputnum];
- if (input.m_source != NULL)
+
+ if (input.m_source != nullptr)
{
// okay, we have a new sample rate; recompute the latency to be the maximum
// sample period between us and our input
@@ -537,10 +537,10 @@ void sound_stream::allocate_resample_buffers()
m_resample_bufalloc = bufsize;
// iterate over outputs and realloc their buffers
- for (unsigned int inputnum = 0; inputnum < m_input.size(); inputnum++) {
- unsigned int old_size = m_input[inputnum].m_resample.size();
- m_input[inputnum].m_resample.resize(m_resample_bufalloc);
- memset(&m_input[inputnum].m_resample[old_size], 0, (m_resample_bufalloc - old_size)*sizeof(m_input[inputnum].m_resample[0]));
+ for (auto & elem : m_input) {
+ unsigned int old_size = elem.m_resample.size();
+ elem.m_resample.resize(m_resample_bufalloc);
+ memset(&elem.m_resample[old_size], 0, (m_resample_bufalloc - old_size)*sizeof(elem.m_resample[0]));
}
}
}
@@ -561,10 +561,10 @@ void sound_stream::allocate_output_buffers()
m_output_bufalloc = bufsize;
// iterate over outputs and realloc their buffers
- for (unsigned int outputnum = 0; outputnum < m_output.size(); outputnum++) {
- unsigned int old_size = m_output[outputnum].m_buffer.size();
- m_output[outputnum].m_buffer.resize(m_output_bufalloc);
- memset(&m_output[outputnum].m_buffer[old_size], 0, (m_output_bufalloc - old_size)*sizeof(m_output[outputnum].m_buffer[0]));
+ for (auto & elem : m_output) {
+ unsigned int old_size = elem.m_buffer.size();
+ elem.m_buffer.resize(m_output_bufalloc);
+ memset(&elem.m_buffer[old_size], 0, (m_output_bufalloc - old_size)*sizeof(elem.m_buffer[0]));
}
}
}
@@ -580,8 +580,8 @@ void sound_stream::postload()
recompute_sample_rate_data();
// make sure our output buffers are fully cleared
- for (unsigned int outputnum = 0; outputnum < m_output.size(); outputnum++)
- memset(&m_output[outputnum].m_buffer[0], 0, m_output_bufalloc * sizeof(m_output[outputnum].m_buffer[0]));
+ for (auto & elem : m_output)
+ memset(&elem.m_buffer[0], 0, m_output_bufalloc * sizeof(elem.m_buffer[0]));
// recompute the sample indexes to make sense
m_output_sampindex = m_device.machine().sound().last_update().attoseconds() / m_attoseconds_per_sample;
@@ -599,8 +599,8 @@ void sound_stream::postload()
void sound_stream::generate_samples(int samples)
{
- stream_sample_t **inputs = NULL;
- stream_sample_t **outputs = NULL;
+ stream_sample_t **inputs = nullptr;
+ stream_sample_t **outputs = nullptr;
// if we're already there, skip it
if (samples <= 0)
return;
@@ -612,7 +612,7 @@ void sound_stream::generate_samples(int samples)
{
// update the stream to the current time
stream_input &input = m_input[inputnum];
- if (input.m_source != NULL)
+ if (input.m_source != nullptr)
input.m_source->m_stream->update();
// generate the resampled data
@@ -652,7 +652,7 @@ stream_sample_t *sound_stream::generate_resampled_data(stream_input &input, UINT
{
// if we don't have an output to pull data from, generate silence
stream_sample_t *dest = &input.m_resample[0];
- if (input.m_source == NULL)
+ if (input.m_source == nullptr)
{
memset(dest, 0, numsamples * sizeof(*dest));
return &input.m_resample[0];
@@ -773,7 +773,7 @@ stream_sample_t *sound_stream::generate_resampled_data(stream_input &input, UINT
//-------------------------------------------------
sound_stream::stream_input::stream_input()
- : m_source(NULL),
+ : m_source(nullptr),
m_latency_attoseconds(0),
m_gain(0x100),
m_user_gain(0x100)
@@ -791,7 +791,7 @@ sound_stream::stream_input::stream_input()
//-------------------------------------------------
sound_stream::stream_output::stream_output()
- : m_stream(NULL),
+ : m_stream(nullptr),
m_dependents(0),
m_gain(0x100)
{
@@ -809,7 +809,7 @@ sound_stream::stream_output::stream_output()
sound_manager::sound_manager(running_machine &machine)
: m_machine(machine),
- m_update_timer(NULL),
+ m_update_timer(nullptr),
m_finalmix_leftover(0),
m_finalmix(machine.sample_rate()),
m_leftmix(machine.sample_rate()),
@@ -817,7 +817,7 @@ sound_manager::sound_manager(running_machine &machine)
m_muted(0),
m_attenuation(0),
m_nosound_mode(machine.osd().no_sound()),
- m_wavfile(NULL),
+ m_wavfile(nullptr),
m_update_attoseconds(STREAMS_UPDATE_ATTOTIME.attoseconds()),
m_last_update(attotime::zero)
{
@@ -864,9 +864,9 @@ sound_manager::sound_manager(running_machine &machine)
sound_manager::~sound_manager()
{
// close any open WAV file
- if (m_wavfile != NULL)
+ if (m_wavfile != nullptr)
wav_close(m_wavfile);
- m_wavfile = NULL;
+ m_wavfile = nullptr;
}
@@ -901,12 +901,12 @@ bool sound_manager::indexed_mixer_input(int index, mixer_input &info) const
{
// scan through the mixers until we find the indexed input
mixer_interface_iterator iter(machine().root_device());
- for (info.mixer = iter.first(); info.mixer != NULL; info.mixer = iter.next())
+ for (info.mixer = iter.first(); info.mixer != nullptr; info.mixer = iter.next())
{
if (index < info.mixer->inputs())
{
info.stream = info.mixer->input_to_stream_input(index, info.inputnum);
- assert(info.stream != NULL);
+ assert(info.stream != nullptr);
return true;
}
index -= info.mixer->inputs();
@@ -939,7 +939,7 @@ void sound_manager::reset()
{
// reset all the sound chips
sound_interface_iterator iter(machine().root_device());
- for (device_sound_interface *sound = iter.first(); sound != NULL; sound = iter.next())
+ for (device_sound_interface *sound = iter.first(); sound != nullptr; sound = iter.next())
sound->device().reset();
}
@@ -976,11 +976,11 @@ void sound_manager::config_load(int config_type, xml_data_node *parentnode)
return;
// might not have any data
- if (parentnode == NULL)
+ if (parentnode == nullptr)
return;
// iterate over channel nodes
- for (xml_data_node *channelnode = xml_get_sibling(parentnode->child, "channel"); channelnode != NULL; channelnode = xml_get_sibling(channelnode->next, "channel"))
+ for (xml_data_node *channelnode = xml_get_sibling(parentnode->child, "channel"); channelnode != nullptr; channelnode = xml_get_sibling(channelnode->next, "channel"))
{
mixer_input info;
if (indexed_mixer_input(xml_get_attribute_int(channelnode, "index", -1), info))
@@ -1006,7 +1006,7 @@ void sound_manager::config_save(int config_type, xml_data_node *parentnode)
return;
// iterate over mixer channels
- if (parentnode != NULL)
+ if (parentnode != nullptr)
for (int mixernum = 0; ; mixernum++)
{
mixer_input info;
@@ -1016,8 +1016,8 @@ void sound_manager::config_save(int config_type, xml_data_node *parentnode)
if (newvol != 1.0f)
{
- xml_data_node *channelnode = xml_add_child(parentnode, "channel", NULL);
- if (channelnode != NULL)
+ xml_data_node *channelnode = xml_add_child(parentnode, "channel", nullptr);
+ if (channelnode != nullptr)
{
xml_set_attribute_int(channelnode, "index", mixernum);
xml_set_attribute_float(channelnode, "newvol", newvol);
@@ -1041,7 +1041,7 @@ void sound_manager::update(void *ptr, int param)
// force all the speaker streams to generate the proper number of samples
int samples_this_update = 0;
speaker_device_iterator iter(machine().root_device());
- for (speaker_device *speaker = iter.first(); speaker != NULL; speaker = iter.next())
+ for (speaker_device *speaker = iter.first(); speaker != nullptr; speaker = iter.next())
speaker->mix(&m_leftmix[0], &m_rightmix[0], samples_this_update, (m_muted & MUTE_REASON_SYSTEM));
// now downmix the final result
@@ -1077,7 +1077,7 @@ void sound_manager::update(void *ptr, int param)
if (!m_nosound_mode)
machine().osd().update_audio_stream(finalmix, finalmix_offset / 2);
machine().video().add_sound_to_recording(finalmix, finalmix_offset / 2);
- if (m_wavfile != NULL)
+ if (m_wavfile != nullptr)
wav_add_data_16(m_wavfile, finalmix, finalmix_offset);
}
@@ -1091,14 +1091,14 @@ void sound_manager::update(void *ptr, int param)
}
// iterate over all the streams and update them
- for (sound_stream *stream = m_stream_list.first(); stream != NULL; stream = stream->next())
+ for (sound_stream *stream = m_stream_list.first(); stream != nullptr; stream = stream->next())
stream->update_with_accounting(second_tick);
// remember the update time
m_last_update = curtime;
// update sample rates if they have changed
- for (sound_stream *stream = m_stream_list.first(); stream != NULL; stream = stream->next())
+ for (sound_stream *stream = m_stream_list.first(); stream != nullptr; stream = stream->next())
stream->apply_sample_rate_changes();
g_profiler.stop();
diff --git a/src/emu/sound.h b/src/emu/sound.h
index 557d4242fa6..50c94486eb3 100644
--- a/src/emu/sound.h
+++ b/src/emu/sound.h
@@ -225,7 +225,7 @@ private:
void config_load(int config_type, xml_data_node *parentnode);
void config_save(int config_type, xml_data_node *parentnode);
- void update(void *ptr = NULL, INT32 param = 0);
+ void update(void *ptr = nullptr, INT32 param = 0);
// internal state
running_machine & m_machine; // reference to our machine
diff --git a/src/emu/sound/filter.cpp b/src/emu/sound/filter.cpp
index 4893c29c005..9473a8b720d 100644
--- a/src/emu/sound/filter.cpp
+++ b/src/emu/sound/filter.cpp
@@ -4,7 +4,7 @@
#include "filter.h"
static filter* filter_alloc(void) {
- filter* f = global_alloc(filter);
+ auto f = global_alloc(filter);
return f;
}
@@ -22,7 +22,7 @@ void filter_state_reset(filter* f, filter_state* s) {
filter_state* filter_state_alloc(void) {
int i;
- filter_state* s = global_alloc(filter_state);
+ auto s = global_alloc(filter_state);
s->prev_mac = 0;
for(i=0;i<FILTER_ORDER_MAX;++i)
s->xprev[i] = 0;
diff --git a/src/emu/sound/wavwrite.cpp b/src/emu/sound/wavwrite.cpp
index baf5498f02c..210b1bcc9d5 100644
--- a/src/emu/sound/wavwrite.cpp
+++ b/src/emu/sound/wavwrite.cpp
@@ -20,14 +20,14 @@ wav_file *wav_open(const char *filename, int sample_rate, int channels)
/* allocate memory for the wav struct */
wav = (wav_file *) global_alloc(wav_file);
if (!wav)
- return NULL;
+ return nullptr;
/* create the file */
wav->file = fopen(filename, "wb");
if (!wav->file)
{
global_free(wav);
- return NULL;
+ return nullptr;
}
/* write the 'RIFF' header */
diff --git a/src/emu/speaker.cpp b/src/emu/speaker.cpp
index c525ff2cbc6..485a6be73ca 100644
--- a/src/emu/speaker.cpp
+++ b/src/emu/speaker.cpp
@@ -90,7 +90,7 @@ void speaker_device::static_set_position(device_t &device, double x, double y, d
void speaker_device::mix(INT32 *leftmix, INT32 *rightmix, int &samples_this_update, bool suppress)
{
// skip if no stream
- if (m_mixer_stream == NULL)
+ if (m_mixer_stream == nullptr)
return;
// update the stream, getting the start/end pointers around the operation
diff --git a/src/emu/speaker.h b/src/emu/speaker.h
index 1b9103beb01..dc814a26911 100644
--- a/src/emu/speaker.h
+++ b/src/emu/speaker.h
@@ -68,7 +68,7 @@ public:
protected:
// device-level overrides
- virtual void device_start() ATTR_COLD;
+ virtual void device_start() override ATTR_COLD;
// inline configuration state
double m_x;
diff --git a/src/emu/sprite.cpp b/src/emu/sprite.cpp
index f96d483beeb..7567f0dd0ac 100644
--- a/src/emu/sprite.cpp
+++ b/src/emu/sprite.cpp
@@ -114,7 +114,7 @@ sparse_dirty_rect *sparse_dirty_bitmap::first_dirty_rect(const rectangle &clipre
for (int y = sy; y <= ey; y++)
{
UINT8 *dirtybase = &m_bitmap.pix(y);
- sparse_dirty_rect *currect = NULL;
+ sparse_dirty_rect *currect = nullptr;
// loop over all grid columns that intersect our cliprect
for (int x = sx; x <= ex; x++)
@@ -122,14 +122,14 @@ sparse_dirty_rect *sparse_dirty_bitmap::first_dirty_rect(const rectangle &clipre
// if this tile is not dirty, end our current run and continue
if (!dirtybase[x])
{
- if (currect != NULL)
+ if (currect != nullptr)
*currect &= cliprect;
- currect = NULL;
+ currect = nullptr;
continue;
}
// if we can't add to an existing rect, create a new one
- if (currect == NULL)
+ if (currect == nullptr)
{
// allocate a new rect and add it to the list
currect = &m_rect_list.append(*m_rect_allocator.alloc());
@@ -147,7 +147,7 @@ sparse_dirty_rect *sparse_dirty_bitmap::first_dirty_rect(const rectangle &clipre
}
// clip the last rect to the cliprect
- if (currect != NULL)
+ if (currect != nullptr)
*currect &= cliprect;
}
diff --git a/src/emu/sprite.h b/src/emu/sprite.h
index b61f5e07f3b..f10537f9900 100644
--- a/src/emu/sprite.h
+++ b/src/emu/sprite.h
@@ -24,7 +24,7 @@ class sparse_dirty_rect : public rectangle
friend class simple_list<sparse_dirty_rect>;
public:
- sparse_dirty_rect(): m_next(NULL) { }
+ sparse_dirty_rect(): m_next(nullptr) { }
// getters
const sparse_dirty_rect *next() const { return m_next; }
@@ -89,7 +89,7 @@ protected:
: device_t(mconfig, type, name, tag, owner, 0, shortname, file),
m_xorigin(0),
m_yorigin(0),
- m_spriteram(NULL),
+ m_spriteram(nullptr),
m_spriteram_bytes(0),
m_dirty(dirty_granularity)
{
@@ -126,7 +126,7 @@ public:
void clear() { clear(m_bitmap.cliprect()); }
void clear(const rectangle &cliprect)
{
- for (const sparse_dirty_rect *rect = m_dirty.first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_dirty.first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
m_bitmap.fill(~0, *rect);
m_dirty.clean(cliprect);
}
@@ -167,11 +167,11 @@ public:
protected:
// device-level overrides
- virtual void device_start()
+ virtual void device_start() override
{
// find spriteram
memory_share *spriteram = owner()->memshare(tag());
- if (spriteram != NULL)
+ if (spriteram != nullptr)
{
set_spriteram(reinterpret_cast<_SpriteRAMType *>(spriteram->ptr()), spriteram->bytes());
diff --git a/src/emu/tilemap.cpp b/src/emu/tilemap.cpp
index 43be2252666..2c7334bb068 100644
--- a/src/emu/tilemap.cpp
+++ b/src/emu/tilemap.cpp
@@ -349,8 +349,8 @@ tilemap_t &tilemap_t::init(tilemap_manager &manager, device_gfx_interface &decod
m_manager = &manager;
m_device = dynamic_cast<tilemap_device *>(this);
m_palette = decoder.palette();
- m_next = NULL;
- m_user_data = NULL;
+ m_next = nullptr;
+ m_user_data = nullptr;
// populate tilemap metrics
m_rows = rows;
@@ -409,17 +409,17 @@ tilemap_t &tilemap_t::init(tilemap_manager &manager, device_gfx_interface &decod
// save relevant state
int instance = manager.alloc_instance();
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_enable));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_attributes));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_palette_offset));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_scrollrows));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_scrollcols));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_rowscroll));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_colscroll));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_dx));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_dx_flipped));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_dy));
- machine().save().save_item(m_device, "tilemap", NULL, instance, NAME(m_dy_flipped));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_enable));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_attributes));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_palette_offset));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_scrollrows));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_scrollcols));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_rowscroll));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_colscroll));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_dx));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_dx_flipped));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_dy));
+ machine().save().save_item(m_device, "tilemap", nullptr, instance, NAME(m_dy_flipped));
// reset everything after a load
machine().save().register_postload(save_prepost_delegate(FUNC(tilemap_t::postload), this));
@@ -760,7 +760,7 @@ g_profiler.start(PROFILER_TILEMAP_UPDATE);
m_tileinfo.palette_base, m_tileinfo.category, m_tileinfo.group, flags, m_tileinfo.pen_mask);
// if mask data is specified, apply it
- if ((flags & (TILE_FORCE_LAYER0 | TILE_FORCE_LAYER1 | TILE_FORCE_LAYER2)) == 0 && m_tileinfo.mask_data != NULL)
+ if ((flags & (TILE_FORCE_LAYER0 | TILE_FORCE_LAYER1 | TILE_FORCE_LAYER2)) == 0 && m_tileinfo.mask_data != nullptr)
m_tileflags[logindex] = tile_apply_bitmask(m_tileinfo.mask_data, x0, y0, m_tileinfo.category, flags);
// track which gfx have been used for this tilemap
@@ -1124,7 +1124,7 @@ void tilemap_t::draw_instance(screen_device &screen, _BitmapClass &dest, const b
// look up priority and destination base addresses for y1
bitmap_ind8 &priority_bitmap = *blit.priority;
UINT8 *priority_baseaddr = &priority_bitmap.pix8(y1, xpos);
- typename _BitmapClass::pixel_t *dest_baseaddr = NULL;
+ typename _BitmapClass::pixel_t *dest_baseaddr = nullptr;
int dest_rowpixels = 0;
if (dest.valid())
{
@@ -1208,7 +1208,7 @@ void tilemap_t::draw_instance(screen_device &screen, _BitmapClass &dest, const b
{
for (int cury = y; cury < nexty; cury++)
{
- if (dest_baseaddr == NULL)
+ if (dest_baseaddr == nullptr)
scanline_draw_opaque_null(x_end - x_start, pmap0, blit.tilemap_priority_code);
else if (sizeof(*dest0) == 2)
scanline_draw_opaque_ind16(reinterpret_cast<UINT16 *>(dest0), source0, x_end - x_start, pmap0, blit.tilemap_priority_code);
@@ -1229,7 +1229,7 @@ void tilemap_t::draw_instance(screen_device &screen, _BitmapClass &dest, const b
const UINT8 *mask0 = mask_baseaddr + x_start;
for (int cury = y; cury < nexty; cury++)
{
- if (dest_baseaddr == NULL)
+ if (dest_baseaddr == nullptr)
scanline_draw_masked_null(mask0, blit.mask, blit.value, x_end - x_start, pmap0, blit.tilemap_priority_code);
else if (sizeof(*dest0) == 2)
scanline_draw_masked_ind16(reinterpret_cast<UINT16 *>(dest0), source0, mask0, blit.mask, blit.value, x_end - x_start, pmap0, blit.tilemap_priority_code);
@@ -1503,8 +1503,8 @@ tilemap_manager::~tilemap_manager()
while (found)
{
found = false;
- for (tilemap_t *tmap = m_tilemap_list.first(); tmap != NULL; tmap = tmap->next())
- if (tmap->device() != NULL)
+ for (tilemap_t *tmap = m_tilemap_list.first(); tmap != nullptr; tmap = tmap->next())
+ if (tmap->device() != nullptr)
{
found = true;
m_tilemap_list.detach(*tmap);
@@ -1537,14 +1537,14 @@ static const struct
tilemap_t &tilemap_manager::create(device_gfx_interface &decoder, tilemap_get_info_delegate tile_get_info, tilemap_mapper_delegate mapper, int tilewidth, int tileheight, int cols, int rows, tilemap_t *allocated)
{
- if (allocated == NULL)
+ if (allocated == nullptr)
allocated = global_alloc(tilemap_t);
return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, mapper, tilewidth, tileheight, cols, rows));
}
tilemap_t &tilemap_manager::create(device_gfx_interface &decoder, tilemap_get_info_delegate tile_get_info, tilemap_standard_mapper mapper, int tilewidth, int tileheight, int cols, int rows, tilemap_t *allocated)
{
- if (allocated == NULL)
+ if (allocated == nullptr)
allocated = global_alloc(tilemap_t);
return m_tilemap_list.append(allocated->init(*this, decoder, tile_get_info, tilemap_mapper_delegate(s_standard_mappers[mapper].func, s_standard_mappers[mapper].name, machine().driver_data()), tilewidth, tileheight, cols, rows));
}
@@ -1557,7 +1557,7 @@ tilemap_t &tilemap_manager::create(device_gfx_interface &decoder, tilemap_get_in
void tilemap_manager::set_flip_all(UINT32 attributes)
{
- for (tilemap_t *tmap = m_tilemap_list.first(); tmap != NULL; tmap = tmap->next())
+ for (tilemap_t *tmap = m_tilemap_list.first(); tmap != nullptr; tmap = tmap->next())
tmap->set_flip(attributes);
}
@@ -1569,7 +1569,7 @@ void tilemap_manager::set_flip_all(UINT32 attributes)
void tilemap_manager::mark_all_dirty()
{
- for (tilemap_t *tmap = m_tilemap_list.first(); tmap != NULL; tmap = tmap->next())
+ for (tilemap_t *tmap = m_tilemap_list.first(); tmap != nullptr; tmap = tmap->next())
tmap->mark_all_dirty();
}
@@ -1783,14 +1783,14 @@ void tilemap_device::device_start()
// find the memory, if present
const memory_share *share = memshare(tag());
- if (share != NULL)
+ if (share != nullptr)
{
m_basemem.set(*share, m_bytes_per_entry);
// look for an extension entry
std::string tag_ext = std::string(tag()).append("_ext");
share = memshare(tag_ext.c_str());
- if (share != NULL)
+ if (share != nullptr)
m_extmem.set(*share, m_bytes_per_entry);
}
diff --git a/src/emu/tilemap.h b/src/emu/tilemap.h
index 55fa4d5769a..aaba8818d53 100644
--- a/src/emu/tilemap.h
+++ b/src/emu/tilemap.h
@@ -692,8 +692,8 @@ public:
running_machine &machine() const { return m_machine; }
// tilemap creation
- tilemap_t &create(device_gfx_interface &decoder, tilemap_get_info_delegate tile_get_info, tilemap_mapper_delegate mapper, int tilewidth, int tileheight, int cols, int rows, tilemap_t *allocated = NULL);
- tilemap_t &create(device_gfx_interface &decoder, tilemap_get_info_delegate tile_get_info, tilemap_standard_mapper mapper, int tilewidth, int tileheight, int cols, int rows, tilemap_t *allocated = NULL);
+ tilemap_t &create(device_gfx_interface &decoder, tilemap_get_info_delegate tile_get_info, tilemap_mapper_delegate mapper, int tilewidth, int tileheight, int cols, int rows, tilemap_t *allocated = nullptr);
+ tilemap_t &create(device_gfx_interface &decoder, tilemap_get_info_delegate tile_get_info, tilemap_standard_mapper mapper, int tilewidth, int tileheight, int cols, int rows, tilemap_t *allocated = nullptr);
// tilemap list information
tilemap_t *find(int index) { return m_tilemap_list.find(index); }
@@ -748,7 +748,7 @@ public:
protected:
// device-level overrides
- virtual void device_start();
+ virtual void device_start() override;
private:
// devices
diff --git a/src/emu/timer.cpp b/src/emu/timer.cpp
index 7d089ca4655..605a16a7d4f 100644
--- a/src/emu/timer.cpp
+++ b/src/emu/timer.cpp
@@ -36,15 +36,15 @@ timer_device::timer_device(const machine_config &mconfig, const char *tag, devic
: device_t(mconfig, TIMER, "Timer", tag, owner, clock, "timer", __FILE__),
m_type(TIMER_TYPE_GENERIC),
m_callback(timer_device_expired_delegate()),
- m_ptr(NULL),
+ m_ptr(nullptr),
m_start_delay(attotime::zero),
m_period(attotime::zero),
m_param(0),
- m_screen_tag(NULL),
- m_screen(NULL),
+ m_screen_tag(nullptr),
+ m_screen(nullptr),
m_first_vpos(0),
m_increment(0),
- m_timer(NULL),
+ m_timer(nullptr),
m_first_time(true)
{
}
@@ -152,14 +152,14 @@ void timer_device::device_validity_check(validity_checker &valid) const
switch (m_type)
{
case TIMER_TYPE_GENERIC:
- if (m_screen_tag != NULL || m_first_vpos != 0 || m_start_delay != attotime::zero)
+ if (m_screen_tag != nullptr || m_first_vpos != 0 || m_start_delay != attotime::zero)
osd_printf_warning("Generic timer specified parameters for a scanline timer\n");
if (m_period != attotime::zero || m_start_delay != attotime::zero)
osd_printf_warning("Generic timer specified parameters for a periodic timer\n");
break;
case TIMER_TYPE_PERIODIC:
- if (m_screen_tag != NULL || m_first_vpos != 0)
+ if (m_screen_tag != nullptr || m_first_vpos != 0)
osd_printf_warning("Periodic timer specified parameters for a scanline timer\n");
if (m_period <= attotime::zero)
osd_printf_error("Periodic timer specified invalid period\n");
@@ -191,7 +191,7 @@ void timer_device::device_validity_check(validity_checker &valid) const
void timer_device::device_start()
{
// fetch the screen
- if (m_screen_tag != NULL)
+ if (m_screen_tag != nullptr)
m_screen = machine().device<screen_device>(m_screen_tag);
// allocate the timer
@@ -234,7 +234,7 @@ void timer_device::device_reset()
}
case TIMER_TYPE_SCANLINE:
- if (m_screen == NULL)
+ if (m_screen == nullptr)
fatalerror("timer '%s': unable to find screen '%s'\n", tag(), m_screen_tag);
// set the timer to fire immediately
diff --git a/src/emu/timer.h b/src/emu/timer.h
index 0dab2d50e6a..55db37c267b 100644
--- a/src/emu/timer.h
+++ b/src/emu/timer.h
@@ -114,10 +114,10 @@ public:
private:
// device-level overrides
- virtual void device_validity_check(validity_checker &valid) const;
- virtual void device_start();
- virtual void device_reset();
- virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
+ virtual void device_validity_check(validity_checker &valid) const override;
+ virtual void device_start() override;
+ virtual void device_reset() override;
+ virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// timer types
enum timer_type
diff --git a/src/emu/ui/barcode.cpp b/src/emu/ui/barcode.cpp
index 84f4b89250b..fece584c641 100644
--- a/src/emu/ui/barcode.cpp
+++ b/src/emu/ui/barcode.cpp
@@ -72,8 +72,8 @@ void ui_menu_barcode_reader::populate()
item_append("New Barcode:", new_barcode, 0, ITEMREF_NEW_BARCODE);
// finish up the menu
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- item_append("Enter Code", NULL, 0, ITEMREF_ENTER_BARCODE);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ item_append("Enter Code", nullptr, 0, ITEMREF_ENTER_BARCODE);
customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
@@ -94,7 +94,7 @@ void ui_menu_barcode_reader::handle()
const ui_menu_event *event = process(UI_MENU_PROCESS_LR_REPEAT);
// process the event
- if (event != NULL)
+ if (event != nullptr)
{
// handle selections
switch (event->iptkey)
diff --git a/src/emu/ui/barcode.h b/src/emu/ui/barcode.h
index 9d1ef25bc84..5a3dbff634e 100644
--- a/src/emu/ui/barcode.h
+++ b/src/emu/ui/barcode.h
@@ -20,8 +20,8 @@ class ui_menu_barcode_reader : public ui_menu_device_control<barcode_reader_devi
public:
ui_menu_barcode_reader(running_machine &machine, render_container *container, barcode_reader_device *device);
virtual ~ui_menu_barcode_reader();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
char m_barcode_buffer[20];
diff --git a/src/emu/ui/cheatopt.cpp b/src/emu/ui/cheatopt.cpp
index f2bff8e7feb..015ccba6908 100644
--- a/src/emu/ui/cheatopt.cpp
+++ b/src/emu/ui/cheatopt.cpp
@@ -25,17 +25,17 @@ void ui_menu_cheat::handle()
const ui_menu_event *menu_event = process(UI_MENU_PROCESS_LR_REPEAT);
/* handle events */
- if (menu_event != NULL && menu_event->itemref != NULL)
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
bool changed = false;
/* clear cheat comment on any movement or keypress */
- machine().popmessage(NULL);
+ machine().popmessage(nullptr);
/* handle reset all + reset all cheats for reload all option */
if ((FPTR)menu_event->itemref < 3 && menu_event->iptkey == IPT_UI_SELECT)
{
- for (cheat_entry *curcheat = machine().cheat().first(); curcheat != NULL; curcheat = curcheat->next())
+ for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next())
if (curcheat->select_default_state())
changed = true;
}
@@ -73,7 +73,7 @@ void ui_menu_cheat::handle()
case IPT_UI_UP:
case IPT_UI_DOWN:
string = curcheat->comment();
- if (string != NULL && string[0] != 0)
+ if (string != nullptr && string[0] != 0)
machine().popmessage("Cheat Comment:\n%s", string);
break;
}
@@ -110,7 +110,7 @@ void ui_menu_cheat::populate()
/* iterate over cheats */
std::string text;
std::string subtext;
- for (cheat_entry *curcheat = machine().cheat().first(); curcheat != NULL; curcheat = curcheat->next())
+ for (cheat_entry *curcheat = machine().cheat().first(); curcheat != nullptr; curcheat = curcheat->next())
{
UINT32 flags;
curcheat->menu_text(text, subtext, flags);
@@ -118,13 +118,13 @@ void ui_menu_cheat::populate()
}
/* add a separator */
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
/* add a reset all option */
- item_append("Reset All", NULL, 0, (void *)1);
+ item_append("Reset All", nullptr, 0, (void *)1);
/* add a reload all cheats option */
- item_append("Reload All", NULL, 0, (void *)2);
+ item_append("Reload All", nullptr, 0, (void *)2);
}
ui_menu_cheat::~ui_menu_cheat()
diff --git a/src/emu/ui/cheatopt.h b/src/emu/ui/cheatopt.h
index 2117cbf57a1..0358af493ab 100644
--- a/src/emu/ui/cheatopt.h
+++ b/src/emu/ui/cheatopt.h
@@ -17,8 +17,8 @@ class ui_menu_cheat : public ui_menu {
public:
ui_menu_cheat(running_machine &machine, render_container *container);
virtual ~ui_menu_cheat();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
};
#endif /* __UI_CHEATOPT_H__ */
diff --git a/src/emu/ui/devctrl.h b/src/emu/ui/devctrl.h
index ae9fb977f7e..f7054e6279f 100644
--- a/src/emu/ui/devctrl.h
+++ b/src/emu/ui/devctrl.h
@@ -82,7 +82,7 @@ template<class _DeviceType>
void ui_menu_device_control<_DeviceType>::previous()
{
// left arrow - rotate left through cassette devices
- if (m_device != NULL)
+ if (m_device != nullptr)
{
iterator iter(machine().root_device());
int index = iter.indexof(*m_device);
@@ -103,7 +103,7 @@ template<class _DeviceType>
void ui_menu_device_control<_DeviceType>::next()
{
// right arrow - rotate right through cassette devices
- if (m_device != NULL)
+ if (m_device != nullptr)
{
iterator iter(machine().root_device());
int index = iter.indexof(*m_device);
diff --git a/src/emu/ui/devopt.cpp b/src/emu/ui/devopt.cpp
index 432d71fa839..40ee5429e6a 100644
--- a/src/emu/ui/devopt.cpp
+++ b/src/emu/ui/devopt.cpp
@@ -27,7 +27,7 @@ ui_menu_device_config::ui_menu_device_config(running_machine &machine, render_co
m_mounted = false;
device_iterator deviter(machine.config().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
{
if (strcmp(device->tag(), tmp_tag.c_str()) == 0)
{
@@ -59,7 +59,7 @@ void ui_menu_device_config::populate()
{
str.append("* CPU:\n");
tagmap_t<UINT8> exectags;
- for (device_execute_interface *exec = execiter.first(); exec != NULL; exec = execiter.next())
+ for (device_execute_interface *exec = execiter.first(); exec != nullptr; exec = execiter.next())
{
if (exectags.add(exec->device().tag(), 1, FALSE) == TMERR_DUPLICATE)
continue;
@@ -71,7 +71,7 @@ void ui_menu_device_config::populate()
int count = 1;
const char *name = exec->device().name();
execute_interface_iterator execinneriter(*dev);
- for (device_execute_interface *scan = execinneriter.first(); scan != NULL; scan = execinneriter.next())
+ for (device_execute_interface *scan = execinneriter.first(); scan != nullptr; scan = execinneriter.next())
{
if (exec->device().type() == scan->device().type() && strcmp(name, scan->device().name()) == 0 && exec->device().clock() == scan->device().clock())
if (exectags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE)
@@ -98,7 +98,7 @@ void ui_menu_device_config::populate()
if (scriter.count() > 0)
{
str.append("* Video:\n");
- for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
+ for (screen_device *screen = scriter.first(); screen != nullptr; screen = scriter.next())
{
strcatprintf(str," Screen '%s': ", screen->tag());
@@ -122,7 +122,7 @@ void ui_menu_device_config::populate()
{
str.append("* Sound:\n");
tagmap_t<UINT8> soundtags;
- for (device_sound_interface *sound = snditer.first(); sound != NULL; sound = snditer.next())
+ for (device_sound_interface *sound = snditer.first(); sound != nullptr; sound = snditer.next())
{
if (soundtags.add(sound->device().tag(), 1, FALSE) == TMERR_DUPLICATE)
continue;
@@ -130,7 +130,7 @@ void ui_menu_device_config::populate()
// count how many identical sound chips we have
int count = 1;
sound_interface_iterator sndinneriter(*dev);
- for (device_sound_interface *scan = sndinneriter.first(); scan != NULL; scan = sndinneriter.next())
+ for (device_sound_interface *scan = sndinneriter.first(); scan != nullptr; scan = sndinneriter.next())
{
if (sound->device().type() == scan->device().type() && sound->device().clock() == scan->device().clock())
if (soundtags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE)
@@ -184,12 +184,12 @@ void ui_menu_device_config::populate()
std::string errors, dips_opt, confs_opt;
ioport_list portlist;
device_iterator iptiter(*dev);
- for (device_t *iptdev = iptiter.first(); iptdev != NULL; iptdev = iptiter.next())
+ for (device_t *iptdev = iptiter.first(); iptdev != nullptr; iptdev = iptiter.next())
portlist.append(*iptdev, errors);
// check if the device adds inputs to the system
- for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_port *port = portlist.first(); port != nullptr; port = port->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
{
if (field->type() >= IPT_MAHJONG_FIRST && field->type() < IPT_MAHJONG_LAST)
input_mj++;
@@ -211,7 +211,7 @@ void ui_menu_device_config::populate()
{
dips++;
dips_opt.append(" ").append(field->name());
- for (ioport_setting *setting = field->first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = field->first_setting(); setting != nullptr; setting = setting->next())
{
if (setting->value() == field->defvalue())
{
@@ -224,7 +224,7 @@ void ui_menu_device_config::populate()
{
confs++;
confs_opt.append(" ").append(field->name());
- for (ioport_setting *setting = field->first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = field->first_setting(); setting != nullptr; setting = setting->next())
{
if (setting->value() == field->defvalue())
{
@@ -262,7 +262,7 @@ void ui_menu_device_config::populate()
if (imgiter.count() > 0)
{
str.append("* Media Options:\n");
- for (const device_image_interface *imagedev = imgiter.first(); imagedev != NULL; imagedev = imgiter.next())
+ for (const device_image_interface *imagedev = imgiter.first(); imagedev != nullptr; imagedev = imgiter.next())
strcatprintf(str," %s [tag: %s]\n", imagedev->image_type_name(), imagedev->device().tag());
}
@@ -270,7 +270,7 @@ void ui_menu_device_config::populate()
if (slotiter.count() > 0)
{
str.append("* Slot Options:\n");
- for (const device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next())
+ for (const device_slot_interface *slot = slotiter.first(); slot != nullptr; slot = slotiter.next())
strcatprintf(str," %s [default: %s]\n", slot->device().tag(), slot->default_option() ? slot->default_option() : "----");
}
@@ -279,7 +279,7 @@ void ui_menu_device_config::populate()
str.append("[None]\n");
const_cast<machine_config &>(machine().config()).device_remove(&machine().config().root_device(), m_option->name());
- item_append(str.c_str(), NULL, MENU_FLAG_MULTILINE, NULL);
+ item_append(str.c_str(), nullptr, MENU_FLAG_MULTILINE, nullptr);
}
void ui_menu_device_config::handle()
diff --git a/src/emu/ui/devopt.h b/src/emu/ui/devopt.h
index 6643a7f7962..56916aebb54 100644
--- a/src/emu/ui/devopt.h
+++ b/src/emu/ui/devopt.h
@@ -17,8 +17,8 @@ class ui_menu_device_config : public ui_menu {
public:
ui_menu_device_config(running_machine &machine, render_container *container, device_slot_interface *slot, device_slot_option *option);
virtual ~ui_menu_device_config();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
device_slot_interface *m_owner;
diff --git a/src/emu/ui/filemngr.cpp b/src/emu/ui/filemngr.cpp
index 6bc789299d9..6af12895186 100644
--- a/src/emu/ui/filemngr.cpp
+++ b/src/emu/ui/filemngr.cpp
@@ -28,7 +28,7 @@
// ctor
//-------------------------------------------------
-ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_container *container, const char *warnings) : ui_menu(machine, container), selected_device(NULL)
+ui_menu_file_manager::ui_menu_file_manager(running_machine &machine, render_container *container, const char *warnings) : ui_menu(machine, container), selected_device(nullptr)
{
// This warning string is used when accessing from the force_file_manager call, i.e.
// when the file manager is loaded top front in the case of mandatory image devices
@@ -59,9 +59,9 @@ void ui_menu_file_manager::custom_render(void *selectedref, float top, float bot
const char *path;
// access the path
- path = selected_device ? selected_device->filename() : NULL;
+ path = selected_device ? selected_device->filename() : nullptr;
extra_text_render(container, top, bottom,
- origx1, origy1, origx2, origy2, NULL, path);
+ origx1, origy1, origx2, origy2, nullptr, path);
}
@@ -71,20 +71,20 @@ void ui_menu_file_manager::fill_image_line(device_image_interface *img, std::str
strprintf(instance,"%s (%s)", img->instance_name(), img->brief_instance_name());
// get the base name
- if (img->basename() != NULL)
+ if (img->basename() != nullptr)
{
filename.assign(img->basename());
// if the image has been loaded through softlist, also show the loaded part
- if (img->part_entry() != NULL)
+ if (img->part_entry() != nullptr)
{
const software_part *tmp = img->part_entry();
- if (tmp->name() != NULL)
+ if (tmp->name() != nullptr)
{
filename.append(" (");
filename.append(tmp->name());
// also check if this part has a specific part_id (e.g. "Map Disc", "Bonus Disc", etc.), and in case display it
- if (img->get_feature("part_id") != NULL)
+ if (img->get_feature("part_id") != nullptr)
{
filename.append(": ");
filename.append(img->get_feature("part_id"));
@@ -108,14 +108,14 @@ void ui_menu_file_manager::populate()
if (!m_warnings.empty())
{
- item_append(m_warnings.c_str(), NULL, MENU_FLAG_DISABLE, NULL);
- item_append("", NULL, MENU_FLAG_DISABLE, NULL);
+ item_append(m_warnings.c_str(), nullptr, MENU_FLAG_DISABLE, nullptr);
+ item_append("", nullptr, MENU_FLAG_DISABLE, nullptr);
}
// cycle through all devices for this system
device_iterator iter(machine().root_device());
tagmap_t<UINT8> devtags;
- for (device_t *dev = iter.first(); dev != NULL; dev = iter.next())
+ for (device_t *dev = iter.first(); dev != nullptr; dev = iter.next())
{
bool tag_appended = false;
if (devtags.add(dev->tag(), 1, FALSE) == TMERR_DUPLICATE)
@@ -127,7 +127,7 @@ void ui_menu_file_manager::populate()
{
// if so, cycle through all its image interfaces
image_interface_iterator subiterator(*dev);
- for (device_image_interface *scan = subiterator.first(); scan != NULL; scan = subiterator.next())
+ for (device_image_interface *scan = subiterator.first(); scan != nullptr; scan = subiterator.next())
{
// if it is a children device, and not something further down the device tree, we want it in the menu!
if (strcmp(scan->device().owner()->tag(), dev->tag()) == 0)
@@ -139,9 +139,9 @@ void ui_menu_file_manager::populate()
if (first_entry)
first_entry = false;
else
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
strprintf(buffer, "[root%s]", dev->tag());
- item_append(buffer.c_str(), NULL, 0, NULL);
+ item_append(buffer.c_str(), nullptr, 0, nullptr);
tag_appended = true;
}
// finally, append the image interface to the menu
@@ -151,8 +151,8 @@ void ui_menu_file_manager::populate()
}
}
}
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- item_append("Reset", NULL, 0, (void *)1);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ item_append("Reset", nullptr, 0, (void *)1);
custombottom = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
@@ -166,7 +166,7 @@ void ui_menu_file_manager::handle()
{
// process the menu
const ui_menu_event *event = process(0);
- if (event != NULL && event->itemref != NULL && event->iptkey == IPT_UI_SELECT)
+ if (event != nullptr && event->itemref != nullptr && event->iptkey == IPT_UI_SELECT)
{
if ((FPTR)event->itemref == 1)
{
@@ -176,7 +176,7 @@ void ui_menu_file_manager::handle()
else
{
selected_device = (device_image_interface *) event->itemref;
- if (selected_device != NULL)
+ if (selected_device != nullptr)
{
m_curr_selected = TRUE;
ui_menu::stack_push(selected_device->get_selection_menu(machine(), container));
diff --git a/src/emu/ui/filemngr.h b/src/emu/ui/filemngr.h
index 8cf34451078..38c4e068281 100644
--- a/src/emu/ui/filemngr.h
+++ b/src/emu/ui/filemngr.h
@@ -23,9 +23,9 @@ public:
ui_menu_file_manager(running_machine &machine, render_container *container, const char *warnings);
virtual ~ui_menu_file_manager();
- virtual void populate();
- virtual void handle();
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2);
+ virtual void populate() override;
+ virtual void handle() override;
+ virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
void fill_image_line(device_image_interface *img, std::string &instance, std::string &filename);
diff --git a/src/emu/ui/filesel.cpp b/src/emu/ui/filesel.cpp
index 02b0f89e295..140bfdd492d 100644
--- a/src/emu/ui/filesel.cpp
+++ b/src/emu/ui/filesel.cpp
@@ -56,7 +56,7 @@ static void input_character(char *buffer, size_t buffer_length, unicode_char uni
{
*(char *)utf8_previous_char(&buffer[buflen]) = 0;
}
- else if ((unichar > ' ') && ((filter == NULL) || (*filter)(unichar)))
+ else if ((unichar > ' ') && ((filter == nullptr) || (*filter)(unichar)))
{
buflen += utf8_from_uchar(&buffer[buflen], buffer_length - buflen, unichar);
buffer[buflen] = 0;
@@ -102,7 +102,7 @@ static void extra_text_draw_box(render_container *container, float origx1, float
// draw the text within it
container->manager().machine().ui().draw_text_full(container,text, x1, y1, text_width, JUSTIFY_LEFT, WRAP_WORD,
- DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, NULL, NULL);
+ DRAW_NORMAL, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
}
@@ -115,12 +115,12 @@ void extra_text_render(render_container *container, float top, float bottom,
float origx1, float origy1, float origx2, float origy2,
const char *header, const char *footer)
{
- header = ((header != NULL) && (header[0] != '\0')) ? header : NULL;
- footer = ((footer != NULL) && (footer[0] != '\0')) ? footer : NULL;
+ header = ((header != nullptr) && (header[0] != '\0')) ? header : nullptr;
+ footer = ((footer != nullptr) && (footer[0] != '\0')) ? footer : nullptr;
- if (header != NULL)
+ if (header != nullptr)
extra_text_draw_box(container, origx1, origx2, origy1, top, header, -1);
- if (footer != NULL)
+ if (footer != nullptr)
extra_text_draw_box(container, origx1, origx2, origy2, bottom, footer, +1);
}
@@ -156,10 +156,10 @@ ui_menu_confirm_save_as::~ui_menu_confirm_save_as()
void ui_menu_confirm_save_as::populate()
{
- item_append("File Already Exists - Override?", NULL, MENU_FLAG_DISABLE, NULL);
- item_append(MENU_SEPARATOR_ITEM, NULL, MENU_FLAG_DISABLE, NULL);
- item_append("No", NULL, 0, ITEMREF_NO);
- item_append("Yes", NULL, 0, ITEMREF_YES);
+ item_append("File Already Exists - Override?", nullptr, MENU_FLAG_DISABLE, nullptr);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, MENU_FLAG_DISABLE, nullptr);
+ item_append("No", nullptr, 0, ITEMREF_NO);
+ item_append("Yes", nullptr, 0, ITEMREF_YES);
}
//-------------------------------------------------
@@ -172,7 +172,7 @@ void ui_menu_confirm_save_as::handle()
const ui_menu_event *event = process(0);
// process the event
- if ((event != NULL) && (event->iptkey == IPT_UI_SELECT))
+ if ((event != nullptr) && (event->iptkey == IPT_UI_SELECT))
{
if (event->itemref == ITEMREF_YES)
*m_yes = true;
@@ -219,7 +219,7 @@ ui_menu_file_create::ui_menu_file_create(running_machine &machine, render_contai
: ui_menu(machine, container),
m_current_directory(current_directory),
m_current_file(current_file),
- m_current_format(NULL)
+ m_current_format(nullptr)
{
m_image = image;
m_ok = ok;
@@ -244,7 +244,7 @@ void ui_menu_file_create::custom_render(void *selectedref, float top, float bott
{
extra_text_render(container, top, bottom, origx1, origy1, origx2, origy2,
m_current_directory.c_str(),
- NULL);
+ nullptr);
}
@@ -272,15 +272,15 @@ void ui_menu_file_create::populate()
// do we support multiple formats?
if (ENABLE_FORMATS) format = m_image->formatlist();
- if (ENABLE_FORMATS && (format != NULL))
+ if (ENABLE_FORMATS && (format != nullptr))
{
item_append("Image Format:", m_current_format->description(), 0, ITEMREF_FORMAT);
m_current_format = format;
}
// finish up the menu
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- item_append("Create", NULL, 0, ITEMREF_CREATE);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ item_append("Create", nullptr, 0, ITEMREF_CREATE);
customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
}
@@ -296,7 +296,7 @@ void ui_menu_file_create::handle()
const ui_menu_event *event = process(0);
// process the event
- if (event != NULL)
+ if (event != nullptr)
{
// handle selections
switch(event->iptkey)
@@ -345,7 +345,7 @@ ui_menu_file_selector::ui_menu_file_selector(running_machine &machine, render_co
: ui_menu(machine, container),
m_current_directory(current_directory),
m_current_file(current_file),
- m_entrylist(NULL)
+ m_entrylist(nullptr)
{
m_image = image;
m_has_empty = has_empty;
@@ -373,7 +373,7 @@ void ui_menu_file_selector::custom_render(void *selectedref, float top, float bo
extra_text_render(container, top, bottom,
origx1, origy1, origx2, origy2,
m_current_directory.c_str(),
- NULL);
+ nullptr);
}
@@ -386,8 +386,8 @@ void ui_menu_file_selector::custom_render(void *selectedref, float top, float bo
int ui_menu_file_selector::compare_entries(const file_selector_entry *e1, const file_selector_entry *e2)
{
int result;
- const char *e1_basename = (e1->basename != NULL) ? e1->basename : "";
- const char *e2_basename = (e2->basename != NULL) ? e2->basename : "";
+ const char *e1_basename = (e1->basename != nullptr) ? e1->basename : "";
+ const char *e2_basename = (e2->basename != nullptr) ? e2->basename : "";
if (e1->type < e2->type)
{
@@ -432,12 +432,12 @@ ui_menu_file_selector::file_selector_entry *ui_menu_file_selector::append_entry(
entry = (file_selector_entry *) m_pool_alloc(sizeof(*entry));
memset(entry, 0, sizeof(*entry));
entry->type = entry_type;
- entry->basename = (entry_basename != NULL) ? pool_strdup(entry_basename) : entry_basename;
- entry->fullpath = (entry_fullpath != NULL) ? pool_strdup(entry_fullpath) : entry_fullpath;
+ entry->basename = (entry_basename != nullptr) ? pool_strdup(entry_basename) : entry_basename;
+ entry->fullpath = (entry_fullpath != nullptr) ? pool_strdup(entry_fullpath) : entry_fullpath;
// find the end of the list
entryptr = &m_entrylist;
- while ((*entryptr != NULL) && (compare_entries(entry, *entryptr) >= 0))
+ while ((*entryptr != nullptr) && (compare_entries(entry, *entryptr) >= 0))
entryptr = &(*entryptr)->next;
// insert the entry
@@ -470,7 +470,7 @@ ui_menu_file_selector::file_selector_entry *ui_menu_file_selector::append_dirent
default:
// exceptional case; do not add a menu item
- return NULL;
+ return nullptr;
}
// determine the full path
@@ -493,8 +493,8 @@ ui_menu_file_selector::file_selector_entry *ui_menu_file_selector::append_dirent
void ui_menu_file_selector::append_entry_menu_item(const file_selector_entry *entry)
{
- const char *text = NULL;
- const char *subtext = NULL;
+ const char *text = nullptr;
+ const char *subtext = nullptr;
switch(entry->type)
{
@@ -535,11 +535,11 @@ void ui_menu_file_selector::append_entry_menu_item(const file_selector_entry *en
void ui_menu_file_selector::populate()
{
- zippath_directory *directory = NULL;
+ zippath_directory *directory = nullptr;
file_error err;
const osd_directory_entry *dirent;
const file_selector_entry *entry;
- const file_selector_entry *selected_entry = NULL;
+ const file_selector_entry *selected_entry = nullptr;
int i;
const char *volume_name;
const char *path = m_current_directory.c_str();
@@ -548,30 +548,30 @@ void ui_menu_file_selector::populate()
err = zippath_opendir(path, &directory);
// clear out the menu entries
- m_entrylist = NULL;
+ m_entrylist = nullptr;
if (m_has_empty)
{
// add the "[empty slot]" entry
- append_entry(SELECTOR_ENTRY_TYPE_EMPTY, NULL, NULL);
+ append_entry(SELECTOR_ENTRY_TYPE_EMPTY, nullptr, nullptr);
}
if (m_has_create)
{
// add the "[create]" entry
- append_entry(SELECTOR_ENTRY_TYPE_CREATE, NULL, NULL);
+ append_entry(SELECTOR_ENTRY_TYPE_CREATE, nullptr, nullptr);
}
if (m_has_softlist)
{
// add the "[software list]" entry
- entry = append_entry(SELECTOR_ENTRY_TYPE_SOFTWARE_LIST, NULL, NULL);
+ entry = append_entry(SELECTOR_ENTRY_TYPE_SOFTWARE_LIST, nullptr, nullptr);
selected_entry = entry;
}
// add the drives
i = 0;
- while((volume_name = osd_get_volume_name(i))!=NULL)
+ while((volume_name = osd_get_volume_name(i))!=nullptr)
{
append_entry(SELECTOR_ENTRY_TYPE_DRIVE,
volume_name, volume_name);
@@ -581,15 +581,15 @@ void ui_menu_file_selector::populate()
// build the menu for each item
if (err == FILERR_NONE)
{
- while((dirent = zippath_readdir(directory)) != NULL)
+ while((dirent = zippath_readdir(directory)) != nullptr)
{
// append a dirent entry
entry = append_dirent_entry(dirent);
- if (entry != NULL)
+ if (entry != nullptr)
{
// set the selected item to be the first non-parent directory or file
- if ((selected_entry == NULL) && strcmp(dirent->name, ".."))
+ if ((selected_entry == nullptr) && strcmp(dirent->name, ".."))
selected_entry = entry;
// do we have to select this file?
@@ -600,17 +600,17 @@ void ui_menu_file_selector::populate()
}
// append all of the menu entries
- for (entry = m_entrylist; entry != NULL; entry = entry->next)
+ for (entry = m_entrylist; entry != nullptr; entry = entry->next)
append_entry_menu_item(entry);
// set the selection (if we have one)
- if (selected_entry != NULL)
+ if (selected_entry != nullptr)
set_selection((void *) selected_entry);
// set up custom render proc
customtop = machine().ui().get_line_height() + 3.0f * UI_BOX_TB_BORDER;
- if (directory != NULL)
+ if (directory != nullptr)
zippath_closedir(directory);
}
@@ -623,12 +623,12 @@ void ui_menu_file_selector::handle()
{
file_error err;
const file_selector_entry *entry;
- const file_selector_entry *selected_entry = NULL;
+ const file_selector_entry *selected_entry = nullptr;
int bestmatch = 0;
// process the menu
const ui_menu_event *event = process(0);
- if (event != NULL && event->itemref != NULL)
+ if (event != nullptr && event->itemref != nullptr)
{
// handle selections
if (event->iptkey == IPT_UI_SELECT)
@@ -656,7 +656,7 @@ void ui_menu_file_selector::handle()
case SELECTOR_ENTRY_TYPE_DRIVE:
case SELECTOR_ENTRY_TYPE_DIRECTORY:
// drive/directory - first check the path
- err = zippath_opendir(entry->fullpath, NULL);
+ err = zippath_opendir(entry->fullpath, nullptr);
if (err != FILERR_NONE)
{
// this path is problematic; present the user with an error and bail
@@ -710,9 +710,9 @@ void ui_menu_file_selector::handle()
// check for entries which matches our m_filename_buffer:
// from current entry to the end
- for (entry = cur_selected; entry != NULL; entry = entry->next)
+ for (entry = cur_selected; entry != nullptr; entry = entry->next)
{
- if (entry->basename != NULL && m_filename_buffer != NULL)
+ if (entry->basename != nullptr && m_filename_buffer != nullptr)
{
int match = 0;
for (int i = 0; i < ARRAY_LENGTH(m_filename_buffer); i++)
@@ -731,7 +731,7 @@ void ui_menu_file_selector::handle()
// and from the first entry to current one
for (entry = m_entrylist; entry != cur_selected; entry = entry->next)
{
- if (entry->basename != NULL && m_filename_buffer != NULL)
+ if (entry->basename != nullptr && m_filename_buffer != nullptr)
{
int match = 0;
for (int i = 0; i < ARRAY_LENGTH(m_filename_buffer); i++)
@@ -748,7 +748,7 @@ void ui_menu_file_selector::handle()
}
}
- if (selected_entry != NULL && selected_entry != cur_selected)
+ if (selected_entry != nullptr && selected_entry != cur_selected)
set_selection((void *) selected_entry);
}
}
@@ -796,13 +796,13 @@ ui_menu_select_format::~ui_menu_select_format()
void ui_menu_select_format::populate()
{
- item_append("Select image format", NULL, MENU_FLAG_DISABLE, NULL);
+ item_append("Select image format", nullptr, MENU_FLAG_DISABLE, nullptr);
for (int i = 0; i < m_total_usable; i++)
{
const floppy_image_format_t *fmt = m_formats[i];
if (i && i == m_ext_match)
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
item_append(fmt->description(), fmt->name(), 0, (void *)(FPTR)i);
}
}
@@ -816,7 +816,7 @@ void ui_menu_select_format::handle()
{
// process the menu
const ui_menu_event *event = process(0);
- if (event != NULL && event->iptkey == IPT_UI_SELECT)
+ if (event != nullptr && event->iptkey == IPT_UI_SELECT)
{
*m_result = int(FPTR(event->itemref));
ui_menu::stack_pop(machine());
@@ -856,12 +856,12 @@ ui_menu_select_rw::~ui_menu_select_rw()
void ui_menu_select_rw::populate()
{
- item_append("Select access mode", NULL, MENU_FLAG_DISABLE, NULL);
- item_append("Read-only", 0, 0, (void *)READONLY);
+ item_append("Select access mode", nullptr, MENU_FLAG_DISABLE, nullptr);
+ item_append("Read-only", nullptr, 0, (void *)READONLY);
if (m_can_in_place)
- item_append("Read-write", 0, 0, (void *)READWRITE);
- item_append("Read this image, write to another image", 0, 0, (void *)WRITE_OTHER);
- item_append("Read this image, write to diff", 0, 0, (void *)WRITE_DIFF);
+ item_append("Read-write", nullptr, 0, (void *)READWRITE);
+ item_append("Read this image, write to another image", nullptr, 0, (void *)WRITE_OTHER);
+ item_append("Read this image, write to diff", nullptr, 0, (void *)WRITE_DIFF);
}
@@ -873,7 +873,7 @@ void ui_menu_select_rw::handle()
{
// process the menu
const ui_menu_event *event = process(0);
- if (event != NULL && event->iptkey == IPT_UI_SELECT)
+ if (event != nullptr && event->iptkey == IPT_UI_SELECT)
{
*m_result = int(FPTR(event->itemref));
ui_menu::stack_pop(machine());
diff --git a/src/emu/ui/filesel.h b/src/emu/ui/filesel.h
index 0ba52134fc8..c7e113e463b 100644
--- a/src/emu/ui/filesel.h
+++ b/src/emu/ui/filesel.h
@@ -20,8 +20,8 @@ class ui_menu_confirm_save_as : public ui_menu
public:
ui_menu_confirm_save_as(running_machine &machine, render_container *container, bool *yes);
virtual ~ui_menu_confirm_save_as();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
bool *m_yes;
@@ -35,9 +35,9 @@ class ui_menu_file_create : public ui_menu
public:
ui_menu_file_create(running_machine &machine, render_container *container, device_image_interface *image, std::string &current_directory, std::string &current_file, bool *ok);
virtual ~ui_menu_file_create();
- virtual void populate();
- virtual void handle();
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2);
+ virtual void populate() override;
+ virtual void handle() override;
+ virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
private:
device_image_interface * m_image;
@@ -59,9 +59,9 @@ public:
enum { R_EMPTY, R_SOFTLIST, R_CREATE, R_FILE };
ui_menu_file_selector(running_machine &machine, render_container *container, device_image_interface *image, std::string &current_directory, std::string &current_file, bool has_empty, bool has_softlist, bool has_create, int *result);
virtual ~ui_menu_file_selector();
- virtual void populate();
- virtual void handle();
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2);
+ virtual void populate() override;
+ virtual void handle() override;
+ virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
private:
enum file_selector_entry_type
@@ -110,8 +110,8 @@ public:
ui_menu_select_format(running_machine &machine, render_container *container,
class floppy_image_format_t **formats, int ext_match, int total_usable, int *result);
virtual ~ui_menu_select_format();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
// internal state
@@ -131,8 +131,8 @@ public:
ui_menu_select_rw(running_machine &machine, render_container *container,
bool can_in_place, int *result);
virtual ~ui_menu_select_rw();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
// internal state
diff --git a/src/emu/ui/imgcntrl.cpp b/src/emu/ui/imgcntrl.cpp
index d1d4c43e60f..11ed8c26c5c 100644
--- a/src/emu/ui/imgcntrl.cpp
+++ b/src/emu/ui/imgcntrl.cpp
@@ -35,10 +35,10 @@ ui_menu_control_device_image::ui_menu_control_device_image(running_machine &mach
{
image = _image;
- sld = 0;
+ sld = nullptr;
if (image->software_list_name()) {
software_list_device_iterator iter(machine.config().root_device());
- for (software_list_device *swlist = iter.first(); swlist != NULL; swlist = iter.next())
+ for (software_list_device *swlist = iter.first(); swlist != nullptr; swlist = iter.next())
{
if (strcmp(swlist->list_name(),image->software_list_name())==0) sld = swlist;
}
@@ -64,7 +64,7 @@ ui_menu_control_device_image::ui_menu_control_device_image(running_machine &mach
current_directory.assign(image->working_directory());
/* check to see if the path exists; if not clear it */
- if (zippath_opendir(current_directory.c_str(), NULL) != FILERR_NONE)
+ if (zippath_opendir(current_directory.c_str(), nullptr) != FILERR_NONE)
current_directory.clear();
}
}
@@ -94,7 +94,7 @@ void ui_menu_control_device_image::test_create(bool &can_create, bool &need_conf
/* does a file or a directory exist at the path */
entry = osd_stat(path.c_str());
- file_type = (entry != NULL) ? entry->type : ENTTYPE_NONE;
+ file_type = (entry != nullptr) ? entry->type : ENTTYPE_NONE;
switch(file_type)
{
@@ -124,7 +124,7 @@ void ui_menu_control_device_image::test_create(bool &can_create, bool &need_conf
break;
}
- if (entry != NULL)
+ if (entry != nullptr)
osd_free(entry);
}
@@ -183,20 +183,20 @@ void ui_menu_control_device_image::handle()
case START_FILE: {
bool can_create = false;
if(image->is_creatable()) {
- zippath_directory *directory = NULL;
+ zippath_directory *directory = nullptr;
file_error err = zippath_opendir(current_directory.c_str(), &directory);
can_create = err == FILERR_NONE && !zippath_is_zip(directory);
if(directory)
zippath_closedir(directory);
}
submenu_result = -1;
- ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_file_selector(machine(), container, image, current_directory, current_file, true, image->image_interface()!=NULL, can_create, &submenu_result)));
+ ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_file_selector(machine(), container, image, current_directory, current_file, true, image->image_interface()!=nullptr, can_create, &submenu_result)));
state = SELECT_FILE;
break;
}
case START_SOFTLIST:
- sld = 0;
+ sld = nullptr;
ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_software(machine(), container, image->image_interface(), &sld)));
state = SELECT_SOFTLIST;
break;
@@ -225,7 +225,7 @@ void ui_menu_control_device_image::handle()
else if(swi->has_multiple_parts(image->image_interface()))
{
submenu_result = -1;
- swp = 0;
+ swp = nullptr;
ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_software_parts(machine(), container, swi, image->image_interface(), &swp, false, &submenu_result)));
state = SELECT_ONE_PART;
}
@@ -336,7 +336,7 @@ void ui_menu_control_device_image::handle()
case DO_CREATE: {
std::string path;
zippath_combine(path, current_directory.c_str(), current_file.c_str());
- int err = image->create(path.c_str(), 0, NULL);
+ int err = image->create(path.c_str(), nullptr, nullptr);
if (err != 0)
machine().popmessage("Error: %s", image->error());
ui_menu::stack_pop(machine());
diff --git a/src/emu/ui/imgcntrl.h b/src/emu/ui/imgcntrl.h
index 4682d7f703f..3d978ed617c 100644
--- a/src/emu/ui/imgcntrl.h
+++ b/src/emu/ui/imgcntrl.h
@@ -21,8 +21,8 @@ class ui_menu_control_device_image : public ui_menu {
public:
ui_menu_control_device_image(running_machine &machine, render_container *container, device_image_interface *image);
virtual ~ui_menu_control_device_image();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
protected:
enum {
diff --git a/src/emu/ui/info.cpp b/src/emu/ui/info.cpp
index cb84a99418a..0b198769b15 100644
--- a/src/emu/ui/info.cpp
+++ b/src/emu/ui/info.cpp
@@ -30,7 +30,7 @@ ui_menu_game_info::~ui_menu_game_info()
void ui_menu_game_info::populate()
{
std::string tempstring;
- item_append(machine().ui().game_info_astring(tempstring).c_str(), NULL, MENU_FLAG_MULTILINE, NULL);
+ item_append(machine().ui().game_info_astring(tempstring).c_str(), nullptr, MENU_FLAG_MULTILINE, nullptr);
}
void ui_menu_game_info::handle()
@@ -55,11 +55,11 @@ ui_menu_image_info::~ui_menu_image_info()
void ui_menu_image_info::populate()
{
- item_append(machine().system().description, NULL, MENU_FLAG_DISABLE, NULL);
- item_append("", NULL, MENU_FLAG_DISABLE, NULL);
+ item_append(machine().system().description, nullptr, MENU_FLAG_DISABLE, nullptr);
+ item_append("", nullptr, MENU_FLAG_DISABLE, nullptr);
image_interface_iterator iter(machine().root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
image_info(image);
}
@@ -80,7 +80,7 @@ void ui_menu_image_info::image_info(device_image_interface *image)
if (image->exists())
{
// display device type and filename
- item_append(image->brief_instance_name(), image->basename(), 0, NULL);
+ item_append(image->brief_instance_name(), image->basename(), 0, nullptr);
// if image has been loaded through softlist, let's add some more info
if (image->software_entry())
@@ -88,20 +88,20 @@ void ui_menu_image_info::image_info(device_image_interface *image)
std::string str;
// display long filename
- item_append(image->longname(), "", MENU_FLAG_DISABLE, NULL);
+ item_append(image->longname(), "", MENU_FLAG_DISABLE, nullptr);
// display manufacturer and year
strcatprintf(str, "%s, %s", image->manufacturer(), image->year());
- item_append(str.c_str(), "", MENU_FLAG_DISABLE, NULL);
+ item_append(str.c_str(), "", MENU_FLAG_DISABLE, nullptr);
// display supported information, if available
switch (image->supported())
{
case SOFTWARE_SUPPORTED_NO:
- item_append("Not supported", "", MENU_FLAG_DISABLE, NULL);
+ item_append("Not supported", "", MENU_FLAG_DISABLE, nullptr);
break;
case SOFTWARE_SUPPORTED_PARTIAL:
- item_append("Partially supported", "", MENU_FLAG_DISABLE, NULL);
+ item_append("Partially supported", "", MENU_FLAG_DISABLE, nullptr);
break;
default:
break;
@@ -109,6 +109,6 @@ void ui_menu_image_info::image_info(device_image_interface *image)
}
}
else
- item_append(image->brief_instance_name(), "[empty]", 0, NULL);
- item_append("", NULL, MENU_FLAG_DISABLE, NULL);
+ item_append(image->brief_instance_name(), "[empty]", 0, nullptr);
+ item_append("", nullptr, MENU_FLAG_DISABLE, nullptr);
}
diff --git a/src/emu/ui/info.h b/src/emu/ui/info.h
index 476657b8791..a9459b25340 100644
--- a/src/emu/ui/info.h
+++ b/src/emu/ui/info.h
@@ -17,8 +17,8 @@ class ui_menu_game_info : public ui_menu {
public:
ui_menu_game_info(running_machine &machine, render_container *container);
virtual ~ui_menu_game_info();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
};
@@ -27,8 +27,8 @@ class ui_menu_image_info : public ui_menu
public:
ui_menu_image_info(running_machine &machine, render_container *container);
virtual ~ui_menu_image_info();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
void image_info(device_image_interface *image);
diff --git a/src/emu/ui/info_pty.cpp b/src/emu/ui/info_pty.cpp
index 5a6dca59efb..e0e44fa7833 100644
--- a/src/emu/ui/info_pty.cpp
+++ b/src/emu/ui/info_pty.cpp
@@ -23,18 +23,18 @@ ui_menu_pty_info::~ui_menu_pty_info()
void ui_menu_pty_info::populate()
{
- item_append("Pseudo terminals", NULL, MENU_FLAG_DISABLE, NULL);
- item_append("", NULL, MENU_FLAG_DISABLE, NULL);
+ item_append("Pseudo terminals", nullptr, MENU_FLAG_DISABLE, nullptr);
+ item_append("", nullptr, MENU_FLAG_DISABLE, nullptr);
pty_interface_iterator iter(machine().root_device());
- for (device_pty_interface *pty = iter.first(); pty != NULL; pty = iter.next()) {
+ for (device_pty_interface *pty = iter.first(); pty != nullptr; pty = iter.next()) {
const char *port_name = pty->device().owner()->tag() + 1;
if (pty->is_open()) {
- item_append(port_name , pty->slave_name() , MENU_FLAG_DISABLE , NULL);
+ item_append(port_name , pty->slave_name() , MENU_FLAG_DISABLE , nullptr);
} else {
- item_append(port_name , "[failed]" , MENU_FLAG_DISABLE , NULL);
+ item_append(port_name , "[failed]" , MENU_FLAG_DISABLE , nullptr);
}
- item_append("", NULL, MENU_FLAG_DISABLE, NULL);
+ item_append("", nullptr, MENU_FLAG_DISABLE, nullptr);
}
}
diff --git a/src/emu/ui/info_pty.h b/src/emu/ui/info_pty.h
index 4352c1d48c8..584652211a6 100644
--- a/src/emu/ui/info_pty.h
+++ b/src/emu/ui/info_pty.h
@@ -17,8 +17,8 @@ class ui_menu_pty_info : public ui_menu {
public:
ui_menu_pty_info(running_machine &machine, render_container *container);
virtual ~ui_menu_pty_info();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
};
#endif // __UI_INFO_PTY_H__
diff --git a/src/emu/ui/inputmap.cpp b/src/emu/ui/inputmap.cpp
index ab1318e30c3..3474cacee75 100644
--- a/src/emu/ui/inputmap.cpp
+++ b/src/emu/ui/inputmap.cpp
@@ -49,14 +49,14 @@ void ui_menu_input_groups::populate()
int player;
/* build up the menu */
- item_append("User Interface", NULL, 0, (void *)(IPG_UI + 1));
+ item_append("User Interface", nullptr, 0, (void *)(IPG_UI + 1));
for (player = 0; player < MAX_PLAYERS; player++)
{
char buffer[40];
sprintf(buffer, "Player %d Controls", player + 1);
- item_append(buffer, NULL, 0, (void *)(FPTR)(IPG_PLAYER1 + player + 1));
+ item_append(buffer, nullptr, 0, (void *)(FPTR)(IPG_PLAYER1 + player + 1));
}
- item_append("Other Controls", NULL, 0, (void *)(FPTR)(IPG_OTHER + 1));
+ item_append("Other Controls", nullptr, 0, (void *)(FPTR)(IPG_OTHER + 1));
}
ui_menu_input_groups::~ui_menu_input_groups()
@@ -72,7 +72,7 @@ void ui_menu_input_groups::handle()
{
/* process the menu */
const ui_menu_event *menu_event = process(0);
- if (menu_event != NULL && menu_event->iptkey == IPT_UI_SELECT)
+ if (menu_event != nullptr && menu_event->iptkey == IPT_UI_SELECT)
ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_input_general(machine(), container, int((long long)(menu_event->itemref)-1))));
}
@@ -90,7 +90,7 @@ ui_menu_input_general::ui_menu_input_general(running_machine &machine, render_co
void ui_menu_input_general::populate()
{
- input_item_data *itemlist = NULL;
+ input_item_data *itemlist = nullptr;
int suborder[SEQ_TYPE_TOTAL];
int sortorder = 1;
@@ -100,10 +100,10 @@ void ui_menu_input_general::populate()
suborder[SEQ_TYPE_INCREMENT] = 2;
/* iterate over the input ports and add menu items */
- for (input_type_entry *entry = machine().ioport().first_type(); entry != NULL; entry = entry->next())
+ for (input_type_entry *entry = machine().ioport().first_type(); entry != nullptr; entry = entry->next())
/* add if we match the group and we have a valid name */
- if (entry->group() == group && entry->name() != NULL && entry->name()[0] != 0)
+ if (entry->group() == group && entry->name() != nullptr && entry->name()[0] != 0)
{
input_seq_type seqtype;
@@ -123,7 +123,7 @@ void ui_menu_input_general::populate()
item->sortorder = sortorder * 4 + suborder[seqtype];
item->type = ioport_manager::type_is_analog(entry->type()) ? (INPUT_TYPE_ANALOG + seqtype) : INPUT_TYPE_DIGITAL;
item->name = entry->name();
- item->owner_name = NULL;
+ item->owner_name = nullptr;
item->next = itemlist;
itemlist = item;
@@ -152,7 +152,7 @@ ui_menu_input_specific::ui_menu_input_specific(running_machine &machine, render_
void ui_menu_input_specific::populate()
{
- input_item_data *itemlist = NULL;
+ input_item_data *itemlist = nullptr;
int suborder[SEQ_TYPE_TOTAL];
int port_count = 0;
@@ -162,16 +162,16 @@ void ui_menu_input_specific::populate()
suborder[SEQ_TYPE_INCREMENT] = 2;
/* iterate over the input ports and add menu items */
- for (ioport_port *port = machine().ioport().first_port(); port != NULL; port = port->next())
+ for (ioport_port *port = machine().ioport().first_port(); port != nullptr; port = port->next())
{
port_count++;
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
{
const char *name = field->name();
/* add if we match the group and we have a valid name */
- if (name != NULL && field->enabled() &&
- ((field->type() == IPT_OTHER && field->name() != NULL) || machine().ioport().type_group(field->type(), field->player()) != IPG_INVALID))
+ if (name != nullptr && field->enabled() &&
+ ((field->type() == IPT_OTHER && field->name() != nullptr) || machine().ioport().type_group(field->type(), field->player()) != IPG_INVALID))
{
input_seq_type seqtype;
UINT32 sortorder;
@@ -226,8 +226,8 @@ ui_menu_input_specific::~ui_menu_input_specific()
-------------------------------------------------*/
ui_menu_input::ui_menu_input(running_machine &machine, render_container *container) : ui_menu(machine, container), last_sortorder(0), record_next(false)
{
- pollingitem = 0;
- pollingref = 0;
+ pollingitem = nullptr;
+ pollingref = nullptr;
pollingseq = SEQ_TYPE_STANDARD;
}
@@ -253,22 +253,22 @@ void ui_menu_input::toggle_none_default(input_seq &selected_seq, input_seq &orig
void ui_menu_input::handle()
{
- input_item_data *seqchangeditem = NULL;
+ input_item_data *seqchangeditem = nullptr;
const ui_menu_event *menu_event;
int invalidate = false;
/* process the menu */
- menu_event = process((pollingitem != NULL) ? UI_MENU_PROCESS_NOKEYS : 0);
+ menu_event = process((pollingitem != nullptr) ? UI_MENU_PROCESS_NOKEYS : 0);
/* if we are polling, handle as a special case */
- if (pollingitem != NULL)
+ if (pollingitem != nullptr)
{
input_item_data *item = pollingitem;
/* if UI_CANCEL is pressed, abort */
if (ui_input_pressed(machine(), IPT_UI_CANCEL))
{
- pollingitem = NULL;
+ pollingitem = nullptr;
record_next = false;
toggle_none_default(item->seq, starting_seq, *item->defseq);
seqchangeditem = item;
@@ -277,7 +277,7 @@ void ui_menu_input::handle()
/* poll again; if finished, update the sequence */
if (machine().input().seq_poll())
{
- pollingitem = NULL;
+ pollingitem = nullptr;
record_next = true;
item->seq = machine().input().seq_poll_final();
seqchangeditem = item;
@@ -285,7 +285,7 @@ void ui_menu_input::handle()
}
/* otherwise, handle the events */
- else if (menu_event != NULL && menu_event->itemref != NULL)
+ else if (menu_event != nullptr && menu_event->itemref != nullptr)
{
input_item_data *item = (input_item_data *)menu_event->itemref;
switch (menu_event->iptkey)
@@ -295,7 +295,7 @@ void ui_menu_input::handle()
pollingitem = item;
last_sortorder = item->sortorder;
starting_seq = item->seq;
- machine().input().seq_poll_start((item->type == INPUT_TYPE_ANALOG) ? ITEM_CLASS_ABSOLUTE : ITEM_CLASS_SWITCH, record_next ? &item->seq : NULL);
+ machine().input().seq_poll_start((item->type == INPUT_TYPE_ANALOG) ? ITEM_CLASS_ABSOLUTE : ITEM_CLASS_SWITCH, record_next ? &item->seq : nullptr);
invalidate = true;
break;
@@ -314,7 +314,7 @@ void ui_menu_input::handle()
}
/* if the sequence changed, update it */
- if (seqchangeditem != NULL)
+ if (seqchangeditem != nullptr)
{
update_input(seqchangeditem);
@@ -325,8 +325,8 @@ void ui_menu_input::handle()
/* if the menu is invalidated, clear it now */
if (invalidate)
{
- pollingref = NULL;
- if (pollingitem != NULL)
+ pollingref = nullptr;
+ if (pollingitem != nullptr)
{
pollingref = pollingitem->ref;
pollingseq = pollingitem->seqtype;
@@ -376,7 +376,7 @@ int ui_menu_input::compare_items(const void *i1, const void *i2)
void ui_menu_input::populate_and_sort(input_item_data *itemlist)
{
- const char *nameformat[INPUT_TYPE_TOTAL] = { 0 };
+ const char *nameformat[INPUT_TYPE_TOTAL] = { nullptr };
input_item_data **itemarray, *item;
int numitems = 0, curitem;
std::string text;
@@ -391,12 +391,12 @@ void ui_menu_input::populate_and_sort(input_item_data *itemlist)
nameformat[INPUT_TYPE_ANALOG_DEC] = "%s Analog Dec";
/* first count the number of items */
- for (item = itemlist; item != NULL; item = item->next)
+ for (item = itemlist; item != nullptr; item = item->next)
numitems++;
/* now allocate an array of items and fill it up */
itemarray = (input_item_data **)m_pool_alloc(sizeof(*itemarray) * numitems);
- for (item = itemlist, curitem = 0; item != NULL; item = item->next)
+ for (item = itemlist, curitem = 0; item != nullptr; item = item->next)
itemarray[curitem++] = item;
/* sort it */
@@ -409,16 +409,16 @@ void ui_menu_input::populate_and_sort(input_item_data *itemlist)
/* generate the name of the item itself, based off the base name and the type */
item = itemarray[curitem];
- assert(nameformat[item->type] != NULL);
+ assert(nameformat[item->type] != nullptr);
if (item->owner_name && strcmp(item->owner_name, prev_owner.c_str()) != 0)
{
if (first_entry)
first_entry = false;
else
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
strprintf(text, "[root%s]", item->owner_name);
- item_append(text.c_str(), NULL, 0, NULL);
+ item_append(text.c_str(), nullptr, 0, nullptr);
prev_owner.assign(item->owner_name);
}
@@ -481,7 +481,7 @@ void ui_menu_settings::handle()
const ui_menu_event *menu_event = process(0);
// handle events
- if (menu_event != NULL && menu_event->itemref != NULL)
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
// reset
if ((FPTR)menu_event->itemref == 1)
@@ -532,7 +532,7 @@ void ui_menu_settings::handle()
switches menus
-------------------------------------------------*/
-ui_menu_settings::ui_menu_settings(running_machine &machine, render_container *container, UINT32 _type) : ui_menu(machine, container), diplist(NULL), dipcount(0)
+ui_menu_settings::ui_menu_settings(running_machine &machine, render_container *container, UINT32 _type) : ui_menu(machine, container), diplist(nullptr), dipcount(0)
{
type = _type;
}
@@ -547,12 +547,12 @@ void ui_menu_settings::populate()
/* reset the dip switch tracking */
dipcount = 0;
- diplist = NULL;
+ diplist = nullptr;
diplist_tailptr = &diplist;
/* loop over input ports and set up the current values */
- for (port = machine().ioport().first_port(); port != NULL; port = port->next())
- for (field = port->first_field(); field != NULL; field = field->next())
+ for (port = machine().ioport().first_port(); port != nullptr; port = port->next())
+ for (field = port->first_field(); field != nullptr; field = field->next())
if (field->type() == type && field->enabled())
{
UINT32 flags = 0;
@@ -570,9 +570,9 @@ void ui_menu_settings::populate()
if (first_entry)
first_entry = false;
else
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
strprintf(name, "[root%s]", field->device().tag());
- item_append(name.c_str(), NULL, 0, NULL);
+ item_append(name.c_str(), nullptr, 0, nullptr);
prev_owner.assign(field->device().tag());
}
@@ -581,7 +581,7 @@ void ui_menu_settings::populate()
item_append(name.c_str(), field->setting_name(), flags, (void *)field);
/* for DIP switches, build up the model */
- if (type == IPT_DIPSWITCH && field->first_diplocation() != NULL)
+ if (type == IPT_DIPSWITCH && field->first_diplocation() != nullptr)
{
const ioport_diplocation *diploc;
ioport_field::user_settings settings;
@@ -591,21 +591,21 @@ void ui_menu_settings::populate()
field->get_user_settings(settings);
/* iterate over each bit in the field */
- for (diploc = field->first_diplocation(); diploc != NULL; diploc = diploc->next())
+ for (diploc = field->first_diplocation(); diploc != nullptr; diploc = diploc->next())
{
UINT32 mask = accummask & ~(accummask - 1);
dip_descriptor *dip;
/* find the matching switch name */
- for (dip = diplist; dip != NULL; dip = dip->next)
+ for (dip = diplist; dip != nullptr; dip = dip->next)
if (strcmp(dip->name, diploc->name()) == 0)
break;
/* allocate new if none */
- if (dip == NULL)
+ if (dip == nullptr)
{
dip = (dip_descriptor *)m_pool_alloc(sizeof(*dip));
- dip->next = NULL;
+ dip->next = nullptr;
dip->name = diploc->name();
dip->mask = dip->state = 0;
*diplist_tailptr = dip;
@@ -626,8 +626,8 @@ void ui_menu_settings::populate()
if (type == IPT_DIPSWITCH)
custombottom = dipcount ? dipcount * (DIP_SWITCH_HEIGHT + DIP_SWITCH_SPACING) + DIP_SWITCH_SPACING : 0;
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- item_append("Reset", NULL, 0, (void *)1);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ item_append("Reset", nullptr, 0, (void *)1);
}
ui_menu_settings::~ui_menu_settings()
@@ -654,7 +654,7 @@ void ui_menu_settings_dip_switches::custom_render(void *selectedref, float top,
y1 += (float)DIP_SWITCH_SPACING;
// iterate over DIP switches
- for (dip_descriptor *dip = diplist; dip != NULL; dip = dip->next)
+ for (dip_descriptor *dip = diplist; dip != nullptr; dip = dip->next)
{
const ioport_diplocation *diploc;
UINT32 selectedmask = 0;
@@ -664,8 +664,8 @@ void ui_menu_settings_dip_switches::custom_render(void *selectedref, float top,
{
ioport_field *field = (ioport_field *)selectedref;
- if (field != NULL && field->first_diplocation() != NULL)
- for (diploc = field->first_diplocation(); diploc != NULL; diploc = diploc->next())
+ if (field != nullptr && field->first_diplocation() != nullptr)
+ for (diploc = field->first_diplocation(); diploc != nullptr; diploc = diploc->next())
if (strcmp(dip->name, diploc->name()) == 0)
selectedmask |= 1 << (diploc->number() - 1);
}
@@ -707,8 +707,8 @@ void ui_menu_settings_dip_switches::custom_render_one(float x1, float y1, float
DRAW_NORMAL,
UI_TEXT_COLOR,
PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA),
- NULL ,
- NULL);
+ nullptr ,
+ nullptr);
/* compute top and bottom for on and off positions */
switch_toggle_gap = ((DIP_SWITCH_HEIGHT/2) - SINGLE_TOGGLE_SWITCH_HEIGHT)/2;
@@ -757,7 +757,7 @@ void ui_menu_analog::handle()
const ui_menu_event *menu_event = process(UI_MENU_PROCESS_LR_REPEAT);
/* handle events */
- if (menu_event != NULL && menu_event->itemref != NULL)
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
analog_item_data *data = (analog_item_data *)menu_event->itemref;
int newval = data->cur;
@@ -828,8 +828,8 @@ void ui_menu_analog::populate()
bool first_entry = true;
/* loop over input ports and add the items */
- for (port = machine().ioport().first_port(); port != NULL; port = port->next())
- for (field = port->first_field(); field != NULL; field = field->next())
+ for (port = machine().ioport().first_port(); port != nullptr; port = port->next())
+ for (field = port->first_field(); field != nullptr; field = field->next())
if (field->is_analog() && field->enabled())
{
ioport_field::user_settings settings;
@@ -874,9 +874,9 @@ void ui_menu_analog::populate()
if (first_entry)
first_entry = false;
else
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
strprintf(name,"[root%s]", field->device().tag());
- item_append(name.c_str(), NULL, 0, NULL);
+ item_append(name.c_str(), nullptr, 0, nullptr);
prev_owner.assign(field->device().tag());
}
diff --git a/src/emu/ui/inputmap.h b/src/emu/ui/inputmap.h
index 04bd52be538..32ad48092ea 100644
--- a/src/emu/ui/inputmap.h
+++ b/src/emu/ui/inputmap.h
@@ -19,15 +19,15 @@ class ui_menu_input_groups : public ui_menu {
public:
ui_menu_input_groups(running_machine &machine, render_container *container);
virtual ~ui_menu_input_groups();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
};
class ui_menu_input : public ui_menu {
public:
ui_menu_input(running_machine &machine, render_container *container);
virtual ~ui_menu_input();
- virtual void handle();
+ virtual void handle() override;
protected:
enum {
@@ -72,29 +72,29 @@ class ui_menu_input_general : public ui_menu_input {
public:
ui_menu_input_general(running_machine &machine, render_container *container, int group);
virtual ~ui_menu_input_general();
- virtual void populate();
+ virtual void populate() override;
protected:
int group;
- virtual void update_input(struct input_item_data *seqchangeditem);
+ virtual void update_input(struct input_item_data *seqchangeditem) override;
};
class ui_menu_input_specific : public ui_menu_input {
public:
ui_menu_input_specific(running_machine &machine, render_container *container);
virtual ~ui_menu_input_specific();
- virtual void populate();
+ virtual void populate() override;
protected:
- virtual void update_input(struct input_item_data *seqchangeditem);
+ virtual void update_input(struct input_item_data *seqchangeditem) override;
};
class ui_menu_settings : public ui_menu {
public:
ui_menu_settings(running_machine &machine, render_container *container, UINT32 type);
virtual ~ui_menu_settings();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
protected:
/* DIP switch descriptor */
@@ -115,7 +115,7 @@ public:
ui_menu_settings_dip_switches(running_machine &machine, render_container *container);
virtual ~ui_menu_settings_dip_switches();
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2);
+ virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
private:
void custom_render_one(float x1, float y1, float x2, float y2, const dip_descriptor *dip, UINT32 selectedmask);
};
@@ -130,8 +130,8 @@ class ui_menu_analog : public ui_menu {
public:
ui_menu_analog(running_machine &machine, render_container *container);
virtual ~ui_menu_analog();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
enum {
diff --git a/src/emu/ui/mainmenu.cpp b/src/emu/ui/mainmenu.cpp
index b49aa51d4e3..9b0e72aacad 100644
--- a/src/emu/ui/mainmenu.cpp
+++ b/src/emu/ui/mainmenu.cpp
@@ -48,93 +48,93 @@ void ui_menu_main::populate()
std::string menu_text;
/* add input menu items */
- item_append("Input (general)", NULL, 0, (void *)INPUT_GROUPS);
+ item_append("Input (general)", nullptr, 0, (void *)INPUT_GROUPS);
strprintf(menu_text, "Input (this %s)", emulator_info::get_capstartgamenoun());
- item_append(menu_text.c_str(), NULL, 0, (void *)INPUT_SPECIFIC);
+ item_append(menu_text.c_str(), nullptr, 0, (void *)INPUT_SPECIFIC);
/* add optional input-related menus */
if (machine().ioport().has_analog())
- item_append("Analog Controls", NULL, 0, (void *)ANALOG);
+ item_append("Analog Controls", nullptr, 0, (void *)ANALOG);
if (machine().ioport().has_dips())
- item_append("Dip Switches", NULL, 0, (void *)SETTINGS_DIP_SWITCHES);
+ item_append("Dip Switches", nullptr, 0, (void *)SETTINGS_DIP_SWITCHES);
if (machine().ioport().has_configs())
{
strprintf(menu_text, "%s Configuration", emulator_info::get_capstartgamenoun());
- item_append(menu_text.c_str(), NULL, 0, (void *)SETTINGS_DRIVER_CONFIG);
+ item_append(menu_text.c_str(), nullptr, 0, (void *)SETTINGS_DRIVER_CONFIG);
}
/* add bookkeeping menu */
- item_append("Bookkeeping Info", NULL, 0, (void *)BOOKKEEPING);
+ item_append("Bookkeeping Info", nullptr, 0, (void *)BOOKKEEPING);
/* add game info menu */
strprintf(menu_text, "%s Information", emulator_info::get_capstartgamenoun());
- item_append(menu_text.c_str(), NULL, 0, (void *)GAME_INFO);
+ item_append(menu_text.c_str(), nullptr, 0, (void *)GAME_INFO);
image_interface_iterator imgiter(machine().root_device());
- if (imgiter.first() != NULL)
+ if (imgiter.first() != nullptr)
{
/* add image info menu */
- item_append("Image Information", NULL, 0, (void *)IMAGE_MENU_IMAGE_INFO);
+ item_append("Image Information", nullptr, 0, (void *)IMAGE_MENU_IMAGE_INFO);
/* add file manager menu */
- item_append("File Manager", NULL, 0, (void *)IMAGE_MENU_FILE_MANAGER);
+ item_append("File Manager", nullptr, 0, (void *)IMAGE_MENU_FILE_MANAGER);
/* add tape control menu */
cassette_device_iterator cassiter(machine().root_device());
- if (cassiter.first() != NULL)
- item_append("Tape Control", NULL, 0, (void *)TAPE_CONTROL);
+ if (cassiter.first() != nullptr)
+ item_append("Tape Control", nullptr, 0, (void *)TAPE_CONTROL);
}
pty_interface_iterator ptyiter(machine().root_device());
- if (ptyiter.first() != NULL) {
- item_append("Pseudo terminals", NULL, 0, (void *)PTY_INFO);
+ if (ptyiter.first() != nullptr) {
+ item_append("Pseudo terminals", nullptr, 0, (void *)PTY_INFO);
}
if (machine().ioport().has_bioses())
- item_append("Bios Selection", NULL, 0, (void *)BIOS_SELECTION);
+ item_append("Bios Selection", nullptr, 0, (void *)BIOS_SELECTION);
slot_interface_iterator slotiter(machine().root_device());
- if (slotiter.first() != NULL)
+ if (slotiter.first() != nullptr)
{
/* add slot info menu */
- item_append("Slot Devices", NULL, 0, (void *)SLOT_DEVICES);
+ item_append("Slot Devices", nullptr, 0, (void *)SLOT_DEVICES);
}
barcode_reader_device_iterator bcriter(machine().root_device());
- if (bcriter.first() != NULL)
+ if (bcriter.first() != nullptr)
{
/* add slot info menu */
- item_append("Barcode Reader", NULL, 0, (void *)BARCODE_READ);
+ item_append("Barcode Reader", nullptr, 0, (void *)BARCODE_READ);
}
network_interface_iterator netiter(machine().root_device());
- if (netiter.first() != NULL)
+ if (netiter.first() != nullptr)
{
/* add image info menu */
- item_append("Network Devices", NULL, 0, (void*)NETWORK_DEVICES);
+ item_append("Network Devices", nullptr, 0, (void*)NETWORK_DEVICES);
}
/* add keyboard mode menu */
if (machine().ioport().has_keyboard() && machine().ioport().natkeyboard().can_post())
- item_append("Keyboard Mode", NULL, 0, (void *)KEYBOARD_MODE);
+ item_append("Keyboard Mode", nullptr, 0, (void *)KEYBOARD_MODE);
/* add sliders menu */
- item_append("Slider Controls", NULL, 0, (void *)SLIDERS);
+ item_append("Slider Controls", nullptr, 0, (void *)SLIDERS);
/* add video options menu */
- item_append("Video Options", NULL, 0, (machine().render().target_by_index(1) != NULL) ? (void *)VIDEO_TARGETS : (void *)VIDEO_OPTIONS);
+ item_append("Video Options", nullptr, 0, (machine().render().target_by_index(1) != nullptr) ? (void *)VIDEO_TARGETS : (void *)VIDEO_OPTIONS);
/* add crosshair options menu */
if (crosshair_get_usage(machine()))
- item_append("Crosshair Options", NULL, 0, (void *)CROSSHAIR);
+ item_append("Crosshair Options", nullptr, 0, (void *)CROSSHAIR);
/* add cheat menu */
- if (machine().options().cheat() && machine().cheat().first() != NULL)
- item_append("Cheat", NULL, 0, (void *)CHEAT);
+ if (machine().options().cheat() && machine().cheat().first() != nullptr)
+ item_append("Cheat", nullptr, 0, (void *)CHEAT);
/* add reset and exit menus */
strprintf(menu_text, "Select New %s", emulator_info::get_capstartgamenoun());
- item_append(menu_text.c_str(), NULL, 0, (void *)SELECT_GAME);
+ item_append(menu_text.c_str(), nullptr, 0, (void *)SELECT_GAME);
}
ui_menu_main::~ui_menu_main()
@@ -149,7 +149,7 @@ void ui_menu_main::handle()
{
/* process the menu */
const ui_menu_event *menu_event = process(0);
- if (menu_event != NULL && menu_event->iptkey == IPT_UI_SELECT) {
+ if (menu_event != nullptr && menu_event->iptkey == IPT_UI_SELECT) {
switch((long long)(menu_event->itemref)) {
case INPUT_GROUPS:
ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_input_groups(machine(), container)));
@@ -184,11 +184,11 @@ void ui_menu_main::handle()
break;
case IMAGE_MENU_FILE_MANAGER:
- ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_file_manager(machine(), container, NULL)));
+ ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_file_manager(machine(), container, nullptr)));
break;
case TAPE_CONTROL:
- ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_tape_control(machine(), container, NULL)));
+ ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_tape_control(machine(), container, nullptr)));
break;
case PTY_INFO:
@@ -228,7 +228,7 @@ void ui_menu_main::handle()
break;
case SELECT_GAME:
- ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_select_game(machine(), container, 0)));
+ ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_select_game(machine(), container, nullptr)));
break;
case BIOS_SELECTION:
@@ -236,7 +236,7 @@ void ui_menu_main::handle()
break;
case BARCODE_READ:
- ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_barcode_reader(machine(), container, NULL)));
+ ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_barcode_reader(machine(), container, nullptr)));
break;
default:
diff --git a/src/emu/ui/mainmenu.h b/src/emu/ui/mainmenu.h
index aa1f3a99885..27a810341c3 100644
--- a/src/emu/ui/mainmenu.h
+++ b/src/emu/ui/mainmenu.h
@@ -19,8 +19,8 @@ class ui_menu_main : public ui_menu {
public:
ui_menu_main(running_machine &machine, render_container *container);
virtual ~ui_menu_main();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
enum {
diff --git a/src/emu/ui/menu.cpp b/src/emu/ui/menu.cpp
index 63b47a37b5f..6456d425ddd 100644
--- a/src/emu/ui/menu.cpp
+++ b/src/emu/ui/menu.cpp
@@ -166,14 +166,14 @@ void ui_menu::reset(ui_menu_reset_options options)
{
// based on the reset option, set the reset info
resetpos = 0;
- resetref = NULL;
+ resetref = nullptr;
if (options == UI_MENU_RESET_REMEMBER_POSITION)
resetpos = selected;
else if (options == UI_MENU_RESET_REMEMBER_REF)
resetref = item[selected].ref;
// reset all the pools and the numitems back to 0
- for (ui_menu_pool *ppool = pool; ppool != NULL; ppool = ppool->next)
+ for (ui_menu_pool *ppool = pool; ppool != nullptr; ppool = ppool->next)
ppool->top = (UINT8 *)(ppool + 1);
numitems = 0;
visitems = 0;
@@ -182,12 +182,12 @@ void ui_menu::reset(ui_menu_reset_options options)
strprintf(backtext, "Return to %s", emulator_info::get_capstartgamenoun());
// add an item to return
- if (parent == NULL)
- item_append(backtext.c_str(), NULL, 0, NULL);
+ if (parent == nullptr)
+ item_append(backtext.c_str(), nullptr, 0, nullptr);
else if (parent->is_special_main_menu())
- item_append("Exit", NULL, 0, NULL);
+ item_append("Exit", nullptr, 0, nullptr);
else
- item_append("Return to Previous Menu", NULL, 0, NULL);
+ item_append("Return to Previous Menu", nullptr, 0, nullptr);
}
@@ -264,13 +264,13 @@ void ui_menu::item_append(const char *text, const char *subtext, UINT32 flags, v
// allocate a new item and populate it
pitem = &item[index];
- pitem->text = (text != NULL) ? pool_strdup(text) : NULL;
- pitem->subtext = (subtext != NULL) ? pool_strdup(subtext) : NULL;
+ pitem->text = (text != nullptr) ? pool_strdup(text) : nullptr;
+ pitem->subtext = (subtext != nullptr) ? pool_strdup(subtext) : nullptr;
pitem->flags = flags;
pitem->ref = ref;
// update the selection if we need to
- if (resetpos == index || (resetref != NULL && resetref == ref))
+ if (resetpos == index || (resetref != nullptr && resetref == ref))
selected = index;
if (resetpos == numitems - 1)
selected = numitems - 1;
@@ -313,7 +313,7 @@ const ui_menu_event *ui_menu::process(UINT32 flags)
menu_event.itemref = item[selected].ref;
return &menu_event;
}
- return NULL;
+ return nullptr;
}
@@ -329,7 +329,7 @@ void *ui_menu::m_pool_alloc(size_t size)
assert(size < UI_MENU_POOL_SIZE);
// find a pool with enough room
- for (ppool = pool; ppool != NULL; ppool = ppool->next)
+ for (ppool = pool; ppool != nullptr; ppool = ppool->next)
if (ppool->end - ppool->top >= size)
{
void *result = ppool->top;
@@ -367,7 +367,7 @@ const char *ui_menu::pool_strdup(const char *string)
void *ui_menu::get_selection()
{
- return (selected >= 0 && selected < numitems) ? item[selected].ref : NULL;
+ return (selected >= 0 && selected < numitems) ? item[selected].ref : nullptr;
}
@@ -493,7 +493,7 @@ void ui_menu::draw(bool customonly)
if (!customonly)
{
mouse_target = ui_input_find_mouse(machine(), &mouse_target_x, &mouse_target_y, &mouse_button);
- if (mouse_target != NULL)
+ if (mouse_target != nullptr)
if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y))
mouse_hit = true;
}
@@ -577,9 +577,9 @@ void ui_menu::draw(bool customonly)
container->add_line(visible_left, line_y + 0.5f * line_height, visible_left + visible_width, line_y + 0.5f * line_height, UI_LINE_WIDTH, UI_BORDER_COLOR, PRIMFLAG_BLENDMODE(BLENDMODE_ALPHA));
// if we don't have a subitem, just draw the string centered
- else if (pitem.subtext == NULL)
+ else if (pitem.subtext == nullptr)
machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
- JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, NULL, NULL);
+ JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, nullptr, nullptr);
// otherwise, draw the item on the left and the subitem text on the right
else
@@ -590,7 +590,7 @@ void ui_menu::draw(bool customonly)
// draw the left-side text
machine().ui().draw_text_full(container, itemtext, effective_left, line_y, effective_width,
- JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, &item_width, NULL);
+ JUSTIFY_LEFT, WRAP_TRUNCATE, DRAW_NORMAL, fgcolor, bgcolor, &item_width, nullptr);
// give 2 spaces worth of padding
item_width += 2.0f * gutter_width;
@@ -605,7 +605,7 @@ void ui_menu::draw(bool customonly)
// draw the subitem right-justified
machine().ui().draw_text_full(container, subitem_text, effective_left + item_width, line_y, effective_width - item_width,
- JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, subitem_invert ? fgcolor3 : fgcolor2, bgcolor, &subitem_width, NULL);
+ JUSTIFY_RIGHT, WRAP_TRUNCATE, DRAW_NORMAL, subitem_invert ? fgcolor3 : fgcolor2, bgcolor, &subitem_width, nullptr);
// apply arrows
if (itemnum == selected && (pitem.flags & MENU_FLAG_LEFT_ARROW))
@@ -659,11 +659,11 @@ void ui_menu::draw(bool customonly)
target_x + target_width + UI_BOX_LR_BORDER,
target_y + target_height + UI_BOX_TB_BORDER, subitem_invert ? UI_SELECTED_BG_COLOR : UI_BACKGROUND_COLOR);
machine().ui().draw_text_full(container, pitem.subtext, target_x, target_y, target_width,
- JUSTIFY_RIGHT, WRAP_WORD, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, NULL, NULL);
+ JUSTIFY_RIGHT, WRAP_WORD, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr);
}
// if there is something special to add, do it by calling the virtual method
- custom_render((selected >= 0 && selected < numitems) ? item[selected].ref : NULL, customtop, custombottom, x1, y1, x2, y2);
+ custom_render((selected >= 0 && selected < numitems) ? item[selected].ref : nullptr, customtop, custombottom, x1, y1, x2, y2);
// return the number of visible lines, minus 1 for top arrow and 1 for bottom arrow
visitems = visible_lines - (top_line != 0) - (top_line + visible_lines != numitems);
@@ -720,7 +720,7 @@ void ui_menu::draw_text_box()
target_x + target_width + gutter_width + UI_BOX_LR_BORDER,
target_y + target_height + UI_BOX_TB_BORDER, (item[0].flags & MENU_FLAG_REDTEXT) ? UI_RED_COLOR : UI_BACKGROUND_COLOR);
machine().ui().draw_text_full(container, text, target_x, target_y, target_width,
- JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, NULL, NULL);
+ JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
// draw the "return to prior menu" text with a hilight behind it
highlight(
@@ -731,7 +731,7 @@ void ui_menu::draw_text_box()
target_y + target_height,
UI_SELECTED_BG_COLOR);
machine().ui().draw_text_full(container, backtext, target_x, target_y + target_height - line_height, target_width,
- JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, NULL, NULL);
+ JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NORMAL, UI_SELECTED_COLOR, UI_SELECTED_BG_COLOR, nullptr, nullptr);
// artificially set the hover to the last item so a double-click exits
hover = numitems - 1;
@@ -944,7 +944,7 @@ void ui_menu::validate_selection(int scandir)
void ui_menu::clear_free_list(running_machine &machine)
{
- while (menu_free != NULL)
+ while (menu_free != nullptr)
{
ui_menu *menu = menu_free;
menu_free = menu->parent;
@@ -964,7 +964,7 @@ void ui_menu::clear_free_list(running_machine &machine)
void ui_menu::stack_reset(running_machine &machine)
{
- while (menu_stack != NULL)
+ while (menu_stack != nullptr)
ui_menu::stack_pop(machine);
}
@@ -989,7 +989,7 @@ void ui_menu::stack_push(ui_menu *menu)
void ui_menu::stack_pop(running_machine &machine)
{
- if (menu_stack != NULL)
+ if (menu_stack != nullptr)
{
ui_menu *menu = menu_stack;
menu_stack = menu->parent;
@@ -1009,7 +1009,7 @@ bool ui_menu::stack_has_special_main_menu()
{
ui_menu *menu;
- for (menu = menu_stack; menu != NULL; menu = menu->parent)
+ for (menu = menu_stack; menu != nullptr; menu = menu->parent)
if (menu->is_special_main_menu())
return true;
@@ -1036,18 +1036,18 @@ void ui_menu::do_handle()
UINT32 ui_menu::ui_handler(running_machine &machine, render_container *container, UINT32 state)
{
// if we have no menus stacked up, start with the main menu
- if (menu_stack == NULL)
+ if (menu_stack == nullptr)
stack_push(auto_alloc_clear(machine, ui_menu_main(machine, container)));
// update the menu state
- if (menu_stack != NULL)
+ if (menu_stack != nullptr)
menu_stack->do_handle();
// clear up anything pending to be released
clear_free_list(machine);
// if the menus are to be hidden, return a cancel here
- if (machine.ui().is_menu_active() && ((ui_input_pressed(machine, IPT_UI_CONFIGURE) && !stack_has_special_main_menu()) || menu_stack == NULL))
+ if (machine.ui().is_menu_active() && ((ui_input_pressed(machine, IPT_UI_CONFIGURE) && !stack_has_special_main_menu()) || menu_stack == nullptr))
return UI_HANDLER_CANCEL;
return 0;
diff --git a/src/emu/ui/miscmenu.cpp b/src/emu/ui/miscmenu.cpp
index 1f5d3e49c3d..9053b6cd7c1 100644
--- a/src/emu/ui/miscmenu.cpp
+++ b/src/emu/ui/miscmenu.cpp
@@ -32,7 +32,7 @@ ui_menu_keyboard_mode::ui_menu_keyboard_mode(running_machine &machine, render_co
void ui_menu_keyboard_mode::populate()
{
bool natural = machine().ui().use_natural_keyboard();
- item_append("Keyboard Mode:", natural ? "Natural" : "Emulated", natural ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, NULL);
+ item_append("Keyboard Mode:", natural ? "Natural" : "Emulated", natural ? MENU_FLAG_LEFT_ARROW : MENU_FLAG_RIGHT_ARROW, nullptr);
}
ui_menu_keyboard_mode::~ui_menu_keyboard_mode()
@@ -46,7 +46,7 @@ void ui_menu_keyboard_mode::handle()
/* process the menu */
const ui_menu_event *menu_event = process(0);
- if (menu_event != NULL)
+ if (menu_event != nullptr)
{
if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT)
{
@@ -70,7 +70,7 @@ void ui_menu_bios_selection::populate()
{
/* cycle through all devices for this system */
device_iterator deviter(machine().root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
{
if (device->rom_region()) {
const char *val = "default";
@@ -85,8 +85,8 @@ void ui_menu_bios_selection::populate()
}
}
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- item_append("Reset", NULL, 0, (void *)1);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ item_append("Reset", nullptr, 0, (void *)1);
}
ui_menu_bios_selection::~ui_menu_bios_selection()
@@ -102,7 +102,7 @@ void ui_menu_bios_selection::handle()
/* process the menu */
const ui_menu_event *menu_event = process(0);
- if (menu_event != NULL && menu_event->itemref != NULL)
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
if ((FPTR)menu_event->itemref == 1 && menu_event->iptkey == IPT_UI_SELECT)
machine().schedule_hard_reset();
@@ -154,10 +154,10 @@ void ui_menu_network_devices::populate()
{
/* cycle through all devices for this system */
network_interface_iterator iter(machine().root_device());
- for (device_network_interface *network = iter.first(); network != NULL; network = iter.next())
+ for (device_network_interface *network = iter.first(); network != nullptr; network = iter.next())
{
int curr = network->get_interface();
- const char *title = NULL;
+ const char *title = nullptr;
const osd_netdev::entry_t *entry = netdev_first();
while(entry) {
if(entry->id==curr) {
@@ -180,7 +180,7 @@ void ui_menu_network_devices::handle()
/* process the menu */
const ui_menu_event *menu_event = process(0);
- if (menu_event != NULL && menu_event->itemref != NULL)
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
if (menu_event->iptkey == IPT_UI_LEFT || menu_event->iptkey == IPT_UI_RIGHT) {
device_network_interface *network = (device_network_interface *)menu_event->itemref;
@@ -266,7 +266,7 @@ void ui_menu_bookkeeping::populate()
}
/* append the single item */
- item_append(tempstring.c_str(), NULL, MENU_FLAG_MULTILINE, NULL);
+ item_append(tempstring.c_str(), nullptr, MENU_FLAG_MULTILINE, nullptr);
}
/*-------------------------------------------------
@@ -280,7 +280,7 @@ void ui_menu_crosshair::handle()
const ui_menu_event *menu_event = process(UI_MENU_PROCESS_LR_REPEAT);
/* handle events */
- if (menu_event != NULL && menu_event->itemref != NULL)
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
crosshair_user_settings settings;
crosshair_item_data *data = (crosshair_item_data *)menu_event->itemref;
@@ -445,7 +445,7 @@ void ui_menu_crosshair::populate()
/* look for the current name, then remember the name before */
/* and find the next name */
- while (((dir = path.next()) != NULL) && !finished)
+ while (((dir = path.next()) != nullptr) && !finished)
{
int length = strlen(dir->name);
diff --git a/src/emu/ui/miscmenu.h b/src/emu/ui/miscmenu.h
index 4b54a67f63e..649977869f3 100644
--- a/src/emu/ui/miscmenu.h
+++ b/src/emu/ui/miscmenu.h
@@ -20,24 +20,24 @@ class ui_menu_keyboard_mode : public ui_menu {
public:
ui_menu_keyboard_mode(running_machine &machine, render_container *container);
virtual ~ui_menu_keyboard_mode();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
};
class ui_menu_network_devices : public ui_menu {
public:
ui_menu_network_devices(running_machine &machine, render_container *container);
virtual ~ui_menu_network_devices();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
};
class ui_menu_bookkeeping : public ui_menu {
public:
ui_menu_bookkeeping(running_machine &machine, render_container *container);
virtual ~ui_menu_bookkeeping();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
attotime prevtime;
@@ -47,8 +47,8 @@ class ui_menu_crosshair : public ui_menu {
public:
ui_menu_crosshair(running_machine &machine, render_container *container);
virtual ~ui_menu_crosshair();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
enum {
@@ -73,16 +73,16 @@ class ui_menu_quit_game : public ui_menu {
public:
ui_menu_quit_game(running_machine &machine, render_container *container);
virtual ~ui_menu_quit_game();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
};
class ui_menu_bios_selection : public ui_menu {
public:
ui_menu_bios_selection(running_machine &machine, render_container *container);
virtual ~ui_menu_bios_selection();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
};
diff --git a/src/emu/ui/selgame.cpp b/src/emu/ui/selgame.cpp
index 0504842a8f4..a9286bcf3ee 100644
--- a/src/emu/ui/selgame.cpp
+++ b/src/emu/ui/selgame.cpp
@@ -59,7 +59,7 @@ void ui_menu_select_game::build_driver_list()
const osd_directory_entry *dir;
// iterate while we get new objects
- while ((dir = path.next()) != NULL)
+ while ((dir = path.next()) != nullptr)
{
char drivername[50];
char *dst = drivername;
@@ -82,7 +82,7 @@ void ui_menu_select_game::build_driver_list()
m_driverlist[listnum++] = &m_drivlist->driver();
// NULL-terminate
- m_driverlist[listnum] = NULL;
+ m_driverlist[listnum] = nullptr;
}
@@ -98,7 +98,7 @@ void ui_menu_select_game::handle()
// process the menu
const ui_menu_event *menu_event = process(0);
- if (menu_event != NULL && menu_event->itemref != NULL)
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
// reset the error on any future menu_event
if (m_error)
@@ -180,7 +180,7 @@ void ui_menu_select_game::inkey_cancel(const ui_menu_event *menu_event)
if (m_search[0] != 0)
{
// since we have already been popped, we must recreate ourself from scratch
- ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_select_game(machine(), container, NULL)));
+ ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_select_game(machine(), container, nullptr)));
}
}
@@ -221,7 +221,7 @@ void ui_menu_select_game::populate()
int matchcount;
int curitem;
- for (curitem = matchcount = 0; m_driverlist[curitem] != NULL && matchcount < VISIBLE_GAMES_IN_LIST; curitem++)
+ for (curitem = matchcount = 0; m_driverlist[curitem] != nullptr && matchcount < VISIBLE_GAMES_IN_LIST; curitem++)
if (!(m_driverlist[curitem]->flags & MACHINE_NO_STANDALONE))
matchcount++;
@@ -235,12 +235,12 @@ void ui_menu_select_game::populate()
emulator_info::get_gamesnoun(),
emulator_info::get_configname(),
emulator_info::get_appname(),emulator_info::get_appname() );
- item_append(txt.c_str(), NULL, MENU_FLAG_MULTILINE | MENU_FLAG_REDTEXT, NULL);
+ item_append(txt.c_str(), nullptr, MENU_FLAG_MULTILINE | MENU_FLAG_REDTEXT, nullptr);
return;
}
// otherwise, rebuild the match list
- assert(m_drivlist != NULL);
+ assert(m_drivlist != nullptr);
if (m_search[0] != 0 || m_matchlist[0] == -1 || m_rerandomize)
m_drivlist->find_approximate_matches(m_search, matchcount, m_matchlist);
m_rerandomize = false;
@@ -259,8 +259,8 @@ void ui_menu_select_game::populate()
// if we're forced into this, allow general input configuration as well
if (ui_menu::stack_has_special_main_menu())
{
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- item_append("Configure General Inputs", NULL, 0, (void *)1);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ item_append("Configure General Inputs", nullptr, 0, (void *)1);
}
// configure the custom rendering
@@ -290,7 +290,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
// get the size of the text
machine().ui().draw_text_full(container, tempbuf[0].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, NULL);
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
maxwidth = MAX(width, origx2 - origx1);
@@ -310,10 +310,10 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
// draw the text within it
machine().ui().draw_text_full(container, tempbuf[0].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, NULL, NULL);
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
// determine the text to render below
- driver = ((FPTR)selectedref > 1) ? (const game_driver *)selectedref : NULL;
+ driver = ((FPTR)selectedref > 1) ? (const game_driver *)selectedref : nullptr;
if ((FPTR)driver > 1)
{
const char *gfxstat, *soundstat;
@@ -380,7 +380,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
for (line = 0; line < 4; line++)
{
machine().ui().draw_text_full(container, tempbuf[line].c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, NULL);
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
maxwidth = MAX(maxwidth, width);
}
@@ -393,11 +393,11 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
// draw a box
color = UI_BACKGROUND_COLOR;
- if (driver != NULL)
+ if (driver != nullptr)
color = UI_GREEN_COLOR;
- if (driver != NULL && (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
+ if (driver != nullptr && (driver->flags & (MACHINE_IMPERFECT_GRAPHICS | MACHINE_WRONG_COLORS | MACHINE_IMPERFECT_COLORS | MACHINE_NO_SOUND | MACHINE_IMPERFECT_SOUND)) != 0)
color = UI_YELLOW_COLOR;
- if (driver != NULL && (driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
+ if (driver != nullptr && (driver->flags & (MACHINE_NOT_WORKING | MACHINE_UNEMULATED_PROTECTION)) != 0)
color = UI_RED_COLOR;
machine().ui().draw_outlined_box(container, x1, y1, x2, y2, color);
@@ -410,7 +410,7 @@ void ui_menu_select_game::custom_render(void *selectedref, float top, float bott
for (line = 0; line < 4; line++)
{
machine().ui().draw_text_full(container, tempbuf[line].c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, NULL, NULL);
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
y1 += machine().ui().get_line_height();
}
}
diff --git a/src/emu/ui/selgame.h b/src/emu/ui/selgame.h
index d442e6279bc..b5e6687c4f3 100644
--- a/src/emu/ui/selgame.h
+++ b/src/emu/ui/selgame.h
@@ -20,9 +20,9 @@ class ui_menu_select_game : public ui_menu {
public:
ui_menu_select_game(running_machine &machine, render_container *container, const char *gamename);
virtual ~ui_menu_select_game();
- virtual void populate();
- virtual void handle();
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2);
+ virtual void populate() override;
+ virtual void handle() override;
+ virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
// force game select menu
static void force_game_select(running_machine &machine, render_container *container);
diff --git a/src/emu/ui/sliders.cpp b/src/emu/ui/sliders.cpp
index f69e6b5ab14..a7b58aeb275 100644
--- a/src/emu/ui/sliders.cpp
+++ b/src/emu/ui/sliders.cpp
@@ -36,13 +36,13 @@ void ui_menu_sliders::handle()
/* process the menu */
menu_event = process(UI_MENU_PROCESS_LR_REPEAT | (hidden ? UI_MENU_PROCESS_CUSTOM_ONLY : 0));
- if (menu_event != NULL)
+ if (menu_event != nullptr)
{
/* handle keys if there is a valid item selected */
- if (menu_event->itemref != NULL)
+ if (menu_event->itemref != nullptr)
{
const slider_state *slider = (const slider_state *)menu_event->itemref;
- INT32 curvalue = (*slider->update)(machine(), slider->arg, NULL, SLIDER_NOCHANGE);
+ INT32 curvalue = (*slider->update)(machine(), slider->arg, nullptr, SLIDER_NOCHANGE);
INT32 increment = 0;
switch (menu_event->iptkey)
@@ -97,7 +97,7 @@ void ui_menu_sliders::handle()
newvalue = slider->maxval;
/* update the slider and recompute the menu */
- (*slider->update)(machine(), slider->arg, NULL, newvalue);
+ (*slider->update)(machine(), slider->arg, nullptr, newvalue);
reset(UI_MENU_RESET_REMEMBER_REF);
}
}
@@ -133,7 +133,7 @@ void ui_menu_sliders::populate()
std::string tempstring;
/* add UI sliders */
- for (const slider_state *curslider = machine().ui().get_slider_list(); curslider != NULL; curslider = curslider->next)
+ for (const slider_state *curslider = machine().ui().get_slider_list(); curslider != nullptr; curslider = curslider->next)
{
INT32 curval = (*curslider->update)(machine(), curslider->arg, &tempstring, SLIDER_NOCHANGE);
UINT32 flags = 0;
@@ -145,7 +145,7 @@ void ui_menu_sliders::populate()
}
/* add OSD sliders */
- for (const slider_state *curslider = (slider_state*)machine().osd().get_slider_list(); curslider != NULL; curslider = curslider->next)
+ for (const slider_state *curslider = (slider_state*)machine().osd().get_slider_list(); curslider != nullptr; curslider = curslider->next)
{
INT32 curval = (*curslider->update)(machine(), curslider->arg, &tempstring, SLIDER_NOCHANGE);
UINT32 flags = 0;
@@ -167,7 +167,7 @@ void ui_menu_sliders::populate()
void ui_menu_sliders::custom_render(void *selectedref, float top, float bottom, float x1, float y1, float x2, float y2)
{
const slider_state *curslider = (const slider_state *)selectedref;
- if (curslider != NULL)
+ if (curslider != nullptr)
{
float bar_left, bar_area_top, bar_width, bar_area_height, bar_top, bar_bottom, default_x, current_x;
float line_height = machine().ui().get_line_height();
@@ -198,7 +198,7 @@ void ui_menu_sliders::custom_render(void *selectedref, float top, float bottom,
/* determine the text height */
machine().ui().draw_text_full(container, tempstring.c_str(), 0, 0, x2 - x1 - 2.0f * UI_BOX_LR_BORDER,
- JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, NULL, &text_height);
+ JUSTIFY_CENTER, WRAP_TRUNCATE, DRAW_NONE, ARGB_WHITE, ARGB_BLACK, nullptr, &text_height);
/* draw the thermometer */
bar_left = x1 + UI_BOX_LR_BORDER;
@@ -225,7 +225,7 @@ void ui_menu_sliders::custom_render(void *selectedref, float top, float bottom,
/* draw the actual text */
machine().ui().draw_text_full(container, tempstring.c_str(), x1 + UI_BOX_LR_BORDER, y1 + line_height, x2 - x1 - 2.0f * UI_BOX_LR_BORDER,
- JUSTIFY_CENTER, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, NULL, &text_height);
+ JUSTIFY_CENTER, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, &text_height);
}
}
diff --git a/src/emu/ui/sliders.h b/src/emu/ui/sliders.h
index 069a10c5c84..d76a24c1671 100644
--- a/src/emu/ui/sliders.h
+++ b/src/emu/ui/sliders.h
@@ -17,10 +17,10 @@ class ui_menu_sliders : public ui_menu {
public:
ui_menu_sliders(running_machine &machine, render_container *container, bool menuless_mode = false);
virtual ~ui_menu_sliders();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
- virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2);
+ virtual void custom_render(void *selectedref, float top, float bottom, float x, float y, float x2, float y2) override;
static UINT32 ui_handler(running_machine &machine, render_container *container, UINT32 state);
diff --git a/src/emu/ui/slotopt.cpp b/src/emu/ui/slotopt.cpp
index 510e3392ec8..370fe8388a7 100644
--- a/src/emu/ui/slotopt.cpp
+++ b/src/emu/ui/slotopt.cpp
@@ -42,10 +42,10 @@ int ui_menu_slot_devices::slot_get_current_index(device_slot_interface *slot)
{
const device_slot_option *current = slot_get_current_option(slot);
- if (current != NULL)
+ if (current != nullptr)
{
int val = 0;
- for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
+ for (const device_slot_option *option = slot->first_option(); option != nullptr; option = option->next())
{
if (option == current)
return val;
@@ -64,7 +64,7 @@ int ui_menu_slot_devices::slot_get_current_index(device_slot_interface *slot)
int ui_menu_slot_devices::slot_get_length(device_slot_interface *slot)
{
int val = 0;
- for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
+ for (const device_slot_option *option = slot->first_option(); option != nullptr; option = option->next())
if (option->selectable())
val++;
@@ -113,7 +113,7 @@ const char *ui_menu_slot_devices::slot_get_option(device_slot_interface *slot, i
if (index >= 0)
{
int val = 0;
- for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
+ for (const device_slot_option *option = slot->first_option(); option != nullptr; option = option->next())
{
if (val == index)
return option->name();
@@ -152,12 +152,12 @@ void ui_menu_slot_devices::populate()
{
/* cycle through all devices for this system */
slot_interface_iterator iter(machine().root_device());
- for (device_slot_interface *slot = iter.first(); slot != NULL; slot = iter.next())
+ for (device_slot_interface *slot = iter.first(); slot != nullptr; slot = iter.next())
{
/* record the menu item */
const device_slot_option *option = slot_get_current_option(slot);
std::string opt_name;
- if (option == NULL)
+ if (option == nullptr)
opt_name.assign("------");
else
{
@@ -168,8 +168,8 @@ void ui_menu_slot_devices::populate()
item_append(slot->device().tag() + 1, opt_name.c_str(), (slot->fixed() || slot_get_length(slot) == 0) ? 0 : (MENU_FLAG_LEFT_ARROW | MENU_FLAG_RIGHT_ARROW), (void *)slot);
}
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- item_append("Reset", NULL, 0, (void *)1);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ item_append("Reset", nullptr, 0, (void *)1);
}
ui_menu_slot_devices::~ui_menu_slot_devices()
@@ -185,7 +185,7 @@ void ui_menu_slot_devices::handle()
/* process the menu */
const ui_menu_event *menu_event = process(0);
- if (menu_event != NULL && menu_event->itemref != NULL)
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
if ((FPTR)menu_event->itemref == 1 && menu_event->iptkey == IPT_UI_SELECT)
{
diff --git a/src/emu/ui/slotopt.h b/src/emu/ui/slotopt.h
index 72e36af779c..86cf75102de 100644
--- a/src/emu/ui/slotopt.h
+++ b/src/emu/ui/slotopt.h
@@ -19,8 +19,8 @@ class ui_menu_slot_devices : public ui_menu {
public:
ui_menu_slot_devices(running_machine &machine, render_container *container);
virtual ~ui_menu_slot_devices();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
device_slot_option *slot_get_current_option(device_slot_interface *slot);
diff --git a/src/emu/ui/swlist.cpp b/src/emu/ui/swlist.cpp
index b8dbeb45ccf..6155a4c5883 100644
--- a/src/emu/ui/swlist.cpp
+++ b/src/emu/ui/swlist.cpp
@@ -61,22 +61,22 @@ void ui_menu_software_parts::populate()
{
software_part_menu_entry *entry1 = (software_part_menu_entry *) m_pool_alloc(sizeof(*entry1));
entry1->type = T_EMPTY;
- entry1->part = 0;
- item_append("[empty slot]", 0, 0, entry1);
+ entry1->part = nullptr;
+ item_append("[empty slot]", nullptr, 0, entry1);
software_part_menu_entry *entry2 = (software_part_menu_entry *) m_pool_alloc(sizeof(*entry2));
entry2->type = T_FMGR;
- entry2->part = 0;
- item_append("[file manager]", 0, 0, entry2);
+ entry2->part = nullptr;
+ item_append("[file manager]", nullptr, 0, entry2);
software_part_menu_entry *entry3 = (software_part_menu_entry *) m_pool_alloc(sizeof(*entry3));
entry3->type = T_SWLIST;
- entry3->part = 0;
- item_append("[software list]", 0, 0, entry3);
+ entry3->part = nullptr;
+ item_append("[software list]", nullptr, 0, entry3);
}
- for (const software_part *swpart = m_info->first_part(); swpart != NULL; swpart = swpart->next())
+ for (const software_part *swpart = m_info->first_part(); swpart != nullptr; swpart = swpart->next())
{
if (swpart->matches_interface(m_interface))
{
@@ -84,7 +84,7 @@ void ui_menu_software_parts::populate()
// check if the available parts have specific part_id to be displayed (e.g. "Map Disc", "Bonus Disc", etc.)
// if not, we simply display "part_name"; if yes we display "part_name (part_id)"
std::string menu_part_name(swpart->name());
- if (swpart->feature("part_id") != NULL)
+ if (swpart->feature("part_id") != nullptr)
menu_part_name.append(" (").append(swpart->feature("part_id")).append(")");
entry->type = T_ENTRY;
entry->part = swpart;
@@ -103,7 +103,7 @@ void ui_menu_software_parts::handle()
// process the menu
const ui_menu_event *event = process(0);
- if (event != NULL && event->iptkey == IPT_UI_SELECT && event->itemref != NULL)
+ if (event != nullptr && event->iptkey == IPT_UI_SELECT && event->itemref != nullptr)
{
software_part_menu_entry *entry = (software_part_menu_entry *) event->itemref;
*m_result = entry->type;
@@ -126,7 +126,7 @@ ui_menu_software_list::ui_menu_software_list(running_machine &machine, render_co
{
m_swlist = swlist;
m_interface = interface;
- m_entrylist = NULL;
+ m_entrylist = nullptr;
m_ordered_by_shortname = true;
}
@@ -152,13 +152,13 @@ int ui_menu_software_list::compare_entries(const entry_info *e1, const entry_inf
if (shortname)
{
- e1_basename = (e1->short_name != NULL) ? e1->short_name : "";
- e2_basename = (e2->short_name != NULL) ? e2->short_name : "";
+ e1_basename = (e1->short_name != nullptr) ? e1->short_name : "";
+ e2_basename = (e2->short_name != nullptr) ? e2->short_name : "";
}
else
{
- e1_basename = (e1->long_name != NULL) ? e1->long_name : "";
- e2_basename = (e2->long_name != NULL) ? e2->long_name : "";
+ e1_basename = (e1->long_name != nullptr) ? e1->long_name : "";
+ e2_basename = (e2->long_name != nullptr) ? e2->long_name : "";
}
result = core_stricmp(e1_basename, e2_basename);
@@ -184,12 +184,12 @@ int ui_menu_software_list::compare_entries(const entry_info *e1, const entry_inf
ui_menu_software_list::entry_info *ui_menu_software_list::append_software_entry(const software_info *swinfo)
{
- entry_info *entry = NULL;
+ entry_info *entry = nullptr;
entry_info **entryptr;
bool entry_updated = FALSE;
// check if at least one of the parts has the correct interface and add a menu entry only in this case
- for (const software_part *swpart = swinfo->first_part(); swpart != NULL; swpart = swpart->next())
+ for (const software_part *swpart = swinfo->first_part(); swpart != nullptr; swpart = swpart->next())
{
if (swpart->matches_interface(m_interface) && swpart->is_compatible(*m_swlist))
{
@@ -209,7 +209,7 @@ ui_menu_software_list::entry_info *ui_menu_software_list::append_software_entry(
{
// find the end of the list
entryptr = &m_entrylist;
- while ((*entryptr != NULL) && (compare_entries(entry, *entryptr, m_ordered_by_shortname) >= 0))
+ while ((*entryptr != nullptr) && (compare_entries(entry, *entryptr, m_ordered_by_shortname) >= 0))
entryptr = &(*entryptr)->next;
// insert the entry
@@ -228,14 +228,14 @@ ui_menu_software_list::entry_info *ui_menu_software_list::append_software_entry(
void ui_menu_software_list::populate()
{
// build up the list of entries for the menu
- for (const software_info *swinfo = m_swlist->first_software_info(); swinfo != NULL; swinfo = swinfo->next())
+ for (const software_info *swinfo = m_swlist->first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
append_software_entry(swinfo);
// add an entry to change ordering
- item_append("Switch Item Ordering", NULL, 0, (void *)1);
+ item_append("Switch Item Ordering", nullptr, 0, (void *)1);
// append all of the menu entries
- for (entry_info *entry = m_entrylist; entry != NULL; entry = entry->next)
+ for (entry_info *entry = m_entrylist; entry != nullptr; entry = entry->next)
item_append(entry->short_name, entry->long_name, 0, entry);
}
@@ -247,18 +247,18 @@ void ui_menu_software_list::populate()
void ui_menu_software_list::handle()
{
const entry_info *entry;
- const entry_info *selected_entry = NULL;
+ const entry_info *selected_entry = nullptr;
int bestmatch = 0;
// process the menu
const ui_menu_event *event = process(0);
- if (event != NULL && event->itemref != NULL)
+ if (event != nullptr && event->itemref != nullptr)
{
if ((FPTR)event->itemref == 1 && event->iptkey == IPT_UI_SELECT)
{
m_ordered_by_shortname = !m_ordered_by_shortname;
- m_entrylist = NULL;
+ m_entrylist = nullptr;
// reset the char buffer if we change ordering criterion
memset(m_filename_buffer, '\0', ARRAY_LENGTH(m_filename_buffer));
@@ -312,11 +312,11 @@ void ui_menu_software_list::handle()
// check for entries which matches our filename_buffer:
// from current entry to the end
- for (entry = cur_selected; entry != NULL; entry = entry->next)
+ for (entry = cur_selected; entry != nullptr; entry = entry->next)
{
const char *compare_name = m_ordered_by_shortname ? entry->short_name : entry->long_name;
- if (compare_name != NULL && m_filename_buffer != NULL)
+ if (compare_name != nullptr && m_filename_buffer != nullptr)
{
int match = 0;
for (int i = 0; i < ARRAY_LENGTH(m_filename_buffer); i++)
@@ -337,7 +337,7 @@ void ui_menu_software_list::handle()
{
const char *compare_name = m_ordered_by_shortname ? entry->short_name : entry->long_name;
- if (compare_name != NULL && m_filename_buffer != NULL)
+ if (compare_name != nullptr && m_filename_buffer != nullptr)
{
int match = 0;
for (int i = 0; i < ARRAY_LENGTH(m_filename_buffer); i++)
@@ -354,7 +354,7 @@ void ui_menu_software_list::handle()
}
}
- if (selected_entry != NULL && selected_entry != cur_selected)
+ if (selected_entry != nullptr && selected_entry != cur_selected)
set_selection((void *) selected_entry);
}
}
@@ -406,32 +406,32 @@ void ui_menu_software::populate()
// Add original software lists for this system
software_list_device_iterator iter(machine().config().root_device());
- for (software_list_device *swlistdev = iter.first(); swlistdev != NULL; swlistdev = iter.next())
+ for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next())
if (swlistdev->list_type() == SOFTWARE_LIST_ORIGINAL_SYSTEM)
- if (swlistdev->first_software_info() != NULL && m_interface != NULL)
+ if (swlistdev->first_software_info() != nullptr && m_interface != nullptr)
{
bool found = false;
- for (const software_info *swinfo = swlistdev->first_software_info(); swinfo != NULL; swinfo = swinfo->next())
+ for (const software_info *swinfo = swlistdev->first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
if (swinfo->first_part()->matches_interface(m_interface))
found = true;
if (found)
- item_append(swlistdev->description(), NULL, 0, (void *)swlistdev);
+ item_append(swlistdev->description(), nullptr, 0, (void *)swlistdev);
}
// add compatible software lists for this system
- for (software_list_device *swlistdev = iter.first(); swlistdev != NULL; swlistdev = iter.next())
+ for (software_list_device *swlistdev = iter.first(); swlistdev != nullptr; swlistdev = iter.next())
if (swlistdev->list_type() == SOFTWARE_LIST_COMPATIBLE_SYSTEM)
- if (swlistdev->first_software_info() != NULL && m_interface != NULL)
+ if (swlistdev->first_software_info() != nullptr && m_interface != nullptr)
{
bool found = false;
- for (const software_info *swinfo = swlistdev->first_software_info(); swinfo != NULL; swinfo = swinfo->next())
+ for (const software_info *swinfo = swlistdev->first_software_info(); swinfo != nullptr; swinfo = swinfo->next())
if (swinfo->first_part()->matches_interface(m_interface))
found = true;
if (found)
{
if (!have_compatible)
- item_append("[compatible lists]", NULL, MENU_FLAG_DISABLE, NULL);
- item_append(swlistdev->description(), NULL, 0, (void *)swlistdev);
+ item_append("[compatible lists]", nullptr, MENU_FLAG_DISABLE, nullptr);
+ item_append(swlistdev->description(), nullptr, 0, (void *)swlistdev);
}
have_compatible = true;
}
@@ -447,7 +447,7 @@ void ui_menu_software::handle()
// process the menu
const ui_menu_event *event = process(0);
- if (event != NULL && event->iptkey == IPT_UI_SELECT) {
+ if (event != nullptr && event->iptkey == IPT_UI_SELECT) {
// ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_software_list(machine(), container, (software_list_config *)event->itemref, image)));
*m_result = (software_list_device *)event->itemref;
ui_menu::stack_pop(machine());
diff --git a/src/emu/ui/swlist.h b/src/emu/ui/swlist.h
index 7ced74cc97c..944aeadf6c5 100644
--- a/src/emu/ui/swlist.h
+++ b/src/emu/ui/swlist.h
@@ -18,8 +18,8 @@ public:
enum { T_EMPTY, T_FMGR, T_SWLIST, T_ENTRY };
ui_menu_software_parts(running_machine &machine, render_container *container, const software_info *info, const char *interface, const software_part **part, bool other_opt, int *result);
virtual ~ui_menu_software_parts();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
struct software_part_menu_entry {
@@ -42,8 +42,8 @@ class ui_menu_software_list : public ui_menu {
public:
ui_menu_software_list(running_machine &machine, render_container *container, software_list_device *swlist, const char *interface, std::string &result);
virtual ~ui_menu_software_list();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
struct entry_info {
@@ -73,8 +73,8 @@ class ui_menu_software : public ui_menu {
public:
ui_menu_software(running_machine &machine, render_container *container, const char *interface, software_list_device **result);
virtual ~ui_menu_software();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
const char * m_interface;
diff --git a/src/emu/ui/tapectrl.cpp b/src/emu/ui/tapectrl.cpp
index a44fb9f009a..253ffbf915d 100644
--- a/src/emu/ui/tapectrl.cpp
+++ b/src/emu/ui/tapectrl.cpp
@@ -77,7 +77,7 @@ void ui_menu_tape_control::populate()
tapeflags |= MENU_FLAG_RIGHT_ARROW;
}
- get_time_string(timepos, current_device(), NULL, NULL);
+ get_time_string(timepos, current_device(), nullptr, nullptr);
state = current_device()->get_state();
item_append(
(state & CASSETTE_MASK_UISTATE) == CASSETTE_STOPPED
@@ -91,19 +91,19 @@ void ui_menu_tape_control::populate()
TAPECMD_SLIDER);
// pause or stop
- item_append("Pause/Stop", NULL, 0, TAPECMD_STOP);
+ item_append("Pause/Stop", nullptr, 0, TAPECMD_STOP);
// play
- item_append("Play", NULL, 0, TAPECMD_PLAY);
+ item_append("Play", nullptr, 0, TAPECMD_PLAY);
// record
- item_append("Record", NULL, 0, TAPECMD_RECORD);
+ item_append("Record", nullptr, 0, TAPECMD_RECORD);
// rewind
- item_append("Rewind", NULL, 0, TAPECMD_REWIND);
+ item_append("Rewind", nullptr, 0, TAPECMD_REWIND);
// fast forward
- item_append("Fast Forward", NULL, 0, TAPECMD_FAST_FORWARD);
+ item_append("Fast Forward", nullptr, 0, TAPECMD_FAST_FORWARD);
}
}
}
@@ -121,7 +121,7 @@ void ui_menu_tape_control::handle()
// process the menu
const ui_menu_event *event = process(UI_MENU_PROCESS_LR_REPEAT);
- if (event != NULL)
+ if (event != nullptr)
{
switch(event->iptkey)
{
@@ -175,8 +175,8 @@ void ui_menu_tape_control::get_time_string(std::string &dest, cassette_image_dev
else
strprintf(dest, "%04d/%04d", 0, (int)t1);
- if (curpos != NULL)
+ if (curpos != nullptr)
*curpos = t0;
- if (endpos != NULL)
+ if (endpos != nullptr)
*endpos = t1;
}
diff --git a/src/emu/ui/tapectrl.h b/src/emu/ui/tapectrl.h
index 8e4e539df9b..9cfa1316a99 100644
--- a/src/emu/ui/tapectrl.h
+++ b/src/emu/ui/tapectrl.h
@@ -20,8 +20,8 @@ class ui_menu_tape_control : public ui_menu_device_control<cassette_image_device
public:
ui_menu_tape_control(running_machine &machine, render_container *container, cassette_image_device *device);
virtual ~ui_menu_tape_control();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
static void get_time_string(std::string &dest, cassette_image_device *cassette, int *curpos, int *endpos);
diff --git a/src/emu/ui/ui.cpp b/src/emu/ui/ui.cpp
index 0f59220ccc8..1558f7a74d9 100644
--- a/src/emu/ui/ui.cpp
+++ b/src/emu/ui/ui.cpp
@@ -231,8 +231,8 @@ ui_manager::ui_manager(running_machine &machine)
ui_gfx_init(machine);
// reset instance variables
- m_font = NULL;
- m_handler_callback = NULL;
+ m_font = nullptr;
+ m_handler_callback = nullptr;
m_handler_param = 0;
m_single_step = false;
m_showfps = false;
@@ -240,7 +240,7 @@ ui_manager::ui_manager(running_machine &machine)
m_show_profiler = false;
m_popup_text_end = 0;
m_use_natural_keyboard = false;
- m_mouse_arrow_texture = NULL;
+ m_mouse_arrow_texture = nullptr;
// more initialization
set_handler(handler_messagebox, 0);
@@ -268,13 +268,13 @@ void ui_manager::exit()
{
// free the mouse texture
machine().render().texture_free(m_mouse_arrow_texture);
- m_mouse_arrow_texture = NULL;
+ m_mouse_arrow_texture = nullptr;
// free the font
- if (m_font != NULL)
+ if (m_font != nullptr)
{
machine().render().font_free(m_font);
- m_font = NULL;
+ m_font = nullptr;
}
}
@@ -438,7 +438,7 @@ void ui_manager::update_and_render(render_container *container)
machine().cheat().render_text(*container);
// call the current UI handler
- assert(m_handler_callback != NULL);
+ assert(m_handler_callback != nullptr);
m_handler_param = (*m_handler_callback)(machine(), container, m_handler_param);
// display any popup messages
@@ -453,7 +453,7 @@ void ui_manager::update_and_render(render_container *container)
bool mouse_button;
render_target *mouse_target = ui_input_find_mouse(machine(), &mouse_target_x, &mouse_target_y, &mouse_button);
- if (mouse_target != NULL)
+ if (mouse_target != nullptr)
{
float mouse_y=-1,mouse_x=-1;
if (mouse_target->map_point_container(mouse_target_x, mouse_target_y, *container, mouse_x, mouse_y)) {
@@ -475,7 +475,7 @@ void ui_manager::update_and_render(render_container *container)
render_font *ui_manager::get_font()
{
// allocate the font and messagebox string
- if (m_font == NULL)
+ if (m_font == nullptr)
m_font = machine().render().font_alloc(machine().options().ui_font());
return m_font;
}
@@ -582,7 +582,7 @@ void ui_manager::draw_outlined_box(render_container *container, float x0, float
void ui_manager::draw_text(render_container *container, const char *buf, float x, float y)
{
- draw_text_full(container, buf, x, y, 1.0f - x, JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, NULL, NULL);
+ draw_text_full(container, buf, x, y, 1.0f - x, JUSTIFY_LEFT, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
@@ -612,7 +612,7 @@ void ui_manager::draw_text_full(render_container *container, const char *origs,
// loop over lines
while (*s != 0)
{
- const char *lastbreak = NULL;
+ const char *lastbreak = nullptr;
int line_justify = justify;
unicode_char schar;
int scharcount;
@@ -679,7 +679,7 @@ void ui_manager::draw_text_full(render_container *container, const char *origs,
if (wrap == WRAP_WORD)
{
// if we hit a break, back up to there with the appropriate width
- if (lastbreak != NULL)
+ if (lastbreak != nullptr)
{
s = lastbreak;
curwidth = lastbreak_width;
@@ -844,7 +844,7 @@ void ui_manager::draw_text_box(render_container *container, const char *text, in
target_x + target_width + UI_BOX_LR_BORDER,
target_y + target_height + UI_BOX_TB_BORDER, backcolor);
draw_text_full(container, text, target_x, target_y, target_width + 0.00001f,
- justify, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, NULL, NULL);
+ justify, WRAP_WORD, DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
@@ -1159,7 +1159,7 @@ std::string &ui_manager::game_info_astring(std::string &str)
// loop over all CPUs
execute_interface_iterator execiter(machine().root_device());
tagmap_t<UINT8> exectags;
- for (device_execute_interface *exec = execiter.first(); exec != NULL; exec = execiter.next())
+ for (device_execute_interface *exec = execiter.first(); exec != nullptr; exec = execiter.next())
{
if (exectags.add(exec->device().tag(), 1, FALSE) == TMERR_DUPLICATE)
continue;
@@ -1170,7 +1170,7 @@ std::string &ui_manager::game_info_astring(std::string &str)
int count = 1;
const char *name = exec->device().name();
execute_interface_iterator execinneriter(machine().root_device());
- for (device_execute_interface *scan = execinneriter.first(); scan != NULL; scan = execinneriter.next())
+ for (device_execute_interface *scan = execinneriter.first(); scan != nullptr; scan = execinneriter.next())
{
if (exec->device().type() == scan->device().type() && strcmp(name, scan->device().name()) == 0 && exec->device().clock() == scan->device().clock())
if (exectags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE)
@@ -1193,7 +1193,7 @@ std::string &ui_manager::game_info_astring(std::string &str)
sound_interface_iterator snditer(machine().root_device());
tagmap_t<UINT8> soundtags;
bool found_sound = false;
- for (device_sound_interface *sound = snditer.first(); sound != NULL; sound = snditer.next())
+ for (device_sound_interface *sound = snditer.first(); sound != nullptr; sound = snditer.next())
{
if (soundtags.add(sound->device().tag(), 1, FALSE) == TMERR_DUPLICATE)
continue;
@@ -1206,7 +1206,7 @@ std::string &ui_manager::game_info_astring(std::string &str)
// count how many identical sound chips we have
int count = 1;
sound_interface_iterator sndinneriter(machine().root_device());
- for (device_sound_interface *scan = sndinneriter.first(); scan != NULL; scan = sndinneriter.next())
+ for (device_sound_interface *scan = sndinneriter.first(); scan != nullptr; scan = sndinneriter.next())
{
if (sound->device().type() == scan->device().type() && sound->device().clock() == scan->device().clock())
if (soundtags.add(scan->device().tag(), 1, FALSE) != TMERR_DUPLICATE)
@@ -1235,7 +1235,7 @@ std::string &ui_manager::game_info_astring(std::string &str)
str.append("None\n");
else
{
- for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
+ for (screen_device *screen = scriter.first(); screen != nullptr; screen = scriter.next())
{
if (scrcount > 1)
{
@@ -1430,11 +1430,11 @@ bool ui_manager::can_paste()
char *text = osd_get_clipboard_text();
// free the string if allocated
- if (text != NULL)
+ if (text != nullptr)
osd_free(text);
// did we have text?
- return text != NULL;
+ return text != nullptr;
}
@@ -1448,7 +1448,7 @@ void ui_manager::paste()
char *text = osd_get_clipboard_text();
// was a result returned?
- if (text != NULL)
+ if (text != nullptr)
{
// post the text
machine().ioport().natkeyboard().post_utf8(text);
@@ -1470,7 +1470,7 @@ void ui_manager::image_handler_ingame()
if (machine().phase() == MACHINE_PHASE_RUNNING)
{
image_interface_iterator iter(machine().root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
image->call_display();
}
}
@@ -1490,14 +1490,14 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
{
std::string tempstring;
machine.ui().draw_text_full(container, machine.video().speed_text(tempstring).c_str(), 0.0f, 0.0f, 1.0f,
- JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, NULL, NULL);
+ JUSTIFY_RIGHT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
}
// draw the profiler if visible
if (machine.ui().show_profiler())
{
const char *text = g_profiler.text(machine);
- machine.ui().draw_text_full(container, text, 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, NULL, NULL);
+ machine.ui().draw_text_full(container, text, 0.0f, 0.0f, 1.0f, JUSTIFY_LEFT, WRAP_WORD, DRAW_OPAQUE, ARGB_WHITE, ARGB_BLACK, nullptr, nullptr);
}
// if we're single-stepping, pause now
@@ -1590,7 +1590,7 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
if (ui_input_pressed(machine, IPT_UI_TAPE_START))
{
cassette_device_iterator cassiter(machine.root_device());
- for (cassette_image_device *cass = cassiter.first(); cass != NULL; cass = cassiter.next())
+ for (cassette_image_device *cass = cassiter.first(); cass != nullptr; cass = cassiter.next())
{
cass->change_state(CASSETTE_PLAY, CASSETTE_MASK_UISTATE);
return 0;
@@ -1599,7 +1599,7 @@ UINT32 ui_manager::handler_ingame(running_machine &machine, render_container *co
if (ui_input_pressed(machine, IPT_UI_TAPE_STOP))
{
cassette_device_iterator cassiter(machine.root_device());
- for (cassette_image_device *cass = cassiter.first(); cass != NULL; cass = cassiter.next())
+ for (cassette_image_device *cass = cassiter.first(); cass != nullptr; cass = cassiter.next())
{
cass->change_state(CASSETTE_STOPPED, CASSETTE_MASK_UISTATE);
return 0;
@@ -1845,13 +1845,13 @@ static slider_state *slider_init(running_machine &machine)
{
ioport_field *field;
ioport_port *port;
- slider_state *listhead = NULL;
+ slider_state *listhead = nullptr;
slider_state **tailptr = &listhead;
std::string str;
int item;
// add overall volume
- *tailptr = slider_alloc(machine, "Master Volume", -32, 0, 0, 1, slider_volume, NULL);
+ *tailptr = slider_alloc(machine, "Master Volume", -32, 0, 0, 1, slider_volume, nullptr);
tailptr = &(*tailptr)->next;
// add per-channel volume
@@ -1868,8 +1868,8 @@ static slider_state *slider_init(running_machine &machine)
}
// add analog adjusters
- for (port = machine.ioport().first_port(); port != NULL; port = port->next())
- for (field = port->first_field(); field != NULL; field = field->next())
+ for (port = machine.ioport().first_port(); port != nullptr; port = port->next())
+ for (field = port->first_field(); field != nullptr; field = field->next())
if (field->type() == IPT_ADJUSTER)
{
void *param = (void *)field;
@@ -1881,7 +1881,7 @@ static slider_state *slider_init(running_machine &machine)
if (machine.options().cheat())
{
execute_interface_iterator iter(machine.root_device());
- for (device_execute_interface *exec = iter.first(); exec != NULL; exec = iter.next())
+ for (device_execute_interface *exec = iter.first(); exec != nullptr; exec = iter.next())
{
void *param = (void *)&exec->device();
strprintf(str, "Overclock CPU %s", exec->device().tag());
@@ -1892,7 +1892,7 @@ static slider_state *slider_init(running_machine &machine)
// add screen parameters
screen_device_iterator scriter(machine.root_device());
- for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
+ for (screen_device *screen = scriter.first(); screen != nullptr; screen = scriter.next())
{
int defxscale = floor(screen->xscale() * 1000.0f + 0.5f);
int defyscale = floor(screen->yscale() * 1000.0f + 0.5f);
@@ -1935,7 +1935,7 @@ static slider_state *slider_init(running_machine &machine)
}
laserdisc_device_iterator lditer(machine.root_device());
- for (laserdisc_device *laserdisc = lditer.first(); laserdisc != NULL; laserdisc = lditer.next())
+ for (laserdisc_device *laserdisc = lditer.first(); laserdisc != nullptr; laserdisc = lditer.next())
if (laserdisc->overlay_configured())
{
laserdisc_overlay_config config;
@@ -1961,25 +1961,25 @@ static slider_state *slider_init(running_machine &machine)
tailptr = &(*tailptr)->next;
}
- for (screen_device *screen = scriter.first(); screen != NULL; screen = scriter.next())
+ for (screen_device *screen = scriter.first(); screen != nullptr; screen = scriter.next())
if (screen->screen_type() == SCREEN_TYPE_VECTOR)
{
// add vector control
- *tailptr = slider_alloc(machine, "Vector Flicker", 0, 0, 1000, 10, slider_flicker, NULL);
+ *tailptr = slider_alloc(machine, "Vector Flicker", 0, 0, 1000, 10, slider_flicker, nullptr);
tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(machine, "Beam Width Minimum", 1, 100, 1000, 1, slider_beam_width_min, NULL);
+ *tailptr = slider_alloc(machine, "Beam Width Minimum", 1, 100, 1000, 1, slider_beam_width_min, nullptr);
tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(machine, "Beam Width Maximum", 1, 100, 1000, 1, slider_beam_width_max, NULL);
+ *tailptr = slider_alloc(machine, "Beam Width Maximum", 1, 100, 1000, 1, slider_beam_width_max, nullptr);
tailptr = &(*tailptr)->next;
- *tailptr = slider_alloc(machine, "Beam Intensity Weight", -1000, 0, 1000, 10, slider_beam_intensity_weight, NULL);
+ *tailptr = slider_alloc(machine, "Beam Intensity Weight", -1000, 0, 1000, 10, slider_beam_intensity_weight, nullptr);
tailptr = &(*tailptr)->next;
break;
}
#ifdef MAME_DEBUG
// add crosshair adjusters
- for (port = machine.ioport().first_port(); port != NULL; port = port->next())
- for (field = port->first_field(); field != NULL; field = field->next())
+ for (port = machine.ioport().first_port(); port != nullptr; port = port->next())
+ for (field = port->first_field(); field != nullptr; field = field->next())
if (field->crosshair_axis() != CROSSHAIR_AXIS_NONE && field->player() == 0)
{
void *param = (void *)field;
@@ -2004,7 +2004,7 @@ static INT32 slider_volume(running_machine &machine, void *arg, std::string *str
{
if (newval != SLIDER_NOCHANGE)
machine.sound().set_attenuation(newval);
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%3ddB", machine.sound().attenuation());
return machine.sound().attenuation();
}
@@ -2026,7 +2026,7 @@ static INT32 slider_mixervol(running_machine &machine, void *arg, std::string *s
if (newval > curval && (newval - curval) <= 4) newval += 4; // round up on increment
info.stream->set_user_gain(info.inputnum, (float)newval * 0.001f);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%4.2f", (double) info.stream->user_gain(info.inputnum));
return floorf(info.stream->user_gain(info.inputnum) * 1000.0f + 0.5f);
}
@@ -2048,7 +2048,7 @@ static INT32 slider_adjuster(running_machine &machine, void *arg, std::string *s
settings.value = newval;
field->set_user_settings(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%d%%", settings.value);
return settings.value;
}
@@ -2064,7 +2064,7 @@ static INT32 slider_overclock(running_machine &machine, void *arg, std::string *
device_t *cpu = (device_t *)arg;
if (newval != SLIDER_NOCHANGE)
cpu->set_clock_scale((float)newval * 0.001f);
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%3.0f%%", floor(cpu->clock_scale() * 100.0 + 0.5));
return floor(cpu->clock_scale() * 1000.0 + 0.5);
}
@@ -2087,7 +2087,7 @@ static INT32 slider_refresh(running_machine &machine, void *arg, std::string *st
const rectangle &visarea = screen->visible_area();
screen->configure(width, height, visarea, HZ_TO_ATTOSECONDS(defrefresh + (double)newval * 0.001));
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3ffps", ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds()));
refresh = ATTOSECONDS_TO_HZ(machine.first_screen()->frame_period().attoseconds());
return floor((refresh - defrefresh) * 1000.0 + 0.5);
@@ -2110,7 +2110,7 @@ static INT32 slider_brightness(running_machine &machine, void *arg, std::string
settings.m_brightness = (float)newval * 0.001f;
screen->container().set_user_settings(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_brightness);
return floor(settings.m_brightness * 1000.0f + 0.5f);
}
@@ -2132,7 +2132,7 @@ static INT32 slider_contrast(running_machine &machine, void *arg, std::string *s
settings.m_contrast = (float)newval * 0.001f;
screen->container().set_user_settings(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_contrast);
return floor(settings.m_contrast * 1000.0f + 0.5f);
}
@@ -2153,7 +2153,7 @@ static INT32 slider_gamma(running_machine &machine, void *arg, std::string *str,
settings.m_gamma = (float)newval * 0.001f;
screen->container().set_user_settings(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_gamma);
return floor(settings.m_gamma * 1000.0f + 0.5f);
}
@@ -2175,7 +2175,7 @@ static INT32 slider_xscale(running_machine &machine, void *arg, std::string *str
settings.m_xscale = (float)newval * 0.001f;
screen->container().set_user_settings(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_xscale);
return floor(settings.m_xscale * 1000.0f + 0.5f);
}
@@ -2197,7 +2197,7 @@ static INT32 slider_yscale(running_machine &machine, void *arg, std::string *str
settings.m_yscale = (float)newval * 0.001f;
screen->container().set_user_settings(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_yscale);
return floor(settings.m_yscale * 1000.0f + 0.5f);
}
@@ -2219,7 +2219,7 @@ static INT32 slider_xoffset(running_machine &machine, void *arg, std::string *st
settings.m_xoffset = (float)newval * 0.001f;
screen->container().set_user_settings(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_xoffset);
return floor(settings.m_xoffset * 1000.0f + 0.5f);
}
@@ -2241,7 +2241,7 @@ static INT32 slider_yoffset(running_machine &machine, void *arg, std::string *st
settings.m_yoffset = (float)newval * 0.001f;
screen->container().set_user_settings(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_yoffset);
return floor(settings.m_yoffset * 1000.0f + 0.5f);
}
@@ -2263,7 +2263,7 @@ static INT32 slider_overxscale(running_machine &machine, void *arg, std::string
settings.m_overscalex = (float)newval * 0.001f;
laserdisc->set_overlay_config(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_overscalex);
return floor(settings.m_overscalex * 1000.0f + 0.5f);
}
@@ -2285,7 +2285,7 @@ static INT32 slider_overyscale(running_machine &machine, void *arg, std::string
settings.m_overscaley = (float)newval * 0.001f;
laserdisc->set_overlay_config(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_overscaley);
return floor(settings.m_overscaley * 1000.0f + 0.5f);
}
@@ -2307,7 +2307,7 @@ static INT32 slider_overxoffset(running_machine &machine, void *arg, std::string
settings.m_overposx = (float)newval * 0.001f;
laserdisc->set_overlay_config(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_overposx);
return floor(settings.m_overposx * 1000.0f + 0.5f);
}
@@ -2329,7 +2329,7 @@ static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string
settings.m_overposy = (float)newval * 0.001f;
laserdisc->set_overlay_config(settings);
}
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%.3f", (double) settings.m_overposy);
return floor(settings.m_overposy * 1000.0f + 0.5f);
}
@@ -2342,10 +2342,10 @@ static INT32 slider_overyoffset(running_machine &machine, void *arg, std::string
static INT32 slider_flicker(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
- vector_device *vector = NULL;
+ vector_device *vector = nullptr;
if (newval != SLIDER_NOCHANGE)
vector->set_flicker((float)newval * 0.001f);
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%1.2f", (double) vector->get_flicker());
return floor(vector->get_flicker() * 1000.0f + 0.5f);
}
@@ -2358,10 +2358,10 @@ static INT32 slider_flicker(running_machine &machine, void *arg, std::string *st
static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
- vector_device *vector = NULL;
+ vector_device *vector = nullptr;
if (newval != SLIDER_NOCHANGE)
vector->set_beam_width_min(MIN((float)newval * 0.01f, vector->get_beam_width_max()));
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%1.2f", (double) vector->get_beam_width_min());
return floor(vector->get_beam_width_min() * 100.0f + 0.5f);
}
@@ -2374,10 +2374,10 @@ static INT32 slider_beam_width_min(running_machine &machine, void *arg, std::str
static INT32 slider_beam_width_max(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
- vector_device *vector = NULL;
+ vector_device *vector = nullptr;
if (newval != SLIDER_NOCHANGE)
vector->set_beam_width_max(MAX((float)newval * 0.01f, vector->get_beam_width_min()));
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%1.2f", (double) vector->get_beam_width_max());
return floor(vector->get_beam_width_max() * 100.0f + 0.5f);
}
@@ -2390,10 +2390,10 @@ static INT32 slider_beam_width_max(running_machine &machine, void *arg, std::str
static INT32 slider_beam_intensity_weight(running_machine &machine, void *arg, std::string *str, INT32 newval)
{
- vector_device *vector = NULL;
+ vector_device *vector = nullptr;
if (newval != SLIDER_NOCHANGE)
vector->set_beam_intensity_weight((float)newval * 0.001f);
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%1.2f", (double) vector->get_beam_intensity_weight());
return floor(vector->get_beam_intensity_weight() * 1000.0f + 0.5f);
}
@@ -2430,7 +2430,7 @@ static INT32 slider_crossscale(running_machine &machine, void *arg, std::string
if (newval != SLIDER_NOCHANGE)
field->set_crosshair_scale(float(newval) * 0.001);
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%s %s %1.3f", "Crosshair Scale", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
return floor(field->crosshair_scale() * 1000.0f + 0.5f);
}
@@ -2449,7 +2449,7 @@ static INT32 slider_crossoffset(running_machine &machine, void *arg, std::string
if (newval != SLIDER_NOCHANGE)
field->set_crosshair_offset(float(newval) * 0.001f);
- if (str != NULL)
+ if (str != nullptr)
strprintf(*str,"%s %s %1.3f", "Crosshair Offset", (field->crosshair_axis() == CROSSHAIR_AXIS_X) ? "X" : "Y", float(newval) * 0.001f);
return field->crosshair_offset();
}
diff --git a/src/emu/ui/ui.h b/src/emu/ui/ui.h
index 6c4af3bf005..987cf2b8976 100644
--- a/src/emu/ui/ui.h
+++ b/src/emu/ui/ui.h
@@ -135,7 +135,7 @@ public:
void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t backcolor);
void draw_outlined_box(render_container *container, float x0, float y0, float x1, float y1, rgb_t fgcolor, rgb_t bgcolor);
void draw_text(render_container *container, const char *buf, float x, float y);
- void draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth = NULL, float *totalheight = NULL);
+ void draw_text_full(render_container *container, const char *origs, float x, float y, float origwrapwidth, int justify, int wrap, int draw, rgb_t fgcolor, rgb_t bgcolor, float *totalwidth = nullptr, float *totalheight = nullptr);
void draw_text_box(render_container *container, const char *text, int justify, float xpos, float ypos, rgb_t backcolor);
void draw_message_window(render_container *container, const char *text);
diff --git a/src/emu/ui/videoopt.cpp b/src/emu/ui/videoopt.cpp
index 584ec6e679f..c3427004008 100644
--- a/src/emu/ui/videoopt.cpp
+++ b/src/emu/ui/videoopt.cpp
@@ -23,7 +23,7 @@ void ui_menu_video_targets::handle()
{
/* process the menu */
const ui_menu_event *menu_event = process(0);
- if (menu_event != NULL && menu_event->iptkey == IPT_UI_SELECT)
+ if (menu_event != nullptr && menu_event->iptkey == IPT_UI_SELECT)
ui_menu::stack_push(auto_alloc_clear(machine(), ui_menu_video_options(machine(), container, static_cast<render_target *>(menu_event->itemref))));
}
@@ -48,12 +48,12 @@ void ui_menu_video_targets::populate()
char buffer[40];
/* stop when we run out */
- if (target == NULL)
+ if (target == nullptr)
break;
/* add a menu item */
sprintf(buffer, "Screen #%d", targetnum);
- item_append(buffer, NULL, 0, target);
+ item_append(buffer, nullptr, 0, target);
}
}
@@ -72,7 +72,7 @@ void ui_menu_video_options::handle()
/* process the menu */
const ui_menu_event *menu_event = process(0);
- if (menu_event != NULL && menu_event->itemref != NULL)
+ if (menu_event != nullptr && menu_event->itemref != nullptr)
{
switch ((FPTR)menu_event->itemref)
{
@@ -180,17 +180,17 @@ void ui_menu_video_options::populate()
for (viewnum = 0; ; viewnum++)
{
const char *name = target->view_name(viewnum);
- if (name == NULL)
+ if (name == nullptr)
break;
/* create a string for the item, replacing underscores with spaces */
tempstring.assign(name);
strreplace(tempstring, "_", " ");
- item_append(tempstring.c_str(), NULL, 0, (void *)(FPTR)(VIDEO_ITEM_VIEW + viewnum));
+ item_append(tempstring.c_str(), nullptr, 0, (void *)(FPTR)(VIDEO_ITEM_VIEW + viewnum));
}
/* add a separator */
- item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
/* add a rotate item */
switch (target->orientation())
diff --git a/src/emu/ui/videoopt.h b/src/emu/ui/videoopt.h
index b5ea569b936..802f1295c08 100644
--- a/src/emu/ui/videoopt.h
+++ b/src/emu/ui/videoopt.h
@@ -18,16 +18,16 @@ class ui_menu_video_targets : public ui_menu {
public:
ui_menu_video_targets(running_machine &machine, render_container *container);
virtual ~ui_menu_video_targets();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
};
class ui_menu_video_options : public ui_menu {
public:
ui_menu_video_options(running_machine &machine, render_container *container, render_target *target);
virtual ~ui_menu_video_options();
- virtual void populate();
- virtual void handle();
+ virtual void populate() override;
+ virtual void handle() override;
private:
enum {
diff --git a/src/emu/ui/viewgfx.cpp b/src/emu/ui/viewgfx.cpp
index 0d133af3f6c..c59be16b199 100644
--- a/src/emu/ui/viewgfx.cpp
+++ b/src/emu/ui/viewgfx.cpp
@@ -192,7 +192,7 @@ static void ui_gfx_count_devices(running_machine &machine, ui_gfx_state &state)
i < tempcount && state.gfxset.devcount < MAX_GFX_DECODERS;
i++, interface = gfx_iter.next())
{
- for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != NULL; count++) { }
+ for (count = 0; count < MAX_GFX_ELEMENTS && interface->gfx(count) != nullptr; count++) { }
// count = index of first NULL
if (count > 0)
@@ -216,11 +216,11 @@ static void ui_gfx_exit(running_machine &machine)
{
// free the texture
machine.render().texture_free(ui_gfx.texture);
- ui_gfx.texture = NULL;
+ ui_gfx.texture = nullptr;
// free the bitmap
global_free(ui_gfx.bitmap);
- ui_gfx.bitmap = NULL;
+ ui_gfx.bitmap = nullptr;
}
@@ -835,7 +835,7 @@ static void gfxset_update_bitmap(running_machine &machine, ui_gfx_state &state,
cellypix = 1 + ((info.rotate[set] & ORIENTATION_SWAP_XY) ? gfx.width() : gfx.height());
// realloc the bitmap if it is too small
- if (state.bitmap == NULL || state.texture == NULL || state.bitmap->bpp() != 32 || state.bitmap->width() != cellxpix * xcells || state.bitmap->height() != cellypix * ycells)
+ if (state.bitmap == nullptr || state.texture == nullptr || state.bitmap->bpp() != 32 || state.bitmap->width() != cellxpix * xcells || state.bitmap->height() != cellypix * ycells)
{
// free the old stuff
machine.render().texture_free(state.texture);
@@ -1144,7 +1144,7 @@ static void tilemap_update_bitmap(running_machine &machine, ui_gfx_state &state,
{ UINT32 temp = width; width = height; height = temp; }
// realloc the bitmap if it is too small
- if (state.bitmap == NULL || state.texture == NULL || state.bitmap->width() != width || state.bitmap->height() != height)
+ if (state.bitmap == nullptr || state.texture == nullptr || state.bitmap->width() != width || state.bitmap->height() != height)
{
// free the old stuff
machine.render().texture_free(state.texture);
diff --git a/src/emu/uiinput.cpp b/src/emu/uiinput.cpp
index b0cbaa0add0..8ec5c8b91cc 100644
--- a/src/emu/uiinput.cpp
+++ b/src/emu/uiinput.cpp
@@ -116,7 +116,7 @@ bool ui_input_push_event(running_machine &machine, ui_event evt)
ui_input_private *uidata = machine.ui_input_data;
/* we may be called before the UI is initialized */
- if (uidata == NULL)
+ if (uidata == nullptr)
return false;
/* some pre-processing (this is an icky place to do this stuff!) */
@@ -131,7 +131,7 @@ bool ui_input_push_event(running_machine &machine, ui_event evt)
case UI_EVENT_MOUSE_LEAVE:
if (uidata->current_mouse_target == evt.target)
{
- uidata->current_mouse_target = NULL;
+ uidata->current_mouse_target = nullptr;
uidata->current_mouse_x = -1;
uidata->current_mouse_y = -1;
}
@@ -212,11 +212,11 @@ void ui_input_reset(running_machine &machine)
render_target *ui_input_find_mouse(running_machine &machine, INT32 *x, INT32 *y, bool *button)
{
ui_input_private *uidata = machine.ui_input_data;
- if (x != NULL)
+ if (x != nullptr)
*x = uidata->current_mouse_x;
- if (y != NULL)
+ if (y != nullptr)
*y = uidata->current_mouse_y;
- if (button != NULL)
+ if (button != nullptr)
*button = uidata->current_mouse_down;
return uidata->current_mouse_target;
}
diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp
index 014a2a5bf92..78404d121ce 100644
--- a/src/emu/validity.cpp
+++ b/src/emu/validity.cpp
@@ -88,7 +88,7 @@ void validity_checker::validate_tag(const char *tag)
osd_printf_error("Tag '%s' contains spaces\n", tag);
break;
}
- if (strchr(validchars, *p) == NULL)
+ if (strchr(validchars, *p) == nullptr)
{
osd_printf_error("Tag '%s' contains invalid character '%c'\n", tag, *p);
break;
@@ -97,7 +97,7 @@ void validity_checker::validate_tag(const char *tag)
// find the start of the final tag
const char *begin = strrchr(tag, ':');
- if (begin == NULL)
+ if (begin == nullptr)
begin = tag;
else
begin += 1;
@@ -125,16 +125,16 @@ validity_checker::validity_checker(emu_options &options)
: m_drivlist(options),
m_errors(0),
m_warnings(0),
- m_current_driver(NULL),
- m_current_config(NULL),
- m_current_device(NULL),
- m_current_ioport(NULL)
+ m_current_driver(nullptr),
+ m_current_config(nullptr),
+ m_current_device(nullptr),
+ m_current_ioport(nullptr)
{
// pre-populate the defstr map with all the default strings
for (int strnum = 1; strnum < INPUT_STRING_COUNT; strnum++)
{
const char *string = ioport_string_from_index(strnum);
- if (string != NULL)
+ if (string != nullptr)
m_defstr_map.add(string, strnum, false);
}
}
@@ -267,9 +267,9 @@ void validity_checker::validate_one(const game_driver &driver)
{
// set the current driver
m_current_driver = &driver;
- m_current_config = NULL;
- m_current_device = NULL;
- m_current_ioport = NULL;
+ m_current_config = nullptr;
+ m_current_device = nullptr;
+ m_current_ioport = nullptr;
m_region_map.reset();
// reset error/warning state
@@ -287,7 +287,7 @@ void validity_checker::validate_one(const game_driver &driver)
validate_roms();
validate_inputs();
validate_devices();
- m_current_config = NULL;
+ m_current_config = nullptr;
}
catch (emu_fatalerror &err)
{
@@ -313,10 +313,10 @@ void validity_checker::validate_one(const game_driver &driver)
}
// reset the driver/device
- m_current_driver = NULL;
- m_current_config = NULL;
- m_current_device = NULL;
- m_current_ioport = NULL;
+ m_current_driver = nullptr;
+ m_current_config = nullptr;
+ m_current_device = nullptr;
+ m_current_ioport = nullptr;
}
@@ -579,15 +579,15 @@ void validity_checker::validate_driver()
// normalize driver->compatible_with
const char *compatible_with = m_current_driver->compatible_with;
- if (compatible_with != NULL && strcmp(compatible_with, "0") == 0)
- compatible_with = NULL;
+ if (compatible_with != nullptr && strcmp(compatible_with, "0") == 0)
+ compatible_with = nullptr;
// check for this driver being compatible with a non-existant driver
- if (compatible_with != NULL && m_drivlist.find(m_current_driver->compatible_with) == -1)
+ if (compatible_with != nullptr && m_drivlist.find(m_current_driver->compatible_with) == -1)
osd_printf_error("Driver is listed as compatible with nonexistant driver %s\n", m_current_driver->compatible_with);
// check for clone_of and compatible_with being specified at the same time
- if (m_drivlist.clone(*m_current_driver) != -1 && compatible_with != NULL)
+ if (m_drivlist.clone(*m_current_driver) != -1 && compatible_with != nullptr)
osd_printf_error("Driver cannot be both a clone and listed as compatible with another system\n");
// find any recursive dependencies on the current driver
@@ -600,7 +600,7 @@ void validity_checker::validate_driver()
// make sure sound-less drivers are flagged
sound_interface_iterator iter(m_current_config->root_device());
- if ((m_current_driver->flags & MACHINE_IS_BIOS_ROOT) == 0 && iter.first() == NULL && (m_current_driver->flags & MACHINE_NO_SOUND) == 0 && (m_current_driver->flags & MACHINE_NO_SOUND_HW) == 0)
+ if ((m_current_driver->flags & MACHINE_IS_BIOS_ROOT) == 0 && iter.first() == nullptr && (m_current_driver->flags & MACHINE_NO_SOUND) == 0 && (m_current_driver->flags & MACHINE_NO_SOUND_HW) == 0)
osd_printf_error("Driver is missing MACHINE_NO_SOUND flag\n");
}
@@ -613,10 +613,10 @@ void validity_checker::validate_roms()
{
// iterate, starting with the driver's ROMs and continuing with device ROMs
device_iterator deviter(m_current_config->root_device());
- for (device_t *device = deviter.first(); device != NULL; device = deviter.next())
+ for (device_t *device = deviter.first(); device != nullptr; device = deviter.next())
{
// for non-root devices, track the current device
- m_current_device = (device->owner() == NULL) ? NULL : device;
+ m_current_device = (device->owner() == nullptr) ? nullptr : device;
// scan the ROM entries for this device
const char *last_region_name = "???";
@@ -625,7 +625,7 @@ void validity_checker::validate_roms()
int items_since_region = 1;
int last_bios = 0;
int total_files = 0;
- for (const rom_entry *romp = rom_first_region(*device); romp != NULL && !ROMENTRY_ISEND(romp); romp++)
+ for (const rom_entry *romp = rom_first_region(*device); romp != nullptr && !ROMENTRY_ISEND(romp); romp++)
{
// if this is a region, make sure it's valid, and record the length
if (ROMENTRY_ISREGION(romp))
@@ -640,7 +640,7 @@ void validity_checker::validate_roms()
last_region_name = basetag;
// check for a valid tag
- if (basetag == NULL)
+ if (basetag == nullptr)
{
osd_printf_error("ROM_REGION tag with NULL name\n");
continue;
@@ -695,7 +695,7 @@ void validity_checker::validate_roms()
// reset the current device
- m_current_device = NULL;
+ m_current_device = nullptr;
}
}
@@ -794,7 +794,7 @@ void validity_checker::validate_dip_settings(ioport_field &field)
bool coin_error = false;
// iterate through the settings
- for (ioport_setting *setting = field.first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = field.first_setting(); setting != nullptr; setting = setting->next())
{
// note any coinage strings
int strindex = get_defstr_index(setting->name());
@@ -814,7 +814,7 @@ void validity_checker::validate_dip_settings(ioport_field &field)
osd_printf_error("Flip Screen option must be Off/On, not %s\n", setting->name());
// if we have a neighbor, compare ourselves to him
- if (setting->next() != NULL)
+ if (setting->next() != nullptr)
{
// check for inverted off/on dispswitch order
int next_strindex = get_defstr_index(setting->next()->name(), true);
@@ -874,14 +874,14 @@ void validity_checker::validate_inputs()
// iterate over devices
device_iterator iter(m_current_config->root_device());
- for (device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (device_t *device = iter.first(); device != nullptr; device = iter.next())
{
// see if this device has ports; if not continue
- if (device->input_ports() == NULL)
+ if (device->input_ports() == nullptr)
continue;
// for non-root devices, track the current device
- m_current_device = (device == &m_current_config->root_device()) ? NULL : device;
+ m_current_device = (device == &m_current_config->root_device()) ? nullptr : device;
// allocate the input ports
ioport_list portlist;
@@ -893,17 +893,17 @@ void validity_checker::validate_inputs()
osd_printf_error("I/O port error during construction:\n%s\n", errorbuf.c_str());
// do a first pass over ports to add their names and find duplicates
- for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
+ for (ioport_port *port = portlist.first(); port != nullptr; port = port->next())
if (port_map.add(port->tag(), 1, false) == TMERR_DUPLICATE)
osd_printf_error("Multiple I/O ports with the same tag '%s' defined\n", port->tag());
// iterate over ports
- for (ioport_port *port = portlist.first(); port != NULL; port = port->next())
+ for (ioport_port *port = portlist.first(); port != nullptr; port = port->next())
{
m_current_ioport = port->tag();
// iterate through the fields on this port
- for (ioport_field *field = port->first_field(); field != NULL; field = field->next())
+ for (ioport_field *field = port->first_field(); field != nullptr; field = field->next())
{
// verify analog inputs
if (field->is_analog())
@@ -917,7 +917,7 @@ void validity_checker::validate_inputs()
if (field->type() == IPT_DIPSWITCH)
{
// dip switch fields must have a name
- if (field->name() == NULL)
+ if (field->name() == nullptr)
osd_printf_error("DIP switch has a NULL name\n");
// verify the settings list
@@ -926,7 +926,7 @@ void validity_checker::validate_inputs()
// verify names
const char *name = field->specific_name();
- if (name != NULL)
+ if (name != nullptr)
{
// check for empty string
if (name[0] == 0)
@@ -949,17 +949,17 @@ void validity_checker::validate_inputs()
validate_condition(field->condition(), *device, port_map);
// verify conditions on the settings
- for (ioport_setting *setting = field->first_setting(); setting != NULL; setting = setting->next())
+ for (ioport_setting *setting = field->first_setting(); setting != nullptr; setting = setting->next())
if (!setting->condition().none())
validate_condition(setting->condition(), *device, port_map);
}
// done with this port
- m_current_ioport = NULL;
+ m_current_ioport = nullptr;
}
// done with this device
- m_current_device = NULL;
+ m_current_device = nullptr;
}
}
@@ -974,17 +974,17 @@ void validity_checker::validate_devices()
int_map device_map;
device_iterator iter_find(m_current_config->root_device());
- for (const device_t *device = iter_find.first(); device != NULL; device = iter_find.next())
+ for (const device_t *device = iter_find.first(); device != nullptr; device = iter_find.next())
{
device->findit(true);
}
// iterate over devices
device_iterator iter(m_current_config->root_device());
- for (const device_t *device = iter.first(); device != NULL; device = iter.next())
+ for (const device_t *device = iter.first(); device != nullptr; device = iter.next())
{
// for non-root devices, track the current device
- m_current_device = (device == &m_current_config->root_device()) ? NULL : device;
+ m_current_device = (device == &m_current_config->root_device()) ? nullptr : device;
// validate the device tag
validate_tag(device->basetag());
@@ -1005,15 +1005,15 @@ void validity_checker::validate_devices()
device->validity_check(*this);
// done with this device
- m_current_device = NULL;
+ m_current_device = nullptr;
}
// if device is slot cart device, we must have a shortname
int_map slot_device_map;
slot_interface_iterator slotiter(m_current_config->root_device());
- for (const device_slot_interface *slot = slotiter.first(); slot != NULL; slot = slotiter.next())
+ for (const device_slot_interface *slot = slotiter.first(); slot != nullptr; slot = slotiter.next())
{
- for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next())
+ for (const device_slot_option *option = slot->first_option(); option != nullptr; option = option->next())
{
std::string temptag("_");
temptag.append(option->name());
@@ -1021,7 +1021,7 @@ void validity_checker::validate_devices()
// notify this device and all its subdevices that they are now configured
device_iterator subiter(*dev);
- for (device_t *device = subiter.first(); device != NULL; device = subiter.next())
+ for (device_t *device = subiter.first(); device != nullptr; device = subiter.next())
if (!device->configured())
device->config_complete();
@@ -1049,11 +1049,11 @@ void validity_checker::build_output_prefix(std::string &str)
str.clear();
// if we have a current device, indicate that
- if (m_current_device != NULL)
+ if (m_current_device != nullptr)
str.append(m_current_device->name()).append(" device '").append(m_current_device->tag()).append("': ");
// if we have a current port, indicate that as well
- if (m_current_ioport != NULL)
+ if (m_current_ioport != nullptr)
str.append("ioport '").append(m_current_ioport).append("': ");
}
diff --git a/src/emu/validity.h b/src/emu/validity.h
index acc271a7cae..7581d454241 100644
--- a/src/emu/validity.h
+++ b/src/emu/validity.h
@@ -55,7 +55,7 @@ public:
// osd_output interface
protected:
- virtual void output_callback(osd_output_channel channel, const char *msg, va_list args);
+ virtual void output_callback(osd_output_channel channel, const char *msg, va_list args) override;
private:
// internal helpers
diff --git a/src/emu/video.cpp b/src/emu/video.cpp
index d2358949407..ea50e8a662b 100644
--- a/src/emu/video.cpp
+++ b/src/emu/video.cpp
@@ -72,7 +72,7 @@ static void video_notifier_callback(const char *outname, INT32 value, void *para
video_manager::video_manager(running_machine &machine)
: m_machine(machine),
- m_screenless_frame_timer(NULL),
+ m_screenless_frame_timer(nullptr),
m_output_changed(false),
m_throttle_last_ticks(0),
m_throttle_realtime(attotime::zero),
@@ -97,14 +97,14 @@ video_manager::video_manager(running_machine &machine)
m_frameskip_adjust(0),
m_skipping_this_frame(false),
m_average_oversleep(0),
- m_snap_target(NULL),
+ m_snap_target(nullptr),
m_snap_native(true),
m_snap_width(0),
m_snap_height(0),
m_mng_frame_period(attotime::zero),
m_mng_next_frame_time(attotime::zero),
m_mng_frame(0),
- m_avi_file(NULL),
+ m_avi_file(nullptr),
m_avi_frame_period(attotime::zero),
m_avi_next_frame_time(attotime::zero),
m_avi_frame(0),
@@ -119,7 +119,7 @@ video_manager::video_manager(running_machine &machine)
// create a render target for snapshots
const char *viewname = machine.options().snap_view();
- m_snap_native = (machine.first_screen() != NULL && (viewname[0] == 0 || strcmp(viewname, "native") == 0));
+ m_snap_native = (machine.first_screen() != nullptr && (viewname[0] == 0 || strcmp(viewname, "native") == 0));
// the native target is hard-coded to our internal layout and has all options disabled
if (m_snap_native)
@@ -137,7 +137,7 @@ video_manager::video_manager(running_machine &machine)
// other targets select the specified view and turn off effects
else
{
- m_snap_target = machine.render().target_alloc(NULL, RENDER_CREATE_HIDDEN);
+ m_snap_target = machine.render().target_alloc(nullptr, RENDER_CREATE_HIDDEN);
m_snap_target->set_view(m_snap_target->configured_view(viewname, 0, 1));
m_snap_target->set_screen_overlay_enabled(false);
}
@@ -160,11 +160,11 @@ video_manager::video_manager(running_machine &machine)
#endif
// if no screens, create a periodic timer to drive updates
- if (machine.first_screen() == NULL)
+ if (machine.first_screen() == nullptr)
{
m_screenless_frame_timer = machine.scheduler().timer_alloc(timer_expired_delegate(FUNC(video_manager::screenless_update_callback), this));
m_screenless_frame_timer->adjust(screen_device::DEFAULT_FRAME_PERIOD, 0, screen_device::DEFAULT_FRAME_PERIOD);
- output_set_notifier(NULL, video_notifier_callback, this);
+ output_set_notifier(nullptr, video_notifier_callback, this);
}
}
@@ -247,7 +247,7 @@ void video_manager::frame_update(bool debug)
if (phase == MACHINE_PHASE_RUNNING)
{
// reset partial updates if we're paused or if the debugger is active
- if (machine().first_screen() != NULL && (machine().paused() || debug || debugger_within_instruction_hook(machine())))
+ if (machine().first_screen() != nullptr && (machine().paused() || debug || debugger_within_instruction_hook(machine())))
machine().first_screen()->reset_partial_updates();
}
}
@@ -286,7 +286,7 @@ std::string &video_manager::speed_text(std::string &str)
// display the number of partial updates as well
int partials = 0;
screen_device_iterator iter(machine().root_device());
- for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
+ for (screen_device *screen = iter.first(); screen != nullptr; screen = iter.next())
partials += screen->partial_updates();
if (partials > 1)
strcatprintf(str, "\n%d partial updates", partials);
@@ -303,7 +303,7 @@ std::string &video_manager::speed_text(std::string &str)
void video_manager::save_snapshot(screen_device *screen, emu_file &file)
{
// validate
- assert(!m_snap_native || screen != NULL);
+ assert(!m_snap_native || screen != nullptr);
// create the bitmap to pass in
create_snapshot_bitmap(screen);
@@ -311,13 +311,13 @@ void video_manager::save_snapshot(screen_device *screen, emu_file &file)
// add two text entries describing the image
std::string text1 = std::string(emulator_info::get_appname()).append(" ").append(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());
// now do the actual work
- const rgb_t *palette = (screen !=NULL && screen->palette() != NULL) ? screen->palette()->palette()->entry_list_adjusted() : NULL;
- int entries = (screen !=NULL && screen->palette() != NULL) ? screen->palette()->entries() : 0;
+ const rgb_t *palette = (screen !=nullptr && screen->palette() != nullptr) ? screen->palette()->palette()->entry_list_adjusted() : nullptr;
+ int entries = (screen !=nullptr && screen->palette() != nullptr) ? screen->palette()->entries() : 0;
png_error error = png_write_bitmap(file, &pnginfo, m_snap_bitmap, entries, palette);
if (error != PNGERR_NONE)
osd_printf_error("Error generating PNG for snapshot: png_error = %d\n", error);
@@ -339,7 +339,7 @@ void video_manager::save_active_screen_snapshots()
{
// write one snapshot per visible screen
screen_device_iterator iter(machine().root_device());
- for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
+ for (screen_device *screen = iter.first(); screen != nullptr; screen = iter.next())
if (machine().render().is_live(*screen))
{
emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
@@ -355,7 +355,7 @@ void video_manager::save_active_screen_snapshots()
emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
file_error filerr = open_next(file, "png");
if (filerr == FILERR_NONE)
- save_snapshot(NULL, file);
+ save_snapshot(nullptr, file);
}
}
@@ -367,7 +367,7 @@ void video_manager::save_active_screen_snapshots()
void video_manager::begin_recording(const char *name, movie_format format)
{
// create a snapshot bitmap so we know what the target size is
- create_snapshot_bitmap(NULL);
+ create_snapshot_bitmap(nullptr);
// start up an AVI recording
if (format == MF_AVI)
@@ -382,7 +382,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
// build up information about this new movie
avi_movie_info info;
info.video_format = 0;
- info.video_timescale = 1000 * ((machine().first_screen() != NULL) ? ATTOSECONDS_TO_HZ(machine().first_screen()->frame_period().attoseconds()) : screen_device::DEFAULT_FRAME_RATE);
+ info.video_timescale = 1000 * ((machine().first_screen() != nullptr) ? ATTOSECONDS_TO_HZ(machine().first_screen()->frame_period().attoseconds()) : screen_device::DEFAULT_FRAME_RATE);
info.video_sampletime = 1000;
info.video_numsamples = 0;
info.video_width = m_snap_bitmap.width();
@@ -402,7 +402,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
std::string fullpath;
{
emu_file tempfile(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
- if (name != NULL)
+ if (name != nullptr)
filerr = tempfile.open(name);
else
filerr = open_next(tempfile, "avi");
@@ -440,7 +440,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
// create a new movie file and start recording
m_mng_file = std::make_unique<emu_file>(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
file_error filerr;
- if (name != NULL)
+ if (name != nullptr)
filerr = m_mng_file->open(name);
else
filerr = open_next(*m_mng_file, "mng");
@@ -448,7 +448,7 @@ void video_manager::begin_recording(const char *name, movie_format format)
if (filerr == FILERR_NONE)
{
// start the capture
- int rate = (machine().first_screen() != NULL) ? ATTOSECONDS_TO_HZ(machine().first_screen()->frame_period().attoseconds()) : screen_device::DEFAULT_FRAME_RATE;
+ int rate = (machine().first_screen() != nullptr) ? ATTOSECONDS_TO_HZ(machine().first_screen()->frame_period().attoseconds()) : screen_device::DEFAULT_FRAME_RATE;
png_error pngerr = mng_capture_start(*m_mng_file, m_snap_bitmap, rate);
if (pngerr != PNGERR_NONE)
{
@@ -477,10 +477,10 @@ void video_manager::end_recording(movie_format format)
if (format == MF_AVI)
{
// close the file if it exists
- if (m_avi_file != NULL)
+ if (m_avi_file != nullptr)
{
avi_close(m_avi_file);
- m_avi_file = NULL;
+ m_avi_file = nullptr;
// reset the state
m_avi_frame = 0;
@@ -489,7 +489,7 @@ void video_manager::end_recording(movie_format format)
else if (format == MF_MNG)
{
// close the file if it exists
- if (m_mng_file != NULL)
+ if (m_mng_file != nullptr)
{
mng_capture_stop(*m_mng_file);
m_mng_file.reset();
@@ -509,7 +509,7 @@ void video_manager::end_recording(movie_format format)
void video_manager::add_sound_to_recording(const INT16 *sound, int numsamples)
{
// only record if we have a file
- if (m_avi_file != NULL)
+ if (m_avi_file != nullptr)
{
g_profiler.start(PROFILER_MOVIE_REC);
@@ -651,13 +651,13 @@ bool video_manager::finish_screen_updates()
// finish updating the screens
screen_device_iterator iter(machine().root_device());
- for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
+ for (screen_device *screen = iter.first(); screen != nullptr; screen = iter.next())
screen->update_partial(screen->visible_area().max_y);
// now add the quads for all the screens
bool anything_changed = m_output_changed;
m_output_changed = false;
- for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
+ for (screen_device *screen = iter.first(); screen != nullptr; screen = iter.next())
if (screen->update_quads())
anything_changed = true;
@@ -670,12 +670,12 @@ bool video_manager::finish_screen_updates()
record_frame();
// iterate over screens and update the burnin for the ones that care
- for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
+ for (screen_device *screen = iter.first(); screen != nullptr; screen = iter.next())
screen->update_burnin();
}
// draw any crosshairs
- for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
+ for (screen_device *screen = iter.first(); screen != nullptr; screen = iter.next())
crosshair_render(*screen);
return anything_changed;
@@ -961,7 +961,7 @@ void video_manager::update_refresh_speed()
// note that we first check the token since this can get called before all screens are created
attoseconds_t min_frame_period = ATTOSECONDS_PER_SECOND;
screen_device_iterator iter(machine().root_device());
- for (screen_device *screen = iter.first(); screen != NULL; screen = iter.next())
+ for (screen_device *screen = iter.first(); screen != nullptr; screen = iter.next())
{
attoseconds_t period = screen->frame_period().attoseconds();
if (period != 0)
@@ -1046,7 +1046,7 @@ void video_manager::recompute_speed(const attotime &emutime)
}
#endif
- if (machine().first_screen() != NULL)
+ if (machine().first_screen() != nullptr)
{
// create a final screenshot
emu_file file(machine().options().snapshot_directory(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS);
@@ -1073,7 +1073,7 @@ typedef software_renderer<UINT32, 0,0,0, 16,8,0, false, false> snap_renderer;
void video_manager::create_snapshot_bitmap(screen_device *screen)
{
// select the appropriate view in our dummy target
- if (m_snap_native && screen != NULL)
+ if (m_snap_native && screen != nullptr)
{
screen_device_iterator iter(machine().root_device());
int view_index = iter.indexof(*screen);
@@ -1116,7 +1116,7 @@ file_error video_manager::open_next(emu_file &file, const char *extension)
// handle defaults
const char *snapname = machine().options().snap_name();
- if (snapname == NULL || snapname[0] == 0)
+ if (snapname == nullptr || snapname[0] == 0)
snapname = "%g/%i";
std::string snapstr(snapname);
@@ -1163,7 +1163,7 @@ file_error video_manager::open_next(emu_file &file, const char *extension)
// verify that there is such a device for this system
image_interface_iterator iter(machine().root_device());
- for (device_image_interface *image = iter.first(); image != NULL; image = iter.next())
+ for (device_image_interface *image = iter.first(); image != nullptr; image = iter.next())
{
// get the device name
std::string tempdevname(image->brief_instance_name());
@@ -1172,7 +1172,7 @@ file_error video_manager::open_next(emu_file &file, const char *extension)
if (snapdevname.compare(tempdevname) == 0)
{
// verify that such a device has an image mounted
- if (image->basename() != NULL)
+ if (image->basename() != nullptr)
{
std::string filename(image->basename());
@@ -1240,7 +1240,7 @@ file_error video_manager::open_next(emu_file &file, const char *extension)
void video_manager::record_frame()
{
// ignore if nothing to do
- if (m_mng_file == NULL && m_avi_file == NULL && !m_dummy_recording)
+ if (m_mng_file == nullptr && m_avi_file == nullptr && !m_dummy_recording)
return;
// start the profiler and get the current time
@@ -1248,10 +1248,10 @@ void video_manager::record_frame()
attotime curtime = machine().time();
// create the bitmap
- create_snapshot_bitmap(NULL);
+ create_snapshot_bitmap(nullptr);
// handle an AVI recording
- if (m_avi_file != NULL)
+ if (m_avi_file != nullptr)
{
// loop until we hit the right time
while (m_avi_next_frame_time <= curtime)
@@ -1272,13 +1272,13 @@ void video_manager::record_frame()
}
// handle a MNG recording
- if (m_mng_file != NULL)
+ if (m_mng_file != nullptr)
{
// loop until we hit the right time
while (m_mng_next_frame_time <= curtime)
{
// set up the text fields in the movie info
- png_info pnginfo = { 0 };
+ png_info pnginfo = { nullptr };
if (m_mng_frame == 0)
{
std::string text1 = std::string(emulator_info::get_appname()).append(" ").append(build_version);
@@ -1288,8 +1288,8 @@ void video_manager::record_frame()
}
// write the next frame
- const rgb_t *palette = (machine().first_screen() !=NULL && machine().first_screen()->palette() != NULL) ? machine().first_screen()->palette()->palette()->entry_list_adjusted() : NULL;
- int entries = (machine().first_screen() !=NULL && machine().first_screen()->palette() != NULL) ? machine().first_screen()->palette()->entries() : 0;
+ const rgb_t *palette = (machine().first_screen() !=nullptr && machine().first_screen()->palette() != nullptr) ? machine().first_screen()->palette()->palette()->entry_list_adjusted() : nullptr;
+ int entries = (machine().first_screen() !=nullptr && machine().first_screen()->palette() != nullptr) ? machine().first_screen()->palette()->entries() : 0;
png_error error = mng_capture_frame(*m_mng_file, &pnginfo, m_snap_bitmap, entries, palette);
png_free(&pnginfo);
if (error != PNGERR_NONE)
@@ -1326,7 +1326,7 @@ void video_manager::toggle_record_movie()
{
if (!is_recording())
{
- begin_recording(NULL, MF_MNG);
+ begin_recording(nullptr, MF_MNG);
machine().popmessage("REC START");
}
else
diff --git a/src/emu/video.h b/src/emu/video.h
index c2dc94f4c73..9eb67b70353 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -64,7 +64,7 @@ public:
bool throttled() const { return m_throttled; }
float throttle_rate() const { return m_throttle_rate; }
bool fastforward() const { return m_fastforward; }
- bool is_recording() const { return (m_mng_file != nullptr || m_avi_file != NULL); }
+ bool is_recording() const { return (m_mng_file != nullptr || m_avi_file != nullptr); }
// setters
void set_frameskip(int frameskip);
diff --git a/src/emu/video/vector.cpp b/src/emu/video/vector.cpp
index 8cc5aaf9bdb..bcc3b3604b9 100644
--- a/src/emu/video/vector.cpp
+++ b/src/emu/video/vector.cpp
@@ -131,7 +131,7 @@ const device_type VECTOR = &device_creator<vector_device>;
vector_device::vector_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_video_interface(mconfig, *this),
- m_vector_list(NULL),
+ m_vector_list(nullptr),
m_min_intensity(255),
m_max_intensity(0)
{
@@ -140,7 +140,7 @@ vector_device::vector_device(const machine_config &mconfig, device_type type, co
vector_device::vector_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VECTOR, "VECTOR", tag, owner, clock, "vector_device", __FILE__),
device_video_interface(mconfig, *this),
- m_vector_list(NULL),
+ m_vector_list(nullptr),
m_min_intensity(255),
m_max_intensity(0)
{
diff --git a/src/emu/video/vector.h b/src/emu/video/vector.h
index d021824e484..37a1587d01e 100644
--- a/src/emu/video/vector.h
+++ b/src/emu/video/vector.h
@@ -58,7 +58,7 @@ public:
float get_beam_intensity_weight();
// device-level overrides
- virtual void device_start();
+ virtual void device_start() override;
private:
static float m_flicker;
diff --git a/src/lib/formats/a26_cas.cpp b/src/lib/formats/a26_cas.cpp
index 557a128a7af..d13b5270b45 100644
--- a/src/lib/formats/a26_cas.cpp
+++ b/src/lib/formats/a26_cas.cpp
@@ -129,7 +129,7 @@ static int a26_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes ) {
}
static int a26_cas_to_wav_size( const UINT8 *casdata, int caslen ) {
- return a26_cas_do_work( NULL, casdata );
+ return a26_cas_do_work( nullptr, casdata );
}
static const struct CassetteLegacyWaveFiller a26_legacy_fill_wave = {
@@ -160,7 +160,7 @@ static const struct CassetteFormat a26_cassette_format = {
"a26",
a26_cassette_identify,
a26_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(a26_cassette_formats)
diff --git a/src/lib/formats/ace_tap.cpp b/src/lib/formats/ace_tap.cpp
index 3479d6ba1f5..10265ad5460 100644
--- a/src/lib/formats/ace_tap.cpp
+++ b/src/lib/formats/ace_tap.cpp
@@ -151,7 +151,7 @@ static int ace_tap_to_wav_size(const UINT8 *casdata, int caslen)
{
cas_size = caslen;
- return ace_handle_tap( NULL, casdata );
+ return ace_handle_tap( nullptr, casdata );
}
@@ -184,7 +184,7 @@ static const struct CassetteFormat ace_tap_format =
"tap",
ace_tap_identify,
ace_tap_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/adam_cas.cpp b/src/lib/formats/adam_cas.cpp
index 54d7427242d..644be2cd0cc 100644
--- a/src/lib/formats/adam_cas.cpp
+++ b/src/lib/formats/adam_cas.cpp
@@ -86,7 +86,7 @@ casserr_t coladam_put_byte(cassette_image *cass, int channel, double *time_index
casserr_t coladam_put_block(cassette_image *cass, int channel, double *time_index, int *prev_sign, int block_index, UINT8 *buffer, int layout_type)
{
int i, checksum_16=0;
- UINT8 header[] = { 0x16, 0x48, 0x45, 0x00, block_index, 0xff, (0xff - block_index), 0x00, 0x80, 0xf4 };
+ UINT8 header[] = { 0x16, 0x48, 0x45, 0x00, static_cast<UINT8>(block_index), 0xff, static_cast<UINT8>(0xff - block_index), 0x00, 0x80, 0xf4 };
casserr_t err;
if (layout_type == TYPE_GW)
{
@@ -204,7 +204,7 @@ static casserr_t coladam_ddp_load( cassette_image *cass )
static const struct CassetteFormat coladam_ddp =
-{ "ddp", coladam_ddp_identify, coladam_ddp_load, NULL /* no save */ };
+{ "ddp", coladam_ddp_identify, coladam_ddp_load, nullptr /* no save */ };
CASSETTE_FORMATLIST_START(coleco_adam_cassette_formats)
CASSETTE_FORMAT(coladam_ddp)
diff --git a/src/lib/formats/ap2_dsk.cpp b/src/lib/formats/ap2_dsk.cpp
index 05a1927015a..49010ff62e1 100644
--- a/src/lib/formats/ap2_dsk.cpp
+++ b/src/lib/formats/ap2_dsk.cpp
@@ -232,7 +232,7 @@ static floperr_t apple2_dsk_write_track(floppy_image_legacy *floppy, int head, i
nibble = (UINT8 *)buffer;
nibble += sector * APPLE2_SMALL_NIBBLE_SIZE;
- disk_decode_nib(sector_buffer, nibble, NULL, NULL, NULL);
+ disk_decode_nib(sector_buffer, nibble, nullptr, nullptr, nullptr);
floppy_write_sector(floppy, head, track, sector, 0, sector_buffer, sizeof(sector_buffer), 0);
}
@@ -376,14 +376,14 @@ static floperr_t apple2_nib_read_sector(floppy_image_legacy *floppy, int head, i
if (buflen != APPLE2_SECTOR_SIZE)
return FLOPPY_ERROR_INTERNAL;
- err = floppy_load_track(floppy, head, track, FALSE, &track_data_v, NULL);
+ err = floppy_load_track(floppy, head, track, FALSE, &track_data_v, nullptr);
if (err)
return err;
track_data = (UINT8 *) track_data_v;
nibble = track_data + (sector * APPLE2_NIBBLE_SIZE);
- if (disk_decode_nib((UINT8 *)buffer, nibble, NULL, NULL, NULL))
+ if (disk_decode_nib((UINT8 *)buffer, nibble, nullptr, nullptr, nullptr))
return FLOPPY_ERROR_INVALIDIMAGE;
return FLOPPY_ERROR_SUCCESS;
@@ -465,7 +465,7 @@ static floperr_t apple2_nib_write_sector(floppy_image_legacy *floppy, int head,
if (buflen != APPLE2_SECTOR_SIZE)
return FLOPPY_ERROR_INTERNAL;
- err = floppy_load_track(floppy, head, track, TRUE, &track_data_v, NULL);
+ err = floppy_load_track(floppy, head, track, TRUE, &track_data_v, nullptr);
if (err)
return err;
track_data = (UINT8 *) track_data_v;
@@ -494,19 +494,19 @@ static UINT32 apple2_get_track_size(floppy_image_legacy *floppy, int head, int t
/* ----------------------------------------------------------------------- */
LEGACY_FLOPPY_OPTIONS_START( apple2 )
- LEGACY_FLOPPY_OPTION( apple2_do, "do,dsk,bin", "Apple ][ DOS order disk image", apple2_dsk_identify, apple2_do_construct, NULL,
+ LEGACY_FLOPPY_OPTION( apple2_do, "do,dsk,bin", "Apple ][ DOS order disk image", apple2_dsk_identify, apple2_do_construct, nullptr,
HEADS([1])
TRACKS([35])
SECTORS([16])
SECTOR_LENGTH([256])
FIRST_SECTOR_ID([0]))
- LEGACY_FLOPPY_OPTION( apple2_po, "po,dsk,bin", "Apple ][ ProDOS order disk image", apple2_dsk_identify, apple2_po_construct, NULL,
+ LEGACY_FLOPPY_OPTION( apple2_po, "po,dsk,bin", "Apple ][ ProDOS order disk image", apple2_dsk_identify, apple2_po_construct, nullptr,
HEADS([1])
TRACKS([35])
SECTORS([16])
SECTOR_LENGTH([256])
FIRST_SECTOR_ID([0]))
- LEGACY_FLOPPY_OPTION( apple2_nib, "dsk,nib", "Apple ][ Nibble order disk image", apple2_nib_identify, apple2_nib_construct, NULL,
+ LEGACY_FLOPPY_OPTION( apple2_nib, "dsk,nib", "Apple ][ Nibble order disk image", apple2_nib_identify, apple2_nib_construct, nullptr,
HEADS([1])
TRACKS([35])
SECTORS([16])
@@ -774,9 +774,9 @@ bool a2_16sect_format::save(io_generic *io, floppy_image *image)
#define DATAGOOD 8
// data postamble is good
#define DATAPOST 16
- for (int i = 0; i < 16; i++) {
+ for (auto & elem : visualgrid) {
for (int j = 0; j < 35; j++) {
- visualgrid[i][j] = 0;
+ elem[j] = 0;
}
}
image->get_actual_geometry(g_tracks, g_heads);
@@ -822,8 +822,8 @@ bool a2_16sect_format::save(io_generic *io, floppy_image *image)
if(hb == 4) {
UINT8 h[11];
- for(int i=0; i<11; i++)
- h[i] = gb(buf, ts, pos, wrap);
+ for(auto & elem : h)
+ elem = gb(buf, ts, pos, wrap);
//UINT8 v2 = gcr6bw_tb[h[2]];
UINT8 vl = gcr4_decode(h[0],h[1]);
UINT8 tr = gcr4_decode(h[2],h[3]);
@@ -1140,9 +1140,9 @@ bool a2_rwts18_format::save(io_generic *io, floppy_image *image)
#define DATAGOOD 8
// data postamble is good
#define DATAPOST 16
- for (int i = 0; i < 18; i++) {
+ for (auto & elem : visualgrid) {
for (int j = 0; j < 35; j++) {
- visualgrid[i][j] = 0;
+ elem[j] = 0;
}
}
image->get_actual_geometry(g_tracks, g_heads);
@@ -1182,8 +1182,8 @@ bool a2_rwts18_format::save(io_generic *io, floppy_image *image)
if(hb == 4) {
UINT8 h[11];
- for(int i=0; i<11; i++)
- h[i] = gb(buf, ts, pos, wrap);
+ for(auto & elem : h)
+ elem = gb(buf, ts, pos, wrap);
//UINT8 v2 = gcr6bw_tb[h[2]];
UINT8 vl = gcr4_decode(h[0],h[1]);
UINT8 tr = gcr4_decode(h[2],h[3]);
@@ -1345,8 +1345,8 @@ bool a2_rwts18_format::save(io_generic *io, floppy_image *image)
oldpos=pos;
UINT8 h[7];
// grab exactly 7 bytes: should be Track, Sector, Checksum, AA, FF and FF and the Br0derbund Title ID
- for(int i=0; i<7; i++)
- h[i] = gb(buf, ts, pos, wrap);
+ for(auto & elem : h)
+ elem = gb(buf, ts, pos, wrap);
UINT8 tr = gcr6bw_tb[h[0]];
UINT8 se = gcr6bw_tb[h[1]];
UINT8 chk = gcr6bw_tb[h[2]];
diff --git a/src/lib/formats/ap_dsk35.cpp b/src/lib/formats/ap_dsk35.cpp
index 9efd835120d..ff8cef2e08a 100644
--- a/src/lib/formats/ap_dsk35.cpp
+++ b/src/lib/formats/ap_dsk35.cpp
@@ -488,7 +488,7 @@ static UINT32 apple35_get_offset(floppy_image_legacy *floppy, int head, int trac
static floperr_t apple35_read_sector(floppy_image_legacy *floppy, int head, int track, int sector, void *buffer, size_t buflen)
{
UINT32 data_offset;
- data_offset = apple35_get_offset(floppy, head, track, sector, NULL);
+ data_offset = apple35_get_offset(floppy, head, track, sector, nullptr);
if (data_offset == ~0)
{
return FLOPPY_ERROR_SEEKERROR;
@@ -503,7 +503,7 @@ static floperr_t apple35_write_sector(floppy_image_legacy *floppy, int head, int
{
UINT32 data_offset;
- data_offset = apple35_get_offset(floppy, head, track, sector, NULL);
+ data_offset = apple35_get_offset(floppy, head, track, sector, nullptr);
if (data_offset == ~0)
return FLOPPY_ERROR_SEEKERROR;
floppy_image_write(floppy, buffer, data_offset, buflen);
@@ -976,7 +976,7 @@ static floperr_t apple35_diskcopy_headerdecode(floppy_image_legacy *floppy, UINT
static FLOPPY_IDENTIFY(apple35_diskcopy_identify)
{
- *vote = apple35_diskcopy_headerdecode(floppy, NULL, NULL, NULL, NULL, NULL, NULL) ? 0 : 100;
+ *vote = apple35_diskcopy_headerdecode(floppy, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr) ? 0 : 100;
return FLOPPY_ERROR_SUCCESS;
}
@@ -1121,7 +1121,7 @@ static floperr_t apple35_2img_decode(floppy_image_legacy *floppy, UINT32 *image_
static FLOPPY_IDENTIFY(apple35_2img_identify)
{
- *vote = apple35_2img_decode(floppy, NULL, NULL, NULL) ? 0 : 100;
+ *vote = apple35_2img_decode(floppy, nullptr, nullptr, nullptr) ? 0 : 100;
return FLOPPY_ERROR_SUCCESS;
}
@@ -1175,12 +1175,12 @@ static FLOPPY_CONSTRUCT(apple35_2img_construct)
LEGACY_FLOPPY_OPTIONS_START( apple35_mac )
- LEGACY_FLOPPY_OPTION( apple35_raw, "dsk,img,image", "Apple raw 3.5\" disk image", apple35_raw_identify, apple35_raw_construct, NULL,
+ LEGACY_FLOPPY_OPTION( apple35_raw, "dsk,img,image", "Apple raw 3.5\" disk image", apple35_raw_identify, apple35_raw_construct, nullptr,
HEADS([1]-2)
TRACKS([80])
SECTOR_LENGTH([512])
FIRST_SECTOR_ID([0]))
- LEGACY_FLOPPY_OPTION( apple35_dc, "dc,dc42,dsk,img,image", "Apple DiskCopy disk image", apple35_diskcopy_identify, apple35_diskcopy_construct, NULL,
+ LEGACY_FLOPPY_OPTION( apple35_dc, "dc,dc42,dsk,img,image", "Apple DiskCopy disk image", apple35_diskcopy_identify, apple35_diskcopy_construct, nullptr,
HEADS([1]-2)
TRACKS([80])
SECTOR_LENGTH([512])
@@ -1188,17 +1188,17 @@ LEGACY_FLOPPY_OPTIONS_START( apple35_mac )
LEGACY_FLOPPY_OPTIONS_END
LEGACY_FLOPPY_OPTIONS_START( apple35_iigs )
- LEGACY_FLOPPY_OPTION( apple35_raw, "dsk,img,image,po", "Apple raw 3.5\" disk image", apple35_raw_identify, apple35_raw_construct, NULL,
+ LEGACY_FLOPPY_OPTION( apple35_raw, "dsk,img,image,po", "Apple raw 3.5\" disk image", apple35_raw_identify, apple35_raw_construct, nullptr,
HEADS([1]-2)
TRACKS([80])
SECTOR_LENGTH([512])
FIRST_SECTOR_ID([0]))
- LEGACY_FLOPPY_OPTION( apple35_dc, "dc,dsk,img,image", "Apple DiskCopy disk image", apple35_diskcopy_identify, apple35_diskcopy_construct, NULL,
+ LEGACY_FLOPPY_OPTION( apple35_dc, "dc,dsk,img,image", "Apple DiskCopy disk image", apple35_diskcopy_identify, apple35_diskcopy_construct, nullptr,
HEADS([1]-2)
TRACKS([80])
SECTOR_LENGTH([512])
FIRST_SECTOR_ID([0]))
- LEGACY_FLOPPY_OPTION( apple35_2img, "2img,2mg", "Apple ][gs 2IMG disk image", apple35_2img_identify, apple35_2img_construct, NULL,
+ LEGACY_FLOPPY_OPTION( apple35_2img, "2img,2mg", "Apple ][gs 2IMG disk image", apple35_2img_identify, apple35_2img_construct, nullptr,
HEADS([1]-2)
TRACKS([80])
SECTOR_LENGTH([512])
@@ -1410,8 +1410,8 @@ bool dc42_format::save(io_generic *io, floppy_image *image)
if(hb == 4) {
UINT8 h[7];
- for(int i=0; i<7; i++)
- h[i] = gb(buf, ts, pos, wrap);
+ for(auto & elem : h)
+ elem = gb(buf, ts, pos, wrap);
UINT8 v2 = gcr6bw_tb[h[2]];
UINT8 v3 = gcr6bw_tb[h[3]];
UINT8 tr = gcr6bw_tb[h[0]] | (v2 & 1 ? 0x40 : 0x00);
diff --git a/src/lib/formats/apf_apt.cpp b/src/lib/formats/apf_apt.cpp
index b609a109ef6..f1a333f2c77 100644
--- a/src/lib/formats/apf_apt.cpp
+++ b/src/lib/formats/apf_apt.cpp
@@ -172,14 +172,14 @@ static int apf_apt_calculate_size_in_samples(const UINT8 *bytes, int length)
{
apf_image_size = length;
- return apf_apt_handle_cassette(NULL, bytes);
+ return apf_apt_handle_cassette(nullptr, bytes);
}
static int apf_cpf_calculate_size_in_samples(const UINT8 *bytes, int length)
{
apf_image_size = length;
- return apf_cpf_handle_cassette(NULL, bytes);
+ return apf_cpf_handle_cassette(nullptr, bytes);
}
//*********************************************************************************
@@ -210,7 +210,7 @@ static const struct CassetteFormat apf_cpf_format =
"cas,cpf",
apf_cpf_identify,
apf_cpf_load,
- NULL
+ nullptr
};
//*********************************************************************************
@@ -241,7 +241,7 @@ static const struct CassetteFormat apf_apt_format =
"apt",
apf_apt_identify,
apf_apt_load,
- NULL
+ nullptr
};
//*********************************************************************************
diff --git a/src/lib/formats/atari_dsk.cpp b/src/lib/formats/atari_dsk.cpp
index f5ccd03c952..d73cbf8185f 100644
--- a/src/lib/formats/atari_dsk.cpp
+++ b/src/lib/formats/atari_dsk.cpp
@@ -31,7 +31,7 @@ LEGACY_FLOPPY_OPTIONS_START( atari_only )
"Atari floppy disk image",
atari_dsk_identify,
atari_dsk_construct,
- NULL,
- NULL
+ nullptr,
+ nullptr
)
LEGACY_FLOPPY_OPTIONS_END0
diff --git a/src/lib/formats/atom_tap.cpp b/src/lib/formats/atom_tap.cpp
index 06d614a10b3..917500eace1 100644
--- a/src/lib/formats/atom_tap.cpp
+++ b/src/lib/formats/atom_tap.cpp
@@ -138,7 +138,7 @@ const struct CassetteFormat atom_tap_format =
"tap",
atom_tap_identify,
atom_tap_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START( atom_cassette_formats )
diff --git a/src/lib/formats/basicdsk.cpp b/src/lib/formats/basicdsk.cpp
index ee3ed133e91..9c08c97cc2b 100644
--- a/src/lib/formats/basicdsk.cpp
+++ b/src/lib/formats/basicdsk.cpp
@@ -184,7 +184,7 @@ static floperr_t basicdsk_format_track(floppy_image_legacy *floppy, int head, in
{
floperr_t err = FLOPPY_ERROR_SUCCESS;
UINT8 local_buffer[512];
- void *alloc_buffer = NULL;
+ void *alloc_buffer = nullptr;
void *buffer;
UINT32 sector_length;
int sector;
@@ -206,7 +206,7 @@ static floperr_t basicdsk_format_track(floppy_image_legacy *floppy, int head, in
}
else
{
- alloc_buffer = NULL;
+ alloc_buffer = nullptr;
buffer = local_buffer;
}
@@ -245,7 +245,7 @@ static floperr_t basicdsk_get_sector_length(floppy_image_legacy *floppy, int hea
{
floperr_t err;
- err = get_offset(floppy, head, track, sector, FALSE, NULL);
+ err = get_offset(floppy, head, track, sector, FALSE, nullptr);
if (err)
return err;
diff --git a/src/lib/formats/camplynx_cas.cpp b/src/lib/formats/camplynx_cas.cpp
index a525f18d3cb..15ed26c8201 100644
--- a/src/lib/formats/camplynx_cas.cpp
+++ b/src/lib/formats/camplynx_cas.cpp
@@ -150,7 +150,7 @@ static int camplynx_cassette_calculate_size_in_samples(const UINT8 *bytes, int l
{
camplynx_image_size = length;
- return camplynx_handle_cassette(NULL, bytes);
+ return camplynx_handle_cassette(nullptr, bytes);
}
static const struct CassetteLegacyWaveFiller lynx48k_legacy_fill_wave =
@@ -200,7 +200,7 @@ static const struct CassetteFormat lynx48k_cassette_image_format =
"tap",
lynx48k_cassette_identify,
lynx48k_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat lynx128k_cassette_image_format =
@@ -208,7 +208,7 @@ static const struct CassetteFormat lynx128k_cassette_image_format =
"tap",
lynx128k_cassette_identify,
lynx128k_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(lynx48k_cassette_formats)
diff --git a/src/lib/formats/cassimg.cpp b/src/lib/formats/cassimg.cpp
index 3154def299a..7fe1bcec81b 100644
--- a/src/lib/formats/cassimg.cpp
+++ b/src/lib/formats/cassimg.cpp
@@ -100,7 +100,7 @@ static void cassette_finishinit(casserr_t err, cassette_image *cassette, cassett
if (cassette && (err || !outcassette))
{
cassette_close(cassette);
- cassette = NULL;
+ cassette = nullptr;
}
if (outcassette)
*outcassette = cassette;
@@ -133,7 +133,7 @@ casserr_t cassette_open_choices(void *file, const struct io_procs *procs, const
formats = cassette_default_formats;
/* create the cassette object */
- cassette = cassette_init(NULL, file, procs, flags);
+ cassette = cassette_init(nullptr, file, procs, flags);
if (!cassette)
{
err = CASSETTE_ERROR_OUTOFMEMORY;
@@ -141,7 +141,7 @@ casserr_t cassette_open_choices(void *file, const struct io_procs *procs, const
}
/* identify the image */
- format = NULL;
+ format = nullptr;
for (i = 0; !format && formats[i]; i++)
{
if (good_format(formats[i], extension, flags))
@@ -150,7 +150,7 @@ casserr_t cassette_open_choices(void *file, const struct io_procs *procs, const
memset(&opts, 0, sizeof(opts));
err = format->identify(cassette, &opts);
if (err == CASSETTE_ERROR_INVALIDIMAGE)
- format = NULL;
+ format = nullptr;
else if (err)
goto done;
}
@@ -189,8 +189,8 @@ casserr_t cassette_open(void *file, const struct io_procs *procs,
{
const struct CassetteFormat *formats[2];
formats[0] = format;
- formats[1] = NULL;
- return cassette_open_choices(file, procs, NULL, formats, flags, outcassette);
+ formats[1] = nullptr;
+ return cassette_open_choices(file, procs, nullptr, formats, flags, outcassette);
}
@@ -207,7 +207,7 @@ casserr_t cassette_create(void *file, const struct io_procs *procs, const struct
return CASSETTE_ERROR_INVALIDIMAGE;
/* is this a good format? */
- if (!good_format(format, NULL, flags))
+ if (!good_format(format, nullptr, flags))
return CASSETTE_ERROR_INVALIDIMAGE;
/* normalize arguments */
@@ -278,8 +278,8 @@ void cassette_close(cassette_image *cassette)
{
if ((cassette->flags & CASSETTE_FLAG_DIRTY) && (cassette->flags & CASSETTE_FLAG_SAVEONEXIT))
cassette_save(cassette);
- for (unsigned int i = 0; i < cassette->blocks.size(); i++)
- global_free(cassette->blocks[i]);
+ for (auto & elem : cassette->blocks)
+ global_free(elem);
global_free(cassette);
}
}
@@ -374,7 +374,7 @@ static casserr_t compute_manipulation_ranges(cassette_image *cassette, int chann
static casserr_t lookup_sample(cassette_image *cassette, int channel, size_t sample, INT32 **ptr)
{
- *ptr = NULL;
+ *ptr = nullptr;
size_t sample_blocknum = (sample / SAMPLES_PER_BLOCK) * cassette->channels + channel;
size_t sample_index = sample % SAMPLES_PER_BLOCK;
@@ -385,7 +385,7 @@ static casserr_t lookup_sample(cassette_image *cassette, int channel, size_t sam
memset(&cassette->blocks[osize], 0, (cassette->blocks.size()-osize)*sizeof(cassette->blocks[0]));
}
- if (cassette->blocks[sample_blocknum] == NULL)
+ if (cassette->blocks[sample_blocknum] == nullptr)
cassette->blocks[sample_blocknum] = global_alloc(sample_block);
sample_block &block = *cassette->blocks[sample_blocknum];
@@ -763,7 +763,7 @@ casserr_t cassette_read_modulated_data(cassette_image *cassette, int channel, do
casserr_t err;
UINT8 buffer_stack[1024];
UINT8 *buffer;
- UINT8 *alloc_buffer = NULL;
+ UINT8 *alloc_buffer = nullptr;
double delta;
double total_displacement = 0.0;
size_t this_length;
diff --git a/src/lib/formats/cbm_tap.cpp b/src/lib/formats/cbm_tap.cpp
index 23b8a8846ed..5c3033f9dad 100644
--- a/src/lib/formats/cbm_tap.cpp
+++ b/src/lib/formats/cbm_tap.cpp
@@ -157,7 +157,7 @@ static void toggle_wave_data(void )
static void cbm_output_wave( INT16 **buffer, int length )
{
- if (buffer == NULL)
+ if (buffer == nullptr)
return;
for( ; length > 0; length-- )
@@ -187,7 +187,7 @@ static int cbm_tap_do_work( INT16 **buffer, int length, const UINT8 *data )
/* int waveamp_high, waveamp_low; */
/* Log .TAP info but only once */
- if (!(buffer == NULL))
+ if (!(buffer == nullptr))
{
LOG_FORMATS("TAP version : %d\n", version);
LOG_FORMATS("Machine type : %d\n", system);
@@ -204,7 +204,7 @@ static int cbm_tap_do_work( INT16 **buffer, int length, const UINT8 *data )
}
/* is the .tap file corrupted? */
- if ((data == NULL) || (length <= CBM_HEADER_SIZE))
+ if ((data == nullptr) || (length <= CBM_HEADER_SIZE))
return -1;
@@ -321,7 +321,7 @@ static int cbm_tap_do_work( INT16 **buffer, int length, const UINT8 *data )
static int cbm_tap_to_wav_size( const UINT8 *tapdata, int taplen )
{
- int size = cbm_tap_do_work(NULL, taplen, tapdata);
+ int size = cbm_tap_do_work(nullptr, taplen, tapdata);
len = taplen;
return size;
@@ -364,7 +364,7 @@ static const struct CassetteFormat cbm_tap_cassette_format = {
"tap",
cbm_cassette_identify,
cbm_cassette_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/ccvf_dsk.cpp b/src/lib/formats/ccvf_dsk.cpp
index 09119a4b632..8e30dcfff33 100644
--- a/src/lib/formats/ccvf_dsk.cpp
+++ b/src/lib/formats/ccvf_dsk.cpp
@@ -109,7 +109,7 @@ bool ccvf_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
if (byteoffs==78720) break;
hex[0]=line[byte * 2];
hex[1]=line[(byte * 2) + 1];
- bytes[byteoffs++] = strtol(hex, NULL, 16);
+ bytes[byteoffs++] = strtol(hex, nullptr, 16);
}
}
start = end + 1;
diff --git a/src/lib/formats/cgen_cas.cpp b/src/lib/formats/cgen_cas.cpp
index d9165441618..5cd4c3e1b0e 100644
--- a/src/lib/formats/cgen_cas.cpp
+++ b/src/lib/formats/cgen_cas.cpp
@@ -111,7 +111,7 @@ static int cgenie_cas_to_wav_size(const UINT8 *casdata, int caslen)
{
cas_size = caslen;
- return cgenie_handle_cas( NULL, casdata );
+ return cgenie_handle_cas( nullptr, casdata );
}
static const struct CassetteLegacyWaveFiller cgenie_cas_legacy_fill_wave =
@@ -143,7 +143,7 @@ static const struct CassetteFormat cgenie_cas_format =
"cas",
cgenie_cas_identify,
cgenie_cas_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/coco_cas.cpp b/src/lib/formats/coco_cas.cpp
index e70b28d69c0..d9599aa8c5a 100644
--- a/src/lib/formats/coco_cas.cpp
+++ b/src/lib/formats/coco_cas.cpp
@@ -277,7 +277,7 @@ const struct CassetteFormat coco_cas_format =
"cas",
coco_cas_identify,
coco_cas_load,
- NULL
+ nullptr
};
const struct CassetteFormat alice32_cas_format =
@@ -285,7 +285,7 @@ const struct CassetteFormat alice32_cas_format =
"cas,c10,k7",
coco_cas_identify,
alice32_cas_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/cqm_dsk.cpp b/src/lib/formats/cqm_dsk.cpp
index 5ecf4da3186..ff191aec56c 100644
--- a/src/lib/formats/cqm_dsk.cpp
+++ b/src/lib/formats/cqm_dsk.cpp
@@ -128,7 +128,7 @@ static floperr_t cqm_read_indexed_sector(floppy_image_legacy *floppy, int head,
static floperr_t cqm_get_sector_length(floppy_image_legacy *floppy, int head, int track, int sector, UINT32 *sector_length)
{
floperr_t err;
- err = get_offset(floppy, head, track, sector, FALSE, NULL);
+ err = get_offset(floppy, head, track, sector, FALSE, nullptr);
if (err)
return err;
diff --git a/src/lib/formats/cqm_dsk.h b/src/lib/formats/cqm_dsk.h
index e07577c1e4c..48bc8d5521c 100644
--- a/src/lib/formats/cqm_dsk.h
+++ b/src/lib/formats/cqm_dsk.h
@@ -18,14 +18,14 @@ class cqm_format : public floppy_image_format_t
public:
cqm_format();
- virtual int identify(io_generic *io, UINT32 form_factor);
- virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
- virtual bool save(io_generic *io, floppy_image *image);
-
- virtual const char *name() const;
- virtual const char *description() const;
- virtual const char *extensions() const;
- virtual bool supports_save() const;
+ virtual int identify(io_generic *io, UINT32 form_factor) override;
+ virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image) override;
+ virtual bool save(io_generic *io, floppy_image *image) override;
+
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
};
extern const floppy_format_type FLOPPY_CQM_FORMAT;
diff --git a/src/lib/formats/csw_cas.cpp b/src/lib/formats/csw_cas.cpp
index 94a45edde1f..336a9dde7cd 100644
--- a/src/lib/formats/csw_cas.cpp
+++ b/src/lib/formats/csw_cas.cpp
@@ -110,9 +110,9 @@ static int csw_cas_to_wav_size( const UINT8 *casdata, int caslen )
d_stream.avail_out = 1;
d_stream.total_out=0;
- d_stream.zalloc = 0;
- d_stream.zfree = 0;
- d_stream.opaque = 0;
+ d_stream.zalloc = nullptr;
+ d_stream.zfree = nullptr;
+ d_stream.opaque = nullptr;
d_stream.data_type=0;
err = inflateInit( &d_stream );
@@ -218,9 +218,9 @@ static int csw_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes )
d_stream.avail_out = 1;
d_stream.total_out=0;
- d_stream.zalloc = 0;
- d_stream.zfree = 0;
- d_stream.opaque = 0;
+ d_stream.zalloc = nullptr;
+ d_stream.zfree = nullptr;
+ d_stream.opaque = nullptr;
d_stream.data_type=0;
err = inflateInit( &d_stream );
@@ -300,7 +300,7 @@ static const struct CassetteFormat csw_cassette_format = {
"csw",
csw_cassette_identify,
csw_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(csw_cassette_formats)
diff --git a/src/lib/formats/d88_dsk.cpp b/src/lib/formats/d88_dsk.cpp
index f8383191e6d..b676db7fd21 100644
--- a/src/lib/formats/d88_dsk.cpp
+++ b/src/lib/formats/d88_dsk.cpp
@@ -319,7 +319,7 @@ FLOPPY_IDENTIFY(d88_dsk_identify)
{
UINT32 size;
- d88_get_header(floppy,&size,NULL,NULL,NULL);
+ d88_get_header(floppy,&size,nullptr,nullptr,nullptr);
if(floppy_image_size(floppy) == size)
{
@@ -517,7 +517,7 @@ bool d88_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
sdatapos += size;
} else
- sects[i].data = NULL;
+ sects[i].data = nullptr;
}
build_pc_track_mfm(track, head, image, cell_count, sector_count, sects, calc_default_pc_gap3_size(form_factor, sects[0].actual_size));
diff --git a/src/lib/formats/d88_dsk.h b/src/lib/formats/d88_dsk.h
index 5b12f8eb600..2ab8db763f6 100644
--- a/src/lib/formats/d88_dsk.h
+++ b/src/lib/formats/d88_dsk.h
@@ -19,14 +19,14 @@ class d88_format : public floppy_image_format_t
public:
d88_format();
- virtual int identify(io_generic *io, UINT32 form_factor);
- virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
- virtual bool save(io_generic *io, floppy_image *image);
-
- virtual const char *name() const;
- virtual const char *description() const;
- virtual const char *extensions() const;
- virtual bool supports_save() const;
+ virtual int identify(io_generic *io, UINT32 form_factor) override;
+ virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image) override;
+ virtual bool save(io_generic *io, floppy_image *image) override;
+
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
};
extern const floppy_format_type FLOPPY_D88_FORMAT;
diff --git a/src/lib/formats/dfi_dsk.h b/src/lib/formats/dfi_dsk.h
index 72de8695ae2..b25278275f3 100644
--- a/src/lib/formats/dfi_dsk.h
+++ b/src/lib/formats/dfi_dsk.h
@@ -10,14 +10,14 @@ class dfi_format : public floppy_image_format_t
public:
dfi_format();
- virtual int identify(io_generic *io, UINT32 form_factor);
- virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
+ virtual int identify(io_generic *io, UINT32 form_factor) override;
+ virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image) override;
// virtual bool save(io_generic *io, floppy_image *image);
- virtual const char *name() const;
- virtual const char *description() const;
- virtual const char *extensions() const;
- virtual bool supports_save() const;
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
};
extern const floppy_format_type FLOPPY_DFI_FORMAT;
diff --git a/src/lib/formats/dsk_dsk.cpp b/src/lib/formats/dsk_dsk.cpp
index 6922071de25..4987a5bb52b 100644
--- a/src/lib/formats/dsk_dsk.cpp
+++ b/src/lib/formats/dsk_dsk.cpp
@@ -162,7 +162,7 @@ static floperr_t dsk_write_indexed_sector(floppy_image_legacy *floppy, int head,
static floperr_t dsk_get_sector_length(floppy_image_legacy *floppy, int head, int track, int sector, UINT32 *sector_length)
{
floperr_t err;
- err = get_offset(floppy, head, track, sector, FALSE, NULL);
+ err = get_offset(floppy, head, track, sector, FALSE, nullptr);
if (err)
return err;
@@ -179,7 +179,7 @@ static floperr_t dsk_get_indexed_sector_info(floppy_image_legacy *floppy, int he
UINT8 sector_info[0x100];
int pos;
- retVal = get_offset(floppy, head, track, sector_index, FALSE, NULL);
+ retVal = get_offset(floppy, head, track, sector_index, FALSE, nullptr);
offset = dsk_get_track_offset(floppy,head,track);
pos = 0x18 + (sector_index << 3);
floppy_image_read(floppy, sector_info, offset, 0x100);
@@ -419,7 +419,7 @@ bool dsk_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
sdatapos += sects[j].actual_size;
} else
- sects[j].data = NULL;
+ sects[j].data = nullptr;
if(extendformat)
pos += sector.data_length;
diff --git a/src/lib/formats/dsk_dsk.h b/src/lib/formats/dsk_dsk.h
index d92784f78e8..fc27c0c5030 100644
--- a/src/lib/formats/dsk_dsk.h
+++ b/src/lib/formats/dsk_dsk.h
@@ -18,13 +18,13 @@ class dsk_format : public floppy_image_format_t
public:
dsk_format();
- virtual int identify(io_generic *io, UINT32 form_factor);
- virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
+ virtual int identify(io_generic *io, UINT32 form_factor) override;
+ virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image) override;
- virtual const char *name() const;
- virtual const char *description() const;
- virtual const char *extensions() const;
- virtual bool supports_save() const;
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
};
extern const floppy_format_type FLOPPY_DSK_FORMAT;
diff --git a/src/lib/formats/fc100_cas.cpp b/src/lib/formats/fc100_cas.cpp
index 415d3fb01db..01986e789bf 100644
--- a/src/lib/formats/fc100_cas.cpp
+++ b/src/lib/formats/fc100_cas.cpp
@@ -119,7 +119,7 @@ static int fc100_cassette_calculate_size_in_samples(const UINT8 *bytes, int leng
{
fc100_image_size = length;
- return fc100_handle_cassette(NULL, bytes);
+ return fc100_handle_cassette(nullptr, bytes);
}
static const struct CassetteLegacyWaveFiller fc100_legacy_fill_wave =
@@ -148,7 +148,7 @@ static const struct CassetteFormat fc100_cassette_image_format =
"cas",
fc100_cassette_identify,
fc100_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(fc100_cassette_formats)
diff --git a/src/lib/formats/flopimg.cpp b/src/lib/formats/flopimg.cpp
index e66df68cdbc..57281fcda0e 100644
--- a/src/lib/formats/flopimg.cpp
+++ b/src/lib/formats/flopimg.cpp
@@ -81,11 +81,11 @@ static floppy_image_legacy *floppy_init(void *fp, const struct io_procs *procs,
floppy = (floppy_image_legacy *)malloc(sizeof(floppy_image_legacy));
if (!floppy)
- return NULL;
+ return nullptr;
memset(floppy, 0, sizeof(*floppy));
- floppy->tags = pool_alloc_lib(NULL);
- floppy->tag_data = NULL;
+ floppy->tags = pool_alloc_lib(nullptr);
+ floppy->tag_data = nullptr;
floppy->io.file = fp;
floppy->io.procs = procs;
floppy->io.filler = 0xFF;
@@ -151,7 +151,7 @@ static floperr_t floppy_open_internal(void *fp, const struct io_procs *procs, co
if (outfloppy)
{
/* call the format constructor */
- err = floppy_options[best_option].construct(floppy, &floppy_options[best_option], NULL);
+ err = floppy_options[best_option].construct(floppy, &floppy_options[best_option], nullptr);
if (err)
goto done;
@@ -168,7 +168,7 @@ done:
if (floppy && (!outfloppy || err))
{
floppy_close_internal(floppy, FALSE);
- floppy = NULL;
+ floppy = nullptr;
}
if (outoption)
@@ -183,7 +183,7 @@ done:
floperr_t floppy_identify(void *fp, const struct io_procs *procs, const char *extension,
const struct FloppyFormat *formats, int *identified_format)
{
- return floppy_open_internal(fp, procs, extension, formats, INT_MAX, FLOPPY_FLAGS_READONLY, NULL, identified_format);
+ return floppy_open_internal(fp, procs, extension, formats, INT_MAX, FLOPPY_FLAGS_READONLY, nullptr, identified_format);
}
@@ -191,7 +191,7 @@ floperr_t floppy_identify(void *fp, const struct io_procs *procs, const char *ex
floperr_t floppy_open(void *fp, const struct io_procs *procs, const char *extension,
const struct FloppyFormat *format, int flags, floppy_image_legacy **outfloppy)
{
- return floppy_open_internal(fp, procs, extension, format, 1, flags, outfloppy, NULL);
+ return floppy_open_internal(fp, procs, extension, format, 1, flags, outfloppy, nullptr);
}
@@ -199,7 +199,7 @@ floperr_t floppy_open(void *fp, const struct io_procs *procs, const char *extens
floperr_t floppy_open_choices(void *fp, const struct io_procs *procs, const char *extension,
const struct FloppyFormat *formats, int flags, floppy_image_legacy **outfloppy)
{
- return floppy_open_internal(fp, procs, extension, formats, INT_MAX, flags, outfloppy, NULL);
+ return floppy_open_internal(fp, procs, extension, formats, INT_MAX, flags, outfloppy, nullptr);
}
@@ -231,11 +231,11 @@ static floperr_t option_to_floppy_error(optreserr_t oerr)
floperr_t floppy_create(void *fp, const struct io_procs *procs, const struct FloppyFormat *format, option_resolution *parameters, floppy_image_legacy **outfloppy)
{
- floppy_image_legacy *floppy = NULL;
+ floppy_image_legacy *floppy = nullptr;
optreserr_t oerr;
floperr_t err;
int heads, tracks, h, t;
- option_resolution *alloc_resolution = NULL;
+ option_resolution *alloc_resolution = nullptr;
assert(format);
@@ -307,7 +307,7 @@ done:
if (err && floppy)
{
floppy_close_internal(floppy, FALSE);
- floppy = NULL;
+ floppy = nullptr;
}
if (outfloppy)
@@ -474,7 +474,7 @@ static floperr_t floppy_readwrite_sector(floppy_image_legacy *floppy, int head,
{
/* find out the size of this sector */
if (indexed)
- err = fmt->get_indexed_sector_info(floppy, head, track, sector, NULL, NULL, NULL, &sector_length, NULL);
+ err = fmt->get_indexed_sector_info(floppy, head, track, sector, nullptr, nullptr, nullptr, &sector_length, nullptr);
else
err = fmt->get_sector_length(floppy, head, track, sector, &sector_length);
if (err)
@@ -683,7 +683,7 @@ floperr_t floppy_format_track(floppy_image_legacy *floppy, int head, int track,
{
floperr_t err;
struct FloppyCallbacks *format;
- option_resolution *alloc_resolution = NULL;
+ option_resolution *alloc_resolution = nullptr;
optreserr_t oerr;
/* supported? */
@@ -785,7 +785,7 @@ floperr_t floppy_get_sector_count(floppy_image_legacy *floppy, int head, int tra
do
{
- err = floppy_get_indexed_sector_info(floppy, head, track, sector_index, NULL, NULL, NULL, NULL, NULL);
+ err = floppy_get_indexed_sector_info(floppy, head, track, sector_index, nullptr, nullptr, nullptr, nullptr, nullptr);
if (!err)
sector_index++;
}
@@ -867,7 +867,7 @@ floperr_t floppy_load_track(floppy_image_legacy *floppy, int head, int track, in
error:
if (track_data)
- *track_data = NULL;
+ *track_data = nullptr;
if (track_length)
*track_length = 0;
return err;
@@ -923,7 +923,7 @@ const char *floppy_error(floperr_t err)
};
if ((err < 0) || (err >= ARRAY_LENGTH(error_messages)))
- return NULL;
+ return nullptr;
return error_messages[err];
}
@@ -1017,7 +1017,7 @@ const char *floppy_image::get_variant_name(UINT32 form_factor, UINT32 variant)
floppy_image_format_t::floppy_image_format_t()
{
- next = 0;
+ next = nullptr;
}
floppy_image_format_t::~floppy_image_format_t()
@@ -1763,8 +1763,8 @@ void floppy_image_format_t::generate_track_from_levels(int track, int head, std:
// Also check if all MG values are valid
int transition_count = 0;
- for(unsigned int i=0; i<trackbuf.size(); i++) {
- switch(trackbuf[i] & floppy_image::MG_MASK) {
+ for(auto & elem : trackbuf) {
+ switch(elem & floppy_image::MG_MASK) {
case MG_1:
transition_count++;
break;
@@ -1809,9 +1809,9 @@ void floppy_image_format_t::generate_track_from_levels(int track, int head, std:
UINT32 cbit = floppy_image::MG_A;
UINT32 count = 0;
- for(unsigned int i=0; i<trackbuf.size(); i++) {
- UINT32 bit = trackbuf[i] & floppy_image::MG_MASK;
- UINT32 time = trackbuf[i] & floppy_image::TIME_MASK;
+ for(auto & elem : trackbuf) {
+ UINT32 bit = elem & floppy_image::MG_MASK;
+ UINT32 time = elem & floppy_image::TIME_MASK;
if(bit == MG_0) {
count += time;
continue;
@@ -1824,7 +1824,7 @@ void floppy_image_format_t::generate_track_from_levels(int track, int head, std:
continue;
}
dest.push_back(cbit | count);
- dest.push_back(trackbuf[i]);
+ dest.push_back(elem);
count = 0;
}
@@ -2184,7 +2184,7 @@ const floppy_image_format_t::desc_e *floppy_image_format_t::atari_st_fcp_get_des
case 11:
return atari_st_fcp_11;
}
- return 0;
+ return nullptr;
}
// Amiga layouts
diff --git a/src/lib/formats/fm7_cas.cpp b/src/lib/formats/fm7_cas.cpp
index b1ce8f397b4..52892fdea2e 100644
--- a/src/lib/formats/fm7_cas.cpp
+++ b/src/lib/formats/fm7_cas.cpp
@@ -65,7 +65,7 @@ static int fm7_cas_to_wav_size (const UINT8 *casdata, int caslen)
{
cas_size = caslen;
- return fm7_handle_t77(NULL,casdata);
+ return fm7_handle_t77(nullptr,casdata);
}
/*******************************************************************
@@ -104,7 +104,7 @@ static const struct CassetteFormat fm7_cassette_format = {
"t77",
fm7_cas_identify,
fm7_cas_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(fm7_cassette_formats)
diff --git a/src/lib/formats/fmsx_cas.cpp b/src/lib/formats/fmsx_cas.cpp
index 10a26d2e232..c135880dc79 100644
--- a/src/lib/formats/fmsx_cas.cpp
+++ b/src/lib/formats/fmsx_cas.cpp
@@ -136,7 +136,7 @@ static const struct CassetteFormat fmsx_cas_format =
"tap,cas",
fmsx_cas_identify,
fmsx_cas_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/g64_dsk.cpp b/src/lib/formats/g64_dsk.cpp
index 6cbb345adc8..e85b5c34682 100644
--- a/src/lib/formats/g64_dsk.cpp
+++ b/src/lib/formats/g64_dsk.cpp
@@ -108,7 +108,7 @@ bool g64_format::save(io_generic *io, floppy_image *image)
tracks = TRACK_COUNT * heads;
// write header
- UINT8 header[] = { 'G', 'C', 'R', '-', '1', '5', '4', '1', 0x00, tracks, TRACK_LENGTH & 0xff, TRACK_LENGTH >> 8 };
+ UINT8 header[] = { 'G', 'C', 'R', '-', '1', '5', '4', '1', 0x00, static_cast<UINT8>(tracks), TRACK_LENGTH & 0xff, TRACK_LENGTH >> 8 };
io_generic_write(io, header, POS_SIGNATURE, sizeof(header));
// write tracks
diff --git a/src/lib/formats/gtp_cas.cpp b/src/lib/formats/gtp_cas.cpp
index 1711a0a76b5..4cdb546ea6b 100644
--- a/src/lib/formats/gtp_cas.cpp
+++ b/src/lib/formats/gtp_cas.cpp
@@ -33,7 +33,7 @@ static INT16 len;
static void gtp_output_wave( INT16 **buffer, int length ) {
- if ( buffer == NULL ) {
+ if ( buffer == nullptr ) {
return;
}
@@ -111,7 +111,7 @@ static int gtp_cas_to_wav_size( const UINT8 *casdata, int caslen ) {
int size,n;
size = 0;
n = 0;
- if (casdata == NULL) return -1;
+ if (casdata == nullptr) return -1;
while(n<caslen) {
int block_type = casdata[n];
int block_size = casdata[n+2]*256 + casdata[n+1];
@@ -132,7 +132,7 @@ static int gtp_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes ) {
int i,size,n;
size = 0;
n = 0;
- if (bytes == NULL) return -1;
+ if (bytes == nullptr) return -1;
while(n<len)
{
int block_type = bytes[n];
@@ -192,7 +192,7 @@ static const struct CassetteFormat gtp_cassette_format = {
"gtp",
gtp_cassette_identify,
gtp_cassette_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/hect_dsk.cpp b/src/lib/formats/hect_dsk.cpp
index 8dfe445e6e4..4cd36008540 100644
--- a/src/lib/formats/hect_dsk.cpp
+++ b/src/lib/formats/hect_dsk.cpp
@@ -94,7 +94,7 @@ static FLOPPY_CONSTRUCT(hector_disc2_dsk800_construct)
}
LEGACY_FLOPPY_OPTIONS_START( hector_disc2 )
- LEGACY_FLOPPY_OPTION( hector_dsk, "HE2", "hector disc2 floppy disk image 200K", hector_disc2_dsk200_identify, hector_disc2_dsk200_construct, NULL, NULL)
- LEGACY_FLOPPY_OPTION( hector_dsk, "HE7", "hector disc2 floppy disk image 720K", hector_disc2_dsk720_identify, hector_disc2_dsk720_construct, NULL, NULL)
- LEGACY_FLOPPY_OPTION( hector_dsk, "HE8", "hector disc2 floppy disk image 800K", hector_disc2_dsk800_identify, hector_disc2_dsk800_construct, NULL, NULL)
+ LEGACY_FLOPPY_OPTION( hector_dsk, "HE2", "hector disc2 floppy disk image 200K", hector_disc2_dsk200_identify, hector_disc2_dsk200_construct, nullptr, nullptr)
+ LEGACY_FLOPPY_OPTION( hector_dsk, "HE7", "hector disc2 floppy disk image 720K", hector_disc2_dsk720_identify, hector_disc2_dsk720_construct, nullptr, nullptr)
+ LEGACY_FLOPPY_OPTION( hector_dsk, "HE8", "hector disc2 floppy disk image 800K", hector_disc2_dsk800_identify, hector_disc2_dsk800_construct, nullptr, nullptr)
LEGACY_FLOPPY_OPTIONS_END
diff --git a/src/lib/formats/hect_tap.cpp b/src/lib/formats/hect_tap.cpp
index 9110f07cc8c..7b2120ddae1 100644
--- a/src/lib/formats/hect_tap.cpp
+++ b/src/lib/formats/hect_tap.cpp
@@ -217,7 +217,7 @@ static int hector_tap_forth_to_wav_size(const UINT8 *casdata, int caslen)
{
cas_size = caslen ;
- return hector_handle_forth_tap( NULL, casdata );
+ return hector_handle_forth_tap( nullptr, casdata );
}
/*******************************************************************
@@ -236,7 +236,7 @@ static int hector_tap_to_wav_size(const UINT8 *casdata, int caslen)
{
cas_size = caslen ;
- return hector_handle_tap( NULL, casdata );//forth removed here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ return hector_handle_tap( nullptr, casdata );//forth removed here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
}
@@ -291,7 +291,7 @@ static const struct CassetteFormat hector_k7_format =
"k7,cin",
hector_k7_identify,
hector_k7_load,
- NULL
+ nullptr
};
static const struct CassetteFormat hector_k7Forth_format =
@@ -299,7 +299,7 @@ static const struct CassetteFormat hector_k7Forth_format =
"for",
hector_k7forth_identify,
hector_k7forth_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/hxcmfm_dsk.h b/src/lib/formats/hxcmfm_dsk.h
index edaac320d69..63238ab2006 100644
--- a/src/lib/formats/hxcmfm_dsk.h
+++ b/src/lib/formats/hxcmfm_dsk.h
@@ -18,14 +18,14 @@ class mfm_format : public floppy_image_format_t
public:
mfm_format();
- virtual int identify(io_generic *io, UINT32 form_factor);
- virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
- virtual bool save(io_generic *io, floppy_image *image);
-
- virtual const char *name() const;
- virtual const char *description() const;
- virtual const char *extensions() const;
- virtual bool supports_save() const;
+ virtual int identify(io_generic *io, UINT32 form_factor) override;
+ virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image) override;
+ virtual bool save(io_generic *io, floppy_image *image) override;
+
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
};
extern const floppy_format_type FLOPPY_MFM_FORMAT;
diff --git a/src/lib/formats/imageutl.cpp b/src/lib/formats/imageutl.cpp
index e6386da44c8..2bf17be849c 100644
--- a/src/lib/formats/imageutl.cpp
+++ b/src/lib/formats/imageutl.cpp
@@ -168,7 +168,7 @@ void image_specify_extension(char *buffer, size_t buffer_len, const char *extens
len = strlen(buffer);
/* be aware that extension can be NULL */
- if (extension != NULL)
+ if (extension != nullptr)
{
while(extension[extension_pos] != '\0')
{
diff --git a/src/lib/formats/imd_dsk.cpp b/src/lib/formats/imd_dsk.cpp
index 2d74c87f9ef..05320686e40 100644
--- a/src/lib/formats/imd_dsk.cpp
+++ b/src/lib/formats/imd_dsk.cpp
@@ -155,7 +155,7 @@ static floperr_t imd_expand_file(floppy_image_legacy *floppy , UINT64 offset , s
return FLOPPY_ERROR_SUCCESS;
}
- UINT8 *buffer = global_alloc_array(UINT8 , size_after_off);
+ auto buffer = global_alloc_array(UINT8 , size_after_off);
// Read the part of file after offset
floppy_image_read(floppy , buffer , offset , size_after_off);
@@ -225,7 +225,7 @@ static floperr_t imd_write_indexed_sector(floppy_image_legacy *floppy, int head,
static floperr_t imd_get_sector_length(floppy_image_legacy *floppy, int head, int track, int sector, UINT32 *sector_length)
{
floperr_t err;
- err = get_offset(floppy, head, track, sector, FALSE, NULL);
+ err = get_offset(floppy, head, track, sector, FALSE, nullptr);
if (err)
return err;
@@ -453,10 +453,10 @@ bool imd_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
const UINT8 *snum = &img[pos];
pos += sector_count;
- const UINT8 *tnum = head & 0x80 ? &img[pos] : NULL;
+ const UINT8 *tnum = head & 0x80 ? &img[pos] : nullptr;
if(tnum)
pos += sector_count;
- const UINT8 *hnum = head & 0x40 ? &img[pos] : NULL;
+ const UINT8 *hnum = head & 0x40 ? &img[pos] : nullptr;
if(hnum)
pos += sector_count;
@@ -475,7 +475,7 @@ bool imd_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
sects[i].actual_size = actual_size;
if(stype == 0 || stype > 8) {
- sects[i].data = NULL;
+ sects[i].data = nullptr;
} else {
sects[i].deleted = stype == 3 || stype == 4 || stype == 7 || stype == 8;
diff --git a/src/lib/formats/imd_dsk.h b/src/lib/formats/imd_dsk.h
index a993a061050..5f26de88d75 100644
--- a/src/lib/formats/imd_dsk.h
+++ b/src/lib/formats/imd_dsk.h
@@ -19,13 +19,13 @@ class imd_format : public floppy_image_format_t
public:
imd_format();
- virtual int identify(io_generic *io, UINT32 form_factor);
- virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
+ virtual int identify(io_generic *io, UINT32 form_factor) override;
+ virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image) override;
- virtual const char *name() const;
- virtual const char *description() const;
- virtual const char *extensions() const;
- virtual bool supports_save() const;
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
private:
void fixnum(char *start, char *end) const;
diff --git a/src/lib/formats/ioprocs.cpp b/src/lib/formats/ioprocs.cpp
index 2d75bff8b9f..24f92060a82 100644
--- a/src/lib/formats/ioprocs.cpp
+++ b/src/lib/formats/ioprocs.cpp
@@ -55,7 +55,7 @@ const struct io_procs stdio_ioprocs =
const struct io_procs stdio_ioprocs_noclose =
{
- NULL,
+ nullptr,
stdio_seekproc,
stdio_readproc,
stdio_writeproc,
@@ -109,7 +109,7 @@ const struct io_procs corefile_ioprocs =
const struct io_procs corefile_ioprocs_noclose =
{
- NULL,
+ nullptr,
corefile_seekproc,
corefile_readproc,
corefile_writeproc,
diff --git a/src/lib/formats/ipf_dsk.cpp b/src/lib/formats/ipf_dsk.cpp
index afb4c4ce9f3..ade50a8e2f9 100644
--- a/src/lib/formats/ipf_dsk.cpp
+++ b/src/lib/formats/ipf_dsk.cpp
@@ -88,7 +88,7 @@ bool ipf_format::parse(dynamic_buffer &data, floppy_image *image)
if(res)
res = generate_tracks(image);
global_free_array(tinfos);
- tinfos = NULL;
+ tinfos = nullptr;
return res;
}
@@ -118,9 +118,9 @@ bool ipf_format::parse_info(const UINT8 *info)
ipf_format::track_info *ipf_format::get_index(UINT32 idx)
{
if(idx > 1000)
- return 0;
+ return nullptr;
if(idx >= tcount) {
- track_info *ti1 = global_alloc_array_clear(track_info, idx+1);
+ auto ti1 = global_alloc_array_clear(track_info, idx+1);
memcpy(ti1, tinfos, tcount*sizeof(tinfos));
global_free_array(tinfos);
tcount = idx+1;
diff --git a/src/lib/formats/ipf_dsk.h b/src/lib/formats/ipf_dsk.h
index f3152e8c5c4..a0a16d36daf 100644
--- a/src/lib/formats/ipf_dsk.h
+++ b/src/lib/formats/ipf_dsk.h
@@ -10,13 +10,13 @@ class ipf_format : public floppy_image_format_t
public:
ipf_format();
- virtual int identify(io_generic *io, UINT32 form_factor);
- virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
+ virtual int identify(io_generic *io, UINT32 form_factor) override;
+ virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image) override;
- virtual const char *name() const;
- virtual const char *description() const;
- virtual const char *extensions() const;
- virtual bool supports_save() const;
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
private:
struct track_info {
diff --git a/src/lib/formats/kc_cas.cpp b/src/lib/formats/kc_cas.cpp
index 32d7901cad5..40e261aed7f 100644
--- a/src/lib/formats/kc_cas.cpp
+++ b/src/lib/formats/kc_cas.cpp
@@ -245,7 +245,7 @@ static int kc_kcc_to_wav_size(const UINT8 *casdata, int caslen)
{
kc_image_size = caslen ;
- return kc_handle_kcc( NULL, casdata );
+ return kc_handle_kcc( nullptr, casdata );
}
@@ -277,7 +277,7 @@ static const struct CassetteFormat kc_kcc_format =
"kcc,kcb",
kc_kcc_identify,
kc_kcc_load,
- NULL
+ nullptr
};
@@ -297,7 +297,7 @@ static int kc_tap_to_wav_size(const UINT8 *casdata, int caslen)
{
kc_image_size = caslen ;
- return kc_handle_tap( NULL, casdata );
+ return kc_handle_tap( nullptr, casdata );
}
@@ -329,7 +329,7 @@ static const struct CassetteFormat kc_tap_format =
"tap,853,854,855,tp2,kcm",
kc_tap_identify,
kc_tap_load,
- NULL
+ nullptr
};
@@ -349,7 +349,7 @@ static int kc_sss_to_wav_size(const UINT8 *casdata, int caslen)
{
kc_image_size = caslen ;
- return kc_handle_sss( NULL, casdata );
+ return kc_handle_sss( nullptr, casdata );
}
@@ -380,7 +380,7 @@ static const struct CassetteFormat kc_sss_format =
"sss",
kc_sss_identify,
kc_sss_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/kim1_cas.cpp b/src/lib/formats/kim1_cas.cpp
index b8527e10462..db4c4a95a0b 100644
--- a/src/lib/formats/kim1_cas.cpp
+++ b/src/lib/formats/kim1_cas.cpp
@@ -156,7 +156,7 @@ static int kim1_kim_to_wav_size(const UINT8 *casdata, int caslen)
{
cas_size = caslen;
- return kim1_handle_kim( NULL, casdata );
+ return kim1_handle_kim( nullptr, casdata );
}
static const struct CassetteLegacyWaveFiller kim1_kim_legacy_fill_wave =
@@ -188,7 +188,7 @@ static const struct CassetteFormat kim1_kim_format =
"kim,kim1",
kim1_kim_identify,
kim1_kim_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/lviv_lvt.cpp b/src/lib/formats/lviv_lvt.cpp
index ecb1940eb6e..03172f6ac36 100644
--- a/src/lib/formats/lviv_lvt.cpp
+++ b/src/lib/formats/lviv_lvt.cpp
@@ -143,7 +143,7 @@ static const struct CassetteFormat lviv_lvt_image_format =
"lvt,lvr,lv0,lv1,lv2,lv3",
lviv_lvt_identify,
lviv_lvt_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/mbee_cas.cpp b/src/lib/formats/mbee_cas.cpp
index fe0a2ffbc24..58a8f81232a 100644
--- a/src/lib/formats/mbee_cas.cpp
+++ b/src/lib/formats/mbee_cas.cpp
@@ -224,7 +224,7 @@ static int mbee_tap_calculate_size_in_samples(const UINT8 *bytes, int length)
{
mbee_image_size = length;
- return mbee_handle_tap(NULL, bytes);
+ return mbee_handle_tap(nullptr, bytes);
}
static const struct CassetteLegacyWaveFiller mbee_tap_config =
@@ -253,7 +253,7 @@ static const struct CassetteFormat mbee_tap_image_format =
"tap",
mbee_tap_identify,
mbee_tap_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(mbee_cassette_formats)
diff --git a/src/lib/formats/mfi_dsk.cpp b/src/lib/formats/mfi_dsk.cpp
index 043d61b0d3d..b6d0f11e2c7 100644
--- a/src/lib/formats/mfi_dsk.cpp
+++ b/src/lib/formats/mfi_dsk.cpp
@@ -187,8 +187,8 @@ bool mfi_format::save(io_generic *io, floppy_image *image)
int pos = sizeof(header) + (tracks << resolution)*heads*sizeof(entry);
int epos = 0;
- UINT32 *precomp = global_alloc_array(UINT32, max_track_size);
- UINT8 *postcomp = global_alloc_array(UINT8, max_track_size*4 + 1000);
+ auto precomp = global_alloc_array(UINT32, max_track_size);
+ auto postcomp = global_alloc_array(UINT8, max_track_size*4 + 1000);
for(int track=0; track <= (tracks-1) << 2; track += 4 >> resolution)
for(int head=0; head<heads; head++) {
diff --git a/src/lib/formats/mfi_dsk.h b/src/lib/formats/mfi_dsk.h
index c9e26337ca6..dfac913d4c1 100644
--- a/src/lib/formats/mfi_dsk.h
+++ b/src/lib/formats/mfi_dsk.h
@@ -10,14 +10,14 @@ class mfi_format : public floppy_image_format_t
public:
mfi_format();
- virtual int identify(io_generic *io, UINT32 form_factor);
- virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
- virtual bool save(io_generic *io, floppy_image *image);
-
- virtual const char *name() const;
- virtual const char *description() const;
- virtual const char *extensions() const;
- virtual bool supports_save() const;
+ virtual int identify(io_generic *io, UINT32 form_factor) override;
+ virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image) override;
+ virtual bool save(io_generic *io, floppy_image *image) override;
+
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
private:
enum {
diff --git a/src/lib/formats/mz_cas.cpp b/src/lib/formats/mz_cas.cpp
index 154c4ae91c9..3a6b934b882 100644
--- a/src/lib/formats/mz_cas.cpp
+++ b/src/lib/formats/mz_cas.cpp
@@ -306,7 +306,7 @@ static const struct CassetteLegacyWaveFiller mz700_legacy_fill_wave =
fill_wave, /* fill_wave */
1, /* chunk_size */
2 * BYTE_SAMPLES, /* chunk_samples */
- NULL, /* chunk_sample_calc */
+ nullptr, /* chunk_sample_calc */
4400, // sample_frequency (tested ok with MZ-80K, MZ-80A, MZ-700, MZ-800, MZ-1500)
MZ700_WAVESAMPLES_HEADER, /* header_samples */
1 /* trailer_samples */
@@ -333,7 +333,7 @@ static const struct CassetteFormat mz700_cas_format =
"m12,mzf,mzt",
mz700_cas_identify,
mz700_cas_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/nes_dsk.cpp b/src/lib/formats/nes_dsk.cpp
index 5fc263a5f26..f6560d5f053 100644
--- a/src/lib/formats/nes_dsk.cpp
+++ b/src/lib/formats/nes_dsk.cpp
@@ -69,7 +69,7 @@ LEGACY_FLOPPY_OPTIONS_START( nes_only )
"NES floppy disk image",
nes_dsk_identify,
nes_dsk_construct,
- NULL,
- NULL
+ nullptr,
+ nullptr
)
LEGACY_FLOPPY_OPTIONS_END0
diff --git a/src/lib/formats/orao_cas.cpp b/src/lib/formats/orao_cas.cpp
index 9e88119d825..784f9563cc0 100644
--- a/src/lib/formats/orao_cas.cpp
+++ b/src/lib/formats/orao_cas.cpp
@@ -23,7 +23,7 @@ static INT16 wave_data;
static int len;
static void orao_output_wave( INT16 **buffer, int length ) {
- if ( buffer == NULL ) {
+ if ( buffer == nullptr ) {
return;
}
@@ -36,7 +36,7 @@ static int orao_cas_to_wav_size( const UINT8 *casdata, int caslen ) {
int i,j,size;
UINT8 b;
- if (casdata == NULL) return -1;
+ if (casdata == nullptr) return -1;
if (caslen <= ORAO_HEADER_SIZE) {
return -1;
}
@@ -59,7 +59,7 @@ static int orao_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes ) {
int i,j,size;
UINT8 b;
size = 0;
- if (bytes == NULL) return -1;
+ if (bytes == nullptr) return -1;
for (i=ORAO_HEADER_SIZE;i<len-ORAO_HEADER_SIZE;i++) {
for (j=0;j<8;j++) {
b = (bytes[i] >> j) & 1;
@@ -113,7 +113,7 @@ static const struct CassetteFormat orao_cassette_format = {
"tap",
orao_cassette_identify,
orao_cassette_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/oric_tap.cpp b/src/lib/formats/oric_tap.cpp
index 9dbf378db9b..ed2a7841076 100644
--- a/src/lib/formats/oric_tap.cpp
+++ b/src/lib/formats/oric_tap.cpp
@@ -513,7 +513,7 @@ static const struct CassetteFormat oric_tap_format =
"tap",
oric_tap_identify,
oric_tap_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/p6001_cas.cpp b/src/lib/formats/p6001_cas.cpp
index a0ce656e4eb..e91e4b40748 100644
--- a/src/lib/formats/p6001_cas.cpp
+++ b/src/lib/formats/p6001_cas.cpp
@@ -50,7 +50,7 @@ static int pc6001_cas_to_wav_size (const UINT8 *casdata, int caslen)
{
cas_size = caslen*8;
- return pc6001_handle_cas(NULL,casdata);
+ return pc6001_handle_cas(nullptr,casdata);
}
/*******************************************************************
@@ -89,7 +89,7 @@ static const struct CassetteFormat pc6001_cassette_format = {
"cas",
pc6001_cas_identify,
pc6001_cas_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(pc6001_cassette_formats)
diff --git a/src/lib/formats/pasti_dsk.cpp b/src/lib/formats/pasti_dsk.cpp
index 6fa53b2590d..f6ed1556711 100644
--- a/src/lib/formats/pasti_dsk.cpp
+++ b/src/lib/formats/pasti_dsk.cpp
@@ -90,7 +90,7 @@ bool pasti_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
io_generic_read(io, &raw_track[0], pos+16, entry_len-16);
- UINT8 *fuzz = fuzz_len ? &raw_track[16*sect] : 0;
+ UINT8 *fuzz = fuzz_len ? &raw_track[16*sect] : nullptr;
UINT8 *bdata = fuzz ? fuzz+fuzz_len : &raw_track[16*sect];
UINT8 *tdata = bdata;
@@ -105,7 +105,7 @@ bool pasti_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
tsize = tdata[0] | (tdata[1] << 8);
tdata += 2;
} else
- tdata = 0;
+ tdata = nullptr;
if(0) {
printf("Track %2d.%d: el=%d fl=%d sect=%d flags=%04x tlen=%d/%d tnum=%d flags2=%02x sync=%x\n",
@@ -133,7 +133,7 @@ bool pasti_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
int s_flags = sh[14] | (sh[15] << 8);
obs.sectors[s].data = bdata + s_off;
- obs.sectors[s].fuzzy_mask = 0;
+ obs.sectors[s].fuzzy_mask = nullptr;
memcpy(obs.sectors[s].id, sh+8, 6);
obs.sectors[s].time_ratio = s_time ? s_time / 16384.0 : 1;
obs.sectors[s].position = s_pos/8-12;
diff --git a/src/lib/formats/pc_dsk.cpp b/src/lib/formats/pc_dsk.cpp
index 19e0f21e08e..0ab32aff7b3 100644
--- a/src/lib/formats/pc_dsk.cpp
+++ b/src/lib/formats/pc_dsk.cpp
@@ -134,7 +134,7 @@ static FLOPPY_CONSTRUCT(pc_dsk_construct)
/* ----------------------------------------------------------------------- */
LEGACY_FLOPPY_OPTIONS_START( pc )
- LEGACY_FLOPPY_OPTION( pc_dsk, "dsk,ima,img,ufi,360", "PC floppy disk image", pc_dsk_identify, pc_dsk_construct, NULL,
+ LEGACY_FLOPPY_OPTION( pc_dsk, "dsk,ima,img,ufi,360", "PC floppy disk image", pc_dsk_identify, pc_dsk_construct, nullptr,
HEADS([1]-2)
TRACKS(40/[80])
SECTORS(8/[9]/10/15/18/36))
diff --git a/src/lib/formats/phc25_cas.cpp b/src/lib/formats/phc25_cas.cpp
index 1253bd98a3a..73dfdb17ff3 100644
--- a/src/lib/formats/phc25_cas.cpp
+++ b/src/lib/formats/phc25_cas.cpp
@@ -144,7 +144,7 @@ static int phc25_cassette_calculate_size_in_samples(const UINT8 *bytes, int leng
{
phc25_image_size = length;
- return phc25_handle_cassette(NULL, bytes);
+ return phc25_handle_cassette(nullptr, bytes);
}
static const struct CassetteLegacyWaveFiller phc25_legacy_fill_wave =
@@ -173,7 +173,7 @@ static const struct CassetteFormat phc25_cassette_image_format =
"phc",
phc25_cassette_identify,
phc25_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(phc25_cassette_formats)
diff --git a/src/lib/formats/pmd_cas.cpp b/src/lib/formats/pmd_cas.cpp
index ba5baee1a65..4643eaf9251 100644
--- a/src/lib/formats/pmd_cas.cpp
+++ b/src/lib/formats/pmd_cas.cpp
@@ -181,7 +181,7 @@ static int pmd85_cassette_calculate_size_in_samples(const UINT8 *bytes, int leng
{
pmd85_image_size = length;
- return pmd85_handle_cassette(NULL, bytes);
+ return pmd85_handle_cassette(nullptr, bytes);
}
static const struct CassetteLegacyWaveFiller pmd85_legacy_fill_wave =
@@ -210,7 +210,7 @@ static const struct CassetteFormat pmd85_cassette_image_format =
"pmd,tap,ptp",
pmd85_cassette_identify,
pmd85_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(pmd85_cassette_formats)
diff --git a/src/lib/formats/primoptp.cpp b/src/lib/formats/primoptp.cpp
index 635f66d25ac..23aab613c29 100644
--- a/src/lib/formats/primoptp.cpp
+++ b/src/lib/formats/primoptp.cpp
@@ -241,7 +241,7 @@ static const struct CassetteFormat primo_ptp_image_format =
"ptp",
primo_ptp_identify,
primo_ptp_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(primo_ptp_format)
diff --git a/src/lib/formats/rk_cas.cpp b/src/lib/formats/rk_cas.cpp
index 03139e1515d..968b8afdc23 100644
--- a/src/lib/formats/rk_cas.cpp
+++ b/src/lib/formats/rk_cas.cpp
@@ -217,63 +217,63 @@ static const struct CassetteFormat rku_cassette_format = {
"rku",
rk20_cassette_identify,
rk20_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat rk8_cassette_format = {
"rk8",
rk60_cassette_identify,
rk60_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat rks_cassette_format = {
"rks",
rk20_cassette_identify,
rk20_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat rko_cassette_format = {
"rko",
rk20_cassette_identify,
rk20_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat rkr_cassette_format = {
"rk,rkr",
rk20_cassette_identify,
rk20_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat rka_cassette_format = {
"rka",
rk20_cassette_identify,
rk20_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat rkm_cassette_format = {
"rkm",
rk22_cassette_identify,
rk22_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat rkp_cassette_format = {
"rkp",
rk20_cassette_identify,
rk20_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat gam_cassette_format = {
"gam,g16,pki",
gam_cassette_identify,
gam_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(rku_cassette_formats)
diff --git a/src/lib/formats/sc3000_bit.cpp b/src/lib/formats/sc3000_bit.cpp
index 2b5fd635db5..f15488bda68 100644
--- a/src/lib/formats/sc3000_bit.cpp
+++ b/src/lib/formats/sc3000_bit.cpp
@@ -98,7 +98,7 @@ const struct CassetteFormat sc3000_bit_format =
"bit",
sc3000_bit_identify,
sc3000_bit_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START( sc3000_cassette_formats )
diff --git a/src/lib/formats/sol_cas.cpp b/src/lib/formats/sol_cas.cpp
index 26f1bdccf00..1f22cd68a9f 100644
--- a/src/lib/formats/sol_cas.cpp
+++ b/src/lib/formats/sol_cas.cpp
@@ -342,7 +342,7 @@ static int sol20_cassette_calculate_size_in_samples(const UINT8 *bytes, int leng
{
sol20_image_size = length;
- return sol20_handle_cassette(NULL, bytes);
+ return sol20_handle_cassette(nullptr, bytes);
}
static const struct CassetteLegacyWaveFiller sol20_legacy_fill_wave =
@@ -371,7 +371,7 @@ static const struct CassetteFormat sol20_cassette_image_format =
"svt",
sol20_cassette_identify,
sol20_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(sol20_cassette_formats)
diff --git a/src/lib/formats/sorc_cas.cpp b/src/lib/formats/sorc_cas.cpp
index 6983dd0ba74..a900f77d5e5 100644
--- a/src/lib/formats/sorc_cas.cpp
+++ b/src/lib/formats/sorc_cas.cpp
@@ -121,7 +121,7 @@ static int sorcerer_cassette_calculate_size_in_samples(const UINT8 *bytes, int l
{
sorcerer_image_size = length;
- return sorcerer_handle_cassette(NULL, bytes);
+ return sorcerer_handle_cassette(nullptr, bytes);
}
static const struct CassetteLegacyWaveFiller sorcerer_legacy_fill_wave =
@@ -150,7 +150,7 @@ static const struct CassetteFormat sorcerer_cassette_image_format =
"tape",
sorcerer_cassette_identify,
sorcerer_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(sorcerer_cassette_formats)
diff --git a/src/lib/formats/sorc_dsk.cpp b/src/lib/formats/sorc_dsk.cpp
index 5e59d30cdb1..27dc4270f05 100644
--- a/src/lib/formats/sorc_dsk.cpp
+++ b/src/lib/formats/sorc_dsk.cpp
@@ -107,7 +107,7 @@ static floperr_t sorc_write_indexed_sector(floppy_image_legacy *floppy, int head
static floperr_t sorc_get_sector_length(floppy_image_legacy *floppy, int head, int track, int sector, UINT32 *sector_length)
{
floperr_t err;
- err = get_offset(floppy, head, track, sector, FALSE, NULL);
+ err = get_offset(floppy, head, track, sector, FALSE, nullptr);
if (err)
return err;
@@ -156,5 +156,5 @@ static FLOPPY_CONSTRUCT(sorc_dsk_construct)
/* ----------------------------------------------------------------------- */
LEGACY_FLOPPY_OPTIONS_START( sorcerer )
- LEGACY_FLOPPY_OPTION( sorc_dsk, "dsk", "Exidy Sorcerer floppy disk image", sorc_dsk_identify, sorc_dsk_construct, NULL, NULL)
+ LEGACY_FLOPPY_OPTION( sorc_dsk, "dsk", "Exidy Sorcerer floppy disk image", sorc_dsk_identify, sorc_dsk_construct, nullptr, nullptr)
LEGACY_FLOPPY_OPTIONS_END
diff --git a/src/lib/formats/sord_cas.cpp b/src/lib/formats/sord_cas.cpp
index eb8a27bdba4..39de0fbca84 100644
--- a/src/lib/formats/sord_cas.cpp
+++ b/src/lib/formats/sord_cas.cpp
@@ -133,7 +133,7 @@ static const struct CassetteFormat sordm5_cas_format =
"cas",
sordm5_tap_identify,
sordm5_tap_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(sordm5_cassette_formats)
diff --git a/src/lib/formats/spc1000_cas.cpp b/src/lib/formats/spc1000_cas.cpp
index b05844b6ee7..3c86305e8a8 100644
--- a/src/lib/formats/spc1000_cas.cpp
+++ b/src/lib/formats/spc1000_cas.cpp
@@ -108,14 +108,14 @@ static int spc1000_tap_calculate_size_in_samples(const UINT8 *bytes, int length)
{
spc1000_image_size = length;
- return spc1000_handle_tap(NULL, bytes);
+ return spc1000_handle_tap(nullptr, bytes);
}
static int spc1000_cas_calculate_size_in_samples(const UINT8 *bytes, int length)
{
spc1000_image_size = length;
- return spc1000_handle_cas(NULL, bytes);
+ return spc1000_handle_cas(nullptr, bytes);
}
@@ -151,7 +151,7 @@ static const struct CassetteFormat spc1000_tap_cassette_image_format =
"tap",
spc1000_tap_cassette_identify,
spc1000_tap_cassette_load,
- NULL
+ nullptr
};
@@ -182,7 +182,7 @@ static const struct CassetteFormat spc1000_cas_cassette_image_format =
"cas",
spc1000_cas_cassette_identify,
spc1000_cas_cassette_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/svi_cas.cpp b/src/lib/formats/svi_cas.cpp
index dd2bde8d5a1..a95c3b97fb5 100644
--- a/src/lib/formats/svi_cas.cpp
+++ b/src/lib/formats/svi_cas.cpp
@@ -203,7 +203,7 @@ static const struct CassetteFormat svi_cas_format =
"cas",
svi_cas_identify,
svi_cas_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/td0_dsk.cpp b/src/lib/formats/td0_dsk.cpp
index 185bb21cfed..600a6868a4e 100644
--- a/src/lib/formats/td0_dsk.cpp
+++ b/src/lib/formats/td0_dsk.cpp
@@ -298,7 +298,7 @@ static floperr_t td0_read_indexed_sector(floppy_image_legacy *floppy, int head,
static floperr_t td0_get_sector_length(floppy_image_legacy *floppy, int head, int track, int sector, UINT32 *sector_length)
{
floperr_t err;
- err = get_offset(floppy, head, track, sector, FALSE, NULL);
+ err = get_offset(floppy, head, track, sector, FALSE, nullptr);
if (err)
return err;
@@ -699,7 +699,7 @@ FLOPPY_CONSTRUCT( td0_dsk_construct )
return FLOPPY_ERROR_OUTOFMEMORY;
tag->data = (UINT8*)malloc(floppy_image_size(floppy));
- if (tag->data==NULL) {
+ if (tag->data==nullptr) {
return FLOPPY_ERROR_OUTOFMEMORY;
}
floppy_image_read(floppy, tag->data, 0, floppy_image_size(floppy));
@@ -720,7 +720,7 @@ FLOPPY_CONSTRUCT( td0_dsk_construct )
memcpy(obuf,tag->data,12);
free(tag->data);
tag->data = (UINT8*)malloc(size+12);
- if (tag->data==NULL) {
+ if (tag->data==nullptr) {
return FLOPPY_ERROR_OUTOFMEMORY;
}
memcpy(tag->data,obuf,12);
@@ -786,7 +786,7 @@ FLOPPY_DESTRUCT( td0_dsk_destruct )
{
struct td0dsk_tag *tag = get_tag(floppy);
free(tag->data);
- tag->data = NULL;
+ tag->data = nullptr;
return FLOPPY_ERROR_SUCCESS;
}
@@ -999,7 +999,7 @@ bool td0_format::load(io_generic *io, UINT32 form_factor, floppy_image *image)
sdatapos += size;
}
else
- sects[i].data = NULL;
+ sects[i].data = nullptr;
}
track_count = track;
diff --git a/src/lib/formats/td0_dsk.h b/src/lib/formats/td0_dsk.h
index a714d1d9e1c..eae873e30e0 100644
--- a/src/lib/formats/td0_dsk.h
+++ b/src/lib/formats/td0_dsk.h
@@ -11,14 +11,14 @@ class td0_format : public floppy_image_format_t
public:
td0_format();
- virtual int identify(io_generic *io, UINT32 form_factor);
- virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image);
- virtual bool save(io_generic *io, floppy_image *image);
+ virtual int identify(io_generic *io, UINT32 form_factor) override;
+ virtual bool load(io_generic *io, UINT32 form_factor, floppy_image *image) override;
+ virtual bool save(io_generic *io, floppy_image *image) override;
- virtual const char *name() const;
- virtual const char *description() const;
- virtual const char *extensions() const;
- virtual bool supports_save() const;
+ virtual const char *name() const override;
+ virtual const char *description() const override;
+ virtual const char *extensions() const override;
+ virtual bool supports_save() const override;
};
extern const floppy_format_type FLOPPY_TD0_FORMAT;
diff --git a/src/lib/formats/thom_cas.cpp b/src/lib/formats/thom_cas.cpp
index 9fd6d6f0208..799e96c38ca 100644
--- a/src/lib/formats/thom_cas.cpp
+++ b/src/lib/formats/thom_cas.cpp
@@ -119,7 +119,7 @@ static casserr_t to7_k7_load( cassette_image *cass )
if ( to7_k7_bits )
{
free( to7_k7_bits );
- to7_k7_bits = NULL;
+ to7_k7_bits = nullptr;
}
to7_k7_bitsize = 0;
@@ -366,7 +366,7 @@ static casserr_t to7_k7_load( cassette_image *cass )
static const struct CassetteFormat to7_k7 =
-{ "k7", to7_k7_identify, to7_k7_load, NULL /* no save */ };
+{ "k7", to7_k7_identify, to7_k7_load, nullptr /* no save */ };
@@ -392,7 +392,7 @@ static casserr_t to7_wav_load ( cassette_image *cass )
if ( to7_k7_bits )
{
free( to7_k7_bits );
- to7_k7_bits = NULL;
+ to7_k7_bits = nullptr;
}
if ( e != CASSETTE_ERROR_SUCCESS )
@@ -730,7 +730,7 @@ static casserr_t mo5_k5_load( cassette_image *cass )
static const struct CassetteFormat mo5_k5 =
-{ "k5,k7", mo5_k5_identify, mo5_k5_load, NULL /* no save */ };
+{ "k5,k7", mo5_k5_identify, mo5_k5_load, nullptr /* no save */ };
/********************* MO5 WAV format ************************/
@@ -781,8 +781,8 @@ static const struct CassetteFormat mo5_wav =
const struct CassetteFormat *const to7_cassette_formats[] =
-{ &to7_wav, &to7_k7, NULL };
+{ &to7_wav, &to7_k7, nullptr };
const struct CassetteFormat *const mo5_cassette_formats[] =
-{ &mo5_wav, &mo5_k5, NULL };
+{ &mo5_wav, &mo5_k5, nullptr };
diff --git a/src/lib/formats/thom_dsk.cpp b/src/lib/formats/thom_dsk.cpp
index ed9d977b723..da7187d65f8 100644
--- a/src/lib/formats/thom_dsk.cpp
+++ b/src/lib/formats/thom_dsk.cpp
@@ -175,7 +175,7 @@ static floperr_t sap_write_indexed_sector(floppy_image_legacy *floppy, int head,
static floperr_t sap_get_sector_length(floppy_image_legacy *floppy, int head, int track, int sector, UINT32 *sector_length)
{
floperr_t err;
- err = get_offset(floppy, head, track, sector, FALSE, NULL);
+ err = get_offset(floppy, head, track, sector, FALSE, nullptr);
if (err)
return err;
@@ -353,37 +353,37 @@ static FLOPPY_CONSTRUCT(qdd_dsk_construct)
LEGACY_FLOPPY_OPTIONS_START(thomson)
- LEGACY_FLOPPY_OPTION(fdmfm2, "fd", "Thomson FD (MFM) 80 tracks disk image (3\"1/2 DD)", basicdsk_identify_default, basicdsk_construct_default, NULL,
+ LEGACY_FLOPPY_OPTION(fdmfm2, "fd", "Thomson FD (MFM) 80 tracks disk image (3\"1/2 DD)", basicdsk_identify_default, basicdsk_construct_default, nullptr,
HEADS([1])
TRACKS([80])
SECTORS([16])
SECTOR_LENGTH([256])
FIRST_SECTOR_ID([1]))
- LEGACY_FLOPPY_OPTION(fdmfm, "fd", "Thomson FD (MFM) 40 tracks disk image (5\"1/4 DD)", basicdsk_identify_default, basicdsk_construct_default, NULL,
+ LEGACY_FLOPPY_OPTION(fdmfm, "fd", "Thomson FD (MFM) 40 tracks disk image (5\"1/4 DD)", basicdsk_identify_default, basicdsk_construct_default, nullptr,
HEADS([1])
TRACKS([40])
SECTORS([16])
SECTOR_LENGTH([256])
FIRST_SECTOR_ID([1]))
- LEGACY_FLOPPY_OPTION(fd2, "fd", "Thomson FD (FM) 80 tracks disk image (3\"1/2 SD)", basicdsk_identify_default, basicdsk_construct_default, NULL,
+ LEGACY_FLOPPY_OPTION(fd2, "fd", "Thomson FD (FM) 80 tracks disk image (3\"1/2 SD)", basicdsk_identify_default, basicdsk_construct_default, nullptr,
HEADS([1])
TRACKS([80])
SECTORS([16])
SECTOR_LENGTH([128])
FIRST_SECTOR_ID([1]))
- LEGACY_FLOPPY_OPTION(fd, "fd", "Thomson FD (FM) 40 tracks disk image (5\"1/4 SD)", basicdsk_identify_default, basicdsk_construct_default, NULL,
+ LEGACY_FLOPPY_OPTION(fd, "fd", "Thomson FD (FM) 40 tracks disk image (5\"1/4 SD)", basicdsk_identify_default, basicdsk_construct_default, nullptr,
HEADS([1])
TRACKS([40])
SECTORS([16])
SECTOR_LENGTH([128])
FIRST_SECTOR_ID([1]))
- LEGACY_FLOPPY_OPTION(sap,"sap", "Thomson SAP floppy disk image", sap_dsk_identify, sap_dsk_construct, NULL, NULL)
+ LEGACY_FLOPPY_OPTION(sap,"sap", "Thomson SAP floppy disk image", sap_dsk_identify, sap_dsk_construct, nullptr, nullptr)
- LEGACY_FLOPPY_OPTION(qdd,"qd", "Thomson QDD floppy disk image (2\"8 SD)", qdd_dsk_identify, qdd_dsk_construct, NULL,
+ LEGACY_FLOPPY_OPTION(qdd,"qd", "Thomson QDD floppy disk image (2\"8 SD)", qdd_dsk_identify, qdd_dsk_construct, nullptr,
HEADS([1])
TRACKS([1])
SECTORS([400])
diff --git a/src/lib/formats/trs_cas.cpp b/src/lib/formats/trs_cas.cpp
index a4f748dea05..5e205348768 100644
--- a/src/lib/formats/trs_cas.cpp
+++ b/src/lib/formats/trs_cas.cpp
@@ -96,7 +96,7 @@ static int trs80l2_cas_to_wav_size(const UINT8 *casdata, int caslen)
{
cas_size = caslen;
- return trs80l2_handle_cas( NULL, casdata );
+ return trs80l2_handle_cas( nullptr, casdata );
}
static const struct CassetteLegacyWaveFiller trs80l2_cas_legacy_fill_wave =
@@ -128,7 +128,7 @@ static const struct CassetteFormat trs80l2_cas_format =
"cas",
trs80l2_cas_identify,
trs80l2_cas_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/tvc_cas.cpp b/src/lib/formats/tvc_cas.cpp
index a33fba687b9..7dad5dac819 100644
--- a/src/lib/formats/tvc_cas.cpp
+++ b/src/lib/formats/tvc_cas.cpp
@@ -221,7 +221,7 @@ static const struct CassetteFormat tvc64_cassette_image_format =
"cas",
tvc64_cassette_identify,
tvc64_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(tvc64_cassette_formats)
diff --git a/src/lib/formats/tzx_cas.cpp b/src/lib/formats/tzx_cas.cpp
index e210afff8b7..498de384e53 100644
--- a/src/lib/formats/tzx_cas.cpp
+++ b/src/lib/formats/tzx_cas.cpp
@@ -66,7 +66,7 @@ static const UINT8 TZX_HEADER[8] = { 'Z','X','T','a','p','e','!',0x1a };
static INT16 wave_data = 0;
static int block_count = 0;
-static UINT8** blocks = NULL;
+static UINT8** blocks = nullptr;
static float t_scale = 1; /* for scaling T-states to the 4MHz CPC */
static void toggle_wave_data(void)
@@ -219,7 +219,7 @@ INLINE int tcycles_to_samplecount( int tcycles )
static void tzx_output_wave( INT16 **buffer, int length )
{
- if (buffer == NULL)
+ if (buffer == nullptr)
{
return;
}
@@ -805,7 +805,7 @@ static int tzx_cas_to_wav_size( const UINT8 *casdata, int caslen )
goto cleanup;
}
- size = tzx_cas_do_work(NULL);
+ size = tzx_cas_do_work(nullptr);
return size;
@@ -843,7 +843,7 @@ static int tap_cas_to_wav_size( const UINT8 *casdata, int caslen )
// int pilot_length = (p[2] == 0x00) ? 8063 : 3223; /* worldofspectrum */
LOG_FORMATS("tap_cas_to_wav_size: Handling TAP block containing 0x%X bytes", data_size);
p += 2;
- size += tzx_cas_handle_block(NULL, p, 1000, data_size, 2168, pilot_length, 667, 735, 855, 1710, 8);
+ size += tzx_cas_handle_block(nullptr, p, 1000, data_size, 2168, pilot_length, 667, 735, 855, 1710, 8);
LOG_FORMATS(", total size is now: %d\n", size);
p += data_size;
}
@@ -936,7 +936,7 @@ static const struct CassetteFormat tzx_cassette_format =
"tzx",
tzx_cassette_identify,
tzx_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat tap_cassette_format =
@@ -944,7 +944,7 @@ static const struct CassetteFormat tap_cassette_format =
"tap,blk",
tap_cassette_identify,
tap_cassette_load,
- NULL
+ nullptr
};
static const struct CassetteFormat cdt_cassette_format =
@@ -952,7 +952,7 @@ static const struct CassetteFormat cdt_cassette_format =
"cdt",
cdt_cassette_identify,
cdt_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(tzx_cassette_formats)
diff --git a/src/lib/formats/uef_cas.cpp b/src/lib/formats/uef_cas.cpp
index f078ae776c4..6db1716348b 100644
--- a/src/lib/formats/uef_cas.cpp
+++ b/src/lib/formats/uef_cas.cpp
@@ -50,7 +50,7 @@ static const UINT8* skip_gz_header( const UINT8 *p ) {
method = *p; p++;
flags = *p; p++;
if ( method != Z_DEFLATED || ( flags & RESERVED ) != 0 ) {
- return NULL;
+ return nullptr;
}
/* Skip time, xflags and OS code */
p += 6;
@@ -75,7 +75,7 @@ static const UINT8* skip_gz_header( const UINT8 *p ) {
return p;
}
-static UINT8 *gz_ptr = NULL;
+static UINT8 *gz_ptr = nullptr;
static float get_uef_float( const UINT8 *Float)
{
@@ -114,14 +114,14 @@ static int uef_cas_to_wav_size( const UINT8 *casdata, int caslen ) {
int inflate_size = ( casdata[ caslen - 1 ] << 24 ) | ( casdata[ caslen - 2 ] << 16 ) | ( casdata[ caslen - 3 ] << 8 ) | casdata[ caslen - 4 ];
const UINT8 *in_ptr = skip_gz_header( casdata );
- if ( in_ptr == NULL ) {
+ if ( in_ptr == nullptr ) {
goto cleanup;
}
gz_ptr = (UINT8 *)malloc( inflate_size );
- d_stream.zalloc = 0;
- d_stream.zfree = 0;
- d_stream.opaque = 0;
+ d_stream.zalloc = nullptr;
+ d_stream.zfree = nullptr;
+ d_stream.opaque = nullptr;
d_stream.next_in = (unsigned char *)in_ptr;
d_stream.avail_in = caslen - ( in_ptr - casdata );
d_stream.next_out = gz_ptr;
@@ -207,7 +207,7 @@ static int uef_cas_to_wav_size( const UINT8 *casdata, int caslen ) {
cleanup:
if ( gz_ptr ) {
free( gz_ptr );
- gz_ptr = NULL;
+ gz_ptr = nullptr;
}
return -1;
}
@@ -232,7 +232,7 @@ static int uef_cas_fill_wave( INT16 *buffer, int length, UINT8 *bytes ) {
INT16 *p = buffer;
if ( bytes[0] == 0x1f && bytes[1] == 0x8b ) {
- if ( gz_ptr == NULL ) {
+ if ( gz_ptr == nullptr ) {
return 1;
}
bytes = gz_ptr;
@@ -327,7 +327,7 @@ const struct CassetteFormat uef_cassette_format = {
"uef",
uef_cassette_identify,
uef_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(uef_cassette_formats)
diff --git a/src/lib/formats/vg5k_cas.cpp b/src/lib/formats/vg5k_cas.cpp
index ef648707fd8..6c10112ab30 100644
--- a/src/lib/formats/vg5k_cas.cpp
+++ b/src/lib/formats/vg5k_cas.cpp
@@ -196,7 +196,7 @@ static int vg5k_k7_to_wav_size(const UINT8 *casdata, int caslen)
{
k7_size = caslen ;
- return vg5k_handle_tap( NULL, casdata );
+ return vg5k_handle_tap( nullptr, casdata );
}
@@ -228,7 +228,7 @@ static const struct CassetteFormat vg5k_k7_format =
"k7",
vg5k_k7_identify,
vg5k_k7_load,
- NULL
+ nullptr
};
diff --git a/src/lib/formats/vt_cas.cpp b/src/lib/formats/vt_cas.cpp
index d0910efcc84..91e5f69ba64 100644
--- a/src/lib/formats/vt_cas.cpp
+++ b/src/lib/formats/vt_cas.cpp
@@ -102,7 +102,7 @@ static const struct CassetteLegacyWaveFiller vtech1_legacy_fill_wave =
vtech1_cassette_fill_wave, /* fill_wave */
1, /* chunk_size */
V1_BYTESAMPLES, /* chunk_samples */
- NULL, /* chunk_sample_calc */
+ nullptr, /* chunk_sample_calc */
600*V1_BITSAMPLES, /* sample_frequency */
600*V1_BITSAMPLES, /* header_samples */
600*V1_BITSAMPLES /* trailer_samples */
@@ -123,7 +123,7 @@ static const struct CassetteFormat vtech1_cas_format =
"cas",
vtech1_cas_identify,
vtech1_cas_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(vtech1_cassette_formats)
@@ -197,7 +197,7 @@ static const struct CassetteLegacyWaveFiller vtech2_legacy_fill_wave =
vtech2_cassette_fill_wave, /* fill_wave */
1, /* chunk_size */
VT2_BYTESAMPLES, /* chunk_samples */
- NULL, /* chunk_sample_calc */
+ nullptr, /* chunk_sample_calc */
600*VT2_BITSAMPLES, /* sample_frequency */
600*VT2_BITSAMPLES, /* header_samples */
600*VT2_BITSAMPLES /* trailer_samples */
@@ -218,7 +218,7 @@ static const struct CassetteFormat vtech2_cas_format =
"cas",
vtech2_cas_identify,
vtech2_cas_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(vtech2_cassette_formats)
diff --git a/src/lib/formats/x07_cas.cpp b/src/lib/formats/x07_cas.cpp
index 54f46acd488..0c36ad7c3e8 100644
--- a/src/lib/formats/x07_cas.cpp
+++ b/src/lib/formats/x07_cas.cpp
@@ -137,7 +137,7 @@ static int x07_cassette_calculate_size_in_samples(const UINT8 *bytes, int length
{
x07_image_size = length;
- return x07_handle_cassette(NULL, bytes);
+ return x07_handle_cassette(nullptr, bytes);
}
static const struct CassetteLegacyWaveFiller x07_legacy_fill_wave =
@@ -166,7 +166,7 @@ static const struct CassetteFormat x07_cassette_image_format =
"k7,lst,cas",
x07_cassette_identify,
x07_cassette_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(x07_cassette_formats)
diff --git a/src/lib/formats/x1_tap.cpp b/src/lib/formats/x1_tap.cpp
index 5cf6f9fef94..f66ca7d4431 100644
--- a/src/lib/formats/x1_tap.cpp
+++ b/src/lib/formats/x1_tap.cpp
@@ -131,7 +131,7 @@ static const struct CassetteFormat x1_cassette_format = {
"tap",
x1_cas_identify,
x1_cas_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(x1_cassette_formats)
diff --git a/src/lib/formats/zx81_p.cpp b/src/lib/formats/zx81_p.cpp
index 9a556f05ce5..5e6af375468 100644
--- a/src/lib/formats/zx81_p.cpp
+++ b/src/lib/formats/zx81_p.cpp
@@ -226,7 +226,7 @@ static const struct CassetteFormat zx81_p_image_format =
"p,81",
zx81_p_identify,
zx81_p_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(zx81_p_format)
@@ -289,7 +289,7 @@ static const struct CassetteFormat zx80_o_image_format =
"o,80",
zx80_o_identify,
zx80_o_load,
- NULL
+ nullptr
};
CASSETTE_FORMATLIST_START(zx80_o_format)
diff --git a/src/lib/util/avhuff.cpp b/src/lib/util/avhuff.cpp
index b9b9057193c..277f056c7ad 100644
--- a/src/lib/util/avhuff.cpp
+++ b/src/lib/util/avhuff.cpp
@@ -754,7 +754,7 @@ avhuff_error avhuff_decoder::decode_data(const UINT8 *source, UINT32 complength,
// if we are decoding raw, set up the output parameters
UINT8 *metastart, *videostart, *audiostart[16];
UINT32 audioxor, videoxor, videostride;
- if (dest != NULL)
+ if (dest != nullptr)
{
// create a header
dest[0] = 'c';
@@ -793,7 +793,7 @@ avhuff_error avhuff_decoder::decode_data(const UINT8 *source, UINT32 complength,
metastart = m_config.metadata;
for (int chnum = 0; chnum < channels; chnum++)
audiostart[chnum] = (UINT8 *)m_config.audio[chnum];
- videostart = (m_config.video.valid()) ? reinterpret_cast<UINT8 *>(&m_config.video.pix(0)) : NULL;
+ videostart = (m_config.video.valid()) ? reinterpret_cast<UINT8 *>(&m_config.video.pix(0)) : nullptr;
videostride = (m_config.video.valid()) ? m_config.video.rowpixels() * 2 : 0;
// data is assumed to be native-endian
@@ -805,22 +805,22 @@ avhuff_error avhuff_decoder::decode_data(const UINT8 *source, UINT32 complength,
if (m_config.video.valid() && (m_config.video.width() < width || m_config.video.height() < height))
return AVHERR_VIDEO_TOO_LARGE;
for (int chnum = 0; chnum < channels; chnum++)
- if (m_config.audio[chnum] != NULL && m_config.maxsamples < samples)
+ if (m_config.audio[chnum] != nullptr && m_config.maxsamples < samples)
return AVHERR_AUDIO_TOO_LARGE;
- if (m_config.metadata != NULL && m_config.maxmetalength < metasize)
+ if (m_config.metadata != nullptr && m_config.maxmetalength < metasize)
return AVHERR_METADATA_TOO_LARGE;
// set the output values
- if (m_config.actsamples != NULL)
+ if (m_config.actsamples != nullptr)
*m_config.actsamples = samples;
- if (m_config.actmetalength != NULL)
+ if (m_config.actmetalength != nullptr)
*m_config.actmetalength = metasize;
}
// copy the metadata first
if (metasize > 0)
{
- if (metastart != NULL)
+ if (metastart != nullptr)
memcpy(metastart, source + srcoffs, metasize);
srcoffs += metasize;
}
@@ -842,7 +842,7 @@ avhuff_error avhuff_decoder::decode_data(const UINT8 *source, UINT32 complength,
}
// decode the video data
- if (width > 0 && height > 0 && videostart != NULL)
+ if (width > 0 && height > 0 && videostart != nullptr)
{
// decode the video
avhuff_error err = decode_video(width, height, source + srcoffs, complength - srcoffs, videostart, videostride, videoxor);
@@ -897,7 +897,7 @@ avhuff_error avhuff_decoder::decode_audio(int channels, int samples, const UINT8
// only process if the data is requested
UINT8 *curdest = dest[chnum];
- if (curdest != NULL)
+ if (curdest != nullptr)
{
// reset and decode
if (!m_flac_decoder.reset(48000, 1, samples, source, size))
@@ -941,7 +941,7 @@ avhuff_error avhuff_decoder::decode_audio(int channels, int samples, const UINT8
// only process if the data is requested
UINT8 *curdest = dest[chnum];
- if (curdest != NULL)
+ if (curdest != nullptr)
{
INT16 prevsample = 0;
diff --git a/src/lib/util/avhuff.h b/src/lib/util/avhuff.h
index 26873292fdc..cdaa3ec5f3a 100644
--- a/src/lib/util/avhuff.h
+++ b/src/lib/util/avhuff.h
@@ -57,10 +57,10 @@ class avhuff_decompress_config
public:
avhuff_decompress_config()
: maxsamples(0),
- actsamples(NULL),
+ actsamples(nullptr),
maxmetalength(0),
- actmetalength(NULL),
- metadata(NULL)
+ actmetalength(nullptr),
+ metadata(nullptr)
{
memset(audio, 0, sizeof(audio));
}
@@ -90,7 +90,7 @@ public:
// static helpers
static UINT32 raw_data_size(const UINT8 *data);
static UINT32 raw_data_size(UINT32 width, UINT32 height, UINT8 channels, UINT32 numsamples, UINT32 metadatasize = 0) { return 12 + channels * numsamples * 2 + width * height * 2; }
- static avhuff_error assemble_data(dynamic_buffer &buffer, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata = NULL, UINT32 metadatasize = 0);
+ static avhuff_error assemble_data(dynamic_buffer &buffer, bitmap_yuy16 &bitmap, UINT8 channels, UINT32 numsamples, INT16 **samples, UINT8 *metadata = nullptr, UINT32 metadatasize = 0);
private:
// delta-RLE Huffman encoder
diff --git a/src/lib/util/aviio.cpp b/src/lib/util/aviio.cpp
index 06b603e0e31..95d96ca6422 100644
--- a/src/lib/util/aviio.cpp
+++ b/src/lib/util/aviio.cpp
@@ -626,7 +626,7 @@ INLINE avi_stream *get_video_stream(avi_file *file)
if (file->stream[streamnum].type == STREAMTYPE_VIDS)
return &file->stream[streamnum];
- return NULL;
+ return nullptr;
}
@@ -657,14 +657,14 @@ INLINE avi_stream *get_audio_stream(avi_file *file, int channel, int *offset)
{
if (channel < file->stream[streamnum].channels)
{
- if (offset != NULL)
+ if (offset != nullptr)
*offset = channel;
return &file->stream[streamnum];
}
channel -= file->stream[streamnum].channels;
}
- return NULL;
+ return nullptr;
}
@@ -693,9 +693,9 @@ INLINE avi_error set_stream_chunk_info(avi_stream *stream, UINT32 index, UINT64
{
UINT32 newcount = MAX(index, stream->chunksalloc + 1000);
avi_chunk_list *newchunks = (avi_chunk_list *)malloc(newcount * sizeof(stream->chunk[0]));
- if (newchunks == NULL)
+ if (newchunks == nullptr)
return AVIERR_NO_MEMORY;
- if (stream->chunk != NULL)
+ if (stream->chunk != nullptr)
{
memcpy(newchunks, stream->chunk, stream->chunksalloc * sizeof(stream->chunk[0]));
free(stream->chunk);
@@ -818,9 +818,9 @@ INLINE avi_error expand_tempbuffer(avi_file *file, UINT32 length)
{
file->tempbuffersize = 2 * length;
UINT8 *newbuffer = (UINT8 *)malloc(file->tempbuffersize);
- if (newbuffer == NULL)
+ if (newbuffer == nullptr)
return AVIERR_NO_MEMORY;
- if (file->tempbuffer != NULL)
+ if (file->tempbuffer != nullptr)
free(file->tempbuffer);
file->tempbuffer = newbuffer;
}
@@ -850,14 +850,14 @@ INLINE avi_error expand_tempbuffer(avi_file *file, UINT32 length)
avi_error avi_open(const char *filename, avi_file **file)
{
- avi_file *newfile = NULL;
+ avi_file *newfile = nullptr;
file_error filerr;
avi_error avierr;
UINT64 length;
/* allocate the file */
newfile = (avi_file *)malloc(sizeof(*newfile));
- if (newfile == NULL)
+ if (newfile == nullptr)
return AVIERR_NO_MEMORY;
memset(newfile, 0, sizeof(*newfile));
newfile->type = FILETYPE_READ;
@@ -886,9 +886,9 @@ avi_error avi_open(const char *filename, avi_file **file)
error:
/* clean up after an error */
- if (newfile != NULL)
+ if (newfile != nullptr)
{
- if (newfile->file != NULL)
+ if (newfile->file != nullptr)
osd_close(newfile->file);
free(newfile);
}
@@ -914,7 +914,7 @@ error:
avi_error avi_create(const char *filename, const avi_movie_info *info, avi_file **file)
{
- avi_file *newfile = NULL;
+ avi_file *newfile = nullptr;
file_error filerr;
avi_stream *stream;
avi_error avierr;
@@ -935,7 +935,7 @@ avi_error avi_create(const char *filename, const avi_movie_info *info, avi_file
/* allocate the file */
newfile = (avi_file *)malloc(sizeof(*newfile));
- if (newfile == NULL)
+ if (newfile == nullptr)
return AVIERR_NO_MEMORY;
memset(newfile, 0, sizeof(*newfile));
newfile->type = FILETYPE_CREATE;
@@ -955,7 +955,7 @@ avi_error avi_create(const char *filename, const avi_movie_info *info, avi_file
/* allocate two streams */
newfile->stream = (avi_stream *)malloc(2 * sizeof(newfile->stream[0]));
- if (newfile->stream == NULL)
+ if (newfile->stream == nullptr)
{
avierr = AVIERR_NO_MEMORY;
goto error;
@@ -1000,11 +1000,11 @@ avi_error avi_create(const char *filename, const avi_movie_info *info, avi_file
error:
/* clean up after an error */
- if (newfile != NULL)
+ if (newfile != nullptr)
{
- if (newfile->stream != NULL)
+ if (newfile->stream != nullptr)
free(newfile->stream);
- if (newfile->file != NULL)
+ if (newfile->file != nullptr)
{
osd_close(newfile->file);
osd_rmfile(filename);
@@ -1073,26 +1073,26 @@ avi_error avi_close(avi_file *file)
for (strnum = 0; strnum < file->streams; strnum++)
{
avi_stream *stream = &file->stream[strnum];
- if (stream->huffyuv != NULL)
+ if (stream->huffyuv != nullptr)
{
huffyuv_data *huffyuv = stream->huffyuv;
int table;
for (table = 0; table < ARRAY_LENGTH(huffyuv->table); table++)
- if (huffyuv->table[table].extralookup != NULL)
+ if (huffyuv->table[table].extralookup != nullptr)
free(huffyuv->table[table].extralookup);
free(huffyuv);
}
- if (stream->chunk != NULL)
+ if (stream->chunk != nullptr)
free(stream->chunk);
}
/* free the file itself */
- if (file->soundbuf != NULL)
+ if (file->soundbuf != nullptr)
free(file->soundbuf);
- if (file->stream != NULL)
+ if (file->stream != nullptr)
free(file->stream);
- if (file->tempbuffer != NULL)
+ if (file->tempbuffer != nullptr)
free(file->tempbuffer);
free(file);
return avierr;
@@ -1228,7 +1228,7 @@ avi_error avi_read_video_frame(avi_file *file, UINT32 framenum, bitmap_yuy16 &bi
/* get the video stream */
stream = get_video_stream(file);
- if (stream == NULL)
+ if (stream == nullptr)
return AVIERR_INVALID_STREAM;
/* validate our ability to handle the data */
@@ -1301,7 +1301,7 @@ avi_error avi_read_sound_samples(avi_file *file, int channel, UINT32 firstsample
/* get the audio stream */
stream = get_audio_stream(file, channel, &offset);
- if (stream == NULL)
+ if (stream == nullptr)
return AVIERR_INVALID_STREAM;
/* validate our ability to handle the data */
@@ -1579,7 +1579,7 @@ static avi_error read_chunk_data(avi_file *file, const avi_chunk *chunk, UINT8 *
/* allocate memory for the data */
*buffer = (UINT8 *)malloc(chunk->size);
- if (*buffer == NULL)
+ if (*buffer == nullptr)
return AVIERR_NO_MEMORY;
/* read from the file */
@@ -1587,7 +1587,7 @@ static avi_error read_chunk_data(avi_file *file, const avi_chunk *chunk, UINT8 *
if (filerr != FILERR_NONE || bytes_read != chunk->size)
{
free(*buffer);
- *buffer = NULL;
+ *buffer = nullptr;
return AVIERR_READ_ERROR;
}
@@ -1614,8 +1614,8 @@ static avi_error read_chunk_data(avi_file *file, const avi_chunk *chunk, UINT8 *
static avi_error get_first_chunk(avi_file *file, const avi_chunk *parent, avi_chunk *newchunk)
{
- UINT64 startoffset = (parent != NULL && parent->type != 0) ? parent->offset + 12 : 0;
- if (parent != NULL && parent->type != CHUNKTYPE_LIST && parent->type != CHUNKTYPE_RIFF && parent->type != 0)
+ UINT64 startoffset = (parent != nullptr && parent->type != 0) ? parent->offset + 12 : 0;
+ if (parent != nullptr && parent->type != CHUNKTYPE_LIST && parent->type != CHUNKTYPE_RIFF && parent->type != 0)
return AVIERR_INVALID_DATA;
return get_next_chunk_internal(file, parent, newchunk, startoffset);
}
@@ -1790,7 +1790,7 @@ static avi_error get_next_chunk_internal(avi_file *file, const avi_chunk *parent
UINT32 bytesread;
/* NULL parent implies the root */
- if (parent == NULL)
+ if (parent == nullptr)
parent = &file->rootchunk;
/* start at the current offset */
@@ -1843,7 +1843,7 @@ static avi_error read_movie_data(avi_file *file)
int strindex;
/* find the RIFF chunk */
- avierr = find_first_chunk(file, CHUNKTYPE_RIFF, NULL, &riff);
+ avierr = find_first_chunk(file, CHUNKTYPE_RIFF, nullptr, &riff);
if (avierr != AVIERR_NONE)
goto error;
@@ -1954,7 +1954,7 @@ static avi_error extract_movie_info(avi_file *file)
/* get the video stream */
stream = get_video_stream(file);
- if (stream != NULL)
+ if (stream != nullptr)
{
/* fill in the info */
file->info.video_format = stream->format;
@@ -1966,8 +1966,8 @@ static avi_error extract_movie_info(avi_file *file)
}
/* get the first audio stream */
- stream = get_audio_stream(file, 0, NULL);
- if (stream != NULL)
+ stream = get_audio_stream(file, 0, nullptr);
+ if (stream != nullptr)
{
/* fill in the info */
file->info.audio_format = stream->format;
@@ -1984,8 +1984,8 @@ static avi_error extract_movie_info(avi_file *file)
while (1)
{
/* get the stream info */
- stream = get_audio_stream(file, file->info.audio_channels, NULL);
- if (stream == NULL)
+ stream = get_audio_stream(file, file->info.audio_channels, nullptr);
+ if (stream == nullptr)
break;
file->info.audio_channels++;
@@ -2021,7 +2021,7 @@ static avi_error extract_movie_info(avi_file *file)
static avi_error parse_avih_chunk(avi_file *file, avi_chunk *avih)
{
- UINT8 *chunkdata = NULL;
+ UINT8 *chunkdata = nullptr;
avi_error avierr;
/* read the data */
@@ -2034,12 +2034,12 @@ static avi_error parse_avih_chunk(avi_file *file, avi_chunk *avih)
/* allocate memory for the streams */
file->stream = (avi_stream *)malloc(sizeof(*file->stream) * file->streams);
- if (file->stream == NULL)
+ if (file->stream == nullptr)
goto error;
memset(file->stream, 0, sizeof(*file->stream) * file->streams);
error:
- if (chunkdata != NULL)
+ if (chunkdata != nullptr)
free(chunkdata);
return avierr;
}
@@ -2064,7 +2064,7 @@ error:
static avi_error parse_strh_chunk(avi_file *file, avi_stream *stream, avi_chunk *strh)
{
- UINT8 *chunkdata = NULL;
+ UINT8 *chunkdata = nullptr;
avi_error avierr;
/* read the data */
@@ -2079,7 +2079,7 @@ static avi_error parse_strh_chunk(avi_file *file, avi_stream *stream, avi_chunk
stream->samples = fetch_32bits(&chunkdata[32]);
error:
- if (chunkdata != NULL)
+ if (chunkdata != nullptr)
free(chunkdata);
return avierr;
}
@@ -2104,7 +2104,7 @@ error:
static avi_error parse_strf_chunk(avi_file *file, avi_stream *stream, avi_chunk *strf)
{
- UINT8 *chunkdata = NULL;
+ UINT8 *chunkdata = nullptr;
avi_error avierr;
/* read the data */
@@ -2136,7 +2136,7 @@ static avi_error parse_strf_chunk(avi_file *file, avi_stream *stream, avi_chunk
}
error:
- if (chunkdata != NULL)
+ if (chunkdata != nullptr)
free(chunkdata);
return avierr;
}
@@ -2161,7 +2161,7 @@ error:
static avi_error parse_indx_chunk(avi_file *file, avi_stream *stream, avi_chunk *strf)
{
UINT32 entries, entry;
- UINT8 *chunkdata = NULL;
+ UINT8 *chunkdata = nullptr;
UINT16 longs_per_entry;
UINT8 type;
UINT64 baseoffset;
@@ -2238,7 +2238,7 @@ static avi_error parse_indx_chunk(avi_file *file, avi_stream *stream, avi_chunk
}
error:
- if (chunkdata != NULL)
+ if (chunkdata != nullptr)
free(chunkdata);
return avierr;
}
@@ -2262,7 +2262,7 @@ error:
static avi_error parse_idx1_chunk(avi_file *file, UINT64 baseoffset, avi_chunk *idx1)
{
- UINT8 *chunkdata = NULL;
+ UINT8 *chunkdata = nullptr;
avi_error avierr;
UINT32 entries;
UINT32 entry;
@@ -2300,7 +2300,7 @@ static avi_error parse_idx1_chunk(avi_file *file, UINT64 baseoffset, avi_chunk *
}
error:
- if (chunkdata != NULL)
+ if (chunkdata != nullptr)
free(chunkdata);
return avierr;
}
@@ -2841,7 +2841,7 @@ static avi_error write_indx_chunk(avi_file *file, avi_stream *stream, int initia
/* allocate memory */
tempbuf = (UINT8 *)malloc(24 + 8 * chunks_this_index);
- if (tempbuf == NULL)
+ if (tempbuf == nullptr)
return AVIERR_NO_MEMORY;
memset(tempbuf, 0, 24 + 8 * chunks_this_index);
@@ -2920,7 +2920,7 @@ static avi_error write_idx1_chunk(avi_file *file)
/* allocate a temporary buffer */
tempbuf = (UINT8 *)malloc(tempbuflength);
- if (tempbuf == NULL)
+ if (tempbuf == nullptr)
return AVIERR_NO_MEMORY;
/* fill it in */
@@ -2971,15 +2971,15 @@ static avi_error write_idx1_chunk(avi_file *file)
static avi_error soundbuf_initialize(avi_file *file)
{
- avi_stream *audio = get_audio_stream(file, 0, NULL);
+ avi_stream *audio = get_audio_stream(file, 0, nullptr);
avi_stream *video = get_video_stream(file);
/* we require a video stream */
- if (video == NULL)
+ if (video == nullptr)
return AVIERR_UNSUPPORTED_VIDEO_FORMAT;
/* skip if no audio stream */
- if (audio == NULL)
+ if (audio == nullptr)
return AVIERR_NONE;
/* determine the number of samples we want in our buffer; 2 seconds should be enough */
@@ -2987,7 +2987,7 @@ static avi_error soundbuf_initialize(avi_file *file)
/* allocate a buffer */
file->soundbuf = (INT16 *)malloc(file->soundbuf_samples * file->info.audio_channels * sizeof(file->soundbuf[0]));
- if (file->soundbuf == NULL)
+ if (file->soundbuf == nullptr)
return AVIERR_NO_MEMORY;
memset(file->soundbuf, 0, file->soundbuf_samples * file->info.audio_channels * sizeof(file->soundbuf[0]));
@@ -3015,12 +3015,12 @@ static avi_error soundbuf_initialize(avi_file *file)
static avi_error soundbuf_write_chunk(avi_file *file, UINT32 framenum)
{
- avi_stream *stream = get_audio_stream(file, 0, NULL);
+ avi_stream *stream = get_audio_stream(file, 0, nullptr);
avi_error avierr;
UINT32 length;
/* skip if no audio stream */
- if (stream == NULL)
+ if (stream == nullptr)
return AVIERR_NONE;
/* determine the length of this chunk */
@@ -3058,7 +3058,7 @@ static avi_error soundbuf_write_chunk(avi_file *file, UINT32 framenum)
static avi_error soundbuf_flush(avi_file *file, int only_flush_full)
{
- avi_stream *stream = get_audio_stream(file, 0, NULL);
+ avi_stream *stream = get_audio_stream(file, 0, nullptr);
INT32 channelsamples = file->soundbuf_samples;
INT32 processedsamples = 0;
UINT32 bytes_per_sample;
@@ -3069,7 +3069,7 @@ static avi_error soundbuf_flush(avi_file *file, int only_flush_full)
int channel;
/* skip if no stream */
- if (stream == NULL)
+ if (stream == nullptr)
return AVIERR_NONE;
/* get the chunk ID for this stream */
@@ -3337,7 +3337,7 @@ static avi_error huffyuv_extract_tables(avi_stream *stream, const UINT8 *chunkda
/* allocate memory for the data */
stream->huffyuv = (huffyuv_data *)malloc(sizeof(*stream->huffyuv));
- if (stream->huffyuv == NULL)
+ if (stream->huffyuv == nullptr)
{
avierr = AVIERR_NO_MEMORY;
goto error;
@@ -3425,7 +3425,7 @@ static avi_error huffyuv_extract_tables(avi_stream *stream, const UINT8 *chunkda
if (bitsat16 > 0)
{
table->extralookup = (UINT16 *)malloc(bitsat16 * 65536 * sizeof(table->extralookup[0]));
- if (table->extralookup == NULL)
+ if (table->extralookup == nullptr)
{
avierr = AVIERR_NO_MEMORY;
goto error;
@@ -3454,10 +3454,10 @@ static avi_error huffyuv_extract_tables(avi_stream *stream, const UINT8 *chunkda
}
error:
- if (avierr != AVIERR_NONE && stream->huffyuv != NULL)
+ if (avierr != AVIERR_NONE && stream->huffyuv != nullptr)
{
free(stream->huffyuv);
- stream->huffyuv = NULL;
+ stream->huffyuv = nullptr;
}
return avierr;
}
@@ -3759,7 +3759,7 @@ static void printf_chunk_recursive(avi_file *file, avi_chunk *container, int ind
/* print data within the chunk */
if (chunksize > 0 && curchunk.size < 1024 * 1024)
{
- UINT8 *data = NULL;
+ UINT8 *data = nullptr;
int i;
/* read the data for a chunk */
diff --git a/src/lib/util/bitmap.cpp b/src/lib/util/bitmap.cpp
index aeb9852ca1c..2436e474136 100644
--- a/src/lib/util/bitmap.cpp
+++ b/src/lib/util/bitmap.cpp
@@ -77,11 +77,11 @@ inline void bitmap_t::compute_base(int xslop, int yslop)
*/
bitmap_t::bitmap_t(bitmap_format format, int bpp, int width, int height, int xslop, int yslop)
- : m_alloc(NULL),
+ : m_alloc(nullptr),
m_allocbytes(0),
m_format(format),
m_bpp(bpp),
- m_palette(NULL)
+ m_palette(nullptr)
{
// allocate intializes all other fields
allocate(width, height, xslop, yslop);
@@ -101,7 +101,7 @@ bitmap_t::bitmap_t(bitmap_format format, int bpp, int width, int height, int xsl
*/
bitmap_t::bitmap_t(bitmap_format format, int bpp, void *base, int width, int height, int rowpixels)
- : m_alloc(NULL),
+ : m_alloc(nullptr),
m_allocbytes(0),
m_base(base),
m_rowpixels(rowpixels),
@@ -109,7 +109,7 @@ bitmap_t::bitmap_t(bitmap_format format, int bpp, void *base, int width, int hei
m_height(height),
m_format(format),
m_bpp(bpp),
- m_palette(NULL),
+ m_palette(nullptr),
m_cliprect(0, width - 1, 0, height - 1)
{
}
@@ -126,7 +126,7 @@ bitmap_t::bitmap_t(bitmap_format format, int bpp, void *base, int width, int hei
*/
bitmap_t::bitmap_t(bitmap_format format, int bpp, bitmap_t &source, const rectangle &subrect)
- : m_alloc(NULL),
+ : m_alloc(nullptr),
m_allocbytes(0),
m_base(source.raw_pixptr(subrect.min_y, subrect.min_x)),
m_rowpixels(source.m_rowpixels),
@@ -134,7 +134,7 @@ bitmap_t::bitmap_t(bitmap_format format, int bpp, bitmap_t &source, const rectan
m_height(subrect.height()),
m_format(format),
m_bpp(bpp),
- m_palette(NULL),
+ m_palette(nullptr),
m_cliprect(0, subrect.width() - 1, 0, subrect.height() - 1)
{
assert(format == source.m_format);
@@ -258,10 +258,10 @@ void bitmap_t::resize(int width, int height, int xslop, int yslop)
void bitmap_t::reset()
{
// delete any existing stuff
- set_palette(NULL);
+ set_palette(nullptr);
delete[] m_alloc;
- m_alloc = NULL;
- m_base = NULL;
+ m_alloc = nullptr;
+ m_base = nullptr;
// reset all fields
m_rowpixels = 0;
@@ -339,14 +339,14 @@ void bitmap_t::wrap(const bitmap_t &source, const rectangle &subrect)
void bitmap_t::set_palette(palette_t *palette)
{
// first dereference any existing palette
- if (m_palette != NULL)
+ if (m_palette != nullptr)
{
m_palette->deref();
- m_palette = NULL;
+ m_palette = nullptr;
}
// then reference any new palette
- if (palette != NULL)
+ if (palette != nullptr)
{
palette->ref();
m_palette = palette;
diff --git a/src/lib/util/bitmap.h b/src/lib/util/bitmap.h
index 91d693124e1..23d05af90df 100644
--- a/src/lib/util/bitmap.h
+++ b/src/lib/util/bitmap.h
@@ -141,7 +141,7 @@ public:
INT32 rowbytes() const { return m_rowpixels * m_bpp / 8; }
UINT8 bpp() const { return m_bpp; }
bitmap_format format() const { return m_format; }
- bool valid() const { return (m_base != NULL); }
+ bool valid() const { return (m_base != nullptr); }
palette_t *palette() const { return m_palette; }
const rectangle &cliprect() const { return m_cliprect; }
diff --git a/src/lib/util/cdrom.cpp b/src/lib/util/cdrom.cpp
index e3cb14e8f0c..917cb355839 100644
--- a/src/lib/util/cdrom.cpp
+++ b/src/lib/util/cdrom.cpp
@@ -225,8 +225,8 @@ cdrom_file *cdrom_open(const char *inputfile)
/* allocate memory for the CD-ROM file */
file = new cdrom_file();
- if (file == NULL)
- return NULL;
+ if (file == nullptr)
+ return nullptr;
/* setup the CDROM module and get the disc info */
chd_error err = chdcd_parse_toc(inputfile, file->cdtoc, file->track_info);
@@ -234,11 +234,11 @@ cdrom_file *cdrom_open(const char *inputfile)
{
fprintf(stderr, "Error reading input file: %s\n", chd_file::error_string(err));
delete file;
- return NULL;
+ return nullptr;
}
/* fill in the data */
- file->chd = NULL;
+ file->chd = nullptr;
LOG(("CD has %d tracks\n", file->cdtoc.numtrks));
@@ -249,7 +249,7 @@ cdrom_file *cdrom_open(const char *inputfile)
{
fprintf(stderr, "Unable to open file: %s\n", file->track_info.track[i].fname.c_str());
cdrom_close(file);
- return NULL;
+ return nullptr;
}
}
/* calculate the starting frame for each track, keeping in mind that CHDMAN
@@ -322,18 +322,18 @@ cdrom_file *cdrom_open(chd_file *chd)
/* punt if no CHD */
if (!chd)
- return NULL;
+ return nullptr;
/* validate the CHD information */
if (chd->hunk_bytes() % CD_FRAME_SIZE != 0)
- return NULL;
+ return nullptr;
if (chd->unit_bytes() != CD_FRAME_SIZE)
- return NULL;
+ return nullptr;
/* allocate memory for the CD-ROM file */
file = new cdrom_file();
- if (file == NULL)
- return NULL;
+ if (file == nullptr)
+ return nullptr;
/* fill in the data */
file->chd = chd;
@@ -343,7 +343,7 @@ cdrom_file *cdrom_open(chd_file *chd)
if (err != CHDERR_NONE)
{
delete file;
- return NULL;
+ return nullptr;
}
LOG(("CD has %d tracks\n", file->cdtoc.numtrks));
@@ -411,10 +411,10 @@ cdrom_file *cdrom_open(chd_file *chd)
void cdrom_close(cdrom_file *file)
{
- if (file == NULL)
+ if (file == nullptr)
return;
- if (file->chd == NULL)
+ if (file->chd == nullptr)
{
for (int i = 0; i < file->cdtoc.numtrks; i++)
{
@@ -461,7 +461,7 @@ chd_error read_partial_sector(cdrom_file *file, void *dest, UINT32 lbasector, UI
}
// if a CHD, just read
- if (file->chd != NULL)
+ if (file->chd != nullptr)
{
result = file->chd->read_bytes(UINT64(chdsector) * UINT64(CD_FRAME_SIZE) + startoffs, dest, length);
/* swap CDDA in the case of LE GDROMs */
@@ -521,7 +521,7 @@ chd_error read_partial_sector(cdrom_file *file, void *dest, UINT32 lbasector, UI
UINT32 cdrom_read_data(cdrom_file *file, UINT32 lbasector, void *buffer, UINT32 datatype, bool phys)
{
- if (file == NULL)
+ if (file == nullptr)
return 0;
// compute CHD sector and tracknumber
@@ -606,7 +606,7 @@ UINT32 cdrom_read_data(cdrom_file *file, UINT32 lbasector, void *buffer, UINT32
UINT32 cdrom_read_subcode(cdrom_file *file, UINT32 lbasector, void *buffer, bool phys)
{
- if (file == NULL)
+ if (file == nullptr)
return ~0;
// compute CHD sector and tracknumber
@@ -656,7 +656,7 @@ UINT32 cdrom_get_track(cdrom_file *file, UINT32 frame)
{
UINT32 track = 0;
- if (file == NULL)
+ if (file == nullptr)
return ~0;
/* convert to a CHD sector offset and get track information */
@@ -684,7 +684,7 @@ UINT32 cdrom_get_track(cdrom_file *file, UINT32 frame)
UINT32 cdrom_get_track_start(cdrom_file *file, UINT32 track)
{
- if (file == NULL)
+ if (file == nullptr)
return ~0;
/* handle lead-out specially */
@@ -712,7 +712,7 @@ UINT32 cdrom_get_track_start(cdrom_file *file, UINT32 track)
UINT32 cdrom_get_track_start_phys(cdrom_file *file, UINT32 track)
{
- if (file == NULL)
+ if (file == nullptr)
return ~0;
/* handle lead-out specially */
@@ -743,7 +743,7 @@ UINT32 cdrom_get_track_start_phys(cdrom_file *file, UINT32 track)
int cdrom_get_last_track(cdrom_file *file)
{
- if (file == NULL)
+ if (file == nullptr)
return -1;
return file->cdtoc.numtrks;
@@ -768,7 +768,7 @@ int cdrom_get_last_track(cdrom_file *file)
int cdrom_get_adr_control(cdrom_file *file, int track)
{
- if (file == NULL)
+ if (file == nullptr)
return -1;
if (track == 0xaa || file->cdtoc.tracks[track].trktype == CD_TRACK_AUDIO)
@@ -797,7 +797,7 @@ int cdrom_get_adr_control(cdrom_file *file, int track)
int cdrom_get_track_type(cdrom_file *file, int track)
{
- if (file == NULL)
+ if (file == nullptr)
return -1;
return file->cdtoc.tracks[track].trktype;
@@ -821,8 +821,8 @@ int cdrom_get_track_type(cdrom_file *file, int track)
const cdrom_toc *cdrom_get_toc(cdrom_file *file)
{
- if (file == NULL)
- return NULL;
+ if (file == nullptr)
+ return nullptr;
return &file->cdtoc;
}
diff --git a/src/lib/util/chd.cpp b/src/lib/util/chd.cpp
index 07e98d03b85..38881cc8d81 100644
--- a/src/lib/util/chd.cpp
+++ b/src/lib/util/chd.cpp
@@ -186,7 +186,7 @@ inline void chd_file::be_write_sha1(UINT8 *base, sha1_t value)
inline void chd_file::file_read(UINT64 offset, void *dest, UINT32 length)
{
// no file = failure
- if (m_file == NULL)
+ if (m_file == nullptr)
throw CHDERR_NOT_OPEN;
// seek and read
@@ -205,7 +205,7 @@ inline void chd_file::file_read(UINT64 offset, void *dest, UINT32 length)
inline void chd_file::file_write(UINT64 offset, const void *source, UINT32 length)
{
// no file = failure
- if (m_file == NULL)
+ if (m_file == nullptr)
throw CHDERR_NOT_OPEN;
// seek and write
@@ -225,7 +225,7 @@ inline void chd_file::file_write(UINT64 offset, const void *source, UINT32 lengt
inline UINT64 chd_file::file_append(const void *source, UINT32 length, UINT32 alignment)
{
// no file = failure
- if (m_file == NULL)
+ if (m_file == nullptr)
throw CHDERR_NOT_OPEN;
// seek to the end and align if necessary
@@ -288,7 +288,7 @@ inline UINT8 chd_file::bits_for_value(UINT64 value)
*/
chd_file::chd_file()
- : m_file(NULL),
+ : m_file(nullptr),
m_owns_file(false)
{
// reset state
@@ -554,7 +554,7 @@ void chd_file::set_raw_sha1(sha1_t rawdata)
void chd_file::set_parent_sha1(sha1_t parent)
{
// if no file, fail
- if (m_file == NULL)
+ if (m_file == nullptr)
throw CHDERR_INVALID_FILE;
// create a big-endian version
@@ -585,7 +585,7 @@ void chd_file::set_parent_sha1(sha1_t parent)
chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4])
{
// make sure we don't already have a file open
- if (m_file != NULL)
+ if (m_file != nullptr)
return CHDERR_ALREADY_OPEN;
// set the header parameters
@@ -593,7 +593,7 @@ chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbyte
m_hunkbytes = hunkbytes;
m_unitbytes = unitbytes;
memcpy(m_compression, compression, sizeof(m_compression));
- m_parent = NULL;
+ m_parent = nullptr;
// take ownership of the file
m_file = &file;
@@ -620,7 +620,7 @@ chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbyte
chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent)
{
// make sure we don't already have a file open
- if (m_file != NULL)
+ if (m_file != nullptr)
return CHDERR_ALREADY_OPEN;
// set the header parameters
@@ -655,11 +655,11 @@ chd_error chd_file::create(core_file &file, UINT64 logicalbytes, UINT32 hunkbyte
chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hunkbytes, UINT32 unitbytes, chd_codec_type compression[4])
{
// make sure we don't already have a file open
- if (m_file != NULL)
+ if (m_file != nullptr)
return CHDERR_ALREADY_OPEN;
// create the new file
- core_file *file = NULL;
+ core_file *file = nullptr;
file_error filerr = core_fopen(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &file);
if (filerr != FILERR_NONE)
return CHDERR_FILE_NOT_FOUND;
@@ -696,11 +696,11 @@ chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hun
chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent)
{
// make sure we don't already have a file open
- if (m_file != NULL)
+ if (m_file != nullptr)
return CHDERR_ALREADY_OPEN;
// create the new file
- core_file *file = NULL;
+ core_file *file = nullptr;
file_error filerr = core_fopen(filename, OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &file);
if (filerr != FILERR_NONE)
return CHDERR_FILE_NOT_FOUND;
@@ -735,12 +735,12 @@ chd_error chd_file::create(const char *filename, UINT64 logicalbytes, UINT32 hun
chd_error chd_file::open(const char *filename, bool writeable, chd_file *parent)
{
// make sure we don't already have a file open
- if (m_file != NULL)
+ if (m_file != nullptr)
return CHDERR_ALREADY_OPEN;
// open the file
UINT32 openflags = writeable ? (OPEN_FLAG_READ | OPEN_FLAG_WRITE) : OPEN_FLAG_READ;
- core_file *file = NULL;
+ core_file *file = nullptr;
file_error filerr = core_fopen(filename, openflags, &file);
if (filerr != FILERR_NONE)
return CHDERR_FILE_NOT_FOUND;
@@ -775,7 +775,7 @@ chd_error chd_file::open(const char *filename, bool writeable, chd_file *parent)
chd_error chd_file::open(core_file &file, bool writeable, chd_file *parent)
{
// make sure we don't already have a file open
- if (m_file != NULL)
+ if (m_file != nullptr)
return CHDERR_ALREADY_OPEN;
// open the file
@@ -796,9 +796,9 @@ chd_error chd_file::open(core_file &file, bool writeable, chd_file *parent)
void chd_file::close()
{
// reset file characteristics
- if (m_owns_file && m_file != NULL)
+ if (m_owns_file && m_file != nullptr)
core_fclose(m_file);
- m_file = NULL;
+ m_file = nullptr;
m_owns_file = false;
m_allow_reads = false;
m_allow_writes = false;
@@ -813,7 +813,7 @@ void chd_file::close()
m_unitbytes = 0;
m_unitcount = 0;
memset(m_compression, 0, sizeof(m_compression));
- m_parent = NULL;
+ m_parent = nullptr;
m_parent_missing = false;
// reset key offsets within the header
@@ -828,10 +828,10 @@ void chd_file::close()
m_rawmap.clear();
// reset compression management
- for (int decompnum = 0; decompnum < ARRAY_LENGTH(m_decompressor); decompnum++)
+ for (auto & elem : m_decompressor)
{
- delete m_decompressor[decompnum];
- m_decompressor[decompnum] = NULL;
+ delete elem;
+ elem = nullptr;
}
m_compressed.clear();
@@ -869,7 +869,7 @@ chd_error chd_file::read_hunk(UINT32 hunknum, void *buffer)
try
{
// punt if no file
- if (m_file == NULL)
+ if (m_file == nullptr)
throw CHDERR_NOT_OPEN;
// return an error if out of range
@@ -896,7 +896,7 @@ chd_error chd_file::read_hunk(UINT32 hunknum, void *buffer)
blocklen = be_read(&rawmap[12], 2) + (rawmap[14] << 16);
file_read(blockoffs, &m_compressed[0], blocklen);
m_decompressor[0]->decompress(&m_compressed[0], blocklen, dest, m_hunkbytes);
- if (!(rawmap[15] & V34_MAP_ENTRY_FLAG_NO_CRC) && dest != NULL && crc32_creator::simple(dest, m_hunkbytes) != blockcrc)
+ if (!(rawmap[15] & V34_MAP_ENTRY_FLAG_NO_CRC) && dest != nullptr && crc32_creator::simple(dest, m_hunkbytes) != blockcrc)
throw CHDERR_DECOMPRESSION_ERROR;
return CHDERR_NONE;
@@ -936,7 +936,7 @@ chd_error chd_file::read_hunk(UINT32 hunknum, void *buffer)
file_read(blockoffs, dest, m_hunkbytes);
else if (m_parent_missing)
throw CHDERR_REQUIRES_PARENT;
- else if (m_parent != NULL)
+ else if (m_parent != nullptr)
m_parent->read_hunk(hunknum, dest);
else
memset(dest, 0, m_hunkbytes);
@@ -955,7 +955,7 @@ chd_error chd_file::read_hunk(UINT32 hunknum, void *buffer)
case COMPRESSION_TYPE_3:
file_read(blockoffs, &m_compressed[0], blocklen);
m_decompressor[rawmap[0]]->decompress(&m_compressed[0], blocklen, dest, m_hunkbytes);
- if (!m_decompressor[rawmap[0]]->lossy() && dest != NULL && crc16_creator::simple(dest, m_hunkbytes) != blockcrc)
+ if (!m_decompressor[rawmap[0]]->lossy() && dest != nullptr && crc16_creator::simple(dest, m_hunkbytes) != blockcrc)
throw CHDERR_DECOMPRESSION_ERROR;
if (m_decompressor[rawmap[0]]->lossy() && crc16_creator::simple(&m_compressed[0], blocklen) != blockcrc)
throw CHDERR_DECOMPRESSION_ERROR;
@@ -1014,7 +1014,7 @@ chd_error chd_file::write_hunk(UINT32 hunknum, const void *buffer)
try
{
// punt if no file
- if (m_file == NULL)
+ if (m_file == nullptr)
throw CHDERR_NOT_OPEN;
// return an error if out of range
@@ -1249,7 +1249,7 @@ chd_error chd_file::read_metadata(chd_metadata_tag searchtag, UINT32 searchindex
// read the metadata
// TODO: how to properly allocate a dynamic char buffer?
- char* metabuf = new char[metaentry.length+1];
+ auto metabuf = new char[metaentry.length+1];
memset(metabuf, 0x00, metaentry.length+1);
file_read(metaentry.offset + METADATA_HEADER_SIZE, metabuf, metaentry.length);
output.assign(metabuf);
@@ -2268,25 +2268,25 @@ chd_error chd_file::create_common()
m_metaoffset = 0;
// if we have a parent, it must be V3 or later
- if (m_parent != NULL && m_parent->version() < 3)
+ if (m_parent != nullptr && m_parent->version() < 3)
throw CHDERR_UNSUPPORTED_VERSION;
// must be an even number of units per hunk
if (m_hunkbytes % m_unitbytes != 0)
throw CHDERR_INVALID_PARAMETER;
- if (m_parent != NULL && m_unitbytes != m_parent->unit_bytes())
+ if (m_parent != nullptr && m_unitbytes != m_parent->unit_bytes())
throw CHDERR_INVALID_PARAMETER;
// verify the compression types
bool found_zero = false;
- for (int codecnum = 0; codecnum < ARRAY_LENGTH(m_compression); codecnum++)
+ for (auto & elem : m_compression)
{
// once we hit an empty slot, all later slots must be empty as well
- if (m_compression[codecnum] == CHD_CODEC_NONE)
+ if (elem == CHD_CODEC_NONE)
found_zero = true;
else if (found_zero)
throw CHDERR_INVALID_PARAMETER;
- else if (!chd_codec_list::codec_exists(m_compression[codecnum]))
+ else if (!chd_codec_list::codec_exists(elem))
throw CHDERR_UNKNOWN_COMPRESSION;
}
@@ -2306,7 +2306,7 @@ chd_error chd_file::create_common()
be_write(&rawheader[60], m_unitbytes, 4);
be_write_sha1(&rawheader[64], sha1_t::null);
be_write_sha1(&rawheader[84], sha1_t::null);
- be_write_sha1(&rawheader[104], (m_parent != NULL) ? m_parent->sha1() : sha1_t::null);
+ be_write_sha1(&rawheader[104], (m_parent != nullptr) ? m_parent->sha1() : sha1_t::null);
// write the resulting header
file_write(0, rawheader, sizeof(rawheader));
@@ -2412,12 +2412,12 @@ chd_error chd_file::open_common(bool writeable)
// make sure we have a parent if we need one (and don't if we don't)
if (parentsha1 != sha1_t::null)
{
- if (m_parent == NULL)
+ if (m_parent == nullptr)
m_parent_missing = true;
else if (m_parent->sha1() != parentsha1)
throw CHDERR_INVALID_PARENT;
}
- else if (m_parent != NULL)
+ else if (m_parent != nullptr)
throw CHDERR_INVALID_PARAMETER;
// finish opening the file
@@ -2450,7 +2450,7 @@ void chd_file::create_open_common()
for (int decompnum = 0; decompnum < ARRAY_LENGTH(m_compression); decompnum++)
{
m_decompressor[decompnum] = chd_codec_list::new_decompressor(m_compression[decompnum], *this);
- if (m_decompressor[decompnum] == NULL && m_compression[decompnum] != 0)
+ if (m_decompressor[decompnum] == nullptr && m_compression[decompnum] != 0)
throw CHDERR_UNKNOWN_COMPRESSION;
}
@@ -2488,7 +2488,7 @@ void chd_file::create_open_common()
void chd_file::verify_proper_compression_append(UINT32 hunknum)
{
// punt if no file
- if (m_file == NULL)
+ if (m_file == nullptr)
throw CHDERR_NOT_OPEN;
// return an error if out of range
@@ -2751,11 +2751,11 @@ chd_file_compressor::chd_file_compressor()
: m_walking_parent(false),
m_total_in(0),
m_total_out(0),
- m_read_queue(NULL),
+ m_read_queue(nullptr),
m_read_queue_offset(0),
m_read_done_offset(0),
m_read_error(false),
- m_work_queue(NULL),
+ m_work_queue(nullptr),
m_write_hunk(0)
{
// zap arrays
@@ -2781,8 +2781,8 @@ chd_file_compressor::~chd_file_compressor()
osd_work_queue_free(m_work_queue);
// delete allocated arrays
- for (int codecnum = 0; codecnum < ARRAY_LENGTH(m_codecs); codecnum++)
- delete m_codecs[codecnum];
+ for (auto & elem : m_codecs)
+ delete elem;
}
/**
@@ -2796,7 +2796,7 @@ chd_file_compressor::~chd_file_compressor()
void chd_file_compressor::compress_begin()
{
// reset state
- m_walking_parent = (m_parent != NULL);
+ m_walking_parent = (m_parent != nullptr);
m_total_in = 0;
m_total_out = 0;
m_compsha1.reset();
@@ -2824,10 +2824,10 @@ void chd_file_compressor::compress_begin()
}
// initialize codec instances
- for (int instance = 0; instance < ARRAY_LENGTH(m_codecs); instance++)
+ for (auto & elem : m_codecs)
{
- delete m_codecs[instance];
- m_codecs[instance] = new chd_compressor_group(*this, m_compression);
+ delete elem;
+ elem = new chd_compressor_group(*this, m_compression);
}
// reset write state
@@ -2886,9 +2886,9 @@ chd_error chd_file_compressor::compress_continue(double &progress, double &ratio
work_item &item = m_work_item[m_write_hunk % WORK_BUFFER_HUNKS];
// free any OSD work item
- if (item.m_osd != NULL)
+ if (item.m_osd != nullptr)
osd_work_item_release(item.m_osd);
- item.m_osd = NULL;
+ item.m_osd = nullptr;
// for parent walking, just add to the hashmap
if (m_walking_parent)
@@ -2929,7 +2929,7 @@ chd_error chd_file_compressor::compress_continue(double &progress, double &ratio
}
// if not, see if it's in the parent map
- if (m_parent != NULL)
+ if (m_parent != nullptr)
{
UINT64 parentunit = m_parent_map.find(item.m_hash[0].m_crc16, item.m_hash[0].m_sha1);
if (parentunit != hashmap::NOT_FOUND)
@@ -2958,8 +2958,8 @@ chd_error chd_file_compressor::compress_continue(double &progress, double &ratio
m_walking_parent = false;
m_read_queue_offset = m_read_done_offset = 0;
m_write_hunk = 0;
- for (int itemnum = 0; itemnum < WORK_BUFFER_HUNKS; itemnum++)
- atomic_exchange32(&m_work_item[itemnum].m_status, WS_READY);
+ for (auto & elem : m_work_item)
+ atomic_exchange32(&elem.m_status, WS_READY);
}
// wait for all reads to finish and if we're compressed, write the final SHA1 and map
@@ -2982,7 +2982,7 @@ chd_error chd_file_compressor::compress_continue(double &progress, double &ratio
ratio = (m_total_in == 0) ? 1.0 : double(m_total_out) / double(m_total_in);
// if we're waiting for work, wait
- while (m_work_item[m_write_hunk % WORK_BUFFER_HUNKS].m_status != WS_COMPLETE && m_work_item[m_write_hunk % WORK_BUFFER_HUNKS].m_osd != NULL)
+ while (m_work_item[m_write_hunk % WORK_BUFFER_HUNKS].m_status != WS_COMPLETE && m_work_item[m_write_hunk % WORK_BUFFER_HUNKS].m_osd != nullptr)
osd_work_item_wait(m_work_item[m_write_hunk % WORK_BUFFER_HUNKS].m_osd, osd_ticks_per_second());
return m_walking_parent ? CHDERR_WALKING_PARENT : CHDERR_COMPRESSING;
@@ -3005,7 +3005,7 @@ void *chd_file_compressor::async_walk_parent_static(void *param, int threadid)
{
work_item *item = reinterpret_cast<work_item *>(param);
item->m_compressor->async_walk_parent(*item);
- return NULL;
+ return nullptr;
}
/**
@@ -3047,7 +3047,7 @@ void *chd_file_compressor::async_compress_hunk_static(void *param, int threadid)
{
work_item *item = reinterpret_cast<work_item *>(param);
item->m_compressor->async_compress_hunk(*item, threadid);
- return NULL;
+ return nullptr;
}
/**
@@ -3096,7 +3096,7 @@ void chd_file_compressor::async_compress_hunk(work_item &item, int threadid)
void *chd_file_compressor::async_read_static(void *param, int threadid)
{
reinterpret_cast<chd_file_compressor *>(param)->async_read();
- return NULL;
+ return nullptr;
}
/**
@@ -3189,7 +3189,7 @@ void chd_file_compressor::async_read()
*/
chd_file_compressor::hashmap::hashmap()
- : m_block_list(new entry_block(NULL))
+ : m_block_list(new entry_block(nullptr))
{
// initialize the map to empty
memset(m_map, 0, sizeof(m_map));
@@ -3220,7 +3220,7 @@ chd_file_compressor::hashmap::~hashmap()
void chd_file_compressor::hashmap::reset()
{
// delete all the blocks
- while (m_block_list->m_next != NULL)
+ while (m_block_list->m_next != nullptr)
{
entry_block *block = m_block_list;
m_block_list = block->m_next;
@@ -3248,7 +3248,7 @@ void chd_file_compressor::hashmap::reset()
UINT64 chd_file_compressor::hashmap::find(crc16_t crc16, sha1_t sha1)
{
// look up the entry in the map
- for (entry_t *entry = m_map[crc16]; entry != NULL; entry = entry->m_next)
+ for (entry_t *entry = m_map[crc16]; entry != nullptr; entry = entry->m_next)
if (entry->m_sha1 == sha1)
return entry->m_itemnum;
return NOT_FOUND;
diff --git a/src/lib/util/chd.h b/src/lib/util/chd.h
index d767c0889e0..114a29a5b5e 100644
--- a/src/lib/util/chd.h
+++ b/src/lib/util/chd.h
@@ -307,7 +307,7 @@ public:
operator core_file *() { return m_file; }
// getters
- bool opened() const { return (m_file != NULL); }
+ bool opened() const { return (m_file != nullptr); }
UINT32 version() const { return m_version; }
UINT64 logical_bytes() const { return m_logicalbytes; }
UINT32 hunk_bytes() const { return m_hunkbytes; }
@@ -333,8 +333,8 @@ public:
chd_error create(core_file &file, UINT64 logicalbytes, UINT32 hunkbytes, chd_codec_type compression[4], chd_file &parent);
// file open
- chd_error open(const char *filename, bool writeable = false, chd_file *parent = NULL);
- chd_error open(core_file &file, bool writeable = false, chd_file *parent = NULL);
+ chd_error open(const char *filename, bool writeable = false, chd_file *parent = nullptr);
+ chd_error open(core_file &file, bool writeable = false, chd_file *parent = nullptr);
// file close
void close();
@@ -519,14 +519,14 @@ private:
struct work_item
{
work_item()
- : m_osd(NULL)
- , m_compressor(NULL)
+ : m_osd(nullptr)
+ , m_compressor(nullptr)
, m_status(WS_READY)
- , m_data(NULL)
- , m_compressed(NULL)
+ , m_data(nullptr)
+ , m_compressed(nullptr)
, m_complen(0)
, m_compression(0)
- , m_codecs(NULL)
+ , m_codecs(nullptr)
{ }
osd_work_item * m_osd; // OSD work item running on this block
diff --git a/src/lib/util/chdcd.cpp b/src/lib/util/chdcd.cpp
index e267c613d1d..eeb196d242f 100644
--- a/src/lib/util/chdcd.cpp
+++ b/src/lib/util/chdcd.cpp
@@ -475,7 +475,7 @@ chd_error chdcd_parse_nero(const char *tocfname, cdrom_toc &outtoc, chdcd_track_
infile = fopen(tocfname, "rb");
path = get_file_path(path);
- if (infile == (FILE *)NULL)
+ if (infile == (FILE *)nullptr)
{
return CHDERR_FILE_NOT_FOUND;
}
@@ -657,7 +657,7 @@ chd_error chdcd_parse_iso(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i
infile = fopen(tocfname, "rb");
path = get_file_path(path);
- if (infile == (FILE *)NULL)
+ if (infile == (FILE *)nullptr)
{
return CHDERR_FILE_NOT_FOUND;
}
@@ -736,7 +736,7 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc &outtoc, chdcd_
infile = fopen(tocfname, "rt");
path = get_file_path(path);
- if (infile == (FILE *)NULL)
+ if (infile == (FILE *)nullptr)
{
return CHDERR_FILE_NOT_FOUND;
}
@@ -771,13 +771,13 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc &outtoc, chdcd_
outtoc.tracks[trknum].subsize = 0;
outtoc.tracks[trknum].pgsub = CD_SUB_NONE;
- tok=strtok(NULL," ");
+ tok=strtok(nullptr," ");
outtoc.tracks[trknum].physframeofs=atoi(tok);
- tok=strtok(NULL," ");
+ tok=strtok(nullptr," ");
trktype=atoi(tok);
- tok=strtok(NULL," ");
+ tok=strtok(nullptr," ");
trksize=atoi(tok);
if(trktype==4 && trksize==2352)
@@ -799,16 +799,16 @@ static chd_error chdcd_parse_gdi(const char *tocfname, cdrom_toc &outtoc, chdcd_
std::string name;
- tok=strtok(NULL," ");
+ tok=strtok(nullptr," ");
name = tok;
if (tok[0]=='"') {
do {
- tok=strtok(NULL," ");
- if (tok!=NULL) {
+ tok=strtok(nullptr," ");
+ if (tok!=nullptr) {
name += " ";
name += tok;
}
- } while(tok!=NULL && (strrchr(tok,'"')-tok !=(strlen(tok)-1)));
+ } while(tok!=nullptr && (strrchr(tok,'"')-tok !=(strlen(tok)-1)));
strdelchr(name,'"');
}
outinfo.track[trknum].fname.assign(path).append(name);
@@ -869,7 +869,7 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i
infile = fopen(tocfname, "rt");
path = get_file_path(path);
- if (infile == (FILE *)NULL)
+ if (infile == (FILE *)nullptr)
{
return CHDERR_FILE_NOT_FOUND;
}
@@ -931,7 +931,7 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i
{
/* get the track number */
TOKENIZE
- trknum = strtoul(token, NULL, 10) - 1;
+ trknum = strtoul(token, nullptr, 10) - 1;
/* next token on the line is the track type */
TOKENIZE
@@ -978,7 +978,7 @@ chd_error chdcd_parse_cue(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i
/* get index number */
TOKENIZE
- idx = strtoul(token, NULL, 10);
+ idx = strtoul(token, nullptr, 10);
/* get index */
TOKENIZE
@@ -1191,7 +1191,7 @@ chd_error chdcd_parse_toc(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i
infile = fopen(tocfname, "rt");
path = get_file_path(path);
- if (infile == (FILE *)NULL)
+ if (infile == (FILE *)nullptr)
{
return CHDERR_FILE_NOT_FOUND;
}
@@ -1241,7 +1241,7 @@ chd_error chdcd_parse_toc(const char *tocfname, cdrom_toc &outtoc, chdcd_track_i
if (token[0] == '#')
{
/* it's a decimal offset, use it */
- f = strtoul(&token[1], NULL, 10);
+ f = strtoul(&token[1], nullptr, 10);
}
else if (isdigit((UINT8)token[0]))
{
diff --git a/src/lib/util/chdcd.h b/src/lib/util/chdcd.h
index be585aad87e..6adcf29ce7b 100644
--- a/src/lib/util/chdcd.h
+++ b/src/lib/util/chdcd.h
@@ -27,7 +27,7 @@ struct chdcd_track_input_entry
struct chdcd_track_input_info
{
- void reset() { for (int i = 0; i < CD_MAX_TRACKS; i++) track[i].reset(); }
+ void reset() { for (auto & elem : track) elem.reset(); }
chdcd_track_input_entry track[CD_MAX_TRACKS];
};
diff --git a/src/lib/util/chdcodec.cpp b/src/lib/util/chdcodec.cpp
index 9f013609133..be1d2022cd7 100644
--- a/src/lib/util/chdcodec.cpp
+++ b/src/lib/util/chdcodec.cpp
@@ -67,7 +67,7 @@ public:
~chd_zlib_compressor();
// core functionality
- virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest);
+ virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest) override;
private:
// internal state
@@ -87,7 +87,7 @@ public:
~chd_zlib_decompressor();
// core functionality
- virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen);
+ virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen) override;
private:
// internal state
@@ -127,7 +127,7 @@ public:
~chd_lzma_compressor();
// core functionality
- virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest);
+ virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest) override;
// helpers
static void configure_properties(CLzmaEncProps &props, UINT32 hunkbytes);
@@ -150,7 +150,7 @@ public:
~chd_lzma_decompressor();
// core functionality
- virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen);
+ virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen) override;
private:
// internal state
@@ -169,7 +169,7 @@ public:
chd_huffman_compressor(chd_file &chd, UINT32 hunkbytes, bool lossy);
// core functionality
- virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest);
+ virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest) override;
private:
// internal state
@@ -187,7 +187,7 @@ public:
chd_huffman_decompressor(chd_file &chd, UINT32 hunkbytes, bool lossy);
// core functionality
- virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen);
+ virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen) override;
private:
// internal state
@@ -205,7 +205,7 @@ public:
chd_flac_compressor(chd_file &chd, UINT32 hunkbytes, bool lossy);
// core functionality
- virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest);
+ virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest) override;
// static helpers
static UINT32 blocksize(UINT32 bytes);
@@ -227,7 +227,7 @@ public:
chd_flac_decompressor(chd_file &chd, UINT32 hunkbytes, bool lossy);
// core functionality
- virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen);
+ virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen) override;
private:
// internal state
@@ -247,7 +247,7 @@ public:
~chd_cd_flac_compressor();
// core functionality
- virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest);
+ virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest) override;
// static helpers
static UINT32 blocksize(UINT32 bytes);
@@ -273,7 +273,7 @@ public:
~chd_cd_flac_decompressor();
// core functionality
- virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen);
+ virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen) override;
private:
// internal state
@@ -304,7 +304,7 @@ public:
}
// core functionality
- virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest)
+ virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest) override
{
// determine header bytes
UINT32 frames = srclen / CD_FRAME_SIZE;
@@ -373,7 +373,7 @@ public:
}
// core functionality
- virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen)
+ virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen) override
{
// determine header bytes
UINT32 frames = destlen / CD_FRAME_SIZE;
@@ -424,7 +424,7 @@ public:
chd_avhuff_compressor(chd_file &chd, UINT32 hunkbytes, bool lossy);
// core functionality
- virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest);
+ virtual UINT32 compress(const UINT8 *src, UINT32 srclen, UINT8 *dest) override;
private:
// internal helpers
@@ -446,8 +446,8 @@ public:
chd_avhuff_decompressor(chd_file &chd, UINT32 hunkbytes, bool lossy);
// core functionality
- virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen);
- virtual void configure(int param, void *config);
+ virtual void decompress(const UINT8 *src, UINT32 complen, UINT8 *dest, UINT32 destlen) override;
+ virtual void configure(int param, void *config) override;
private:
// internal state
@@ -560,7 +560,7 @@ chd_compressor *chd_codec_list::new_compressor(chd_codec_type type, chd_file &ch
{
// find in the list and construct the class
const codec_entry *entry = find_in_list(type);
- return (entry == NULL) ? NULL : (*entry->m_construct_compressor)(chd, chd.hunk_bytes(), entry->m_lossy);
+ return (entry == nullptr) ? nullptr : (*entry->m_construct_compressor)(chd, chd.hunk_bytes(), entry->m_lossy);
}
@@ -573,7 +573,7 @@ chd_decompressor *chd_codec_list::new_decompressor(chd_codec_type type, chd_file
{
// find in the list and construct the class
const codec_entry *entry = find_in_list(type);
- return (entry == NULL) ? NULL : (*entry->m_construct_decompressor)(chd, chd.hunk_bytes(), entry->m_lossy);
+ return (entry == nullptr) ? nullptr : (*entry->m_construct_decompressor)(chd, chd.hunk_bytes(), entry->m_lossy);
}
@@ -586,7 +586,7 @@ const char *chd_codec_list::codec_name(chd_codec_type type)
{
// find in the list and construct the class
const codec_entry *entry = find_in_list(type);
- return (entry == NULL) ? NULL : entry->m_name;
+ return (entry == nullptr) ? nullptr : entry->m_name;
}
@@ -598,10 +598,10 @@ const char *chd_codec_list::codec_name(chd_codec_type type)
const chd_codec_list::codec_entry *chd_codec_list::find_in_list(chd_codec_type type)
{
// find in the list and construct the class
- for (int listnum = 0; listnum < ARRAY_LENGTH(s_codec_list); listnum++)
- if (s_codec_list[listnum].m_type == type)
- return &s_codec_list[listnum];
- return NULL;
+ for (auto & elem : s_codec_list)
+ if (elem.m_type == type)
+ return &elem;
+ return nullptr;
}
@@ -624,11 +624,11 @@ chd_compressor_group::chd_compressor_group(chd_file &chd, UINT32 compressor_list
// verify the compression types and initialize the codecs
for (int codecnum = 0; codecnum < ARRAY_LENGTH(m_compressor); codecnum++)
{
- m_compressor[codecnum] = NULL;
+ m_compressor[codecnum] = nullptr;
if (compressor_list[codecnum] != CHD_CODEC_NONE)
{
m_compressor[codecnum] = chd_codec_list::new_compressor(compressor_list[codecnum], chd);
- if (m_compressor[codecnum] == NULL)
+ if (m_compressor[codecnum] == nullptr)
throw CHDERR_UNKNOWN_COMPRESSION;
#if CHDCODEC_VERIFY_COMPRESSION
m_decompressor[codecnum] = chd_codec_list::new_decompressor(compressor_list[codecnum], chd);
@@ -647,8 +647,8 @@ chd_compressor_group::chd_compressor_group(chd_file &chd, UINT32 compressor_list
chd_compressor_group::~chd_compressor_group()
{
// delete the codecs and the test buffer
- for (int codecnum = 0; codecnum < ARRAY_LENGTH(m_compressor); codecnum++)
- delete m_compressor[codecnum];
+ for (auto & elem : m_compressor)
+ delete elem;
}
@@ -664,7 +664,7 @@ INT8 chd_compressor_group::find_best_compressor(const UINT8 *src, UINT8 *compres
complen = m_hunkbytes;
INT8 compression = -1;
for (int codecnum = 0; codecnum < ARRAY_LENGTH(m_compressor); codecnum++)
- if (m_compressor[codecnum] != NULL)
+ if (m_compressor[codecnum] != nullptr)
{
// attempt to compress, swallowing errors
try
@@ -735,8 +735,8 @@ chd_zlib_allocator::chd_zlib_allocator()
chd_zlib_allocator::~chd_zlib_allocator()
{
// free our memory
- for (int memindex = 0; memindex < ARRAY_LENGTH(m_allocptr); memindex++)
- delete[] m_allocptr[memindex];
+ for (auto & elem : m_allocptr)
+ delete[] elem;
}
@@ -769,7 +769,7 @@ voidpf chd_zlib_allocator::fast_alloc(voidpf opaque, uInt items, uInt size)
for (int scan = 0; scan < MAX_ZLIB_ALLOCS; scan++)
{
UINT32 *ptr = codec->m_allocptr[scan];
- if (ptr != NULL && size == *ptr)
+ if (ptr != nullptr && size == *ptr)
{
// set the low bit of the size so we don't match next time
*ptr |= 1;
@@ -780,7 +780,7 @@ voidpf chd_zlib_allocator::fast_alloc(voidpf opaque, uInt items, uInt size)
// alloc a new one and put it into the list
UINT32 *ptr = reinterpret_cast<UINT32 *>(new UINT8[size + sizeof(UINT32)]);
for (int scan = 0; scan < MAX_ZLIB_ALLOCS; scan++)
- if (codec->m_allocptr[scan] == NULL)
+ if (codec->m_allocptr[scan] == nullptr)
{
codec->m_allocptr[scan] = ptr;
break;
@@ -968,8 +968,8 @@ chd_lzma_allocator::chd_lzma_allocator()
chd_lzma_allocator::~chd_lzma_allocator()
{
// free our memory
- for (int memindex = 0; memindex < ARRAY_LENGTH(m_allocptr); memindex++)
- delete[] m_allocptr[memindex];
+ for (auto & elem : m_allocptr)
+ delete[] elem;
}
@@ -989,7 +989,7 @@ void *chd_lzma_allocator::fast_alloc(void *p, size_t size)
for (int scan = 0; scan < MAX_LZMA_ALLOCS; scan++)
{
UINT32 *ptr = codec->m_allocptr[scan];
- if (ptr != NULL && size == *ptr)
+ if (ptr != nullptr && size == *ptr)
{
// set the low bit of the size so we don't match next time
*ptr |= 1;
@@ -1000,7 +1000,7 @@ void *chd_lzma_allocator::fast_alloc(void *p, size_t size)
// alloc a new one and put it into the list
UINT32 *ptr = reinterpret_cast<UINT32 *>(new UINT8[size + sizeof(UINT32)]);
for (int scan = 0; scan < MAX_LZMA_ALLOCS; scan++)
- if (codec->m_allocptr[scan] == NULL)
+ if (codec->m_allocptr[scan] == nullptr)
{
codec->m_allocptr[scan] = ptr;
break;
@@ -1019,7 +1019,7 @@ void *chd_lzma_allocator::fast_alloc(void *p, size_t size)
void chd_lzma_allocator::fast_free(void *p, void *address)
{
- if (address == NULL)
+ if (address == nullptr)
return;
chd_lzma_allocator *codec = reinterpret_cast<chd_lzma_allocator *>(p);
@@ -1070,7 +1070,7 @@ UINT32 chd_lzma_compressor::compress(const UINT8 *src, UINT32 srclen, UINT8 *des
{
// allocate the encoder
CLzmaEncHandle encoder = LzmaEnc_Create(&m_allocator);
- if (encoder == NULL)
+ if (encoder == nullptr)
throw CHDERR_COMPRESSION_ERROR;
try
@@ -1082,7 +1082,7 @@ UINT32 chd_lzma_compressor::compress(const UINT8 *src, UINT32 srclen, UINT8 *des
// run it
SizeT complen = srclen;
- res = LzmaEnc_MemEncode(encoder, dest, &complen, src, srclen, 0, NULL, &m_allocator, &m_allocator);
+ res = LzmaEnc_MemEncode(encoder, dest, &complen, src, srclen, 0, nullptr, &m_allocator, &m_allocator);
if (res != SZ_OK)
throw CHDERR_COMPRESSION_ERROR;
@@ -1645,7 +1645,7 @@ UINT32 chd_avhuff_compressor::compress(const UINT8 *src, UINT32 srclen, UINT8 *d
postinit();
// make sure short frames are padded with 0
- if (src != NULL)
+ if (src != nullptr)
{
int size = avhuff_encoder::raw_data_size(src);
while (size < srclen)
@@ -1745,7 +1745,7 @@ void chd_avhuff_decompressor::decompress(const UINT8 *src, UINT32 complen, UINT8
throw CHDERR_DECOMPRESSION_ERROR;
// pad short frames with 0
- if (dest != NULL)
+ if (dest != nullptr)
{
int size = avhuff_encoder::raw_data_size(dest);
if (size < destlen)
diff --git a/src/lib/util/chdcodec.h b/src/lib/util/chdcodec.h
index 144fba8641f..f517cdedeeb 100644
--- a/src/lib/util/chdcodec.h
+++ b/src/lib/util/chdcodec.h
@@ -108,7 +108,7 @@ public:
static chd_decompressor *new_decompressor(chd_codec_type type, chd_file &file);
// utilities
- static bool codec_exists(chd_codec_type type) { return (find_in_list(type) != NULL); }
+ static bool codec_exists(chd_codec_type type) { return (find_in_list(type) != nullptr); }
static const char *codec_name(chd_codec_type type);
private:
diff --git a/src/lib/util/corealloc.cpp b/src/lib/util/corealloc.cpp
index a635803e463..9ca7af380d3 100644
--- a/src/lib/util/corealloc.cpp
+++ b/src/lib/util/corealloc.cpp
@@ -90,11 +90,11 @@ const zeromem_t zeromem = { };
// globals for memory_entry
UINT64 memory_entry::s_curid = 1;
-osd_lock *memory_entry::s_lock = NULL;
+osd_lock *memory_entry::s_lock = nullptr;
bool memory_entry::s_lock_alloc = false;
bool memory_entry::s_tracking = false;
-memory_entry *memory_entry::s_hash[memory_entry::k_hash_prime] = { NULL };
-memory_entry *memory_entry::s_freehead = NULL;
+memory_entry *memory_entry::s_hash[memory_entry::k_hash_prime] = { nullptr };
+memory_entry *memory_entry::s_freehead = nullptr;
//**************************************************************************
// OPERATOR REPLACEMENTS
@@ -103,15 +103,15 @@ memory_entry *memory_entry::s_freehead = NULL;
#ifndef NO_MEM_TRACKING
// standard new/delete operators (try to avoid using)
-void *operator new(std::size_t size) throw (std::bad_alloc) { return malloc_file_line(size, NULL, 0, false, true, false); }
-void *operator new[](std::size_t size) throw (std::bad_alloc) { return malloc_file_line(size, NULL, 0, true, true, false); }
-void operator delete(void *ptr) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, false); }
-void operator delete[](void *ptr) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, true); }
+void *operator new(std::size_t size) throw (std::bad_alloc) { return malloc_file_line(size, nullptr, 0, false, true, false); }
+void *operator new[](std::size_t size) throw (std::bad_alloc) { return malloc_file_line(size, nullptr, 0, true, true, false); }
+void operator delete(void *ptr) throw() { if (ptr != nullptr) free_file_line(ptr, nullptr, 0, false); }
+void operator delete[](void *ptr) throw() { if (ptr != nullptr) free_file_line(ptr, nullptr, 0, true); }
-void* operator new(std::size_t size,const std::nothrow_t&) throw() { return malloc_file_line(size, NULL, 0, false, false, false); }
-void* operator new[](std::size_t size, const std::nothrow_t&) throw() { return malloc_file_line(size, NULL, 0, true, false, false); }
-void operator delete(void* ptr, const std::nothrow_t&) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, false); }
-void operator delete[](void* ptr, const std::nothrow_t&) throw() { if (ptr != NULL) free_file_line(ptr, NULL, 0, true); }
+void* operator new(std::size_t size,const std::nothrow_t&) throw() { return malloc_file_line(size, nullptr, 0, false, false, false); }
+void* operator new[](std::size_t size, const std::nothrow_t&) throw() { return malloc_file_line(size, nullptr, 0, true, false, false); }
+void operator delete(void* ptr, const std::nothrow_t&) throw() { if (ptr != nullptr) free_file_line(ptr, nullptr, 0, false); }
+void operator delete[](void* ptr, const std::nothrow_t&) throw() { if (ptr != nullptr) free_file_line(ptr, nullptr, 0, true); }
#endif
@@ -122,14 +122,14 @@ void operator delete[](void* ptr, const std::nothrow_t&) throw() { if (ptr != NU
// file/line new/delete operators
void *operator new(std::size_t size, const char *file, int line) throw (std::bad_alloc) { return malloc_file_line(size, file, line, false, true, false); }
void *operator new[](std::size_t size, const char *file, int line) throw (std::bad_alloc) { return malloc_file_line(size, file, line, true, true, false); }
-void operator delete(void *ptr, const char *file, int line) { if (ptr != NULL) free_file_line(ptr, file, line, false); }
-void operator delete[](void *ptr, const char *file, int line) { if (ptr != NULL) free_file_line(ptr, file, line, true); }
+void operator delete(void *ptr, const char *file, int line) { if (ptr != nullptr) free_file_line(ptr, file, line, false); }
+void operator delete[](void *ptr, const char *file, int line) { if (ptr != nullptr) free_file_line(ptr, file, line, true); }
// file/line new/delete operators with zeroing
void *operator new(std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc) { return malloc_file_line(size, file, line, false, true, true); }
void *operator new[](std::size_t size, const char *file, int line, const zeromem_t &) throw (std::bad_alloc) { return malloc_file_line(size, file, line, true, true, true); }
-void operator delete(void *ptr, const char *file, int line, const zeromem_t &) { if (ptr != NULL) free_file_line(ptr, file, line, false); }
-void operator delete[](void *ptr, const char *file, int line, const zeromem_t &) { if (ptr != NULL) free_file_line(ptr, file, line, true); }
+void operator delete(void *ptr, const char *file, int line, const zeromem_t &) { if (ptr != nullptr) free_file_line(ptr, file, line, false); }
+void operator delete[](void *ptr, const char *file, int line, const zeromem_t &) { if (ptr != nullptr) free_file_line(ptr, file, line, true); }
@@ -146,13 +146,13 @@ void *malloc_file_line(size_t size, const char *file, int line, bool array, bool
{
// allocate the memory and fail if we can't
void *result = array ? osd_malloc_array(size) : osd_malloc(size);
- if (result == NULL)
+ if (result == nullptr)
{
fprintf(stderr, "Failed to allocate %d bytes (%s:%d)\n", UINT32(size), file, line);
osd_break_into_debugger("Failed to allocate RAM");
if (throw_on_fail)
throw std::bad_alloc();
- return NULL;
+ return nullptr;
}
// zap the memory if requested
@@ -183,7 +183,7 @@ void free_file_line(void *memory, const char *file, int line, bool array)
memory_entry *entry = memory_entry::find(memory);
// warn about untracked frees
- if (entry == NULL)
+ if (entry == nullptr)
{
fprintf(stderr, "Error: attempt to free untracked memory %p in %s(%d)!\n", memory, file, line);
osd_break_into_debugger("Error: attempt to free untracked memory");
@@ -267,7 +267,7 @@ void memory_entry::acquire_lock()
{
// allocate a lock on first usage
// note that osd_lock_alloc() may re-enter this path, so protect against recursion!
- if (s_lock == NULL)
+ if (s_lock == nullptr)
{
if (s_lock_alloc)
return;
@@ -298,14 +298,14 @@ memory_entry *memory_entry::allocate(size_t size, void *base, const char *file,
acquire_lock();
// if we're out of free entries, allocate a new chunk
- if (s_freehead == NULL)
+ if (s_freehead == nullptr)
{
// create a new chunk, and fail if we can't
memory_entry *entry = reinterpret_cast<memory_entry *>(osd_malloc_array(memory_block_alloc_chunk * sizeof(memory_entry)));
- if (entry == NULL)
+ if (entry == nullptr)
{
release_lock();
- return NULL;
+ return nullptr;
}
// add all the entries to the list
@@ -323,7 +323,7 @@ memory_entry *memory_entry::allocate(size_t size, void *base, const char *file,
// populate it
entry->m_size = size;
entry->m_base = base;
- entry->m_file = s_tracking ? file : NULL;
+ entry->m_file = s_tracking ? file : nullptr;
entry->m_line = s_tracking ? line : 0;
entry->m_id = s_curid++;
entry->m_array = array;
@@ -333,9 +333,9 @@ memory_entry *memory_entry::allocate(size_t size, void *base, const char *file,
// add it to the alloc list
int hashval = reinterpret_cast<FPTR>(base) % k_hash_prime;
entry->m_next = s_hash[hashval];
- if (entry->m_next != NULL)
+ if (entry->m_next != nullptr)
entry->m_next->m_prev = entry;
- entry->m_prev = NULL;
+ entry->m_prev = nullptr;
s_hash[hashval] = entry;
release_lock();
@@ -350,15 +350,15 @@ memory_entry *memory_entry::allocate(size_t size, void *base, const char *file,
memory_entry *memory_entry::find(void *ptr)
{
// NULL maps to nothing
- if (ptr == NULL)
- return NULL;
+ if (ptr == nullptr)
+ return nullptr;
// scan the list under the lock
acquire_lock();
int hashval = reinterpret_cast<FPTR>(ptr) % k_hash_prime;
memory_entry *entry;
- for (entry = s_hash[hashval]; entry != NULL; entry = entry->m_next)
+ for (entry = s_hash[hashval]; entry != nullptr; entry = entry->m_next)
if (entry->m_base == ptr)
break;
@@ -380,11 +380,11 @@ void memory_entry::release(memory_entry *entry, const char *file, int line)
// remove ourselves from the alloc list
int hashval = reinterpret_cast<FPTR>(entry->m_base) % k_hash_prime;
- if (entry->m_prev != NULL)
+ if (entry->m_prev != nullptr)
entry->m_prev->m_next = entry->m_next;
else
s_hash[hashval] = entry->m_next;
- if (entry->m_next != NULL)
+ if (entry->m_next != nullptr)
entry->m_next->m_prev = entry->m_prev;
// add ourself to the free list
@@ -411,9 +411,9 @@ void memory_entry::report_unfreed(UINT64 start)
// check for leaked memory
UINT32 total = 0;
- for (int hashnum = 0; hashnum < k_hash_prime; hashnum++)
- for (memory_entry *entry = s_hash[hashnum]; entry != NULL; entry = entry->m_next)
- if (entry->m_file != NULL && entry->m_id >= start)
+ for (auto entry : s_hash)
+ for (; entry != nullptr; entry = entry->m_next)
+ if (entry->m_file != nullptr && entry->m_id >= start)
{
if (total == 0)
fprintf(stderr, "--- memory leak warning ---\n");
diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp
index 797805ac768..b7e389a35f7 100644
--- a/src/lib/util/corefile.cpp
+++ b/src/lib/util/corefile.cpp
@@ -126,7 +126,7 @@ file_error core_fopen(const char *filename, UINT32 openflags, core_file **file)
/* allocate the file itself */
*file = (core_file *)malloc(sizeof(**file));
- if (*file == NULL)
+ if (*file == nullptr)
return FILERR_OUT_OF_MEMORY;
memset(*file, 0, sizeof(**file));
@@ -138,7 +138,7 @@ file_error core_fopen(const char *filename, UINT32 openflags, core_file **file)
if (filerr != FILERR_NONE)
{
core_fclose(*file);
- *file = NULL;
+ *file = nullptr;
}
return filerr;
}
@@ -160,7 +160,7 @@ static file_error core_fopen_ram_internal(const void *data, size_t length, int c
/* allocate the file itself */
*file = (core_file *)malloc(sizeof(**file) + (copy_buffer ? length : 0));
- if (*file == NULL)
+ if (*file == nullptr)
return FILERR_OUT_OF_MEMORY;
memset(*file, 0, sizeof(**file));
@@ -210,11 +210,11 @@ file_error core_fopen_ram_copy(const void *data, size_t length, UINT32 openflags
void core_fclose(core_file *file)
{
/* close files and free memory */
- if (file->zdata != NULL)
+ if (file->zdata != nullptr)
core_fcompress(file, FCOMPRESS_NONE);
- if (file->file != NULL)
+ if (file->file != nullptr)
osd_close(file->file);
- if (file->data != NULL && file->data_allocated)
+ if (file->data != nullptr && file->data_allocated)
free(file->data);
free(file);
}
@@ -235,7 +235,7 @@ file_error core_fcompress(core_file *file, int level)
return FILERR_INVALID_ACCESS;
/* if we have been compressing, flush and free the data */
- if (file->zdata != NULL && level == FCOMPRESS_NONE)
+ if (file->zdata != nullptr && level == FCOMPRESS_NONE)
{
int zerr = Z_OK;
@@ -273,17 +273,17 @@ file_error core_fcompress(core_file *file, int level)
/* free memory */
free(file->zdata);
- file->zdata = NULL;
+ file->zdata = nullptr;
}
/* if we are just starting to compress, allocate a new buffer */
- if (file->zdata == NULL && level > FCOMPRESS_NONE)
+ if (file->zdata == nullptr && level > FCOMPRESS_NONE)
{
int zerr;
/* allocate memory */
file->zdata = (zlib_data *)malloc(sizeof(*file->zdata));
- if (file->zdata == NULL)
+ if (file->zdata == nullptr)
return FILERR_OUT_OF_MEMORY;
memset(file->zdata, 0, sizeof(*file->zdata));
@@ -301,7 +301,7 @@ file_error core_fcompress(core_file *file, int level)
if (zerr != Z_OK)
{
free(file->zdata);
- file->zdata = NULL;
+ file->zdata = nullptr;
return FILERR_OUT_OF_MEMORY;
}
@@ -331,7 +331,7 @@ int core_fseek(core_file *file, INT64 offset, int whence)
int err = 0;
/* error if compressing */
- if (file->zdata != NULL)
+ if (file->zdata != nullptr)
return 1;
/* flush any buffered char */
@@ -412,7 +412,7 @@ UINT32 core_fread(core_file *file, void *buffer, UINT32 length)
file->back_char_tail = 0;
/* handle real files */
- if (file->file && file->data == NULL)
+ if (file->file && file->data == nullptr)
{
/* if we're within the buffer, consume that first */
if (file->offset >= file->bufferbase && file->offset < file->bufferbase + file->bufferbytes)
@@ -638,7 +638,7 @@ char *core_fgets(char *s, int n, core_file *file)
/* if we put nothing in, return NULL */
if (cur == s)
- return NULL;
+ return nullptr;
/* otherwise, terminate */
if (n > 0)
@@ -659,13 +659,13 @@ const void *core_fbuffer(core_file *file)
UINT32 read_length;
/* if we already have data, just return it */
- if (file->data != NULL || !file->length)
+ if (file->data != nullptr || !file->length)
return file->data;
/* allocate some memory */
file->data = (UINT8 *)malloc(file->length);
- if (file->data == NULL)
- return NULL;
+ if (file->data == nullptr)
+ return nullptr;
file->data_allocated = TRUE;
/* read the file */
@@ -673,13 +673,13 @@ const void *core_fbuffer(core_file *file)
if (filerr != FILERR_NONE || read_length != file->length)
{
free(file->data);
- file->data = NULL;
- return NULL;
+ file->data = nullptr;
+ return nullptr;
}
/* close the file because we don't need it anymore */
osd_close(file->file);
- file->file = NULL;
+ file->file = nullptr;
return file->data;
}
@@ -692,7 +692,7 @@ const void *core_fbuffer(core_file *file)
file_error core_fload(const char *filename, void **data, UINT32 *length)
{
- core_file *file = NULL;
+ core_file *file = nullptr;
file_error err;
UINT64 size;
@@ -711,7 +711,7 @@ file_error core_fload(const char *filename, void **data, UINT32 *length)
/* allocate memory */
*data = osd_malloc(size);
- if (length != NULL)
+ if (length != nullptr)
*length = (UINT32)size;
/* read the data */
@@ -729,7 +729,7 @@ file_error core_fload(const char *filename, void **data, UINT32 *length)
file_error core_fload(const char *filename, dynamic_buffer &data)
{
- core_file *file = NULL;
+ core_file *file = nullptr;
file_error err;
UINT64 size;
@@ -777,7 +777,7 @@ UINT32 core_fwrite(core_file *file, const void *buffer, UINT32 length)
UINT32 bytes_written = 0;
/* can't write to RAM-based stuff */
- if (file->data != NULL)
+ if (file->data != nullptr)
return 0;
/* flush any buffered char */
@@ -978,7 +978,7 @@ static UINT32 safe_buffer_copy(const void *source, UINT32 sourceoffs, UINT32 sou
static file_error osd_or_zlib_read(core_file *file, void *buffer, UINT64 offset, UINT32 length, UINT32 *actual)
{
/* if no compression, just pass through */
- if (file->zdata == NULL)
+ if (file->zdata == nullptr)
return osd_read(file->file, buffer, offset, length, actual);
/* if the offset doesn't match the next offset, fail */
@@ -1045,7 +1045,7 @@ static file_error osd_or_zlib_read(core_file *file, void *buffer, UINT64 offset,
static file_error osd_or_zlib_write(core_file *file, const void *buffer, UINT64 offset, UINT32 length, UINT32 *actual)
{
/* if no compression, just pass through */
- if (file->zdata == NULL)
+ if (file->zdata == nullptr)
return osd_write(file->file, buffer, offset, length, actual);
/* if the offset doesn't match the next offset, fail */
diff --git a/src/lib/util/corestr.cpp b/src/lib/util/corestr.cpp
index b4a75a3bc48..336d788cabb 100644
--- a/src/lib/util/corestr.cpp
+++ b/src/lib/util/corestr.cpp
@@ -114,11 +114,11 @@ int core_strwildcmp(const char *sp1, const char *sp2)
char *core_strdup(const char *str)
{
- char *cpy = NULL;
- if (str != NULL)
+ char *cpy = nullptr;
+ if (str != nullptr)
{
cpy = (char *)osd_malloc_array(strlen(str) + 1);
- if (cpy != NULL)
+ if (cpy != nullptr)
strcpy(cpy, str);
}
return cpy;
@@ -261,18 +261,18 @@ void strdelchr(std::string& str, char chr)
void strreplacechr(std::string& str, char ch, char newch)
{
- for (size_t i = 0; i < str.length(); i++)
+ for (auto & elem : str)
{
- if (str[i] == ch) str[i] = newch;
+ if (elem == ch) elem = newch;
}
}
std::string strtrimspace(std::string& str)
{
int start = 0;
- for (size_t i = 0; i < str.length(); i++)
+ for (auto & elem : str)
{
- if (!isspace(UINT8(str[i]))) break;
+ if (!isspace(UINT8(elem))) break;
start++;
}
int end = str.length();
diff --git a/src/lib/util/coretmpl.h b/src/lib/util/coretmpl.h
index 703eba077da..afbd3dcf9a1 100644
--- a/src/lib/util/coretmpl.h
+++ b/src/lib/util/coretmpl.h
@@ -42,8 +42,8 @@ class simple_list
public:
// construction/destruction
simple_list()
- : m_head(NULL),
- m_tail(NULL),
+ : m_head(nullptr),
+ m_tail(nullptr),
m_count(0) { }
virtual ~simple_list() { reset(); }
@@ -56,7 +56,7 @@ public:
// remove (free) all objects in the list, leaving an empty list
void reset()
{
- while (m_head != NULL)
+ while (m_head != nullptr)
remove(*m_head);
}
@@ -65,7 +65,7 @@ public:
{
object.m_next = m_head;
m_head = &object;
- if (m_tail == NULL)
+ if (m_tail == nullptr)
m_tail = m_head;
m_count++;
return object;
@@ -81,7 +81,7 @@ public:
_ElementType *head = list.detach_all();
tail->m_next = m_head;
m_head = head;
- if (m_tail == NULL)
+ if (m_tail == nullptr)
m_tail = tail;
m_count += count;
}
@@ -89,8 +89,8 @@ public:
// add the given object to the tail of the list
_ElementType &append(_ElementType &object)
{
- object.m_next = NULL;
- if (m_tail != NULL)
+ object.m_next = nullptr;
+ if (m_tail != nullptr)
m_tail = m_tail->m_next = &object;
else
m_tail = m_head = &object;
@@ -106,7 +106,7 @@ public:
return;
_ElementType *tail = list.last();
_ElementType *head = list.detach_all();
- if (m_tail != NULL)
+ if (m_tail != nullptr)
m_tail->m_next = head;
else
m_head = head;
@@ -117,7 +117,7 @@ public:
// insert the given object after a particular object (NULL means prepend)
_ElementType &insert_after(_ElementType &object, _ElementType *insert_after)
{
- if (insert_after == NULL)
+ if (insert_after == nullptr)
return prepend(object);
object.m_next = insert_after->m_next;
insert_after->m_next = &object;
@@ -130,9 +130,9 @@ public:
// insert the given object before a particular object (NULL means append)
_ElementType &insert_before(_ElementType &object, _ElementType *insert_before)
{
- if (insert_before == NULL)
+ if (insert_before == nullptr)
return append(object);
- for (_ElementType **curptr = &m_head; *curptr != NULL; curptr = &(*curptr)->m_next)
+ for (_ElementType **curptr = &m_head; *curptr != nullptr; curptr = &(*curptr)->m_next)
if (*curptr == insert_before)
{
object.m_next = insert_before;
@@ -148,11 +148,11 @@ public:
// replace an item in the list at the same location, and remove it
_ElementType &replace_and_remove(_ElementType &object, _ElementType &toreplace)
{
- _ElementType *prev = NULL;
- for (_ElementType *cur = m_head; cur != NULL; prev = cur, cur = cur->m_next)
+ _ElementType *prev = nullptr;
+ for (_ElementType *cur = m_head; cur != nullptr; prev = cur, cur = cur->m_next)
if (cur == &toreplace)
{
- if (prev != NULL)
+ if (prev != nullptr)
prev->m_next = &object;
else
m_head = &object;
@@ -169,12 +169,12 @@ public:
_ElementType *detach_head()
{
_ElementType *result = m_head;
- if (result != NULL)
+ if (result != nullptr)
{
m_head = result->m_next;
m_count--;
- if (m_head == NULL)
- m_tail = NULL;
+ if (m_head == nullptr)
+ m_tail = nullptr;
}
return result;
}
@@ -182,11 +182,11 @@ public:
// detach the given item from the list, but don't free its memory
_ElementType &detach(_ElementType &object)
{
- _ElementType *prev = NULL;
- for (_ElementType *cur = m_head; cur != NULL; prev = cur, cur = cur->m_next)
+ _ElementType *prev = nullptr;
+ for (_ElementType *cur = m_head; cur != nullptr; prev = cur, cur = cur->m_next)
if (cur == &object)
{
- if (prev != NULL)
+ if (prev != nullptr)
prev->m_next = object.m_next;
else
m_head = object.m_next;
@@ -202,7 +202,7 @@ public:
_ElementType *detach_all()
{
_ElementType *result = m_head;
- m_head = m_tail = NULL;
+ m_head = m_tail = nullptr;
m_count = 0;
return result;
}
@@ -216,17 +216,17 @@ public:
// find an object by index in the list
_ElementType *find(int index) const
{
- for (_ElementType *cur = m_head; cur != NULL; cur = cur->m_next)
+ for (_ElementType *cur = m_head; cur != nullptr; cur = cur->m_next)
if (index-- == 0)
return cur;
- return NULL;
+ return nullptr;
}
// return the index of the given object in the list
int indexof(const _ElementType &object) const
{
int index = 0;
- for (_ElementType *cur = m_head; cur != NULL; cur = cur->m_next)
+ for (_ElementType *cur = m_head; cur != nullptr; cur = cur->m_next)
{
if (cur == &object)
return index;
@@ -256,7 +256,7 @@ public:
// construction/destruction
simple_list_wrapper(_ObjectType *object)
- : m_next(NULL),
+ : m_next(nullptr),
m_object(object) { }
// operators
@@ -294,13 +294,13 @@ public:
_ItemType *alloc()
{
_ItemType *result = m_freelist.detach_head();
- if (result == NULL)
+ if (result == nullptr)
result = global_alloc(_ItemType);
return result;
}
// reclaim an item by adding it to the free list
- void reclaim(_ItemType *item) { if (item != NULL) m_freelist.append(*item); }
+ void reclaim(_ItemType *item) { if (item != nullptr) m_freelist.append(*item); }
void reclaim(_ItemType &item) { m_freelist.append(item); }
// reclaim all items from a list
diff --git a/src/lib/util/cstrpool.cpp b/src/lib/util/cstrpool.cpp
index dfb41e25232..242c33380de 100644
--- a/src/lib/util/cstrpool.cpp
+++ b/src/lib/util/cstrpool.cpp
@@ -37,16 +37,16 @@ const char *const_string_pool::add(const char *string)
return string;
// scan to find space
- for (pool_chunk *chunk = m_chunklist.first(); chunk != NULL; chunk = chunk->next())
+ for (pool_chunk *chunk = m_chunklist.first(); chunk != nullptr; chunk = chunk->next())
{
const char *result = chunk->add(string);
- if (result != NULL)
+ if (result != nullptr)
return result;
}
// no space anywhere, create a new pool and prepend it (so it gets used first)
const char *result = m_chunklist.prepend(*global_alloc(pool_chunk)).add(string);
- assert(result != NULL);
+ assert(result != nullptr);
return result;
}
@@ -63,7 +63,7 @@ bool const_string_pool::contains(const char *string)
return true;
// scan to find it
- for (pool_chunk *chunk = m_chunklist.first(); chunk != NULL; chunk = chunk->next())
+ for (pool_chunk *chunk = m_chunklist.first(); chunk != nullptr; chunk = chunk->next())
if (chunk->contains(string))
return true;
@@ -79,7 +79,7 @@ bool const_string_pool::contains(const char *string)
*/
const_string_pool::pool_chunk::pool_chunk()
- : m_next(NULL),
+ : m_next(nullptr),
m_used(0)
{
}
@@ -104,7 +104,7 @@ const char *const_string_pool::pool_chunk::add(const char *string)
// if too big, return NULL
if (m_used + bytes > POOL_SIZE)
- return NULL;
+ return nullptr;
// allocate, copy, and return the memory
char *dest = &m_buffer[m_used];
diff --git a/src/lib/util/delegate.h b/src/lib/util/delegate.h
index 85a1628409c..ec10a5c268d 100644
--- a/src/lib/util/delegate.h
+++ b/src/lib/util/delegate.h
@@ -631,16 +631,16 @@ public:
typedef MEMBER_ABI generic_static_func generic_member_func;
// generic constructor
delegate_base()
- : m_function(NULL),
- m_object(NULL),
- m_name(NULL),
- m_latebinder(NULL),
- m_raw_function(NULL) { }
+ : m_function(nullptr),
+ m_object(nullptr),
+ m_name(nullptr),
+ m_latebinder(nullptr),
+ m_raw_function(nullptr) { }
// copy constructor
delegate_base(const delegate_base &src)
: m_function(src.m_function),
- m_object(NULL),
+ m_object(nullptr),
m_name(src.m_name),
m_latebinder(src.m_latebinder),
m_raw_function(src.m_raw_function),
@@ -652,7 +652,7 @@ public:
// copy constructor with late bind
delegate_base(const delegate_base &src, delegate_late_bind &object)
: m_function(src.m_function),
- m_object(NULL),
+ m_object(nullptr),
m_name(src.m_name),
m_latebinder(src.m_latebinder),
m_raw_function(src.m_raw_function),
@@ -664,12 +664,12 @@ public:
// construct from member function with object pointer
template<class _FunctionClass>
delegate_base(typename traits<_FunctionClass>::member_func_type funcptr, const char *name, _FunctionClass *object)
- : m_function(NULL),
- m_object(NULL),
+ : m_function(nullptr),
+ m_object(nullptr),
m_name(name),
m_latebinder(&late_bind_helper<_FunctionClass>),
- m_raw_function(NULL),
- m_raw_mfp(funcptr, object, (_ReturnType *)0, (generic_static_func)0)
+ m_raw_function(nullptr),
+ m_raw_mfp(funcptr, object, (_ReturnType *)nullptr, (generic_static_func)nullptr)
{
bind(reinterpret_cast<delegate_generic_class *>(object));
}
@@ -678,7 +678,7 @@ public:
template<class _FunctionClass>
delegate_base(typename traits<_FunctionClass>::static_func_type funcptr, const char *name, _FunctionClass *object)
: m_function(reinterpret_cast<generic_static_func>(funcptr)),
- m_object(NULL),
+ m_object(nullptr),
m_name(name),
m_latebinder(&late_bind_helper<_FunctionClass>),
m_raw_function(reinterpret_cast<generic_static_func>(funcptr))
@@ -690,7 +690,7 @@ public:
template<class _FunctionClass>
delegate_base(typename traits<_FunctionClass>::static_ref_func_type funcptr, const char *name, _FunctionClass *object)
: m_function(reinterpret_cast<generic_static_func>(funcptr)),
- m_object(NULL),
+ m_object(nullptr),
m_name(name),
m_latebinder(&late_bind_helper<_FunctionClass>),
m_raw_function(reinterpret_cast<generic_static_func>(funcptr))
@@ -704,7 +704,7 @@ public:
if (this != &src)
{
m_function = src.m_function;
- m_object = NULL;
+ m_object = nullptr;
m_name = src.m_name;
m_latebinder = src.m_latebinder;
m_raw_function = src.m_raw_function;
@@ -744,11 +744,11 @@ public:
_ReturnType operator()(_P1Type p1, _P2Type p2, _P3Type p3, _P4Type p4, _P5Type p5, _P6Type p6, _P7Type p7, _P8Type p8, _P9Type p9, _P10Type p10, _P11Type p11, _P12Type p12) const { DELEGATE_CALL((m_object, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12)); }
// getters
- bool has_object() const { return (object() != NULL); }
+ bool has_object() const { return (object() != nullptr); }
const char *name() const { return m_name; }
// helpers
- bool isnull() const { return (m_raw_function == NULL && m_raw_mfp.isnull()); }
+ bool isnull() const { return (m_raw_function == nullptr && m_raw_mfp.isnull()); }
bool is_mfp() const { return !m_raw_mfp.isnull(); }
// late binding
@@ -766,7 +766,7 @@ protected:
static delegate_generic_class *late_bind_helper(delegate_late_bind &object)
{
_FunctionClass *result = dynamic_cast<_FunctionClass *>(&object);
- if (result == NULL) {
+ if (result == nullptr) {
throw binding_type_exception(typeid(_FunctionClass), typeid(object));
}
return reinterpret_cast<delegate_generic_class *>(result);
@@ -778,7 +778,7 @@ protected:
m_object = object;
// if we're wrapping a member function pointer, handle special stuff
- if (m_object != NULL && is_mfp())
+ if (m_object != nullptr && is_mfp())
m_raw_mfp.update_after_bind(m_function, m_object);
}
diff --git a/src/lib/util/flac.cpp b/src/lib/util/flac.cpp
index 49fc667a184..f70ae709978 100644
--- a/src/lib/util/flac.cpp
+++ b/src/lib/util/flac.cpp
@@ -78,7 +78,7 @@ bool flac_encoder::reset()
FLAC__stream_encoder_set_blocksize(m_encoder, m_block_size);
// re-start processing
- return (FLAC__stream_encoder_init_stream(m_encoder, write_callback_static, NULL, NULL, NULL, this) == FLAC__STREAM_ENCODER_INIT_STATUS_OK);
+ return (FLAC__stream_encoder_init_stream(m_encoder, write_callback_static, nullptr, nullptr, nullptr, this) == FLAC__STREAM_ENCODER_INIT_STATUS_OK);
}
@@ -91,7 +91,7 @@ bool flac_encoder::reset(void *buffer, UINT32 buflength)
// configure the output
m_compressed_start = reinterpret_cast<FLAC__byte *>(buffer);
m_compressed_length = buflength;
- m_file = NULL;
+ m_file = nullptr;
return reset();
}
@@ -103,7 +103,7 @@ bool flac_encoder::reset(void *buffer, UINT32 buflength)
bool flac_encoder::reset(core_file &file)
{
// configure the output
- m_compressed_start = NULL;
+ m_compressed_start = nullptr;
m_compressed_length = 0;
m_file = &file;
return reset();
@@ -185,7 +185,7 @@ UINT32 flac_encoder::finish()
{
// process the data and return the amount written
FLAC__stream_encoder_finish(m_encoder);
- return (m_file != NULL) ? core_ftell(m_file) : m_compressed_offset;
+ return (m_file != nullptr) ? core_ftell(m_file) : m_compressed_offset;
}
@@ -197,13 +197,13 @@ void flac_encoder::init_common()
{
// allocate the encoder
m_encoder = FLAC__stream_encoder_new();
- if (m_encoder == NULL)
+ if (m_encoder == nullptr)
throw std::bad_alloc();
// initialize default state
- m_file = NULL;
+ m_file = nullptr;
m_compressed_offset = 0;
- m_compressed_start = NULL;
+ m_compressed_start = nullptr;
m_compressed_length = 0;
m_sample_rate = 44100;
m_channels = 2;
@@ -251,7 +251,7 @@ FLAC__StreamEncoderWriteStatus flac_encoder::write_callback(const FLAC__byte buf
else
{
int count = bytes - offset;
- if (m_file != NULL)
+ if (m_file != nullptr)
core_fwrite(m_file, buffer, count);
else
{
@@ -277,11 +277,11 @@ FLAC__StreamEncoderWriteStatus flac_encoder::write_callback(const FLAC__byte buf
flac_decoder::flac_decoder()
: m_decoder(FLAC__stream_decoder_new()),
- m_file(NULL),
+ m_file(nullptr),
m_compressed_offset(0),
- m_compressed_start(NULL),
+ m_compressed_start(nullptr),
m_compressed_length(0),
- m_compressed2_start(NULL),
+ m_compressed2_start(nullptr),
m_compressed2_length(0)
{
}
@@ -293,7 +293,7 @@ flac_decoder::flac_decoder()
flac_decoder::flac_decoder(const void *buffer, UINT32 length, const void *buffer2, UINT32 length2)
: m_decoder(FLAC__stream_decoder_new()),
- m_file(NULL),
+ m_file(nullptr),
m_compressed_offset(0),
m_compressed_start(reinterpret_cast<const FLAC__byte *>(buffer)),
m_compressed_length(length),
@@ -312,9 +312,9 @@ flac_decoder::flac_decoder(core_file &file)
: m_decoder(FLAC__stream_decoder_new()),
m_file(&file),
m_compressed_offset(0),
- m_compressed_start(NULL),
+ m_compressed_start(nullptr),
m_compressed_length(0),
- m_compressed2_start(NULL),
+ m_compressed2_start(nullptr),
m_compressed2_length(0)
{
reset();
@@ -341,10 +341,10 @@ bool flac_decoder::reset()
m_compressed_offset = 0;
if (FLAC__stream_decoder_init_stream(m_decoder,
&flac_decoder::read_callback_static,
- NULL,
+ nullptr,
&flac_decoder::tell_callback_static,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
&flac_decoder::write_callback_static,
&flac_decoder::metadata_callback_static,
&flac_decoder::error_callback_static, this) != FLAC__STREAM_DECODER_INIT_STATUS_OK)
@@ -359,7 +359,7 @@ bool flac_decoder::reset()
bool flac_decoder::reset(const void *buffer, UINT32 length, const void *buffer2, UINT32 length2)
{
- m_file = NULL;
+ m_file = nullptr;
m_compressed_start = reinterpret_cast<const FLAC__byte *>(buffer);
m_compressed_length = length;
m_compressed2_start = reinterpret_cast<const FLAC__byte *>(buffer2);
@@ -401,7 +401,7 @@ bool flac_decoder::reset(UINT32 sample_rate, UINT8 num_channels, UINT32 block_si
m_custom_header[0x14] = (sample_rate << 4) | ((num_channels - 1) << 1);
// configure the header ahead of the provided buffer
- m_file = NULL;
+ m_file = nullptr;
m_compressed_start = reinterpret_cast<const FLAC__byte *>(m_custom_header);
m_compressed_length = sizeof(m_custom_header);
m_compressed2_start = reinterpret_cast<const FLAC__byte *>(buffer);
@@ -417,9 +417,9 @@ bool flac_decoder::reset(UINT32 sample_rate, UINT8 num_channels, UINT32 block_si
bool flac_decoder::reset(core_file &file)
{
m_file = &file;
- m_compressed_start = NULL;
+ m_compressed_start = nullptr;
m_compressed_length = 0;
- m_compressed2_start = NULL;
+ m_compressed2_start = nullptr;
m_compressed2_length = 0;
return reset();
}
@@ -510,7 +510,7 @@ FLAC__StreamDecoderReadStatus flac_decoder::read_callback(FLAC__byte buffer[], s
UINT32 expected = *bytes;
// if a file, just read
- if (m_file != NULL)
+ if (m_file != nullptr)
*bytes = core_fread(m_file, buffer, expected);
// otherwise, copy from memory
@@ -589,7 +589,7 @@ FLAC__StreamDecoderWriteStatus flac_decoder::write_callback(const ::FLAC__Frame
// interleaved case
int shift = m_uncompressed_swap ? 8 : 0;
int blocksize = frame->header.blocksize;
- if (m_uncompressed_start[1] == NULL)
+ if (m_uncompressed_start[1] == nullptr)
{
INT16 *dest = m_uncompressed_start[0] + m_uncompressed_offset * frame->header.channels;
for (int sampnum = 0; sampnum < blocksize && m_uncompressed_offset < m_uncompressed_length; sampnum++, m_uncompressed_offset++)
@@ -602,7 +602,7 @@ FLAC__StreamDecoderWriteStatus flac_decoder::write_callback(const ::FLAC__Frame
{
for (int sampnum = 0; sampnum < blocksize && m_uncompressed_offset < m_uncompressed_length; sampnum++, m_uncompressed_offset++)
for (int chan = 0; chan < frame->header.channels; chan++)
- if (m_uncompressed_start[chan] != NULL)
+ if (m_uncompressed_start[chan] != nullptr)
m_uncompressed_start[chan][m_uncompressed_offset] = INT16((UINT16(buffer[chan][sampnum]) << shift) | (UINT16(buffer[chan][sampnum]) >> shift));
}
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
diff --git a/src/lib/util/flac.h b/src/lib/util/flac.h
index 24290b7649e..563c40974e0 100644
--- a/src/lib/util/flac.h
+++ b/src/lib/util/flac.h
@@ -92,7 +92,7 @@ class flac_decoder
public:
// construction/destruction
flac_decoder();
- flac_decoder(const void *buffer, UINT32 length, const void *buffer2 = NULL, UINT32 length2 = 0);
+ flac_decoder(const void *buffer, UINT32 length, const void *buffer2 = nullptr, UINT32 length2 = 0);
flac_decoder(core_file &file);
~flac_decoder();
@@ -106,7 +106,7 @@ public:
// reset
bool reset();
- bool reset(const void *buffer, UINT32 length, const void *buffer2 = NULL, UINT32 length2 = 0);
+ bool reset(const void *buffer, UINT32 length, const void *buffer2 = nullptr, UINT32 length2 = 0);
bool reset(UINT32 sample_rate, UINT8 num_channels, UINT32 block_size, const void *buffer, UINT32 length);
bool reset(core_file &file);
diff --git a/src/lib/util/harddisk.cpp b/src/lib/util/harddisk.cpp
index b1082f3234f..6bb121f36b2 100644
--- a/src/lib/util/harddisk.cpp
+++ b/src/lib/util/harddisk.cpp
@@ -44,22 +44,22 @@ hard_disk_file *hard_disk_open(chd_file *chd)
chd_error err;
/* punt if no CHD */
- if (chd == NULL)
- return NULL;
+ if (chd == nullptr)
+ return nullptr;
/* read the hard disk metadata */
err = chd->read_metadata(HARD_DISK_METADATA_TAG, 0, metadata);
if (err != CHDERR_NONE)
- return NULL;
+ return nullptr;
/* parse the metadata */
if (sscanf(metadata.c_str(), HARD_DISK_METADATA_FORMAT, &cylinders, &heads, &sectors, &sectorbytes) != 4)
- return NULL;
+ return nullptr;
/* allocate memory for the hard disk file */
file = (hard_disk_file *)malloc(sizeof(hard_disk_file));
- if (file == NULL)
- return NULL;
+ if (file == nullptr)
+ return nullptr;
/* fill in the data */
file->chd = chd;
diff --git a/src/lib/util/hashing.cpp b/src/lib/util/hashing.cpp
index e7f315ecc53..785127e01e8 100644
--- a/src/lib/util/hashing.cpp
+++ b/src/lib/util/hashing.cpp
@@ -63,13 +63,13 @@ bool sha1_t::from_string(const char *string, int length)
return false;
// iterate through our raw buffer
- for (int bytenum = 0; bytenum < sizeof(m_raw); bytenum++)
+ for (auto & elem : m_raw)
{
int upper = char_to_hex(*string++);
int lower = char_to_hex(*string++);
if (upper == -1 || lower == -1)
return false;
- m_raw[bytenum] = (upper << 4) | lower;
+ elem = (upper << 4) | lower;
}
return true;
}
@@ -82,8 +82,8 @@ bool sha1_t::from_string(const char *string, int length)
const char *sha1_t::as_string(std::string &buffer) const
{
buffer.clear();
- for (int i = 0; i < ARRAY_LENGTH(m_raw); i++)
- strcatprintf(buffer, "%02x", m_raw[i]);
+ for (auto & elem : m_raw)
+ strcatprintf(buffer, "%02x", elem);
return buffer.c_str();
}
@@ -106,13 +106,13 @@ bool md5_t::from_string(const char *string, int length)
return false;
// iterate through our raw buffer
- for (int bytenum = 0; bytenum < sizeof(m_raw); bytenum++)
+ for (auto & elem : m_raw)
{
int upper = char_to_hex(*string++);
int lower = char_to_hex(*string++);
if (upper == -1 || lower == -1)
return false;
- m_raw[bytenum] = (upper << 4) | lower;
+ elem = (upper << 4) | lower;
}
return true;
}
@@ -125,8 +125,8 @@ bool md5_t::from_string(const char *string, int length)
const char *md5_t::as_string(std::string &buffer) const
{
buffer.clear();
- for (int i = 0; i < ARRAY_LENGTH(m_raw); i++)
- strcatprintf(buffer, "%02x", m_raw[i]);
+ for (auto & elem : m_raw)
+ strcatprintf(buffer, "%02x", elem);
return buffer.c_str();
}
diff --git a/src/lib/util/huffman.cpp b/src/lib/util/huffman.cpp
index 9205264f9eb..8aa32bd3b4d 100644
--- a/src/lib/util/huffman.cpp
+++ b/src/lib/util/huffman.cpp
@@ -563,7 +563,7 @@ int huffman_context_base::build_tree(UINT32 totaldata, UINT32 totalweight)
// create new node
node_t &newnode = m_huffnode[nextalloc++];
- newnode.m_parent = NULL;
+ newnode.m_parent = nullptr;
node0.m_parent = node1.m_parent = &newnode;
newnode.m_weight = node0.m_weight + node1.m_weight;
@@ -591,7 +591,7 @@ int huffman_context_base::build_tree(UINT32 totaldata, UINT32 totalweight)
if (node.m_weight > 0)
{
// determine the number of bits for this node
- for (node_t *curnode = &node; curnode->m_parent != NULL; curnode = curnode->m_parent)
+ for (node_t *curnode = &node; curnode->m_parent != nullptr; curnode = curnode->m_parent)
node.m_numbits++;
if (node.m_numbits == 0)
node.m_numbits = 1;
diff --git a/src/lib/util/huffman.h b/src/lib/util/huffman.h
index 76ee1b9c23b..a2bed42bbf9 100644
--- a/src/lib/util/huffman.h
+++ b/src/lib/util/huffman.h
@@ -98,7 +98,7 @@ class huffman_encoder : public huffman_context_base
public:
// pass through to the underlying constructor
huffman_encoder()
- : huffman_context_base(_NumCodes, _MaxBits, NULL, m_datahisto_array, m_huffnode_array) { histo_reset(); }
+ : huffman_context_base(_NumCodes, _MaxBits, nullptr, m_datahisto_array, m_huffnode_array) { histo_reset(); }
// single item operations
void histo_reset() { memset(m_datahisto_array, 0, sizeof(m_datahisto_array)); }
@@ -126,7 +126,7 @@ class huffman_decoder : public huffman_context_base
public:
// pass through to the underlying constructor
huffman_decoder()
- : huffman_context_base(_NumCodes, _MaxBits, m_lookup_array, NULL, m_huffnode_array) { }
+ : huffman_context_base(_NumCodes, _MaxBits, m_lookup_array, nullptr, m_huffnode_array) { }
// single item operations
UINT32 decode_one(bitstream_in &bitbuf);
diff --git a/src/lib/util/opresolv.cpp b/src/lib/util/opresolv.cpp
index 91c6f1a9cbd..4764d6955e3 100644
--- a/src/lib/util/opresolv.cpp
+++ b/src/lib/util/opresolv.cpp
@@ -116,7 +116,7 @@ static optreserr_t resolve_single_param(const char *specification, int *param_va
range++;
flags &= ~FLAG_HALF_RANGE;
if (--range_count == 0)
- range = NULL;
+ range = nullptr;
}
}
else if (*s == ';')
@@ -179,14 +179,14 @@ static const char *lookup_in_specification(const char *specification, const opti
{
const char *s;
s = strchr(specification, option->parameter);
- return s ? s + 1 : NULL;
+ return s ? s + 1 : nullptr;
}
option_resolution *option_resolution_create(const option_guide *guide, const char *specification)
{
- option_resolution *resolution = NULL;
+ option_resolution *resolution = nullptr;
const option_guide *guide_entry;
int option_count;
int opt = -1;
@@ -198,7 +198,7 @@ option_resolution *option_resolution_create(const option_guide *guide, const cha
option_count = option_resolution_countoptions(guide, specification);
/* create a memory pool for this structure */
- pool = pool_alloc_lib(NULL);
+ pool = pool_alloc_lib(nullptr);
if (!pool)
goto outofmemory;
@@ -244,7 +244,7 @@ unexpected:
outofmemory:
if (resolution)
option_resolution_close(resolution);
- return NULL;
+ return nullptr;
}
@@ -255,7 +255,7 @@ optreserr_t option_resolution_add_param(option_resolution *resolution, const cha
int must_resolve;
optreserr_t err;
const char *option_specification;
- struct option_resolution_entry *entry = NULL;
+ struct option_resolution_entry *entry = nullptr;
for (i = 0; i < resolution->option_count; i++)
{
@@ -317,7 +317,7 @@ optreserr_t option_resolution_add_param(option_resolution *resolution, const cha
if (must_resolve)
{
option_specification = lookup_in_specification(resolution->specification, entry->guide_entry);
- err = resolve_single_param(option_specification, &entry->u.int_value, NULL, 0);
+ err = resolve_single_param(option_specification, &entry->u.int_value, nullptr, 0);
if (err)
goto done;
@@ -363,7 +363,7 @@ optreserr_t option_resolution_finish(option_resolution *resolution)
option_specification = lookup_in_specification(resolution->specification, entry->guide_entry);
assert(option_specification);
entry->u.int_value = -1;
- err = resolve_single_param(option_specification, &entry->u.int_value, NULL, 0);
+ err = resolve_single_param(option_specification, &entry->u.int_value, nullptr, 0);
if (err)
return err;
break;
@@ -403,10 +403,10 @@ static const struct option_resolution_entry *option_resolution_lookup_entry(opti
default:
assert(FALSE);
- return NULL;
+ return nullptr;
}
}
- return NULL;
+ return nullptr;
}
@@ -424,7 +424,7 @@ const char *option_resolution_lookup_string(option_resolution *resolution, int o
{
const struct option_resolution_entry *entry;
entry = option_resolution_lookup_entry(resolution, option_char);
- return entry ? entry->u.str_value : NULL;
+ return entry ? entry->u.str_value : nullptr;
}
@@ -440,7 +440,7 @@ const option_guide *option_resolution_find_option(option_resolution *resolution,
{
const struct option_resolution_entry *entry;
entry = option_resolution_lookup_entry(resolution, option_char);
- return entry ? entry->guide_entry : NULL;
+ return entry ? entry->guide_entry : nullptr;
}
@@ -448,7 +448,7 @@ const option_guide *option_resolution_find_option(option_resolution *resolution,
const option_guide *option_resolution_index_option(option_resolution *resolution, int indx)
{
if ((indx < 0) || (indx >= resolution->option_count))
- return NULL;
+ return nullptr;
return resolution->entries[indx].guide_entry;
}
@@ -495,7 +495,7 @@ optreserr_t option_resolution_listranges(const char *specification, int option_c
return OPTIONRESOLUTION_ERROR_SYNTAX;
}
- return resolve_single_param(specification + 1, NULL, range, range_count);
+ return resolve_single_param(specification + 1, nullptr, range, range_count);
}
@@ -513,7 +513,7 @@ optreserr_t option_resolution_getdefault(const char *specification, int option_c
return OPTIONRESOLUTION_ERROR_SYNTAX;
}
- return resolve_single_param(specification + 1, val, NULL, 0);
+ return resolve_single_param(specification + 1, val, nullptr, 0);
}
@@ -549,7 +549,7 @@ optreserr_t option_resolution_isvalidvalue(const char *specification, int option
int option_resolution_contains(const char *specification, int option_char)
{
- return strchr(specification, option_char) != NULL;
+ return strchr(specification, option_char) != nullptr;
}
/**
@@ -578,6 +578,6 @@ const char *option_resolution_error_string(optreserr_t err)
};
if ((err < 0) || (err >= ARRAY_LENGTH(errors)))
- return NULL;
+ return nullptr;
return errors[err];
}
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index 69e7189f50b..0a8ace7d9f3 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -53,7 +53,7 @@ const char *const core_options::s_option_unadorned[MAX_UNADORNED_OPTIONS] =
//-------------------------------------------------
core_options::entry::entry(const char *name, const char *description, UINT32 flags, const char *defvalue)
- : m_next(NULL),
+ : m_next(nullptr),
m_flags(flags),
m_seqid(0),
m_error_reported(false),
@@ -61,7 +61,7 @@ core_options::entry::entry(const char *name, const char *description, UINT32 fla
m_description(description)
{
// copy in the name(s) as appropriate
- if (name != NULL)
+ if (name != nullptr)
{
// first extract any range
std::string namestr(name);
@@ -90,7 +90,7 @@ core_options::entry::entry(const char *name, const char *description, UINT32 fla
}
// set the default value
- if (defvalue != NULL)
+ if (defvalue != nullptr)
m_defdata = defvalue;
m_data = m_defdata;
}
@@ -225,7 +225,7 @@ core_options &core_options::operator=(const core_options &rhs)
bool core_options::operator==(const core_options &rhs)
{
// iterate over options in the first list
- for (entry *curentry = m_entrylist.first(); curentry != NULL; curentry = curentry->next())
+ for (entry *curentry = m_entrylist.first(); curentry != nullptr; curentry = curentry->next())
if (!curentry->is_header())
{
// if the values differ, return false
@@ -255,12 +255,12 @@ bool core_options::operator!=(const core_options &rhs)
void core_options::add_entry(const char *name, const char *description, UINT32 flags, const char *defvalue, bool override_existing)
{
// allocate a new entry
- entry *newentry = global_alloc(entry(name, description, flags, defvalue));
- if (newentry->name() != NULL)
+ auto newentry = global_alloc(entry(name, description, flags, defvalue));
+ if (newentry->name() != nullptr)
{
// see if we match an existing entry
entry *existing = m_entrymap.find(newentry->name());
- if (existing != NULL)
+ if (existing != nullptr)
{
// if we're overriding existing entries, then remove the old one
if (override_existing)
@@ -289,7 +289,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
- for ( ; entrylist->name != NULL || (entrylist->flags & OPTION_HEADER) != 0; entrylist++)
+ for ( ; entrylist->name != nullptr || (entrylist->flags & OPTION_HEADER) != 0; entrylist++)
add_entry(*entrylist, override_existing);
}
@@ -303,7 +303,7 @@ void core_options::set_default_value(const char *name, const char *defvalue)
{
// find the entry and bail if we can't
entry *curentry = m_entrymap.find(name);
- if (curentry == NULL)
+ if (curentry == nullptr)
return;
// update the data and default data
@@ -320,7 +320,7 @@ void core_options::set_description(const char *name, const char *description)
{
// find the entry and bail if we can't
entry *curentry = m_entrymap.find(name);
- if (curentry == NULL)
+ if (curentry == nullptr)
return;
// update the data and default data
@@ -351,7 +351,7 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, std::
// find our entry; if not found, indicate invalid option
entry *curentry = m_entrymap.find(optionname);
- if (curentry == NULL)
+ if (curentry == nullptr)
{
strcatprintf(error_string, "Error: unknown option: %s\n", curarg);
retval = false;
@@ -402,7 +402,7 @@ bool core_options::parse_ini_file(core_file &inifile, int priority, int ignore_p
{
// loop over lines in the file
char buffer[4096];
- while (core_fgets(buffer, ARRAY_LENGTH(buffer), &inifile) != NULL)
+ while (core_fgets(buffer, ARRAY_LENGTH(buffer), &inifile) != nullptr)
{
// find the extent of the name
char *optionname;
@@ -444,7 +444,7 @@ bool core_options::parse_ini_file(core_file &inifile, int priority, int ignore_p
// find our entry
entry *curentry = m_entrymap.find(optionname);
- if (curentry == NULL)
+ if (curentry == nullptr)
{
if (priority >= ignore_priority)
strcatprintf(error_string, "Warning: unknown option in INI: %s\n", optionname);
@@ -466,7 +466,7 @@ bool core_options::parse_ini_file(core_file &inifile, int priority, int ignore_p
void core_options::revert(int priority)
{
// iterate over options and revert to defaults if below the given priority
- for (entry *curentry = m_entrylist.first(); curentry != NULL; curentry = curentry->next())
+ for (entry *curentry = m_entrylist.first(); curentry != nullptr; curentry = curentry->next())
curentry->revert(priority);
}
@@ -484,10 +484,10 @@ const char *core_options::output_ini(std::string &buffer, const core_options *di
int num_valid_headers = 0;
int unadorned_index = 0;
- const char *last_header = NULL;
+ const char *last_header = nullptr;
// loop over all items
- for (entry *curentry = m_entrylist.first(); curentry != NULL; curentry = curentry->next())
+ for (entry *curentry = m_entrylist.first(); curentry != nullptr; curentry = curentry->next())
{
const char *name = curentry->name();
const char *value = curentry->value();
@@ -510,21 +510,21 @@ const char *core_options::output_ini(std::string &buffer, const core_options *di
if ( !curentry->is_internal() )
{
// look up counterpart in diff, if diff is specified
- if (diff == NULL || strcmp(value, diff->value(name)) != 0)
+ if (diff == nullptr || strcmp(value, diff->value(name)) != 0)
{
// output header, if we have one
- if (last_header != NULL)
+ if (last_header != nullptr)
{
if (num_valid_headers++)
strcatprintf(buffer,"\n");
strcatprintf(buffer, "#\n# %s\n#\n", last_header);
- last_header = NULL;
+ last_header = nullptr;
}
// and finally output the data, skip if unadorned
if (!is_unadorned)
{
- if (strchr(value, ' ') != NULL)
+ if (strchr(value, ' ') != nullptr)
strcatprintf(buffer,"%-25s \"%s\"\n", name, value);
else
strcatprintf(buffer,"%-25s %s\n", name, value);
@@ -547,14 +547,14 @@ const char *core_options::output_help(std::string &buffer)
buffer.clear();
// loop over all items
- for (entry *curentry = m_entrylist.first(); curentry != NULL; curentry = curentry->next())
+ for (entry *curentry = m_entrylist.first(); curentry != nullptr; curentry = curentry->next())
{
// header: just print
if (curentry->is_header())
strcatprintf(buffer,"\n#\n# %s\n#\n", curentry->description());
// otherwise, output entries for all non-deprecated items
- else if (curentry->description() != NULL)
+ else if (curentry->description() != nullptr)
strcatprintf(buffer,"-%-20s%s\n", curentry->name(), curentry->description());
}
return buffer.c_str();
@@ -568,7 +568,7 @@ const char *core_options::output_help(std::string &buffer)
const char *core_options::value(const char *name) const
{
entry *curentry = m_entrymap.find(name);
- return (curentry != NULL) ? curentry->value() : "";
+ return (curentry != nullptr) ? curentry->value() : "";
}
@@ -579,7 +579,7 @@ const char *core_options::value(const char *name) const
const char *core_options::description(const char *name) const
{
entry *curentry = m_entrymap.find(name);
- return (curentry != NULL) ? curentry->description() : "";
+ return (curentry != nullptr) ? curentry->description() : "";
}
@@ -590,7 +590,7 @@ const char *core_options::description(const char *name) const
int core_options::priority(const char *name) const
{
entry *curentry = m_entrymap.find(name);
- return (curentry != NULL) ? curentry->priority() : 0;
+ return (curentry != nullptr) ? curentry->priority() : 0;
}
@@ -601,7 +601,7 @@ int core_options::priority(const char *name) const
UINT32 core_options::seqid(const char *name) const
{
entry *curentry = m_entrymap.find(name);
- return (curentry != NULL) ? curentry->seqid() : 0;
+ return (curentry != nullptr) ? curentry->seqid() : 0;
}
//-------------------------------------------------
@@ -611,7 +611,7 @@ UINT32 core_options::seqid(const char *name) const
bool core_options::exists(const char *name) const
{
entry *curentry = m_entrymap.find(name);
- return (curentry != NULL);
+ return (curentry != nullptr);
}
//-------------------------------------------------
@@ -622,7 +622,7 @@ bool core_options::set_value(const char *name, const char *value, int priority,
{
// find the entry first
entry *curentry = m_entrymap.find(name);
- if (curentry == NULL)
+ if (curentry == nullptr)
{
strcatprintf(error_string, "Attempted to set unknown option %s\n", name);
return false;
@@ -651,7 +651,7 @@ void core_options::set_flag(const char *name, UINT32 mask, UINT32 flag)
{
// find the entry first
entry *curentry = m_entrymap.find(name);
- if ( curentry == NULL )
+ if ( curentry == nullptr )
{
return;
}
@@ -682,7 +682,7 @@ void core_options::append_entry(core_options::entry &newentry)
// if we have names, add them to the map
for (int name = 0; name < ARRAY_LENGTH(newentry.m_name); name++)
- if (newentry.name(name) != NULL)
+ if (newentry.name(name) != nullptr)
{
m_entrymap.add(newentry.name(name), &newentry);
@@ -725,7 +725,7 @@ void core_options::copyfrom(const core_options &src)
reset();
// iterate through the src options and make our own
- for (entry *curentry = src.m_entrylist.first(); curentry != NULL; curentry = curentry->next())
+ for (entry *curentry = src.m_entrylist.first(); curentry != nullptr; curentry = curentry->next())
append_entry(*global_alloc(entry(curentry->name(), curentry->description(), curentry->flags(), curentry->default_value())));
}
diff --git a/src/lib/util/options.h b/src/lib/util/options.h
index 1ef4636e1e6..a03e8217abf 100644
--- a/src/lib/util/options.h
+++ b/src/lib/util/options.h
@@ -70,12 +70,12 @@ public:
friend class simple_list<entry>;
// construction/destruction
- entry(const char *name, const char *description, UINT32 flags = 0, const char *defvalue = NULL);
+ entry(const char *name, const char *description, UINT32 flags = 0, const char *defvalue = nullptr);
public:
// getters
entry *next() const { return m_next; }
- const char *name(int index = 0) const { return (index < ARRAY_LENGTH(m_name) && !m_name[index].empty()) ? m_name[index].c_str() : NULL; }
+ const char *name(int index = 0) const { return (index < ARRAY_LENGTH(m_name) && !m_name[index].empty()) ? m_name[index].c_str() : nullptr; }
const char *description() const { return m_description; }
const char *value() const { return m_data.c_str(); }
const char *default_value() const { return m_defdata.c_str(); }
@@ -130,7 +130,7 @@ public:
const char *command() const { return m_command.c_str(); }
// configuration
- void add_entry(const char *name, const char *description, UINT32 flags = 0, const char *defvalue = NULL, bool override_existing = false);
+ void add_entry(const char *name, const char *description, UINT32 flags = 0, const char *defvalue = nullptr, bool override_existing = false);
void add_entry(const options_entry &data, bool override_existing = false) { add_entry(data.name, data.description, data.flags, data.defvalue, override_existing); }
void add_entries(const options_entry *entrylist, bool override_existing = false);
void set_default_value(const char *name, const char *defvalue);
@@ -145,7 +145,7 @@ public:
void revert(int priority = OPTION_PRIORITY_MAXIMUM);
// output
- const char *output_ini(std::string &buffer, const core_options *diff = NULL);
+ const char *output_ini(std::string &buffer, const core_options *diff = nullptr);
const char *output_help(std::string &buffer);
// reading
diff --git a/src/lib/util/palette.cpp b/src/lib/util/palette.cpp
index cafdce24ebd..bd3c2d45ede 100644
--- a/src/lib/util/palette.cpp
+++ b/src/lib/util/palette.cpp
@@ -66,7 +66,7 @@ const UINT32 *palette_client::dirty_state::dirty_list(UINT32 &mindirty, UINT32 &
maxdirty = m_maxdirty;
// if nothing to report, report nothing
- return (m_mindirty > m_maxdirty) ? NULL : &m_dirty[0];
+ return (m_mindirty > m_maxdirty) ? nullptr : &m_dirty[0];
}
@@ -128,7 +128,7 @@ void palette_client::dirty_state::reset()
palette_client::palette_client(palette_t &palette)
: m_palette(palette),
- m_next(NULL),
+ m_next(nullptr),
m_live(&m_dirty[0]),
m_previous(&m_dirty[1])
{
@@ -153,7 +153,7 @@ palette_client::palette_client(palette_t &palette)
palette_client::~palette_client()
{
// first locate and remove ourself from our palette's list
- for (palette_client **curptr = &m_palette.m_client_list; *curptr != NULL; curptr = &(*curptr)->m_next)
+ for (palette_client **curptr = &m_palette.m_client_list; *curptr != nullptr; curptr = &(*curptr)->m_next)
if (*curptr == this)
{
*curptr = m_next;
@@ -174,8 +174,8 @@ const UINT32 *palette_client::dirty_list(UINT32 &mindirty, UINT32 &maxdirty)
{
// if nothing to report, report nothing and don't swap
const UINT32 *result = m_live->dirty_list(mindirty, maxdirty);
- if (result == NULL)
- return NULL;
+ if (result == nullptr)
+ return nullptr;
// swap the live and previous lists
dirty_state *temp = m_live;
@@ -220,7 +220,7 @@ palette_t::palette_t(UINT32 numcolors, UINT32 numgroups)
m_adjusted_rgb15(numcolors * numgroups + 2),
m_group_bright(numgroups),
m_group_contrast(numgroups),
- m_client_list(NULL)
+ m_client_list(nullptr)
{
// initialize gamma map
for (UINT32 index = 0; index < 256; index++)
@@ -556,6 +556,6 @@ void palette_t::update_adjusted_color(UINT32 group, UINT32 index)
m_adjusted_rgb15[finalindex] = adjusted.as_rgb15();
// mark dirty in all clients
- for (palette_client *client = m_client_list; client != NULL; client = client->next())
+ for (palette_client *client = m_client_list; client != nullptr; client = client->next())
client->mark_dirty(finalindex);
}
diff --git a/src/lib/util/png.cpp b/src/lib/util/png.cpp
index 706dfb5e50f..6e57d949f47 100644
--- a/src/lib/util/png.cpp
+++ b/src/lib/util/png.cpp
@@ -115,26 +115,26 @@ INLINE int compute_rowbytes(const png_info *pnginfo)
void png_free(png_info *pnginfo)
{
- while (pnginfo->textlist != NULL)
+ while (pnginfo->textlist != nullptr)
{
png_text *temp = pnginfo->textlist;
pnginfo->textlist = temp->next;
- if (temp->keyword != NULL)
+ if (temp->keyword != nullptr)
free((void *)temp->keyword);
free(temp);
}
- if (pnginfo->palette != NULL)
+ if (pnginfo->palette != nullptr)
free(pnginfo->palette);
- pnginfo->palette = NULL;
+ pnginfo->palette = nullptr;
- if (pnginfo->trans != NULL)
+ if (pnginfo->trans != nullptr)
free(pnginfo->trans);
- pnginfo->trans = NULL;
+ pnginfo->trans = nullptr;
- if (pnginfo->image != NULL)
+ if (pnginfo->image != nullptr)
free(pnginfo->image);
- pnginfo->image = NULL;
+ pnginfo->image = nullptr;
}
@@ -191,19 +191,19 @@ static png_error read_chunk(core_file *fp, UINT8 **data, UINT32 *type, UINT32 *l
crc = crc32(0, tempbuff, 4);
/* read the chunk itself into an allocated memory buffer */
- *data = NULL;
+ *data = nullptr;
if (*length != 0)
{
/* allocate memory for this chunk */
*data = (UINT8 *)malloc(*length);
- if (*data == NULL)
+ if (*data == nullptr)
return PNGERR_OUT_OF_MEMORY;
/* read the data from the file */
if (core_fread(fp, *data, *length) != *length)
{
free(*data);
- *data = NULL;
+ *data = nullptr;
return PNGERR_FILE_TRUNCATED;
}
@@ -215,7 +215,7 @@ static png_error read_chunk(core_file *fp, UINT8 **data, UINT32 *type, UINT32 *l
if (core_fread(fp, tempbuff, 4) != 4)
{
free(*data);
- *data = NULL;
+ *data = nullptr;
return PNGERR_FILE_TRUNCATED;
}
chunk_crc = fetch_32bit(tempbuff);
@@ -224,7 +224,7 @@ static png_error read_chunk(core_file *fp, UINT8 **data, UINT32 *type, UINT32 *l
if (crc != chunk_crc)
{
free(*data);
- *data = NULL;
+ *data = nullptr;
return PNGERR_FILE_CORRUPT;
}
return PNGERR_NONE;
@@ -273,11 +273,11 @@ static png_error process_chunk(png_private *png, UINT8 *data, UINT32 type, UINT3
/* allocate a new image data descriptor */
*png->idata_next = (image_data_chunk *)malloc(sizeof(**png->idata_next));
- if (*png->idata_next == NULL)
+ if (*png->idata_next == nullptr)
return PNGERR_OUT_OF_MEMORY;
/* add it to the tail of the list */
- (*png->idata_next)->next = NULL;
+ (*png->idata_next)->next = nullptr;
(*png->idata_next)->length = length;
(*png->idata_next)->data = data;
png->idata_next = &(*png->idata_next)->next;
@@ -303,17 +303,17 @@ static png_error process_chunk(png_private *png, UINT8 *data, UINT32 type, UINT3
/* allocate a new text item */
text = (png_text *)malloc(sizeof(*text));
- if (text == NULL)
+ if (text == nullptr)
return PNGERR_OUT_OF_MEMORY;
/* set the elements */
text->keyword = (char *)data;
text->text = text->keyword + strlen(text->keyword) + 1;
- text->next = NULL;
+ text->next = nullptr;
/* add to the end of the list */
- for (pt = NULL, ct = png->pnginfo->textlist; ct != NULL; pt = ct, ct = ct->next) ;
- if (pt == NULL)
+ for (pt = nullptr, ct = png->pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) ;
+ if (pt == nullptr)
png->pnginfo->textlist = text;
else
pt->next = text;
@@ -359,7 +359,7 @@ static png_error unfilter_row(int type, UINT8 *src, UINT8 *dst, UINT8 *dstprev,
/* UP = pixel above */
case PNG_PF_Up:
- if (dstprev == NULL)
+ if (dstprev == nullptr)
return unfilter_row(PNG_PF_None, src, dst, dstprev, bpp, rowbytes);
for (x = 0; x < rowbytes; x++, dst++)
*dst = *src++ + *dstprev++;
@@ -367,7 +367,7 @@ static png_error unfilter_row(int type, UINT8 *src, UINT8 *dst, UINT8 *dstprev,
/* AVERAGE = average of pixel above and previous pixel */
case PNG_PF_Average:
- if (dstprev == NULL)
+ if (dstprev == nullptr)
{
for (x = 0; x < bpp; x++)
*dst++ = *src++;
@@ -388,8 +388,8 @@ static png_error unfilter_row(int type, UINT8 *src, UINT8 *dst, UINT8 *dstprev,
for (x = 0; x < rowbytes; x++)
{
INT32 pa = (x < bpp) ? 0 : dst[-bpp];
- INT32 pc = (x < bpp || dstprev == NULL) ? 0 : dstprev[-bpp];
- INT32 pb = (dstprev == NULL) ? 0 : *dstprev++;
+ INT32 pc = (x < bpp || dstprev == nullptr) ? 0 : dstprev[-bpp];
+ INT32 pb = (dstprev == nullptr) ? 0 : *dstprev++;
INT32 prediction = pa + pb - pc;
INT32 da = abs(prediction - pa);
INT32 db = abs(prediction - pb);
@@ -432,7 +432,7 @@ static png_error process_image(png_private *png)
/* allocate memory for the filtered image */
png->pnginfo->image = (UINT8 *)malloc(imagesize);
- if (png->pnginfo->image == NULL)
+ if (png->pnginfo->image == nullptr)
return PNGERR_OUT_OF_MEMORY;
/* initialize the stream */
@@ -447,7 +447,7 @@ static png_error process_image(png_private *png)
}
/* loop over IDAT and decompress each as part of a larger stream */
- for (idat = png->idata; idat != NULL; idat = idat->next)
+ for (idat = png->idata; idat != nullptr; idat = idat->next)
{
/* decompress this chunk */
stream.next_in = idat->data;
@@ -482,7 +482,7 @@ static png_error process_image(png_private *png)
{
/* first byte of each row is the filter type */
int filter = *src++;
- error = unfilter_row(filter, src, dst, (y == 0) ? NULL : &dst[-rowbytes], bpp, rowbytes);
+ error = unfilter_row(filter, src, dst, (y == 0) ? nullptr : &dst[-rowbytes], bpp, rowbytes);
src += rowbytes;
dst += rowbytes;
}
@@ -492,7 +492,7 @@ handle_error:
if (error != PNGERR_NONE)
{
free(png->pnginfo->image);
- png->pnginfo->image = NULL;
+ png->pnginfo->image = nullptr;
}
return error;
}
@@ -504,7 +504,7 @@ handle_error:
png_error png_read_file(core_file *fp, png_info *pnginfo)
{
- UINT8 *chunk_data = NULL;
+ UINT8 *chunk_data = nullptr;
png_private png;
png_error error;
@@ -542,7 +542,7 @@ png_error png_read_file(core_file *fp, png_info *pnginfo)
/* free memory if we didn't want to keep it */
if (!keepmem)
free(chunk_data);
- chunk_data = NULL;
+ chunk_data = nullptr;
}
/* finish processing the image */
@@ -553,15 +553,15 @@ png_error png_read_file(core_file *fp, png_info *pnginfo)
handle_error:
/* free all intermediate data */
- while (png.idata != NULL)
+ while (png.idata != nullptr)
{
image_data_chunk *next = png.idata->next;
- if (png.idata->data != NULL)
+ if (png.idata->data != nullptr)
free(png.idata->data);
free(png.idata);
png.idata = next;
}
- if (chunk_data != NULL)
+ if (chunk_data != nullptr)
free(chunk_data);
/* if we have an error, free all the other data as well */
@@ -665,7 +665,7 @@ png_error png_expand_buffer_8bit(png_info *pnginfo)
/* allocate a new buffer at 8-bit */
outbuf = (UINT8 *)malloc(pnginfo->width * pnginfo->height);
- if (outbuf == NULL)
+ if (outbuf == nullptr)
return PNGERR_OUT_OF_MEMORY;
inp = pnginfo->image;
@@ -710,13 +710,13 @@ png_error png_add_text(png_info *pnginfo, const char *keyword, const char *text)
/* allocate a new text element */
newtext = (png_text *)malloc(sizeof(*newtext));
- if (newtext == NULL)
+ if (newtext == nullptr)
return PNGERR_OUT_OF_MEMORY;
/* allocate a string long enough to hold both */
keylen = (int)strlen(keyword);
textdata = (char *)malloc(keylen + 1 + strlen(text) + 1);
- if (textdata == NULL)
+ if (textdata == nullptr)
{
free(newtext);
return PNGERR_OUT_OF_MEMORY;
@@ -729,11 +729,11 @@ png_error png_add_text(png_info *pnginfo, const char *keyword, const char *text)
/* text follows a trailing NULL */
newtext->keyword = textdata;
newtext->text = textdata + keylen + 1;
- newtext->next = NULL;
+ newtext->next = nullptr;
/* add us to the end of the linked list */
- for (pt = NULL, ct = pnginfo->textlist; ct != NULL; pt = ct, ct = ct->next) ;
- if (pt == NULL)
+ for (pt = nullptr, ct = pnginfo->textlist; ct != nullptr; pt = ct, ct = ct->next) ;
+ if (pt == nullptr)
pnginfo->textlist = newtext;
else
pt->next = newtext;
@@ -884,7 +884,7 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
/* allocate memory for the palette */
pnginfo->palette = (UINT8 *)malloc(3 * 256);
- if (pnginfo->palette == NULL)
+ if (pnginfo->palette == nullptr)
return PNGERR_OUT_OF_MEMORY;
/* build the palette */
@@ -899,7 +899,7 @@ static png_error convert_bitmap_to_image_palette(png_info *pnginfo, const bitmap
/* allocate memory for the image */
pnginfo->image = (UINT8 *)malloc(pnginfo->height * (rowbytes + 1));
- if (pnginfo->image == NULL)
+ if (pnginfo->image == nullptr)
{
free(pnginfo->palette);
return PNGERR_OUT_OF_MEMORY;
@@ -941,7 +941,7 @@ static png_error convert_bitmap_to_image_rgb(png_info *pnginfo, const bitmap_t &
/* allocate memory for the image */
pnginfo->image = (UINT8 *)malloc(pnginfo->height * (rowbytes + 1));
- if (pnginfo->image == NULL)
+ if (pnginfo->image == nullptr)
return PNGERR_OUT_OF_MEMORY;
/* copy in the pixels, specifying a NULL filter */
@@ -1046,7 +1046,7 @@ static png_error write_png_stream(core_file *fp, png_info *pnginfo, const bitmap
goto handle_error;
/* write TEXT chunks */
- for (text = pnginfo->textlist; text != NULL; text = text->next)
+ for (text = pnginfo->textlist; text != nullptr; text = text->next)
{
error = write_chunk(fp, (UINT8 *)text->keyword, PNG_CN_tEXt, (UINT32)strlen(text->keyword) + 1 + (UINT32)strlen(text->text));
if (error != PNGERR_NONE)
@@ -1054,7 +1054,7 @@ static png_error write_png_stream(core_file *fp, png_info *pnginfo, const bitmap
}
/* write an IEND chunk */
- error = write_chunk(fp, NULL, PNG_CN_IEND, 0);
+ error = write_chunk(fp, nullptr, PNG_CN_IEND, 0);
handle_error:
return error;
@@ -1067,7 +1067,7 @@ png_error png_write_bitmap(core_file *fp, png_info *info, bitmap_t &bitmap, int
png_error error;
/* use a dummy pnginfo if none passed to us */
- if (info == NULL)
+ if (info == nullptr)
{
info = &pnginfo;
memset(&pnginfo, 0, sizeof(pnginfo));
@@ -1161,5 +1161,5 @@ png_error mng_capture_frame(core_file *fp, png_info *info, bitmap_t &bitmap, int
png_error mng_capture_stop(core_file *fp)
{
- return write_chunk(fp, NULL, MNG_CN_MEND, 0);
+ return write_chunk(fp, nullptr, MNG_CN_MEND, 0);
}
diff --git a/src/lib/util/pool.cpp b/src/lib/util/pool.cpp
index ab62f47c6aa..e004f236b76 100644
--- a/src/lib/util/pool.cpp
+++ b/src/lib/util/pool.cpp
@@ -115,11 +115,11 @@ INLINE objtype_entry *get_object_type(object_pool *pool, object_type type)
{
objtype_entry *entry;
- for (entry = pool->typelist; entry != NULL; entry = entry->next)
+ for (entry = pool->typelist; entry != nullptr; entry = entry->next)
if (entry->type == type)
return entry;
- return NULL;
+ return nullptr;
}
@@ -138,8 +138,8 @@ object_pool *pool_alloc_lib(void (*fail)(const char *message))
/* allocate memory for the pool itself */
pool = (object_pool *)malloc(sizeof(*pool));
- if (pool == NULL)
- return NULL;
+ if (pool == nullptr)
+ return nullptr;
memset(pool, 0, sizeof(*pool));
/* set the failure handler */
@@ -162,11 +162,11 @@ void pool_type_register(object_pool *pool, object_type type, const char *friendl
objtype_entry *newtype = get_object_type(pool, type);
/* if the type doesn't already exist... */
- if (newtype == NULL)
+ if (newtype == nullptr)
{
/* allocate a new entry */
newtype = (objtype_entry *)malloc(sizeof(*newtype));
- if (newtype == NULL)
+ if (newtype == nullptr)
{
report_failure(pool, "Error adding new type %s\n", friendly);
return;
@@ -195,7 +195,7 @@ void pool_clear(object_pool *pool)
object_entry *entry, *next;
/* iterate over all entries in the global list and free them */
- for (entry = pool->globallist; entry != NULL; entry = next)
+ for (entry = pool->globallist; entry != nullptr; entry = next)
{
/* remember the next entry */
next = entry->globalnext;
@@ -205,7 +205,7 @@ void pool_clear(object_pool *pool)
/* add ourself to the free list */
entry->next = pool->freelist;
- entry->globalnext = entry->globalprev = NULL;
+ entry->globalnext = entry->globalprev = nullptr;
pool->freelist = entry;
}
@@ -228,14 +228,14 @@ void pool_free_lib(object_pool *pool)
pool_clear(pool);
/* free all entry blocks */
- for (block = pool->blocklist; block != NULL; block = nextblock)
+ for (block = pool->blocklist; block != nullptr; block = nextblock)
{
nextblock = block->next;
free(block);
}
/* free all types */
- for (type = pool->typelist; type != NULL; type = nexttype)
+ for (type = pool->typelist; type != nullptr; type = nexttype)
{
nexttype = type->next;
free(type);
@@ -263,29 +263,29 @@ void *pool_object_add_file_line(object_pool *pool, object_type _type, void *obje
object_entry *entry;
/* if we have an invalid type, fail */
- if (type == NULL)
+ if (type == nullptr)
{
report_failure(pool, "pool_object_add (via %s:%d): Attempted to add object of unknown type with size %d", file, line, (int)size);
return object;
}
/* if we get a NULL object, fail */
- if (object == NULL)
+ 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);
return object;
}
/* allocate a new entry */
- if (pool->freelist == NULL)
+ if (pool->freelist == nullptr)
{
object_entry_block *block;
int entrynum;
/* if we need a new block, allocate that now */
block = (object_entry_block *)malloc(sizeof(*block));
- if (block == NULL)
- return NULL;
+ if (block == nullptr)
+ return nullptr;
memset(block, 0, sizeof(*block));
/* hook us into the blocklist */
@@ -312,9 +312,9 @@ void *pool_object_add_file_line(object_pool *pool, object_type _type, void *obje
entry->line = line;
/* hook us into the global list */
- if (pool->globallist != NULL)
+ if (pool->globallist != nullptr)
pool->globallist->globalprev = entry;
- entry->globalprev = NULL;
+ entry->globalprev = nullptr;
entry->globalnext = pool->globallist;
pool->globallist = entry;
@@ -336,7 +336,7 @@ void *pool_object_remove(object_pool *pool, void *object, int destruct)
object_entry **entryptr;
/* find the object in question and remove it */
- for (entryptr = &pool->hashtable[hashnum]; *entryptr != NULL; entryptr = &(*entryptr)->next)
+ for (entryptr = &pool->hashtable[hashnum]; *entryptr != nullptr; entryptr = &(*entryptr)->next)
if ((*entryptr)->object == object)
{
object_entry *entry = *entryptr;
@@ -346,9 +346,9 @@ void *pool_object_remove(object_pool *pool, void *object, int destruct)
(*entry->type->destructor)(entry->object, entry->size);
/* remove us from the global list */
- if (entry->globalprev != NULL)
+ if (entry->globalprev != nullptr)
entry->globalprev->globalnext = entry->globalnext;
- if (entry->globalnext != NULL)
+ if (entry->globalnext != nullptr)
entry->globalnext->globalprev = entry->globalprev;
if (pool->globallist == entry)
pool->globallist = entry->globalnext;
@@ -362,7 +362,7 @@ void *pool_object_remove(object_pool *pool, void *object, int destruct)
break;
}
- return NULL;
+ return nullptr;
}
@@ -377,7 +377,7 @@ int pool_object_exists(object_pool *pool, object_type type, void *object)
object_entry *entry;
/* find the object in question */
- for (entry = pool->hashtable[hashnum]; entry != NULL; entry = entry->next)
+ for (entry = pool->hashtable[hashnum]; entry != nullptr; entry = entry->next)
if (entry->object == object && (type == OBJTYPE_WILDCARD || entry->type->type == type))
return TRUE;
@@ -401,14 +401,14 @@ object_pool_iterator *pool_iterate_begin(object_pool *pool, object_type type)
/* allocate the iterator */
iter = (object_pool_iterator *)malloc(sizeof(*iter));
- if (iter == NULL)
- return NULL;
+ if (iter == nullptr)
+ return nullptr;
memset(iter, 0, sizeof(*iter));
/* fill it in */
iter->pool = pool;
iter->type = type;
- iter->last = NULL;
+ iter->last = nullptr;
return iter;
}
@@ -421,19 +421,19 @@ object_pool_iterator *pool_iterate_begin(object_pool *pool, object_type type)
int pool_iterate_next(object_pool_iterator *iter, void **objectptr, size_t *sizeptr, object_type *typeptr)
{
/* if no previous entry, find the first */
- if (iter->last == NULL)
+ if (iter->last == nullptr)
iter->last = iter->pool->globallist;
else
iter->last = iter->last->globalnext;
/* stop when we get one */
- if (iter->last != NULL)
+ if (iter->last != nullptr)
{
- if (objectptr != NULL)
+ if (objectptr != nullptr)
*objectptr = iter->last;
- if (sizeptr != NULL)
+ if (sizeptr != nullptr)
*sizeptr = iter->last->size;
- if (typeptr != NULL)
+ if (typeptr != nullptr)
*typeptr = iter->last->type->type;
return TRUE;
}
@@ -478,7 +478,7 @@ void *pool_malloc_file_line(object_pool *pool, size_t size, const char *file, in
void *pool_realloc_file_line(object_pool *pool, void *ptr, size_t size, const char *file, int line)
{
- if (ptr != NULL)
+ if (ptr != nullptr)
pool_object_remove(pool, ptr, FALSE);
ptr = realloc(ptr, size);
if (size != 0)
@@ -495,7 +495,7 @@ void *pool_realloc_file_line(object_pool *pool, void *ptr, size_t size, const ch
char *pool_strdup_file_line(object_pool *pool, const char *str, const char *file, int line)
{
char *ptr = (char *)pool_malloc_file_line(pool, strlen(str) + 1, file, line);
- if (ptr != NULL)
+ if (ptr != nullptr)
strcpy(ptr, str);
return ptr;
}
@@ -530,7 +530,7 @@ static void memory_destruct(void *object, size_t size)
static void report_failure(object_pool *pool, const char *format, ...)
{
/* only do the work if we have a callback */
- if (pool->fail != NULL)
+ if (pool->fail != nullptr)
{
char message[1024];
va_list argptr;
diff --git a/src/lib/util/tagmap.h b/src/lib/util/tagmap.h
index 50550f3e6c3..75a67ac67ef 100644
--- a/src/lib/util/tagmap.h
+++ b/src/lib/util/tagmap.h
@@ -16,6 +16,7 @@
#include "osdcore.h"
#include "coretmpl.h"
#include <string>
+#include <utility>
#ifdef MAME_DEBUG
#include "eminline.h"
#endif
@@ -61,10 +62,10 @@ public:
public:
// construction/destruction
entry_t(const char *tag, UINT32 fullhash, _ElementType object)
- : m_next(NULL),
+ : m_next(nullptr),
m_fullhash(fullhash),
m_tag(tag),
- m_object(object) { }
+ m_object(std::move(object)) { }
// accessors
const std::string &tag() const { return m_tag; }
@@ -101,9 +102,9 @@ public:
// empty the list
void reset()
{
- for (UINT32 hashindex = 0; hashindex < ARRAY_LENGTH(m_table); hashindex++)
- while (m_table[hashindex] != NULL)
- remove_common(&m_table[hashindex]);
+ for (auto & elem : m_table)
+ while (elem != nullptr)
+ remove_common(&elem);
}
// add/remove
@@ -114,7 +115,7 @@ public:
void remove(const char *tag)
{
UINT32 fullhash = hash(tag);
- for (entry_t **entryptr = &m_table[fullhash % ARRAY_LENGTH(m_table)]; *entryptr != NULL; entryptr = &(*entryptr)->m_next)
+ for (entry_t **entryptr = &m_table[fullhash % ARRAY_LENGTH(m_table)]; *entryptr != nullptr; entryptr = &(*entryptr)->m_next)
if ((*entryptr)->fullhash() == fullhash && (*entryptr)->tag() == tag)
return remove_common(entryptr);
}
@@ -122,8 +123,8 @@ public:
// remove by object
void remove(_ElementType object)
{
- for (UINT32 hashindex = 0; hashindex < ARRAY_LENGTH(m_table); hashindex++)
- for (entry_t **entryptr = &m_table[hashindex]; *entryptr != NULL; entryptr = &(*entryptr)->m_next)
+ for (auto & elem : m_table)
+ for (entry_t **entryptr = &elem; *entryptr != nullptr; entryptr = &(*entryptr)->m_next)
if ((*entryptr)->object() == object)
return remove_common(entryptr);
}
@@ -138,10 +139,10 @@ public:
if (g_tagmap_counter_enabled)
atomic_increment32(&g_tagmap_finds);
#endif
- for (entry_t *entry = m_table[fullhash % ARRAY_LENGTH(m_table)]; entry != NULL; entry = entry->next())
+ for (entry_t *entry = m_table[fullhash % ARRAY_LENGTH(m_table)]; entry != nullptr; entry = entry->next())
if (entry->fullhash() == fullhash && entry->tag() == tag)
return entry->object();
- return _ElementType(NULL);
+ return _ElementType(nullptr);
}
// find by tag without checking anything but the hash
@@ -152,10 +153,10 @@ public:
atomic_increment32(&g_tagmap_finds);
#endif
UINT32 fullhash = hash(tag);
- for (entry_t *entry = m_table[fullhash % ARRAY_LENGTH(m_table)]; entry != NULL; entry = entry->next())
+ for (entry_t *entry = m_table[fullhash % ARRAY_LENGTH(m_table)]; entry != nullptr; entry = entry->next())
if (entry->fullhash() == fullhash)
return entry->object();
- return NULL;
+ return nullptr;
}
// return first object in the table
@@ -288,7 +289,7 @@ public:
// operations by tag
_ElementType &replace_and_remove(const char *tag, _ElementType &object) { _ElementType *existing = find(tag); return (existing == NULL) ? append(tag, object) : replace_and_remove(tag, object, *existing); }
- void remove(const char *tag) { _ElementType *object = find(tag); if (object != NULL) remove(*object); }
+ void remove(const char *tag) { _ElementType *object = find(tag); if (object != nullptr) remove(*object); }
_ElementType *find(const char *tag) const { return m_map.find_hash_only(tag); }
int indexof(const char *tag) const { _ElementType *object = find(tag); return (object != NULL) ? m_list.indexof(*object) : NULL; }
@@ -316,7 +317,7 @@ tagmap_error tagmap_t<_ElementType, _HashSize>::add_common(const char *tag, _Ele
UINT32 hashindex = fullhash % ARRAY_LENGTH(m_table);
// first make sure we don't have a duplicate
- for (entry_t *entry = m_table[hashindex]; entry != NULL; entry = entry->next())
+ for (entry_t *entry = m_table[hashindex]; entry != nullptr; entry = entry->next())
if (entry->fullhash() == fullhash)
if (unique_hash || entry->tag() == tag)
{
@@ -326,7 +327,7 @@ tagmap_error tagmap_t<_ElementType, _HashSize>::add_common(const char *tag, _Ele
}
// now allocate a new entry and add to the head of the list
- entry_t *entry = global_alloc(entry_t(tag, fullhash, object));
+ auto entry = global_alloc(entry_t(tag, fullhash, object));
entry->m_next = m_table[hashindex];
m_table[hashindex] = entry;
return TMERR_NONE;
diff --git a/src/lib/util/un7z.cpp b/src/lib/util/un7z.cpp
index bbae440e0ff..b9cfa13eafe 100644
--- a/src/lib/util/un7z.cpp
+++ b/src/lib/util/un7z.cpp
@@ -24,7 +24,7 @@
void *SZipAlloc(void *p, size_t size)
{
if (size == 0)
- return 0;
+ return nullptr;
return malloc(size);
}
@@ -38,7 +38,7 @@ void SZipFree(void *p, void *address)
void File_Construct(CSzFile *p)
{
- p->_7z_osdfile = NULL;
+ p->_7z_osdfile = nullptr;
}
static WRes File_Open(CSzFile *p, const char *name, int writeMode)
@@ -186,7 +186,7 @@ static void free__7z_file(_7z_file *_7z);
int _7z_search_crc_match(_7z_file *new_7z, UINT32 search_crc, const char* search_filename, int search_filename_length, bool matchcrc, bool matchname)
{
- UInt16 *temp = NULL;
+ UInt16 *temp = nullptr;
size_t tempSize = 0;
for (int i = 0; i < new_7z->db.db.NumFiles; i++)
@@ -194,7 +194,7 @@ int _7z_search_crc_match(_7z_file *new_7z, UINT32 search_crc, const char* search
const CSzFileItem *f = new_7z->db.db.Files + i;
size_t len;
- len = SzArEx_GetFileNameUtf16(&new_7z->db, i, NULL);
+ len = SzArEx_GetFileNameUtf16(&new_7z->db, i, nullptr);
// if it's a directory entry we don't care about it..
if (f->IsDir)
@@ -202,10 +202,10 @@ int _7z_search_crc_match(_7z_file *new_7z, UINT32 search_crc, const char* search
if (len > tempSize)
{
- SZipFree(NULL, temp);
+ SZipFree(nullptr, temp);
tempSize = len;
- temp = (UInt16 *)SZipAlloc(NULL, tempSize * sizeof(temp[0]));
- if (temp == 0)
+ temp = (UInt16 *)SZipAlloc(nullptr, tempSize * sizeof(temp[0]));
+ if (temp == nullptr)
{
return -1; // memory error
}
@@ -265,12 +265,12 @@ int _7z_search_crc_match(_7z_file *new_7z, UINT32 search_crc, const char* search
new_7z->uncompressed_length = size;
new_7z->crc = crc;
- SZipFree(NULL, temp);
+ SZipFree(nullptr, temp);
return i;
}
}
- SZipFree(NULL, temp);
+ SZipFree(nullptr, temp);
return -1;
}
@@ -288,7 +288,7 @@ _7z_error _7z_file_open(const char *filename, _7z_file **_7z)
SRes res;
/* ensure we start with a NULL result */
- *_7z = NULL;
+ *_7z = nullptr;
/* see if we are in the cache, and reopen if so */
for (cachenum = 0; cachenum < ARRAY_LENGTH(_7z_cache); cachenum++)
@@ -296,17 +296,17 @@ _7z_error _7z_file_open(const char *filename, _7z_file **_7z)
_7z_file *cached = _7z_cache[cachenum];
/* if we have a valid entry and it matches our filename, use it and remove from the cache */
- if (cached != NULL && cached->filename != NULL && strcmp(filename, cached->filename) == 0)
+ if (cached != nullptr && cached->filename != nullptr && strcmp(filename, cached->filename) == 0)
{
*_7z = cached;
- _7z_cache[cachenum] = NULL;
+ _7z_cache[cachenum] = nullptr;
return _7ZERR_NONE;
}
}
/* allocate memory for the _7z_file structure */
new_7z = (_7z_file *)malloc(sizeof(*new_7z));
- if (new_7z == NULL)
+ if (new_7z == nullptr)
return _7ZERR_OUT_OF_MEMORY;
memset(new_7z, 0, sizeof(*new_7z));
@@ -350,12 +350,12 @@ _7z_error _7z_file_open(const char *filename, _7z_file **_7z)
}
new_7z->blockIndex = 0xFFFFFFFF; /* it can have any value before first call (if outBuffer = 0) */
- new_7z->outBuffer = 0; /* it must be 0 before first call for each new archive. */
+ new_7z->outBuffer = nullptr; /* it must be 0 before first call for each new archive. */
new_7z->outBufferSize = 0; /* it can have any value before first call (if outBuffer = 0) */
/* make a copy of the filename for caching purposes */
string = (char *)malloc(strlen(filename) + 1);
- if (string == NULL)
+ if (string == nullptr)
{
_7zerr = _7ZERR_OUT_OF_MEMORY;
goto error;
@@ -381,13 +381,13 @@ void _7z_file_close(_7z_file *_7z)
int cachenum;
/* close the open files */
- if (_7z->archiveStream.file._7z_osdfile != NULL)
+ if (_7z->archiveStream.file._7z_osdfile != nullptr)
osd_close(_7z->archiveStream.file._7z_osdfile);
- _7z->archiveStream.file._7z_osdfile = NULL;
+ _7z->archiveStream.file._7z_osdfile = nullptr;
/* find the first NULL entry in the cache */
for (cachenum = 0; cachenum < ARRAY_LENGTH(_7z_cache); cachenum++)
- if (_7z_cache[cachenum] == NULL)
+ if (_7z_cache[cachenum] == nullptr)
break;
/* if no room left in the cache, free the bottommost entry */
@@ -412,10 +412,10 @@ void _7z_file_cache_clear(void)
/* clear call cache entries */
for (cachenum = 0; cachenum < ARRAY_LENGTH(_7z_cache); cachenum++)
- if (_7z_cache[cachenum] != NULL)
+ if (_7z_cache[cachenum] != nullptr)
{
free__7z_file(_7z_cache[cachenum]);
- _7z_cache[cachenum] = NULL;
+ _7z_cache[cachenum] = nullptr;
}
}
@@ -432,7 +432,7 @@ _7z_error _7z_file_decompress(_7z_file *new_7z, void *buffer, UINT32 length)
int index = new_7z->curr_file_idx;
/* make sure the file is open.. */
- if (new_7z->archiveStream.file._7z_osdfile==NULL)
+ if (new_7z->archiveStream.file._7z_osdfile==nullptr)
{
new_7z->archiveStream.file._7z_currfpos = 0;
err = osd_open(new_7z->filename, OPEN_FLAG_READ, &new_7z->archiveStream.file._7z_osdfile, &new_7z->archiveStream.file._7z_length);
@@ -477,11 +477,11 @@ _7z_error _7z_file_decompress(_7z_file *new_7z, void *buffer, UINT32 length)
static void free__7z_file(_7z_file *_7z)
{
- if (_7z != NULL)
+ if (_7z != nullptr)
{
- if (_7z->archiveStream.file._7z_osdfile != NULL)
+ if (_7z->archiveStream.file._7z_osdfile != nullptr)
osd_close(_7z->archiveStream.file._7z_osdfile);
- if (_7z->filename != NULL)
+ if (_7z->filename != nullptr)
free((void *)_7z->filename);
diff --git a/src/lib/util/unicode.cpp b/src/lib/util/unicode.cpp
index 5f375337b34..e2c3956cedb 100644
--- a/src/lib/util/unicode.cpp
+++ b/src/lib/util/unicode.cpp
@@ -34,7 +34,7 @@ int uchar_from_utf8(unicode_char *uchar, const char *utf8char, size_t count)
char auxchar;
/* validate parameters */
- if (utf8char == NULL || count == 0)
+ if (utf8char == nullptr || count == 0)
return 0;
/* start with the first byte */
@@ -127,7 +127,7 @@ int uchar_from_utf16(unicode_char *uchar, const utf16_char *utf16char, size_t co
int rc = -1;
/* validate parameters */
- if (utf16char == NULL || count == 0)
+ if (utf16char == nullptr || count == 0)
return 0;
/* handle the two-byte case */
diff --git a/src/lib/util/unzip.cpp b/src/lib/util/unzip.cpp
index 21e137b9f24..a8f3ca434e2 100644
--- a/src/lib/util/unzip.cpp
+++ b/src/lib/util/unzip.cpp
@@ -185,7 +185,7 @@ zip_error zip_file_open(const char *filename, zip_file **zip)
int cachenum;
/* ensure we start with a NULL result */
- *zip = NULL;
+ *zip = nullptr;
/* see if we are in the cache, and reopen if so */
for (cachenum = 0; cachenum < ARRAY_LENGTH(zip_cache); cachenum++)
@@ -193,17 +193,17 @@ zip_error zip_file_open(const char *filename, zip_file **zip)
zip_file *cached = zip_cache[cachenum];
/* if we have a valid entry and it matches our filename, use it and remove from the cache */
- if (cached != NULL && cached->filename != NULL && strcmp(filename, cached->filename) == 0)
+ if (cached != nullptr && cached->filename != nullptr && strcmp(filename, cached->filename) == 0)
{
*zip = cached;
- zip_cache[cachenum] = NULL;
+ zip_cache[cachenum] = nullptr;
return ZIPERR_NONE;
}
}
/* allocate memory for the zip_file structure */
newzip = (zip_file *)malloc(sizeof(*newzip));
- if (newzip == NULL)
+ if (newzip == nullptr)
return ZIPERR_OUT_OF_MEMORY;
memset(newzip, 0, sizeof(*newzip));
@@ -229,7 +229,7 @@ zip_error zip_file_open(const char *filename, zip_file **zip)
/* allocate memory for the central directory */
newzip->cd = (UINT8 *)malloc(newzip->ecd.cd_size + 1);
- if (newzip->cd == NULL)
+ if (newzip->cd == nullptr)
{
ziperr = ZIPERR_OUT_OF_MEMORY;
goto error;
@@ -245,7 +245,7 @@ zip_error zip_file_open(const char *filename, zip_file **zip)
/* make a copy of the filename for caching purposes */
string = (char *)malloc(strlen(filename) + 1);
- if (string == NULL)
+ if (string == nullptr)
{
ziperr = ZIPERR_OUT_OF_MEMORY;
goto error;
@@ -279,13 +279,13 @@ void zip_file_close(zip_file *zip)
int cachenum;
/* close the open files */
- if (zip->file != NULL)
+ if (zip->file != nullptr)
osd_close(zip->file);
- zip->file = NULL;
+ zip->file = nullptr;
/* find the first NULL entry in the cache */
for (cachenum = 0; cachenum < ARRAY_LENGTH(zip_cache); cachenum++)
- if (zip_cache[cachenum] == NULL)
+ if (zip_cache[cachenum] == nullptr)
break;
/* if no room left in the cache, free the bottommost entry */
@@ -316,10 +316,10 @@ void zip_file_cache_clear(void)
/* clear call cache entries */
for (cachenum = 0; cachenum < ARRAY_LENGTH(zip_cache); cachenum++)
- if (zip_cache[cachenum] != NULL)
+ if (zip_cache[cachenum] != nullptr)
{
free_zip_file(zip_cache[cachenum]);
- zip_cache[cachenum] = NULL;
+ zip_cache[cachenum] = nullptr;
}
}
@@ -370,15 +370,15 @@ const zip_file_header *zip_file_first_file(zip_file *zip)
const zip_file_header *zip_file_next_file(zip_file *zip)
{
/* fix up any modified data */
- if (zip->header.raw != NULL)
+ if (zip->header.raw != nullptr)
{
zip->header.raw[ZIPCFN + zip->header.filename_length] = zip->header.saved;
- zip->header.raw = NULL;
+ zip->header.raw = nullptr;
}
/* if we're at or past the end, we're done */
if (zip->cd_pos >= zip->ecd.cd_size)
- return NULL;
+ return nullptr;
/* extract file header info */
zip->header.raw = zip->cd + zip->cd_pos;
@@ -407,7 +407,7 @@ const zip_file_header *zip_file_next_file(zip_file *zip)
zip->header.rawlength += zip->header.extra_field_length;
zip->header.rawlength += zip->header.file_comment_length;
if (zip->cd_pos + zip->header.rawlength > zip->ecd.cd_size)
- return NULL;
+ return nullptr;
/* NULL terminate the filename */
zip->header.saved = zip->header.raw[ZIPCFN + zip->header.filename_length];
@@ -493,15 +493,15 @@ zip_error zip_file_decompress(zip_file *zip, void *buffer, UINT32 length)
static void free_zip_file(zip_file *zip)
{
- if (zip != NULL)
+ if (zip != nullptr)
{
- if (zip->file != NULL)
+ if (zip->file != nullptr)
osd_close(zip->file);
- if (zip->filename != NULL)
+ if (zip->filename != nullptr)
free((void *)zip->filename);
- if (zip->ecd.raw != NULL)
+ if (zip->ecd.raw != nullptr)
free(zip->ecd.raw);
- if (zip->cd != NULL)
+ if (zip->cd != nullptr)
free(zip->cd);
free(zip);
}
@@ -545,7 +545,7 @@ static zip_error read_ecd(zip_file *zip)
/* allocate buffer */
buffer = (UINT8 *)malloc(buflen + 1);
- if (buffer == NULL)
+ if (buffer == nullptr)
return ZIPERR_OUT_OF_MEMORY;
/* read in one buffers' worth of data */
@@ -618,7 +618,7 @@ static zip_error get_compressed_data_offset(zip_file *zip, UINT64 *offset)
UINT32 read_length;
/* make sure the file handle is open */
- if (zip->file == NULL)
+ if (zip->file == nullptr)
{
int filerr = osd_open(zip->filename, OPEN_FLAG_READ, &zip->file, &zip->length);
if (filerr != FILERR_NONE)
diff --git a/src/lib/util/vbiparse.cpp b/src/lib/util/vbiparse.cpp
index 9c6c39fc4ea..ff523ee4265 100644
--- a/src/lib/util/vbiparse.cpp
+++ b/src/lib/util/vbiparse.cpp
@@ -398,7 +398,7 @@ void vbi_metadata_pack(UINT8 *dest, UINT32 framenum, const vbi_metadata *vbi)
void vbi_metadata_unpack(vbi_metadata *vbi, UINT32 *framenum, const UINT8 *source)
{
- if (framenum != NULL)
+ if (framenum != nullptr)
*framenum = (source[0] << 16) | (source[1] << 8) | source[2];
vbi->white = source[3];
vbi->line16 = (source[4] << 16) | (source[5] << 8) | source[6];
diff --git a/src/lib/util/xmlfile.cpp b/src/lib/util/xmlfile.cpp
index cb674abfa2b..620f12a66b3 100644
--- a/src/lib/util/xmlfile.cpp
+++ b/src/lib/util/xmlfile.cpp
@@ -71,12 +71,12 @@ static const char *copystring(const char *input)
char *newstr;
/* NULL just passes through */
- if (input == NULL)
- return NULL;
+ if (input == nullptr)
+ return nullptr;
/* make a lower-case copy if the allocation worked */
newstr = (char *)malloc(strlen(input) + 1);
- if (newstr != NULL)
+ if (newstr != nullptr)
strcpy(newstr, input);
return newstr;
@@ -95,12 +95,12 @@ static const char *copystring_lower(const char *input)
int i;
/* NULL just passes through */
- if (input == NULL)
- return NULL;
+ if (input == nullptr)
+ return nullptr;
/* make a lower-case copy if the allocation worked */
newstr = (char *)malloc(strlen(input) + 1);
- if (newstr != NULL)
+ if (newstr != nullptr)
{
for (i = 0; input[i] != 0; i++)
newstr[i] = tolower((UINT8)input[i]);
@@ -127,8 +127,8 @@ xml_data_node *xml_file_create(void)
/* create a root node */
rootnode = (xml_data_node *)malloc(sizeof(*rootnode));
- if (rootnode == NULL)
- return NULL;
+ if (rootnode == nullptr)
+ return nullptr;
memset(rootnode, 0, sizeof(*rootnode));
return rootnode;
}
@@ -146,7 +146,7 @@ xml_data_node *xml_file_read(core_file *file, xml_parse_options *opts)
/* set up the parser */
if (!expat_setup_parser(&parse_info, opts))
- return NULL;
+ return nullptr;
/* loop through the file and parse it */
do
@@ -160,7 +160,7 @@ xml_data_node *xml_file_read(core_file *file, xml_parse_options *opts)
/* parse the data */
if (XML_Parse(parse_info.parser, tempbuf, bytes, done) == XML_STATUS_ERROR)
{
- if (opts != NULL && opts->error != NULL)
+ if (opts != nullptr && opts->error != nullptr)
{
opts->error->error_message = XML_ErrorString(XML_GetErrorCode(parse_info.parser));
opts->error->error_line = XML_GetCurrentLineNumber(parse_info.parser);
@@ -169,7 +169,7 @@ xml_data_node *xml_file_read(core_file *file, xml_parse_options *opts)
xml_file_free(parse_info.rootnode);
XML_ParserFree(parse_info.parser);
- return NULL;
+ return nullptr;
}
} while (!done);
@@ -194,12 +194,12 @@ xml_data_node *xml_string_read(const char *string, xml_parse_options *opts)
/* set up the parser */
if (!expat_setup_parser(&parse_info, opts))
- return NULL;
+ return nullptr;
/* parse the data */
if (XML_Parse(parse_info.parser, string, length, TRUE) == XML_STATUS_ERROR)
{
- if (opts != NULL && opts->error != NULL)
+ if (opts != nullptr && opts->error != nullptr)
{
opts->error->error_message = XML_ErrorString(XML_GetErrorCode(parse_info.parser));
opts->error->error_line = XML_GetCurrentLineNumber(parse_info.parser);
@@ -208,7 +208,7 @@ xml_data_node *xml_string_read(const char *string, xml_parse_options *opts)
xml_file_free(parse_info.rootnode);
XML_ParserFree(parse_info.parser);
- return NULL;
+ return nullptr;
}
/* free the parser */
@@ -226,7 +226,7 @@ xml_data_node *xml_string_read(const char *string, xml_parse_options *opts)
void xml_file_write(xml_data_node *node, core_file *file)
{
/* ensure this is a root node */
- if (node->name != NULL)
+ if (node->name != nullptr)
return;
/* output a simple header */
@@ -246,7 +246,7 @@ void xml_file_write(xml_data_node *node, core_file *file)
void xml_file_free(xml_data_node *node)
{
/* ensure this is a root node */
- if (node->name != NULL)
+ if (node->name != nullptr)
return;
free_node_recursive(node);
@@ -285,7 +285,7 @@ xml_data_node *xml_get_sibling(xml_data_node *node, const char *name)
for ( ; node; node = node->next)
if (strcmp(node->name, name) == 0)
return node;
- return NULL;
+ return nullptr;
}
@@ -301,15 +301,15 @@ xml_data_node *xml_find_matching_sibling(xml_data_node *node, const char *name,
for ( ; node; node = node->next)
{
/* can pass NULL as a wildcard for the node name */
- if (name == NULL || strcmp(name, node->name) == 0)
+ if (name == nullptr || strcmp(name, node->name) == 0)
{
/* find a matching attribute */
xml_attribute_node *attr = xml_get_attribute(node, attribute);
- if (attr != NULL && strcmp(attr->value, matchval) == 0)
+ if (attr != nullptr && strcmp(attr->value, matchval) == 0)
return node;
}
}
- return NULL;
+ return nullptr;
}
@@ -336,7 +336,7 @@ xml_data_node *xml_get_or_add_child(xml_data_node *node, const char *name, const
/* find the child first */
child = xml_get_sibling(node->child, name);
- if (child != NULL)
+ if (child != nullptr)
return child;
/* if not found, do a standard add child */
@@ -384,7 +384,7 @@ xml_attribute_node *xml_get_attribute(xml_data_node *node, const char *attribute
for (anode = node->attribute; anode; anode = anode->next)
if (strcmp(anode->name, attribute) == 0)
return anode;
- return NULL;
+ return nullptr;
}
@@ -409,11 +409,11 @@ const char *xml_get_attribute_string(xml_data_node *node, const char *attribute,
int xml_get_attribute_int(xml_data_node *node, const char *attribute, int defvalue)
{
- const char *string = xml_get_attribute_string(node, attribute, NULL);
+ const char *string = xml_get_attribute_string(node, attribute, nullptr);
int value;
unsigned int uvalue;
- if (string == NULL)
+ if (string == nullptr)
return defvalue;
if (string[0] == '$')
return (sscanf(&string[1], "%X", &uvalue) == 1) ? uvalue : defvalue;
@@ -432,9 +432,9 @@ int xml_get_attribute_int(xml_data_node *node, const char *attribute, int defval
int xml_get_attribute_int_format(xml_data_node *node, const char *attribute)
{
- const char *string = xml_get_attribute_string(node, attribute, NULL);
+ const char *string = xml_get_attribute_string(node, attribute, nullptr);
- if (string == NULL)
+ if (string == nullptr)
return XML_INT_FORMAT_DECIMAL;
if (string[0] == '$')
return XML_INT_FORMAT_HEX_DOLLAR;
@@ -466,10 +466,10 @@ int xml_get_attribute_int_format(xml_data_node *node, const char *attribute)
float xml_get_attribute_float(xml_data_node *node, const char *attribute, float defvalue)
{
- const char *string = xml_get_attribute_string(node, attribute, NULL);
+ const char *string = xml_get_attribute_string(node, attribute, nullptr);
float value;
- if (string == NULL || sscanf(string, "%f", &value) != 1)
+ if (string == nullptr || sscanf(string, "%f", &value) != 1)
return defvalue;
return value;
}
@@ -500,9 +500,9 @@ xml_attribute_node *xml_set_attribute(xml_data_node *node, const char *name, con
anode = xml_get_attribute(node, name);
/* if we found it, free the old value and replace it */
- if (anode != NULL)
+ if (anode != nullptr)
{
- if (anode->value != NULL)
+ if (anode->value != nullptr)
free((void *)anode->value);
anode->value = copystring(value);
}
@@ -590,7 +590,7 @@ const char *xml_normalize_string(const char *string)
static char buffer[1024];
char *d = &buffer[0];
- if (string != NULL)
+ if (string != nullptr)
{
while (*string)
{
@@ -650,7 +650,7 @@ static void *expat_malloc(size_t size)
static void expat_free(void *ptr)
{
- if (ptr != NULL)
+ if (ptr != nullptr)
free(&((UINT32 *)ptr)[-4]);
}
@@ -668,9 +668,9 @@ static void expat_free(void *ptr)
static void *expat_realloc(void *ptr, size_t size)
{
void *newptr = expat_malloc(size);
- if (newptr == NULL)
- return NULL;
- if (ptr != NULL)
+ if (newptr == nullptr)
+ return nullptr;
+ if (ptr != nullptr)
{
UINT32 oldsize = ((UINT32 *)ptr)[-4];
memcpy(newptr, ptr, oldsize);
@@ -701,12 +701,12 @@ static int expat_setup_parser(xml_parse_info *parse_info, xml_parse_options *opt
/* setup parse_info structure */
memset(parse_info, 0, sizeof(*parse_info));
- if (opts != NULL)
+ if (opts != nullptr)
{
parse_info->flags = opts->flags;
- if (opts->error != NULL)
+ if (opts->error != nullptr)
{
- opts->error->error_message = NULL;
+ opts->error->error_message = nullptr;
opts->error->error_line = 0;
opts->error->error_column = 0;
}
@@ -714,7 +714,7 @@ static int expat_setup_parser(xml_parse_info *parse_info, xml_parse_options *opt
/* create a root node */
parse_info->rootnode = xml_file_create();
- if (parse_info->rootnode == NULL)
+ if (parse_info->rootnode == nullptr)
return FALSE;
parse_info->curnode = parse_info->rootnode;
@@ -722,8 +722,8 @@ static int expat_setup_parser(xml_parse_info *parse_info, xml_parse_options *opt
memcallbacks.malloc_fcn = expat_malloc;
memcallbacks.realloc_fcn = expat_realloc;
memcallbacks.free_fcn = expat_free;
- parse_info->parser = XML_ParserCreate_MM(NULL, &memcallbacks, NULL);
- if (parse_info->parser == NULL)
+ parse_info->parser = XML_ParserCreate_MM(nullptr, &memcallbacks, nullptr);
+ if (parse_info->parser == nullptr)
{
free(parse_info->rootnode);
return FALSE;
@@ -735,7 +735,7 @@ static int expat_setup_parser(xml_parse_info *parse_info, xml_parse_options *opt
XML_SetUserData(parse_info->parser, parse_info);
/* optional parser initialization step */
- if (opts != NULL && opts->init_parser != NULL)
+ if (opts != nullptr && opts->init_parser != nullptr)
(*opts->init_parser)(parse_info->parser);
return TRUE;
}
@@ -764,8 +764,8 @@ static void expat_element_start(void *data, const XML_Char *name, const XML_Char
int attr;
/* add a new child node to the current node */
- newnode = add_child(*curnode, name, NULL);
- if (newnode == NULL)
+ newnode = add_child(*curnode, name, nullptr);
+ if (newnode == nullptr)
return;
/* remember the line number */
@@ -807,14 +807,14 @@ static void expat_data(void *data, const XML_Char *s, int len)
return;
/* determine how much data we currently have */
- if ((*curnode)->value != NULL)
+ if ((*curnode)->value != nullptr)
oldlen = (int)strlen((*curnode)->value);
/* realloc */
newdata = (char *)malloc(oldlen + len + 1);
- if (newdata == NULL)
+ if (newdata == nullptr)
return;
- if ((*curnode)->value != NULL)
+ if ((*curnode)->value != nullptr)
{
memcpy(newdata, (*curnode)->value, oldlen);
free((void *)(*curnode)->value);
@@ -850,7 +850,7 @@ static void expat_element_end(void *data, const XML_Char *name)
/* strip leading/trailing spaces from the value data */
orig = (char *)(*curnode)->value;
- if (orig != NULL && !(parse_info->flags & XML_PARSE_FLAG_WHITESPACE_SIGNIFICANT))
+ if (orig != nullptr && !(parse_info->flags & XML_PARSE_FLAG_WHITESPACE_SIGNIFICANT))
{
char *start = orig;
char *end = start + strlen(start);
@@ -867,7 +867,7 @@ static void expat_element_end(void *data, const XML_Char *name)
if (start == end)
{
free(orig);
- (*curnode)->value = NULL;
+ (*curnode)->value = nullptr;
}
/* otherwise, memmove the data */
@@ -911,27 +911,27 @@ static xml_data_node *add_child(xml_data_node *parent, const char *name, const c
/* new element: create a new node */
node = (xml_data_node *)malloc(sizeof(*node));
- if (node == NULL)
- return NULL;
+ if (node == nullptr)
+ return nullptr;
/* initialize the members */
- node->next = NULL;
+ node->next = nullptr;
node->parent = parent;
- node->child = NULL;
+ node->child = nullptr;
node->name = copystring_lower(name);
- if (node->name == NULL)
+ if (node->name == nullptr)
{
free(node);
- return NULL;
+ return nullptr;
}
node->value = copystring(value);
- if (node->value == NULL && value != NULL)
+ if (node->value == nullptr && value != nullptr)
{
free((void *)node->name);
free(node);
- return NULL;
+ return nullptr;
}
- node->attribute = NULL;
+ node->attribute = nullptr;
/* add us to the end of the list of siblings */
for (pnode = &parent->child; *pnode; pnode = &(*pnode)->next) ;
@@ -964,23 +964,23 @@ static xml_attribute_node *add_attribute(xml_data_node *node, const char *name,
/* allocate a new attribute node */
anode = (xml_attribute_node *)malloc(sizeof(*anode));
- if (anode == NULL)
- return NULL;
+ if (anode == nullptr)
+ return nullptr;
/* fill it in */
- anode->next = NULL;
+ anode->next = nullptr;
anode->name = copystring_lower(name);
- if (anode->name == NULL)
+ if (anode->name == nullptr)
{
free(anode);
- return NULL;
+ return nullptr;
}
anode->value = copystring(value);
- if (anode->value == NULL)
+ if (anode->value == nullptr)
{
free((void *)anode->name);
free(anode);
- return NULL;
+ return nullptr;
}
/* add us to the end of the list of attributes */
@@ -1024,7 +1024,7 @@ static void write_node_recursive(xml_data_node *node, int indent, core_file *fil
core_fprintf(file, " %s=\"%s\"", anode->name, anode->value);
/* if there are no children and no value, end the tag here */
- if (node->child == NULL && node->value == NULL)
+ if (node->child == nullptr && node->value == nullptr)
core_fprintf(file, " />\n");
/* otherwise, close this tag and output more stuff */
@@ -1033,11 +1033,11 @@ static void write_node_recursive(xml_data_node *node, int indent, core_file *fil
core_fprintf(file, ">\n");
/* if there is a value, output that here */
- if (node->value != NULL)
+ if (node->value != nullptr)
core_fprintf(file, "%*s%s\n", indent + 4, "", node->value);
/* loop over children and output them as well */
- if (node->child != NULL)
+ if (node->child != nullptr)
{
for (child = node->child; child; child = child->next)
write_node_recursive(child, indent + 4, file);
@@ -1068,18 +1068,18 @@ static void free_node_recursive(xml_data_node *node)
xml_data_node *child, *nchild;
/* free name/value */
- if (node->name != NULL)
+ if (node->name != nullptr)
free((void *)node->name);
- if (node->value != NULL)
+ if (node->value != nullptr)
free((void *)node->value);
/* free attributes */
for (anode = node->attribute; anode; anode = nanode)
{
/* free name/value */
- if (anode->name != NULL)
+ if (anode->name != nullptr)
free((void *)anode->name);
- if (anode->value != NULL)
+ if (anode->value != nullptr)
free((void *)anode->value);
/* note the next node and free this node */
diff --git a/src/lib/util/zippath.cpp b/src/lib/util/zippath.cpp
index 36c9470ed92..84674eb1fe2 100644
--- a/src/lib/util/zippath.cpp
+++ b/src/lib/util/zippath.cpp
@@ -47,10 +47,10 @@ class zippath_directory
public:
zippath_directory()
: returned_parent(false),
- directory(NULL),
+ directory(nullptr),
called_zip_first(false),
- zipfile(NULL),
- returned_dirlist(NULL) { }
+ zipfile(nullptr),
+ returned_dirlist(nullptr) { }
/* common */
/** @brief true to returned parent. */
@@ -130,7 +130,7 @@ static void parse_parent_path(const char *path, int *beginpos, int *endpos)
pos--;
/* return endpos */
- if (endpos != NULL)
+ if (endpos != nullptr)
*endpos = pos;
/* now skip until we find a path separator */
@@ -138,7 +138,7 @@ static void parse_parent_path(const char *path, int *beginpos, int *endpos)
pos--;
/* return beginpos */
- if (beginpos != NULL)
+ if (beginpos != nullptr)
*beginpos = pos;
}
@@ -162,7 +162,7 @@ static void parse_parent_path(const char *path, int *beginpos, int *endpos)
std::string &zippath_parent(std::string &dst, const char *path)
{
int pos;
- parse_parent_path(path, &pos, NULL);
+ parse_parent_path(path, &pos, nullptr);
/* return the result */
if (pos >= 0) {
@@ -316,7 +316,7 @@ static file_error create_core_file_from_zip(zip_file *zip, const zip_file_header
void *ptr;
ptr = malloc(header->uncompressed_length);
- if (ptr == NULL)
+ if (ptr == nullptr)
{
filerr = FILERR_OUT_OF_MEMORY;
goto done;
@@ -334,7 +334,7 @@ static file_error create_core_file_from_zip(zip_file *zip, const zip_file_header
goto done;
done:
- if (ptr != NULL)
+ if (ptr != nullptr)
free(ptr);
return filerr;
}
@@ -361,19 +361,19 @@ file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&fil
{
file_error filerr = FILERR_NOT_FOUND;
zip_error ziperr;
- zip_file *zip = NULL;
+ zip_file *zip = nullptr;
const zip_file_header *header;
osd_dir_entry_type entry_type;
- char *alloc_fullpath = NULL;
+ char *alloc_fullpath = nullptr;
int len;
/* first, set up the two types of paths */
std::string mainpath(filename);
std::string subpath;
- file = NULL;
+ file = nullptr;
/* loop through */
- while((file == NULL) && (mainpath.length() > 0)
+ while((file == nullptr) && (mainpath.length() > 0)
&& ((openflags == OPEN_FLAG_READ) || (subpath.length() == 0)))
{
/* is the mainpath a ZIP path? */
@@ -395,7 +395,7 @@ file_error zippath_fopen(const char *filename, UINT32 openflags, core_file *&fil
else
header = zip_file_first_file(zip);
- if (header == NULL)
+ if (header == nullptr)
{
filerr = FILERR_NOT_FOUND;
goto done;
@@ -470,9 +470,9 @@ done:
}
}
- if (zip != NULL)
+ if (zip != nullptr)
zip_file_close(zip);
- if (alloc_fullpath != NULL)
+ if (alloc_fullpath != nullptr)
osd_free(alloc_fullpath);
return filerr;
}
@@ -531,7 +531,7 @@ static int is_root(const char *path)
static int is_7z_file(const char *path)
{
const char *s = strrchr(path, '.');
- return (s != NULL) && !core_stricmp(s, ".7z");
+ return (s != nullptr) && !core_stricmp(s, ".7z");
}
@@ -553,7 +553,7 @@ static int is_7z_file(const char *path)
static int is_zip_file(const char *path)
{
const char *s = strrchr(path, '.');
- return (s != NULL) && !core_stricmp(s, ".zip");
+ return (s != nullptr) && !core_stricmp(s, ".zip");
}
@@ -678,12 +678,12 @@ static const zip_file_header *zippath_find_sub_path(zip_file *zipfile, const cha
char c1, c2, last_char;
const zip_file_header *header;
- for (header = zip_file_first_file(zipfile); header != NULL; header = zip_file_next_file(zipfile))
+ for (header = zip_file_first_file(zipfile); header != nullptr; header = zip_file_next_file(zipfile))
{
/* special case */
- if (subpath == NULL)
+ if (subpath == nullptr)
{
- if (type != NULL)
+ if (type != nullptr)
*type = ENTTYPE_FILE;
return header;
}
@@ -700,22 +700,22 @@ static const zip_file_header *zippath_find_sub_path(zip_file *zipfile, const cha
{
if (c1 == '\0')
{
- if (type != NULL)
+ if (type != nullptr)
*type = ENTTYPE_FILE;
return header;
}
else if ((last_char == '/') || (c1 == '/'))
{
- if (type != NULL)
+ if (type != nullptr)
*type = ENTTYPE_DIR;
return header;
}
}
}
- if (type != NULL)
+ if (type != nullptr)
*type = ENTTYPE_NONE;
- return NULL;
+ return nullptr;
}
@@ -741,7 +741,7 @@ static const zip_file_header *zippath_find_sub_path(zip_file *zipfile, const cha
static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_type, zip_file *&zipfile, std::string &newpath)
{
file_error err;
- osd_directory_entry *current_entry = NULL;
+ osd_directory_entry *current_entry = nullptr;
osd_dir_entry_type current_entry_type;
int went_up = FALSE;
int i;
@@ -750,7 +750,7 @@ static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_ty
/* be conservative */
entry_type = ENTTYPE_NONE;
- zipfile = NULL;
+ zipfile = nullptr;
std::string apath(path);
std::string apath_trimmed;
@@ -767,12 +767,12 @@ static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_ty
current_entry = osd_stat(apath_trimmed.c_str());
/* did we find anything? */
- if (current_entry != NULL)
+ if (current_entry != nullptr)
{
/* get the entry type and free the stat entry */
current_entry_type = current_entry->type;
osd_free(current_entry);
- current_entry = NULL;
+ current_entry = nullptr;
}
else
{
@@ -849,7 +849,7 @@ file_error zippath_opendir(const char *path, zippath_directory **directory)
file_error err;
/* allocate a directory */
- zippath_directory *result = NULL;
+ zippath_directory *result = nullptr;
try
{
result = new zippath_directory;
@@ -873,11 +873,11 @@ file_error zippath_opendir(const char *path, zippath_directory **directory)
}
/* was the result a ZIP? */
- if (result->zipfile == NULL)
+ if (result->zipfile == nullptr)
{
/* a conventional directory */
result->directory = osd_opendir(path);
- if (result->directory == NULL)
+ if (result->directory == nullptr)
{
err = FILERR_FAILURE;
goto done;
@@ -889,12 +889,12 @@ file_error zippath_opendir(const char *path, zippath_directory **directory)
}
done:
- if ((directory == NULL || err != FILERR_NONE) && result != NULL)
+ if ((directory == nullptr || err != FILERR_NONE) && result != nullptr)
{
zippath_closedir(result);
- result = NULL;
+ result = nullptr;
}
- if (directory != NULL)
+ if (directory != nullptr)
*directory = result;
return err;
}
@@ -914,13 +914,13 @@ done:
void zippath_closedir(zippath_directory *directory)
{
- if (directory->directory != NULL)
+ if (directory->directory != nullptr)
osd_closedir(directory->directory);
- if (directory->zipfile != NULL)
+ if (directory->zipfile != nullptr)
zip_file_close(directory->zipfile);
- while (directory->returned_dirlist != NULL)
+ while (directory->returned_dirlist != nullptr)
{
zippath_returned_directory *dirlist = directory->returned_dirlist;
directory->returned_dirlist = directory->returned_dirlist->next;
@@ -950,7 +950,7 @@ void zippath_closedir(zippath_directory *directory)
static const char *get_relative_path(zippath_directory *directory, const zip_file_header *header)
{
- const char *result = NULL;
+ const char *result = nullptr;
int len = directory->zipprefix.length();
if ((len <= strlen(header->filename))
@@ -981,7 +981,7 @@ static const char *get_relative_path(zippath_directory *directory, const zip_fil
const osd_directory_entry *zippath_readdir(zippath_directory *directory)
{
- const osd_directory_entry *result = NULL;
+ const osd_directory_entry *result = nullptr;
const zip_file_header *header;
const char *relpath;
const char *separator;
@@ -997,17 +997,17 @@ const osd_directory_entry *zippath_readdir(zippath_directory *directory)
directory->returned_entry.type = ENTTYPE_DIR;
result = &directory->returned_entry;
}
- else if (directory->directory != NULL)
+ else if (directory->directory != nullptr)
{
/* a normal directory read */
do
{
result = osd_readdir(directory->directory);
}
- while((result != NULL) && (!strcmp(result->name, ".") || !strcmp(result->name, "..")));
+ while((result != nullptr) && (!strcmp(result->name, ".") || !strcmp(result->name, "..")));
/* special case - is this entry a ZIP file? if so we need to return it as a "directory" */
- if ((result != NULL) && is_zip_file(result->name))
+ if ((result != nullptr) && is_zip_file(result->name))
{
/* copy; but change the entry type */
directory->returned_entry = *result;
@@ -1015,7 +1015,7 @@ const osd_directory_entry *zippath_readdir(zippath_directory *directory)
result = &directory->returned_entry;
}
}
- else if (directory->zipfile != NULL)
+ else if (directory->zipfile != nullptr)
{
do
{
@@ -1027,27 +1027,27 @@ const osd_directory_entry *zippath_readdir(zippath_directory *directory)
else
header = zip_file_next_file(directory->zipfile);
directory->called_zip_first = true;
- relpath = NULL;
+ relpath = nullptr;
}
- while((header != NULL) && ((relpath = get_relative_path(directory, header)) == NULL));
+ while((header != nullptr) && ((relpath = get_relative_path(directory, header)) == nullptr));
- if (relpath != NULL)
+ if (relpath != nullptr)
{
/* we've found a ZIP entry; but this may be an entry deep within the target directory */
for (s = relpath; *s && !is_zip_file_separator(*s); s++)
;
- separator = *s ? s : NULL;
+ separator = *s ? s : nullptr;
- if (separator != NULL)
+ if (separator != nullptr)
{
/* a nested entry; loop through returned_dirlist to see if we've returned the parent directory */
- for (rdent = directory->returned_dirlist; rdent != NULL; rdent = rdent->next)
+ for (rdent = directory->returned_dirlist; rdent != nullptr; rdent = rdent->next)
{
if (!core_strnicmp(rdent->name.c_str(), relpath, separator - relpath))
break;
}
- if (rdent == NULL)
+ if (rdent == nullptr)
{
/* we've found a new directory; add this to returned_dirlist */
rdent = new zippath_returned_directory;
@@ -1073,7 +1073,7 @@ const osd_directory_entry *zippath_readdir(zippath_directory *directory)
}
}
}
- while((relpath != NULL) && (result == NULL));
+ while((relpath != nullptr) && (result == nullptr));
}
return result;
}
@@ -1097,5 +1097,5 @@ const osd_directory_entry *zippath_readdir(zippath_directory *directory)
int zippath_is_zip(zippath_directory *directory)
{
- return directory->zipfile != NULL;
+ return directory->zipfile != nullptr;
}
diff --git a/src/mame/audio/8080bw.cpp b/src/mame/audio/8080bw.cpp
index 187aeea1afb..3b12f867ef4 100644
--- a/src/mame/audio/8080bw.cpp
+++ b/src/mame/audio/8080bw.cpp
@@ -133,7 +133,7 @@ const char *const lrescue_sample_names[] =
"shootingstar",
"stepl",
"steph",
- 0
+ nullptr
};
WRITE8_MEMBER(_8080bw_state::lrescue_sh_port_1_w)
@@ -1054,7 +1054,7 @@ const char *const lupin3_sample_names[] =
"warp", /* translocate, deposit money */
"extend", /* bonus man */
"kick", /* lands on top of building, wife kicks man */
- 0
+ nullptr
};
WRITE8_MEMBER( _8080bw_state::lupin3_00_w )
diff --git a/src/mame/audio/astrof.cpp b/src/mame/audio/astrof.cpp
index cd308d88203..98c1b62cc9a 100644
--- a/src/mame/audio/astrof.cpp
+++ b/src/mame/audio/astrof.cpp
@@ -135,7 +135,7 @@ static const char *const astrof_sample_names[] =
"death",
"bosshit",
"bosskill",
- 0
+ nullptr
};
MACHINE_CONFIG_FRAGMENT( astrof_audio )
diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp
index b4a8cc67501..99fe02bbdb3 100644
--- a/src/mame/audio/atarijsa.cpp
+++ b/src/mame/audio/atarijsa.cpp
@@ -433,11 +433,11 @@ atari_jsa_oki_base_device::atari_jsa_oki_base_device(const machine_config &mconf
READ8_MEMBER( atari_jsa_oki_base_device::oki_r )
{
// JSA IIIs selects the 2nd OKI via the low bit, so select it
- if (m_oki2 != NULL && offset == 1)
+ if (m_oki2 != nullptr && offset == 1)
return m_oki2->read(space, offset);
// OKI may not be populated at all
- else if (m_oki1 != NULL)
+ else if (m_oki1 != nullptr)
return m_oki1->read(space, offset);
// if not present, return all 0xff
@@ -453,11 +453,11 @@ READ8_MEMBER( atari_jsa_oki_base_device::oki_r )
WRITE8_MEMBER( atari_jsa_oki_base_device::oki_w )
{
// JSA IIIs selects the 2nd OKI via the low bit, so select it
- if (m_oki2 != NULL && offset == 1)
+ if (m_oki2 != nullptr && offset == 1)
m_oki2->write(space, offset, data);
// OKI may not be populated at all
- else if (m_oki1 != NULL)
+ else if (m_oki1 != nullptr)
m_oki1->write(space, offset, data);
}
@@ -487,7 +487,7 @@ WRITE8_MEMBER( atari_jsa_oki_base_device::wrio_w )
coin_counter_w(space.machine(), 0, (data >> 4) & 1);
// update the OKI frequency
- if (m_oki1 != NULL)
+ if (m_oki1 != nullptr)
{
m_oki1->set_pin7(data & 8);
if ((data & 4) == 0)
@@ -495,7 +495,7 @@ WRITE8_MEMBER( atari_jsa_oki_base_device::wrio_w )
}
// same for the 2nd OKI (JSA IIIs only)
- if (m_oki2 != NULL)
+ if (m_oki2 != nullptr)
{
m_oki2->set_pin7(data & 8);
if ((data & 4) == 0)
@@ -503,7 +503,7 @@ WRITE8_MEMBER( atari_jsa_oki_base_device::wrio_w )
}
// update the (left) OKI bank (JSA III/IIIs only)
- if (m_oki1_banklo != NULL)
+ if (m_oki1_banklo != nullptr)
m_oki1_banklo->set_entry((m_oki1_banklo->entry() & 2) | ((data >> 1) & 1));
// reset the YM2151 if needed
@@ -528,11 +528,11 @@ WRITE8_MEMBER( atari_jsa_oki_base_device::mix_w )
//
// update the right OKI bank (JSA IIIs only)
- if (m_oki2_banklo != NULL)
+ if (m_oki2_banklo != nullptr)
m_oki2_banklo->set_entry((data >> 6) & 3);
// update the (left) OKI bank (JSA III/IIIs only)
- if (m_oki1_banklo != NULL)
+ if (m_oki1_banklo != nullptr)
m_oki1_banklo->set_entry((m_oki1_banklo->entry() & 1) | ((data >> 3) & 2));
// update the volumes
@@ -568,7 +568,7 @@ void atari_jsa_oki_base_device::device_start()
save_item(NAME(m_overall_volume));
// configure JSA III ADPCM banking
- if (m_oki1_banklo != NULL && m_oki1_bankhi != NULL && m_oki1->region()->bytes() >= 0x80000)
+ if (m_oki1_banklo != nullptr && m_oki1_bankhi != nullptr && m_oki1->region()->bytes() >= 0x80000)
{
m_oki1_banklo->configure_entries(0, 2, m_oki1->region()->base() + 0x00000, 0x00000);
m_oki1_banklo->configure_entries(2, 2, m_oki1->region()->base() + 0x20000, 0x20000);
@@ -576,7 +576,7 @@ void atari_jsa_oki_base_device::device_start()
}
// configure JSA IIIs ADPCM banking
- if (m_oki2_banklo != NULL && m_oki2_bankhi != NULL && m_oki2->region()->bytes() >= 0x80000)
+ if (m_oki2_banklo != nullptr && m_oki2_bankhi != nullptr && m_oki2->region()->bytes() >= 0x80000)
{
m_oki2_banklo->configure_entries(0, 2, m_oki2->region()->base() + 0x00000, 0x00000);
m_oki2_banklo->configure_entries(2, 2, m_oki2->region()->base() + 0x20000, 0x20000);
@@ -608,9 +608,9 @@ void atari_jsa_oki_base_device::device_reset()
void atari_jsa_oki_base_device::update_all_volumes()
{
- if (m_oki1 != NULL)
+ if (m_oki1 != nullptr)
m_oki1->set_output_gain(ALL_OUTPUTS, m_overall_volume * m_oki6295_volume * m_ym2151_ct1);
- if (m_oki2 != NULL)
+ if (m_oki2 != nullptr)
m_oki2->set_output_gain(ALL_OUTPUTS, m_overall_volume * m_oki6295_volume * m_ym2151_ct1);
m_ym2151->set_output_gain(ALL_OUTPUTS, m_overall_volume * m_ym2151_volume);
}
@@ -657,7 +657,7 @@ READ8_MEMBER( atari_jsa_i_device::rdio_r )
UINT8 result = m_jsai->read();
if (!m_test_read_cb())
result ^= 0x80;
- if (m_tms5220 != NULL && m_tms5220->readyq_r() == 0)
+ if (m_tms5220 != nullptr && m_tms5220->readyq_r() == 0)
result |= 0x10;
else
result &= ~0x10;
@@ -691,7 +691,7 @@ WRITE8_MEMBER( atari_jsa_i_device::wrio_w )
coin_counter_w(machine(), 0, (data >> 4) & 1);
// handle TMS5220 I/O
- if (m_tms5220 != NULL)
+ if (m_tms5220 != nullptr)
{
int count = 5 | ((data >> 2) & 2);
m_tms5220->set_frequency(JSA_MASTER_CLOCK*2 / (16 - count));
@@ -733,7 +733,7 @@ WRITE8_MEMBER( atari_jsa_i_device::mix_w )
WRITE8_MEMBER( atari_jsa_i_device::tms5220_voice )
{
- if (m_tms5220 != NULL)
+ if (m_tms5220 != nullptr)
m_tms5220->data_w(space, 0, data);
}
@@ -745,7 +745,7 @@ WRITE8_MEMBER( atari_jsa_i_device::tms5220_voice )
READ8_MEMBER( atari_jsa_i_device::pokey_r )
{
- if (m_pokey != NULL)
+ if (m_pokey != nullptr)
return m_pokey->read(space, offset);
return 0xff;
}
@@ -758,7 +758,7 @@ READ8_MEMBER( atari_jsa_i_device::pokey_r )
WRITE8_MEMBER( atari_jsa_i_device::pokey_w )
{
- if (m_pokey != NULL)
+ if (m_pokey != nullptr)
m_pokey->write(space, offset, data);
}
@@ -823,9 +823,9 @@ void atari_jsa_i_device::device_reset()
void atari_jsa_i_device::update_all_volumes()
{
- if (m_tms5220 != NULL)
+ if (m_tms5220 != nullptr)
m_tms5220->set_output_gain(ALL_OUTPUTS, m_tms5220_volume * m_ym2151_ct1);
- if (m_pokey != NULL)
+ if (m_pokey != nullptr)
m_pokey->set_output_gain(ALL_OUTPUTS, m_pokey_volume * m_ym2151_ct1);
m_ym2151->set_output_gain(ALL_OUTPUTS, m_ym2151_volume);
}
diff --git a/src/mame/audio/beezer.cpp b/src/mame/audio/beezer.cpp
index 2df7d424b5f..f026b480f1b 100644
--- a/src/mame/audio/beezer.cpp
+++ b/src/mame/audio/beezer.cpp
@@ -83,7 +83,7 @@ beezer_sound_device::beezer_sound_device(const machine_config &mconfig, const ch
m_sh6840_latchwriteold(0),
m_sh6840_noiselatch1(0),
m_sh6840_noiselatch3(0),
- m_stream(NULL)/*,
+ m_stream(nullptr)/*,
m_freq_to_step(0)*/
{
memset(m_sh6840_timer, 0, sizeof(m_sh6840_timer));
diff --git a/src/mame/audio/blockade.cpp b/src/mame/audio/blockade.cpp
index 42a820c8f2c..1741dc111a0 100644
--- a/src/mame/audio/blockade.cpp
+++ b/src/mame/audio/blockade.cpp
@@ -61,5 +61,5 @@ const char *const blockade_sample_names[] =
{
"*blockade",
"boom",
- 0
+ nullptr
};
diff --git a/src/mame/audio/bzone.cpp b/src/mame/audio/bzone.cpp
index d0da4c0a682..26bd5321a67 100644
--- a/src/mame/audio/bzone.cpp
+++ b/src/mame/audio/bzone.cpp
@@ -317,7 +317,7 @@ static DISCRETE_SOUND_START(bzone)
BZ_R12, BZ_R13, BZ_R14, BZ_R15, BZ_R32,
BZ_C21,
22, /* B+ of op-amp */
- NULL)
+ nullptr)
/************************************************/
/* Explosion */
@@ -331,7 +331,7 @@ static DISCRETE_SOUND_START(bzone)
BZ_R19, BZ_R18, BZ_R17, BZ_R16, BZ_R33,
BZ_C22,
22, /* B+ of op-amp */
- NULL)
+ nullptr)
/************************************************/
/* Engine */
/************************************************/
diff --git a/src/mame/audio/cage.cpp b/src/mame/audio/cage.cpp
index 7253f46de74..62387ef1e0d 100644
--- a/src/mame/audio/cage.cpp
+++ b/src/mame/audio/cage.cpp
@@ -56,45 +56,45 @@
static const char *const register_names[] =
{
- "TMS32031-DMA global control", NULL, NULL, NULL,
- "TMS32031-DMA source address", NULL, "TMS32031-DMA destination address", NULL,
- "TMS32031-DMA transfer counter", NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
-
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
-
- "TMS32031-Timer 0 global control", NULL, NULL, NULL,
- "TMS32031-Timer 0 counter", NULL, NULL, NULL,
- "TMS32031-Timer 0 period", NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
-
- "TMS32031-Timer 1 global control", NULL, NULL, NULL,
- "TMS32031-Timer 1 counter", NULL, NULL, NULL,
- "TMS32031-Timer 1 period", NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
-
- "TMS32031-Serial port global control", NULL, "TMS32031-Serial port TX control", "TMS32031-Serial port RX control",
- "TMS32031-Serial port timer control", "TMS32031-Serial port timer counter", "TMS32031-Serial port timer period", NULL,
- "TMS32031-Serial port data TX", NULL, NULL, NULL,
- "TMS32031-Serial port data RX", NULL, NULL, NULL,
-
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
-
- NULL, NULL, NULL, NULL,
- "TMS32031-Primary bus control", NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
-
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL
+ "TMS32031-DMA global control", nullptr, nullptr, nullptr,
+ "TMS32031-DMA source address", nullptr, "TMS32031-DMA destination address", nullptr,
+ "TMS32031-DMA transfer counter", nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+
+ "TMS32031-Timer 0 global control", nullptr, nullptr, nullptr,
+ "TMS32031-Timer 0 counter", nullptr, nullptr, nullptr,
+ "TMS32031-Timer 0 period", nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+
+ "TMS32031-Timer 1 global control", nullptr, nullptr, nullptr,
+ "TMS32031-Timer 1 counter", nullptr, nullptr, nullptr,
+ "TMS32031-Timer 1 period", nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+
+ "TMS32031-Serial port global control", nullptr, "TMS32031-Serial port TX control", "TMS32031-Serial port RX control",
+ "TMS32031-Serial port timer control", "TMS32031-Serial port timer counter", "TMS32031-Serial port timer period", nullptr,
+ "TMS32031-Serial port data TX", nullptr, nullptr, nullptr,
+ "TMS32031-Serial port data RX", nullptr, nullptr, nullptr,
+
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+
+ nullptr, nullptr, nullptr, nullptr,
+ "TMS32031-Primary bus control", nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr
};
diff --git a/src/mame/audio/carnival.cpp b/src/mame/audio/carnival.cpp
index 3847299b025..e65c0aa8567 100644
--- a/src/mame/audio/carnival.cpp
+++ b/src/mame/audio/carnival.cpp
@@ -92,7 +92,7 @@ static const char *const carnival_sample_names[] =
"pipehit",
"ranking",
"rifle",
- 0
+ nullptr
};
/* sample IDs - must match sample file name table above */
diff --git a/src/mame/audio/cclimber.cpp b/src/mame/audio/cclimber.cpp
index ce8d11832ea..cce1cc98d36 100644
--- a/src/mame/audio/cclimber.cpp
+++ b/src/mame/audio/cclimber.cpp
@@ -45,7 +45,7 @@ const device_type CCLIMBER_AUDIO = &device_creator<cclimber_audio_device>;
cclimber_audio_device::cclimber_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CCLIMBER_AUDIO, "Crazy Climber Sound Board", tag, owner, clock, "cclimber_audio", __FILE__),
- m_sample_buf(NULL),
+ m_sample_buf(nullptr),
m_sample_num(0),
m_sample_freq(0),
m_sample_volume(0),
diff --git a/src/mame/audio/channelf.cpp b/src/mame/audio/channelf.cpp
index c9e07cbd43c..2cf03d70aa0 100644
--- a/src/mame/audio/channelf.cpp
+++ b/src/mame/audio/channelf.cpp
@@ -11,7 +11,7 @@ const device_type CHANNELF_SOUND = &device_creator<channelf_sound_device>;
channelf_sound_device::channelf_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CHANNELF_SOUND, "Channel F Sound", tag, owner, clock, "channelf_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_channel(NULL),
+ m_channel(nullptr),
m_sound_mode(0),
m_incr(0),
m_decay_mult(0),
diff --git a/src/mame/audio/cinemat.cpp b/src/mame/audio/cinemat.cpp
index fa3b269fbac..9f144915f47 100644
--- a/src/mame/audio/cinemat.cpp
+++ b/src/mame/audio/cinemat.cpp
@@ -126,7 +126,7 @@ static const char *const spacewar_sample_names[] =
"pop",
"explode2",
"fire2",
- 0
+ nullptr
};
void cinemat_state::spacewar_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -198,7 +198,7 @@ static const char *const barrier_sample_names[] =
"playrdie",
"playmove",
"enemmove",
- 0
+ nullptr
};
void cinemat_state::barrier_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -244,7 +244,7 @@ static const char *const speedfrk_sample_names[] =
{
"*speedfrk",
"offroad",
- NULL
+ nullptr
};
void cinemat_state::speedfrk_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -302,7 +302,7 @@ static const char *const starhawk_sample_names[] =
"k",
"master",
"kexit",
- NULL
+ nullptr
};
void cinemat_state::starhawk_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -371,7 +371,7 @@ static const char *const sundance_sample_names[] =
"ping1",
"ping2",
"hatch",
- 0
+ nullptr
};
void cinemat_state::sundance_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -434,7 +434,7 @@ static const char *const tailg_sample_names[] =
"shield",
"bounce",
"hypersp",
- NULL
+ nullptr
};
void cinemat_state::tailg_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -515,7 +515,7 @@ static const char *const warrior_sample_names[] =
"killed",
"fall",
"appear",
- NULL
+ nullptr
};
void cinemat_state::warrior_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -579,7 +579,7 @@ static const char *const armora_sample_names[] =
"tankeng",
"beep",
"chopper",
- NULL
+ nullptr
};
void cinemat_state::armora_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -673,7 +673,7 @@ static const char *const ripoff_sample_names[] =
"bg6",
"bg7",
"bg8",
- NULL
+ nullptr
};
void cinemat_state::ripoff_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -753,7 +753,7 @@ static const char *const starcas_sample_names[] =
"lexplode",
"sexplode",
"pfire",
- 0
+ nullptr
};
void cinemat_state::starcas_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -860,7 +860,7 @@ static const char *const solarq_sample_names[] =
"nuke2",
"nuke1",
"music",
- NULL
+ nullptr
};
void cinemat_state::solarq_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -992,7 +992,7 @@ static const char *const boxingb_sample_names[] =
"cannon",
"bounce",
"bell",
- NULL
+ nullptr
};
void cinemat_state::boxingb_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -1116,7 +1116,7 @@ static const char *const wotw_sample_names[] =
"lexplode",
"sexplode",
"pfire",
- 0
+ nullptr
};
void cinemat_state::wotw_sound_w(UINT8 sound_val, UINT8 bits_changed)
@@ -1303,7 +1303,7 @@ ADDRESS_MAP_END
static const z80_daisy_config daisy_chain[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/audio/circus.cpp b/src/mame/audio/circus.cpp
index 0b9eac7a306..c8bc072f69d 100644
--- a/src/mame/audio/circus.cpp
+++ b/src/mame/audio/circus.cpp
@@ -10,14 +10,14 @@ const char *const circus_sample_names[] =
"pop",
"miss",
"bounce",
- 0
+ nullptr
};
const char *const crash_sample_names[] =
{
"*crash",
"crash",
- 0
+ nullptr
};
const char *const ripcord_sample_names[] =
@@ -27,7 +27,7 @@ const char *const ripcord_sample_names[] =
"scream",
"chute",
"whistle",
- 0
+ nullptr
};
const char *const robotbwl_sample_names[] =
@@ -38,7 +38,7 @@ const char *const robotbwl_sample_names[] =
"balldrop",
"demerit",
"reward",
- 0
+ nullptr
};
diff --git a/src/mame/audio/copsnrob.cpp b/src/mame/audio/copsnrob.cpp
index 162e263da91..eaee183f1bc 100644
--- a/src/mame/audio/copsnrob.cpp
+++ b/src/mame/audio/copsnrob.cpp
@@ -628,7 +628,7 @@ DISCRETE_SOUND_START(copsnrob)
************************************************/
DISCRETE_CUSTOM1(COPSNROB_NOISE_1, copsnrob_custom_noise, /* IC J2, pin 10 */
COPSNROB_2V, /* CLK */
- NULL)
+ nullptr)
/* COPSNROB_NOISE_2 derived from sub out of above custom module - IC J2, pin 11 */
/* We use the measured 555 timer frequency (IC M3) for speed */
DISCRETE_COUNTER(NODE_40, /* IC L2 */
@@ -656,12 +656,12 @@ DISCRETE_SOUND_START(copsnrob)
/* We can ignore R47 & R48 */
COPSNROB_ZINGS_INV, /* IC D3, pin 6 */
COPSNROB_R38, COPSNROB_C19,
- NULL)
+ nullptr)
DISCRETE_CUSTOM5(NODE_61, copsnrob_zings_555_astable, /* IC D3, pin 8 & 12 */
NODE_60, /* IC D3, pin 10 */
COPSNROB_R36, COPSNROB_R37,
COPSNROB_C3, COPSNROB_C13,
- NULL)
+ nullptr)
/* FIX - do a better implemetation of IC L4 */
DISCRETE_CRFILTER_VREF(NODE_62, /* IC L4, pin 9 */
NODE_61, /* IN0 */
diff --git a/src/mame/audio/cps3.cpp b/src/mame/audio/cps3.cpp
index 08451c88beb..7038ec5adf8 100644
--- a/src/mame/audio/cps3.cpp
+++ b/src/mame/audio/cps3.cpp
@@ -25,9 +25,9 @@ const device_type CPS3 = &device_creator<cps3_sound_device>;
cps3_sound_device::cps3_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CPS3, "CPS3 Audio Custom", tag, owner, clock, "cps3_custom", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_key(0),
- m_base(NULL)
+ m_base(nullptr)
{
}
diff --git a/src/mame/audio/dave.cpp b/src/mame/audio/dave.cpp
index 4adae892e16..138b8d9ac40 100644
--- a/src/mame/audio/dave.cpp
+++ b/src/mame/audio/dave.cpp
@@ -95,23 +95,23 @@ void dave_device::device_start()
save_item(NAME(m_level_and));
save_item(NAME(m_mame_volumes));
- for (int i = 0; i < ARRAY_LENGTH(m_period); i++)
- m_period[i] = (STEP * machine().sample_rate()) / 125000;
+ for (auto & elem : m_period)
+ elem = (STEP * machine().sample_rate()) / 125000;
- for (int i = 0; i < ARRAY_LENGTH(m_count); i++)
- m_count[i] = (STEP * machine().sample_rate()) / 125000;
+ for (auto & elem : m_count)
+ elem = (STEP * machine().sample_rate()) / 125000;
- for (int i = 0; i < ARRAY_LENGTH(m_level); i++)
- m_level[i] = 0;
+ for (auto & elem : m_level)
+ elem = 0;
- for (int i = 0; i < ARRAY_LENGTH(m_level_or); i++)
- m_level_or[i] = 0;
+ for (auto & elem : m_level_or)
+ elem = 0;
- for (int i = 0; i < ARRAY_LENGTH(m_level_and); i++)
- m_level_and[i] = 0;
+ for (auto & elem : m_level_and)
+ elem = 0;
- for (int i = 0; i < ARRAY_LENGTH(m_mame_volumes); i++)
- m_mame_volumes[i] = 0;
+ for (auto & elem : m_mame_volumes)
+ elem = 0;
/* dave has 3 tone channels and 1 noise channel.
the volumes are mixed internally and output as left and right volume */
@@ -129,14 +129,14 @@ void dave_device::device_reset()
{
m_write_irq(CLEAR_LINE);
- for (int i = 0; i < 4; i++)
- m_segment[i] = 0;
+ for (auto & elem : m_segment)
+ elem = 0;
m_irq_status = 0;
m_irq_enable = 0;
- for (int i = 0; i < 32; i++)
- m_regs[i] = 0;
+ for (auto & elem : m_regs)
+ elem = 0;
}
@@ -178,7 +178,7 @@ const address_space_config *dave_device::memory_space_config(address_spacenum sp
{
case AS_PROGRAM: return &m_program_space_config;
case AS_IO: return &m_io_space_config;
- default: return NULL;
+ default: return nullptr;
}
}
diff --git a/src/mame/audio/dcs.cpp b/src/mame/audio/dcs.cpp
index 3e41f761ade..356314adeee 100644
--- a/src/mame/audio/dcs.cpp
+++ b/src/mame/audio/dcs.cpp
@@ -712,7 +712,7 @@ TIMER_CALLBACK_MEMBER( dcs_audio_device::dcs_reset )
m_internal_timer->reset();
/* start the SPORT0 timer */
- if (m_sport_timer != NULL)
+ if (m_sport_timer != nullptr)
m_sport_timer->adjust(attotime::from_hz(1000), 0, attotime::from_hz(1000));
/* reset the HLE transfer states */
@@ -773,7 +773,7 @@ void dcs_audio_device::dcs_register_state()
save_item(NAME(m_transfer.sum));
save_item(NAME(m_transfer.fifo_entries));
- if (m_sram != NULL)
+ if (m_sram != nullptr)
save_pointer(NAME(m_sram), 0x8000*4 / sizeof(m_sram[0]));
if (m_rev == 2)
@@ -787,23 +787,23 @@ void dcs_audio_device::dcs_register_state()
dcs_audio_device::dcs_audio_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, int rev) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- m_cpu(NULL),
- m_program(NULL),
- m_data(NULL),
+ m_cpu(nullptr),
+ m_program(nullptr),
+ m_data(nullptr),
m_rev(rev),
m_polling_offset(0),
m_polling_count(0),
m_channels(0),
m_size(0),
m_incs(0),
- m_reg_timer(NULL),
- m_sport_timer(NULL),
- m_internal_timer(NULL),
+ m_reg_timer(nullptr),
+ m_sport_timer(nullptr),
+ m_internal_timer(nullptr),
m_ireg(0),
m_ireg_base(0),
- m_bootrom(NULL),
+ m_bootrom(nullptr),
m_bootrom_words(0),
- m_sounddata(NULL),
+ m_sounddata(nullptr),
m_sounddata_words(0),
m_sounddata_banks(0),
m_sounddata_bank(0),
@@ -823,13 +823,13 @@ dcs_audio_device::dcs_audio_device(const machine_config &mconfig, device_type ty
m_timer_scale(0),
m_timer_period(0),
m_timers_fired(0),
- m_sram(NULL),
- m_polling_base(NULL),
- m_internal_program_ram(NULL),
- m_external_program_ram(NULL),
+ m_sram(nullptr),
+ m_polling_base(nullptr),
+ m_internal_program_ram(nullptr),
+ m_external_program_ram(nullptr),
m_dram_in_mb(0)
{
- m_dmadac[0] = m_dmadac[1] = m_dmadac[2] = m_dmadac[3] = m_dmadac[4] = m_dmadac[5] = NULL;
+ m_dmadac[0] = m_dmadac[1] = m_dmadac[2] = m_dmadac[3] = m_dmadac[4] = m_dmadac[5] = nullptr;
memset(m_control_regs, 0, sizeof(m_control_regs));
memset(&m_sdrc, 0, sizeof(m_sdrc));
memset(&m_dsio, 0, sizeof(m_dsio));
@@ -838,19 +838,19 @@ dcs_audio_device::dcs_audio_device(const machine_config &mconfig, device_type ty
void dcs_audio_device::device_reset()
{
- dcs_reset(NULL, 0);
+ dcs_reset(nullptr, 0);
}
void dcs_audio_device::device_start()
{
- m_sram = NULL;
+ m_sram = nullptr;
m_internal_program_ram = (UINT32 *)memshare("dcsint")->ptr();
m_external_program_ram = (UINT32 *)memshare("dcsext")->ptr();
/* find the DCS CPU and the sound ROMs */
m_cpu = subdevice<adsp21xx_device>("dcs");
- if (m_cpu != NULL && !m_cpu->started())
+ if (m_cpu != nullptr && !m_cpu->started())
throw device_missing_dependencies();
m_program = &m_cpu->space(AS_PROGRAM);
@@ -883,7 +883,7 @@ void dcs_audio_device::device_start()
/* register for save states */
dcs_register_state();
/* reset the system */
- dcs_reset(NULL, 0);
+ dcs_reset(nullptr, 0);
}
@@ -898,19 +898,19 @@ void dcs2_audio_device::device_start()
m_cpu = subdevice<adsp21xx_device>("dcs2");
m_rev = 2;
soundbank_words = 0x1000;
- if (m_cpu == NULL)
+ if (m_cpu == nullptr)
{
m_cpu = subdevice<adsp21xx_device>("dsio");
m_rev = 3;
soundbank_words = 0x400;
}
- if (m_cpu == NULL)
+ if (m_cpu == nullptr)
{
m_cpu = subdevice<adsp21xx_device>("denver");
m_rev = 4;
soundbank_words = 0x800;
}
- if (m_cpu != NULL && !m_cpu->started())
+ if (m_cpu != nullptr && !m_cpu->started())
throw device_missing_dependencies();
m_program = &m_cpu->space(AS_PROGRAM);
@@ -963,7 +963,7 @@ void dcs2_audio_device::device_start()
dcs_register_state();
/* reset the system */
- dcs_reset(NULL, 0);
+ dcs_reset(nullptr, 0);
}
@@ -1528,7 +1528,7 @@ void dcs_audio_device::data_w(UINT16 data)
return;
/* if we are DCS1, set a timer to latch the data */
- if (m_sport_timer == NULL)
+ if (m_sport_timer == nullptr)
machine().scheduler().synchronize(timer_expired_delegate(FUNC(dcs_audio_device::dcs_delayed_data_w_callback),this), data);
else
dcs_delayed_data_w(data);
@@ -2074,7 +2074,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( dcs_audio_device::transfer_watchdog_callback )
for ( ; transfer.fifo_entries; transfer.fifo_entries--)
preprocess_write(m_fifo_data_r(machine().driver_data()->generic_space(),0, 0xffff));
}
- if (transfer.watchdog != NULL)
+ if (transfer.watchdog != nullptr)
transfer.watchdog->adjust(attotime::from_msec(1), transfer.writes_left);
}
@@ -2352,7 +2352,7 @@ int dcs_audio_device::preprocess_write(UINT16 data)
int result;
/* if we're not DCS2, skip */
- if (m_sport_timer == NULL)
+ if (m_sport_timer == nullptr)
return 0;
/* state 0 - initialization phase */
diff --git a/src/mame/audio/depthch.cpp b/src/mame/audio/depthch.cpp
index 07e55d48e98..cdaae0ad108 100644
--- a/src/mame/audio/depthch.cpp
+++ b/src/mame/audio/depthch.cpp
@@ -26,7 +26,7 @@ static const char *const depthch_sample_names[] =
"shortex",
"spray",
"sonar",
- 0
+ nullptr
};
diff --git a/src/mame/audio/dkong.cpp b/src/mame/audio/dkong.cpp
index 215cfa99f57..305198e255e 100644
--- a/src/mame/audio/dkong.cpp
+++ b/src/mame/audio/dkong.cpp
@@ -388,7 +388,7 @@ static DISCRETE_SOUND_START(dkong2b)
#if DK_USE_CUSTOM
/* custom mixer for 555 CV voltage */
DISCRETE_CUSTOM8(NODE_28, dkong_custom_mixer, DS_SOUND1_INV, NODE_25,
- DK_R32, DK_R50, DK_R51, DK_R49, DK_C24, DK_SUP_V, NULL)
+ DK_R32, DK_R50, DK_R51, DK_R49, DK_C24, DK_SUP_V, nullptr)
#else
DISCRETE_LOGIC_INVERT(DS_SOUND1,DS_SOUND1_INV)
DISCRETE_MULTIPLY(NODE_24,DS_SOUND1,DK_SUP_V)
@@ -420,7 +420,7 @@ static DISCRETE_SOUND_START(dkong2b)
#if DK_USE_CUSTOM
/* custom mixer for 555 CV voltage */
DISCRETE_CUSTOM8(NODE_54, dkong_custom_mixer, DS_SOUND0_INV, NODE_51,
- DK_R36, DK_R45, DK_R46, DK_R44, DK_C29, DK_SUP_V, NULL)
+ DK_R36, DK_R45, DK_R46, DK_R44, DK_C29, DK_SUP_V, nullptr)
#else
DISCRETE_LOGIC_INVERT(DS_SOUND0,DS_SOUND0_INV)
DISCRETE_MULTIPLY(NODE_50,DS_SOUND0,DK_SUP_V)
diff --git a/src/mame/audio/exidy.cpp b/src/mame/audio/exidy.cpp
index 03465e0b263..16de53a8dd3 100644
--- a/src/mame/audio/exidy.cpp
+++ b/src/mame/audio/exidy.cpp
@@ -215,7 +215,7 @@ exidy_sound_device::exidy_sound_device(const machine_config &mconfig, device_typ
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
m_riot_irq_state(0),
- m_stream(NULL),
+ m_stream(nullptr),
m_freq_to_step(0),
m_sh6840_MSB_latch(0),
m_sh6840_LSB_latch(0),
@@ -248,8 +248,8 @@ void exidy_sound_device::device_start()
{
/* indicate no additional hardware */
m_has_sh8253 = FALSE;
- m_tms = NULL;
- m_cvsd = NULL;
+ m_tms = nullptr;
+ m_cvsd = nullptr;
common_sh_start();
}
@@ -413,10 +413,10 @@ void exidy_sound_device::r6532_irq(int state)
WRITE8_MEMBER( exidy_sound_device::r6532_porta_w )
{
- if (m_cvsd != NULL)
+ if (m_cvsd != nullptr)
space.machine().device("cvsdcpu")->execute().set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
- if (m_tms != NULL)
+ if (m_tms != nullptr)
{
logerror("(%f)%s:TMS5220 data write = %02X\n", space.machine().time().as_double(), space.machine().describe_context(), m_riot->porta_out_get());
m_tms->data_w(space, 0, data);
@@ -425,7 +425,7 @@ WRITE8_MEMBER( exidy_sound_device::r6532_porta_w )
READ8_MEMBER( exidy_sound_device::r6532_porta_r )
{
- if (m_tms != NULL)
+ if (m_tms != nullptr)
{
logerror("(%f)%s:TMS5220 status read = %02X\n", space.machine().time().as_double(), space.machine().describe_context(), m_tms->status_r(space, 0));
return m_tms->status_r(space, 0);
@@ -436,7 +436,7 @@ READ8_MEMBER( exidy_sound_device::r6532_porta_r )
WRITE8_MEMBER( exidy_sound_device::r6532_portb_w )
{
- if (m_tms != NULL)
+ if (m_tms != nullptr)
{
m_tms->rsq_w(data & 0x01);
m_tms->wsq_w((data >> 1) & 0x01);
@@ -447,7 +447,7 @@ WRITE8_MEMBER( exidy_sound_device::r6532_portb_w )
READ8_MEMBER( exidy_sound_device::r6532_portb_r )
{
UINT8 newdata = m_riot->portb_in_get();
- if (m_tms != NULL)
+ if (m_tms != nullptr)
{
newdata &= ~0x0c;
if (m_tms->readyq_r()) newdata |= 0x04;
@@ -695,7 +695,7 @@ void venture_sound_device::device_start()
m_riot = machine().device<riot6532_device>("riot");
m_has_sh8253 = TRUE;
- m_tms = NULL;
+ m_tms = nullptr;
m_pia0 = machine().device<pia6821_device>("pia0");
m_pia1 = machine().device<pia6821_device>("pia1");
@@ -955,7 +955,7 @@ void victory_sound_device::device_start()
m_riot = machine().device<riot6532_device>("riot");
m_has_sh8253 = TRUE;
- m_tms = NULL;
+ m_tms = nullptr;
m_pia0 = machine().device<pia6821_device>("pia0");
m_pia1 = machine().device<pia6821_device>("pia1");
diff --git a/src/mame/audio/exidy440.cpp b/src/mame/audio/exidy440.cpp
index 33d50f5ede2..626bdc5ae9c 100644
--- a/src/mame/audio/exidy440.cpp
+++ b/src/mame/audio/exidy440.cpp
@@ -53,23 +53,23 @@ exidy440_sound_device::exidy440_sound_device(const machine_config &mconfig, cons
device_sound_interface(mconfig, *this),
m_sound_command(0),
m_sound_command_ack(0),
- m_mixer_buffer_left(NULL),
- m_mixer_buffer_right(NULL),
- m_sound_cache(NULL),
- m_sound_cache_end(NULL),
- m_sound_cache_max(NULL),
+ m_mixer_buffer_left(nullptr),
+ m_mixer_buffer_right(nullptr),
+ m_sound_cache(nullptr),
+ m_sound_cache_end(nullptr),
+ m_sound_cache_max(nullptr),
m_m6844_priority(0x00),
m_m6844_interrupt(0x00),
m_m6844_chain(0x00),
- m_stream(NULL)
+ m_stream(nullptr)
{
m_sound_banks[0] = m_sound_banks[1] = m_sound_banks[2] = m_sound_banks[3] = 0;
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_sound_channel)
{
- m_sound_channel[i].base = NULL;
- m_sound_channel[i].offset = 0;
- m_sound_channel[i].remaining = 0;
+ elem.base = nullptr;
+ elem.offset = 0;
+ elem.remaining = 0;
}
}
diff --git a/src/mame/audio/flower.cpp b/src/mame/audio/flower.cpp
index 785051faa64..fcde400310d 100644
--- a/src/mame/audio/flower.cpp
+++ b/src/mame/audio/flower.cpp
@@ -89,9 +89,9 @@ void flower_sound_device::device_reset()
m_effect_timer->adjust(period, 0, period);
/* reset all the voices */
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_channel_list)
{
- voice = &m_channel_list[i];
+ voice = &elem;
voice->freq = 0;
voice->pos = 0;
diff --git a/src/mame/audio/gamate.cpp b/src/mame/audio/gamate.cpp
index 19555dd7c44..79913845058 100644
--- a/src/mame/audio/gamate.cpp
+++ b/src/mame/audio/gamate.cpp
@@ -30,7 +30,7 @@ const int EnvelopeVolumes[]={ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
gamate_sound_device::gamate_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, GAMATE_SND, "Gamate Audio Custom", tag, owner, clock, "gamate_sound", __FILE__)
, device_sound_interface(mconfig, *this)
- , m_mixer_channel(NULL)
+ , m_mixer_channel(nullptr)
{}
//-------------------------------------------------
diff --git a/src/mame/audio/geebee.cpp b/src/mame/audio/geebee.cpp
index 8105b65ac41..58103b0b7f2 100644
--- a/src/mame/audio/geebee.cpp
+++ b/src/mame/audio/geebee.cpp
@@ -18,12 +18,12 @@ const device_type GEEBEE = &device_creator<geebee_sound_device>;
geebee_sound_device::geebee_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, GEEBEE, "Gee Bee Audio Custom", tag, owner, clock, "geebee_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_decay(NULL),
- m_channel(NULL),
+ m_decay(nullptr),
+ m_channel(nullptr),
m_sound_latch(0),
m_sound_signal(0),
m_volume(0),
- m_volume_timer(NULL),
+ m_volume_timer(nullptr),
m_noise(0),
m_vcount(0)
{
diff --git a/src/mame/audio/gomoku.cpp b/src/mame/audio/gomoku.cpp
index e4253038649..9362bc25fe1 100644
--- a/src/mame/audio/gomoku.cpp
+++ b/src/mame/audio/gomoku.cpp
@@ -30,15 +30,15 @@ const device_type GOMOKU = &device_creator<gomoku_sound_device>;
gomoku_sound_device::gomoku_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, GOMOKU, "Gomoku Narabe Renju Audio Custom", tag, owner, clock, "gomoku_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_last_channel(NULL),
- m_sound_rom(NULL),
+ m_last_channel(nullptr),
+ m_sound_rom(nullptr),
m_num_voices(0),
m_sound_enable(0),
- m_stream(NULL),
- m_mixer_table(NULL),
- m_mixer_lookup(NULL),
- m_mixer_buffer(NULL),
- m_mixer_buffer_2(NULL)
+ m_stream(nullptr),
+ m_mixer_table(nullptr),
+ m_mixer_lookup(nullptr),
+ m_mixer_buffer(nullptr),
+ m_mixer_buffer_2(nullptr)
{
memset(m_channel_list, 0, sizeof(gomoku_sound_channel)*GOMOKU_MAX_VOICES);
memset(m_soundregs1, 0, sizeof(UINT8)*0x20);
diff --git a/src/mame/audio/gorf.cpp b/src/mame/audio/gorf.cpp
index 0114cb5afb3..fba308b391d 100644
--- a/src/mame/audio/gorf.cpp
+++ b/src/mame/audio/gorf.cpp
@@ -38,7 +38,7 @@ static const char *const PhonemeTable[65] =
"U" ,"Y" ,"T" ,"R" ,"E" ,"W" ,"AE" ,"AE1",
"AW2","UH2","UH1","UH" ,"O2" ,"O1" ,"IU" ,"U1",
"THV","TH" ,"ER" ,"EH" ,"E1" ,"AW" ,"PA1","STOP",
- 0
+ nullptr
};
static const char *const GorfWordTable[] =
@@ -73,7 +73,7 @@ static const char *const GorfWordTable[] =
"UH1TAEEH3K","BAH2I3Y1T","KAH1NKER","DYVAH1U1ER","DUHST","GAE1LUH1KSY","GAH1EH3T",
"PAH1I1R","TRAH2I1Y","SU1PRE1N","AWL","HA2AYL",
"EH1MPAH1I1R",
-0
+nullptr
};
#define num_samples (sizeof(GorfWordTable)/sizeof(char *))
@@ -106,7 +106,7 @@ const char *const gorf_sample_names[] =
"coin", "attack","bite","conquer","devour","dust",
"galaxy","got","power","try","supreme","all",
"hail","emperor",
- 0
+ nullptr
};
diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp
index 4feab28f889..6a5eb46f0e8 100644
--- a/src/mame/audio/gottlieb.cpp
+++ b/src/mame/audio/gottlieb.cpp
@@ -177,7 +177,7 @@ static const char *const reactor_sample_names[] =
"fx_39j", /* "45000" */
"fx_39k", /* "50000" */
"fx_39l", /* "55000" */
- 0 /* end of array */
+ nullptr /* end of array */
};
static const char *const qbert_sample_names[] =
@@ -227,7 +227,7 @@ static const char *const qbert_sample_names[] =
"fx_23", /* O1 with varying voice clock */
"fx_28",
"fx_36",
- 0 /* end of array */
+ nullptr /* end of array */
};
MACHINE_CONFIG_FRAGMENT( reactor_samples )
@@ -429,7 +429,7 @@ WRITE8_MEMBER( gottlieb_sound_r1_device::write )
m_riot->porta_in_set(pa0_5 | (pa7 << 7), 0xbf);
#if USE_FAKE_VOTRAX
- if (pa7 && m_samples != NULL)
+ if (pa7 && m_samples != nullptr)
trigger_sample(pa0_5);
#endif
}
@@ -464,7 +464,7 @@ WRITE8_MEMBER( gottlieb_sound_r1_device::r6532_portb_w )
WRITE8_MEMBER( gottlieb_sound_r1_device::votrax_data_w )
{
- if (m_votrax != NULL)
+ if (m_votrax != nullptr)
{
m_votrax->inflection_w(space, offset, data >> 6);
m_votrax->write(space, offset, ~data & 0x3f);
@@ -486,7 +486,7 @@ WRITE8_MEMBER( gottlieb_sound_r1_device::speech_clock_dac_w )
// prevent negative clock values (and possible crash)
if (data < 0x65) data = 0x65;
- if (m_votrax != NULL)
+ if (m_votrax != nullptr)
{
// nominal clock is 0xa0
if (data != m_last_speech_clock)
@@ -494,7 +494,7 @@ WRITE8_MEMBER( gottlieb_sound_r1_device::speech_clock_dac_w )
osd_printf_debug("clock = %02X\n", data);
// totally random guesswork; would like to get real measurements on a board
- if (m_votrax != NULL)
+ if (m_votrax != nullptr)
m_votrax->set_unscaled_clock(600000 + (data - 0xa0) * 10000);
m_last_speech_clock = data;
}
@@ -672,7 +672,7 @@ gottlieb_sound_r2_device::gottlieb_sound_r2_device(const machine_config &mconfig
m_ay2(*this, "ay2"),
m_sp0250(*this, "spsnd"),
m_cobram3_mod(false),
- m_nmi_timer(NULL),
+ m_nmi_timer(nullptr),
m_nmi_state(0),
m_audiocpu_latch(0),
m_speechcpu_latch(0),
diff --git a/src/mame/audio/gridlee.cpp b/src/mame/audio/gridlee.cpp
index e91a0e38758..b7575c2c34f 100644
--- a/src/mame/audio/gridlee.cpp
+++ b/src/mame/audio/gridlee.cpp
@@ -28,8 +28,8 @@ gridlee_sound_device::gridlee_sound_device(const machine_config &mconfig, const
m_tone_step(0),
m_tone_fraction(0),
m_tone_volume(0),
- m_stream(NULL),
- m_samples(NULL),
+ m_stream(nullptr),
+ m_samples(nullptr),
m_freq_to_step(0.0)
{
memset(m_sound_data, 0, sizeof(UINT8)*24);
diff --git a/src/mame/audio/invinco.cpp b/src/mame/audio/invinco.cpp
index 3181ddf8048..4aaed4c1f89 100644
--- a/src/mame/audio/invinco.cpp
+++ b/src/mame/audio/invinco.cpp
@@ -32,7 +32,7 @@ static const char *const invinco_sample_names[] =
"shiphit",
"move3", /* currently not used */
"move4", /* currently not used */
- 0
+ nullptr
};
diff --git a/src/mame/audio/leland.cpp b/src/mame/audio/leland.cpp
index d860cf43a2a..237f17b7b64 100644
--- a/src/mame/audio/leland.cpp
+++ b/src/mame/audio/leland.cpp
@@ -308,7 +308,7 @@ void leland_80186_sound_device::device_start()
m_ext_start = 0;
m_ext_stop = 0;
m_ext_active = 0;
- m_ext_base = NULL;
+ m_ext_base = nullptr;
m_audiocpu = downcast<i80186_cpu_device *>(machine().device("audiocpu"));
diff --git a/src/mame/audio/lynx.cpp b/src/mame/audio/lynx.cpp
index 2e17abde91f..ba31b88ba06 100644
--- a/src/mame/audio/lynx.cpp
+++ b/src/mame/audio/lynx.cpp
@@ -212,9 +212,9 @@ void lynx2_sound_device::device_start()
void lynx_sound_device::device_reset()
{
- for (int i = 0; i < LYNX_AUDIO_CHANNELS; i++)
+ for (auto & elem : m_audio)
{
- reset_channel(&m_audio[i]);
+ reset_channel(&elem);
}
}
diff --git a/src/mame/audio/m72.cpp b/src/mame/audio/m72.cpp
index 9bf76c979aa..69566d713b8 100644
--- a/src/mame/audio/m72.cpp
+++ b/src/mame/audio/m72.cpp
@@ -53,7 +53,7 @@ m72_audio_device::m72_audio_device(const machine_config &mconfig, const char *ta
device_sound_interface(mconfig, *this),
m_irqvector(0),
m_sample_addr(0),
- m_samples(NULL),
+ m_samples(nullptr),
m_samples_size(0)
{
}
diff --git a/src/mame/audio/mac.cpp b/src/mame/audio/mac.cpp
index 7a0b7a93a62..57ad49aa96f 100644
--- a/src/mame/audio/mac.cpp
+++ b/src/mame/audio/mac.cpp
@@ -36,7 +36,7 @@ mac_sound_device::mac_sound_device(const machine_config &mconfig, const char *ta
: device_t(mconfig, MAC_SOUND, "Mac Audio Custom", tag, owner, clock, "mac_sound", __FILE__),
device_sound_interface(mconfig, *this),
m_sample_enable(0),
- m_mac_snd_buf_ptr(NULL),
+ m_mac_snd_buf_ptr(nullptr),
m_snd_cache_len(0),
m_snd_cache_head(0),
m_snd_cache_tail(0),
diff --git a/src/mame/audio/mario.cpp b/src/mame/audio/mario.cpp
index 3958aa8d743..ba8c797f147 100644
--- a/src/mame/audio/mario.cpp
+++ b/src/mame/audio/mario.cpp
@@ -645,7 +645,7 @@ static void set_ea(address_space &space, int ea)
mario_state *state = space.machine().driver_data<mario_state>();
//printf("ea: %d\n", ea);
//machine.device("audiocpu")->execute().set_input_line(MCS48_INPUT_EA, (ea) ? ASSERT_LINE : CLEAR_LINE);
- if (state->m_eabank != NULL)
+ if (state->m_eabank != nullptr)
state->membank(state->m_eabank)->set_entry(ea);
}
@@ -667,8 +667,8 @@ void mario_state::sound_start()
SND[0x1001] = 0x01;
#endif
- m_eabank = NULL;
- if (audiocpu != NULL && audiocpu->type() != Z80)
+ m_eabank = nullptr;
+ if (audiocpu != nullptr && audiocpu->type() != Z80)
{
m_eabank = "bank1";
audiocpu->memory().space(AS_PROGRAM).install_read_bank(0x000, 0x7ff, "bank1");
diff --git a/src/mame/audio/mea8000.cpp b/src/mame/audio/mea8000.cpp
index 6936205b79f..306fec1ac3e 100644
--- a/src/mame/audio/mea8000.cpp
+++ b/src/mame/audio/mea8000.cpp
@@ -174,10 +174,10 @@ void mea8000_device::device_reset()
m_roe = 0;
m_state = MEA8000_STOPPED;
update_req();
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_f)
{
- m_f[i].last_output = 0;
- m_f[i].output = 0;
+ elem.last_output = 0;
+ elem.output = 0;
}
}
@@ -215,8 +215,8 @@ void mea8000_device::init_tables()
m_exp_table[i] = exp(-M_PI * f) * QUANT;
m_exp2_table[i] = exp(-2 * M_PI * f) * QUANT;
}
- for (int i = 0; i < NOISE_LEN; i++)
- m_noise_table[i] = (machine().rand() % (2 * QUANT)) - QUANT;
+ for (auto & elem : m_noise_table)
+ elem = (machine().rand() % (2 * QUANT)) - QUANT;
}
@@ -371,10 +371,10 @@ int mea8000_device::compute_sample()
void mea8000_device::shift_frame()
{
m_last_pitch = m_pitch;
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_f)
{
- m_f[i].last_bw = m_f[i].bw;
- m_f[i].last_fm = m_f[i].fm;
+ elem.last_bw = elem.bw;
+ elem.last_fm = elem.fm;
}
m_last_ampl = m_ampl;
}
diff --git a/src/mame/audio/micro3d.cpp b/src/mame/audio/micro3d.cpp
index b2bd2cb09ec..0a53160f017 100644
--- a/src/mame/audio/micro3d.cpp
+++ b/src/mame/audio/micro3d.cpp
@@ -174,7 +174,7 @@ micro3d_sound_device::micro3d_sound_device(const machine_config &mconfig, const
m_noise_shift(0),
m_noise_value(0),
m_noise_subcount(0),
- m_stream(NULL)
+ m_stream(nullptr)
{
memset(m_dac, 0, sizeof(UINT8)*4);
diff --git a/src/mame/audio/midway.cpp b/src/mame/audio/midway.cpp
index ba7d9008087..4aea1c337ad 100644
--- a/src/mame/audio/midway.cpp
+++ b/src/mame/audio/midway.cpp
@@ -437,7 +437,7 @@ machine_config_constructor midway_ssio_device::device_mconfig_additions() const
ioport_constructor midway_ssio_device::device_input_ports() const
{
- return NULL;
+ return nullptr;
// return INPUT_PORTS_NAME( midway_ssio );
}
diff --git a/src/mame/audio/mw8080bw.cpp b/src/mame/audio/mw8080bw.cpp
index 8cebf140197..f1bcd852e94 100644
--- a/src/mame/audio/mw8080bw.cpp
+++ b/src/mame/audio/mw8080bw.cpp
@@ -139,7 +139,7 @@ static const char *const seawolf_sample_names[] =
"dive",
"sonar",
"minehit",
- 0
+ nullptr
};
MACHINE_CONFIG_FRAGMENT( seawolf_audio )
@@ -192,7 +192,7 @@ static const char *const gunfight_sample_names[] =
"*gunfight",
"gunshot",
"killed",
- 0
+ nullptr
};
@@ -1542,7 +1542,7 @@ static const char *const gmissile_sample_names[] =
"*gmissile",
"1", /* missle */
"2", /* explosion */
- 0
+ nullptr
};
MACHINE_CONFIG_FRAGMENT( gmissile_audio )
@@ -1634,7 +1634,7 @@ static const char *const m4_sample_names[] =
"*m4",
"1", /* missle */
"2", /* explosion */
- 0
+ nullptr
};
@@ -1890,7 +1890,7 @@ static const char *const clowns_sample_names[] =
{
"*clowns",
"miss",
- 0
+ nullptr
};
MACHINE_CONFIG_FRAGMENT( clowns_audio )
@@ -3263,7 +3263,7 @@ static const char *const phantom2_sample_names[] =
"*phantom2",
"1", /* shot */
"2", /* explosion */
- 0
+ nullptr
};
MACHINE_CONFIG_FRAGMENT( phantom2_audio )
@@ -3506,7 +3506,7 @@ static const char *const invaders_sample_names[] =
"7", /* fleet move 4 */
"8", /* UFO/saucer hit */
"9", /* bonus base */
- 0
+ nullptr
};
diff --git a/src/mame/audio/pleiads.cpp b/src/mame/audio/pleiads.cpp
index 19c5d694774..f5c00fc3fdf 100644
--- a/src/mame/audio/pleiads.cpp
+++ b/src/mame/audio/pleiads.cpp
@@ -29,11 +29,11 @@ pleiads_sound_device::pleiads_sound_device(const machine_config &mconfig, const
pleiads_sound_device::pleiads_sound_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_sound_interface(mconfig, *this),
- m_channel(NULL),
+ m_channel(nullptr),
m_sound_latch_a(0),
m_sound_latch_b(0),
m_sound_latch_c(0),
- m_poly18(NULL),
+ m_poly18(nullptr),
m_polybit(0),
m_pa5_resistor(0),
m_pc5_resistor(0),
diff --git a/src/mame/audio/polepos.cpp b/src/mame/audio/polepos.cpp
index 29456da2fa3..ac48f57574e 100644
--- a/src/mame/audio/polepos.cpp
+++ b/src/mame/audio/polepos.cpp
@@ -58,7 +58,7 @@ polepos_sound_device::polepos_sound_device(const machine_config &mconfig, const
m_sample_msb(0),
m_sample_lsb(0),
m_sample_enable(0),
- m_stream(NULL)
+ m_stream(nullptr)
{
}
diff --git a/src/mame/audio/pulsar.cpp b/src/mame/audio/pulsar.cpp
index ee5e25260d6..b17a4413feb 100644
--- a/src/mame/audio/pulsar.cpp
+++ b/src/mame/audio/pulsar.cpp
@@ -49,7 +49,7 @@ static const char *const pulsar_sample_names[] =
"birth",
"hbeat",
"movmaze",
- 0
+ nullptr
};
diff --git a/src/mame/audio/redbaron.cpp b/src/mame/audio/redbaron.cpp
index b9ada2027de..ff50862cf7a 100644
--- a/src/mame/audio/redbaron.cpp
+++ b/src/mame/audio/redbaron.cpp
@@ -38,8 +38,8 @@ const device_type REDBARON = &device_creator<redbaron_sound_device>;
redbaron_sound_device::redbaron_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, REDBARON, "Red Baron Audio Custom", tag, owner, clock, "redbaron_custom", __FILE__),
device_sound_interface(mconfig, *this),
- m_vol_lookup(NULL),
- m_channel(NULL),
+ m_vol_lookup(nullptr),
+ m_channel(nullptr),
m_latch(0),
m_poly_counter(0),
m_poly_shift(0),
diff --git a/src/mame/audio/scramble.cpp b/src/mame/audio/scramble.cpp
index b91d363bf2b..bafc07653cb 100644
--- a/src/mame/audio/scramble.cpp
+++ b/src/mame/audio/scramble.cpp
@@ -134,7 +134,7 @@ static void filter_w(device_t *device, int data)
C += 220000; /* 220000pF = 0.220uF */
if (data & 2)
C += 47000; /* 47000pF = 0.047uF */
- if (device != NULL)
+ if (device != nullptr)
dynamic_cast<filter_rc_device*>(device)->filter_rc_set_RC(FLT_RC_LOWPASS, 1000, 5100, 0, CAP_P(C));
}
diff --git a/src/mame/audio/segag80r.cpp b/src/mame/audio/segag80r.cpp
index 2836ed897f5..60cdcc7a93a 100644
--- a/src/mame/audio/segag80r.cpp
+++ b/src/mame/audio/segag80r.cpp
@@ -33,8 +33,8 @@ const device_type SEGA005 = &device_creator<sega005_sound_device>;
sega005_sound_device::sega005_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SEGA005, "Sega 005 Audio Custom", tag, owner, clock, "sega005_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_sega005_sound_timer(NULL),
- m_sega005_stream(NULL)
+ m_sega005_sound_timer(nullptr),
+ m_sega005_stream(nullptr)
{
}
@@ -235,7 +235,7 @@ static const char *const astrob_sample_names[] =
"pexplode", /* 13 */
"deedle", /* 14 */
"sonar", /* 15 */
- 0
+ nullptr
};
@@ -422,7 +422,7 @@ static const char *const sega005_sample_names[] =
"missile", /* 4 */
"helicopt", /* 5 */
"whistle", /* 6 */
- 0
+ nullptr
};
@@ -584,7 +584,7 @@ static const char *const spaceod_sample_names[] =
"accel", /* 8 */
"damaged", /* 9 */
"erocket", /* 10 */
- 0
+ nullptr
};
@@ -676,7 +676,7 @@ static const char *const monsterb_sample_names[] =
"*monsterb",
"zap",
"jumpdown",
- 0
+ nullptr
};
diff --git a/src/mame/audio/segasnd.cpp b/src/mame/audio/segasnd.cpp
index 97fdf3a1f41..72d58d8fa51 100644
--- a/src/mame/audio/segasnd.cpp
+++ b/src/mame/audio/segasnd.cpp
@@ -73,7 +73,7 @@ speech_sound_device::speech_sound_device(const machine_config &mconfig, const ch
m_latch(0),
m_t0(0),
m_p2(0),
- m_speech(NULL)
+ m_speech(nullptr)
{
}
@@ -243,7 +243,7 @@ usb_sound_device::usb_sound_device(const machine_config &mconfig, device_type ty
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_sound_interface(mconfig, *this),
m_ourcpu(*this, "ourcpu"),
- m_stream(NULL),
+ m_stream(nullptr),
m_in_latch(0),
m_out_latch(0),
m_last_p2_value(0),
@@ -278,7 +278,7 @@ void usb_sound_device::device_start()
/* find the CPU we are associated with */
m_maincpu = machine().device("maincpu");
- assert(m_maincpu != NULL);
+ assert(m_maincpu != nullptr);
/* create a sound stream */
m_stream = machine().sound().stream_alloc(*this, 0, 1, SAMPLE_RATE);
diff --git a/src/mame/audio/seibu.cpp b/src/mame/audio/seibu.cpp
index 0d23c437afa..b78e142a99a 100644
--- a/src/mame/audio/seibu.cpp
+++ b/src/mame/audio/seibu.cpp
@@ -84,7 +84,7 @@ seibu_sound_device::seibu_sound_device(const machine_config &mconfig, const char
m_rst18_irq(0xff)
{
m_encryption_mode = 0;
- m_decrypted_opcodes = NULL;
+ m_decrypted_opcodes = nullptr;
}
void seibu_sound_device::set_encryption(int mode)
@@ -234,7 +234,7 @@ void seibu_sound_device::update_irq_lines(int param)
break;
}
- if (m_sound_cpu != NULL)
+ if (m_sound_cpu != nullptr)
{
if ((m_rst10_irq & m_rst18_irq) == 0xff) /* no IRQs pending */
m_sound_cpu->execute().set_input_line(0, CLEAR_LINE);
@@ -509,13 +509,13 @@ const device_type SEIBU_ADPCM = &device_creator<seibu_adpcm_device>;
seibu_adpcm_device::seibu_adpcm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SEIBU_ADPCM, "Seibu ADPCM (MSM5205)", tag, owner, clock, "seibu_adpcm", __FILE__),
device_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_current(0),
m_end(0),
m_nibble(0),
m_playing(0),
- m_rom_tag(NULL),
- m_base(NULL)
+ m_rom_tag(nullptr),
+ m_base(nullptr)
{
}
diff --git a/src/mame/audio/senjyo.cpp b/src/mame/audio/senjyo.cpp
index a8f92fedbe5..1b0c938a295 100644
--- a/src/mame/audio/senjyo.cpp
+++ b/src/mame/audio/senjyo.cpp
@@ -8,7 +8,7 @@ const z80_daisy_config senjyo_daisy_chain[] =
{
{ "z80ctc" },
{ "z80pio" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/audio/skyraid.cpp b/src/mame/audio/skyraid.cpp
index 1d872d8d1e5..b86e9bc64be 100644
--- a/src/mame/audio/skyraid.cpp
+++ b/src/mame/audio/skyraid.cpp
@@ -248,7 +248,7 @@ DISCRETE_SOUND_START( skyraid )
/************************************************
* Missle sound
************************************************/
- DISCRETE_CUSTOM5(NODE_40, skyraid_missle_custom_charge, SKYRAID_MISSILE_EN, SKYRAID_R12, SKYRAID_R14, SKYRAID_R13, SKYRAID_C44, NULL)
+ DISCRETE_CUSTOM5(NODE_40, skyraid_missle_custom_charge, SKYRAID_MISSILE_EN, SKYRAID_R12, SKYRAID_R14, SKYRAID_R13, SKYRAID_C44, nullptr)
DISCRETE_566(NODE_41, /* IC K6, pin 3 */
NODE_40, /* VMOD */
SKYRAID_R16, SKYRAID_C45,
diff --git a/src/mame/audio/snes_snd.cpp b/src/mame/audio/snes_snd.cpp
index 02a73c798e7..c37020bc504 100644
--- a/src/mame/audio/snes_snd.cpp
+++ b/src/mame/audio/snes_snd.cpp
@@ -703,7 +703,7 @@ void snes_sound_device::dsp_update( short *sound_ptr )
}
#endif /* !defined( NO_ECHO ) */
- if (sound_ptr != NULL)
+ if (sound_ptr != nullptr)
{
if (m_dsp_regs[0x6c] & 0x40)
{
diff --git a/src/mame/audio/snk6502.cpp b/src/mame/audio/snk6502.cpp
index 1f2afed4216..61a5bc8e959 100644
--- a/src/mame/audio/snk6502.cpp
+++ b/src/mame/audio/snk6502.cpp
@@ -39,7 +39,7 @@ const char *const sasuke_sample_names[] =
"shot",
"boss_attack",
- 0
+ nullptr
};
const char *const vanguard_sample_names[] =
@@ -68,7 +68,7 @@ const char *const vanguard_sample_names[] =
"vg_voi-e",
"vg_voi-f",
- 0
+ nullptr
};
@@ -90,7 +90,7 @@ const char *const fantasy_sample_names[] =
"ft_voi-a",
"ft_voi-b",
- 0
+ nullptr
};
@@ -136,9 +136,9 @@ snk6502_sound_device::snk6502_sound_device(const machine_config &mconfig, const
//m_tone_channels[CHANNELS],
m_tone_clock_expire(0),
m_tone_clock(0),
- m_tone_stream(NULL),
+ m_tone_stream(nullptr),
m_samples(*this, ":samples"),
- m_ROM(NULL),
+ m_ROM(nullptr),
m_Sound0StopOnRollover(0),
m_LastPort1(0),
m_hd38880_cmd(0),
diff --git a/src/mame/audio/spacefb.cpp b/src/mame/audio/spacefb.cpp
index 16df34c04bf..9e846d04904 100644
--- a/src/mame/audio/spacefb.cpp
+++ b/src/mame/audio/spacefb.cpp
@@ -70,7 +70,7 @@ static const char *const spacefb_sample_names[] =
"shipfire",
"explode1",
"explode2",
- 0
+ nullptr
};
diff --git a/src/mame/audio/specimx_snd.cpp b/src/mame/audio/specimx_snd.cpp
index 2b56c6b25f8..ec64bc096cc 100644
--- a/src/mame/audio/specimx_snd.cpp
+++ b/src/mame/audio/specimx_snd.cpp
@@ -27,7 +27,7 @@ const device_type SPECIMX_SND = &device_creator<specimx_sound_device>;
specimx_sound_device::specimx_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SPECIMX_SND, "Specialist MX Audio Custom", tag, owner, clock, "specimx_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_mixer_channel(NULL)
+ m_mixer_channel(nullptr)
{
memset(m_specimx_input, 0, sizeof(int)*3);
}
diff --git a/src/mame/audio/svis_snd.cpp b/src/mame/audio/svis_snd.cpp
index 86408d26820..cc2bec2b821 100644
--- a/src/mame/audio/svis_snd.cpp
+++ b/src/mame/audio/svis_snd.cpp
@@ -25,7 +25,7 @@ const device_type SVISION_SND = &device_creator<svision_sound_device>;
svision_sound_device::svision_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SVISION_SND, "Super Vision Audio Custom", tag, owner, clock, "svision_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_mixer_channel(NULL)
+ m_mixer_channel(nullptr)
{
}
diff --git a/src/mame/audio/t5182.cpp b/src/mame/audio/t5182.cpp
index e5c84cc6c68..a40349de0d0 100644
--- a/src/mame/audio/t5182.cpp
+++ b/src/mame/audio/t5182.cpp
@@ -212,7 +212,7 @@ TIMER_CALLBACK_MEMBER( t5182_device::setirq_callback )
break;
}
- if (m_ourcpu == NULL)
+ if (m_ourcpu == nullptr)
return;
if (m_irqstate == 0) /* no IRQs pending */
diff --git a/src/mame/audio/targ.cpp b/src/mame/audio/targ.cpp
index 52aec287409..440678e1113 100644
--- a/src/mame/audio/targ.cpp
+++ b/src/mame/audio/targ.cpp
@@ -131,7 +131,7 @@ static const char *const sample_names[] =
"sexpl",
"spslow",
"spfast",
- 0
+ nullptr
};
diff --git a/src/mame/audio/tiamc1.cpp b/src/mame/audio/tiamc1.cpp
index 6c7f2555623..9c896429fcd 100644
--- a/src/mame/audio/tiamc1.cpp
+++ b/src/mame/audio/tiamc1.cpp
@@ -60,7 +60,7 @@ const device_type TIAMC1 = &device_creator<tiamc1_sound_device>;
tiamc1_sound_device::tiamc1_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TIAMC1, "TIA-MC1 Audio Custom", tag, owner, clock, "tiamc1_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_channel(NULL),
+ m_channel(nullptr),
m_timer1_divider(0)
{
}
diff --git a/src/mame/audio/trackfld.cpp b/src/mame/audio/trackfld.cpp
index b73a5d708fe..6f78f861712 100644
--- a/src/mame/audio/trackfld.cpp
+++ b/src/mame/audio/trackfld.cpp
@@ -101,7 +101,7 @@ READ8_MEMBER( trackfld_audio_device::hyperspt_sh_timer_r )
{
UINT32 clock = m_audiocpu->total_cycles() / TIMER_RATE;
- if (m_vlm != NULL)
+ if (m_vlm != nullptr)
return (clock & 0x3) | (m_vlm->bsy() ? 0x04 : 0);
else
return (clock & 0x3);
diff --git a/src/mame/audio/triplhnt.cpp b/src/mame/audio/triplhnt.cpp
index defe51527d2..f7dd84cf5e8 100644
--- a/src/mame/audio/triplhnt.cpp
+++ b/src/mame/audio/triplhnt.cpp
@@ -15,7 +15,7 @@ const char *const triplhnt_sample_names[] =
"*triplhnt",
"bear_rac",
"witch",
- 0
+ nullptr
};
/************************************************************************/
diff --git a/src/mame/audio/turbo.cpp b/src/mame/audio/turbo.cpp
index 4b5fa108ce0..cb24f3234a9 100644
--- a/src/mame/audio/turbo.cpp
+++ b/src/mame/audio/turbo.cpp
@@ -178,7 +178,7 @@ static const char *const turbo_sample_names[] =
"skidding", /* 6: Spin */
"idle", /* 7: Idle */
"ambulanc", /* 8: Ambulance */
- 0
+ nullptr
};
@@ -425,7 +425,7 @@ static const char *const subroc3d_sample_names[] =
"09", /* 8: prolog sound */
"11", /* 9: alarm 0 */
"12", /* 10: alarm 1 */
- 0
+ nullptr
};
MACHINE_CONFIG_FRAGMENT( subroc3d_samples )
@@ -569,7 +569,7 @@ static const char *const buckrog_sample_names[]=
"shipsnd1", /* 8 */
"shipsnd2", /* 9 */
"shipsnd3", /* 10 */
- 0
+ nullptr
};
diff --git a/src/mame/audio/turrett.cpp b/src/mame/audio/turrett.cpp
index 6a2fc150c7b..bb1fee907b4 100644
--- a/src/mame/audio/turrett.cpp
+++ b/src/mame/audio/turrett.cpp
@@ -19,7 +19,7 @@ turrett_device::turrett_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, TURRETT, "Turret Tower Sound", tag, owner, clock, "ttsnd", __FILE__),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this),
- m_space_config("ttsound", ENDIANNESS_LITTLE, 16, 28, 0, NULL)
+ m_space_config("ttsound", ENDIANNESS_LITTLE, 16, 28, 0, nullptr)
{
}
@@ -30,7 +30,7 @@ turrett_device::turrett_device(const machine_config &mconfig, const char *tag, d
const address_space_config *turrett_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
@@ -69,8 +69,8 @@ void turrett_device::device_start()
void turrett_device::device_reset()
{
- for (int ch = 0; ch < SOUND_CHANNELS; ++ch)
- m_channels[ch].m_playing = false;
+ for (auto & elem : m_channels)
+ elem.m_playing = false;
}
diff --git a/src/mame/audio/tx1.cpp b/src/mame/audio/tx1.cpp
index 7891d97e29b..4628f529a59 100644
--- a/src/mame/audio/tx1.cpp
+++ b/src/mame/audio/tx1.cpp
@@ -62,7 +62,7 @@ tx1_sound_device::tx1_sound_device(const machine_config &mconfig, const char *ta
tx1_sound_device::tx1_sound_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_sound_interface(mconfig, *this),
- m_stream(NULL),
+ m_stream(nullptr),
m_freq_to_step(0),
m_step0(0),
m_step1(0),
@@ -377,8 +377,8 @@ void buggyboy_sound_device::device_start()
compute_resistor_weights(0, 16384, -1.0,
4, &resistors[0], aweights, 0, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0 );
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0 );
for (i = 0; i < 16; i++)
m_eng_voltages[i] = combine_4_weights(aweights, BIT(tmp[i], 0), BIT(tmp[i], 1), BIT(tmp[i], 2), BIT(tmp[i], 3));
diff --git a/src/mame/audio/vboy.cpp b/src/mame/audio/vboy.cpp
index b808ee8a333..eb9947e9806 100644
--- a/src/mame/audio/vboy.cpp
+++ b/src/mame/audio/vboy.cpp
@@ -224,7 +224,7 @@ void vboysnd_device::device_start()
memset(m_aram, 0, 0x600);
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
m_timer->adjust(attotime::zero, 0, attotime::from_hz(AUDIO_FREQ/4));
}
diff --git a/src/mame/audio/vc4000snd.cpp b/src/mame/audio/vc4000snd.cpp
index 00b33d308ae..72a8e46b349 100644
--- a/src/mame/audio/vc4000snd.cpp
+++ b/src/mame/audio/vc4000snd.cpp
@@ -15,7 +15,7 @@ const device_type VC4000_SND = &device_creator<vc4000_sound_device>;
vc4000_sound_device::vc4000_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VC4000_SND, "Intertion Electronic VC 4000 Audio Custom", tag, owner, clock, "vc4000_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_channel(NULL),
+ m_channel(nullptr),
m_size(0),
m_pos(0),
m_level(0)
diff --git a/src/mame/audio/vicdual.cpp b/src/mame/audio/vicdual.cpp
index 8576db9bf66..a1219121101 100644
--- a/src/mame/audio/vicdual.cpp
+++ b/src/mame/audio/vicdual.cpp
@@ -107,7 +107,7 @@ static const char *const frogs_sample_names[] =
"hop",
"splash",
"zip",
- 0
+ nullptr
};
@@ -454,7 +454,7 @@ MACHINE_CONFIG_END
WRITE8_MEMBER( vicdual_state::headon_audio_w )
{
- if (m_discrete == NULL)
+ if (m_discrete == nullptr)
return;
m_discrete->write(space, HEADON_HISPEED_PC_EN, data & 0x01);
m_discrete->write(space, HEADON_SCREECH1_EN, data & 0x02);
@@ -468,7 +468,7 @@ WRITE8_MEMBER( vicdual_state::headon_audio_w )
WRITE8_MEMBER( vicdual_state::invho2_audio_w )
{
- if (m_discrete == NULL)
+ if (m_discrete == nullptr)
return;
m_discrete->write(space, HEADON_HISPEED_PC_EN, data & 0x10);
m_discrete->write(space, HEADON_SCREECH1_EN, data & 0x08);
diff --git a/src/mame/audio/warpwarp.cpp b/src/mame/audio/warpwarp.cpp
index 1c3f42f9de4..728ac384e33 100644
--- a/src/mame/audio/warpwarp.cpp
+++ b/src/mame/audio/warpwarp.cpp
@@ -21,17 +21,17 @@ const device_type WARPWARP = &device_creator<warpwarp_sound_device>;
warpwarp_sound_device::warpwarp_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, WARPWARP, "Warp Warp Audio Custom", tag, owner, clock, "warpwarp_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_decay(NULL),
- m_channel(NULL),
+ m_decay(nullptr),
+ m_channel(nullptr),
m_sound_latch(0),
m_music1_latch(0),
m_music2_latch(0),
m_sound_signal(0),
m_sound_volume(0),
- m_sound_volume_timer(NULL),
+ m_sound_volume_timer(nullptr),
m_music_signal(0),
m_music_volume(0),
- m_music_volume_timer(NULL),
+ m_music_volume_timer(nullptr),
m_noise(0),
m_vcarry(0),
m_vcount(0),
diff --git a/src/mame/audio/wiping.cpp b/src/mame/audio/wiping.cpp
index 0eb743b1653..9fb41a4ce0c 100644
--- a/src/mame/audio/wiping.cpp
+++ b/src/mame/audio/wiping.cpp
@@ -19,16 +19,16 @@ const device_type WIPING = &device_creator<wiping_sound_device>;
wiping_sound_device::wiping_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, WIPING, "Wiping Audio Custom", tag, owner, clock, "wiping_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_last_channel(NULL),
- m_sound_prom(NULL),
- m_sound_rom(NULL),
+ m_last_channel(nullptr),
+ m_sound_prom(nullptr),
+ m_sound_rom(nullptr),
m_num_voices(0),
m_sound_enable(0),
- m_stream(NULL),
- m_mixer_table(NULL),
- m_mixer_lookup(NULL),
- m_mixer_buffer(NULL),
- m_mixer_buffer_2(NULL)
+ m_stream(nullptr),
+ m_mixer_table(nullptr),
+ m_mixer_lookup(nullptr),
+ m_mixer_buffer(nullptr),
+ m_mixer_buffer_2(nullptr)
{
memset(m_channel_list, 0, sizeof(wp_sound_channel)*MAX_VOICES);
memset(m_soundregs, 0, sizeof(UINT8)*0x4000);
diff --git a/src/mame/audio/wow.cpp b/src/mame/audio/wow.cpp
index e6a1b8888bd..7ff86ef10a1 100644
--- a/src/mame/audio/wow.cpp
+++ b/src/mame/audio/wow.cpp
@@ -39,7 +39,7 @@ static const char *const PhonemeTable[65] =
"U" ,"Y" ,"T" ,"R" ,"E" ,"W" ,"AE" ,"AE1",
"AW2","UH2","UH1","UH" ,"O2" ,"O1" ,"IU" ,"U1",
"THV","TH" ,"ER" ,"EH" ,"E1" ,"AW" ,"PA1","STOP",
- 0
+ nullptr
};
/* Missing samples : ready, from, one, bite, youl, explode, if, myself, back,
@@ -69,7 +69,7 @@ static const char *const wowWordTable[] =
"WOO1R", "WORYER", "watch.wav", "WE1Y", "WEHLKUHM",
"WERR", "WAH1EH3I3L", "WIL", "WITH", "WIZERD", "wont.wav",
"WO1O2R", "WO1ERLD", "WORLINGS", "WORLUHK",
-"YI3U", "Y1IUU", "YIUUI", "Y1IUU1U1", "YI3U1", "Y1IUUL", "YIUU1L", "Y1IUUD", "YO2O2R",0
+"YI3U", "Y1IUU", "YIUUI", "Y1IUU1U1", "YI3U1", "Y1IUUL", "YIUU1L", "Y1IUUD", "YO2O2R",nullptr
};
#define num_samples (sizeof(wowWordTable)/sizeof(char *))
@@ -97,7 +97,7 @@ const char *const wow_sample_names[] =
"war", "warrior", "watch", "we", "welcome",
"were", "while", "will", "with", "wizard", "wont",
"wor", "world", "worlings", "worlock",
- "you", "you", "you", "you", "you", "youl", "youl", "youd", "your",0
+ "you", "you", "you", "you", "you", "youl", "youl", "youd", "your",nullptr
};
diff --git a/src/mame/audio/wswan_snd.cpp b/src/mame/audio/wswan_snd.cpp
index 77a21d7cb3b..42918fb191b 100644
--- a/src/mame/audio/wswan_snd.cpp
+++ b/src/mame/audio/wswan_snd.cpp
@@ -31,7 +31,7 @@ const device_type WSWAN_SND = &device_creator<wswan_sound_device>;
wswan_sound_device::wswan_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, WSWAN_SND, "WonderSwan Audio Custom", tag, owner, clock, "wswan_sound", __FILE__),
device_sound_interface(mconfig, *this),
- m_channel(NULL),
+ m_channel(nullptr),
m_sweep_step(0),
m_sweep_time(0),
m_sweep_count(0),
diff --git a/src/mame/audio/zaxxon.cpp b/src/mame/audio/zaxxon.cpp
index 1e3205bf138..720c510b50d 100644
--- a/src/mame/audio/zaxxon.cpp
+++ b/src/mame/audio/zaxxon.cpp
@@ -88,7 +88,7 @@ static const char *const zaxxon_sample_names[] =
"20", /* 9 - Alarm 3 (low fuel) */
"05", /* 10 - initial background noise */
"04", /* 11 - looped asteroid noise */
- 0
+ nullptr
};
@@ -188,7 +188,7 @@ static const char *const congo_sample_names[] =
"congal", /* 2 */
"congah", /* 3 */
"rim", /* 4 */
- 0
+ nullptr
};
diff --git a/src/mame/drivers/2mindril.cpp b/src/mame/drivers/2mindril.cpp
index 758fb4518ce..24492ebd5f3 100644
--- a/src/mame/drivers/2mindril.cpp
+++ b/src/mame/drivers/2mindril.cpp
@@ -403,10 +403,10 @@ static const gfx_layout tile_layout =
};
static GFXDECODE_START( 2mindril )
- GFXDECODE_ENTRY( NULL, 0x000000, charlayout, 0x0000, 0x0400>>4 ) /* Dynamically modified */
+ GFXDECODE_ENTRY( nullptr, 0x000000, charlayout, 0x0000, 0x0400>>4 ) /* Dynamically modified */
GFXDECODE_ENTRY( "gfx2", 0x000000, tile_layout, 0x0000, 0x2000>>4 ) /* Tiles area */
GFXDECODE_ENTRY( "gfx1", 0x000000, spriteram_layout, 0x1000, 0x1000>>4 ) /* Sprites area */
- GFXDECODE_ENTRY( NULL, 0x000000, pivotlayout, 0x0000, 0x400>>4 ) /* Dynamically modified */
+ GFXDECODE_ENTRY( nullptr, 0x000000, pivotlayout, 0x0000, 0x400>>4 ) /* Dynamically modified */
GFXDECODE_END
diff --git a/src/mame/drivers/4enlinea.cpp b/src/mame/drivers/4enlinea.cpp
index 338d8e37c01..181562bea3b 100644
--- a/src/mame/drivers/4enlinea.cpp
+++ b/src/mame/drivers/4enlinea.cpp
@@ -254,7 +254,7 @@ public:
const rom_entry *isa8_cga_4enlinea_device::device_rom_region() const
{
- return NULL;
+ return nullptr;
}
const device_type ISA8_CGA_4ENLINEA = &device_creator<isa8_cga_4enlinea_device>;
@@ -290,7 +290,7 @@ WRITE8_MEMBER( isa8_cga_4enlinea_device::_4enlinea_mode_control_w )
void isa8_cga_4enlinea_device::device_start()
{
- if (m_palette != NULL && !m_palette->started())
+ if (m_palette != nullptr && !m_palette->started())
throw device_missing_dependencies();
set_isa_device();
diff --git a/src/mame/drivers/5clown.cpp b/src/mame/drivers/5clown.cpp
index 5d301b6aa7f..07745268a40 100644
--- a/src/mame/drivers/5clown.cpp
+++ b/src/mame/drivers/5clown.cpp
@@ -583,7 +583,7 @@ PALETTE_INIT_MEMBER(_5clown_state, _5clown)
/* 0000KBGR */
- if (color_prom == 0) return;
+ if (color_prom == nullptr) return;
for (i = 0;i < m_palette->entries();i++)
{
@@ -1085,7 +1085,7 @@ ROM_START( 5clown )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the remaining bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the remaining bitplanes */
ROM_COPY( "gfxbanks", 0x7000, 0x2000, 0x1000 )
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -1117,7 +1117,7 @@ ROM_START( 5clowna )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the remaining bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the remaining bitplanes */
ROM_COPY( "gfxbanks", 0x7000, 0x2000, 0x1000 )
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -1148,7 +1148,7 @@ ROM_START( 5clownsp )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the remaining bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the remaining bitplanes */
ROM_COPY( "gfxbanks", 0x7000, 0x2000, 0x1000 )
ROM_REGION( 0x3000, "gfx2", 0 )
diff --git a/src/mame/drivers/a2600.cpp b/src/mame/drivers/a2600.cpp
index 4e001da3f26..6c61d71b60f 100644
--- a/src/mame/drivers/a2600.cpp
+++ b/src/mame/drivers/a2600.cpp
@@ -563,7 +563,7 @@ static SLOT_INTERFACE_START(a2600_cart)
SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT(a2600_cartslot)
- MCFG_VCS_CARTRIDGE_ADD("cartslot", a2600_cart, NULL)
+ MCFG_VCS_CARTRIDGE_ADD("cartslot", a2600_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","a2600")
@@ -612,7 +612,7 @@ static MACHINE_CONFIG_START( a2600, a2600_state )
#endif
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, "joy")
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, nullptr)
MCFG_FRAGMENT_ADD(a2600_cartslot)
MCFG_SOFTWARE_LIST_FILTER("cart_list", "NTSC")
@@ -662,7 +662,7 @@ static MACHINE_CONFIG_START( a2600p, a2600_state )
#endif
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, "joy")
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, nullptr)
MCFG_FRAGMENT_ADD(a2600_cartslot)
MCFG_SOFTWARE_LIST_FILTER("cart_list", "PAL")
diff --git a/src/mame/drivers/a5105.cpp b/src/mame/drivers/a5105.cpp
index 03be992da60..f7f55880dea 100644
--- a/src/mame/drivers/a5105.cpp
+++ b/src/mame/drivers/a5105.cpp
@@ -550,7 +550,7 @@ static const z80_daisy_config a5105_daisy_chain[] =
{
{ "z80ctc" },
{ "z80pio" },
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_START( a5105, a5105_state )
diff --git a/src/mame/drivers/a7800.cpp b/src/mame/drivers/a7800.cpp
index 350a69550f2..cfe3411b9d4 100644
--- a/src/mame/drivers/a7800.cpp
+++ b/src/mame/drivers/a7800.cpp
@@ -1381,7 +1381,7 @@ static MACHINE_CONFIG_START( a7800_ntsc, a7800_state )
MCFG_MOS6530n_IN_PB_CB(READ8(a7800_state, riot_console_button_r))
MCFG_MOS6530n_OUT_PB_CB(WRITE8(a7800_state, riot_button_pullup_w))
- MCFG_A78_CARTRIDGE_ADD("cartslot", a7800_cart, NULL)
+ MCFG_A78_CARTRIDGE_ADD("cartslot", a7800_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","a7800")
diff --git a/src/mame/drivers/abc1600.cpp b/src/mame/drivers/abc1600.cpp
index 8f8f20f4060..f1c95f0b1fc 100644
--- a/src/mame/drivers/abc1600.cpp
+++ b/src/mame/drivers/abc1600.cpp
@@ -350,7 +350,7 @@ WRITE8_MEMBER( abc1600_state::fw0_w )
if (LOG) logerror("FW0 %02x\n", data);
// drive select
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -899,13 +899,13 @@ static MACHINE_CONFIG_START( abc1600, abc1600_state )
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pb7_w))
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(abc1600_state, fdc_drq_w))
- MCFG_FLOPPY_DRIVE_ADD(SAB1797_02P_TAG":0", abc1600_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(SAB1797_02P_TAG":1", abc1600_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(SAB1797_02P_TAG":0", abc1600_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(SAB1797_02P_TAG":1", abc1600_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(SAB1797_02P_TAG":2", abc1600_floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z8470AB1_TAG, z80dart_device, rxa_w))
MCFG_ABC_KEYBOARD_PORT_ADD(ABC_KEYBOARD_PORT_TAG, "abc99")
@@ -913,16 +913,16 @@ static MACHINE_CONFIG_START( abc1600, abc1600_state )
MCFG_ABC_KEYBOARD_OUT_TRXC_HANDLER(DEVWRITELINE(Z8470AB1_TAG, z80dart_device, rxtxcb_w))
MCFG_ABC_KEYBOARD_OUT_KEYDOWN_HANDLER(DEVWRITELINE(Z8470AB1_TAG, z80dart_device, dcdb_w))
- MCFG_ABCBUS_SLOT_ADD("bus0i", abc1600bus_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("bus0i", abc1600bus_cards, nullptr)
MCFG_ABCBUS_SLOT_IRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa7_w))
- MCFG_ABCBUS_SLOT_ADD("bus0x", abc1600bus_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("bus0x", abc1600bus_cards, nullptr)
MCFG_ABCBUS_SLOT_IRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa6_w))
MCFG_ABCBUS_SLOT_NMI_CALLBACK(WRITELINE(abc1600_state, nmi_w))
MCFG_ABCBUS_SLOT_XINT2_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa2_w))
MCFG_ABCBUS_SLOT_XINT3_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa3_w))
MCFG_ABCBUS_SLOT_XINT4_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa4_w))
MCFG_ABCBUS_SLOT_XINT5_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa5_w))
- MCFG_ABCBUS_SLOT_ADD("bus1", abc1600bus_cards, NULL)
+ MCFG_ABCBUS_SLOT_ADD("bus1", abc1600bus_cards, nullptr)
MCFG_ABCBUS_SLOT_IRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa1_w))
MCFG_ABCBUS_SLOT_ADD("bus2", abc1600bus_cards, "4105")
MCFG_ABCBUS_SLOT_IRQ_CALLBACK(DEVWRITELINE(Z8536B1_TAG, z8536_device, pa0_w))
diff --git a/src/mame/drivers/abc80.cpp b/src/mame/drivers/abc80.cpp
index ce911133067..35a0bc0d9ca 100644
--- a/src/mame/drivers/abc80.cpp
+++ b/src/mame/drivers/abc80.cpp
@@ -366,7 +366,7 @@ WRITE8_MEMBER( abc80_state::pio_pb_w )
static const z80_daisy_config abc80_daisy_chain[] =
{
{ Z80PIO_TAG },
- { NULL }
+ { nullptr }
};
@@ -562,7 +562,7 @@ static MACHINE_CONFIG_START( abc80, abc80_state )
MCFG_ABCBUS_SLOT_ADD(ABCBUS_TAG, abc80_cards, "abcexp")
- MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0)
MCFG_GENERIC_KEYBOARD_CB(WRITE8(abc80_state, kbd_w))
diff --git a/src/mame/drivers/abc80x.cpp b/src/mame/drivers/abc80x.cpp
index 99bd292c536..eb171c990fd 100644
--- a/src/mame/drivers/abc80x.cpp
+++ b/src/mame/drivers/abc80x.cpp
@@ -677,7 +677,7 @@ WRITE_LINE_MEMBER( abc800_state::ctc_z2_w )
void abc800_state::clock_cassette(int state)
{
- if (m_cassette == NULL) return;
+ if (m_cassette == nullptr) return;
if (m_ctc_z0 && !state)
{
@@ -708,7 +708,7 @@ WRITE_LINE_MEMBER( abc800_state::sio_txdb_w )
WRITE_LINE_MEMBER( abc800_state::sio_dtrb_w )
{
- if (m_cassette == NULL) return;
+ if (m_cassette == nullptr) return;
if (state)
{
@@ -724,7 +724,7 @@ WRITE_LINE_MEMBER( abc800_state::sio_dtrb_w )
WRITE_LINE_MEMBER( abc800_state::sio_rtsb_w )
{
- if (m_cassette == NULL) return;
+ if (m_cassette == nullptr) return;
m_sio_rtsb = state;
@@ -770,7 +770,7 @@ static const z80_daisy_config abc800_daisy_chain[] =
{ Z80CTC_TAG },
{ Z80SIO_TAG },
{ Z80DART_TAG },
- { NULL }
+ { nullptr }
};
@@ -1054,12 +1054,12 @@ static MACHINE_CONFIG_START( abc800c, abc800c_state )
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
@@ -1129,12 +1129,12 @@ static MACHINE_CONFIG_START( abc800m, abc800m_state )
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
@@ -1206,12 +1206,12 @@ static MACHINE_CONFIG_START( abc802, abc802_state )
MCFG_CASSETTE_ADD("cassette")
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_MUTED)
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
@@ -1274,12 +1274,12 @@ static MACHINE_CONFIG_START( abc806, abc806_state )
MCFG_Z80DART_OUT_DTRB_CB(WRITELINE(abc806_state, keydtr_w))
MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, ctsa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
diff --git a/src/mame/drivers/ac1.cpp b/src/mame/drivers/ac1.cpp
index bf67bbfff9e..733fc70fbb2 100644
--- a/src/mame/drivers/ac1.cpp
+++ b/src/mame/drivers/ac1.cpp
@@ -177,9 +177,9 @@ ROM_START( ac1 )
ROM_REGION(0x0800, "gfx1",0)
// 64 chars - U402 BM513
ROM_LOAD ("u402.bin", 0x0000, 0x0200, CRC(cfb67f28) SHA1(e3a62a3a8bce0d098887e31fd16410f38832fd18))
- ROM_COPY("gfx1", 0x0000, 0x0200, 0x0200)
- ROM_COPY("gfx1", 0x0000, 0x0400, 0x0200)
- ROM_COPY("gfx1", 0x0000, 0x0600, 0x0200)
+ ROM_COPY("gfx1", nullptr, 0x0200, 0x0200)
+ ROM_COPY("gfx1", nullptr, 0x0400, 0x0200)
+ ROM_COPY("gfx1", nullptr, 0x0600, 0x0200)
ROM_END
ROM_START( ac1_32 )
diff --git a/src/mame/drivers/ace.cpp b/src/mame/drivers/ace.cpp
index e7e93754b03..23eeb5f4d00 100644
--- a/src/mame/drivers/ace.cpp
+++ b/src/mame/drivers/ace.cpp
@@ -289,10 +289,10 @@ static const gfx_layout scorelayout =
static GFXDECODE_START( ace )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 2 )
- GFXDECODE_ENTRY( NULL, 0x8000, charlayout0, 0, 2 ) /* the game dynamically modifies this */
- GFXDECODE_ENTRY( NULL, 0x8000, charlayout1, 0, 2 ) /* the game dynamically modifies this */
- GFXDECODE_ENTRY( NULL, 0x8000, charlayout2, 0, 2 ) /* the game dynamically modifies this */
- GFXDECODE_ENTRY( NULL, 0x8000, scorelayout, 0, 2 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x8000, charlayout0, 0, 2 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x8000, charlayout1, 0, 2 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x8000, charlayout2, 0, 2 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x8000, scorelayout, 0, 2 ) /* the game dynamically modifies this */
GFXDECODE_END
void aceal_state::ace_postload()
@@ -311,8 +311,8 @@ void aceal_state::machine_start()
void aceal_state::machine_reset()
{
- for (int i = 0; i < 8; i++)
- m_objpos[i] = 0;
+ for (auto & elem : m_objpos)
+ elem = 0;
}
static MACHINE_CONFIG_START( ace, aceal_state )
diff --git a/src/mame/drivers/aces1.cpp b/src/mame/drivers/aces1.cpp
index 35c6327a500..a20837b00ec 100644
--- a/src/mame/drivers/aces1.cpp
+++ b/src/mame/drivers/aces1.cpp
@@ -260,8 +260,8 @@ void aces1_state::machine_start()
m_reel_clock[reel] =0;
m_reel_phase[reel] =0;
}
- m_aces1_irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aces1_state::m_aces1_irq_timer_callback),this), 0);
- m_aces1_nmi_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aces1_state::m_aces1_nmi_timer_callback),this), 0);
+ m_aces1_irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aces1_state::m_aces1_irq_timer_callback),this), nullptr);
+ m_aces1_nmi_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(aces1_state::m_aces1_nmi_timer_callback),this), nullptr);
}
void aces1_state::machine_reset()
diff --git a/src/mame/drivers/adam.cpp b/src/mame/drivers/adam.cpp
index 46fdf71b4e3..a52eb37e567 100644
--- a/src/mame/drivers/adam.cpp
+++ b/src/mame/drivers/adam.cpp
@@ -1077,27 +1077,27 @@ static MACHINE_CONFIG_START( adam, adam_state )
MCFG_ADAMNET_SLOT_ADD("net4", adamnet_devices, "fdc")
MCFG_ADAMNET_SLOT_ADD("net5", adamnet_devices, "fdc")
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("fdc", drive2)
- MCFG_ADAMNET_SLOT_ADD("net6", adamnet_devices, NULL)
- MCFG_ADAMNET_SLOT_ADD("net7", adamnet_devices, NULL)
- MCFG_ADAMNET_SLOT_ADD("net8", adamnet_devices, NULL)
- MCFG_ADAMNET_SLOT_ADD("net9", adamnet_devices, NULL)
- MCFG_ADAMNET_SLOT_ADD("net10", adamnet_devices, NULL)
- MCFG_ADAMNET_SLOT_ADD("net11", adamnet_devices, NULL)
- MCFG_ADAMNET_SLOT_ADD("net12", adamnet_devices, NULL)
- MCFG_ADAMNET_SLOT_ADD("net13", adamnet_devices, NULL)
- MCFG_ADAMNET_SLOT_ADD("net14", adamnet_devices, NULL)
- MCFG_ADAMNET_SLOT_ADD("net15", adamnet_devices, NULL)
-
- MCFG_COLECOVISION_CARTRIDGE_SLOT_ADD(COLECOVISION_CARTRIDGE_SLOT_TAG, colecovision_cartridges, NULL)
+ MCFG_ADAMNET_SLOT_ADD("net6", adamnet_devices, nullptr)
+ MCFG_ADAMNET_SLOT_ADD("net7", adamnet_devices, nullptr)
+ MCFG_ADAMNET_SLOT_ADD("net8", adamnet_devices, nullptr)
+ MCFG_ADAMNET_SLOT_ADD("net9", adamnet_devices, nullptr)
+ MCFG_ADAMNET_SLOT_ADD("net10", adamnet_devices, nullptr)
+ MCFG_ADAMNET_SLOT_ADD("net11", adamnet_devices, nullptr)
+ MCFG_ADAMNET_SLOT_ADD("net12", adamnet_devices, nullptr)
+ MCFG_ADAMNET_SLOT_ADD("net13", adamnet_devices, nullptr)
+ MCFG_ADAMNET_SLOT_ADD("net14", adamnet_devices, nullptr)
+ MCFG_ADAMNET_SLOT_ADD("net15", adamnet_devices, nullptr)
+
+ MCFG_COLECOVISION_CARTRIDGE_SLOT_ADD(COLECOVISION_CARTRIDGE_SLOT_TAG, colecovision_cartridges, nullptr)
MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_LEFT_EXPANSION_SLOT_TAG, XTAL_7_15909MHz/2, adam_slot1_devices, "adamlink")
MCFG_ADAM_EXPANSION_SLOT_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_CENTER_EXPANSION_SLOT_TAG, XTAL_7_15909MHz/2, adam_slot2_devices, NULL)
+ MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_CENTER_EXPANSION_SLOT_TAG, XTAL_7_15909MHz/2, adam_slot2_devices, nullptr)
MCFG_ADAM_EXPANSION_SLOT_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
MCFG_ADAM_EXPANSION_SLOT_ADD(ADAM_RIGHT_EXPANSION_SLOT_TAG, XTAL_7_15909MHz/2, adam_slot3_devices, "ram")
MCFG_COLECOVISION_CONTROL_PORT_ADD(CONTROL1_TAG, colecovision_control_port_devices, "hand")
MCFG_COLECOVISION_CONTROL_PORT_IRQ_CALLBACK(WRITELINE(adam_state, joy1_irq_w))
- MCFG_COLECOVISION_CONTROL_PORT_ADD(CONTROL2_TAG, colecovision_control_port_devices, NULL)
+ MCFG_COLECOVISION_CONTROL_PORT_ADD(CONTROL2_TAG, colecovision_control_port_devices, nullptr)
MCFG_COLECOVISION_CONTROL_PORT_IRQ_CALLBACK(WRITELINE(adam_state, joy2_irq_w))
// internal ram
diff --git a/src/mame/drivers/aerofgt.cpp b/src/mame/drivers/aerofgt.cpp
index 8cfd233520d..9f222fa5314 100644
--- a/src/mame/drivers/aerofgt.cpp
+++ b/src/mame/drivers/aerofgt.cpp
@@ -2005,13 +2005,13 @@ ROM_START( pspikesb )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0e0000, 0x020000)
ROM_END
@@ -2038,13 +2038,13 @@ ROM_START( pspikesba )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0e0000, 0x020000)
ROM_END
@@ -2178,13 +2178,13 @@ ROM_START( pspikesc )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0e0000, 0x020000)
ROM_END
diff --git a/src/mame/drivers/aim65.cpp b/src/mame/drivers/aim65.cpp
index 53574f6177a..7bf47669d60 100644
--- a/src/mame/drivers/aim65.cpp
+++ b/src/mame/drivers/aim65.cpp
@@ -155,7 +155,7 @@ int aim65_state::load_cart(device_image_interface &image, generic_slot_device *s
return IMAGE_INIT_FAIL;
}
- if (image.software_entry() != NULL && image.get_software_region(slot_tag) == NULL)
+ if (image.software_entry() != nullptr && image.get_software_region(slot_tag) == nullptr)
{
std::string errmsg;
strprintf(errmsg,"Attempted to load file with wrong extension\nSocket '%s' only accepts files with '.%s' extension",
diff --git a/src/mame/drivers/altos5.cpp b/src/mame/drivers/altos5.cpp
index 1edfaafb293..974d062f374 100644
--- a/src/mame/drivers/altos5.cpp
+++ b/src/mame/drivers/altos5.cpp
@@ -201,7 +201,7 @@ static const z80_daisy_config daisy_chain_intf[] =
{ "z80ctc" },
{ "z80dart" },
{ "z80sio" },
- { NULL }
+ { nullptr }
};
@@ -298,7 +298,7 @@ WRITE8_MEMBER( altos5_state::port08_w )
{
m_port08 = data & 0x70;
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 5))
m_floppy = m_floppy1->get_device();
else
diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp
index f3692c279d3..f616059cbf3 100644
--- a/src/mame/drivers/amiga.cpp
+++ b/src/mame/drivers/amiga.cpp
@@ -1329,12 +1329,12 @@ static MACHINE_CONFIG_START( amiga_base, amiga_state )
// floppy drives
MCFG_DEVICE_ADD("fdc", AMIGA_FDC, amiga_state::CLK_7M_PAL)
MCFG_FLOPPY_DRIVE_ADD("fdc:0", amiga_floppies, "35dd", amiga_fdc::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", amiga_floppies, 0, amiga_fdc::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:2", amiga_floppies, 0, amiga_fdc::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:3", amiga_floppies, 0, amiga_fdc::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:1", amiga_floppies, nullptr, amiga_fdc::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:2", amiga_floppies, nullptr, amiga_fdc::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:3", amiga_floppies, nullptr, amiga_fdc::floppy_formats)
// rs232
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(amiga_state, rs232_rx_w))
MCFG_RS232_DCD_HANDLER(WRITELINE(amiga_state, rs232_dcd_w))
MCFG_RS232_DSR_HANDLER(WRITELINE(amiga_state, rs232_dsr_w))
@@ -1414,17 +1414,17 @@ static MACHINE_CONFIG_DERIVED_CLASS( a2000, amiga_base, a2000_state )
MCFG_DEVICE_ADD("u65", MSM6242, XTAL_32_768kHz)
// cpu slot
- MCFG_EXPANSION_SLOT_ADD("maincpu", a2000_expansion_cards, NULL)
+ MCFG_EXPANSION_SLOT_ADD("maincpu", a2000_expansion_cards, nullptr)
// zorro slots
MCFG_ZORRO2_ADD("maincpu")
MCFG_ZORRO2_INT2_HANDLER(WRITELINE(a2000_state, zorro2_int2_w))
MCFG_ZORRO2_INT6_HANDLER(WRITELINE(a2000_state, zorro2_int6_w))
- MCFG_ZORRO2_SLOT_ADD("zorro1", zorro2_cards, NULL)
- MCFG_ZORRO2_SLOT_ADD("zorro2", zorro2_cards, NULL)
- MCFG_ZORRO2_SLOT_ADD("zorro3", zorro2_cards, NULL)
- MCFG_ZORRO2_SLOT_ADD("zorro4", zorro2_cards, NULL)
- MCFG_ZORRO2_SLOT_ADD("zorro5", zorro2_cards, NULL)
+ MCFG_ZORRO2_SLOT_ADD("zorro1", zorro2_cards, nullptr)
+ MCFG_ZORRO2_SLOT_ADD("zorro2", zorro2_cards, nullptr)
+ MCFG_ZORRO2_SLOT_ADD("zorro3", zorro2_cards, nullptr)
+ MCFG_ZORRO2_SLOT_ADD("zorro4", zorro2_cards, nullptr)
+ MCFG_ZORRO2_SLOT_ADD("zorro5", zorro2_cards, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( a2000n, a2000, a2000_state )
@@ -1456,7 +1456,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( a500, amiga_base, a500_state )
MCFG_ADDRESS_MAP_BANK_STRIDE(0x200000)
// cpu slot
- MCFG_EXPANSION_SLOT_ADD("maincpu", a500_expansion_cards, NULL)
+ MCFG_EXPANSION_SLOT_ADD("maincpu", a500_expansion_cards, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( a500n, a500, a500_state )
@@ -1594,7 +1594,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( a500p, amiga_base, a500p_state )
MCFG_DEVICE_ADD("u9", MSM6242, XTAL_32_768kHz)
// cpu slot
- MCFG_EXPANSION_SLOT_ADD("maincpu", a500_expansion_cards, NULL)
+ MCFG_EXPANSION_SLOT_ADD("maincpu", a500_expansion_cards, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( a500pn, a500p, a500p_state )
@@ -1631,7 +1631,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( a600, amiga_base, a600_state )
MCFG_GAYLE_CS1_READ_HANDLER(DEVREAD16("ata", ata_interface_device, read_cs1))
MCFG_GAYLE_CS1_WRITE_HANDLER(DEVWRITE16("ata", ata_interface_device, write_cs1))
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("gayle", gayle_device, ide_interrupt_w))
// todo: pcmcia
@@ -1680,7 +1680,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( a1200, amiga_base, a1200_state )
MCFG_GAYLE_CS1_READ_HANDLER(DEVREAD16("ata", ata_interface_device, read_cs1))
MCFG_GAYLE_CS1_WRITE_HANDLER(DEVWRITE16("ata", ata_interface_device, write_cs1))
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("gayle", gayle_device, ide_interrupt_w))
// todo: pcmcia
@@ -1728,7 +1728,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( a4000, amiga_base, a4000_state )
MCFG_DEVICE_ADD("rtc", RP5C01, XTAL_32_768kHz)
// ide
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(a4000_state, ide_interrupt_w))
// todo: zorro3
@@ -1896,10 +1896,10 @@ ROM_START( a2000 )
ROM_DEFAULT_BIOS("kick13")
ROM_SYSTEM_BIOS(0, "kick12", "Kickstart 1.2 (33.180)")
ROMX_LOAD("315093-01.u2", 0x00000, 0x40000, CRC(a6ce1636) SHA1(11f9e62cf299f72184835b7b2a70a16333fc0d88), ROM_GROUPWORD | ROM_BIOS(1))
- ROM_COPY("kickstart", 0x00000, 0x40000, 0x40000)
+ ROM_COPY("kickstart", nullptr, 0x40000, 0x40000)
ROM_SYSTEM_BIOS(1, "kick13", "Kickstart 1.3 (34.5)")
ROMX_LOAD("315093-02.u2", 0x00000, 0x40000, CRC(c4f0f55f) SHA1(891e9a547772fe0c6c19b610baf8bc4ea7fcb785), ROM_GROUPWORD | ROM_BIOS(2))
- ROM_COPY("kickstart", 0x00000, 0x40000, 0x40000)
+ ROM_COPY("kickstart", nullptr, 0x40000, 0x40000)
ROM_SYSTEM_BIOS(2, "kick204", "Kickstart 2.04 (37.175)")
ROMX_LOAD("390979-01.u2", 0x00000, 0x80000, CRC(c3bdb240) SHA1(c5839f5cb98a7a8947065c3ed2f14f5f42e334a1), ROM_GROUPWORD | ROM_BIOS(3))
ROM_SYSTEM_BIOS(3, "kick31", "Kickstart 3.1 (40.63)")
@@ -1946,7 +1946,7 @@ ROM_START( cdtv )
// standard amiga kickstart 1.3
ROM_REGION16_BE(0x80000, "kickstart", 0)
ROMX_LOAD("315093-02.u13", 0x00000, 0x40000, CRC(c4f0f55f) SHA1(891e9a547772fe0c6c19b610baf8bc4ea7fcb785), ROM_GROUPWORD)
- ROM_COPY("kickstart", 0x00000, 0x40000, 0x40000)
+ ROM_COPY("kickstart", nullptr, 0x40000, 0x40000)
// remote control input converter, mos 6500/1 mcu
ROM_REGION(0x800, "rcmcu", 0)
diff --git a/src/mame/drivers/ampro.cpp b/src/mame/drivers/ampro.cpp
index d3507dc7349..6aef2a6f984 100644
--- a/src/mame/drivers/ampro.cpp
+++ b/src/mame/drivers/ampro.cpp
@@ -67,7 +67,7 @@ WRITE8_MEMBER( ampro_state::port00_w )
{
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)
@@ -114,7 +114,7 @@ static const z80_daisy_config daisy_chain_intf[] =
{
{ "z80ctc" },
{ "z80dart" },
- { NULL }
+ { nullptr }
};
// Baud rate generator. All inputs are 2MHz.
diff --git a/src/mame/drivers/amstr_pc.cpp b/src/mame/drivers/amstr_pc.cpp
index 8ba877cd182..d33fa47a6b3 100644
--- a/src/mame/drivers/amstr_pc.cpp
+++ b/src/mame/drivers/amstr_pc.cpp
@@ -488,7 +488,7 @@ INPUT_PORTS_END
// has it's own mouse
static MACHINE_CONFIG_FRAGMENT( cfg_com )
MCFG_DEVICE_MODIFY("serport0")
- MCFG_SLOT_DEFAULT_OPTION(NULL)
+ MCFG_SLOT_DEFAULT_OPTION(nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( pc200, amstrad_pc_state )
@@ -505,8 +505,8 @@ static MACHINE_CONFIG_START( pc200, amstrad_pc_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "com", pc_isa8_cards, "com", true)
MCFG_SLOT_OPTION_MACHINE_CONFIG("com", cfg_com)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, nullptr, false)
/* printer */
MCFG_DEVICE_ADD("lpt_0", PC_LPT, 0)
diff --git a/src/mame/drivers/amstrad.cpp b/src/mame/drivers/amstrad.cpp
index 3e97e5e49ce..d6e45da8c0d 100644
--- a/src/mame/drivers/amstrad.cpp
+++ b/src/mame/drivers/amstrad.cpp
@@ -911,7 +911,7 @@ static MACHINE_CONFIG_START( amstrad_base, amstrad_state )
MCFG_PALETTE_ADD("palette", 32)
MCFG_PALETTE_INIT_OWNER(amstrad_state,amstrad_cpc)
- MCFG_MC6845_ADD("mc6845", HD6845, NULL, XTAL_16MHz / 16)
+ MCFG_MC6845_ADD("mc6845", HD6845, nullptr, XTAL_16MHz / 16)
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(16)
MCFG_MC6845_OUT_DE_CB(WRITELINE(amstrad_state, amstrad_de_changed))
@@ -947,7 +947,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( cpc464, amstrad_base )
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc464_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc464_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(WRITELINE(amstrad_state, cpc_romdis)) // ROMDIS
@@ -966,7 +966,7 @@ static MACHINE_CONFIG_DERIVED( cpc664, amstrad_base )
MCFG_SOFTWARE_LIST_ADD("flop_list","cpc_flop")
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(WRITELINE(amstrad_state, cpc_romdis)) // ROMDIS
@@ -985,7 +985,7 @@ static MACHINE_CONFIG_DERIVED( cpc6128, amstrad_base )
MCFG_SOFTWARE_LIST_ADD("flop_list","cpc_flop")
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpc_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(WRITELINE(amstrad_state, cpc_romdis)) // ROMDIS
@@ -1036,7 +1036,7 @@ static MACHINE_CONFIG_START( cpcplus, amstrad_state )
MCFG_PALETTE_ADD("palette", 4096)
MCFG_PALETTE_INIT_OWNER(amstrad_state,amstrad_plus)
- MCFG_MC6845_ADD("mc6845", AMS40489, NULL, XTAL_40MHz / 40)
+ MCFG_MC6845_ADD("mc6845", AMS40489, nullptr, XTAL_40MHz / 40)
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(16)
MCFG_MC6845_OUT_DE_CB(WRITELINE(amstrad_state, amstrad_plus_de_changed))
@@ -1073,7 +1073,7 @@ static MACHINE_CONFIG_START( cpcplus, amstrad_state )
MCFG_FLOPPY_DRIVE_ADD("upd765:1", amstrad_floppies, "35ssdd", floppy_image_device::default_floppy_formats)
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(cpcplus_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(cpcplus_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(WRITELINE(amstrad_state, cpc_romdis)) // ROMDIS
@@ -1115,7 +1115,7 @@ static MACHINE_CONFIG_START( gx4000, amstrad_state )
MCFG_PALETTE_ADD("palette", 4096)
MCFG_PALETTE_INIT_OWNER(amstrad_state,amstrad_plus)
- MCFG_MC6845_ADD("mc6845", AMS40489, NULL, XTAL_40MHz / 40)
+ MCFG_MC6845_ADD("mc6845", AMS40489, nullptr, XTAL_40MHz / 40)
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(16)
MCFG_MC6845_OUT_DE_CB(WRITELINE(amstrad_state, amstrad_plus_de_changed))
@@ -1156,7 +1156,7 @@ static MACHINE_CONFIG_DERIVED( aleste, cpc6128 )
MCFG_DEVICE_REMOVE("exp")
MCFG_DEVICE_ADD("exp", CPC_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(aleste_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(aleste_exp_cards, nullptr, false)
MCFG_CPC_EXPANSION_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_CPC_EXPANSION_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_CPC_EXPANSION_SLOT_OUT_ROMDIS_CB(WRITELINE(amstrad_state, cpc_romdis)) // ROMDIS
diff --git a/src/mame/drivers/apc.cpp b/src/mame/drivers/apc.cpp
index 813479f062b..007f7920d13 100644
--- a/src/mame/drivers/apc.cpp
+++ b/src/mame/drivers/apc.cpp
@@ -900,7 +900,7 @@ static const floppy_format_type apc_floppy_formats[] = {
FLOPPY_D88_FORMAT,
FLOPPY_IMD_FORMAT,
FLOPPY_MFI_FORMAT,
- NULL
+ nullptr
};
static SLOT_INTERFACE_START( apc_floppies )
diff --git a/src/mame/drivers/apexc.cpp b/src/mame/drivers/apexc.cpp
index afeeae693bc..eb275bcf037 100644
--- a/src/mame/drivers/apexc.cpp
+++ b/src/mame/drivers/apexc.cpp
@@ -84,9 +84,9 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 1; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "apc"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -213,9 +213,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "tap"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
protected:
// device-level overrides
virtual void device_config_complete() { update_names(); }
@@ -247,9 +247,9 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "tap"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
protected:
// device-level overrides
virtual void device_config_complete() { update_names(); }
diff --git a/src/mame/drivers/apf.cpp b/src/mame/drivers/apf.cpp
index dc94ed31c69..5595a1b67ee 100644
--- a/src/mame/drivers/apf.cpp
+++ b/src/mame/drivers/apf.cpp
@@ -279,7 +279,7 @@ WRITE8_MEMBER( apf_state::apf_dischw_w)
/* bit 3 is index of drive to select */
UINT8 drive = BIT(data, 3);
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (drive)
floppy = m_floppy1->get_device();
else
@@ -534,7 +534,7 @@ static MACHINE_CONFIG_START( apfm1000, apf_state )
MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line))
MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("maincpu", m6800_cpu_device, irq_line))
- MCFG_APF_CARTRIDGE_ADD("cartslot", apf_cart, NULL)
+ MCFG_APF_CARTRIDGE_ADD("cartslot", apf_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list", "apfm1000")
diff --git a/src/mame/drivers/apollo.cpp b/src/mame/drivers/apollo.cpp
index c5c90f1ffa7..2a797604051 100644
--- a/src/mame/drivers/apollo.cpp
+++ b/src/mame/drivers/apollo.cpp
@@ -127,7 +127,7 @@ const char *apollo_cpu_context(device_t *cpu) {
static char statebuf[64]; /* string buffer containing state description */
/* if we have an executing CPU, output data */
- if (cpu != NULL) {
+ if (cpu != nullptr) {
osd_ticks_t t = osd_ticks();
int s = t / osd_ticks_per_second();
int ms = (t % osd_ticks_per_second()) / 1000;
@@ -145,7 +145,7 @@ const char *apollo_cpu_context(device_t *cpu) {
void apollo_set_cpu_has_fpu(m68000_base_device *device, int onoff)
{
- if (device == NULL || (device->type() != M68020PMMU && device->type() != M68030))
+ if (device == nullptr || (device->type() != M68020PMMU && device->type() != M68030))
{
DLOG1(("set_cpu_has_fpu: unexpected CPU device"));
}
diff --git a/src/mame/drivers/apple2.cpp b/src/mame/drivers/apple2.cpp
index 09dc4cc510f..0807f9ee53d 100644
--- a/src/mame/drivers/apple2.cpp
+++ b/src/mame/drivers/apple2.cpp
@@ -603,7 +603,7 @@ READ8_MEMBER(napple2_state::c080_r)
offset &= 0x7F;
slot = offset / 0x10;
- if (m_slotdevice[slot] != NULL)
+ if (m_slotdevice[slot] != nullptr)
{
return m_slotdevice[slot]->read_c0nx(space, offset % 0x10);
}
@@ -619,7 +619,7 @@ WRITE8_MEMBER(napple2_state::c080_w)
offset &= 0x7F;
slot = offset / 0x10;
- if (m_slotdevice[slot] != NULL)
+ if (m_slotdevice[slot] != nullptr)
{
m_slotdevice[slot]->write_c0nx(space, offset % 0x10, data);
}
@@ -631,7 +631,7 @@ READ8_MEMBER(napple2_state::c100_r)
slotnum = ((offset>>8) & 0xf) + 1;
- if (m_slotdevice[slotnum] != NULL)
+ if (m_slotdevice[slotnum] != nullptr)
{
if ((m_slotdevice[slotnum]->take_c800()) && (!space.debugger_access()))
{
@@ -650,7 +650,7 @@ WRITE8_MEMBER(napple2_state::c100_w)
slotnum = ((offset>>8) & 0xf) + 1;
- if (m_slotdevice[slotnum] != NULL)
+ if (m_slotdevice[slotnum] != nullptr)
{
if ((m_slotdevice[slotnum]->take_c800()) && (!space.debugger_access()))
{
@@ -669,7 +669,7 @@ READ8_MEMBER(napple2_state::c800_r)
return 0xff;
}
- if ((m_cnxx_slot != -1) && (m_slotdevice[m_cnxx_slot] != NULL))
+ if ((m_cnxx_slot != -1) && (m_slotdevice[m_cnxx_slot] != nullptr))
{
return m_slotdevice[m_cnxx_slot]->read_c800(space, offset&0xfff);
}
@@ -685,7 +685,7 @@ WRITE8_MEMBER(napple2_state::c800_w)
return;
}
- if ((m_cnxx_slot != -1) && (m_slotdevice[m_cnxx_slot] != NULL))
+ if ((m_cnxx_slot != -1) && (m_slotdevice[m_cnxx_slot] != nullptr))
{
m_slotdevice[m_cnxx_slot]->write_c800(space, offset&0xfff, data);
}
@@ -1318,13 +1318,13 @@ static MACHINE_CONFIG_START( apple2_common, napple2_state )
MCFG_A2BUS_OUT_NMI_CB(WRITELINE(napple2_state, a2bus_nmi_w))
MCFG_A2BUS_OUT_INH_CB(WRITELINE(napple2_state, a2bus_inh_w))
MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl0", apple2_slot0_cards, "lang")
- MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl1", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl2", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl3", apple2_cards, NULL)
+ MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl1", apple2_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl2", apple2_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl3", apple2_cards, nullptr)
MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl4", apple2_cards, "mockingboard")
- MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl5", apple2_cards, NULL)
+ MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl5", apple2_cards, nullptr)
MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl6", apple2_cards, "diskiing")
- MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl7", apple2_cards, NULL)
+ MCFG_A2BUS_SLOT_ADD(A2_BUS_TAG, "sl7", apple2_cards, nullptr)
MCFG_SOFTWARE_LIST_ADD("flop525_list","apple2")
diff --git a/src/mame/drivers/apple2e.cpp b/src/mame/drivers/apple2e.cpp
index 3938d375848..a295c1a7cb1 100644
--- a/src/mame/drivers/apple2e.cpp
+++ b/src/mame/drivers/apple2e.cpp
@@ -593,7 +593,7 @@ void apple2e_state::machine_start()
else // no expansion
{
m_exp_addrmask = 0;
- m_exp_ram = NULL;
+ m_exp_ram = nullptr;
}
// precalculate joystick time constants
@@ -607,8 +607,8 @@ void apple2e_state::machine_start()
}
// and aux slot device if any
- m_aux_ptr = NULL;
- m_aux_bank_ptr = NULL;
+ m_aux_ptr = nullptr;
+ m_aux_bank_ptr = nullptr;
if (m_a2eauxslot)
{
m_auxslotdevice = m_a2eauxslot->get_a2eauxslot_card();
@@ -620,7 +620,7 @@ void apple2e_state::machine_start()
}
else // IIc has 128K right on the motherboard
{
- m_auxslotdevice = NULL;
+ m_auxslotdevice = nullptr;
if (m_ram_size >= (128*1024))
{
@@ -1853,7 +1853,7 @@ READ8_MEMBER(apple2e_state::c080_r)
}
else
{
- if (m_slotdevice[slot] != NULL)
+ if (m_slotdevice[slot] != nullptr)
{
return m_slotdevice[slot]->read_c0nx(space, offset % 0x10);
}
@@ -1876,7 +1876,7 @@ WRITE8_MEMBER(apple2e_state::c080_w)
}
else
{
- if (m_slotdevice[slot] != NULL)
+ if (m_slotdevice[slot] != nullptr)
{
m_slotdevice[slot]->write_c0nx(space, offset % 0x10, data);
}
@@ -1887,7 +1887,7 @@ UINT8 apple2e_state::read_slot_rom(address_space &space, int slotbias, int offse
{
int slotnum = ((offset>>8) & 0xf) + slotbias;
- if (m_slotdevice[slotnum] != NULL)
+ if (m_slotdevice[slotnum] != nullptr)
{
if ((m_cnxx_slot == CNXX_UNCLAIMED) && (m_slotdevice[slotnum]->take_c800()) && (!space.debugger_access()))
{
@@ -1905,7 +1905,7 @@ void apple2e_state::write_slot_rom(address_space &space, int slotbias, int offse
{
int slotnum = ((offset>>8) & 0xf) + slotbias;
- if (m_slotdevice[slotnum] != NULL)
+ if (m_slotdevice[slotnum] != nullptr)
{
if ((m_cnxx_slot == CNXX_UNCLAIMED) && (m_slotdevice[slotnum]->take_c800()) && (!space.debugger_access()))
{
@@ -1955,7 +1955,7 @@ READ8_MEMBER(apple2e_state::c800_r)
return 0xff;
}
- if ((m_cnxx_slot > 0) && (m_slotdevice[m_cnxx_slot] != NULL))
+ if ((m_cnxx_slot > 0) && (m_slotdevice[m_cnxx_slot] != nullptr))
{
return m_slotdevice[m_cnxx_slot]->read_c800(space, offset&0xfff);
}
@@ -1978,7 +1978,7 @@ WRITE8_MEMBER(apple2e_state::c800_w)
return;
}
- if ((m_cnxx_slot > 0) && (m_slotdevice[m_cnxx_slot] != NULL))
+ if ((m_cnxx_slot > 0) && (m_slotdevice[m_cnxx_slot] != nullptr))
{
m_slotdevice[m_cnxx_slot]->write_c800(space, offset&0xfff, data);
}
@@ -3174,13 +3174,13 @@ static MACHINE_CONFIG_START( apple2e, apple2e_state )
MCFG_A2BUS_OUT_IRQ_CB(WRITELINE(apple2e_state, a2bus_irq_w))
MCFG_A2BUS_OUT_NMI_CB(WRITELINE(apple2e_state, a2bus_nmi_w))
MCFG_A2BUS_OUT_INH_CB(WRITELINE(apple2e_state, a2bus_inh_w))
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl3", apple2_cards, NULL)
+ 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)
MCFG_A2BUS_SLOT_ADD("a2bus", "sl4", apple2_cards, "mockingboard")
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl5", apple2_cards, NULL)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl5", apple2_cards, nullptr)
MCFG_A2BUS_SLOT_ADD("a2bus", "sl6", apple2_cards, "diskiing")
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, NULL)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, nullptr)
MCFG_DEVICE_ADD(A2_AUXSLOT_TAG, A2EAUXSLOT, 0)
MCFG_A2EAUXSLOT_CPU("maincpu")
@@ -3241,13 +3241,13 @@ static MACHINE_CONFIG_DERIVED( apple2c, apple2ee )
MCFG_MOS6551_XTAL(XTAL_1_8432MHz) // matches SSC so modem software is compatible
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE("modem", rs232_port_device, write_txd))
- MCFG_RS232_PORT_ADD(PRINTER_PORT_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(PRINTER_PORT_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(IIC_ACIA1_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(IIC_ACIA1_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(IIC_ACIA1_TAG, mos6551_device, write_dsr))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(IIC_ACIA1_TAG, mos6551_device, write_cts))
- MCFG_RS232_PORT_ADD(MODEM_PORT_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(MODEM_PORT_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(IIC_ACIA2_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(IIC_ACIA2_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(IIC_ACIA2_TAG, mos6551_device, write_dsr))
@@ -3335,9 +3335,9 @@ static MACHINE_CONFIG_DERIVED( laser128, apple2c )
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_SLOT_ADD("a2bus", "sl5", apple2_cards, NULL)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl5", apple2_cards, nullptr)
MCFG_A2BUS_ONBOARD_ADD("a2bus", "sl6", A2BUS_LASER128, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, NULL)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, nullptr)
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 8916f4f0747..6a9d42a7dac 100644
--- a/src/mame/drivers/apple2gs.cpp
+++ b/src/mame/drivers/apple2gs.cpp
@@ -374,13 +374,13 @@ static MACHINE_CONFIG_START( apple2gs, apple2gs_state )
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_SLOT_ADD("a2bus", "sl1", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl3", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl4", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl5", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl6", apple2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, NULL)
+ 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)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl4", apple2_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl5", apple2_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl6", apple2_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl7", apple2_cards, nullptr)
MCFG_IWM_ADD("fdc", apple2_fdc_interface)
diff --git a/src/mame/drivers/apple3.cpp b/src/mame/drivers/apple3.cpp
index 5c59679b9d6..6608ca3a34f 100644
--- a/src/mame/drivers/apple3.cpp
+++ b/src/mame/drivers/apple3.cpp
@@ -94,10 +94,10 @@ static MACHINE_CONFIG_START( apple3, apple3_state )
MCFG_A2BUS_OUT_IRQ_CB(WRITELINE(apple3_state, a2bus_irq_w))
MCFG_A2BUS_OUT_NMI_CB(WRITELINE(apple3_state, a2bus_nmi_w))
//MCFG_A2BUS_OUT_INH_CB(WRITELINE(apple3_state, a2bus_inh_w))
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple3_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple3_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl3", apple3_cards, NULL)
- MCFG_A2BUS_SLOT_ADD("a2bus", "sl4", apple3_cards, NULL)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl1", apple3_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl2", apple3_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl3", apple3_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD("a2bus", "sl4", apple3_cards, nullptr)
/* fdc */
MCFG_DEVICE_ADD("fdc", APPLEIII_FDC, 1021800*2)
@@ -117,7 +117,7 @@ static MACHINE_CONFIG_START( apple3, apple3_state )
MCFG_MOS6551_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
MCFG_MOS6551_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia", mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("acia", mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia", mos6551_device, write_dsr))
diff --git a/src/mame/drivers/applix.cpp b/src/mame/drivers/applix.cpp
index 2b5097470ee..8fa5419e48f 100644
--- a/src/mame/drivers/applix.cpp
+++ b/src/mame/drivers/applix.cpp
@@ -349,7 +349,7 @@ WRITE8_MEMBER( applix_state::port08_w )
m_port08 = data;
membank("bank1")->set_entry(BIT(data, 6));
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 2)) floppy = m_floppy0->get_device();
if (BIT(data, 3)) floppy = m_floppy1->get_device();
diff --git a/src/mame/drivers/apricot.cpp b/src/mame/drivers/apricot.cpp
index f06dd418037..9bdec9865bd 100644
--- a/src/mame/drivers/apricot.cpp
+++ b/src/mame/drivers/apricot.cpp
@@ -173,7 +173,7 @@ WRITE8_MEMBER( apricot_state::i8255_portb_w )
m_display_on = BIT(data, 3);
m_video_mode = BIT(data, 4);
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
// bit 5, enable disk select
// bit 6, disk select
@@ -440,7 +440,7 @@ static MACHINE_CONFIG_START( apricot, apricot_state )
MCFG_Z80DART_OUT_INT_CB(DEVWRITELINE("ic31", pic8259_device, ir5_w))
// rs232 port
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
// note: missing a receive clock callback to support external clock mode
// (m_data_selector_rts == 1 and m_data_selector_dtr == 0)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ic15", z80sio0_device, rxa_w))
@@ -474,8 +474,8 @@ static MACHINE_CONFIG_START( apricot, apricot_state )
// expansion bus
MCFG_EXPANSION_ADD("exp", "ic91")
MCFG_EXPANSION_IOP_ADD("ic71")
- MCFG_EXPANSION_SLOT_ADD("exp:1", apricot_expansion_cards, NULL)
- MCFG_EXPANSION_SLOT_ADD("exp:2", apricot_expansion_cards, NULL)
+ MCFG_EXPANSION_SLOT_ADD("exp:1", apricot_expansion_cards, nullptr)
+ MCFG_EXPANSION_SLOT_ADD("exp:2", apricot_expansion_cards, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( apricotxi, apricot )
diff --git a/src/mame/drivers/apricotp.cpp b/src/mame/drivers/apricotp.cpp
index be9384b4c04..4402eae7901 100644
--- a/src/mame/drivers/apricotp.cpp
+++ b/src/mame/drivers/apricotp.cpp
@@ -96,7 +96,7 @@ public:
m_ram(*this, RAM_TAG),
m_floppy0(*this, WD2797_TAG":0"),
m_floppy1(*this, WD2797_TAG":1"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_centronics(*this, CENTRONICS_TAG),
m_work_ram(*this, "work_ram"),
m_video_ram(*this, "video_ram")
@@ -312,7 +312,7 @@ void fp_state::lat_ls259_w(offs_t offset, int state)
{
case 0:
{
- m_floppy = NULL;
+ m_floppy = nullptr;
if (state) m_floppy = m_floppy0->get_device();
else m_floppy = m_floppy1->get_device();
@@ -637,7 +637,7 @@ static MACHINE_CONFIG_START( fp, fp_state )
MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE(I8237_TAG, am9517a_device, dreq1_w))
MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG ":0", fp_floppies, "d32w", fp_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG ":1", fp_floppies, NULL, fp_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG ":1", fp_floppies, nullptr, fp_state::floppy_formats)
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(fp_state, write_centronics_busy))
diff --git a/src/mame/drivers/arcadia.cpp b/src/mame/drivers/arcadia.cpp
index 651301405c9..541a184b93a 100644
--- a/src/mame/drivers/arcadia.cpp
+++ b/src/mame/drivers/arcadia.cpp
@@ -499,7 +499,7 @@ static MACHINE_CONFIG_START( arcadia, arcadia_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* cartridge */
- MCFG_ARCADIA_CARTRIDGE_ADD("cartslot", arcadia_cart, NULL)
+ MCFG_ARCADIA_CARTRIDGE_ADD("cartslot", arcadia_cart, nullptr)
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","arcadia")
diff --git a/src/mame/drivers/aristmk4.cpp b/src/mame/drivers/aristmk4.cpp
index 44bca24fc01..a58420ff3cc 100644
--- a/src/mame/drivers/aristmk4.cpp
+++ b/src/mame/drivers/aristmk4.cpp
@@ -731,7 +731,7 @@ static const char *const meter_sample_names[] =
{
"*3bagflvt",
"tick",
- 0
+ nullptr
};
/******************************************************************************
diff --git a/src/mame/drivers/aristmk5.cpp b/src/mame/drivers/aristmk5.cpp
index b1de7170c1a..1d60d5d8f5d 100644
--- a/src/mame/drivers/aristmk5.cpp
+++ b/src/mame/drivers/aristmk5.cpp
@@ -513,7 +513,7 @@ void aristmk5_state::machine_reset()
PRG = memregion(rom_region[op_mode & 3])->base();
- if(PRG!=NULL)
+ if(PRG!=nullptr)
for(i=0;i<0x400000;i++)
ROM[i] = PRG[i];
diff --git a/src/mame/drivers/arsystems.cpp b/src/mame/drivers/arsystems.cpp
index c017004843f..05ab344fb31 100644
--- a/src/mame/drivers/arsystems.cpp
+++ b/src/mame/drivers/arsystems.cpp
@@ -845,7 +845,7 @@ ROM_END
ROM_START( ar_argh ) // this plugs directly into the a500 motherboard, no arcadia bios, just the a500 kickstart and game ROMs
ROM_REGION16_BE(0x80000, "kickstart", 0 )
ROM_LOAD16_WORD("315093-01.u2", 0x00000, 0x40000, CRC(a6ce1636) SHA1(11f9e62cf299f72184835b7b2a70a16333fc0d88))
- ROM_COPY("kickstart", 0x00000, 0x40000, 0x40000 )
+ ROM_COPY("kickstart", nullptr, 0x40000, 0x40000 )
ROM_REGION16_BE( 0x180000, "user3", ROMREGION_ERASEFF )
ROM_LOAD16_BYTE( "argh-1-hi-11-28-87.u12", 0x000000, 0x10000, CRC(3b1f8075) SHA1(61aeff9f6a2dff6efe4276cb0bcbb80b495e26b6) )
diff --git a/src/mame/drivers/astinvad.cpp b/src/mame/drivers/astinvad.cpp
index d1f612cc9c1..7e0c83d538b 100644
--- a/src/mame/drivers/astinvad.cpp
+++ b/src/mame/drivers/astinvad.cpp
@@ -618,7 +618,7 @@ static const char *const astinvad_sample_names[] =
"6",
"7",
"8",
- 0
+ nullptr
};
diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp
index 0012d083afd..9d72c9a9a5f 100644
--- a/src/mame/drivers/astrocde.cpp
+++ b/src/mame/drivers/astrocde.cpp
@@ -1198,7 +1198,7 @@ static const char *const seawolf_sample_names[] =
"dive",
"sonar",
"minehit",
- 0
+ nullptr
};
/*************************************
@@ -1210,7 +1210,7 @@ static const char *const seawolf_sample_names[] =
static const z80_daisy_config tenpin_daisy_chain[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/astrohome.cpp b/src/mame/drivers/astrohome.cpp
index f453befaa2e..7b08a693956 100644
--- a/src/mame/drivers/astrohome.cpp
+++ b/src/mame/drivers/astrohome.cpp
@@ -208,10 +208,10 @@ static MACHINE_CONFIG_START( astrocde, astrocde_mess_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* expansion port */
- MCFG_ASTROCADE_EXPANSION_SLOT_ADD("exp", astrocade_exp, NULL)
+ MCFG_ASTROCADE_EXPANSION_SLOT_ADD("exp", astrocade_exp, nullptr)
/* cartridge */
- MCFG_ASTROCADE_CARTRIDGE_ADD("cartslot", astrocade_cart, NULL)
+ MCFG_ASTROCADE_CARTRIDGE_ADD("cartslot", astrocade_cart, nullptr)
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","astrocde")
diff --git a/src/mame/drivers/at.cpp b/src/mame/drivers/at.cpp
index 17503480020..4aa38b66c50 100644
--- a/src/mame/drivers/at.cpp
+++ b/src/mame/drivers/at.cpp
@@ -643,10 +643,10 @@ static MACHINE_CONFIG_START( at386, at_state )
MCFG_ISA16_SLOT_ADD("isabus","board4", pc_isa16_cards, "lpt", true)
// ISA cards
MCFG_ISA16_SLOT_ADD("isabus","isa1", pc_isa16_cards, "svga_et4k", false)
- MCFG_ISA16_SLOT_ADD("isabus","isa2", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa3", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa5", pc_isa16_cards, NULL, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa2", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa3", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa5", pc_isa16_cards, nullptr, false)
MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)
/* internal ram */
@@ -682,11 +682,11 @@ static MACHINE_CONFIG_START( k286i, at_state )
MCFG_ISA16_SLOT_ADD("isabus","isa1", pc_isa16_cards, "cga", false)
MCFG_ISA16_SLOT_ADD("isabus","isa2", pc_isa16_cards, "fdc", false)
MCFG_ISA16_SLOT_ADD("isabus","isa3", pc_isa16_cards, "comat", false)
- MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa5", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa6", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa7", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa8", pc_isa16_cards, NULL, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa5", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa6", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa7", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa8", pc_isa16_cards, nullptr, false)
MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)
/* internal ram */
@@ -728,10 +728,10 @@ static MACHINE_CONFIG_START( at586, at586_state )
MCFG_PCI_BUS_DEVICE("pcibus:1", pci_devices, "i82371ab", true)
MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371ab:isabus","isa1", pc_isa16_cards, "svga_et4k", false)
- MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371ab:isabus","isa2", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371ab:isabus","isa3", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371ab:isabus","isa4", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371ab:isabus","isa5", pc_isa16_cards, NULL, false)
+ MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371ab:isabus","isa2", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371ab:isabus","isa3", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371ab:isabus","isa4", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371ab:isabus","isa5", pc_isa16_cards, nullptr, false)
MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)
MCFG_FRAGMENT_ADD( at_softlists )
@@ -754,10 +754,10 @@ static MACHINE_CONFIG_START( at586x3, at586_state )
MCFG_PCI_BUS_DEVICE("pcibus:1", pci_devices, "i82371sb", true)
MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371sb:isabus","isa1", pc_isa16_cards, "svga_et4k", false)
- MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371sb:isabus","isa2", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371sb:isabus","isa3", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371sb:isabus","isa4", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371sb:isabus","isa5", pc_isa16_cards, NULL, false)
+ MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371sb:isabus","isa2", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371sb:isabus","isa3", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371sb:isabus","isa4", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD(":pcibus:1:i82371sb:isabus","isa5", pc_isa16_cards, nullptr, false)
MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)
MCFG_FRAGMENT_ADD( at_softlists )
@@ -824,7 +824,7 @@ static MACHINE_CONFIG_START( megapc, megapc_state )
MCFG_ISA16_SLOT_ADD("isabus","board4", pc_isa16_cards, "lpt", true)
MCFG_ISA16_SLOT_ADD("isabus","board5", pc_isa16_cards, "vga", true)
// ISA cards
- MCFG_ISA16_SLOT_ADD("isabus","isa1", pc_isa16_cards, NULL, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa1", pc_isa16_cards, nullptr, false)
MCFG_DEVICE_ADD("keybc", AT_KEYBOARD_CONTROLLER, XTAL_12MHz)
MCFG_AT_KEYBOARD_CONTROLLER_SYSTEM_RESET_CB(DEVWRITELINE("wd7600", wd7600_device, kbrst_w))
@@ -878,10 +878,10 @@ static MACHINE_CONFIG_START( megapcpla, at_state )
MCFG_ISA16_SLOT_ADD("isabus","board4", pc_isa16_cards, "lpt", true)
// ISA cards
MCFG_ISA16_SLOT_ADD("isabus","isa1", pc_isa16_cards, "svga_dm", false) // closest to the CL-GD5420
- MCFG_ISA16_SLOT_ADD("isabus","isa2", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa3", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa5", pc_isa16_cards, NULL, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa2", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa3", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa5", pc_isa16_cards, nullptr, false)
MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)
/* internal ram */
@@ -916,17 +916,17 @@ static MACHINE_CONFIG_START( ficpio2, at_state )
MCFG_ISA16_SLOT_ADD("isabus","board2", pc_isa16_cards, "comat", true)
MCFG_ISA16_SLOT_ADD("isabus","board3", pc_isa16_cards, "lpt", true)
- MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_slave", pic8259_device, ir6_w))
- MCFG_IDE_CONTROLLER_32_ADD("ide2", ata_devices, "cdrom", NULL, true)
+ MCFG_IDE_CONTROLLER_32_ADD("ide2", ata_devices, "cdrom", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_slave", pic8259_device, ir7_w))
MCFG_PCI_BUS_ADD("pcibus", 0)
MCFG_PCI_BUS_DEVICE("pcibus:0", pci_devices, "vt82c505", true)
MCFG_ISA16_SLOT_ADD("isabus","isa1", pc_isa16_cards, "svga_et4k", false)
- MCFG_ISA16_SLOT_ADD("isabus","isa2", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa3", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, NULL, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa2", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa3", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus","isa4", pc_isa16_cards, nullptr, false)
MCFG_PC_KBDC_SLOT_ADD("pc_kbdc", "kbd", pc_at_keyboards, STR_KBD_MICROSOFT_NATURAL)
MCFG_VT82C496_ADD("chipset")
@@ -1341,7 +1341,7 @@ ROM_START( ct386sx )
ROM_SYSTEM_BIOS(0, "neatsx", "NEATsx 386sx")
ROMX_LOAD("012l-u25.bin", 0xf0000, 0x8000, CRC(4ab1862d) SHA1(d4e8d0ff43731270478ca7671a129080ff350a4f),ROM_SKIP(1) | ROM_BIOS(1) )
ROMX_LOAD("012h-u24.bin", 0xf0001, 0x8000, CRC(17472521) SHA1(7588c148fe53d9dc4cb2d0ab6e0fd51a39bb5d1a),ROM_SKIP(1) | ROM_BIOS(1) )
- ROM_FILL(0xfe2c9, 1, 0) // skip incompatible keyboard controller test
+ ROM_FILL(0xfe2c9, 1, nullptr) // skip incompatible keyboard controller test
ROM_FILL(0xfe2cb, 1, 0xbb) // fix checksum
ROM_END
diff --git a/src/mame/drivers/atari400.cpp b/src/mame/drivers/atari400.cpp
index d45d4b30683..6be7bc28c37 100644
--- a/src/mame/drivers/atari400.cpp
+++ b/src/mame/drivers/atari400.cpp
@@ -1711,7 +1711,7 @@ void a400_state::setup_ram(int bank, UINT32 size)
case 0: // 0x0000-0x7fff
ram_top = MIN(size, 0x8000) - 1;
m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x0000, ram_top, "0000");
- if (m_0000 == NULL)
+ if (m_0000 == nullptr)
m_0000.findit();
m_0000->set_base(m_ram->pointer());
break;
@@ -1720,7 +1720,7 @@ void a400_state::setup_ram(int bank, UINT32 size)
if (ram_top > 0x8000)
{
m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0x8000, ram_top, "8000");
- if (m_8000 == NULL)
+ if (m_8000 == nullptr)
m_8000.findit();
m_8000->set_base(m_ram->pointer() + 0x8000);
}
@@ -1730,7 +1730,7 @@ void a400_state::setup_ram(int bank, UINT32 size)
if (ram_top > 0xa000)
{
m_maincpu->space(AS_PROGRAM).install_readwrite_bank(0xa000, ram_top, "a000");
- if (m_a000 == NULL)
+ if (m_a000 == nullptr)
m_a000.findit();
m_a000->set_base(m_ram->pointer() + 0xa000);
}
@@ -2103,7 +2103,7 @@ static MACHINE_CONFIG_START( atari_common_nodac, a400_state )
MCFG_DEVICE_ADD("a8sio", A8SIO, 0)
MCFG_A8SIO_DATA_IN_CB(DEVWRITELINE("pokey", pokey_device, sid_w))
- MCFG_A8SIO_SLOT_ADD("a8sio", "sio", NULL)
+ MCFG_A8SIO_SLOT_ADD("a8sio", "sio", nullptr)
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -2142,7 +2142,7 @@ static MACHINE_CONFIG_DERIVED( atari_common, atari_common_nodac )
/* devices */
MCFG_DEVICE_ADD("fdc", ATARI_FDC, 0)
- MCFG_A800_CARTRIDGE_ADD("cartleft", a800_left, NULL)
+ MCFG_A800_CARTRIDGE_ADD("cartleft", a800_left, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("flop_list","a800_flop")
@@ -2194,7 +2194,7 @@ static MACHINE_CONFIG_DERIVED( a800, atari_common )
MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_60HZ)
MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_60HZ)
- MCFG_A800_CARTRIDGE_ADD("cartright", a800_right, NULL)
+ MCFG_A800_CARTRIDGE_ADD("cartright", a800_right, nullptr)
MACHINE_CONFIG_END
@@ -2211,7 +2211,7 @@ static MACHINE_CONFIG_DERIVED( a800pal, atari_common )
MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_50HZ)
MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_50HZ)
- MCFG_A800_CARTRIDGE_ADD("cartright", a800_right, NULL)
+ MCFG_A800_CARTRIDGE_ADD("cartright", a800_right, nullptr)
MACHINE_CONFIG_END
@@ -2303,7 +2303,7 @@ static MACHINE_CONFIG_DERIVED( xegs, a800xl )
MCFG_DEVICE_REMOVE("cartleft")
MCFG_DEVICE_REMOVE("cart_list")
- MCFG_XEGS_CARTRIDGE_ADD("cartleft", xegs_carts, NULL)
+ MCFG_XEGS_CARTRIDGE_ADD("cartleft", xegs_carts, nullptr)
MACHINE_CONFIG_END
@@ -2339,7 +2339,7 @@ static MACHINE_CONFIG_DERIVED( a5200, atari_common_nodac )
MCFG_SCREEN_REFRESH_RATE(FRAME_RATE_60HZ)
MCFG_SCREEN_SIZE(HWIDTH*8, TOTAL_LINES_60HZ)
- MCFG_A5200_CARTRIDGE_ADD("cartleft", a5200_carts, NULL)
+ MCFG_A5200_CARTRIDGE_ADD("cartleft", a5200_carts, nullptr)
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","a5200")
diff --git a/src/mame/drivers/atarig1.cpp b/src/mame/drivers/atarig1.cpp
index 45bb3e8af4a..ddb2f038808 100644
--- a/src/mame/drivers/atarig1.cpp
+++ b/src/mame/drivers/atarig1.cpp
@@ -130,7 +130,7 @@ void atarig1_state::update_bank(int bank)
void atarig1_state::device_post_load()
{
- if (m_bslapstic_base != NULL)
+ if (m_bslapstic_base != nullptr)
{
int bank = m_bslapstic_bank;
m_bslapstic_bank = -1;
diff --git a/src/mame/drivers/atarigx2.cpp b/src/mame/drivers/atarigx2.cpp
index 847d4747c4b..003a143635e 100644
--- a/src/mame/drivers/atarigx2.cpp
+++ b/src/mame/drivers/atarigx2.cpp
@@ -1519,7 +1519,7 @@ ROM_START( spclords )
ROM_REGION( 0x60000, "gfx1", 0 )
ROM_LOAD( "136095.30a", 0x00000, 0x20000, CRC(27e0cfec) SHA1(03df57757d091f9a0b8c8d98d091dd759f570788) ) /* playfield, planes 0-1 */
ROM_LOAD( "136095.31a", 0x20000, 0x20000, CRC(5529cdc7) SHA1(8aff8a42fb2a86b7e4666940da4c1ee19dab6281) ) /* playfield, planes 2-3 */
- ROM_FILL( 0x40000, 0x20000, 0 ) /* playfield, planes 4-5 */
+ ROM_FILL( 0x40000, 0x20000, nullptr ) /* playfield, planes 4-5 */
ROM_REGION( 0x020000, "gfx2", 0 )
ROM_LOAD( "136095.25a", 0x000000, 0x20000, CRC(1669496e) SHA1(005deaafd6156505e3a27966123e58928837ad9f) ) /* alphanumerics */
@@ -1565,7 +1565,7 @@ ROM_START( spclordsb )
ROM_REGION( 0x60000, "gfx1", 0 )
ROM_LOAD( "136095.30a", 0x00000, 0x20000, CRC(27e0cfec) SHA1(03df57757d091f9a0b8c8d98d091dd759f570788) ) /* playfield, planes 0-1 */
ROM_LOAD( "136095.31a", 0x20000, 0x20000, CRC(5529cdc7) SHA1(8aff8a42fb2a86b7e4666940da4c1ee19dab6281) ) /* playfield, planes 2-3 */
- ROM_FILL( 0x40000, 0x20000, 0 ) /* playfield, planes 4-5 */
+ ROM_FILL( 0x40000, 0x20000, nullptr ) /* playfield, planes 4-5 */
ROM_REGION( 0x020000, "gfx2", 0 )
ROM_LOAD( "136095.25a", 0x000000, 0x20000, CRC(1669496e) SHA1(005deaafd6156505e3a27966123e58928837ad9f) ) /* alphanumerics */
@@ -1611,7 +1611,7 @@ ROM_START( spclordsg )
ROM_REGION( 0x60000, "gfx1", 0 )
ROM_LOAD( "136095.30a", 0x00000, 0x20000, CRC(27e0cfec) SHA1(03df57757d091f9a0b8c8d98d091dd759f570788) ) /* playfield, planes 0-1 */
ROM_LOAD( "136095.31a", 0x20000, 0x20000, CRC(5529cdc7) SHA1(8aff8a42fb2a86b7e4666940da4c1ee19dab6281) ) /* playfield, planes 2-3 */
- ROM_FILL( 0x40000, 0x20000, 0 ) /* playfield, planes 4-5 */
+ ROM_FILL( 0x40000, 0x20000, nullptr ) /* playfield, planes 4-5 */
ROM_REGION( 0x020000, "gfx2", 0 )
ROM_LOAD( "136095.25a", 0x000000, 0x20000, CRC(1669496e) SHA1(005deaafd6156505e3a27966123e58928837ad9f) ) /* alphanumerics */
@@ -1657,7 +1657,7 @@ ROM_START( spclordsa )
ROM_REGION( 0x60000, "gfx1", 0 )
ROM_LOAD( "136095.30a", 0x00000, 0x20000, CRC(27e0cfec) SHA1(03df57757d091f9a0b8c8d98d091dd759f570788) ) /* playfield, planes 0-1 */
ROM_LOAD( "136095.31a", 0x20000, 0x20000, CRC(5529cdc7) SHA1(8aff8a42fb2a86b7e4666940da4c1ee19dab6281) ) /* playfield, planes 2-3 */
- ROM_FILL( 0x40000, 0x20000, 0 ) /* playfield, planes 4-5 */
+ ROM_FILL( 0x40000, 0x20000, nullptr ) /* playfield, planes 4-5 */
ROM_REGION( 0x020000, "gfx2", 0 )
ROM_LOAD( "136095.25a", 0x000000, 0x20000, CRC(1669496e) SHA1(005deaafd6156505e3a27966123e58928837ad9f) ) /* alphanumerics */
diff --git a/src/mame/drivers/atarist.cpp b/src/mame/drivers/atarist.cpp
index dcb4de5e82a..053d68c4b61 100644
--- a/src/mame/drivers/atarist.cpp
+++ b/src/mame/drivers/atarist.cpp
@@ -760,9 +760,9 @@ void ste_state::dmasound_tick()
{
UINT8 *RAM = m_ram->pointer();
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_dmasnd_fifo)
{
- m_dmasnd_fifo[i] = RAM[m_dmasnd_cntr];
+ elem = RAM[m_dmasnd_cntr];
m_dmasnd_cntr++;
m_dmasnd_samples++;
@@ -1743,7 +1743,7 @@ WRITE8_MEMBER( st_state::psg_pa_w )
*/
// drive select
- floppy_image_device *floppy = 0;
+ floppy_image_device *floppy = nullptr;
if (!BIT(data, 1))
floppy = floppy_devices[0];
else if(!BIT(data, 2))
@@ -1787,7 +1787,7 @@ WRITE8_MEMBER( stbook_state::psg_pa_w )
*/
// drive select
- floppy_image_device *floppy = 0;
+ floppy_image_device *floppy = nullptr;
if (!BIT(data, 1))
floppy = floppy_devices[0];
else if(!BIT(data, 2))
@@ -1955,7 +1955,7 @@ void st_state::machine_start()
if(con)
floppy_devices[i] = con->get_device();
else
- floppy_devices[i] = 0;
+ floppy_devices[i] = nullptr;
}
/// TODO: get callbacks to trigger these.
@@ -2104,7 +2104,7 @@ static MACHINE_CONFIG_START( st, st_state )
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE(MC68901_TAG, mc68901_device, i5_w)) MCFG_DEVCB_INVERT
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(st_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG ":0", atari_floppies, "35dd", st_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG ":1", atari_floppies, 0, st_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG ":1", atari_floppies, nullptr, st_state::floppy_formats)
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i0_w))
@@ -2119,7 +2119,7 @@ static MACHINE_CONFIG_START( st, st_state )
MCFG_MC68901_OUT_TDO_CB(WRITELINE(st_state, mfp_tdo_w))
MCFG_MC68901_OUT_SO_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
- 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(MC68901_TAG, mc68901_device, write_rx))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
@@ -2195,7 +2195,7 @@ static MACHINE_CONFIG_START( megast, megast_state )
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE(MC68901_TAG, mc68901_device, i5_w)) MCFG_DEVCB_INVERT
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(st_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG ":0", atari_floppies, "35dd", st_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG ":1", atari_floppies, 0, st_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG ":1", atari_floppies, nullptr, st_state::floppy_formats)
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i0_w))
@@ -2210,7 +2210,7 @@ static MACHINE_CONFIG_START( megast, megast_state )
MCFG_MC68901_OUT_TDO_CB(WRITELINE(st_state, mfp_tdo_w))
MCFG_MC68901_OUT_SO_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
- 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(MC68901_TAG, mc68901_device, write_rx))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
@@ -2293,7 +2293,7 @@ static MACHINE_CONFIG_START( ste, ste_state )
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE(MC68901_TAG, mc68901_device, i5_w)) MCFG_DEVCB_INVERT
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(st_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG ":0", atari_floppies, "35dd", st_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG ":1", atari_floppies, 0, st_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1772_TAG ":1", atari_floppies, nullptr, st_state::floppy_formats)
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i0_w))
@@ -2308,7 +2308,7 @@ static MACHINE_CONFIG_START( ste, ste_state )
MCFG_MC68901_OUT_TDO_CB(WRITELINE(st_state, mfp_tdo_w))
MCFG_MC68901_OUT_SO_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
- 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(MC68901_TAG, mc68901_device, write_rx))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i1_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MC68901_TAG, mc68901_device, i2_w))
diff --git a/src/mame/drivers/atlantis.cpp b/src/mame/drivers/atlantis.cpp
index 70312ac53fd..fa003cbfdda 100644
--- a/src/mame/drivers/atlantis.cpp
+++ b/src/mame/drivers/atlantis.cpp
@@ -186,7 +186,7 @@ static MACHINE_CONFIG_START( mwskins, atlantis_state )
MCFG_PCI9050_SET_MAP(1, map1) // 2 skipped for testing
MCFG_PCI9050_SET_MAP(3, map3)
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/attache.cpp b/src/mame/drivers/attache.cpp
index 7cfdc459595..5221559ab36 100644
--- a/src/mame/drivers/attache.cpp
+++ b/src/mame/drivers/attache.cpp
@@ -868,7 +868,7 @@ static const z80_daisy_config attache_daisy_chain[] =
{ "ctc" },
{ "sio" },
// expansion
- { NULL }
+ { nullptr }
};
static SLOT_INTERFACE_START( attache_floppies )
@@ -986,7 +986,7 @@ MACHINE_CONFIG_END
ROM_START( attache )
ROM_REGION(0x10000, "maincpu", 0)
- ROM_FILL(0x0000,0x10000,0x00)
+ ROM_FILL(0x0000,0x10000,nullptr)
ROM_REGION(0x1000, "boot", 0)
ROM_SYSTEM_BIOS(0, "u252revg", "Boot Rev.G")
diff --git a/src/mame/drivers/aussiebyte.cpp b/src/mame/drivers/aussiebyte.cpp
index 4980be8204d..5cf1b650dea 100644
--- a/src/mame/drivers/aussiebyte.cpp
+++ b/src/mame/drivers/aussiebyte.cpp
@@ -112,7 +112,7 @@ WRITE8_MEMBER( aussiebyte_state::port15_w )
7 Enable write precompensation on WD2797 controller. */
WRITE8_MEMBER( aussiebyte_state::port16_w )
{
- floppy_image_device *m_floppy = NULL;
+ floppy_image_device *m_floppy = nullptr;
if ((data & 15) == 0)
m_floppy = m_floppy0->get_device();
else
@@ -330,7 +330,7 @@ static const z80_daisy_config daisy_chain_intf[] =
{ "sio2" },
{ "pio1" },
{ "ctc" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/avigo.cpp b/src/mame/drivers/avigo.cpp
index f9730f56c90..f8d23276a8b 100644
--- a/src/mame/drivers/avigo.cpp
+++ b/src/mame/drivers/avigo.cpp
@@ -867,7 +867,7 @@ static MACHINE_CONFIG_START( avigo, avigo_state )
MCFG_INS8250_OUT_RTS_CB(DEVWRITELINE("serport", rs232_port_device, write_rts))
MCFG_INS8250_OUT_INT_CB(WRITELINE(avigo_state, com_interrupt))
- 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/avt.cpp b/src/mame/drivers/avt.cpp
index 552245ff1d6..54b5648e948 100644
--- a/src/mame/drivers/avt.cpp
+++ b/src/mame/drivers/avt.cpp
@@ -551,7 +551,7 @@ PALETTE_INIT_MEMBER(avt_state, avt)
int j;
/* 0000BGRI */
- if (color_prom == 0) return;
+ if (color_prom == nullptr) return;
for (j = 0; j < palette.entries(); j++)
{
diff --git a/src/mame/drivers/babbage.cpp b/src/mame/drivers/babbage.cpp
index e89bd9b3e75..8208d49e10c 100644
--- a/src/mame/drivers/babbage.cpp
+++ b/src/mame/drivers/babbage.cpp
@@ -190,7 +190,7 @@ static const z80_daisy_config babbage_daisy_chain[] =
{ "z80pio_1" },
{ "z80pio_2" },
{ "z80ctc" },
- { NULL }
+ { nullptr }
};
TIMER_DEVICE_CALLBACK_MEMBER(babbage_state::keyboard_callback)
diff --git a/src/mame/drivers/badlands.cpp b/src/mame/drivers/badlands.cpp
index 0159c213cdc..e8157cedee2 100644
--- a/src/mame/drivers/badlands.cpp
+++ b/src/mame/drivers/badlands.cpp
@@ -187,7 +187,7 @@ void badlands_state::update_interrupts()
void badlands_state::scanline_update(screen_device &screen, int scanline)
{
- if (m_audiocpu != 0)
+ if (m_audiocpu != nullptr)
{
address_space &space = m_audiocpu->space(AS_PROGRAM);
diff --git a/src/mame/drivers/battlane.cpp b/src/mame/drivers/battlane.cpp
index bacf394c722..53f158c2fbc 100644
--- a/src/mame/drivers/battlane.cpp
+++ b/src/mame/drivers/battlane.cpp
@@ -313,7 +313,7 @@ ROM_START( battlane )
ROM_REGION( 0x10000, "maincpu", 0 )
/* first half of da00-5 will be copied at 0x4000-0x7fff */
- ROM_COPY( "user1", 0x0000, 0x4000, 0x4000 )
+ ROM_COPY( "user1", nullptr, 0x4000, 0x4000 )
ROM_LOAD( "da01-5", 0x8000, 0x8000, CRC(7a6c3f02) SHA1(bee1ee858f81453a53afc2d016f549924801b090) )
ROM_REGION( 0x10000, "sub", 0 ) /* 64K for slave CPU */
@@ -341,7 +341,7 @@ ROM_START( battlane2 )
ROM_REGION( 0x10000, "maincpu", 0 )
/* first half of da00-3 will be copied at 0x4000-0x7fff */
- ROM_COPY( "user1", 0x0000, 0x4000, 0x4000 )
+ ROM_COPY( "user1", nullptr, 0x4000, 0x4000 )
ROM_LOAD( "da01-3", 0x8000, 0x8000, CRC(d9e40800) SHA1(dc87ae0d8631c220dbbddbf0e49b6bdaeb635269) )
ROM_REGION( 0x10000, "sub", 0 ) /* 64K for slave CPU */
@@ -369,7 +369,7 @@ ROM_START( battlane3 )
ROM_REGION( 0x10000, "maincpu", 0 )
/* first half of bl_04.rom will be copied at 0x4000-0x7fff */
- ROM_COPY( "user1", 0x0000, 0x4000, 0x4000 )
+ ROM_COPY( "user1", nullptr, 0x4000, 0x4000 )
ROM_LOAD( "bl_05.rom", 0x8000, 0x8000, CRC(001c4bbe) SHA1(4320c0a85b5b3505ac7292673759e5288cf4187f) )
ROM_REGION( 0x10000, "sub", 0 ) /* 64K for slave CPU */
diff --git a/src/mame/drivers/bbc.cpp b/src/mame/drivers/bbc.cpp
index a0061db3541..3deeebc5a1f 100644
--- a/src/mame/drivers/bbc.cpp
+++ b/src/mame/drivers/bbc.cpp
@@ -810,7 +810,7 @@ static MACHINE_CONFIG_START( bbca, bbc_state )
MCFG_ACIA6850_RTS_HANDLER(WRITELINE(bbc_state, bbc_rts_w))
MCFG_ACIA6850_IRQ_HANDLER(WRITELINE(bbc_state, bbcb_acia6850_irq_w))
- MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(bbc_state, write_rxd_serial))
MCFG_RS232_DCD_HANDLER(WRITELINE(bbc_state, write_dcd_serial))
MCFG_RS232_CTS_HANDLER(WRITELINE(bbc_state, write_cts_serial))
@@ -1154,7 +1154,7 @@ static MACHINE_CONFIG_START( bbcm, bbc_state )
MCFG_ACIA6850_RTS_HANDLER(WRITELINE(bbc_state, bbc_rts_w))
MCFG_ACIA6850_IRQ_HANDLER(WRITELINE(bbc_state, bbcb_acia6850_irq_w))
- MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(bbc_state, write_rxd_serial))
MCFG_RS232_DCD_HANDLER(WRITELINE(bbc_state, write_dcd_serial))
MCFG_RS232_CTS_HANDLER(WRITELINE(bbc_state, write_cts_serial))
@@ -1199,7 +1199,7 @@ static MACHINE_CONFIG_START( bbcm, bbc_state )
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)
MACHINE_CONFIG_END
@@ -1293,7 +1293,7 @@ static MACHINE_CONFIG_DERIVED( bbcmc, bbcm )
MCFG_FLOPPY_DRIVE_ADD("wd1772:0", bbc_floppies_35, "qd", bbc_state::floppy_formats_bbcmc)
MCFG_FLOPPY_DRIVE_SOUND(true)
- MCFG_FLOPPY_DRIVE_ADD("wd1772:1", bbc_floppies_35, NULL, bbc_state::floppy_formats_bbcmc)
+ MCFG_FLOPPY_DRIVE_ADD("wd1772:1", bbc_floppies_35, nullptr, bbc_state::floppy_formats_bbcmc)
MCFG_FLOPPY_DRIVE_SOUND(true)
/* eeprom pcd8572 */
diff --git a/src/mame/drivers/bbcbc.cpp b/src/mame/drivers/bbcbc.cpp
index a236fa87793..97eb93f62e3 100644
--- a/src/mame/drivers/bbcbc.cpp
+++ b/src/mame/drivers/bbcbc.cpp
@@ -112,7 +112,7 @@ WRITE_LINE_MEMBER(bbcbc_state::tms_interrupt)
static const z80_daisy_config bbcbc_daisy_chain[] =
{
{ "z80pio" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/bcs3.cpp b/src/mame/drivers/bcs3.cpp
index 8292aedd270..cd885352dba 100644
--- a/src/mame/drivers/bcs3.cpp
+++ b/src/mame/drivers/bcs3.cpp
@@ -337,7 +337,7 @@ WRITE_LINE_MEMBER( bcs3_state::ctc_z1_w )
static const z80_daisy_config daisy_chain_intf[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
DRIVER_INIT_MEMBER( bcs3_state, bcs3a )
diff --git a/src/mame/drivers/bebox.cpp b/src/mame/drivers/bebox.cpp
index cd3aec4c163..33fafdee7f2 100644
--- a/src/mame/drivers/bebox.cpp
+++ b/src/mame/drivers/bebox.cpp
@@ -200,7 +200,7 @@ static MACHINE_CONFIG_START( bebox, bebox_state )
MCFG_LSI53C810_FETCH_CB(bebox_state, scsi_fetch)
MCFG_LEGACY_SCSI_PORT("scsi")
- MCFG_IDE_CONTROLLER_ADD( "ide", ata_devices, "hdd", NULL, false ) /* FIXME */
+ MCFG_IDE_CONTROLLER_ADD( "ide", ata_devices, "hdd", nullptr, false ) /* FIXME */
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(bebox_state, bebox_ide_interrupt))
/* pci */
diff --git a/src/mame/drivers/bestleag.cpp b/src/mame/drivers/bestleag.cpp
index e3d2d7511cb..07923d16c83 100644
--- a/src/mame/drivers/bestleag.cpp
+++ b/src/mame/drivers/bestleag.cpp
@@ -426,11 +426,11 @@ ROM_START( bestleag )
ROM_LOAD( "20_27c040.u16", 0x00000, 0x80000, CRC(e152138e) SHA1(9d41b61b98414e1d5804b5a9edf4acb4c5f31615) )
ROM_REGION( 0xc0000, "oki", 0 )
- ROM_COPY( "oki_rom", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "oki_rom", nullptr, 0x000000, 0x020000)
ROM_COPY( "oki_rom", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "oki_rom", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "oki_rom", nullptr, 0x040000, 0x020000)
ROM_COPY( "oki_rom", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "oki_rom", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "oki_rom", nullptr, 0x080000, 0x020000)
ROM_COPY( "oki_rom", 0x060000, 0x0a0000, 0x020000)
ROM_END
@@ -455,11 +455,11 @@ ROM_START( bestleaw )
ROM_LOAD( "20_27c040.u16", 0x00000, 0x80000, CRC(e152138e) SHA1(9d41b61b98414e1d5804b5a9edf4acb4c5f31615) )
ROM_REGION( 0xc0000, "oki", 0 )
- ROM_COPY( "oki_rom", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "oki_rom", nullptr, 0x000000, 0x020000)
ROM_COPY( "oki_rom", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "oki_rom", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "oki_rom", nullptr, 0x040000, 0x020000)
ROM_COPY( "oki_rom", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "oki_rom", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "oki_rom", nullptr, 0x080000, 0x020000)
ROM_COPY( "oki_rom", 0x060000, 0x0a0000, 0x020000)
ROM_REGION( 0x2000, "plds", 0 )
diff --git a/src/mame/drivers/beta.cpp b/src/mame/drivers/beta.cpp
index c545a4622a8..ab0d34672be 100644
--- a/src/mame/drivers/beta.cpp
+++ b/src/mame/drivers/beta.cpp
@@ -300,7 +300,7 @@ DEVICE_IMAGE_LOAD_MEMBER( beta_state, beta_eprom )
DEVICE_IMAGE_UNLOAD_MEMBER( beta_state, beta_eprom )
{
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
image.fwrite(&m_eprom_rom[0], 0x800);
}
@@ -355,7 +355,7 @@ static MACHINE_CONFIG_START( beta, beta_state )
MCFG_MOS6530n_IRQ_CB(INPUTLINE(M6502_TAG, M6502_IRQ_LINE))
/* EPROM socket */
- MCFG_GENERIC_CARTSLOT_ADD(EPROM_TAG, generic_plain_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD(EPROM_TAG, generic_plain_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
MCFG_GENERIC_LOAD(beta_state, beta_eprom)
MCFG_GENERIC_UNLOAD(beta_state, beta_eprom)
diff --git a/src/mame/drivers/bfm_sc1.cpp b/src/mame/drivers/bfm_sc1.cpp
index e6c8de85375..ed3e3162b74 100644
--- a/src/mame/drivers/bfm_sc1.cpp
+++ b/src/mame/drivers/bfm_sc1.cpp
@@ -1147,9 +1147,9 @@ int bfm_sc1_state::sc1_find_project_string( )
UINT8 *src = memregion( "maincpu" )->base();
int size = memregion( "maincpu" )->bytes();
- for (int search=0;search<7;search++)
+ for (auto & elem : title_string)
{
- int strlength = strlen(title_string[search]);
+ int strlength = strlen(elem);
for (int i=0;i<size-strlength;i++)
{
@@ -1158,7 +1158,7 @@ int bfm_sc1_state::sc1_find_project_string( )
for (j=0;j<strlength;j+=1)
{
UINT8 rom = src[(i+j)];
- UINT8 chr = title_string[search][j];
+ UINT8 chr = elem[j];
if (rom != chr)
{
diff --git a/src/mame/drivers/bfm_sc2.cpp b/src/mame/drivers/bfm_sc2.cpp
index e96c5f86687..e365def5de6 100644
--- a/src/mame/drivers/bfm_sc2.cpp
+++ b/src/mame/drivers/bfm_sc2.cpp
@@ -2136,7 +2136,7 @@ INPUT_PORTS_END
MACHINE_START_MEMBER(bfm_sc2_state,bfm_sc2)
{
nvram_device *e2ram = subdevice<nvram_device>("e2ram");
- if (e2ram != NULL)
+ if (e2ram != nullptr)
e2ram->set_base(m_e2ram, sizeof(m_e2ram));
save_state();
@@ -2179,9 +2179,9 @@ int bfm_sc2_state::sc2_find_project_string( )
UINT8 *src = memregion( "maincpu" )->base();
int size = memregion( "maincpu" )->bytes();
- for (int search=0;search<4;search++)
+ for (auto & elem : title_string)
{
- int strlength = strlen(title_string[search]);
+ int strlength = strlen(elem);
for (int i=0;i<size-strlength;i++)
{
@@ -2190,7 +2190,7 @@ int bfm_sc2_state::sc2_find_project_string( )
for (j=0;j<strlength;j+=1)
{
UINT8 rom = src[(i+j)];
- UINT8 chr = title_string[search][j];
+ UINT8 chr = elem[j];
if (rom != chr)
{
diff --git a/src/mame/drivers/bfm_sc45_helper.cpp b/src/mame/drivers/bfm_sc45_helper.cpp
index 991f3894e59..264f9dbe71f 100644
--- a/src/mame/drivers/bfm_sc45_helper.cpp
+++ b/src/mame/drivers/bfm_sc45_helper.cpp
@@ -388,16 +388,16 @@ lampinfo lamps[16][16];
void set_clickable_temp(running_machine &machine, const std::string &teststring, int clickport, int clickmask)
{
- for (int y = 0; y < 16; y++)
+ for (auto & lamp : lamps)
{
for (int x = 0; x < 16; x++)
{
- if (!strcmp(teststring.c_str(), lamps[y][x].lampname_alt.c_str()))
+ if (!strcmp(teststring.c_str(), lamp[x].lampname_alt.c_str()))
{
- lamps[y][x].clickport = clickport;
- lamps[y][x].clickmask = clickmask;
+ lamp[x].clickport = clickport;
+ lamp[x].clickmask = clickmask;
- lamps[y][x].lamptypename = "buttonlamp";
+ lamp[x].lamptypename = "buttonlamp";
}
}
@@ -518,12 +518,12 @@ int find_lamp_strings(running_machine &machine)
// layout elements for each of the text labels
int d = 0;
- for (int y = 0; y < 16; y++)
+ for (auto & lamp : lamps)
{
//sc45helperlog("---ROW %02d---\n", y);
for (int x = 0; x < 16; x++)
{
- sc45helperlog("<element name=\"lamplabelel%d\"><text string=\"%s\"><color red=\"1.0\" green=\"1.0\" blue=\"1.0\" /></text></element>\n", d, lamps[y][x].lampname.c_str());
+ sc45helperlog("<element name=\"lamplabelel%d\"><text string=\"%s\"><color red=\"1.0\" green=\"1.0\" blue=\"1.0\" /></text></element>\n", d, lamp[x].lampname.c_str());
d++;
}
}
@@ -589,17 +589,17 @@ int find_lamp_strings(running_machine &machine)
// copy the button strings so we can modify some for easier comparisons
d = 0;
- for (int y = 0; y < 16; y++)
+ for (auto & lamp : lamps)
{
for (int x = 0; x < 16; x++)
{
- lamps[y][x].lampname_alt = lamps[y][x].lampname;
+ lamp[x].lampname_alt = lamp[x].lampname;
- if (!strcmp(lamps[y][x].lampname_alt.c_str(), "hold2/hi")) lamps[y][x].lampname_alt = "hold2";
- if (!strcmp(lamps[y][x].lampname_alt.c_str(), "hold3/lo")) lamps[y][x].lampname_alt = "hold3";
- if (!strcmp(lamps[y][x].lampname_alt.c_str(), "chg stake")) lamps[y][x].lampname_alt = "chnge stk";
- if (!strcmp(lamps[y][x].lampname_alt.c_str(), "canc/coll")) lamps[y][x].lampname_alt = "cancel";
- if (!strcmp(lamps[y][x].lampname_alt.c_str(), "start")) lamps[y][x].lampname_alt = "strt exch";
+ if (!strcmp(lamp[x].lampname_alt.c_str(), "hold2/hi")) lamp[x].lampname_alt = "hold2";
+ if (!strcmp(lamp[x].lampname_alt.c_str(), "hold3/lo")) lamp[x].lampname_alt = "hold3";
+ if (!strcmp(lamp[x].lampname_alt.c_str(), "chg stake")) lamp[x].lampname_alt = "chnge stk";
+ if (!strcmp(lamp[x].lampname_alt.c_str(), "canc/coll")) lamp[x].lampname_alt = "cancel";
+ if (!strcmp(lamp[x].lampname_alt.c_str(), "start")) lamp[x].lampname_alt = "strt exch";
}
}
@@ -623,20 +623,20 @@ int find_lamp_strings(running_machine &machine)
if (pos == 2) sprintf(tempname2, "%sbot", tempname);
- for (int y = 0; y < 16; y++)
+ for (auto & lamp : lamps)
{
for (int x = 0; x < 16; x++)
{
- if (!strcmp(tempname2, lamps[y][x].lampname_alt.c_str()))
+ if (!strcmp(tempname2, lamp[x].lampname_alt.c_str()))
{
//sc45helperlog("%s found\n", tempname2);
- lamps[y][x].draw_label = false;
+ lamp[x].draw_label = false;
- lamps[y][x].x = 0 + (50 * reel);
- lamps[y][x].y = 300 + (17 * pos);
- lamps[y][x].width = 50;
- lamps[y][x].height = 17;
- lamps[y][x].lamptypename = "reellamp";
+ lamp[x].x = 0 + (50 * reel);
+ lamp[x].y = 300 + (17 * pos);
+ lamp[x].width = 50;
+ lamp[x].height = 17;
+ lamp[x].lamptypename = "reellamp";
}
@@ -676,17 +676,17 @@ int find_lamp_strings(running_machine &machine)
// dump out basic matrix stuff in layout format
d = 0;
- for (int y = 0; y < 16; y++)
+ for (auto & lamp : lamps)
{
//sc45helperlog("---ROW %02d---\n", y);
for (int x = 0; x < 16; x++)
{
- if (lamps[y][x].clickport== -1) sc45helperlog("<bezel name=\"lamp%d\" element=\"%s\" state=\"0\"><bounds x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\"/></bezel>\n", d, lamps[y][x].lamptypename.c_str(), lamps[y][x].x, lamps[y][x].y, lamps[y][x].width, lamps[y][x].height);
- else sc45helperlog("<bezel name=\"lamp%d\" element=\"%s\" state=\"0\" inputtag=\"IN-%d\" inputmask=\"0x%02x\"><bounds x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" /></bezel>\n", d, lamps[y][x].lamptypename.c_str(), lamps[y][x].clickport, lamps[y][x].clickmask, lamps[y][x].x, lamps[y][x].y, lamps[y][x].width, lamps[y][x].height);
+ if (lamp[x].clickport== -1) sc45helperlog("<bezel name=\"lamp%d\" element=\"%s\" state=\"0\"><bounds x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\"/></bezel>\n", d, lamp[x].lamptypename.c_str(), lamp[x].x, lamp[x].y, lamp[x].width, lamp[x].height);
+ else sc45helperlog("<bezel name=\"lamp%d\" element=\"%s\" state=\"0\" inputtag=\"IN-%d\" inputmask=\"0x%02x\"><bounds x=\"%d\" y=\"%d\" width=\"%d\" height=\"%d\" /></bezel>\n", d, lamp[x].lamptypename.c_str(), lamp[x].clickport, lamp[x].clickmask, lamp[x].x, lamp[x].y, lamp[x].width, lamp[x].height);
- if (lamps[y][x].draw_label == false) sc45helperlog("<!-- Label not drawn\n");
- sc45helperlog("<bezel name=\"lamplabel%d\" element=\"lamplabelel%d\"><bounds x=\"%d\" y=\"%d\" width=\"%d\" height=\"10\" /></bezel>\n", d,d, lamps[y][x].x, lamps[y][x].y-10, lamps[y][x].width);
- if (lamps[y][x].draw_label == false) sc45helperlog("-->\n");
+ if (lamp[x].draw_label == false) sc45helperlog("<!-- Label not drawn\n");
+ sc45helperlog("<bezel name=\"lamplabel%d\" element=\"lamplabelel%d\"><bounds x=\"%d\" y=\"%d\" width=\"%d\" height=\"10\" /></bezel>\n", d,d, lamp[x].x, lamp[x].y-10, lamp[x].width);
+ if (lamp[x].draw_label == false) sc45helperlog("-->\n");
d++;
}
@@ -830,9 +830,9 @@ int find_reel_strings(running_machine &machine)
int total_reel_symbols = 0;
- for (unsigned int i = 0; i < reelsizes.size(); i++)
+ for (auto & reelsize : reelsizes)
{
- total_reel_symbols += reelsizes[i];
+ total_reel_symbols += reelsize;
}
endblock = startblock + 4 * (total_reel_symbols);
diff --git a/src/mame/drivers/bfmsys85.cpp b/src/mame/drivers/bfmsys85.cpp
index a7277d535b7..296a726a73d 100644
--- a/src/mame/drivers/bfmsys85.cpp
+++ b/src/mame/drivers/bfmsys85.cpp
@@ -671,9 +671,9 @@ int bfmsys85_state::b85_find_project_string( )
UINT8 *src = memregion( "maincpu" )->base();
int size = memregion( "maincpu" )->bytes();
- for (int search=0;search<7;search++)
+ for (auto & elem : title_string)
{
- int strlength = strlen(title_string[search]);
+ int strlength = strlen(elem);
for (int i=0;i<size-strlength;i++)
{
@@ -682,7 +682,7 @@ int bfmsys85_state::b85_find_project_string( )
for (j=0;j<strlength;j+=1)
{
UINT8 rom = src[(i+j)];
- UINT8 chr = title_string[search][j];
+ UINT8 chr = elem[j];
if (rom != chr)
{
diff --git a/src/mame/drivers/bigbord2.cpp b/src/mame/drivers/bigbord2.cpp
index 7f8612a2806..b13039aa0b2 100644
--- a/src/mame/drivers/bigbord2.cpp
+++ b/src/mame/drivers/bigbord2.cpp
@@ -334,7 +334,7 @@ WRITE8_MEMBER( bigbord2_state::portcc_w )
*/
/* drive select */
- m_floppy = NULL;
+ m_floppy = nullptr;
if BIT(data, 7) m_floppy = m_floppy0->get_device();
if BIT(data, 6) m_floppy = m_floppy1->get_device();
//if BIT(data, 5) m_floppy = m_floppy2->get_device();
@@ -440,7 +440,7 @@ static const z80_daisy_config bigbord2_daisy_chain[] =
{ Z80CTCA_TAG },
{ Z80CTCB_TAG },
{ Z80SIO_TAG },
- { NULL }
+ { nullptr }
};
/* WD1793 Interface */
diff --git a/src/mame/drivers/binbug.cpp b/src/mame/drivers/binbug.cpp
index 14c079e6156..a5752258181 100644
--- a/src/mame/drivers/binbug.cpp
+++ b/src/mame/drivers/binbug.cpp
@@ -330,7 +330,7 @@ ROM_START( binbug )
ROM_REGION( 0x0800, "chargen", 0 )
ROM_LOAD( "6574.bin", 0x0000, 0x0800, CRC(fd75df4f) SHA1(4d09aae2f933478532b7d3d1a2dee7123d9828ca) )
- ROM_FILL(0, 16, 0)
+ ROM_FILL(0, 16, nullptr)
ROM_END
/* Driver */
@@ -462,7 +462,7 @@ static const z80_daisy_config dg680_daisy_chain[] =
{
{ "z80ctc" },
{ "z80pio" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/bitgraph.cpp b/src/mame/drivers/bitgraph.cpp
index 8209fe9f20c..453dcd5469a 100644
--- a/src/mame/drivers/bitgraph.cpp
+++ b/src/mame/drivers/bitgraph.cpp
@@ -495,7 +495,7 @@ static MACHINE_CONFIG_FRAGMENT( bg_motherboard )
MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE(RS232_D_TAG, rs232_port_device, write_rts))
MCFG_ACIA6850_IRQ_HANDLER(DEVWRITELINE(M68K_TAG, m68000_device, write_irq1))
- MCFG_RS232_PORT_ADD(RS232_D_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_D_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(ACIA2_TAG, acia6850_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(ACIA2_TAG, acia6850_device, write_dcd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(ACIA2_TAG, acia6850_device, write_cts))
@@ -558,7 +558,7 @@ static MACHINE_CONFIG_START( bitgrpha, bitgraph_state )
MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE(RS232_M_TAG, rs232_port_device, write_rts))
MCFG_ACIA6850_IRQ_HANDLER(DEVWRITELINE(M68K_TAG, m68000_device, write_irq1))
- MCFG_RS232_PORT_ADD(RS232_M_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_M_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(ACIA3_TAG, acia6850_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(ACIA3_TAG, acia6850_device, write_dcd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(ACIA3_TAG, acia6850_device, write_cts))
diff --git a/src/mame/drivers/blitz.cpp b/src/mame/drivers/blitz.cpp
index bba164a5343..5cfa05309ee 100644
--- a/src/mame/drivers/blitz.cpp
+++ b/src/mame/drivers/blitz.cpp
@@ -360,7 +360,7 @@ PALETTE_INIT_MEMBER(blitz_state, blitz)
/* 0000KBGR */
- if (color_prom == 0) return;
+ if (color_prom == nullptr) return;
for (i = 0;i < palette.entries();i++)
{
@@ -764,7 +764,7 @@ ROM_START( megadpkr )
ROM_LOAD( "mega-1.u1", 0x0000, 0x0800, NO_DUMP )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "car1.5a", 0x2000, 0x1000, CRC(29e244d2) SHA1(c309a5ee6922bf2752d218c134edb3ef5f808afa) ) /* text chars / cards deck gfx, bitplane3 */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -813,7 +813,7 @@ ROM_START( megadpkrb )
ROM_LOAD( "u11.bin", 0x0000, 0x0800, NO_DUMP )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "car1_5a.bin", 0x2000, 0x1000, CRC(29e244d2) SHA1(c309a5ee6922bf2752d218c134edb3ef5f808afa) ) /* text chars / cards deck gfx, bitplane3 */
ROM_REGION( 0x3000, "gfx2", 0 )
diff --git a/src/mame/drivers/bloodbro.cpp b/src/mame/drivers/bloodbro.cpp
index 61fa573f078..525992d6681 100644
--- a/src/mame/drivers/bloodbro.cpp
+++ b/src/mame/drivers/bloodbro.cpp
@@ -521,7 +521,7 @@ ROM_START( bloodbro )
ROM_REGION( 0x20000, "audiocpu", 0 )
ROM_LOAD( "bb_07.u1016.6a", 0x000000, 0x08000, CRC(411b94e8) SHA1(6968441f64212c0935afeca68f07deaadf86d614) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "bb_05.u061.6f", 0x00000, 0x10000, CRC(04ba6d19) SHA1(7333075c3323756d51917418b5234d785a9bee00) ) /* characters */
@@ -547,7 +547,7 @@ ROM_START( bloodbroa )
ROM_REGION( 0x20000, "audiocpu", 0 )
ROM_LOAD( "bb_07.u1016.6a", 0x000000, 0x08000, CRC(411b94e8) SHA1(6968441f64212c0935afeca68f07deaadf86d614) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "bb_05.u061.6f", 0x00000, 0x10000, CRC(04ba6d19) SHA1(7333075c3323756d51917418b5234d785a9bee00) ) /* characters */
@@ -573,7 +573,7 @@ ROM_START( bloodbrob )
ROM_REGION( 0x20000, "audiocpu", 0 )
ROM_LOAD( "bb_07.u1016.6a", 0x000000, 0x08000, CRC(411b94e8) SHA1(6968441f64212c0935afeca68f07deaadf86d614) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "bb_05.u061.6f", 0x00000, 0x10000, CRC(04ba6d19) SHA1(7333075c3323756d51917418b5234d785a9bee00) ) /* characters */
@@ -600,7 +600,7 @@ ROM_START( weststry )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k for sound cpu code */
ROM_LOAD( "ws17.bin", 0x000000, 0x08000, CRC(e00a8f09) SHA1(e7247ce0ab99d0726f31dee5de5ba33f4ebd183e) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x20000, "gfx1", 0 ) // first half of these is blank
ROM_LOAD( "ws09.bin", 0x00000, 0x08000, CRC(f05b2b3e) SHA1(6570d795d68655ace9668f32dc0bf5c2d2372411) ) /* characters */
@@ -646,7 +646,7 @@ ROM_START( skysmash )
ROM_REGION( 0x20000, "audiocpu", 0 )
ROM_LOAD( "rom2", 0x000000, 0x08000, CRC(75b194cf) SHA1(6aaf36cdab06c0aa5328f5176557387a5d3f7d26) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x20000, "gfx1", 0 )
ROM_LOAD( "rom3", 0x00000, 0x10000, CRC(fbb241be) SHA1(cd94c328891538bbd8c062d90a47ddf3d7d05bb0) ) /* characters */
diff --git a/src/mame/drivers/bmcpokr.cpp b/src/mame/drivers/bmcpokr.cpp
index ae65392d227..5a0bfb17347 100644
--- a/src/mame/drivers/bmcpokr.cpp
+++ b/src/mame/drivers/bmcpokr.cpp
@@ -215,7 +215,7 @@ void bmcpokr_state::draw_layer(screen_device &screen, bitmap_ind16 &bitmap, cons
{
case 1: tmap = m_tilemap_1; scroll = m_scrollram_1; ctrl = (m_layerctrl[0] >> 8) & 0xff; break;
case 2: tmap = m_tilemap_2; scroll = m_scrollram_2; ctrl = (m_layerctrl[0] >> 0) & 0xff; break;
- default: tmap = 0; scroll = m_scrollram_3; ctrl = (m_layerctrl[1] >> 8) & 0xff; break;
+ default: tmap = nullptr; scroll = m_scrollram_3; ctrl = (m_layerctrl[1] >> 8) & 0xff; break;
}
if (ctrl == 0x00)
diff --git a/src/mame/drivers/bml3.cpp b/src/mame/drivers/bml3.cpp
index 9b8b5eff66b..de950a105e0 100644
--- a/src/mame/drivers/bml3.cpp
+++ b/src/mame/drivers/bml3.cpp
@@ -1021,10 +1021,10 @@ static MACHINE_CONFIG_START( bml3_common, bml3_state )
Note it isn't feasible to use both, as they each place boot ROM at F800.
*/
MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl1", bml3_cards, "bml3mp1805")
- MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl2", bml3_cards, NULL)
- MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl3", bml3_cards, NULL)
- MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl4", bml3_cards, NULL)
- MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl5", bml3_cards, NULL)
+ MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl2", bml3_cards, nullptr)
+ MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl3", bml3_cards, nullptr)
+ MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl4", bml3_cards, nullptr)
+ MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl5", bml3_cards, nullptr)
MCFG_BML3BUS_SLOT_ADD("bml3bus", "sl6", bml3_cards, "bml3kanji")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bnstars.cpp b/src/mame/drivers/bnstars.cpp
index 8bb33dcb387..e575043267e 100644
--- a/src/mame/drivers/bnstars.cpp
+++ b/src/mame/drivers/bnstars.cpp
@@ -546,7 +546,7 @@ UINT32 bnstars_state::screen_update_bnstars_right(screen_device &screen, bitmap_
static INPUT_PORTS_START( bnstars )
PORT_START("P1")
- PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bnstars_state, mahjong_ctrl_r, (void *)0)
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bnstars_state, mahjong_ctrl_r, (void *)nullptr)
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -708,7 +708,7 @@ GFXDECODE_END
CUSTOM_INPUT_MEMBER(bnstars_state::mahjong_ctrl_r)
{
- required_ioport_array<4> &keys = (param == 0) ? m_p1_keys : m_p2_keys;
+ required_ioport_array<4> &keys = (param == nullptr) ? m_p1_keys : m_p2_keys;
switch (m_bnstars1_mahjong_select & 0x2080)
{
diff --git a/src/mame/drivers/br8641.cpp b/src/mame/drivers/br8641.cpp
index 671aeab491d..df76c9ee91b 100644
--- a/src/mame/drivers/br8641.cpp
+++ b/src/mame/drivers/br8641.cpp
@@ -153,7 +153,7 @@ static const z80_daisy_config daisy_chain_intf[] =
{ "pio2" },
{ "pio3" },
{ "ctc" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/btime.cpp b/src/mame/drivers/btime.cpp
index b1524a4fce1..c8b701f5518 100644
--- a/src/mame/drivers/btime.cpp
+++ b/src/mame/drivers/btime.cpp
@@ -1142,8 +1142,8 @@ static GFXDECODE_START( zoar )
GFXDECODE_END
static GFXDECODE_START( disco )
- GFXDECODE_ENTRY( NULL, 0, disco_tile8layout, 0, 4 ) /* char set #1 */
- GFXDECODE_ENTRY( NULL, 0, disco_tile16layout, 0, 4 ) /* sprites */
+ GFXDECODE_ENTRY( nullptr, 0, disco_tile8layout, 0, 4 ) /* char set #1 */
+ GFXDECODE_ENTRY( nullptr, 0, disco_tile16layout, 0, 4 ) /* sprites */
GFXDECODE_END
/***************************************************************************
diff --git a/src/mame/drivers/buggychl.cpp b/src/mame/drivers/buggychl.cpp
index 81e2232da8a..6892af92550 100644
--- a/src/mame/drivers/buggychl.cpp
+++ b/src/mame/drivers/buggychl.cpp
@@ -303,7 +303,7 @@ static const gfx_layout spritelayout =
};
static GFXDECODE_START( buggychl )
- GFXDECODE_ENTRY( NULL, 0, charlayout, 0, 8 ) /* decoded at runtime */
+ GFXDECODE_ENTRY( nullptr, 0, charlayout, 0, 8 ) /* decoded at runtime */
/* sprites are drawn pixel by pixel by draw_sprites() */
GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 0, 8 )
GFXDECODE_END
diff --git a/src/mame/drivers/bullet.cpp b/src/mame/drivers/bullet.cpp
index acc5d04c882..97a7d5ef81f 100644
--- a/src/mame/drivers/bullet.cpp
+++ b/src/mame/drivers/bullet.cpp
@@ -212,7 +212,7 @@ WRITE8_MEMBER( bullet_state::exdsk_w )
if (m_exdsk_sw)
{
// drive select
- m_floppy = NULL;
+ m_floppy = nullptr;
switch (data & 0x07)
{
@@ -462,7 +462,7 @@ WRITE8_MEMBER( bulletf_state::xfdc_w )
*/
// drive select
- m_floppy = NULL;
+ m_floppy = nullptr;
switch (data & 0x0f)
{
@@ -985,7 +985,7 @@ static const z80_daisy_config daisy_chain[] =
{ Z80DART_TAG },
{ Z80PIO_TAG },
{ Z80CTC_TAG },
- { NULL }
+ { nullptr }
};
@@ -1141,13 +1141,13 @@ static MACHINE_CONFIG_START( bullet, bullet_state )
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE(Z80DART_TAG, z80dart_device, dcda_w))
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bullet_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":0", bullet_525_floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":1", bullet_525_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":2", bullet_525_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":3", bullet_525_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":4", bullet_8_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":5", bullet_8_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":6", bullet_8_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":7", bullet_8_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":1", bullet_525_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":2", bullet_525_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":3", bullet_525_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":4", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":5", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":6", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":7", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(bullet_state, write_centronics_busy))
@@ -1161,7 +1161,7 @@ static MACHINE_CONFIG_START( bullet, bullet_state )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal)
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
// software lists
@@ -1223,15 +1223,15 @@ static MACHINE_CONFIG_START( bulletf, bulletf_state )
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE(Z80DART_TAG, z80dart_device, rib_w))
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bullet_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":0", bullet_525_floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":1", bullet_525_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":2", bullet_525_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":3", bullet_525_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":4", bullet_8_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":5", bullet_8_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":6", bullet_8_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":7", bullet_8_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":8", bullet_35_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":9", bullet_35_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":1", bullet_525_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":2", bullet_525_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":3", bullet_525_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":4", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":5", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":6", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":7", bullet_8_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":8", bullet_35_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":9", bullet_35_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(bullet_state, write_centronics_busy))
@@ -1242,7 +1242,7 @@ static MACHINE_CONFIG_START( bulletf, bulletf_state )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal)
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
MCFG_DEVICE_ADD(SCSIBUS_TAG, SCSI_PORT, 0)
diff --git a/src/mame/drivers/bw12.cpp b/src/mame/drivers/bw12.cpp
index 20234365c0f..3f2db33ab16 100644
--- a/src/mame/drivers/bw12.cpp
+++ b/src/mame/drivers/bw12.cpp
@@ -608,12 +608,12 @@ static MACHINE_CONFIG_START( common, bw12_state )
MCFG_AY3600_CONTROL_CB(READLINE(bw12_state, ay3600_control_r))
MCFG_AY3600_DATA_READY_CB(WRITELINE(bw12_state, ay3600_data_ready_w))
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcdb_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, ctsb_w))
diff --git a/src/mame/drivers/bw2.cpp b/src/mame/drivers/bw2.cpp
index 573c011f72d..3cf623fbc02 100644
--- a/src/mame/drivers/bw2.cpp
+++ b/src/mame/drivers/bw2.cpp
@@ -415,7 +415,7 @@ WRITE8_MEMBER( bw2_state::ppi_pa_w )
m_kb = data & 0x0f;
// drive select
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 4)) m_floppy = m_floppy0->get_device();
if (BIT(data, 5)) m_floppy = m_floppy1->get_device();
@@ -628,7 +628,7 @@ static MACHINE_CONFIG_START( bw2, bw2_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_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr))
@@ -637,8 +637,8 @@ static MACHINE_CONFIG_START( bw2, bw2_state )
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(bw2_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":0", bw2_floppies, "35dd", bw2_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":1", bw2_floppies, NULL, bw2_state::floppy_formats)
- MCFG_BW2_EXPANSION_SLOT_ADD(BW2_EXPANSION_SLOT_TAG, XTAL_16MHz, bw2_expansion_cards, NULL)
+ MCFG_FLOPPY_DRIVE_ADD(WD2797_TAG":1", bw2_floppies, nullptr, bw2_state::floppy_formats)
+ MCFG_BW2_EXPANSION_SLOT_ADD(BW2_EXPANSION_SLOT_TAG, XTAL_16MHz, bw2_expansion_cards, nullptr)
// software list
MCFG_SOFTWARE_LIST_ADD("flop_list","bw2")
diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp
index 923b11470fb..265b3d77c77 100644
--- a/src/mame/drivers/by35.cpp
+++ b/src/mame/drivers/by35.cpp
@@ -414,7 +414,7 @@ static INPUT_PORTS_START( playboy )
PORT_DIPSETTING( 0x40, "Extra Ball or Special Held Until Collected")
PORT_MODIFY("X0") /* Drop Target switches */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x00) // PORT_CODE(KEYCODE_STOP)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)nullptr) // PORT_CODE(KEYCODE_STOP)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x01) // PORT_CODE(KEYCODE_SLASH)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x02) // PORT_CODE(KEYCODE_OPENBRACE)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x03) // PORT_CODE(KEYCODE_CLOSEBRACE)
@@ -2193,7 +2193,7 @@ ROM_START(skflight)
ROM_RELOAD(0x28000, 0x8000)
ROM_RELOAD(0x38000, 0x8000)
ROM_REGION(0x10000, "cpu2", 0)
- ROM_COPY("sound1", 0x0000, 0x8000,0x8000)
+ ROM_COPY("sound1", nullptr, 0x8000,0x8000)
ROM_END
/*--------------------------------
@@ -2216,7 +2216,7 @@ ROM_START(cobrap)
ROM_LOAD("snd_u11.256",0x18000,0x8000, CRC(d4da383c) SHA1(032a4a425936d5c822fba6e46483f03a87c1a6ec))
ROM_RELOAD(0x38000, 0x8000)
ROM_REGION(0x10000, "cpu2", 0)
- ROM_COPY("sound1", 0x0000, 0x8000,0x8000)
+ ROM_COPY("sound1", nullptr, 0x8000,0x8000)
ROM_END
/*--------------------------------
@@ -2243,7 +2243,7 @@ ROM_START(futrquen)
ROM_LOAD("snd_u11.bin",0x18000,0x8000, CRC(71d98d17) SHA1(9575b80a91a67b1644e909f70d364e0a75f73b02))
ROM_RELOAD(0x38000, 0x8000)
ROM_REGION(0x10000, "cpu2", 0)
- ROM_COPY("sound1", 0x0000, 0x8000,0x8000)
+ ROM_COPY("sound1", nullptr, 0x8000,0x8000)
ROM_END
/*--------------------------------
/ F1 Grand Prix
@@ -2267,7 +2267,7 @@ ROM_START(f1gpp)
ROM_LOAD("snd_u11a",0x38000,0x8000, CRC(884dc754) SHA1(b121476ea621eae7a7ba0b9a1b5e87051e1e9e3d))
ROM_LOAD("snd_u11b",0x18000,0x8000, CRC(2394b498) SHA1(bf0884a6556a27791e7e801051be5975dd6b95c4))
ROM_REGION(0x10000, "cpu2", 0)
- ROM_COPY("sound1", 0x0000, 0x8000,0x8000)
+ ROM_COPY("sound1", nullptr, 0x8000,0x8000)
ROM_END
/*--------------------------------
@@ -2294,7 +2294,7 @@ ROM_START(toppin)
ROM_LOAD("snd_u11.bin",0x18000,0x8000, CRC(1814a50d) SHA1(6fe22e774fa90725d0db9f1020bad88bae0ef85c))
ROM_RELOAD(0x38000, 0x8000)
ROM_REGION(0x10000, "cpu2", 0)
- ROM_COPY("sound1", 0x0000, 0x8000,0x8000)
+ ROM_COPY("sound1", nullptr, 0x8000,0x8000)
ROM_END
/*--------------------------------
@@ -2319,7 +2319,7 @@ ROM_START(uboat65)
ROM_RELOAD(0x28000, 0x8000)
ROM_RELOAD(0x38000, 0x8000)
ROM_REGION(0x10000, "cpu2", 0)
- ROM_COPY("sound1", 0x0000, 0x8000,0x8000)
+ ROM_COPY("sound1", nullptr, 0x8000,0x8000)
ROM_END
/*--------------------------------
/ Big Ball Bowling (Bowler)
diff --git a/src/mame/drivers/c128.cpp b/src/mame/drivers/c128.cpp
index 91c83f0aa1b..a9d937ad7b5 100644
--- a/src/mame/drivers/c128.cpp
+++ b/src/mame/drivers/c128.cpp
@@ -1523,10 +1523,10 @@ static MACHINE_CONFIG_START( ntsc, c128_state )
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(c128_state, cia2_pb_w))
MCFG_MOS6526_PC_CALLBACK(DEVWRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_8))
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, cbm_datassette_devices, "c1530", DEVWRITELINE(MOS6526_2_TAG, mos6526_device, flag_w))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(DEVWRITELINE(MOS8564_TAG, mos8564_device, lp_w))
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy")
- MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_14_31818MHz*2/3.5/8, c64_expansion_cards, NULL)
+ MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_14_31818MHz*2/3.5/8, c64_expansion_cards, nullptr)
MCFG_C64_EXPANSION_SLOT_IRQ_CALLBACK(WRITELINE(c128_state, exp_irq_w))
MCFG_C64_EXPANSION_SLOT_NMI_CALLBACK(WRITELINE(c128_state, exp_nmi_w))
MCFG_C64_EXPANSION_SLOT_RESET_CALLBACK(WRITELINE(c128_state, exp_reset_w))
@@ -1534,7 +1534,7 @@ static MACHINE_CONFIG_START( ntsc, c128_state )
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(c128_state, exp_dma_cd_w))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(c128_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, NULL)
+ MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(c128_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
@@ -1607,7 +1607,7 @@ MACHINE_CONFIG_END
//-------------------------------------------------
static MACHINE_CONFIG_DERIVED( c128d81, ntsc )
- MCFG_CBM_IEC_ADD(NULL)
+ MCFG_CBM_IEC_ADD(nullptr)
MCFG_CBM_IEC_BUS_SRQ_CALLBACK(WRITELINE(c128_state, iec_srq_w))
MCFG_CBM_IEC_BUS_DATA_CALLBACK(WRITELINE(c128_state, iec_data_w))
@@ -1696,10 +1696,10 @@ static MACHINE_CONFIG_START( pal, c128_state )
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(c128_state, cia2_pb_w))
MCFG_MOS6526_PC_CALLBACK(DEVWRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_8))
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, cbm_datassette_devices, "c1530", DEVWRITELINE(MOS6526_2_TAG, mos6526_device, flag_w))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(DEVWRITELINE(MOS8566_TAG, mos8566_device, lp_w))
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy")
- MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_17_734472MHz*2/4.5/8, c64_expansion_cards, NULL)
+ MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_17_734472MHz*2/4.5/8, c64_expansion_cards, nullptr)
MCFG_C64_EXPANSION_SLOT_IRQ_CALLBACK(WRITELINE(c128_state, exp_irq_w))
MCFG_C64_EXPANSION_SLOT_NMI_CALLBACK(WRITELINE(c128_state, exp_nmi_w))
MCFG_C64_EXPANSION_SLOT_RESET_CALLBACK(WRITELINE(c128_state, exp_reset_w))
@@ -1707,7 +1707,7 @@ static MACHINE_CONFIG_START( pal, c128_state )
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(c128_state, exp_dma_cd_w))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(c128_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, NULL)
+ MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(c128_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
diff --git a/src/mame/drivers/c64.cpp b/src/mame/drivers/c64.cpp
index bdbfb0ef1dc..5df87c29896 100644
--- a/src/mame/drivers/c64.cpp
+++ b/src/mame/drivers/c64.cpp
@@ -1051,7 +1051,7 @@ SLOT_INTERFACE_END
void c64_state::machine_start()
{
// get pointers to ROMs
- if (memregion("basic") != NULL)
+ if (memregion("basic") != nullptr)
{
m_basic = memregion("basic")->base();
m_kernal = memregion("kernal")->base();
@@ -1171,10 +1171,10 @@ static MACHINE_CONFIG_START( ntsc, c64_state )
MCFG_CBM_IEC_ADD("c1541")
MCFG_CBM_IEC_BUS_SRQ_CALLBACK(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, flag_w))
MCFG_CBM_IEC_BUS_ATN_CALLBACK(DEVWRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_9))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(DEVWRITELINE(MOS6567_TAG, mos6567_device, lp_w))
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy")
- MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/14, c64_expansion_cards, NULL)
+ MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/14, c64_expansion_cards, nullptr)
MCFG_C64_EXPANSION_SLOT_IRQ_CALLBACK(WRITELINE(c64_state, exp_irq_w))
MCFG_C64_EXPANSION_SLOT_NMI_CALLBACK(WRITELINE(c64_state, exp_nmi_w))
MCFG_C64_EXPANSION_SLOT_RESET_CALLBACK(WRITELINE(c64_state, exp_reset_w))
@@ -1182,7 +1182,7 @@ static MACHINE_CONFIG_START( ntsc, c64_state )
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(c64_state, write))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(c64_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, NULL)
+ MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(c64_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
@@ -1328,10 +1328,10 @@ static MACHINE_CONFIG_START( pal, c64_state )
MCFG_CBM_IEC_ADD("c1541")
MCFG_CBM_IEC_BUS_SRQ_CALLBACK(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, flag_w))
MCFG_CBM_IEC_BUS_ATN_CALLBACK(DEVWRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_9))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(DEVWRITELINE(MOS6569_TAG, mos6569_device, lp_w))
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy")
- MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_17_734472MHz/18, c64_expansion_cards, NULL)
+ MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_17_734472MHz/18, c64_expansion_cards, nullptr)
MCFG_C64_EXPANSION_SLOT_IRQ_CALLBACK(WRITELINE(c64_state, exp_irq_w))
MCFG_C64_EXPANSION_SLOT_NMI_CALLBACK(WRITELINE(c64_state, exp_nmi_w))
MCFG_C64_EXPANSION_SLOT_RESET_CALLBACK(WRITELINE(c64_state, exp_reset_w))
@@ -1339,7 +1339,7 @@ static MACHINE_CONFIG_START( pal, c64_state )
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(c64_state, write))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(c64_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, NULL)
+ MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(c64_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
@@ -1459,13 +1459,13 @@ static MACHINE_CONFIG_START( pal_gs, c64gs_state )
MCFG_MOS6526_PB_INPUT_CALLBACK(READ8(c64_state, cia2_pb_r))
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(c64_state, cia2_pb_w))
MCFG_MOS6526_PC_CALLBACK(DEVWRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_8))
- MCFG_CBM_IEC_ADD(NULL)
+ MCFG_CBM_IEC_ADD(nullptr)
MCFG_CBM_IEC_BUS_SRQ_CALLBACK(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, flag_w))
MCFG_CBM_IEC_BUS_ATN_CALLBACK(DEVWRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_9))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(DEVWRITELINE(MOS6569_TAG, mos6569_device, lp_w))
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy")
- MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_17_734472MHz/18, c64_expansion_cards, NULL)
+ MCFG_C64_EXPANSION_SLOT_ADD(C64_EXPANSION_SLOT_TAG, XTAL_17_734472MHz/18, c64_expansion_cards, nullptr)
MCFG_C64_EXPANSION_SLOT_IRQ_CALLBACK(WRITELINE(c64_state, exp_irq_w))
MCFG_C64_EXPANSION_SLOT_NMI_CALLBACK(WRITELINE(c64_state, exp_nmi_w))
MCFG_C64_EXPANSION_SLOT_RESET_CALLBACK(WRITELINE(c64_state, exp_reset_w))
@@ -1473,7 +1473,7 @@ static MACHINE_CONFIG_START( pal_gs, c64gs_state )
MCFG_C64_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(c64_state, write))
MCFG_C64_EXPANSION_SLOT_DMA_CALLBACK(WRITELINE(c64_state, exp_dma_w))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, NULL)
+ MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, c64_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(c64_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, cnt_w))
MCFG_PET_USER_PORT_5_HANDLER(DEVWRITELINE(MOS6526_1_TAG, mos6526_device, sp_w))
diff --git a/src/mame/drivers/c80.cpp b/src/mame/drivers/c80.cpp
index 4af7ab0c6db..028bcb5c803 100644
--- a/src/mame/drivers/c80.cpp
+++ b/src/mame/drivers/c80.cpp
@@ -230,7 +230,7 @@ static const z80_daisy_config c80_daisy_chain[] =
{
{ Z80PIO1_TAG },
{ Z80PIO2_TAG },
- { NULL }
+ { nullptr }
};
/* Machine Initialization */
diff --git a/src/mame/drivers/calchase.cpp b/src/mame/drivers/calchase.cpp
index f7ac71d950c..d9908799d25 100644
--- a/src/mame/drivers/calchase.cpp
+++ b/src/mame/drivers/calchase.cpp
@@ -660,12 +660,12 @@ static MACHINE_CONFIG_START( calchase, calchase_state )
MCFG_FRAGMENT_ADD( pcat_common )
- MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, intel82439tx_pci_r, intel82439tx_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(7, nullptr, intel82371ab_pci_r, intel82371ab_pci_w)
/* video hardware */
MCFG_FRAGMENT_ADD( pcvideo_trident_vga )
@@ -691,12 +691,12 @@ static MACHINE_CONFIG_START( hostinv, calchase_state )
MCFG_FRAGMENT_ADD( pcat_common )
- MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "cdrom", NULL, true)
+ MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "cdrom", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, intel82439tx_pci_r, intel82439tx_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(7, nullptr, intel82371ab_pci_r, intel82371ab_pci_w)
/* video hardware */
MCFG_FRAGMENT_ADD( pcvideo_trident_vga )
diff --git a/src/mame/drivers/camplynx.cpp b/src/mame/drivers/camplynx.cpp
index aa8d605a2b2..96cc919dfb9 100644
--- a/src/mame/drivers/camplynx.cpp
+++ b/src/mame/drivers/camplynx.cpp
@@ -760,7 +760,7 @@ d7 = 125ns or 250ns */
port7f_w(space, 0, m_bankdata);
}
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if ((data & 3) == 0) floppy = m_floppy0->get_device();
else
if ((data & 3) == 1) floppy = m_floppy1->get_device();
diff --git a/src/mame/drivers/casloopy.cpp b/src/mame/drivers/casloopy.cpp
index 6895ad0c2fc..255c4b7fcd4 100644
--- a/src/mame/drivers/casloopy.cpp
+++ b/src/mame/drivers/casloopy.cpp
@@ -230,7 +230,7 @@ void casloopy_state::video_start()
m_bitmap_vram = auto_alloc_array_clear(machine(), UINT8, 0x20000);
for (m_gfx_index = 0; m_gfx_index < MAX_GFX_ELEMENTS; m_gfx_index++)
- if (m_gfxdecode->gfx(m_gfx_index) == 0)
+ if (m_gfxdecode->gfx(m_gfx_index) == nullptr)
break;
for(int i=0;i<0x10000;i++)
diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp
index fbefb7b7c29..4fe040e64f2 100644
--- a/src/mame/drivers/cbm2.cpp
+++ b/src/mame/drivers/cbm2.cpp
@@ -2073,17 +2073,17 @@ static MACHINE_CONFIG_START( p500_ntsc, p500_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, NULL, DEVWRITELINE(MOS6526_TAG, mos6526_device, flag_w))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ 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_TRIGGER_CALLBACK(DEVWRITELINE(MOS6567_TAG, mos6567_device, lp_w))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL)
- MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/14, cbm2_expansion_cards, NULL)
- MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, cbm2_user_port_cards, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, nullptr)
+ MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/14, cbm2_expansion_cards, nullptr)
+ MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, cbm2_user_port_cards, nullptr)
MCFG_CBM2_USER_PORT_IRQ_CALLBACK(WRITELINE(p500_state, user_irq_w))
MCFG_CBM2_USER_PORT_SP_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, sp_w))
MCFG_CBM2_USER_PORT_CNT_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, cnt_w))
MCFG_CBM2_USER_PORT_FLAG_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, flag_w))
- 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(MOS6551A_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, write_dsr))
@@ -2186,17 +2186,17 @@ static MACHINE_CONFIG_START( p500_pal, p500_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, NULL, DEVWRITELINE(MOS6526_TAG, mos6526_device, flag_w))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ 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_TRIGGER_CALLBACK(DEVWRITELINE(MOS6569_TAG, mos6569_device, lp_w))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL)
- MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, XTAL_17_734472MHz/18, cbm2_expansion_cards, NULL)
- MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, cbm2_user_port_cards, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, nullptr)
+ MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, XTAL_17_734472MHz/18, cbm2_expansion_cards, nullptr)
+ MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, cbm2_user_port_cards, nullptr)
MCFG_CBM2_USER_PORT_IRQ_CALLBACK(WRITELINE(p500_state, user_irq_w))
MCFG_CBM2_USER_PORT_SP_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, sp_w))
MCFG_CBM2_USER_PORT_CNT_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, cnt_w))
MCFG_CBM2_USER_PORT_FLAG_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, flag_w))
- 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(MOS6551A_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, write_dsr))
@@ -2299,16 +2299,16 @@ 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, NULL,DEVWRITELINE(MOS6526_TAG, mos6526_device, flag_w))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, NULL)
- MCFG_CBM2_EXPANSION_SLOT_ADD(CBM2_EXPANSION_SLOT_TAG, XTAL_18MHz/9, cbm2_expansion_cards, NULL)
- MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, cbm2_user_port_cards, NULL)
+ 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)
+ MCFG_CBM2_USER_PORT_ADD(CBM2_USER_PORT_TAG, cbm2_user_port_cards, nullptr)
MCFG_CBM2_USER_PORT_IRQ_CALLBACK(WRITELINE(cbm2_state, user_irq_w))
MCFG_CBM2_USER_PORT_SP_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, sp_w))
MCFG_CBM2_USER_PORT_CNT_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, cnt_w))
MCFG_CBM2_USER_PORT_FLAG_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, flag_w))
- 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(MOS6551A_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(MOS6551A_TAG, mos6551_device, write_dsr))
diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp
index d92970de3c2..80bfd0c82f1 100644
--- a/src/mame/drivers/cc40.cpp
+++ b/src/mame/drivers/cc40.cpp
@@ -95,8 +95,8 @@ public:
m_key_matrix(*this, "IN"),
m_battery_inp(*this, "BATTERY")
{
- m_sysram[0] = NULL;
- m_sysram[1] = NULL;
+ m_sysram[0] = nullptr;
+ m_sysram[1] = nullptr;
}
required_device<tms70c20_device> m_maincpu;
@@ -402,7 +402,7 @@ INPUT_CHANGED_MEMBER(cc40_state::sysram_size_changed)
static INPUT_PORTS_START( cc40 )
PORT_START("RAMSIZE")
- PORT_CONFNAME( 0x07, 0x01, "RAM Chip 1") PORT_CHANGED_MEMBER(DEVICE_SELF, cc40_state, sysram_size_changed, (void *)0)
+ PORT_CONFNAME( 0x07, 0x01, "RAM Chip 1") PORT_CHANGED_MEMBER(DEVICE_SELF, cc40_state, sysram_size_changed, (void *)nullptr)
PORT_CONFSETTING( 0x00, "None" )
PORT_CONFSETTING( 0x01, "2KB" )
PORT_CONFSETTING( 0x04, "8KB" )
@@ -520,7 +520,7 @@ void cc40_state::machine_reset()
void cc40_state::init_sysram(int chip, UINT16 size)
{
- if (m_sysram[chip] == NULL)
+ if (m_sysram[chip] == nullptr)
{
// init to largest possible
m_sysram[chip] = auto_alloc_array(machine(), UINT8, 0x2000);
diff --git a/src/mame/drivers/cchasm.cpp b/src/mame/drivers/cchasm.cpp
index 4f75476305f..78a34741514 100644
--- a/src/mame/drivers/cchasm.cpp
+++ b/src/mame/drivers/cchasm.cpp
@@ -130,7 +130,7 @@ INPUT_PORTS_END
static const z80_daisy_config daisy_chain[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/ccs2810.cpp b/src/mame/drivers/ccs2810.cpp
index 5a38e72d9d6..54be00bab5b 100644
--- a/src/mame/drivers/ccs2810.cpp
+++ b/src/mame/drivers/ccs2810.cpp
@@ -252,7 +252,7 @@ WRITE8_MEMBER( ccs_state::port34_w )
m_dsize = BIT(data, 4);
m_dden = BIT(data, 6);
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
m_fdc->set_floppy(m_floppy);
m_fdc->dden_w(!m_dden);
diff --git a/src/mame/drivers/cgenie.cpp b/src/mame/drivers/cgenie.cpp
index fbc52ffdd65..5c541d6155b 100644
--- a/src/mame/drivers/cgenie.cpp
+++ b/src/mame/drivers/cgenie.cpp
@@ -43,7 +43,7 @@ public:
m_color_ram(*this, "colorram"),
m_font_ram(*this, "fontram"),
m_keyboard(*this, "KEY"),
- m_palette(NULL),
+ m_palette(nullptr),
m_control(0xff),
m_rs232_rx(1),
m_rs232_dcd(1)
@@ -464,7 +464,7 @@ static MACHINE_CONFIG_START( cgenie, cgenie_state )
MCFG_SOFTWARE_LIST_ADD("cass_list", "cgenie_cass")
// serial port
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(cgenie_state, rs232_rx_w))
MCFG_RS232_DCD_HANDLER(WRITELINE(cgenie_state, rs232_dcd_w))
diff --git a/src/mame/drivers/channelf.cpp b/src/mame/drivers/channelf.cpp
index 722101a981b..e38e938b2ff 100644
--- a/src/mame/drivers/channelf.cpp
+++ b/src/mame/drivers/channelf.cpp
@@ -198,7 +198,7 @@ SLOT_INTERFACE_END
static MACHINE_CONFIG_FRAGMENT( channelf_cart )
/* cartridge */
- MCFG_CHANNELF_CARTRIDGE_ADD("cartslot", cf_cart, NULL)
+ MCFG_CHANNELF_CARTRIDGE_ADD("cartslot", cf_cart, nullptr)
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","channelf")
diff --git a/src/mame/drivers/chihiro.cpp b/src/mame/drivers/chihiro.cpp
index 4c89e9e0972..091b1093217 100644
--- a/src/mame/drivers/chihiro.cpp
+++ b/src/mame/drivers/chihiro.cpp
@@ -388,7 +388,7 @@ public:
xbox_base_state(mconfig, type, tag),
usbhack_index(-1),
usbhack_counter(0),
- dimm_board_memory(NULL),
+ dimm_board_memory(nullptr),
dimm_board_memory_size(0) { }
DECLARE_READ32_MEMBER(mediaboard_r);
@@ -703,7 +703,7 @@ int ide_baseboard_device::read_sector(UINT32 lba, void *buffer)
}
// in a type 1 chihiro this gets data from the dimm board memory
data = chihirosystem->baseboard_ide_dimmboard(lba);
- if (data != NULL)
+ if (data != nullptr)
memcpy(buffer, data, 512);
return 1;
}
@@ -795,9 +795,9 @@ void chihiro_state::baseboard_ide_event(int type, UINT8 *read_buffer, UINT8 *wri
UINT8 *chihiro_state::baseboard_ide_dimmboard(UINT32 lba)
{
// return pointer to memory containing decrypted gdrom data (contains an image of a fatx partition)
- if (chihiro_devs.dimmboard != NULL)
+ if (chihiro_devs.dimmboard != nullptr)
return dimm_board_memory + lba * 512;
- return NULL;
+ return nullptr;
}
READ32_MEMBER(chihiro_state::mediaboard_r)
@@ -846,7 +846,7 @@ void chihiro_state::machine_start()
xbox_base_state::machine_start();
chihiro_devs.ide = machine().device<bus_master_ide_controller_device>("ide");
chihiro_devs.dimmboard = machine().device<naomi_gdrom_board>("rom_board");
- if (chihiro_devs.dimmboard != NULL) {
+ if (chihiro_devs.dimmboard != nullptr) {
dimm_board_memory = chihiro_devs.dimmboard->memory(dimm_board_memory_size);
}
if (machine().debug_flags & DEBUG_FLAG_ENABLED)
@@ -873,13 +873,13 @@ static MACHINE_CONFIG_DERIVED_CLASS(chihiro_base, xbox_base, chihiro_state)
//MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ide_baseboard, NULL, "bb", true)
MCFG_DEVICE_MODIFY("ide:0")
- MCFG_DEVICE_SLOT_INTERFACE(ide_baseboard, NULL, true)
+ MCFG_DEVICE_SLOT_INTERFACE(ide_baseboard, nullptr, true)
MCFG_DEVICE_MODIFY("ide:1")
MCFG_DEVICE_SLOT_INTERFACE(ide_baseboard, "bb", true)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED(chihirogd, chihiro_base)
- MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", ":pic", NULL, NOOP)
+ MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", ":pic", nullptr, NOOP)
MACHINE_CONFIG_END
#define ROM_LOAD16_WORD_SWAP_BIOS(bios,name,offset,length,hash) \
diff --git a/src/mame/drivers/cinemat.cpp b/src/mame/drivers/cinemat.cpp
index 36bd8829843..3273f5fef8f 100644
--- a/src/mame/drivers/cinemat.cpp
+++ b/src/mame/drivers/cinemat.cpp
@@ -209,19 +209,19 @@ static const struct
} sundance_port_map[16] =
{
{ "PAD1", 0x155 }, /* bit 0 is set if P1 1,3,5,7,9 is pressed */
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ "PAD2", 0x1a1 }, /* bit 8 is set if P2 1,6,8,9 is pressed */
{ "PAD1", 0x1a1 }, /* bit 9 is set if P1 1,6,8,9 is pressed */
{ "PAD2", 0x155 }, /* bit 10 is set if P2 1,3,5,7,9 is pressed */
- { NULL, 0 },
+ { nullptr, 0 },
{ "PAD1", 0x093 }, /* bit 12 is set if P1 1,2,5,8 is pressed */
{ "PAD2", 0x093 }, /* bit 13 is set if P2 1,2,5,8 is pressed */
diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp
index 436acc4eb92..cc74b05727f 100644
--- a/src/mame/drivers/cischeat.cpp
+++ b/src/mame/drivers/cischeat.cpp
@@ -1383,7 +1383,7 @@ static const gfx_layout road_layout =
{ 0 },
64*1*4,
road_layout_xoffset,
- NULL
+ nullptr
};
/**************************************************************************
diff --git a/src/mame/drivers/clcd.cpp b/src/mame/drivers/clcd.cpp
index ed56c2e82ea..e0726b4230f 100644
--- a/src/mame/drivers/clcd.cpp
+++ b/src/mame/drivers/clcd.cpp
@@ -763,13 +763,13 @@ static MACHINE_CONFIG_START(clcd, clcd_state)
MCFG_MOS6551_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
MCFG_MOS6551_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia", mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("acia", mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia", mos6551_device, write_dsr))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("via1", via6522_device, write_pb4))
- MCFG_CENTRONICS_ADD("centronics", centronics_devices, NULL)
+ MCFG_CENTRONICS_ADD("centronics", centronics_devices, nullptr)
MCFG_CENTRONICS_BUSY_HANDLER(DEVWRITELINE("via1", via6522_device, write_pb6)) MCFG_DEVCB_XOR(1)
MCFG_DEVICE_ADD("bank1", ADDRESS_MAP_BANK, 0)
diff --git a/src/mame/drivers/cninja.cpp b/src/mame/drivers/cninja.cpp
index 5e0e6c64183..aaab83afadc 100644
--- a/src/mame/drivers/cninja.cpp
+++ b/src/mame/drivers/cninja.cpp
@@ -1609,7 +1609,7 @@ ROM_START( cninjabl )
// split larger bootleg GFX roms into required regions
ROM_REGION( 0x020000, "gfx1", ROMREGION_INVERT ) // chars
- ROM_COPY( "gfxtemp", 0x000000, 0x000000, 0x020000 )
+ ROM_COPY( "gfxtemp", nullptr, 0x000000, 0x020000 )
ROM_REGION( 0x080000, "gfx2", ROMREGION_INVERT ) // tiles 3
ROM_COPY( "gfxtemp", 0x080000, 0x000000, 0x080000 )
diff --git a/src/mame/drivers/cobra.cpp b/src/mame/drivers/cobra.cpp
index b53e655ec6c..3f591830ad2 100644
--- a/src/mame/drivers/cobra.cpp
+++ b/src/mame/drivers/cobra.cpp
@@ -595,7 +595,7 @@ void cobra_jvs_host::write(UINT8 data, const UINT8 *&rec_data, UINT32 &rec_size)
m_send_ptr = 0;
}
- rec_data = NULL;
+ rec_data = nullptr;
rec_size = 0;
}
@@ -1071,7 +1071,7 @@ void cobra_fifo::push(const device_t *cpu, UINT64 data)
if (m_verbose)
{
char accessor_location[50];
- if (cpu != NULL)
+ if (cpu != nullptr)
{
// cpu has a name and a PC
sprintf(accessor_location, "(%s) %08X", cpu->tag(), const_cast<device_t *>(cpu)->safe_pc());
@@ -1091,7 +1091,7 @@ void cobra_fifo::push(const device_t *cpu, UINT64 data)
{
int i, j;
char accessor_location[50];
- if (cpu != NULL)
+ if (cpu != nullptr)
{
// cpu has a name and a PC
sprintf(accessor_location, "(%s) %08X", cpu->tag(), const_cast<device_t *>(cpu)->safe_pc());
@@ -1148,7 +1148,7 @@ bool cobra_fifo::pop(const device_t *cpu, UINT64 *result)
if (m_verbose)
{
char accessor_location[50];
- if (cpu != NULL)
+ if (cpu != nullptr)
{
// cpu has a name and a PC
sprintf(accessor_location, "(%s) %08X", cpu->tag(), const_cast<device_t *>(cpu)->safe_pc());
@@ -1169,7 +1169,7 @@ bool cobra_fifo::pop(const device_t *cpu, UINT64 *result)
if (m_verbose)
{
char accessor_location[50];
- if (cpu != NULL)
+ if (cpu != nullptr)
{
// cpu has a name and a PC
sprintf(accessor_location, "(%s) %08X", cpu->tag(), const_cast<device_t *>(cpu)->safe_pc());
@@ -2199,8 +2199,8 @@ void cobra_renderer::gfx_fifo_exec()
if (cobra->m_gfx_re_status == RE_STATUS_IDLE)
{
- fifo_in->pop(NULL, &in1);
- fifo_in->pop(NULL, &in2);
+ fifo_in->pop(nullptr, &in1);
+ fifo_in->pop(nullptr, &in2);
w1 = (UINT32)(in1);
w2 = (UINT32)(in2);
@@ -2233,12 +2233,12 @@ void cobra_renderer::gfx_fifo_exec()
return;
}
- fifo_in->pop(NULL, &param[0]);
- fifo_in->pop(NULL, &param[1]);
- fifo_in->pop(NULL, &param[2]);
- fifo_in->pop(NULL, &param[3]);
- fifo_in->pop(NULL, &param[4]);
- fifo_in->pop(NULL, &param[5]);
+ fifo_in->pop(nullptr, &param[0]);
+ fifo_in->pop(nullptr, &param[1]);
+ fifo_in->pop(nullptr, &param[2]);
+ fifo_in->pop(nullptr, &param[3]);
+ fifo_in->pop(nullptr, &param[4]);
+ fifo_in->pop(nullptr, &param[5]);
w[0] = (UINT32)param[0]; w[1] = (UINT32)param[1]; w[2] = (UINT32)param[2];
w[3] = (UINT32)param[3]; w[4] = (UINT32)param[4]; w[5] = (UINT32)param[5];
@@ -2294,19 +2294,19 @@ void cobra_renderer::gfx_fifo_exec()
//printf("gfxfifo_exec: unhandled %08X %08X\n", w1, w2);
- fifo_in->pop(NULL, &in3);
- fifo_in->pop(NULL, &in4);
- fifo_in->pop(NULL, &ignore);
- fifo_in->pop(NULL, &ignore);
- fifo_in->pop(NULL, &ignore);
- fifo_in->pop(NULL, &ignore);
+ fifo_in->pop(nullptr, &in3);
+ fifo_in->pop(nullptr, &in4);
+ fifo_in->pop(nullptr, &ignore);
+ fifo_in->pop(nullptr, &ignore);
+ fifo_in->pop(nullptr, &ignore);
+ fifo_in->pop(nullptr, &ignore);
if (w1 == 0x0f600000 && w2 == 0x10520c00)
{
- fifo_out->push(NULL, w1);
- fifo_out->push(NULL, w2);
- fifo_out->push(NULL, in3);
- fifo_out->push(NULL, in4);
+ fifo_out->push(nullptr, w1);
+ fifo_out->push(nullptr, w2);
+ fifo_out->push(nullptr, in3);
+ fifo_out->push(nullptr, in4);
}
cobra->m_gfx_re_status = RE_STATUS_IDLE;
@@ -2391,34 +2391,34 @@ void cobra_renderer::gfx_fifo_exec()
UINT64 in[4];
if (w2 & 0x40000000) // line flags
{
- fifo_in->pop(NULL, &in[0]);
+ fifo_in->pop(nullptr, &in[0]);
}
if (w2 & 0x20000000) // unknown float (0.0f ... 1.0f)
{
- fifo_in->pop(NULL, &in[1]);
+ fifo_in->pop(nullptr, &in[1]);
}
- fifo_in->pop(NULL, &x); // X coord
- fifo_in->pop(NULL, &y); // Y coord
- fifo_in->pop(NULL, &in[2]); // coord?
- fifo_in->pop(NULL, &z); // Z coord
+ fifo_in->pop(nullptr, &x); // X coord
+ fifo_in->pop(nullptr, &y); // Y coord
+ fifo_in->pop(nullptr, &in[2]); // coord?
+ fifo_in->pop(nullptr, &z); // Z coord
if (w2 & 0x00200000) // texture coords
{
- fifo_in->pop(NULL, &w); // W coord (1 / Z)
- fifo_in->pop(NULL, &vert[i].p[POLY_U]); // U/Z coord
- fifo_in->pop(NULL, &vert[i].p[POLY_V]); // V/Z coord
+ fifo_in->pop(nullptr, &w); // W coord (1 / Z)
+ fifo_in->pop(nullptr, &vert[i].p[POLY_U]); // U/Z coord
+ fifo_in->pop(nullptr, &vert[i].p[POLY_V]); // V/Z coord
}
- fifo_in->pop(NULL, &a); // Gouraud Color Alpha
- fifo_in->pop(NULL, &r); // Gouraud Color R
- fifo_in->pop(NULL, &g); // Gouraud Color G
- fifo_in->pop(NULL, &b); // Gouraud Color B
+ fifo_in->pop(nullptr, &a); // Gouraud Color Alpha
+ fifo_in->pop(nullptr, &r); // Gouraud Color R
+ fifo_in->pop(nullptr, &g); // Gouraud Color G
+ fifo_in->pop(nullptr, &b); // Gouraud Color B
if (w2 & 0x00000001) // unknown float (0.0f ... 1.0f)
{
- fifo_in->pop(NULL, &in[3]);
+ fifo_in->pop(nullptr, &in[3]);
}
vert[i].x = ((x / z) * vp_width) + vp_center_x;
@@ -2579,10 +2579,10 @@ void cobra_renderer::gfx_fifo_exec()
UINT64 param[4];
param[0] = param[1] = param[2] = param[3] = 0;
- fifo_in->pop(NULL, &param[0]);
- fifo_in->pop(NULL, &param[1]);
- fifo_in->pop(NULL, &param[2]);
- fifo_in->pop(NULL, &param[3]);
+ fifo_in->pop(nullptr, &param[0]);
+ fifo_in->pop(nullptr, &param[1]);
+ fifo_in->pop(nullptr, &param[2]);
+ fifo_in->pop(nullptr, &param[3]);
buffer[x+0] = (UINT32)(param[0]);
buffer[x+1] = (UINT32)(param[1]);
@@ -2625,10 +2625,10 @@ void cobra_renderer::gfx_fifo_exec()
// flush fifo_out so we have fresh data at top
fifo_out->flush();
- fifo_out->push(NULL, buffer[x+0]);
- fifo_out->push(NULL, buffer[x+1]);
- fifo_out->push(NULL, buffer[x+2]);
- fifo_out->push(NULL, buffer[x+3]);
+ fifo_out->push(nullptr, buffer[x+0]);
+ fifo_out->push(nullptr, buffer[x+1]);
+ fifo_out->push(nullptr, buffer[x+2]);
+ fifo_out->push(nullptr, buffer[x+3]);
cobra->m_gfx_re_status = RE_STATUS_IDLE;
break;
@@ -2728,7 +2728,7 @@ void cobra_renderer::gfx_fifo_exec()
for (i = 0; i < num; i++)
{
UINT64 value = 0;
- fifo_in->pop(NULL, &value);
+ fifo_in->pop(nullptr, &value);
gfx_write_gram(reg + (i*4), 0xffffffff, value);
}
@@ -2749,7 +2749,7 @@ void cobra_renderer::gfx_fifo_exec()
int reg = (w1 >> 8) & 0xfffff;
UINT32 ret = gfx_read_gram(reg);
- fifo_out->push(NULL, ret);
+ fifo_out->push(nullptr, ret);
// printf("GFX: reg read %08X\n", reg);
@@ -2776,7 +2776,7 @@ void cobra_renderer::gfx_fifo_exec()
{
UINT32 value = gfx_read_gram(reg + (i*4));
- fifo_out->push(NULL, value);
+ fifo_out->push(nullptr, value);
}
cobra->m_gfx_re_status = RE_STATUS_IDLE;
@@ -2804,7 +2804,7 @@ void cobra_renderer::gfx_fifo_exec()
for (int i=0; i < num_left; i++)
{
UINT64 param = 0;
- fifo_in->pop(NULL, &param);
+ fifo_in->pop(nullptr, &param);
cobra->m_gfx_re_word_count++;
m_texture_ram[m_texram_ptr] = (UINT32)(param);
@@ -2832,7 +2832,7 @@ void cobra_renderer::gfx_fifo_exec()
while (fifo_in->current_num() > 0)
{
UINT64 param;
- fifo_in->pop(NULL, &param);
+ fifo_in->pop(nullptr, &param);
if (c == 0)
printf(" ");
@@ -3208,9 +3208,9 @@ static MACHINE_CONFIG_START( cobra, cobra_state )
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, mpc106_pci_r, mpc106_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, mpc106_pci_r, mpc106_pci_w)
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(cobra_state, ide_interrupt))
/* video hardware */
diff --git a/src/mame/drivers/coleco.cpp b/src/mame/drivers/coleco.cpp
index e9caa33fc6e..fc9c429680d 100644
--- a/src/mame/drivers/coleco.cpp
+++ b/src/mame/drivers/coleco.cpp
@@ -231,18 +231,18 @@ READ8_MEMBER( coleco_state::cart_r )
UINT8 coleco_state::coleco_scan_paddles(UINT8 *joy_status0, UINT8 *joy_status1)
{
- UINT8 ctrl_sel = (m_ctrlsel != NULL) ? m_ctrlsel->read() : 0;
+ UINT8 ctrl_sel = (m_ctrlsel != nullptr) ? m_ctrlsel->read() : 0;
/* which controller shall we read? */
if ((ctrl_sel & 0x07) == 0x02) // Super Action Controller P1
- *joy_status0 = (m_sac_slide1 != NULL) ? m_sac_slide1->read() : 0;
+ *joy_status0 = (m_sac_slide1 != nullptr) ? m_sac_slide1->read() : 0;
else if ((ctrl_sel & 0x07) == 0x03) // Driving Controller P1
- *joy_status0 = (m_driv_wheel1 != NULL) ? m_driv_wheel1->read() : 0;
+ *joy_status0 = (m_driv_wheel1 != nullptr) ? m_driv_wheel1->read() : 0;
if ((ctrl_sel & 0x70) == 0x20) // Super Action Controller P2
- *joy_status1 = (m_sac_slide2 != NULL) ? m_sac_slide2->read() : 0;
+ *joy_status1 = (m_sac_slide2 != nullptr) ? m_sac_slide2->read() : 0;
else if ((ctrl_sel & 0x70) == 0x30) // Driving Controller P2
- *joy_status1 = (m_driv_wheel2 != NULL) ? m_driv_wheel2->read() : 0;
+ *joy_status1 = (m_driv_wheel2 != nullptr) ? m_driv_wheel2->read() : 0;
/* In principle, even if not supported by any game, I guess we could have two Super
Action Controllers plugged into the Roller controller ports. Since I found no info
@@ -250,8 +250,8 @@ UINT8 coleco_state::coleco_scan_paddles(UINT8 *joy_status0, UINT8 *joy_status1)
the Roller trackball inputs and actually use the latter ones, when both are selected. */
if (ctrl_sel & 0x80) // Roller controller
{
- *joy_status0 = (m_roller_x != NULL) ? m_roller_x->read() : 0;
- *joy_status1 = (m_roller_y != NULL) ? m_roller_y->read() : 0;
+ *joy_status0 = (m_roller_x != nullptr) ? m_roller_x->read() : 0;
+ *joy_status1 = (m_roller_y != nullptr) ? m_roller_y->read() : 0;
}
return *joy_status0 | *joy_status1;
@@ -260,7 +260,7 @@ UINT8 coleco_state::coleco_scan_paddles(UINT8 *joy_status0, UINT8 *joy_status1)
UINT8 coleco_state::coleco_paddle_read(int port, int joy_mode, UINT8 joy_status)
{
- UINT8 ctrl_sel = (m_ctrlsel != NULL ) ? m_ctrlsel->read() : 0;
+ UINT8 ctrl_sel = (m_ctrlsel != nullptr ) ? m_ctrlsel->read() : 0;
UINT8 ctrl_extra = ctrl_sel & 0x80;
ctrl_sel = ctrl_sel >> (port*4) & 7;
@@ -388,7 +388,7 @@ static MACHINE_CONFIG_START( coleco, coleco_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* cartridge */
- MCFG_COLECOVISION_CARTRIDGE_SLOT_ADD(COLECOVISION_CARTRIDGE_SLOT_TAG, colecovision_cartridges, NULL)
+ MCFG_COLECOVISION_CARTRIDGE_SLOT_ADD(COLECOVISION_CARTRIDGE_SLOT_TAG, colecovision_cartridges, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","coleco")
diff --git a/src/mame/drivers/compis.cpp b/src/mame/drivers/compis.cpp
index cb0ff6d9ee8..5286bbe7707 100644
--- a/src/mame/drivers/compis.cpp
+++ b/src/mame/drivers/compis.cpp
@@ -600,7 +600,7 @@ void compis_state::machine_start()
{
if (m_ram->size() == 256*1024)
{
- m_maincpu->space(AS_PROGRAM).install_ram(0x20000, 0x3ffff, NULL);
+ m_maincpu->space(AS_PROGRAM).install_ram(0x20000, 0x3ffff, nullptr);
}
}
@@ -698,12 +698,12 @@ static MACHINE_CONFIG_START( compis, compis_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("tape", compis_state, tape_tick, attotime::from_hz(44100))
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, ctsa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, rxb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, dcdb_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(I8274_TAG, z80dart_device, ctsb_w))
@@ -717,7 +717,7 @@ static MACHINE_CONFIG_START( compis, compis_state )
MCFG_ISBX_SLOT_MINTR0_CALLBACK(DEVWRITELINE(I80130_TAG, i80130_device, ir1_w))
MCFG_ISBX_SLOT_MINTR1_CALLBACK(DEVWRITELINE(I80130_TAG, i80130_device, ir0_w))
MCFG_ISBX_SLOT_MDRQT_CALLBACK(DEVWRITELINE(I80186_TAG, i80186_cpu_device, drq0_w))
- MCFG_ISBX_SLOT_ADD(ISBX_1_TAG, 0, isbx_cards, NULL)
+ MCFG_ISBX_SLOT_ADD(ISBX_1_TAG, 0, isbx_cards, nullptr)
MCFG_ISBX_SLOT_MINTR0_CALLBACK(DEVWRITELINE(I80130_TAG, i80130_device, ir6_w))
MCFG_ISBX_SLOT_MINTR1_CALLBACK(DEVWRITELINE(I80130_TAG, i80130_device, ir5_w))
MCFG_ISBX_SLOT_MDRQT_CALLBACK(DEVWRITELINE(I80186_TAG, i80186_cpu_device, drq1_w))
diff --git a/src/mame/drivers/compucolor.cpp b/src/mame/drivers/compucolor.cpp
index 4de6390e1b9..c5b2df216b4 100644
--- a/src/mame/drivers/compucolor.cpp
+++ b/src/mame/drivers/compucolor.cpp
@@ -463,13 +463,13 @@ static MACHINE_CONFIG_START( compucolor2, compucolor2_state )
MCFG_TMS5501_XI_CALLBACK(READ8(compucolor2_state, xi_r))
MCFG_TMS5501_XO_CALLBACK(WRITE8(compucolor2_state, xo_w))
- 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(TMS5501_TAG, tms5501_device, rcv_w))
MCFG_COMPUCOLOR_FLOPPY_PORT_ADD("cd0", compucolor_floppy_port_devices, "floppy")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(TMS5501_TAG, tms5501_device, rcv_w))
- MCFG_COMPUCOLOR_FLOPPY_PORT_ADD("cd1", compucolor_floppy_port_devices, NULL)
+ MCFG_COMPUCOLOR_FLOPPY_PORT_ADD("cd1", compucolor_floppy_port_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(TMS5501_TAG, tms5501_device, rcv_w))
// internal ram
diff --git a/src/mame/drivers/concept.cpp b/src/mame/drivers/concept.cpp
index 947d4bfcfa7..5d10bf4e2f9 100644
--- a/src/mame/drivers/concept.cpp
+++ b/src/mame/drivers/concept.cpp
@@ -257,19 +257,19 @@ static MACHINE_CONFIG_START( concept, concept_state )
/* Apple II bus */
MCFG_DEVICE_ADD(A2BUS_TAG, A2BUS, 0)
MCFG_A2BUS_CPU("maincpu")
- MCFG_A2BUS_SLOT_ADD(A2BUS_TAG, "sl1", concept_a2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD(A2BUS_TAG, "sl2", concept_a2_cards, NULL)
- MCFG_A2BUS_SLOT_ADD(A2BUS_TAG, "sl3", concept_a2_cards, NULL)
+ MCFG_A2BUS_SLOT_ADD(A2BUS_TAG, "sl1", concept_a2_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD(A2BUS_TAG, "sl2", concept_a2_cards, nullptr)
+ MCFG_A2BUS_SLOT_ADD(A2BUS_TAG, "sl3", concept_a2_cards, nullptr)
MCFG_A2BUS_SLOT_ADD(A2BUS_TAG, "sl4", concept_a2_cards, "fdc01")
/* 2x RS232 ports */
- MCFG_RS232_PORT_ADD("rs232a", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232a", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(ACIA_0_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(ACIA_0_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(ACIA_0_TAG, mos6551_device, write_dsr))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(ACIA_0_TAG, mos6551_device, write_cts))
- MCFG_RS232_PORT_ADD("rs232b", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232b", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(ACIA_1_TAG, mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(ACIA_1_TAG, mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(ACIA_1_TAG, mos6551_device, write_dsr))
diff --git a/src/mame/drivers/coolridr.cpp b/src/mame/drivers/coolridr.cpp
index 7e9d216dc67..09588aab9a2 100644
--- a/src/mame/drivers/coolridr.cpp
+++ b/src/mame/drivers/coolridr.cpp
@@ -560,7 +560,7 @@ void coolridr_state::video_start()
{
/* find first empty slot to decode gfx */
for (m_gfx_index = 0; m_gfx_index < MAX_GFX_ELEMENTS; m_gfx_index++)
- if (m_gfxdecode->gfx(m_gfx_index) == 0)
+ if (m_gfxdecode->gfx(m_gfx_index) == nullptr)
break;
m_screen->register_screen_bitmap(m_temp_bitmap_sprites);
@@ -1451,7 +1451,7 @@ void *coolridr_state::draw_object_threaded(void *param, int threadid)
free (object);
- return NULL;
+ return nullptr;
}
/************* object->spriteblit[9] *************/
@@ -2137,7 +2137,7 @@ void *coolridr_state::draw_object_threaded(void *param, int threadid)
free (object);
- return NULL;
+ return nullptr;
}
@@ -2266,7 +2266,7 @@ void coolridr_state::blit_current_sprite(address_space &space)
}
else
{
- testobject->indirect_tiles = NULL;
+ testobject->indirect_tiles = nullptr;
}
int test_indirect_zoom_enable = (m_spriteblit[5] & 0x00000001);
@@ -2283,7 +2283,7 @@ void coolridr_state::blit_current_sprite(address_space &space)
}
else
{
- testobject->indirect_zoom = NULL;
+ testobject->indirect_zoom = nullptr;
}
testobject->zpri = m_blitterAddr | m_blittype<<12;
@@ -3812,10 +3812,10 @@ ROM_START( coolridr )
ROM_LOAD16_WORD_SWAP( "mpr-17645.ic6", 0x2400000, 0x0400000, CRC(56968d07) SHA1(e88c3d66ea05affb4681a25d155f097bd1b5a84b) ) // 0049
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
/*
@@ -3856,10 +3856,10 @@ ROM_START( aquastge )
ROM_LOAD16_WORD_SWAP( "mpr-18290.ic6", 0x2400000, 0x0200000, CRC(11f7adb0) SHA1(a72f9892f93506456edc7ffc66224446a58ca38b) ) // 0049
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
diff --git a/src/mame/drivers/cops.cpp b/src/mame/drivers/cops.cpp
index eb156f80377..8fd5dcfcd70 100644
--- a/src/mame/drivers/cops.cpp
+++ b/src/mame/drivers/cops.cpp
@@ -330,9 +330,9 @@ void cops_state::laserdisc_w(UINT8 data)
laserdisc_response_w(0x0a);
break;
case 0x60: /* Addr Inq (get current frame number) */
- for ( int i = 0; i < 5; i++ )
+ for (auto & elem : m_ld_frame)
{
- laserdisc_response_w(m_ld_frame[i]);
+ laserdisc_response_w(elem);
}
break;
case 0x80: /* text start */
diff --git a/src/mame/drivers/cosmic.cpp b/src/mame/drivers/cosmic.cpp
index 1eae0404888..58b92a19d39 100644
--- a/src/mame/drivers/cosmic.cpp
+++ b/src/mame/drivers/cosmic.cpp
@@ -899,7 +899,7 @@ static const char *const cosmica_sample_names[] =
"loudexp",
"smallexp",
"coin",
- 0 /* end of array */
+ nullptr /* end of array */
};
@@ -917,7 +917,7 @@ static const char *const panic_sample_names[] =
"extral",
"oxygen",
"coin",
- 0
+ nullptr
};
@@ -939,7 +939,7 @@ static const char *const cosmicg_sample_names[] =
"cg_gun", /* Gun Shot */
"cg_gotm", /* Got Monster */
"cg_ext", /* Coin Extend */
- 0
+ nullptr
};
diff --git a/src/mame/drivers/cps1.cpp b/src/mame/drivers/cps1.cpp
index a47323fad2f..e2614fcd1f5 100644
--- a/src/mame/drivers/cps1.cpp
+++ b/src/mame/drivers/cps1.cpp
@@ -3940,7 +3940,7 @@ ROM_START( strider )
ROMX_LOAD( "st-8.5a", 0x200006, 0x80000, CRC(6b4713b4) SHA1(759b8b1fc7a5c4b00d74a27c2dd11667db44b09e) , ROM_GROUPWORD | ROM_SKIP(6) ) // in "3" socket
ROM_REGION( 0x8000, "stars", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 )
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 )
ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
ROM_LOAD( "09.12b", 0x00000, 0x08000, CRC(2ed403bc) SHA1(4ce863ea40d789db5a7cfce91d2c7c720deb9be5) )
@@ -3982,7 +3982,7 @@ ROM_START( striderua )
ROMX_LOAD( "st-8.5a", 0x200006, 0x80000, CRC(6b4713b4) SHA1(759b8b1fc7a5c4b00d74a27c2dd11667db44b09e) , ROM_GROUPWORD | ROM_SKIP(6) ) // in "3" socket
ROM_REGION( 0x8000, "stars", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 )
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 )
ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
ROM_LOAD( "09.12b", 0x00000, 0x08000, CRC(08d63519) SHA1(c120ecfe25c3c50bc51bc7d5a9ef1c8ca6591240) ) /* different CRC from strider, pcb verified */
@@ -4051,7 +4051,7 @@ ROM_START( striderj )
ROMX_LOAD( "sth_22.11c", 0x300007, 0x20000, CRC(78dd9c48) SHA1(35fbf3ca21f56c9899283ba08c89c0faf7a8f717) , ROM_SKIP(7) ) // == st-8.5a
ROM_REGION( 0x8000, "stars", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 )
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 )
ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
ROM_LOAD( "sth_23.13c", 0x00000, 0x08000, CRC(2ed403bc) SHA1(4ce863ea40d789db5a7cfce91d2c7c720deb9be5) ) // == 09.12b
@@ -4090,7 +4090,7 @@ ROM_START( striderjr )
ROMX_LOAD( "sth_08.10a", 0x200006, 0x80000, CRC(6b4713b4) SHA1(759b8b1fc7a5c4b00d74a27c2dd11667db44b09e) , ROM_GROUPWORD | ROM_SKIP(6) ) // == st-8.5a
ROM_REGION( 0x8000, "stars", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 )
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 )
ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
ROM_LOAD( "sth_09.12a", 0x00000, 0x08000, CRC(08d63519) SHA1(c120ecfe25c3c50bc51bc7d5a9ef1c8ca6591240) )
@@ -10771,7 +10771,7 @@ ROM_START( slammast )
ROM_CONTINUE( 0x10000, 0x18000 )
ROM_REGION( 0x8000, "user1", 0 )
- ROM_COPY( "audiocpu", 0x00000, 0x00000, 0x8000 )
+ ROM_COPY( "audiocpu", nullptr, 0x00000, 0x8000 )
ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */
ROM_LOAD( "mb-q1.1k", 0x000000, 0x80000, CRC(0630c3ce) SHA1(520fc74c5c3638f611fa2f1b5efb08b91747e29b) )
@@ -10834,7 +10834,7 @@ ROM_START( slammastu )
ROM_CONTINUE( 0x10000, 0x18000 )
ROM_REGION( 0x8000, "user1", 0 )
- ROM_COPY( "audiocpu", 0x00000, 0x00000, 0x8000 )
+ ROM_COPY( "audiocpu", nullptr, 0x00000, 0x8000 )
ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */
ROM_LOAD( "mb-q1.1k", 0x000000, 0x80000, CRC(0630c3ce) SHA1(520fc74c5c3638f611fa2f1b5efb08b91747e29b) )
@@ -10894,7 +10894,7 @@ ROM_START( mbomberj )
ROM_CONTINUE( 0x10000, 0x18000 )
ROM_REGION( 0x8000, "user1", 0 )
- ROM_COPY( "audiocpu", 0x00000, 0x00000, 0x8000 )
+ ROM_COPY( "audiocpu", nullptr, 0x00000, 0x8000 )
ROM_REGION( 0x400000, "qsound", 0 ) /* QSound samples */
ROM_LOAD( "mb-q1.1k", 0x000000, 0x80000, CRC(0630c3ce) SHA1(520fc74c5c3638f611fa2f1b5efb08b91747e29b) )
@@ -11568,7 +11568,7 @@ ROM_START( sfach )
ROMX_LOAD( "sfz17", 0x600006, 0x80000, CRC(248b3b73) SHA1(95810a17b1caf6372b33ed3e4ee8a7e51482c70d) , ROM_GROUPWORD | ROM_SKIP(6) )
ROM_REGION( 0x8000, "stars", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 ) /* stars */
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 ) /* stars */
ROM_REGION( 0x18000, "audiocpu", 0 ) /* 64k for the audio CPU (+banks) */
ROM_LOAD( "sfz09", 0x00000, 0x08000, CRC(c772628b) SHA1(ebc5b7c173caf1e151f733f23c1b20abec24e16d) )
@@ -11606,7 +11606,7 @@ ROM_START( sfzch )
ROMX_LOAD( "sfz_17.10c", 0x600006, 0x80000, CRC(248b3b73) SHA1(95810a17b1caf6372b33ed3e4ee8a7e51482c70d), ROM_GROUPWORD | ROM_SKIP(6) )
ROM_REGION( 0x8000, "stars", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 )
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 )
ROM_REGION( 0x18000, "audiocpu",0 ) /* 64k for the audio CPU (+banks) */
ROM_LOAD( "sfz_09.12a", 0x00000, 0x08000, CRC(c772628b) SHA1(ebc5b7c173caf1e151f733f23c1b20abec24e16d))
@@ -11644,7 +11644,7 @@ ROM_START( sfzbch )
ROMX_LOAD( "sfz_17.10c", 0x600006, 0x80000, CRC(248b3b73) SHA1(95810a17b1caf6372b33ed3e4ee8a7e51482c70d), ROM_GROUPWORD | ROM_SKIP(6) )
ROM_REGION( 0x8000, "stars", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 ) /* stars */
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 ) /* stars */
ROM_REGION( 0x18000, "audiocpu",0 ) /* 64k for the audio CPU (+banks) */
ROM_LOAD( "sfz_09.12a", 0x00000, 0x08000, CRC(c772628b) SHA1(ebc5b7c173caf1e151f733f23c1b20abec24e16d))
diff --git a/src/mame/drivers/cps2.cpp b/src/mame/drivers/cps2.cpp
index eb2b4239cac..3f3024d2741 100644
--- a/src/mame/drivers/cps2.cpp
+++ b/src/mame/drivers/cps2.cpp
@@ -742,7 +742,7 @@ WRITE16_MEMBER( cps_state::cps2_eeprom_port_w )
/* bit 7 - */
/* Z80 Reset */
- if (m_audiocpu != NULL)
+ if (m_audiocpu != nullptr)
m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 0x0008) ? CLEAR_LINE : ASSERT_LINE);
coin_counter_w(machine(), 0, data & 0x0001);
@@ -1209,7 +1209,7 @@ INPUT_PORTS_END
MACHINE_START_MEMBER(cps_state,cps2)
{
- if (m_audiocpu != NULL) // gigaman2 has an AT89C4051 (8051) MCU as an audio cpu, no qsound.
+ if (m_audiocpu != nullptr) // gigaman2 has an AT89C4051 (8051) MCU as an audio cpu, no qsound.
membank("bank1")->configure_entries(0, (QSOUND_SIZE - 0x10000) / 0x4000, memregion("audiocpu")->base() + 0x10000, 0x4000);
}
@@ -2108,7 +2108,7 @@ ROM_START( csclub )
ROM_LOAD16_WORD_SWAP( "csce.07a", 0x200000, 0x80000, CRC(003968fd) SHA1(95f59a29a404a1c1e86d5f43526a80aa97f25621) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "csc.73", 0x800000, 0x080000, CRC(335f07c3) SHA1(44e0385120e2c81fd1072e19b7e3ff05d42be226) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.74", 0xa00000, 0x080000, CRC(ab215357) SHA1(c2600b5ba62a570f8a32de9c06f93ea8ae6cd854) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.75", 0xc00000, 0x080000, CRC(a2367381) SHA1(49d562be42c10cdf4e55e3b76c388f0b0121a967) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -2152,7 +2152,7 @@ ROM_START( csclub1 )
ROM_LOAD16_WORD_SWAP( "csc.07", 0x200000, 0x80000, CRC(01b05caa) SHA1(5b84487da68e6b6f2889c76bf9e070e25941988c) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "csc.14m", 0x800000, 0x200000, CRC(e8904afa) SHA1(39713ffca4e3a754c7c44c0ef4d99fb5a77d8da7) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.16m", 0x800002, 0x200000, CRC(c98c8079) SHA1(22d68ba2ef62b51981bb3e99ec2cde8d1b36514b) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.18m", 0x800004, 0x200000, CRC(c030df5a) SHA1(6d5e5a05531e168d0d44c591f9185ae300908fc2) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -2178,7 +2178,7 @@ ROM_START( csclubj )
ROM_LOAD16_WORD_SWAP( "csc.07", 0x200000, 0x80000, CRC(01b05caa) SHA1(5b84487da68e6b6f2889c76bf9e070e25941988c) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "csc.14m", 0x800000, 0x200000, CRC(e8904afa) SHA1(39713ffca4e3a754c7c44c0ef4d99fb5a77d8da7) , ROM_GROUPWORD | ROM_SKIP(6) ) /* roms 73 to 76 joined in all eprom version */
ROMX_LOAD( "csc.16m", 0x800002, 0x200000, CRC(c98c8079) SHA1(22d68ba2ef62b51981bb3e99ec2cde8d1b36514b) , ROM_GROUPWORD | ROM_SKIP(6) ) /* roms 63 to 66 joined in all eprom version */
ROMX_LOAD( "csc.18m", 0x800004, 0x200000, CRC(c030df5a) SHA1(6d5e5a05531e168d0d44c591f9185ae300908fc2) , ROM_GROUPWORD | ROM_SKIP(6) ) /* roms 83 to 86 joined in all eprom version */
@@ -2204,7 +2204,7 @@ ROM_START( csclubjy ) // this is fairly redundant, same code as csclubj, same gf
ROM_LOAD16_WORD_SWAP( "csc.07", 0x200000, 0x80000, CRC(01b05caa) SHA1(5b84487da68e6b6f2889c76bf9e070e25941988c) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "csc.73", 0x800000, 0x080000, CRC(335f07c3) SHA1(44e0385120e2c81fd1072e19b7e3ff05d42be226) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.74", 0xa00000, 0x080000, CRC(ab215357) SHA1(c2600b5ba62a570f8a32de9c06f93ea8ae6cd854) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.75", 0xc00000, 0x080000, CRC(a2367381) SHA1(49d562be42c10cdf4e55e3b76c388f0b0121a967) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -2249,7 +2249,7 @@ ROM_START( cscluba )
ROM_LOAD16_WORD_SWAP( "csc.07", 0x200000, 0x80000, CRC(01b05caa) SHA1(5b84487da68e6b6f2889c76bf9e070e25941988c) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "csc.14m", 0x800000, 0x200000, CRC(e8904afa) SHA1(39713ffca4e3a754c7c44c0ef4d99fb5a77d8da7) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.16m", 0x800002, 0x200000, CRC(c98c8079) SHA1(22d68ba2ef62b51981bb3e99ec2cde8d1b36514b) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.18m", 0x800004, 0x200000, CRC(c030df5a) SHA1(6d5e5a05531e168d0d44c591f9185ae300908fc2) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -2275,7 +2275,7 @@ ROM_START( csclubh )
ROM_LOAD16_WORD_SWAP( "csc.07", 0x200000, 0x80000, CRC(01b05caa) SHA1(5b84487da68e6b6f2889c76bf9e070e25941988c) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "csc.14m", 0x800000, 0x200000, CRC(e8904afa) SHA1(39713ffca4e3a754c7c44c0ef4d99fb5a77d8da7) , ROM_GROUPWORD | ROM_SKIP(6) ) /* roms 73 to 76 joined in all eprom version */
ROMX_LOAD( "csc.16m", 0x800002, 0x200000, CRC(c98c8079) SHA1(22d68ba2ef62b51981bb3e99ec2cde8d1b36514b) , ROM_GROUPWORD | ROM_SKIP(6) ) /* roms 63 to 66 joined in all eprom version */
ROMX_LOAD( "csc.18m", 0x800004, 0x200000, CRC(c030df5a) SHA1(6d5e5a05531e168d0d44c591f9185ae300908fc2) , ROM_GROUPWORD | ROM_SKIP(6) ) /* roms 83 to 86 joined in all eprom version */
@@ -3874,7 +3874,7 @@ ROM_START( megaman2 )
ROM_LOAD16_WORD_SWAP( "rm2.05", 0x100000, 0x80000, CRC(02ee9efc) SHA1(1b80c40389b51a03b930051f232630616c12e6c5) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "rm2.14m", 0x800000, 0x200000, CRC(9b1f00b4) SHA1(c1c5c2d9d00121425ae6598444d704f420ef4eef) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.16m", 0x800002, 0x200000, CRC(c2bb0c24) SHA1(38724c49d9db49765a4ed9bc2dc8f57cec45ec7c) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.18m", 0x800004, 0x200000, CRC(12257251) SHA1(20cb58afda0e6200991277817485340a6a41ae2b) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -3899,7 +3899,7 @@ ROM_START( megaman2a )
ROM_LOAD16_WORD_SWAP( "rm2.05", 0x100000, 0x80000, CRC(02ee9efc) SHA1(1b80c40389b51a03b930051f232630616c12e6c5) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "rm2.14m", 0x800000, 0x200000, CRC(9b1f00b4) SHA1(c1c5c2d9d00121425ae6598444d704f420ef4eef) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.16m", 0x800002, 0x200000, CRC(c2bb0c24) SHA1(38724c49d9db49765a4ed9bc2dc8f57cec45ec7c) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.18m", 0x800004, 0x200000, CRC(12257251) SHA1(20cb58afda0e6200991277817485340a6a41ae2b) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -3924,7 +3924,7 @@ ROM_START( rockman2j )
ROM_LOAD16_WORD_SWAP( "rm2.05", 0x100000, 0x80000, CRC(02ee9efc) SHA1(1b80c40389b51a03b930051f232630616c12e6c5) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "rm2.14m", 0x800000, 0x200000, CRC(9b1f00b4) SHA1(c1c5c2d9d00121425ae6598444d704f420ef4eef) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.16m", 0x800002, 0x200000, CRC(c2bb0c24) SHA1(38724c49d9db49765a4ed9bc2dc8f57cec45ec7c) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.18m", 0x800004, 0x200000, CRC(12257251) SHA1(20cb58afda0e6200991277817485340a6a41ae2b) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -3949,7 +3949,7 @@ ROM_START( megaman2h )
ROM_LOAD16_WORD_SWAP( "rm2.05", 0x100000, 0x80000, CRC(02ee9efc) SHA1(1b80c40389b51a03b930051f232630616c12e6c5) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "rm2.14m", 0x800000, 0x200000, CRC(9b1f00b4) SHA1(c1c5c2d9d00121425ae6598444d704f420ef4eef) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.16m", 0x800002, 0x200000, CRC(c2bb0c24) SHA1(38724c49d9db49765a4ed9bc2dc8f57cec45ec7c) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.18m", 0x800004, 0x200000, CRC(12257251) SHA1(20cb58afda0e6200991277817485340a6a41ae2b) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -5095,7 +5095,7 @@ ROM_START( mpangu )
ROM_LOAD16_WORD_SWAP( "mpnu.04", 0x080000, 0x80000, CRC(de079131) SHA1(95da2a03cb642963aabfebd8337003961ca4db71) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "mpn.13m", 0x800000, 0x200000, CRC(c5f123dc) SHA1(e459571416ab64f0280cda7dfa0d8836faa745c9) , ROM_GROUPWORD | ROM_SKIP(6) ) /* This version uses roms chips */
ROMX_LOAD( "mpn.15m", 0x800002, 0x200000, CRC(8e033265) SHA1(d05ca8fb825423ff6b099c06aaa500c0a947454a) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "mpn.17m", 0x800004, 0x200000, CRC(cfcd73d2) SHA1(3415c063ac3632159df0fa74899bde8c90f4a2a1) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -5613,7 +5613,7 @@ ROM_START( qndream )
ROM_LOAD16_WORD_SWAP( "tqzj.06", 0x180000, 0x80000, CRC(c371e8a5) SHA1(5a93e46e46acfdc93fcb069e2426627e948655bf) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "tqz.14m", 0x800000, 0x200000, CRC(98af88a2) SHA1(d3620faf2162a1f3a62a238715da4da429376d3c) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "tqz.16m", 0x800002, 0x200000, CRC(df82d491) SHA1(fd3c8303cbcacb132a90398ff61f47d2d68157ae) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "tqz.18m", 0x800004, 0x200000, CRC(42f132ff) SHA1(0e0a128524010dba033a9b9ab2c56fe92a1767da) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -5777,7 +5777,7 @@ ROM_START( mmancp2u )
ROM_LOAD16_WORD_SWAP( "rcm.05b", 0x100000, 0x80000, CRC(4376ea95) SHA1(7370ceffca513aa9f68a74f6869d561476589200) ) // == rcma_21a.rom from CPS1 version
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "rcm.73", 0x800000, 0x080000, CRC(774c6e04) SHA1(6bd14960218e31d5a043b20a1b9d2d69cace761e) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rcm.63", 0x800002, 0x080000, CRC(acad7c62) SHA1(eec10990339c9fd8fdae896a5fd98d5bf0220ed1) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rcm.83", 0x800004, 0x080000, CRC(6af30499) SHA1(a97bf2f382b6edc1e920e18d8ad5ca18131a2f21) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -5819,7 +5819,7 @@ ROM_START( mmancp2ur1 )
ROM_LOAD16_WORD_SWAP( "rcmu.05a", 0x100000, 0x80000, CRC(4376ea95) SHA1(7370ceffca513aa9f68a74f6869d561476589200) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "rcm.73", 0x800000, 0x080000, CRC(774c6e04) SHA1(6bd14960218e31d5a043b20a1b9d2d69cace761e) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rcm.63", 0x800002, 0x080000, CRC(acad7c62) SHA1(eec10990339c9fd8fdae896a5fd98d5bf0220ed1) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rcm.83", 0x800004, 0x080000, CRC(6af30499) SHA1(a97bf2f382b6edc1e920e18d8ad5ca18131a2f21) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -5862,7 +5862,7 @@ ROM_START( rmancp2j )
ROM_LOAD16_WORD_SWAP( "rcm.05a", 0x100000, 0x80000, CRC(517ccde2) SHA1(492256c192f0c4814efa1ee1dd390453dd2e5865) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "rcm.73", 0x800000, 0x080000, CRC(774c6e04) SHA1(6bd14960218e31d5a043b20a1b9d2d69cace761e) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rcm.63", 0x800002, 0x080000, CRC(acad7c62) SHA1(eec10990339c9fd8fdae896a5fd98d5bf0220ed1) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rcm.83", 0x800004, 0x080000, CRC(6af30499) SHA1(a97bf2f382b6edc1e920e18d8ad5ca18131a2f21) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -5905,7 +5905,7 @@ ROM_START( sfa )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -5931,7 +5931,7 @@ ROM_START( sfar1 )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -5957,7 +5957,7 @@ ROM_START( sfar2 )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -5983,7 +5983,7 @@ ROM_START( sfar3 )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6009,7 +6009,7 @@ ROM_START( sfau )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6035,7 +6035,7 @@ ROM_START( sfza )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6061,7 +6061,7 @@ ROM_START( sfzar1 )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6087,7 +6087,7 @@ ROM_START( sfzj )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6113,7 +6113,7 @@ ROM_START( sfzjr1 )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6139,7 +6139,7 @@ ROM_START( sfzjr2 )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6165,7 +6165,7 @@ ROM_START( sfzh )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6191,7 +6191,7 @@ ROM_START( sfzhr1 )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6217,7 +6217,7 @@ ROM_START( sfzb )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -6243,7 +6243,7 @@ ROM_START( sfzbr1 )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -7218,7 +7218,7 @@ ROM_START( spf2t )
ROM_LOAD16_WORD_SWAP( "pzf.04", 0x080000, 0x80000, CRC(b80649e2) SHA1(5bfccd656aea7ff82e9a20bb5856f4ab99b5a007) ) // marked pzfe.04 but same as pzf.04
ROM_REGION( 0xC00000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "pzf.14m", 0x800000, 0x100000, CRC(2d4881cb) SHA1(fd3baa183c25bed153b19c251980e2fb761600e2) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.16m", 0x800002, 0x100000, CRC(4b0fd1be) SHA1(377aafdcdb7a866b1c8487670e3598d8197976e4) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.18m", 0x800004, 0x100000, CRC(e43aac33) SHA1(d041e0688c3807d3363861a7f216de43b34d846c) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -7242,7 +7242,7 @@ ROM_START( spf2tu )
ROM_LOAD16_WORD_SWAP( "pzf.04", 0x080000, 0x80000, CRC(b80649e2) SHA1(5bfccd656aea7ff82e9a20bb5856f4ab99b5a007) )
ROM_REGION( 0xC00000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "pzf.14m", 0x800000, 0x100000, CRC(2d4881cb) SHA1(fd3baa183c25bed153b19c251980e2fb761600e2) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.16m", 0x800002, 0x100000, CRC(4b0fd1be) SHA1(377aafdcdb7a866b1c8487670e3598d8197976e4) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.18m", 0x800004, 0x100000, CRC(e43aac33) SHA1(d041e0688c3807d3363861a7f216de43b34d846c) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -7267,7 +7267,7 @@ ROM_START( spf2xj )
ROM_LOAD16_WORD_SWAP( "pzf.04", 0x080000, 0x80000, CRC(b80649e2) SHA1(5bfccd656aea7ff82e9a20bb5856f4ab99b5a007) )
ROM_REGION( 0xC00000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "pzf.14m", 0x800000, 0x100000, CRC(2d4881cb) SHA1(fd3baa183c25bed153b19c251980e2fb761600e2) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.16m", 0x800002, 0x100000, CRC(4b0fd1be) SHA1(377aafdcdb7a866b1c8487670e3598d8197976e4) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.18m", 0x800004, 0x100000, CRC(e43aac33) SHA1(d041e0688c3807d3363861a7f216de43b34d846c) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -7291,7 +7291,7 @@ ROM_START( spf2ta )
ROM_LOAD16_WORD_SWAP( "pzf.04", 0x080000, 0x80000, CRC(b80649e2) SHA1(5bfccd656aea7ff82e9a20bb5856f4ab99b5a007) )
ROM_REGION( 0xC00000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "pzf.14m", 0x800000, 0x100000, CRC(2d4881cb) SHA1(fd3baa183c25bed153b19c251980e2fb761600e2) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.16m", 0x800002, 0x100000, CRC(4b0fd1be) SHA1(377aafdcdb7a866b1c8487670e3598d8197976e4) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.18m", 0x800004, 0x100000, CRC(e43aac33) SHA1(d041e0688c3807d3363861a7f216de43b34d846c) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -7315,7 +7315,7 @@ ROM_START( spf2th )
ROM_LOAD16_WORD_SWAP( "pzf.04", 0x080000, 0x80000, CRC(b80649e2) SHA1(5bfccd656aea7ff82e9a20bb5856f4ab99b5a007) )
ROM_REGION( 0xC00000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "pzf.14m", 0x800000, 0x100000, CRC(2d4881cb) SHA1(fd3baa183c25bed153b19c251980e2fb761600e2) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.16m", 0x800002, 0x100000, CRC(4b0fd1be) SHA1(377aafdcdb7a866b1c8487670e3598d8197976e4) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.18m", 0x800004, 0x100000, CRC(e43aac33) SHA1(d041e0688c3807d3363861a7f216de43b34d846c) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9564,7 +9564,7 @@ ROM_START( 1944d )
ROM_LOAD16_WORD_SWAP( "nffu.05", 0x100000, 0x80000, CRC(ea813eb7) SHA1(34e0175a5f22d08c3538369b4bfd077a7427a128) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x2000000, "gfx", 0 )
ROMX_LOAD( "nff.13m", 0x0000000, 0x400000, CRC(c9fca741) SHA1(1781d4fc18b6d6f79b7b39d9bcace750fb61a5cf) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9596,7 +9596,7 @@ ROM_START( 19xxd )
ROM_LOAD16_WORD_SWAP( "19x.07", 0x200000, 0x80000, CRC(61c0296c) SHA1(9e225beccffd14bb53a32f8c0f2aef7f331dae30) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1000000, "gfx", 0 )
ROMX_LOAD( "19x.13m", 0x0000000, 0x080000, CRC(427aeb18) SHA1(901029b5423e4bda85f592735036c06b7d426680) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9658,7 +9658,7 @@ ROM_START( avspd )
ROM_LOAD16_WORD_SWAP( "avpd.06", 0x180000, 0x80000, CRC(63094539) SHA1(f1b776cf4334fa7fa1ee0e5ce81a5996b930996b) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1000000, "gfx", 0 )
ROMX_LOAD( "avp.13m", 0x0000000, 0x200000, CRC(8f8b5ae4) SHA1(457ce959aa5db3a003de7dda2b3799b2f1ae279b) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9692,7 +9692,7 @@ ROM_START( batcird )
ROM_LOAD16_WORD_SWAP( "btc.09", 0x300000, 0x80000, CRC(1203db08) SHA1(fdbea14618b277132f9e010ef36c134a8ea42162) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1000000, "gfx", 0 )
ROMX_LOAD( "btc.13m", 0x000000, 0x400000, CRC(dc705bad) SHA1(96e37147674bf9cd21c770897da59daac25d921a) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9721,7 +9721,7 @@ ROM_START( ddtodd )
ROM_LOAD16_WORD_SWAP( "dadd.07a", 0x200000, 0x80000, CRC(0f0df6cc) SHA1(5da5f989ed71faf5e2950fdf9650d94918616ae4) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0xc00000, "gfx", 0 )
ROMX_LOAD( "dad.13m", 0x000000, 0x200000, CRC(da3cb7d6) SHA1(d59bb53d5f32889eb6eb7f8b1c8781948c97283d) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9756,7 +9756,7 @@ ROM_START( ddsomud )
ROM_LOAD16_WORD_SWAP( "dd2d.10", 0x380000, 0x80000, CRC(0c172f8f) SHA1(4f0ad9ab401f9f2d7d8f605a5ef78add4f4ced38) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1800000, "gfx", 0 )
ROMX_LOAD( "dd2.13m", 0x0000000, 0x400000, CRC(a46b4e6e) SHA1(fb90f42868c581c481b4ceff9f692753fb186b30) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9815,7 +9815,7 @@ ROM_START( gigawingjd )
ROM_LOAD16_WORD_SWAP( "ggwjd.05a", 0x100000, 0x80000, CRC(1c5bc4e7) SHA1(7f338cb45686b24b9136dd1e575fd842f9fd0b05) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1000000, "gfx", 0 )
ROMX_LOAD( "ggw.13m", 0x000000, 0x400000, CRC(105530a4) SHA1(3be06c032985ea6bd3805d73a407bf748385087b) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9841,7 +9841,7 @@ ROM_START( gigawingd )
ROM_LOAD16_WORD_SWAP( "ggw_d.05", 0x100000, 0x80000, CRC(722d0042) SHA1(8587e42d4781c503bc8871b88d3f85e21659c50e) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1000000, "gfx", 0 )
ROMX_LOAD( "ggw.13m", 0x000000, 0x400000, CRC(105530a4) SHA1(3be06c032985ea6bd3805d73a407bf748385087b) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9872,7 +9872,7 @@ ROM_START( hsf2d )
ROM_LOAD16_WORD_SWAP( "hs2.10", 0x380000, 0x80000, CRC(20d0f9e4) SHA1(80a5eeef9472e327b0d4ee26434bad109a9434ea) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x2000000, "gfx", 0 )
ROMX_LOAD( "hs2.13m", 0x0000000, 0x800000, CRC(a6ecab17) SHA1(6749a4c8dc81f4b10f910c31c82cf6674e2a44eb) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9898,10 +9898,10 @@ ROM_START( megamn2d )
ROM_LOAD16_WORD_SWAP( "rm2.05", 0x100000, 0x80000, CRC(02ee9efc) SHA1(1b80c40389b51a03b930051f232630616c12e6c5) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "rm2.14m", 0x800000, 0x200000, CRC(9b1f00b4) SHA1(c1c5c2d9d00121425ae6598444d704f420ef4eef) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.16m", 0x800002, 0x200000, CRC(c2bb0c24) SHA1(38724c49d9db49765a4ed9bc2dc8f57cec45ec7c) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "rm2.18m", 0x800004, 0x200000, CRC(12257251) SHA1(20cb58afda0e6200991277817485340a6a41ae2b) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9931,7 +9931,7 @@ ROM_START( mvscud )
ROM_LOAD16_WORD_SWAP( "mvc.10", 0x380000, 0x80000, CRC(0fdd1e26) SHA1(5fa684d823b4f4eec61ed9e9b8938af5272ae1ed) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x2000000, "gfx", 0 )
ROMX_LOAD( "mvc.13m", 0x0000000, 0x400000, CRC(fa5f74bc) SHA1(79a619248938a85ce4f7794a704647b9cf564fbc) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -9967,7 +9967,7 @@ ROM_START( nwarrud )
ROM_LOAD16_WORD_SWAP( "vphud.10b", 0x380000, 0x80000, CRC(9619adad) SHA1(abbbe28659c031f34be23a38950d9b56f7f7ca86) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x2000000, "gfx", 0 )
ROMX_LOAD( "vph.13m", 0x0000000, 0x400000, CRC(c51baf99) SHA1(2fb6642908e542e404391eb17392f8270e87bf48) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10001,7 +10001,7 @@ ROM_START( ringdstd )
ROM_LOAD16_WORD_SWAP( "smb.08", 0x280000, 0x80000, CRC(f931b76b) SHA1(0b7e8d1278dcba89f0063bd09cda96d6ae1bc282) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1200000, "gfx", 0 )
ROMX_LOAD( "smb.13m", 0x0000000, 0x200000, CRC(d9b2d1de) SHA1(e8658983070dadcd1300a680a42c8431579e2b4f) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10037,10 +10037,10 @@ ROM_START( sfad )
ROM_LOAD16_WORD_SWAP( "sfz.06", 0x180000, 0x80000, CRC(806e8f38) SHA1(b6d6912aa8f2f590335d7ff9a8214648e7131ebb) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "sfz.14m", 0x800000, 0x200000, CRC(90fefdb3) SHA1(5eb28c8de57acfeaefebdd01509c7d9ba5244705) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.16m", 0x800002, 0x200000, CRC(5354c948) SHA1(07588f1ba6addc04fef3274c971174aaf3e632ab) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "sfz.18m", 0x800004, 0x200000, CRC(41a1e790) SHA1(ce25dad542308691dbe9606b26279bbd59ea4b81) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10101,7 +10101,7 @@ ROM_START( sfz2ald )
ROM_LOAD16_WORD_SWAP( "szaa.08", 0x280000, 0x80000, CRC(6eb6d412) SHA1(c858fec9c1dfea70dfcca629c1c24306f8ae6d81) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x1400000, "gfx", 0 )
ROMX_LOAD( "sz2.13m", 0x0000000, 0x400000, CRC(4d1f1f22) SHA1(659fb4305bcf0cbbbbec97ede6e68a8323b13308) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10137,7 +10137,7 @@ ROM_START( sfa3ud )
ROM_LOAD16_WORD_SWAP( "sz3.10b", 0x380000, 0x80000, CRC(deb2ff52) SHA1(0aa4722aad68a04164946c78bf05752f947b4322) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x2000000, "gfx", 0 )
ROMX_LOAD( "sz3.13m", 0x0000000, 0x400000, CRC(0f7a60d9) SHA1(c69e0ee22537312909dacc86d2e4be319d54e426) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10167,10 +10167,10 @@ ROM_START( spf2xjd )
ROM_LOAD16_WORD_SWAP( "pzf.04", 0x080000, 0x80000, CRC(b80649e2) SHA1(5bfccd656aea7ff82e9a20bb5856f4ab99b5a007) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0xC00000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "pzf.14m", 0x800000, 0x100000, CRC(2d4881cb) SHA1(fd3baa183c25bed153b19c251980e2fb761600e2) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.16m", 0x800002, 0x100000, CRC(4b0fd1be) SHA1(377aafdcdb7a866b1c8487670e3598d8197976e4) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.18m", 0x800004, 0x100000, CRC(e43aac33) SHA1(d041e0688c3807d3363861a7f216de43b34d846c) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10200,7 +10200,7 @@ ROM_START( vsavd )
ROM_LOAD16_WORD_SWAP( "vm3.10b", 0x380000, 0x80000, CRC(fffbb5b8) SHA1(38aecb820bd1cbd17287848c3ffb013e1d464ddf) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x2000000, "gfx", 0 )
ROMX_LOAD( "vm3.13m", 0x0000000, 0x400000, CRC(fd8a11eb) SHA1(21b9773959e17976ff46b75a6a405042836b2c5f) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10236,7 +10236,7 @@ ROM_START( xmcotar1d )
ROM_LOAD16_WORD_SWAP( "xmn.10a", 0x380000, 0x80000, CRC(53c0eab9) SHA1(e3b1ec1fd517735f7801cfebb257c43185c6d3fb) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x2000000, "gfx", 0 )
ROMX_LOAD( "xmn.13m", 0x0000000, 0x400000, CRC(bf4df073) SHA1(4d2740c3a827f0ec2cf75ad99c65e393c6a11c23) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10273,7 +10273,7 @@ ROM_START( xmvsfu1d )
ROM_LOAD16_WORD_SWAP( "xvs.09", 0x300000, 0x80000, CRC(9641f36b) SHA1(dcba3482d1ba37ccfb30d402793ee063c6621aed) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x2000000, "gfx", 0 )
ROMX_LOAD( "xvs.13m", 0x0000000, 0x400000, CRC(f6684efd) SHA1(c0a2f3a9e82ab8b084a500aec71ac633e947328c) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10740,7 +10740,7 @@ ROM_START( csclub1d )
ROM_LOAD16_WORD_SWAP( "csc_d.07", 0x200000, 0x80000, CRC(77478e25) SHA1(d2648a8d57a156c5a0416007dedb4c65af8403d5) )
ROM_REGION( 0x1000000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "csc.73", 0x800000, 0x080000, CRC(335f07c3) SHA1(44e0385120e2c81fd1072e19b7e3ff05d42be226) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.74", 0xa00000, 0x080000, CRC(ab215357) SHA1(c2600b5ba62a570f8a32de9c06f93ea8ae6cd854) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "csc.75", 0xc00000, 0x080000, CRC(a2367381) SHA1(49d562be42c10cdf4e55e3b76c388f0b0121a967) , ROM_GROUPWORD | ROM_SKIP(6) )
@@ -10880,10 +10880,10 @@ ROM_START( spf2td )
ROM_LOAD16_WORD_SWAP( "pzf.04", 0x080000, 0x80000, CRC(b80649e2) SHA1(5bfccd656aea7ff82e9a20bb5856f4ab99b5a007) )
ROM_REGION16_BE( CODE_SIZE, "user1", 0 )
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0xC00000, "gfx", 0 )
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROMX_LOAD( "pzf.14m", 0x800000, 0x100000, CRC(2d4881cb) SHA1(fd3baa183c25bed153b19c251980e2fb761600e2) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.16m", 0x800002, 0x100000, CRC(4b0fd1be) SHA1(377aafdcdb7a866b1c8487670e3598d8197976e4) , ROM_GROUPWORD | ROM_SKIP(6) )
ROMX_LOAD( "pzf.18m", 0x800004, 0x100000, CRC(e43aac33) SHA1(d041e0688c3807d3363861a7f216de43b34d846c) , ROM_GROUPWORD | ROM_SKIP(6) )
diff --git a/src/mame/drivers/cps3.cpp b/src/mame/drivers/cps3.cpp
index 0ceb465acb9..aeb038e8199 100644
--- a/src/mame/drivers/cps3.cpp
+++ b/src/mame/drivers/cps3.cpp
@@ -1003,7 +1003,7 @@ void cps3_state::cps3_draw_tilemapsprite_line(int tmnum, int drawline, bitmap_rg
if (!bpp) m_gfxdecode->gfx(1)->set_granularity(256);
else m_gfxdecode->gfx(1)->set_granularity(64);
- cps3_drawgfxzoom(bitmap,clip,m_gfxdecode->gfx(1),tileno,colour,xflip,yflip,(x*16)-scrollx%16,drawline-tilesubline,CPS3_TRANSPARENCY_PEN_INDEX,0, 0x10000, 0x10000, NULL, 0);
+ cps3_drawgfxzoom(bitmap,clip,m_gfxdecode->gfx(1),tileno,colour,xflip,yflip,(x*16)-scrollx%16,drawline-tilesubline,CPS3_TRANSPARENCY_PEN_INDEX,0, 0x10000, 0x10000, nullptr, 0);
}
}
}
@@ -1243,11 +1243,11 @@ UINT32 cps3_state::screen_update_cps3(screen_device &screen, bitmap_rgb32 &bitma
if (global_alpha || alpha)
{
- cps3_drawgfxzoom(m_renderbuffer_bitmap,m_renderbuffer_clip,m_gfxdecode->gfx(1),realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX_BLEND,0,xinc,yinc, NULL, 0);
+ cps3_drawgfxzoom(m_renderbuffer_bitmap,m_renderbuffer_clip,m_gfxdecode->gfx(1),realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX_BLEND,0,xinc,yinc, nullptr, 0);
}
else
{
- cps3_drawgfxzoom(m_renderbuffer_bitmap,m_renderbuffer_clip,m_gfxdecode->gfx(1),realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX,0,xinc,yinc, NULL, 0);
+ cps3_drawgfxzoom(m_renderbuffer_bitmap,m_renderbuffer_clip,m_gfxdecode->gfx(1),realtileno,actualpal,0^flipx,0^flipy,current_xpos,current_ypos,CPS3_TRANSPARENCY_PEN_INDEX,0,xinc,yinc, nullptr, 0);
}
count++;
}
@@ -1313,7 +1313,7 @@ UINT32 cps3_state::screen_update_cps3(screen_device &screen, bitmap_rgb32 &bitma
pal += m_ss_pal_base << 5;
tile+=0x200;
- cps3_drawgfxzoom(bitmap, cliprect, m_gfxdecode->gfx(0),tile,pal,flipx,flipy,x*8,y*8,CPS3_TRANSPARENCY_PEN,0,0x10000,0x10000,NULL,0);
+ cps3_drawgfxzoom(bitmap, cliprect, m_gfxdecode->gfx(0),tile,pal,flipx,flipy,x*8,y*8,CPS3_TRANSPARENCY_PEN,0,0x10000,0x10000,nullptr,0);
count++;
}
}
@@ -1403,7 +1403,7 @@ READ32_MEMBER(cps3_state::cps3_gfxflash_r)
fujitsu_29f016a_device *chip0 = m_simm[2 + m_cram_gfxflash_bank/8][(m_cram_gfxflash_bank % 8) & ~1];
fujitsu_29f016a_device *chip1 = m_simm[2 + m_cram_gfxflash_bank/8][(m_cram_gfxflash_bank % 8) | 1];
- if (chip0 == NULL || chip1 == NULL)
+ if (chip0 == nullptr || chip1 == nullptr)
return 0xffffffff;
if(DEBUG_PRINTF) printf("gfxflash_r\n");
@@ -1441,7 +1441,7 @@ WRITE32_MEMBER(cps3_state::cps3_gfxflash_w)
fujitsu_29f016a_device *chip0 = m_simm[2 + m_cram_gfxflash_bank/8][(m_cram_gfxflash_bank % 8) & ~1];
fujitsu_29f016a_device *chip1 = m_simm[2 + m_cram_gfxflash_bank/8][(m_cram_gfxflash_bank % 8) | 1];
- if (chip0 == NULL || chip1 == NULL)
+ if (chip0 == nullptr || chip1 == nullptr)
return;
// if(DEBUG_PRINTF) printf("cps3_gfxflash_w %08x %08x %08x\n", offset *2, data, mem_mask);
@@ -1496,7 +1496,7 @@ UINT32 cps3_state::cps3_flashmain_r(address_space &space, int which, UINT32 offs
{
UINT32 result = 0;
- if (m_simm[which][0] == NULL || m_simm[which][1] == NULL || m_simm[which][2] == NULL || m_simm[which][3] == NULL)
+ if (m_simm[which][0] == nullptr || m_simm[which][1] == nullptr || m_simm[which][2] == nullptr || m_simm[which][3] == nullptr)
return 0xffffffff;
if (ACCESSING_BITS_24_31) // Flash 1
@@ -1551,7 +1551,7 @@ void cps3_state::cps3_flashmain_w(int which, UINT32 offset, UINT32 data, UINT32
{
int command;
- if (m_simm[which][0] == NULL || m_simm[which][1] == NULL || m_simm[which][2] == NULL || m_simm[which][3] == NULL)
+ if (m_simm[which][0] == nullptr || m_simm[which][1] == nullptr || m_simm[which][2] == nullptr || m_simm[which][3] == nullptr)
return;
if (ACCESSING_BITS_24_31) // Flash 1
@@ -2324,7 +2324,7 @@ void cps3_state::copy_from_nvram()
romdata += 0x800000/4;
romdata2 += 0x800000/4;
- if (m_simm[1][0] != NULL)
+ if (m_simm[1][0] != nullptr)
for (i=0;i<0x800000;i+=4)
{
UINT32 data;
@@ -2349,9 +2349,9 @@ void cps3_state::copy_from_nvram()
fujitsu_29f016a_device *flash0 = m_simm[2 + flashnum/8][flashnum % 8 + 0];
fujitsu_29f016a_device *flash1 = m_simm[2 + flashnum/8][flashnum % 8 + 1];
- if (flash0 == NULL || flash1 == NULL)
+ if (flash0 == nullptr || flash1 == nullptr)
continue;
- if (flash0 != NULL && flash1 != NULL)
+ if (flash0 != nullptr && flash1 != nullptr)
{
for (i=0;i<0x200000;i+=2)
{
diff --git a/src/mame/drivers/crvision.cpp b/src/mame/drivers/crvision.cpp
index f87d197ab50..a9246a76f70 100644
--- a/src/mame/drivers/crvision.cpp
+++ b/src/mame/drivers/crvision.cpp
@@ -765,7 +765,7 @@ static MACHINE_CONFIG_START( creativision, crvision_state )
MCFG_SOUND_ROUTE(1, "mono", 0.25)
// cartridge
- MCFG_CRVISION_CARTRIDGE_ADD("cartslot", crvision_cart, NULL)
+ MCFG_CRVISION_CARTRIDGE_ADD("cartslot", crvision_cart, nullptr)
// internal ram
MCFG_RAM_ADD(RAM_TAG)
@@ -847,7 +847,7 @@ static MACHINE_CONFIG_START( lasr2001, laser2001_state )
MCFG_SOUND_ROUTE(1, "mono", 0.25)
// cartridge
- MCFG_CRVISION_CARTRIDGE_ADD("cartslot", crvision_cart, NULL)
+ MCFG_CRVISION_CARTRIDGE_ADD("cartslot", crvision_cart, nullptr)
// internal ram
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mame/drivers/csplayh5.cpp b/src/mame/drivers/csplayh5.cpp
index 0d016cea4d0..2573efcd969 100644
--- a/src/mame/drivers/csplayh5.cpp
+++ b/src/mame/drivers/csplayh5.cpp
@@ -446,7 +446,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(csplayh5_state::csplayh5_irq)
static const z80_daisy_config daisy_chain_sound[] =
{
TMPZ84C011_DAISY_INTERNAL,
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_START( csplayh5, csplayh5_state )
diff --git a/src/mame/drivers/ct486.cpp b/src/mame/drivers/ct486.cpp
index 243d93b0386..b8d89dafdce 100644
--- a/src/mame/drivers/ct486.cpp
+++ b/src/mame/drivers/ct486.cpp
@@ -159,10 +159,10 @@ static MACHINE_CONFIG_START( ct486, ct486_state )
MCFG_ISA16_SLOT_ADD("isabus", "board3", pc_isa16_cards, "ide", true)
MCFG_ISA16_SLOT_ADD("isabus", "board4", pc_isa16_cards, "lpt", true)
MCFG_ISA16_SLOT_ADD("isabus", "isa1", pc_isa16_cards, "svga_et4k", false)
- MCFG_ISA16_SLOT_ADD("isabus", "isa2", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus", "isa3", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus", "isa4", pc_isa16_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD("isabus", "isa5", pc_isa16_cards, NULL, false)
+ MCFG_ISA16_SLOT_ADD("isabus", "isa2", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus", "isa3", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus", "isa4", pc_isa16_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD("isabus", "isa5", pc_isa16_cards, nullptr, false)
// sound hardware
MCFG_SPEAKER_STANDARD_MONO("mono")
diff --git a/src/mame/drivers/cubo.cpp b/src/mame/drivers/cubo.cpp
index 5038877b6c7..42fa0541bf4 100644
--- a/src/mame/drivers/cubo.cpp
+++ b/src/mame/drivers/cubo.cpp
@@ -441,7 +441,7 @@ void cubo_state::potgo_w(UINT16 data)
{
int i;
- if (m_input_hack != NULL)
+ if (m_input_hack != nullptr)
(this->*m_input_hack)();
m_potgo_value = m_potgo_value & 0x5500;
@@ -1105,7 +1105,7 @@ DRIVER_INIT_MEMBER( cubo_state, cubo )
{
m_agnus_id = ALICE_PAL_NEW;
m_denise_id = LISA;
- m_input_hack = NULL;
+ m_input_hack = nullptr;
}
diff --git a/src/mame/drivers/cvs.cpp b/src/mame/drivers/cvs.cpp
index 7c9ed5a81d3..4c013254dfa 100644
--- a/src/mame/drivers/cvs.cpp
+++ b/src/mame/drivers/cvs.cpp
@@ -291,7 +291,7 @@ TIMER_CALLBACK_MEMBER(cvs_state::cvs_393hz_timer_cb)
m_cvs_393hz_clock = !m_cvs_393hz_clock;
/* quasar.c games use this timer but have no dac3! */
- if (m_dac3 != NULL)
+ if (m_dac3 != nullptr)
{
if (m_dac3_state[2])
m_dac3->write_unsigned8(m_cvs_393hz_clock * 0xff);
@@ -924,7 +924,7 @@ static const gfx_layout charlayout =
static GFXDECODE_START( cvs )
GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 256+4 )
- GFXDECODE_ENTRY( NULL, 0x0000, charlayout, 0, 256+4 )
+ GFXDECODE_ENTRY( nullptr, 0x0000, charlayout, 0, 256+4 )
GFXDECODE_END
@@ -938,7 +938,7 @@ GFXDECODE_END
MACHINE_START_MEMBER(cvs_state,cvs)
{
/* allocate memory */
- if (m_gfxdecode->gfx(1) != NULL)
+ if (m_gfxdecode->gfx(1) != nullptr)
m_gfxdecode->gfx(1)->set_source(m_character_ram);
start_393hz_timer();
diff --git a/src/mame/drivers/cyberbal.cpp b/src/mame/drivers/cyberbal.cpp
index 138bdb6d9b6..0a1a01a4ebc 100644
--- a/src/mame/drivers/cyberbal.cpp
+++ b/src/mame/drivers/cyberbal.cpp
@@ -35,7 +35,7 @@
void cyberbal_state::update_interrupts()
{
- if (m_extracpu != NULL)
+ if (m_extracpu != nullptr)
{
m_maincpu->set_input_line(1, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
m_extracpu->set_input_line(1, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
diff --git a/src/mame/drivers/czk80.cpp b/src/mame/drivers/czk80.cpp
index 913d07d693f..1b0415d9b4f 100644
--- a/src/mame/drivers/czk80.cpp
+++ b/src/mame/drivers/czk80.cpp
@@ -133,7 +133,7 @@ static const z80_daisy_config daisy_chain[] =
{ "z80pio" },
{ "z80dart" },
{ "z80ctc" },
- { NULL }
+ { nullptr }
};
/* Z80-CTC Interface */
diff --git a/src/mame/drivers/dacholer.cpp b/src/mame/drivers/dacholer.cpp
index 665d96b67d4..301e6ac05d8 100644
--- a/src/mame/drivers/dacholer.cpp
+++ b/src/mame/drivers/dacholer.cpp
@@ -615,7 +615,7 @@ PALETTE_INIT_MEMBER(dacholer_state, dacholer)
compute_resistor_weights(0, 255, -1.0,
3, resistances_rg, weights_rg, 0, 0,
2, resistances_b, weights_b, 0, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
for (i = 0;i < palette.entries(); i++)
{
diff --git a/src/mame/drivers/dai3wksi.cpp b/src/mame/drivers/dai3wksi.cpp
index 9ef942150e4..700262ee9d4 100644
--- a/src/mame/drivers/dai3wksi.cpp
+++ b/src/mame/drivers/dai3wksi.cpp
@@ -274,7 +274,7 @@ static const char *const dai3wksi_sample_names[] =
"5",
"6",
"6-2",
- 0
+ nullptr
};
diff --git a/src/mame/drivers/darius.cpp b/src/mame/drivers/darius.cpp
index abe9cbf84fd..25720a28a2d 100644
--- a/src/mame/drivers/darius.cpp
+++ b/src/mame/drivers/darius.cpp
@@ -295,9 +295,9 @@ void darius_state::update_fm0( )
int left = ( m_pan[0] * m_vol[6]) >> 8;
int right = ((0xff - m_pan[0]) * m_vol[6]) >> 8;
- if (m_filter0_3l != NULL)
+ if (m_filter0_3l != nullptr)
m_filter0_3l->flt_volume_set_volume(left / 100.0);
- if (m_filter0_3r != NULL)
+ if (m_filter0_3r != nullptr)
m_filter0_3r->flt_volume_set_volume(right / 100.0); /* FM #0 */
}
@@ -306,15 +306,15 @@ void darius_state::update_fm1( )
int left = ( m_pan[1] * m_vol[7]) >> 8;
int right = ((0xff - m_pan[1]) * m_vol[7]) >> 8;
- if (m_filter1_3l != NULL)
+ if (m_filter1_3l != nullptr)
m_filter1_3l->flt_volume_set_volume(left / 100.0);
- if (m_filter1_3r != NULL)
+ if (m_filter1_3r != nullptr)
m_filter1_3r->flt_volume_set_volume(right / 100.0); /* FM #1 */
}
void darius_state::update_psg0( int port )
{
- filter_volume_device *lvol = NULL, *rvol = NULL;
+ filter_volume_device *lvol = nullptr, *rvol = nullptr;
int left, right;
switch (port)
@@ -328,15 +328,15 @@ void darius_state::update_psg0( int port )
left = ( m_pan[2] * m_vol[port]) >> 8;
right = ((0xff - m_pan[2]) * m_vol[port]) >> 8;
- if (lvol != NULL)
+ if (lvol != nullptr)
lvol->flt_volume_set_volume(left / 100.0);
- if (rvol != NULL)
+ if (rvol != nullptr)
rvol->flt_volume_set_volume(right / 100.0);
}
void darius_state::update_psg1( int port )
{
- filter_volume_device *lvol = NULL, *rvol = NULL;
+ filter_volume_device *lvol = nullptr, *rvol = nullptr;
int left, right;
switch (port)
@@ -350,9 +350,9 @@ void darius_state::update_psg1( int port )
left = ( m_pan[3] * m_vol[port + 3]) >> 8;
right = ((0xff - m_pan[3]) * m_vol[port + 3]) >> 8;
- if (lvol != NULL)
+ if (lvol != nullptr)
lvol->flt_volume_set_volume(left / 100.0);
- if (rvol != NULL)
+ if (rvol != nullptr)
rvol->flt_volume_set_volume(right / 100.0);
}
@@ -361,9 +361,9 @@ void darius_state::update_da( )
int left = m_def_vol[(m_pan[4] >> 4) & 0x0f];
int right = m_def_vol[(m_pan[4] >> 0) & 0x0f];
- if (m_msm5205_l != NULL)
+ if (m_msm5205_l != nullptr)
m_msm5205_l->flt_volume_set_volume(left / 100.0);
- if (m_msm5205_r != NULL)
+ if (m_msm5205_r != nullptr)
m_msm5205_r->flt_volume_set_volume(right / 100.0);
}
@@ -729,11 +729,11 @@ void darius_state::machine_reset()
machine().sound().system_enable(true); /* mixer enabled */
- for (int i = 0; i < DARIUS_VOL_MAX; i++)
- m_vol[i] = 0x00; /* min volume */
+ for (auto & elem : m_vol)
+ elem = 0x00; /* min volume */
- for (int i = 0; i < DARIUS_PAN_MAX; i++)
- m_pan[i] = 0x80; /* center */
+ for (auto & elem : m_pan)
+ elem = 0x80; /* center */
for (int i = 0; i < 0x10; i++)
{
diff --git a/src/mame/drivers/dcon.cpp b/src/mame/drivers/dcon.cpp
index c0b9061f1ca..bae5b7e0d92 100644
--- a/src/mame/drivers/dcon.cpp
+++ b/src/mame/drivers/dcon.cpp
@@ -331,7 +331,7 @@ ROM_START( dcon )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "fmsnd", 0x000000, 0x08000, CRC(50450faa) SHA1(d4add7d357951b51d53ed7f143ece7f3bde7f4cb) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "fix0", 0x000000, 0x10000, CRC(ab30061f) SHA1(14dba37fef7bd13c827fd542b24cc593dcdc9f99) ) /* chars */
@@ -366,7 +366,7 @@ ROM_START( sdgndmps )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "911-a05.010", 0x00000, 0x08000, CRC(90455406) SHA1(dd2c5b96ac4b51251a3d34d97cc9af360afaa38c) )
ROM_CONTINUE( 0x10000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x18000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x18000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "911-a08.66", 0x000000, 0x10000, CRC(e7e04823) SHA1(d9b1ace5cd8218d5a4767cf5adbc267dce7c0668) ) /* chars */
diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp
index e1c0ec92d2b..54df62b7ec4 100644
--- a/src/mame/drivers/ddenlovr.cpp
+++ b/src/mame/drivers/ddenlovr.cpp
@@ -11614,13 +11614,13 @@ ROM_START( kotbinsp )
ROM_LOAD16_BYTE( "909033.6c", 0x200001, 0x080000, CRC(9388b85d) SHA1(a35fe0b585cba256bb5575f7b539b33dd0ca3aa0) )
ROM_FILL( 0x300000, 0x100000, 0xff )
// mirror the whole address space (25 bits)
- ROM_COPY( "blitter", 0, 0x0400000, 0x400000 )
- ROM_COPY( "blitter", 0, 0x0800000, 0x400000 )
- ROM_COPY( "blitter", 0, 0x0c00000, 0x400000 )
- ROM_COPY( "blitter", 0, 0x1000000, 0x400000 )
- ROM_COPY( "blitter", 0, 0x1400000, 0x400000 )
- ROM_COPY( "blitter", 0, 0x1800000, 0x400000 )
- ROM_COPY( "blitter", 0, 0x1c00000, 0x400000 )
+ ROM_COPY( "blitter", nullptr, 0x0400000, 0x400000 )
+ ROM_COPY( "blitter", nullptr, 0x0800000, 0x400000 )
+ ROM_COPY( "blitter", nullptr, 0x0c00000, 0x400000 )
+ ROM_COPY( "blitter", nullptr, 0x1000000, 0x400000 )
+ ROM_COPY( "blitter", nullptr, 0x1400000, 0x400000 )
+ ROM_COPY( "blitter", nullptr, 0x1800000, 0x400000 )
+ ROM_COPY( "blitter", nullptr, 0x1c00000, 0x400000 )
ROM_REGION( 0x80000, "oki", 0 ) /* Samples */
ROM_LOAD( "909031.1c", 0x00000, 0x80000, CRC(9f20a531) SHA1(1b43edd70c4c958cbbcd6c051ea6ba5e6fb41e77) )
diff --git a/src/mame/drivers/dec0.cpp b/src/mame/drivers/dec0.cpp
index 4bb0c6ad27d..4a46df27266 100644
--- a/src/mame/drivers/dec0.cpp
+++ b/src/mame/drivers/dec0.cpp
@@ -2258,7 +2258,7 @@ ROM_START( automat )
/* copy out the chars */
ROM_REGION( 0x20000, "gfx1", ROMREGION_INVERT ) /* chars */
- ROM_COPY( "gfxload1", 0x00000, 0x00000, 0x8000 )
+ ROM_COPY( "gfxload1", nullptr, 0x00000, 0x8000 )
ROM_COPY( "gfxload1", 0x10000, 0x08000, 0x8000 )
ROM_COPY( "gfxload1", 0x20000, 0x10000, 0x8000 )
ROM_COPY( "gfxload1", 0x30000, 0x18000, 0x8000 )
@@ -2706,7 +2706,7 @@ ROM_START( secretab )
ROM_LOAD( "sa_14.bin", 0x30000, 0x10000,CRC(3dac9128) SHA1(f3a2068e90973c1f04f1bbaa209111e3f9669ee0) )
ROM_REGION( 0x20000, "gfx1", ROMREGION_INVERT ) /* chars */
- ROM_COPY( "charset", 0x00000, 0x00000, 0x8000 )
+ ROM_COPY( "charset", nullptr, 0x00000, 0x8000 )
ROM_COPY( "charset", 0x10000, 0x08000, 0x8000 )
ROM_COPY( "charset", 0x20000, 0x10000, 0x8000 )
ROM_COPY( "charset", 0x30000, 0x18000, 0x8000 )
diff --git a/src/mame/drivers/decocass.cpp b/src/mame/drivers/decocass.cpp
index 0ebd94feab6..31f18fc6083 100644
--- a/src/mame/drivers/decocass.cpp
+++ b/src/mame/drivers/decocass.cpp
@@ -680,10 +680,10 @@ static const gfx_layout objlayout =
};
static GFXDECODE_START( decocass )
- GFXDECODE_ENTRY( NULL, 0x6000, charlayout, 0, 4 ) /* char set #1 */
- GFXDECODE_ENTRY( NULL, 0x6000, spritelayout, 0, 4 ) /* sprites */
- GFXDECODE_ENTRY( NULL, 0xd000, tilelayout, 32, 2 ) /* background tiles */
- GFXDECODE_ENTRY( NULL, 0xd800, objlayout, 48, 4 ) /* object */
+ GFXDECODE_ENTRY( nullptr, 0x6000, charlayout, 0, 4 ) /* char set #1 */
+ GFXDECODE_ENTRY( nullptr, 0x6000, spritelayout, 0, 4 ) /* sprites */
+ GFXDECODE_ENTRY( nullptr, 0xd000, tilelayout, 32, 2 ) /* background tiles */
+ GFXDECODE_ENTRY( nullptr, 0xd800, objlayout, 48, 4 ) /* object */
GFXDECODE_END
PALETTE_INIT_MEMBER(decocass_state, decocass)
diff --git a/src/mame/drivers/dectalk.cpp b/src/mame/drivers/dectalk.cpp
index 506895e05ed..2aa828d6a25 100644
--- a/src/mame/drivers/dectalk.cpp
+++ b/src/mame/drivers/dectalk.cpp
@@ -982,9 +982,9 @@ ROM_START( dectalk )
// TODO: load this as default if the nvram file is missing, OR get the setup page working enough that it can be saved properly to the chip from an NVR FAULT state!
// NOTE: this nvram image is ONLY VALID for v2.0; v1.8 expects a different image.
ROM_REGION(0x100,"nvram", 0) // default nvram image is at 0x1A7AE in main rom, read lsn first so 0x0005 in rom becomes 05 00 00 00 etc for all words of main rom
- ROM_FILL(0x00, 0xff, 0x00) // blank it first;
+ ROM_FILL(0x00, 0xff, nullptr) // blank it first;
ROM_FILL(0x00, 0x01, 0x05)
- ROM_FILL(0x04, 0x01, 0x00)
+ ROM_FILL(0x04, 0x01, nullptr)
ROM_FILL(0x08, 0x01, 0x06)
ROM_FILL(0x0C, 0x01, 0x01)
ROM_FILL(0x10, 0x01, 0x06)
@@ -993,7 +993,7 @@ ROM_START( dectalk )
ROM_FILL(0x1C, 0x01, 0x02)
ROM_FILL(0x20, 0x01, 0x01)
ROM_FILL(0x24, 0x01, 0x01)
- ROM_FILL(0x28, 0x01, 0x00)
+ ROM_FILL(0x28, 0x01, nullptr)
ROM_FILL(0x2C, 0x01, 0x01)
ROM_FILL(0xFC, 0x01, 0x0D) // checksum, calculated some weird way which I haven't figured out yet
ROM_FILL(0xFD, 0x01, 0x02) // "
diff --git a/src/mame/drivers/deshoros.cpp b/src/mame/drivers/deshoros.cpp
index 59fd301d032..10937a5251e 100644
--- a/src/mame/drivers/deshoros.cpp
+++ b/src/mame/drivers/deshoros.cpp
@@ -235,7 +235,7 @@ static INPUT_PORTS_START( destiny )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, destiny_state, coin_inserted, (void *)0)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, destiny_state, coin_inserted, (void *)nullptr)
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CHANGED_MEMBER(DEVICE_SELF, destiny_state, coin_inserted, (void *)1)
diff --git a/src/mame/drivers/destroyr.cpp b/src/mame/drivers/destroyr.cpp
index 9501892bbc1..fc97145bc21 100644
--- a/src/mame/drivers/destroyr.cpp
+++ b/src/mame/drivers/destroyr.cpp
@@ -422,7 +422,7 @@ static const gfx_layout destroyr_major_object_layout =
},
0x0800, /* increment */
destroyr_major_object_layout_xoffset,
- NULL
+ nullptr
};
static const UINT32 destroyr_waves_layout_xoffset[64] =
@@ -447,7 +447,7 @@ static const gfx_layout destroyr_waves_layout =
{ 0x00, 0x80 },
0x04, /* increment */
destroyr_waves_layout_xoffset,
- NULL
+ nullptr
};
diff --git a/src/mame/drivers/djmain.cpp b/src/mame/drivers/djmain.cpp
index 7a8c4dad84b..aa47b3e4f02 100644
--- a/src/mame/drivers/djmain.cpp
+++ b/src/mame/drivers/djmain.cpp
@@ -1342,10 +1342,10 @@ GFXDECODE_END
void djmain_state::machine_start()
{
ide_hdd_device *hdd = m_ata->subdevice<ata_slot_device>("0")->subdevice<ide_hdd_device>("hdd");
- if (m_ata_master_password != NULL)
+ if (m_ata_master_password != nullptr)
hdd->set_master_password(m_ata_master_password);
- if (m_ata_user_password != NULL)
+ if (m_ata_user_password != nullptr)
hdd->set_user_password(m_ata_user_password);
save_item(NAME(m_sndram_bank));
@@ -1386,7 +1386,7 @@ static MACHINE_CONFIG_START( djmainj, djmain_state )
MCFG_CPU_PROGRAM_MAP(maincpu_djmainj)
MCFG_CPU_VBLANK_INT_DRIVER("screen", djmain_state, vb_interrupt)
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(djmain_state, ide_interrupt))
/* video hardware */
@@ -1967,8 +1967,8 @@ ROM_END
DRIVER_INIT_MEMBER(djmain_state,beatmania)
{
- m_ata_master_password = NULL;
- m_ata_user_password = NULL;
+ m_ata_master_password = nullptr;
+ m_ata_user_password = nullptr;
}
static const UINT8 beatmania_master_password[2 + 32] =
diff --git a/src/mame/drivers/dkong.cpp b/src/mame/drivers/dkong.cpp
index e6d81e7d2a6..c87f6bf5625 100644
--- a/src/mame/drivers/dkong.cpp
+++ b/src/mame/drivers/dkong.cpp
@@ -1891,7 +1891,7 @@ ROM_START( radarscp )
ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
ROM_LOAD( "trs2s3i", 0x0000, 0x0800, CRC(78034f14) SHA1(548b44ac69f39df6687da1c0f60968009b1e0767) )
ROM_RELOAD( 0x0800, 0x0800 )
- ROM_FILL( 0x1000, 0x0800, 0x00 )
+ ROM_FILL( 0x1000, 0x0800, nullptr )
/* socket 3J is empty */
ROM_REGION( 0x1000, "gfx1", 0 )
@@ -2998,7 +2998,7 @@ ROM_START( drakton )
ROM_REGION( 0x1800, "soundcpu", 0 ) /* sound */
ROM_LOAD( "2716.3h", 0x0000, 0x0800, CRC(3489a35b) SHA1(9ebcf4b20b212d54e6b1a6d9abbda3109298631b) ) /* dkong */
ROM_RELOAD( 0x0800, 0x0800 )
- ROM_FILL( 0x1000, 0x0800, 0x00 )
+ ROM_FILL( 0x1000, 0x0800, nullptr )
ROM_REGION( 0x1000, "gfx1", 0 )
ROM_LOAD( "2716.3n", 0x0000, 0x0800, CRC(ea0e7f9a) SHA1(a8e2b43e15281d45e414eaae98e5248bad79c41b) )
diff --git a/src/mame/drivers/dlair.cpp b/src/mame/drivers/dlair.cpp
index 3ee1592d525..54d89029efb 100644
--- a/src/mame/drivers/dlair.cpp
+++ b/src/mame/drivers/dlair.cpp
@@ -74,22 +74,22 @@ public:
void laserdisc_data_w(UINT8 data)
{
- if (m_ldv1000 != NULL) m_ldv1000->data_w(data);
- if (m_pr7820 != NULL) m_pr7820->data_w(data);
- if (m_22vp932 != NULL) m_22vp932->data_w(data);
+ if (m_ldv1000 != nullptr) m_ldv1000->data_w(data);
+ if (m_pr7820 != nullptr) m_pr7820->data_w(data);
+ if (m_22vp932 != nullptr) m_22vp932->data_w(data);
}
void laserdisc_enter_w(UINT8 data)
{
- if (m_pr7820 != NULL) m_pr7820->enter_w(data);
- if (m_22vp932 != NULL) m_22vp932->enter_w(data);
+ if (m_pr7820 != nullptr) m_pr7820->enter_w(data);
+ if (m_22vp932 != nullptr) m_22vp932->enter_w(data);
}
UINT8 laserdisc_data_r()
{
- if (m_ldv1000 != NULL) return m_ldv1000->status_r();
- if (m_pr7820 != NULL) return m_pr7820->data_r();
- if (m_22vp932 != NULL) return m_22vp932->data_r();
+ if (m_ldv1000 != nullptr) return m_ldv1000->status_r();
+ if (m_pr7820 != nullptr) return m_pr7820->data_r();
+ if (m_22vp932 != nullptr) return m_22vp932->data_r();
return 0;
}
@@ -100,14 +100,14 @@ public:
UINT8 laserdisc_status_r()
{
- if (m_ldv1000 != NULL) return m_ldv1000->status_strobe_r();
+ if (m_ldv1000 != nullptr) return m_ldv1000->status_strobe_r();
return CLEAR_LINE;
}
UINT8 laserdisc_ready_r()
{
- if (m_ldv1000 != NULL) return m_ldv1000->command_strobe_r();
- if (m_pr7820 != NULL) return m_pr7820->ready_r();
+ if (m_ldv1000 != nullptr) return m_ldv1000->command_strobe_r();
+ if (m_pr7820 != nullptr) return m_pr7820->ready_r();
return CLEAR_LINE;
}
@@ -173,7 +173,7 @@ static const z80_daisy_config dleuro_daisy_chain[] =
{
{ "sio" },
{ "ctc" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/dmv.cpp b/src/mame/drivers/dmv.cpp
index 43e2ddea4a4..dc39767c8c1 100644
--- a/src/mame/drivers/dmv.cpp
+++ b/src/mame/drivers/dmv.cpp
@@ -371,15 +371,15 @@ SLOT_INTERFACE_END
void dmv_state::ifsel_r(address_space &space, int ifsel, offs_t offset, UINT8 &data)
{
dmvcart_slot_device *slots[] = { m_slot2, m_slot2a, m_slot3, m_slot4, m_slot5, m_slot6, m_slot7, m_slot7a };
- for(int i=0; i<8; i++)
- slots[i]->io_read(space, ifsel, offset, data);
+ for(auto & slot : slots)
+ slot->io_read(space, ifsel, offset, data);
}
void dmv_state::ifsel_w(address_space &space, int ifsel, offs_t offset, UINT8 data)
{
dmvcart_slot_device *slots[] = { m_slot2, m_slot2a, m_slot3, m_slot4, m_slot5, m_slot6, m_slot7, m_slot7a };
- for(int i=0; i<8; i++)
- slots[i]->io_write(space, ifsel, offset, data);
+ for(auto & slot : slots)
+ slot->io_write(space, ifsel, offset, data);
}
WRITE8_MEMBER(dmv_state::exp_program_w)
@@ -416,8 +416,8 @@ void dmv_state::update_busint(int slot, int state)
m_busint[slot] = state;
int new_state = CLEAR_LINE;
- for (int i=0; i<8; i++)
- if (m_busint[i] != CLEAR_LINE)
+ for (auto & elem : m_busint)
+ if (elem != CLEAR_LINE)
{
new_state = ASSERT_LINE;
break;
@@ -777,34 +777,34 @@ static MACHINE_CONFIG_START( dmv, dmv_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MCFG_DEVICE_ADD("slot1", DMVCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(dmv_slot1, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(dmv_slot1, nullptr, false)
MCFG_DEVICE_ADD("slot2", DMVCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, nullptr, false)
MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint2_w))
MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, irq2_w))
MCFG_DEVICE_ADD("slot2a", DMVCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2a, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2a, nullptr, false)
MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint2a_w))
MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, irq2a_w))
MCFG_DEVICE_ADD("slot3", DMVCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, nullptr, false)
MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint3_w))
MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, irq3_w))
MCFG_DEVICE_ADD("slot4", DMVCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, nullptr, false)
MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint4_w))
MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, irq4_w))
MCFG_DEVICE_ADD("slot5", DMVCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, nullptr, false)
MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint5_w))
MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, irq5_w))
MCFG_DEVICE_ADD("slot6", DMVCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(dmv_slot2_6, nullptr, false)
MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint6_w))
MCFG_DMVCART_SLOT_OUT_IRQ_CB(WRITELINE(dmv_state, irq6_w))
MCFG_DEVICE_ADD("slot7", DMVCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(dmv_slot7, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(dmv_slot7, nullptr, false)
MCFG_DMVCART_SLOT_PROGRAM_READWRITE_CB(READ8(dmv_state, exp_program_r), WRITE8(dmv_state, exp_program_w))
MCFG_DMVCART_SLOT_OUT_THOLD_CB(WRITELINE(dmv_state, thold7_w))
MCFG_DMVCART_SLOT_OUT_INT_CB(WRITELINE(dmv_state, busint7_w))
diff --git a/src/mame/drivers/dragon.cpp b/src/mame/drivers/dragon.cpp
index 61375867d28..4495f78dcf2 100644
--- a/src/mame/drivers/dragon.cpp
+++ b/src/mame/drivers/dragon.cpp
@@ -235,7 +235,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( dgnalpha, dragon_base, dragon_alpha_state )
MCFG_RAM_DEFAULT_SIZE("64K")
// cartridge
- MCFG_COCO_CARTRIDGE_ADD(CARTRIDGE_TAG, dragon_cart, NULL)
+ MCFG_COCO_CARTRIDGE_ADD(CARTRIDGE_TAG, dragon_cart, nullptr)
MCFG_COCO_CARTRIDGE_CART_CB(WRITELINE(coco_state, cart_w))
MCFG_COCO_CARTRIDGE_NMI_CB(INPUTLINE(MAINCPU_TAG, INPUT_LINE_NMI))
MCFG_COCO_CARTRIDGE_HALT_CB(INPUTLINE(MAINCPU_TAG, INPUT_LINE_HALT))
diff --git a/src/mame/drivers/dreambal.cpp b/src/mame/drivers/dreambal.cpp
index 2f860fc31f6..bb3df8963da 100644
--- a/src/mame/drivers/dreambal.cpp
+++ b/src/mame/drivers/dreambal.cpp
@@ -80,7 +80,7 @@ UINT32 dreambal_state::screen_update_dreambal(screen_device &screen, bitmap_ind1
UINT16 flip = m_deco_tilegen1->pf_control_r(space, 0, 0xffff);
flip_screen_set(BIT(flip, 7));
- m_deco_tilegen1->pf_update(NULL, NULL);
+ m_deco_tilegen1->pf_update(nullptr, nullptr);
bitmap.fill(0, cliprect); /* not Confirmed */
screen.priority().fill(0);
diff --git a/src/mame/drivers/drtomy.cpp b/src/mame/drivers/drtomy.cpp
index 1f86b1df772..1ce7915ba99 100644
--- a/src/mame/drivers/drtomy.cpp
+++ b/src/mame/drivers/drtomy.cpp
@@ -342,13 +342,13 @@ ROM_START( drtomy )
ROM_LOAD( "14.u23", 0x00000, 0x80000, CRC(479614ec) SHA1(b6300b344422f0a64146b853411f5285eaaada28) )
ROM_REGION( 0x100000, "oki", 0 )
- ROM_COPY( "user1", 0x00000, 0x00000, 0x20000)
- ROM_COPY( "user1", 0x00000, 0x20000, 0x20000)
- ROM_COPY( "user1", 0x00000, 0x40000, 0x20000)
+ ROM_COPY( "user1", nullptr, 0x00000, 0x20000)
+ ROM_COPY( "user1", nullptr, 0x20000, 0x20000)
+ ROM_COPY( "user1", nullptr, 0x40000, 0x20000)
ROM_COPY( "user1", 0x20000, 0x60000, 0x20000)
- ROM_COPY( "user1", 0x00000, 0x80000, 0x20000)
+ ROM_COPY( "user1", nullptr, 0x80000, 0x20000)
ROM_COPY( "user1", 0x40000, 0xa0000, 0x20000)
- ROM_COPY( "user1", 0x00000, 0xc0000, 0x20000)
+ ROM_COPY( "user1", nullptr, 0xc0000, 0x20000)
ROM_COPY( "user1", 0x60000, 0xe0000, 0x20000)
ROM_END
diff --git a/src/mame/drivers/dwarfd.cpp b/src/mame/drivers/dwarfd.cpp
index 0d9a11f3770..63c4c6cee4d 100644
--- a/src/mame/drivers/dwarfd.cpp
+++ b/src/mame/drivers/dwarfd.cpp
@@ -843,7 +843,7 @@ ROM_START( dwarfd )
ROM_LOAD16_BYTE( "6d_pd_50-1994_tms2732ajl.bin",0x2001, 0x1000, CRC(ef52b88c) SHA1(3405152da3194a71f6dac6492f275c746e781ee7) )
ROM_REGION( 0x4000*2, "gfx2", 0 )
- ROM_FILL(0, 0x4000*2, 0)
+ ROM_FILL(0, 0x4000*2, nullptr)
ROM_REGION( 0x40, "proms", 0 )
/* ??? colors */
@@ -866,7 +866,7 @@ ROM_START( dwarfda )
ROM_LOAD16_BYTE( "50-1815-tms2732ajl.6d",0x2001, 0x1000, CRC(303d2d16) SHA1(885df57f253d92f96692256325ffcf2ca71dc64f) )
ROM_REGION( 0x4000*2, "gfx2", 0 )
- ROM_FILL(0, 0x4000*2, 0)
+ ROM_FILL(0, 0x4000*2, nullptr)
ROM_REGION( 0x40, "proms", 0 )
/* ??? colors */
@@ -893,7 +893,7 @@ ROM_START( quarterh )
ROM_LOAD16_BYTE( "6d_qh_01-2398_11193.bin",0x0001, 0x0800, CRC(1db80656) SHA1(5cbfc2e4ba0c8028ff5e0ba2ec6220d8afb8cfc2) )
ROM_REGION( 0x4000*2, "gfx2", 0 )
- ROM_FILL(0, 0x4000*2, 0)
+ ROM_FILL(0, 0x4000*2, nullptr)
ROM_REGION( 0x800, "ld_data", 0 )
ROM_LOAD( "-g_l-.bin", 0x0000, 0x0800, CRC(05c09fa6) SHA1(92ec4c225e477194d2c134403d9ebf922149b51c) )
@@ -922,7 +922,7 @@ ROM_START( quarterha )
ROM_LOAD16_BYTE( "6d_qh_01-2398_11193.bin",0x0001, 0x0800, CRC(1db80656) SHA1(5cbfc2e4ba0c8028ff5e0ba2ec6220d8afb8cfc2) )
ROM_REGION( 0x4000*2, "gfx2", 0 )
- ROM_FILL(0, 0x4000*2, 0)
+ ROM_FILL(0, 0x4000*2, nullptr)
ROM_REGION( 0x800, "ld_data", 0 )
ROM_LOAD( "-g_l-.bin", 0x0000, 0x0800, CRC(05c09fa6) SHA1(92ec4c225e477194d2c134403d9ebf922149b51c) )
@@ -946,13 +946,13 @@ ROM_START( quarterhb )
ROM_LOAD16_BYTE( "a3.bin",0x0000, 0x4000, CRC(8b5296b1) SHA1(9d27d85f2edb44b96acce3c3f3e611217dcef70d) ) // /
ROM_REGION16_LE( 0x4000, "gfx1", 0 )
- ROM_COPY("gfx_data", 0x0000, 0x1000, 0x0800 )
+ ROM_COPY("gfx_data", nullptr, 0x1000, 0x0800 )
ROM_COPY("gfx_data", 0x0800, 0x0000, 0x0800 )
ROM_COPY("gfx_data", 0x1000, 0x1800, 0x0800 )
ROM_COPY("gfx_data", 0x1800, 0x0800, 0x0800 )
ROM_REGION( 0x4000*2, "gfx2", 0 )
- ROM_FILL(0, 0x4000*2, 0)
+ ROM_FILL(0, 0x4000*2, nullptr)
ROM_REGION( 0x800, "ld_data", ROMREGION_ERASEFF )
@@ -980,10 +980,10 @@ ROM_START( qc )
ROM_COPY("gfx_data", 0x6800, 0x0000, 0x800 )
ROM_COPY("gfx_data", 0x7000, 0x1800, 0x800 )
ROM_COPY("gfx_data", 0x7800, 0x0800, 0x800 )
- ROM_COPY("gfx1", 0x0000, 0x2000, 0x2000 )
+ ROM_COPY("gfx1", nullptr, 0x2000, 0x2000 )
ROM_REGION( 0x4000*2, "gfx2", 0 )
- ROM_FILL(0, 0x4000*2, 0)
+ ROM_FILL(0, 0x4000*2, nullptr)
// borrowed from above and slightly edited
ROM_REGION( 0x40, "proms", 0 )
diff --git a/src/mame/drivers/dynax.cpp b/src/mame/drivers/dynax.cpp
index bdd48788764..3c04638cf06 100644
--- a/src/mame/drivers/dynax.cpp
+++ b/src/mame/drivers/dynax.cpp
@@ -4287,7 +4287,7 @@ MACHINE_START_MEMBER(dynax_state,dynax)
MACHINE_RESET_MEMBER(dynax_state,dynax)
{
- if (m_msm != NULL)
+ if (m_msm != nullptr)
MACHINE_RESET_CALL_MEMBER(adpcm);
m_sound_irq = 0;
@@ -5068,7 +5068,7 @@ ROM_START( cdracula )
ROM_LOAD( "escape.uc", 0x40000, 0x20000, CRC(393fa285) SHA1(654ab2fb92efa28f65bcc7c70a9fae2e43657309) )
ROM_LOAD( "escape.ud", 0x60000, 0x20000, CRC(eff474af) SHA1(7ab1f0079d051c9b0c4aa566a4d92032c7060d8e) )
ROM_LOAD( "escape.ue", 0x80000, 0x20000, CRC(0f9dc93b) SHA1(a3b33795cf07882ecc80d9afa5174e771ee0df08) )
- ROM_FILL( 0xa0000, 0x20000, 0 )
+ ROM_FILL( 0xa0000, 0x20000, nullptr )
ROM_REGION( 0x400, "proms", 0 ) // Color PROMs
ROM_LOAD( "82s147an.u26", 0x000, 0x200, CRC(1a3fe146) SHA1(7d1b4dd66fc95ea5ed584f0bb571cca09fe519b0) ) // FIXED BITS (00xxxxxx)
@@ -6913,7 +6913,7 @@ ROM_START( tenkai2b )
ROM_LOAD( "mc2.u21", 0x000000, 0x100000, CRC(713f79d7) SHA1(6e518b3127b232cc280b172dedbbc708987f9325) )
ROM_REGION( 0x100000, "gfx3", 0 ) // blitter data
- ROM_COPY( "gfx1", 0, 0, 0x100000 )
+ ROM_COPY( "gfx1", nullptr, 0, 0x100000 )
ROM_LOAD( "mc3.u15", 0x00000, 0x20000, CRC(5b552cdf) SHA1(86aaa02dcf8dab670d818287c91c8cb296362401) ) // 1xxxxxxxxxxxxxxxx = 0xFF
ROM_END
@@ -6985,7 +6985,7 @@ ROM_START( tenkaibb )
ROM_LOAD( "lzc-02.u19", 0x000000, 0x100000, CRC(90a19443) SHA1(8f593c00e39dd5acc76b058591019d117967a17b) )
ROM_REGION( 0x100000, "gfx3", 0 ) // blitter data
- ROM_COPY( "gfx1", 0, 0, 0x100000 )
+ ROM_COPY( "gfx1", nullptr, 0, 0x100000 )
ROM_LOAD( "lzc-03.u15", 0x000000, 0x020000, CRC(5b552cdf) SHA1(86aaa02dcf8dab670d818287c91c8cb296362401) ) // 1xxxxxxxxxxxxxxxx = 0xFF
ROM_END
diff --git a/src/mame/drivers/dynduke.cpp b/src/mame/drivers/dynduke.cpp
index 803e2c501fa..4f4bd4a8487 100644
--- a/src/mame/drivers/dynduke.cpp
+++ b/src/mame/drivers/dynduke.cpp
@@ -330,7 +330,7 @@ ROM_START( dynduke )
ROM_REGION( 0x20000*2, "audiocpu", 0 ) /* sound Z80 */
ROM_LOAD( "8.w8", 0x000000, 0x08000, CRC(3c29480b) SHA1(031a0b808df32b5ae4f722c9e9f69554d30505c1) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "9.5k", 0x000000, 0x04000, CRC(f2bc9af4) SHA1(9092ebe9dced243c3a7f63198a1180143dd42cea) ) /* chars */
@@ -378,7 +378,7 @@ ROM_START( dyndukea )
ROM_REGION( 0x20000*2, "audiocpu", 0 ) /* sound Z80 */
ROM_LOAD( "8.w8", 0x000000, 0x08000, CRC(3c29480b) SHA1(031a0b808df32b5ae4f722c9e9f69554d30505c1) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "9.5k", 0x000000, 0x04000, CRC(f2bc9af4) SHA1(9092ebe9dced243c3a7f63198a1180143dd42cea) ) /* chars */
@@ -426,7 +426,7 @@ ROM_START( dyndukej )
ROM_REGION( 0x20000*2, "audiocpu", 0 ) /* sound Z80 */
ROM_LOAD( "8.w8", 0x000000, 0x08000, CRC(3c29480b) SHA1(031a0b808df32b5ae4f722c9e9f69554d30505c1) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "9.5k", 0x000000, 0x04000, CRC(f2bc9af4) SHA1(9092ebe9dced243c3a7f63198a1180143dd42cea) ) /* chars */
@@ -474,7 +474,7 @@ ROM_START( dyndukeu )
ROM_REGION( 0x20000*2, "audiocpu", 0 ) /* sound Z80 */
ROM_LOAD( "8.w8", 0x000000, 0x08000, CRC(3c29480b) SHA1(031a0b808df32b5ae4f722c9e9f69554d30505c1) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "9.5k", 0x000000, 0x04000, CRC(f2bc9af4) SHA1(9092ebe9dced243c3a7f63198a1180143dd42cea) ) /* chars */
@@ -522,7 +522,7 @@ ROM_START( dbldynj )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* sound Z80 */
ROM_LOAD( "8x.w8", 0x000000, 0x08000, CRC(f4066081) SHA1(0e5246f4f5513be11e6ed3ea26aada7e0a17a448) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "9x.5k", 0x000000, 0x04000, CRC(913709e3) SHA1(a469043a09718409f7af835f7c045baedad92061) ) /* chars */
@@ -570,7 +570,7 @@ ROM_START( dbldynu )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* sound Z80 */
ROM_LOAD( "8x.w8", 0x000000, 0x08000, CRC(f4066081) SHA1(0e5246f4f5513be11e6ed3ea26aada7e0a17a448) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "9x.5k", 0x000000, 0x04000, CRC(913709e3) SHA1(a469043a09718409f7af835f7c045baedad92061) ) /* chars */
diff --git a/src/mame/drivers/ec184x.cpp b/src/mame/drivers/ec184x.cpp
index f85a1aa8219..e0a1ed23348 100644
--- a/src/mame/drivers/ec184x.cpp
+++ b/src/mame/drivers/ec184x.cpp
@@ -237,10 +237,10 @@ static MACHINE_CONFIG_START( ec1840, ec184x_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1840.0002", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // actually ec1840.0003 -- w/o mouse port
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", ec184x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", ec184x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", ec184x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", ec184x_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", ec184x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", ec184x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", ec184x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", ec184x_isa8_cards, nullptr, false)
MCFG_SOFTWARE_LIST_ADD("flop_list","ec1841")
@@ -264,9 +264,9 @@ static MACHINE_CONFIG_START( ec1841, ec184x_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", ec184x_isa8_cards, "ec1841.0002", false) // cga
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", ec184x_isa8_cards, "ec1841.0003", false) // fdc + mouse port
MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", ec184x_isa8_cards, "hdc", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", ec184x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", ec184x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", ec184x_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", ec184x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", ec184x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", ec184x_isa8_cards, nullptr, false)
MCFG_SOFTWARE_LIST_ADD("flop_list","ec1841")
@@ -289,10 +289,10 @@ static MACHINE_CONFIG_START( ec1847, ec184x_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "hercules", false) // cga, ega and vga(?) are options too
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false) // native variant (wd1010 + z80) not emulated
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false) // native serial (2x8251) not emulated
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, nullptr, false) // native variant (wd1010 + z80) not emulated
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, nullptr, false) // native serial (2x8251) not emulated
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
diff --git a/src/mame/drivers/einstein.cpp b/src/mame/drivers/einstein.cpp
index 1da33669927..41cd632f51f 100644
--- a/src/mame/drivers/einstein.cpp
+++ b/src/mame/drivers/einstein.cpp
@@ -144,7 +144,7 @@ static const z80_daisy_config einstein_daisy_chain[] =
{ "adc_daisy" },
{ IC_I063 },
{ "fire_daisy" },
- { NULL }
+ { nullptr }
};
@@ -222,7 +222,7 @@ WRITE8_MEMBER(einstein_state::einstein_drsel_w)
/* bit 0 to 3 select the drive */
static const char *names[] = { IC_I042 ":0", IC_I042 ":1", IC_I042 ":2", IC_I042 ":3" };
- floppy_image_device *floppy = 0;
+ floppy_image_device *floppy = nullptr;
for(int i=0; i<4; i++) {
if(BIT(data, i)) {
floppy_connector *con = machine().device<floppy_connector>(names[i]);
diff --git a/src/mame/drivers/enmirage.cpp b/src/mame/drivers/enmirage.cpp
index 1080a269dc9..249c11f069f 100644
--- a/src/mame/drivers/enmirage.cpp
+++ b/src/mame/drivers/enmirage.cpp
@@ -249,7 +249,7 @@ ROM_END
DRIVER_INIT_MEMBER(mirage_state,mirage)
{
floppy_connector *con = machine().device<floppy_connector>("wd1772:0");
- floppy_image_device *floppy = con ? con->get_device() : 0;
+ floppy_image_device *floppy = con ? con->get_device() : nullptr;
if (floppy)
{
m_fdc->set_floppy(floppy);
diff --git a/src/mame/drivers/eolithsp.cpp b/src/mame/drivers/eolithsp.cpp
index ace5a16201a..cf625b726ba 100644
--- a/src/mame/drivers/eolithsp.cpp
+++ b/src/mame/drivers/eolithsp.cpp
@@ -63,7 +63,7 @@ static const struct
{ "klondkp", 0x0001a046, -1, 240 },
/* vegaeo.c */
{ "crazywar", 0x00008cf8, -1, 240 },
- { NULL, 0, 0 }
+ { nullptr, 0, 0 }
};
@@ -76,7 +76,7 @@ void eolith_state::init_speedup()
m_speedup_vblank = 0;
m_speedup_scanline = 0;
- while( eolith_speedup_table[ n_game ].s_name != NULL )
+ while( eolith_speedup_table[ n_game ].s_name != nullptr )
{
if( strcmp( machine().system().name, eolith_speedup_table[ n_game ].s_name ) == 0 )
{
diff --git a/src/mame/drivers/ep64.cpp b/src/mame/drivers/ep64.cpp
index 1857ede0231..eb537de944b 100644
--- a/src/mame/drivers/ep64.cpp
+++ b/src/mame/drivers/ep64.cpp
@@ -512,7 +512,7 @@ static MACHINE_CONFIG_START( ep64, ep64_state )
MCFG_DAVE_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
// devices
- MCFG_EP64_EXPANSION_BUS_SLOT_ADD(EP64_EXPANSION_BUS_TAG, NULL)
+ MCFG_EP64_EXPANSION_BUS_SLOT_ADD(EP64_EXPANSION_BUS_TAG, nullptr)
MCFG_EP64_EXPANSION_BUS_SLOT_DAVE(DAVE_TAG)
MCFG_EP64_EXPANSION_BUS_SLOT_IRQ_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
MCFG_EP64_EXPANSION_BUS_SLOT_NMI_CALLBACK(INPUTLINE(Z80_TAG, INPUT_LINE_NMI))
@@ -522,7 +522,7 @@ static MACHINE_CONFIG_START( ep64, ep64_state )
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(ep64_state, write_centronics_busy))
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(DAVE_TAG, dave_device, int2_w))
MCFG_CASSETTE_ADD(CASSETTE1_TAG)
diff --git a/src/mame/drivers/eprom.cpp b/src/mame/drivers/eprom.cpp
index 87f9fb4063e..6a5644ea313 100644
--- a/src/mame/drivers/eprom.cpp
+++ b/src/mame/drivers/eprom.cpp
@@ -41,7 +41,7 @@ void eprom_state::update_interrupts()
{
m_maincpu->set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
- if (m_extra != NULL)
+ if (m_extra != nullptr)
m_extra->set_input_line(4, m_video_int_state ? ASSERT_LINE : CLEAR_LINE);
m_maincpu->set_input_line(6, m_sound_int_state ? ASSERT_LINE : CLEAR_LINE);
@@ -89,7 +89,7 @@ READ16_MEMBER(eprom_state::adc_r)
WRITE16_MEMBER(eprom_state::eprom_latch_w)
{
- if (ACCESSING_BITS_0_7 && (m_extra != NULL))
+ if (ACCESSING_BITS_0_7 && (m_extra != nullptr))
{
/* bit 0: reset extra CPU */
if (data & 1)
diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp
index a6aab2c34dc..236a97a73ef 100644
--- a/src/mame/drivers/equites.cpp
+++ b/src/mame/drivers/equites.cpp
@@ -616,7 +616,7 @@ READ16_MEMBER(equites_state::equites_spriteram_kludge_r)
READ8_MEMBER(equites_state::mcu_ram_r)
{
- if (m_fakemcu == NULL)
+ if (m_fakemcu == nullptr)
return m_alpha_8201->ext_ram_r(space, offset);
else
return m_mcuram[offset];
@@ -624,7 +624,7 @@ READ8_MEMBER(equites_state::mcu_ram_r)
WRITE8_MEMBER(equites_state::mcu_ram_w)
{
- if (m_fakemcu == NULL)
+ if (m_fakemcu == nullptr)
m_alpha_8201->ext_ram_w(space, offset, data);
else
m_mcuram[offset] = data;
@@ -633,7 +633,7 @@ WRITE8_MEMBER(equites_state::mcu_ram_w)
WRITE16_MEMBER(equites_state::mcu_start_w)
{
// data bit is A16 (offset)
- if (m_fakemcu == NULL)
+ if (m_fakemcu == nullptr)
m_alpha_8201->mcu_start_w(offset != 0);
else
m_fakemcu->set_input_line(INPUT_LINE_HALT, (offset != 0) ? ASSERT_LINE : CLEAR_LINE);
@@ -642,7 +642,7 @@ WRITE16_MEMBER(equites_state::mcu_start_w)
WRITE16_MEMBER(equites_state::mcu_switch_w)
{
// data bit is A16 (offset)
- if (m_fakemcu == NULL)
+ if (m_fakemcu == nullptr)
m_alpha_8201->bus_dir_w(offset == 0);
}
@@ -1036,7 +1036,7 @@ static const char *const alphamc07_sample_names[] =
"bongo1",
"bongo2",
"bongo3",
- 0
+ nullptr
};
@@ -1366,7 +1366,7 @@ ROM_START( bullfgtr )
ROM_LOAD16_BYTE( "hp6vr.bin", 0x04000, 0x2000, CRC(3dfadcf4) SHA1(724d45df0be7073bbe2767f3c0d050c8b45c9d27) )
ROM_LOAD16_BYTE( "hp3vr.bin", 0x08001, 0x2000, CRC(d3a21f8a) SHA1(2b3135aaae798eeee5850e616ed6ad8987fbc01b) )
ROM_LOAD16_BYTE( "hp7vr.bin", 0x08000, 0x2000, CRC(665cc015) SHA1(17fe18c8f22808a102f48bc4cbc8e4a1f6f9eaf1) )
- ROM_FILL( 0x0c000, 0x4000, 0 )
+ ROM_FILL( 0x0c000, 0x4000, nullptr )
ROM_REGION( 0x10000, "audiocpu", 0 ) // 8085A ROMs
ROM_LOAD( "hv1vr.bin", 0x00000, 0x2000, CRC(2a8e6fcf) SHA1(866903408e05938a982ffef4c9b849203c6cc060) )
@@ -1448,7 +1448,7 @@ ROM_START( bullfgtrs )
ROM_LOAD16_BYTE( "m_b12.bin", 0x04000, 0x2000, CRC(d98390ef) SHA1(17006503325627055c8b22052d7ed94e474f4ef7) )
ROM_LOAD16_BYTE( "m_d10.bin", 0x08001, 0x2000, CRC(21875752) SHA1(016db4125b1a4584ae277af427370780d96a17c5) )
ROM_LOAD16_BYTE( "m_b10.bin", 0x08000, 0x2000, CRC(9d84f678) SHA1(32584d54788cb570bd5210992836f28ba9c87aac) )
- ROM_FILL( 0x0c000, 0x4000, 0 )
+ ROM_FILL( 0x0c000, 0x4000, nullptr )
ROM_REGION( 0x10000, "audiocpu", 0 ) // 8085A ROMs
ROM_LOAD( "hv1vr.bin", 0x00000, 0x2000, CRC(2a8e6fcf) SHA1(866903408e05938a982ffef4c9b849203c6cc060) )
@@ -1516,7 +1516,7 @@ ROM_START( kouyakyu )
ROM_LOAD16_BYTE( "epr-6708.bin", 0x04000, 0x2000, CRC(f8863dc5) SHA1(bfdd294d51420dd70aa97942909a9b8a95ffc05c) )
ROM_LOAD16_BYTE( "epr-6706.bin", 0x08001, 0x2000, BAD_DUMP CRC(79e94cd2) SHA1(f44c2292614b46116818fad9a7eb48cceeb3b819) ) // was bad, manually patched
ROM_LOAD16_BYTE( "epr-6709.bin", 0x08000, 0x2000, CRC(f41cb58c) SHA1(f0d1048e949d51432739755f985e4df65b8e918b) )
- ROM_FILL( 0x0c000, 0x4000, 0 )
+ ROM_FILL( 0x0c000, 0x4000, nullptr )
ROM_REGION( 0x10000, "audiocpu", 0 ) // 8085A ROMs
ROM_LOAD( "epr-6703.bin", 0x00000, 0x2000, CRC(fbff3a86) SHA1(4ed2887b1e4509ded853a230f735d4d2aa475886) )
diff --git a/src/mame/drivers/esd16.cpp b/src/mame/drivers/esd16.cpp
index badd4bd76d5..656c7a615dc 100644
--- a/src/mame/drivers/esd16.cpp
+++ b/src/mame/drivers/esd16.cpp
@@ -892,7 +892,7 @@ ROM_START( mchampdx )
ROM_LOAD( "ver0106_ju02.bin", 0x000000, 0x200000, CRC(b27a4977) SHA1(b7f94bb04d0046538b3938335e6b0cce330ad79c) )
/* expand this to take up 0x200000 bytes too so we can decode it */
ROM_LOAD16_BYTE( "ver0106_esd5.ju07", 0x400000, 0x040000, CRC(7a3ac887) SHA1(3c759f9bed396bbaf6bd7298a8bd2bd76df3aa6f) )
- ROM_FILL( 0x500000, 0x100000, 0 )
+ ROM_FILL( 0x500000, 0x100000, nullptr )
ROM_REGION( 0x400000, "bgs", 0 ) /* Layers, 16x16x8 */
ROM_LOAD16_BYTE( "rom.fu35", 0x000000, 0x200000, CRC(ba46f3dc) SHA1(4ac7695bdf4237654481f7f74f8650d70a51e691) )
@@ -915,7 +915,7 @@ ROM_START( mchampdxa )
ROM_LOAD( "rom.ju02", 0x000000, 0x200000, CRC(7e87e332) SHA1(f90aa00a64a940846d99053c7aa023e3fd5d070b) )
/* expand this to take up 0x200000 bytes too so we can decode it */
ROM_LOAD16_BYTE( "esd5.ju07", 0x400000, 0x080000, CRC(6cc871cc) SHA1(710b9695c864e4234686993b88d24590d60e1cb9) )
- ROM_FILL( 0x500000, 0x100000, 0 )
+ ROM_FILL( 0x500000, 0x100000, nullptr )
ROM_REGION( 0x400000, "bgs", 0 ) /* Layers, 16x16x8 */
ROM_LOAD16_BYTE( "rom.fu35", 0x000000, 0x200000, CRC(ba46f3dc) SHA1(4ac7695bdf4237654481f7f74f8650d70a51e691) )
@@ -938,7 +938,7 @@ ROM_START( mchampdxb )
ROM_LOAD( "ver1114_ju02", 0x000000, 0x200000, CRC(2f9ccff8) SHA1(176240cd247cc5d3efd58fe0630726a8633be2a4) )
/* expand this to take up 0x200000 bytes too so we can decode it */
ROM_LOAD16_BYTE( "ver1114_esd5.ju07", 0x400000, 0x040000, CRC(8175939f) SHA1(cd0132ae0d2e35dc656434989b1f0f255ad562ab) )
- ROM_FILL( 0x500000, 0x100000, 0 )
+ ROM_FILL( 0x500000, 0x100000, nullptr )
ROM_REGION( 0x400000, "bgs", 0 ) /* Layers, 16x16x8 */
ROM_LOAD16_BYTE( "ver1114_fu35", 0x000000, 0x200000, CRC(c515c704) SHA1(c1657534314e66a25c38f70a12f14d2225ab89cc) ) // SMT Flash MX chips
@@ -1048,7 +1048,7 @@ ROM_START( hedpanic ) /* Story line & game instructions in English */
ROM_LOAD( "esd7.ju02", 0x000000, 0x200000, CRC(055d525f) SHA1(85ad474691f96e47311a1904015d1c92d3b2d607) )
/* expand this to take up 0x200000 bytes too so we can decode it */
ROM_LOAD16_BYTE( "esd5.ju07", 0x400000, 0x080000, CRC(bd785921) SHA1(c8bcb38d5aa6f5a27f0dedf7efd1d6737d59b4ca) )
- ROM_FILL( 0x500000, 0x100000, 0 )
+ ROM_FILL( 0x500000, 0x100000, nullptr )
ROM_REGION( 0x400000, "bgs", 0 ) /* Layers, 16x16x8 */
ROM_LOAD16_BYTE( "esd8.fu35", 0x000000, 0x200000, CRC(23aceb4f) SHA1(35d9ebc33b9e1515e47750cfcdfc0bf8bf44b71d) )
@@ -1075,7 +1075,7 @@ ROM_START( hedpanicf ) /* Story line in Japanese, game instructions in English *
ROM_LOAD( "esd7.ju02", 0x000000, 0x200000, CRC(055d525f) SHA1(85ad474691f96e47311a1904015d1c92d3b2d607) )
/* expand this to take up 0x200000 bytes too so we can decode it */
ROM_LOAD16_BYTE( "esd5.ju07", 0x400000, 0x080000, CRC(bd785921) SHA1(c8bcb38d5aa6f5a27f0dedf7efd1d6737d59b4ca) )
- ROM_FILL( 0x500000, 0x100000, 0 )
+ ROM_FILL( 0x500000, 0x100000, nullptr )
ROM_REGION( 0x400000, "bgs", 0 ) /* Layers, 16x16x8 */
ROM_LOAD16_BYTE( "esd8.fu35", 0x000000, 0x200000, CRC(23aceb4f) SHA1(35d9ebc33b9e1515e47750cfcdfc0bf8bf44b71d) )
@@ -1102,7 +1102,7 @@ ROM_START( hedpanico ) /* Story line & game instructions in English, copyright y
ROM_LOAD( "sm2.ju02", 0x200000, 0x200000, CRC(7a9610e4) SHA1(21ae3ec3fbddfc66416c109b091bd885d5ba0558) )
/* expand this to take up 0x200000 bytes too so we can decode it */
ROM_LOAD16_BYTE( "esd5.rom", 0x400000, 0x080000, CRC(82c5727f) SHA1(017f1d0c94475c51d17f12e24895f47a273a2dbb) ) /* JU07 */
- ROM_FILL( 0x500000, 0x100000, 0 )
+ ROM_FILL( 0x500000, 0x100000, nullptr )
ROM_REGION( 0x400000, "bgs", 0 ) /* Layers, 16x16x8 */
ROM_LOAD16_BYTE( "sm3.fu35", 0x000000, 0x200000, CRC(94dd4cfc) SHA1(a3f9c49611f0bc9d26166dafb44e2c5ebbb31127) )
diff --git a/src/mame/drivers/esq1.cpp b/src/mame/drivers/esq1.cpp
index b37f26185aa..4edb38303cf 100644
--- a/src/mame/drivers/esq1.cpp
+++ b/src/mame/drivers/esq1.cpp
@@ -332,8 +332,8 @@ void esq1_filters::device_start()
{
stream = stream_alloc(8, 2, 44100);
memset(filters, 0, sizeof(filters));
- for(int i=0; i<8; i++)
- recalc_filter(filters[i]);
+ for(auto & elem : filters)
+ recalc_filter(elem);
}
void esq1_filters::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples)
diff --git a/src/mame/drivers/esq5505.cpp b/src/mame/drivers/esq5505.cpp
index aaca4b127da..ce63ecf4b7b 100644
--- a/src/mame/drivers/esq5505.cpp
+++ b/src/mame/drivers/esq5505.cpp
@@ -277,7 +277,7 @@ void esq5505_state::machine_start()
void esq5505_state::machine_reset()
{
floppy_connector *con = machine().device<floppy_connector>("wd1772:0");
- floppy_image_device *floppy = con ? con->get_device() : 0;
+ floppy_image_device *floppy = con ? con->get_device() : nullptr;
m_rom = (UINT16 *)(void *)memregion("osrom")->base();
m_ram = (UINT16 *)(void *)memshare("osram")->ptr();
@@ -453,7 +453,7 @@ WRITE_LINE_MEMBER(esq5505_state::duart_irq_handler)
WRITE8_MEMBER(esq5505_state::duart_output)
{
floppy_connector *con = machine().device<floppy_connector>("wd1772:0");
- floppy_image_device *floppy = con ? con->get_device() : 0;
+ floppy_image_device *floppy = con ? con->get_device() : nullptr;
m_duart_io = data;
@@ -905,7 +905,7 @@ DRIVER_INIT_MEMBER(esq5505_state,common)
m_duart_io = 0;
floppy_connector *con = machine().device<floppy_connector>("wd1772:0");
- floppy_image_device *floppy = con ? con->get_device() : 0;
+ floppy_image_device *floppy = con ? con->get_device() : nullptr;
if (floppy)
{
m_fdc->set_floppy(floppy);
diff --git a/src/mame/drivers/ettrivia.cpp b/src/mame/drivers/ettrivia.cpp
index 0d4337afd49..4bee0fbe9c6 100644
--- a/src/mame/drivers/ettrivia.cpp
+++ b/src/mame/drivers/ettrivia.cpp
@@ -234,7 +234,7 @@ PALETTE_INIT_MEMBER(ettrivia_state, ettrivia)
compute_resistor_weights(0, 255, -1.0,
2, resistances, weights, 0, 0,
2, resistances, weights, 0, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
for (i = 0;i < palette.entries(); i++)
{
diff --git a/src/mame/drivers/excali64.cpp b/src/mame/drivers/excali64.cpp
index 3e4664ca913..c59c188e9e6 100644
--- a/src/mame/drivers/excali64.cpp
+++ b/src/mame/drivers/excali64.cpp
@@ -249,7 +249,7 @@ READ8_MEMBER( excali64_state::porte8_r )
WRITE8_MEMBER( excali64_state::porte4_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0))
floppy = m_floppy0->get_device();
@@ -626,12 +626,12 @@ ROM_START( excali64 )
ROM_LOAD( "rom_1.ic17", 0x0000, 0x4000, CRC(e129a305) SHA1(e43ec7d040c2b2e548d22fd6bbc7df8b45a26e5a) )
ROM_LOAD( "rom_2.ic24", 0x4000, 0x2000, CRC(916d9f5a) SHA1(91c527cce963481b7bebf077e955ca89578bb553) )
// fix a bug that causes screen to be filled with 'p'
- ROM_FILL(0x4ee, 1, 0)
+ ROM_FILL(0x4ee, 1, nullptr)
ROM_FILL(0x4ef, 1, 8)
- ROM_FILL(0x4f6, 1, 0)
+ ROM_FILL(0x4f6, 1, nullptr)
ROM_FILL(0x4f7, 1, 8)
// patch out the protection
- ROM_FILL(0x3ce7, 1, 0)
+ ROM_FILL(0x3ce7, 1, nullptr)
ROM_REGION(0x10000, "rambank", ROMREGION_ERASE00)
ROM_REGION(0xA000, "videoram", ROMREGION_ERASE00)
diff --git a/src/mame/drivers/exerion.cpp b/src/mame/drivers/exerion.cpp
index 611a6d4c5d9..6cee2544726 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, (void *)0)
+ PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exerion_state,exerion_controls_r, (void *)nullptr)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
diff --git a/src/mame/drivers/exidy440.cpp b/src/mame/drivers/exidy440.cpp
index b35de1fe770..7c4b1d9814b 100644
--- a/src/mame/drivers/exidy440.cpp
+++ b/src/mame/drivers/exidy440.cpp
@@ -298,7 +298,7 @@ CUSTOM_INPUT_MEMBER(exidy440_state::hitnmiss_button1_r)
void exidy440_state::exidy440_bank_select(UINT8 bank)
{
/* for the showdown case, bank 0 is a PLD */
- if (m_showdown_bank_data[0] != NULL)
+ if (m_showdown_bank_data[0] != nullptr)
{
if (bank == 0 && m_bank != 0)
m_maincpu->space(AS_PROGRAM).install_read_handler(0x4000, 0x7fff, read8_delegate(FUNC(exidy440_state::showdown_bank0_r),this));
@@ -1994,7 +1994,7 @@ ROM_END
DRIVER_INIT_MEMBER(exidy440_state,exidy440)
{
- m_showdown_bank_data[0] = m_showdown_bank_data[1] = NULL;
+ m_showdown_bank_data[0] = m_showdown_bank_data[1] = nullptr;
}
diff --git a/src/mame/drivers/f1gp.cpp b/src/mame/drivers/f1gp.cpp
index 201fd3fdb57..4d41c1159e7 100644
--- a/src/mame/drivers/f1gp.cpp
+++ b/src/mame/drivers/f1gp.cpp
@@ -621,7 +621,7 @@ ROM_START( f1gpb )
ROMX_LOAD( "18.ic140", 0x000000, 0x80000, CRC(9b2a4325) SHA1(b2020e08251366686c4c0045f3fd523fa327badf), ROM_SKIP(3) )
ROM_REGION( 0x100000, "gfx2", 0 )
- ROM_COPY("user3", 0, 0, 0x100000)
+ ROM_COPY("user3", nullptr, 0, 0x100000)
ROM_REGION( 0x080000, "gfx3", 0 )
ROM_COPY("user3", 0x100000, 0, 0x80000)
diff --git a/src/mame/drivers/famibox.cpp b/src/mame/drivers/famibox.cpp
index 023cd64486b..6f93c9bb930 100644
--- a/src/mame/drivers/famibox.cpp
+++ b/src/mame/drivers/famibox.cpp
@@ -254,14 +254,14 @@ void famibox_state::famicombox_bankswitch(UINT8 bank)
};
- for (int i = 0; i < ARRAY_LENGTH(famicombox_banks); i++ )
+ for (auto & famicombox_bank : famicombox_banks)
{
- if ( bank == famicombox_banks[i].bank ||
- famicombox_banks[i].bank == 0 )
+ if ( bank == famicombox_bank.bank ||
+ famicombox_bank.bank == 0 )
{
- membank("cpubank1")->set_base(memregion(famicombox_banks[i].memory_region)->base() + famicombox_banks[i].bank1_offset);
- membank("cpubank2")->set_base(memregion(famicombox_banks[i].memory_region)->base() + famicombox_banks[i].bank2_offset);
- membank("ppubank1")->set_base(memregion(famicombox_banks[i].memory_region)->base() + famicombox_banks[i].ppubank_offset);
+ membank("cpubank1")->set_base(memregion(famicombox_bank.memory_region)->base() + famicombox_bank.bank1_offset);
+ membank("cpubank2")->set_base(memregion(famicombox_bank.memory_region)->base() + famicombox_bank.bank2_offset);
+ membank("ppubank1")->set_base(memregion(famicombox_bank.memory_region)->base() + famicombox_bank.ppubank_offset);
break;
}
}
diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp
index 9153a4cb5a9..f6f0f08643b 100644
--- a/src/mame/drivers/fantland.cpp
+++ b/src/mame/drivers/fantland.cpp
@@ -736,7 +736,7 @@ static INPUT_PORTS_START( wheelrun )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)0)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)nullptr)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("53001") /* 53001 */
@@ -1085,7 +1085,7 @@ ROM_START( fantland )
ROM_REGION( 0x100000, "maincpu", 0 ) // Main CPU
ROM_LOAD16_BYTE( "fantasyl.ev2", 0x00000, 0x20000, CRC(f5bdca0e) SHA1(d05cf6f68d4d1a3dcc0171f7cf220c4920bd47bb) )
ROM_LOAD16_BYTE( "fantasyl.od2", 0x00001, 0x20000, CRC(9db35023) SHA1(81e2accd67dcf8563a68b2c4e35526f23a40150c) )
- ROM_COPY( "maincpu", 0x00000, 0x40000, 0x40000 )
+ ROM_COPY( "maincpu", nullptr, 0x40000, 0x40000 )
ROM_LOAD16_BYTE( "fantasyl.ev1", 0xe0000, 0x10000, CRC(70e0ee30) SHA1(5253213da56b3f97e2811f2b10927d0e542447f0) )
ROM_LOAD16_BYTE( "fantasyl.od1", 0xe0001, 0x10000, CRC(577b4bd7) SHA1(1f08202d99c3e39e0dd1ed4947b928b695a5b411) )
@@ -1114,7 +1114,7 @@ ROM_START( fantlanda )
ROM_REGION( 0x100000, "maincpu", 0 ) // Main CPU
ROM_LOAD16_BYTE( "fantasyl.ev2", 0x00000, 0x20000, CRC(f5bdca0e) SHA1(d05cf6f68d4d1a3dcc0171f7cf220c4920bd47bb) ) // 04.bin (was first half only)
ROM_LOAD16_BYTE( "fantasyl.od2", 0x00001, 0x20000, CRC(9db35023) SHA1(81e2accd67dcf8563a68b2c4e35526f23a40150c) ) // 03.bin (was first half only)
- ROM_COPY( "maincpu", 0x00000, 0x40000, 0x40000 )
+ ROM_COPY( "maincpu", nullptr, 0x40000, 0x40000 )
ROM_LOAD16_BYTE( "02.bin", 0xe0000, 0x10000, CRC(8b835eed) SHA1(6a6b3fe116145f685b91dcd5301165f17973697c) )
ROM_LOAD16_BYTE( "01.bin", 0xe0001, 0x10000, CRC(4fa3eb8b) SHA1(56da42a4e2972a696ef28811116cbc20bb5ba3e8) )
diff --git a/src/mame/drivers/fastfred.cpp b/src/mame/drivers/fastfred.cpp
index 3165a2bfb66..b2a0ef046e6 100644
--- a/src/mame/drivers/fastfred.cpp
+++ b/src/mame/drivers/fastfred.cpp
@@ -626,7 +626,7 @@ GFXDECODE_END
static GFXDECODE_START( imago )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 32 )
- GFXDECODE_ENTRY( NULL, 0xb800, imago_spritelayout, 0, 32 )
+ GFXDECODE_ENTRY( nullptr, 0xb800, imago_spritelayout, 0, 32 )
GFXDECODE_ENTRY( "gfx3", 0, charlayout, 0, 32 )
GFXDECODE_ENTRY( "gfx4", 0, imago_char_1bpp, 0x140, 1 )
GFXDECODE_END
@@ -955,7 +955,7 @@ ROM_START( imago )
ROM_REGION( 0x3000, "gfx3", 0 )
ROM_LOAD( "imago14.170", 0x0000, 0x1000, CRC(eded37f6) SHA1(c2ff5d4c1b001740ec4453467f879035db196a9b) )
- ROM_FILL( 0x1000, 0x2000, 0 )
+ ROM_FILL( 0x1000, 0x2000, nullptr )
ROM_REGION( 0x1000, "gfx4", 0 )
ROM_LOAD( "imago15.191", 0x0000, 0x1000, CRC(85fcc195) SHA1(a76f24201c037d1e6f909fb0ea4ad59b1d6ddd57) )
@@ -992,7 +992,7 @@ ROM_START( imagoa )
ROM_REGION( 0x3000, "gfx3", 0 )
ROM_LOAD( "imago14.170", 0x0000, 0x1000, CRC(eded37f6) SHA1(c2ff5d4c1b001740ec4453467f879035db196a9b) )
- ROM_FILL( 0x1000, 0x2000, 0 )
+ ROM_FILL( 0x1000, 0x2000, nullptr )
ROM_REGION( 0x1000, "gfx4", 0 )
ROM_LOAD( "imago15.191", 0x0000, 0x1000, CRC(85fcc195) SHA1(a76f24201c037d1e6f909fb0ea4ad59b1d6ddd57) )
diff --git a/src/mame/drivers/fcrash.cpp b/src/mame/drivers/fcrash.cpp
index 06d4f59beb8..3272849c8de 100644
--- a/src/mame/drivers/fcrash.cpp
+++ b/src/mame/drivers/fcrash.cpp
@@ -1792,7 +1792,7 @@ ROM_START( fcrash )
ROMX_LOAD( "17.bin", 0x180003, 0x20000, CRC(c59a4d6c) SHA1(59e49c7d24dd333007de4bb621050011a5392bcc) , ROM_SKIP(3) )
ROM_REGION( 0x8000, "gfx2", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 ) /* stars */
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 ) /* stars */
ROM_END
ROM_START( ffightbl )
@@ -1811,7 +1811,7 @@ ROM_START( ffightbl )
ROMX_LOAD( "fg-a.bin", 0x000003, 0x80000, CRC(16a89b2c) SHA1(4d0e1ec6ae9a2bd31fa77140532bbce64d3874e9) , ROM_SKIP(3) )
ROM_REGION( 0x8000, "gfx2", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 ) /* stars */
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 ) /* stars */
ROM_END
// this is identical to the Final Crash bootleg but without the modified gfx.
@@ -1852,7 +1852,7 @@ ROM_START( ffightbla )
ROMX_LOAD( "17.bin", 0x180003, 0x20000, CRC(c59a4d6c) SHA1(59e49c7d24dd333007de4bb621050011a5392bcc) , ROM_SKIP(3) )
ROM_REGION( 0x8000, "gfx2", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 ) /* stars */
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 ) /* stars */
ROM_END
@@ -1914,7 +1914,7 @@ ROM_START( kodb )
ROMX_LOAD( "bi.ic94", 0x000007, 0x80000, CRC(4a1b43fe) SHA1(7957f45b2862825c9509043c63c7da7108bd251b), ROM_SKIP(7) )
ROM_REGION( 0x8000, "gfx2", 0 )
- ROM_COPY( "gfx", 0x000000, 0x000000, 0x8000 ) /* stars */
+ ROM_COPY( "gfx", nullptr, 0x000000, 0x8000 ) /* stars */
ROM_REGION( 0x40000, "oki", 0 ) /* Samples */
ROM_LOAD( "2.ic19", 0x00000, 0x40000, CRC(a2db1575) SHA1(1a4a29e4b045af50700adf1665697feab12cc234) )
diff --git a/src/mame/drivers/firebeat.cpp b/src/mame/drivers/firebeat.cpp
index 1d3002629bb..132b0f03130 100644
--- a/src/mame/drivers/firebeat.cpp
+++ b/src/mame/drivers/firebeat.cpp
@@ -1410,7 +1410,7 @@ static MACHINE_CONFIG_DERIVED( firebeat_spu, firebeat )
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
- MCFG_ATA_INTERFACE_ADD("spu_ata", ata_devices, "cdrom", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("spu_ata", ata_devices, "cdrom", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(firebeat_state, spu_ata_interrupt))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/firetrk.cpp b/src/mame/drivers/firetrk.cpp
index 38a8dc48282..94deb2221d7 100644
--- a/src/mame/drivers/firetrk.cpp
+++ b/src/mame/drivers/firetrk.cpp
@@ -415,7 +415,7 @@ static INPUT_PORTS_START( firetrk )
PORT_START("BIT_0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas") PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)0)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Bell") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_TILT )
@@ -439,7 +439,7 @@ static INPUT_PORTS_START( firetrk )
PORT_START("BIT_7")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)0)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
@@ -487,25 +487,25 @@ static INPUT_PORTS_START( superbug )
PORT_START("BIT_0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)1)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)0)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON7 ) PORT_NAME("Hiscore Reset") PORT_CODE(KEYCODE_H)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_SERVICE( 0x20, IP_ACTIVE_HIGH )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)0)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT )
PORT_START("BIT_7")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)2)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)0)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)0)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)nullptr)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,crash_r, (void *)0)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,crash_r, (void *)nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select") PORT_CODE(KEYCODE_SPACE)
PORT_START("GEAR")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Gear 2") PORT_CODE(KEYCODE_X) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Gear 3") PORT_CODE(KEYCODE_C) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Gear 4") PORT_CODE(KEYCODE_V) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)3)
@@ -557,13 +557,13 @@ static INPUT_PORTS_START( montecar )
PORT_DIPSETTING( 0x00, DEF_STR( German ) )
PORT_START("BIT_6")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,gear_r, (void *)2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select") PORT_CODE(KEYCODE_SPACE)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)0)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_dir_r, (void *)nullptr)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)1)
PORT_START("BIT_7")
@@ -573,11 +573,11 @@ static INPUT_PORTS_START( montecar )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)0)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)0)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,steer_flag_r, (void *)nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state,skid_r, (void *)nullptr)
PORT_START("GEAR")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CODE(KEYCODE_Z) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Gear 2") PORT_CODE(KEYCODE_X) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Gear 3") PORT_CODE(KEYCODE_C) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Gear 4") PORT_CODE(KEYCODE_V) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state,gear_changed, (void *)3)
diff --git a/src/mame/drivers/fm7.cpp b/src/mame/drivers/fm7.cpp
index 261e3172c20..4442882d215 100644
--- a/src/mame/drivers/fm7.cpp
+++ b/src/mame/drivers/fm7.cpp
@@ -1160,7 +1160,7 @@ void fm7_state::fm7_mmr_refresh(address_space& space)
if(m_basic_rom_en)
{
UINT8* ROM = memregion("fbasic")->base();
- if(ROM != NULL)
+ if(ROM != nullptr)
membank("fbasic_bank_r")->set_base(ROM);
}
else
diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp
index 4f4386d153a..d4ca82081ce 100644
--- a/src/mame/drivers/fmtowns.cpp
+++ b/src/mame/drivers/fmtowns.cpp
@@ -222,7 +222,7 @@ void towns_state::init_serial_rom()
// TODO: init serial ROM contents
int x;
static const UINT8 code[8] = { 0x04,0x65,0x54,0xA4,0x95,0x45,0x35,0x5F };
- UINT8* srom = NULL;
+ UINT8* srom = nullptr;
if(m_serial)
srom = m_serial->base();
@@ -553,7 +553,7 @@ READ8_MEMBER(towns_state::towns_floppy_r)
WRITE8_MEMBER(towns_state::towns_floppy_w)
{
- floppy_image_device* sel[4] = { m_flop0->get_device(), m_flop1->get_device(), NULL, NULL };
+ floppy_image_device* sel[4] = { m_flop0->get_device(), m_flop1->get_device(), nullptr, nullptr };
switch(offset)
{
@@ -582,7 +582,7 @@ WRITE8_MEMBER(towns_state::towns_floppy_w)
// bit 5 - CLKSEL
if(m_towns_selected_drive != 0)
{
- if(sel[m_towns_selected_drive-1] != NULL)
+ if(sel[m_towns_selected_drive-1] != nullptr)
{
sel[m_towns_selected_drive-1]->mon_w((~data & 0x10)>>4);
sel[m_towns_selected_drive-1]->ss_w((data & 0x04)>>2);
@@ -602,22 +602,22 @@ WRITE8_MEMBER(towns_state::towns_floppy_w)
break;
case 0x01:
m_towns_selected_drive = 1;
- if(sel[0] != NULL)
+ if(sel[0] != nullptr)
m_fdc->set_floppy(sel[0]);
break;
case 0x02:
m_towns_selected_drive = 2;
- if(sel[1] != NULL)
+ if(sel[1] != nullptr)
m_fdc->set_floppy(sel[1]);
break;
case 0x04:
m_towns_selected_drive = 3;
- if(sel[2] != NULL)
+ if(sel[2] != nullptr)
m_fdc->set_floppy(sel[2]);
break;
case 0x08:
m_towns_selected_drive = 4;
- if(sel[3] != NULL)
+ if(sel[3] != nullptr)
m_fdc->set_floppy(sel[3]);
break;
}
@@ -1590,7 +1590,7 @@ void towns_state::towns_delay_cdda(cdrom_image_device* dev)
void towns_state::towns_cdrom_execute_command(cdrom_image_device* device)
{
- if(device->get_cdrom_file() == NULL)
+ if(device->get_cdrom_file() == nullptr)
{ // No CD in drive
if(m_towns_cd.command & 0x20)
{
@@ -2584,7 +2584,7 @@ void towns_state::driver_start()
// CD-ROM init
m_towns_cd.read_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(towns_state::towns_cdrom_read_byte),this), (void*)machine().device("dma_1"));
- m_maincpu->space(AS_PROGRAM).install_ram(0x100000,m_ram->size()-1,0xffffffff,0,NULL);
+ m_maincpu->space(AS_PROGRAM).install_ram(0x100000,m_ram->size()-1,0xffffffff,0,nullptr);
}
void marty_state::driver_start()
diff --git a/src/mame/drivers/fruitpc.cpp b/src/mame/drivers/fruitpc.cpp
index 42db7c23f89..8eb9445fe6f 100644
--- a/src/mame/drivers/fruitpc.cpp
+++ b/src/mame/drivers/fruitpc.cpp
@@ -125,7 +125,7 @@ static MACHINE_CONFIG_START( fruitpc, fruitpc_state )
MCFG_FRAGMENT_ADD( pcat_common )
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
/* video hardware */
diff --git a/src/mame/drivers/funkball.cpp b/src/mame/drivers/funkball.cpp
index 47d7b339457..ac148b8bbd9 100644
--- a/src/mame/drivers/funkball.cpp
+++ b/src/mame/drivers/funkball.cpp
@@ -811,9 +811,9 @@ static MACHINE_CONFIG_START( funkball, funkball_state )
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
MCFG_PCI_BUS_LEGACY_DEVICE(7, "voodoo_0", voodoo_0_pci_r, voodoo_0_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(18, NULL, cx5510_pci_r, cx5510_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(18, nullptr, cx5510_pci_r, cx5510_pci_w)
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
MCFG_DEVICE_ADD("flashbank", ADDRESS_MAP_BANK, 0)
diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp
index f11ebe45a23..f0cef3bf46d 100644
--- a/src/mame/drivers/gaelco2.cpp
+++ b/src/mame/drivers/gaelco2.cpp
@@ -192,10 +192,10 @@ ROM_START( maniacsq )
ROM_LOAD( "d0-d7.4m", 0x0000000, 0x0080000, CRC(d8551b2f) SHA1(78b5b07112bd89fed18055180e7cc64f8e0bd0b1) ) /* GFX + Sound */
ROM_LOAD( "d8-d15.4m", 0x0080000, 0x0080000, CRC(b269c427) SHA1(b7f9501529fbb7ee82700cff82740ba5770cf3c5) ) /* GFX + Sound */
ROM_LOAD( "d16-d23.1m", 0x0100000, 0x0020000, CRC(af4ea5e7) SHA1(ffaf09dc2588e32c124e7dd2f86ba009f1b8b176) ) /* GFX only */
- ROM_FILL( 0x0120000, 0x0060000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0120000, 0x0060000, nullptr ) /* Empty */
ROM_LOAD( "d24-d31.1m", 0x0180000, 0x0020000, CRC(578c3588) SHA1(c2e1fba29f21d6822677886fb2d26e050b336c14) ) /* GFX only */
- ROM_FILL( 0x01a0000, 0x0060000, 0x0 ) /* Empty */
- ROM_FILL( 0x0200000, 0x0080000, 0x0 ) /* to decode GFX as 5bpp */
+ ROM_FILL( 0x01a0000, 0x0060000, nullptr ) /* Empty */
+ ROM_FILL( 0x0200000, 0x0080000, nullptr ) /* to decode GFX as 5bpp */
ROM_END
@@ -357,22 +357,22 @@ ROM_START( bang )
ROM_LOAD( "bang16.ic16", 0x0000000, 0x0080000, CRC(6ee4b878) SHA1(f646380d95650a60b5a17973bdfd3b80450a4d3b) ) /* GFX only */
ROM_LOAD( "bang17.ic17", 0x0080000, 0x0080000, CRC(0c35aa6f) SHA1(df0474b1b9466d3c199e5aade39b7233f0cb45ee) ) /* GFX only */
ROM_LOAD( "bang18.ic18", 0x0100000, 0x0080000, CRC(2056b1ad) SHA1(b796f92eef4bbb0efa12c53580e429b8a0aa394c) ) /* Sound only */
- ROM_FILL( 0x0180000, 0x0080000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0180000, 0x0080000, nullptr ) /* Empty */
ROM_LOAD( "bang9.ic9", 0x0200000, 0x0080000, CRC(078195dc) SHA1(362ff194e2579346dfc7af88559b0718bc36ec8a) ) /* GFX only */
ROM_LOAD( "bang10.ic10", 0x0280000, 0x0080000, CRC(06711eeb) SHA1(3662ffe730fb54ee48925de9765f88be1abd5e4e) ) /* GFX only */
ROM_LOAD( "bang11.ic11", 0x0300000, 0x0080000, CRC(2088d15c) SHA1(0c043ab9fd33836fa4b7ad60fd8e7cb96ffb6121) ) /* Sound only */
- ROM_FILL( 0x0380000, 0x0080000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0380000, 0x0080000, nullptr ) /* Empty */
ROM_LOAD( "bang1.ic1", 0x0400000, 0x0080000, CRC(e7b97b0f) SHA1(b5503687ae3ca0a0faa4b867a267d89dac788d6d) ) /* GFX only */
ROM_LOAD( "bang2.ic2", 0x0480000, 0x0080000, CRC(ff297a8f) SHA1(28819a9d7b3cb177e7a7db3fe23a94f5cba33049) ) /* GFX only */
ROM_LOAD( "bang3.ic3", 0x0500000, 0x0080000, CRC(d3da5d4f) SHA1(b9bea0b4d20ab0bfda3fac2bb1fab974c007aaf0) ) /* Sound only */
- ROM_FILL( 0x0580000, 0x0080000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0580000, 0x0080000, nullptr ) /* Empty */
ROM_LOAD( "bang20.ic20", 0x0600000, 0x0080000, CRC(a1145df8) SHA1(305cda041a6f201cb011982f1bf1fc6a4153a669) ) /* GFX only */
ROM_LOAD( "bang13.ic13", 0x0680000, 0x0080000, CRC(fe3e8d07) SHA1(7a37561b1cf422b47cddb8751a6b6d57dec8baae) ) /* GFX only */
ROM_LOAD( "bang5.ic5", 0x0700000, 0x0080000, CRC(9bee444c) SHA1(aebaa3306e7e5aada99ed469da9bf64507808cff) ) /* Sound only */
- ROM_FILL( 0x0780000, 0x0080000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0780000, 0x0080000, nullptr ) /* Empty */
ROM_LOAD( "bang21.ic21", 0x0800000, 0x0080000, CRC(fd93d7f2) SHA1(ff9d8eb5ac8d9757132aa6d79d2f7662c14cd650) ) /* GFX only */
ROM_LOAD( "bang14.ic14", 0x0880000, 0x0080000, CRC(858fcbf9) SHA1(1e67431c8775666f4839bdc427fabf59ffc708c0) ) /* GFX only */
- ROM_FILL( 0x0900000, 0x0100000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0900000, 0x0100000, nullptr ) /* Empty */
ROM_END
@@ -386,22 +386,22 @@ ROM_START( bangj )
ROM_LOAD( "bang-a.ic16", 0x0000000, 0x0080000, CRC(3b63acfc) SHA1(48f5598cdbc70f342d6b75909166571271920a8f) ) /* GFX only */
ROM_LOAD( "bang-a.ic17", 0x0080000, 0x0080000, CRC(72865b80) SHA1(ec7753ea7961015149b9e6386fdeb9bd59aa962a) ) /* GFX only */
ROM_LOAD( "bang18.ic18", 0x0100000, 0x0080000, CRC(2056b1ad) SHA1(b796f92eef4bbb0efa12c53580e429b8a0aa394c) ) /* Sound only */
- ROM_FILL( 0x0180000, 0x0080000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0180000, 0x0080000, nullptr ) /* Empty */
ROM_LOAD( "bang-a.ic9", 0x0200000, 0x0080000, CRC(3cb86360) SHA1(c803b3add253a552a1554714218740bdfca91764) ) /* GFX only */
ROM_LOAD( "bang-a.ic10", 0x0280000, 0x0080000, CRC(03fdd777) SHA1(9eec194239f93d961ee9902a585c872dcdc7728f) ) /* GFX only */
ROM_LOAD( "bang11.ic11", 0x0300000, 0x0080000, CRC(2088d15c) SHA1(0c043ab9fd33836fa4b7ad60fd8e7cb96ffb6121) ) /* Sound only */
- ROM_FILL( 0x0380000, 0x0080000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0380000, 0x0080000, nullptr ) /* Empty */
ROM_LOAD( "bang-a.ic1", 0x0400000, 0x0080000, CRC(965d0ad9) SHA1(eff521735129b7dd9366855c6312ed568950233c) ) /* GFX only */
ROM_LOAD( "bang-a.ic2", 0x0480000, 0x0080000, CRC(8ea261a7) SHA1(50b59cf058ca03c0b8c888f6ddb40c720a210ece) ) /* GFX only */
ROM_LOAD( "bang3.ic3", 0x0500000, 0x0080000, CRC(d3da5d4f) SHA1(b9bea0b4d20ab0bfda3fac2bb1fab974c007aaf0) ) /* Sound only */
- ROM_FILL( 0x0580000, 0x0080000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0580000, 0x0080000, nullptr ) /* Empty */
ROM_LOAD( "bang-a.ic20", 0x0600000, 0x0080000, CRC(4b828f3c) SHA1(5227a89c05c659a85d33f092c6778ce9d57a0236) ) /* GFX only */
ROM_LOAD( "bang-a.ic13", 0x0680000, 0x0080000, CRC(d1146b92) SHA1(2b28d49fbffea6c038160fdab177bc0045195ca8) ) /* GFX only */
ROM_LOAD( "bang5.ic5", 0x0700000, 0x0080000, CRC(9bee444c) SHA1(aebaa3306e7e5aada99ed469da9bf64507808cff) ) /* Sound only */
- ROM_FILL( 0x0780000, 0x0080000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0780000, 0x0080000, nullptr ) /* Empty */
ROM_LOAD( "bang-a.ic21", 0x0800000, 0x0080000, CRC(531ce3b6) SHA1(196bb720591acc082f815b609a7cf1609510c8c1) ) /* GFX only */
ROM_LOAD( "bang-a.ic14", 0x0880000, 0x0080000, CRC(f8e1cf84) SHA1(559c08584094e605635c5ef3a25534ea0bcfa199) ) /* GFX only */
- ROM_FILL( 0x0900000, 0x0100000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0900000, 0x0100000, nullptr ) /* Empty */
ROM_END
@@ -579,7 +579,7 @@ ROM_START( aligator )
ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */
/* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */
- ROM_FILL( 0x1000000, 0x0400000, 0x0 ) /* to decode GFX as 5 bpp */
+ ROM_FILL( 0x1000000, 0x0400000, nullptr ) /* to decode GFX as 5 bpp */
ROM_REGION( 0x1000000, "gfx2", 0 ) /* Temporary storage */
ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) /* GFX only */
@@ -595,7 +595,7 @@ ROM_START( aligatorun )
ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */
/* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */
- ROM_FILL( 0x1000000, 0x0400000, 0x0 ) /* to decode GFX as 5 bpp */
+ ROM_FILL( 0x1000000, 0x0400000, nullptr ) /* to decode GFX as 5 bpp */
ROM_REGION( 0x1000000, "gfx2", 0 ) /* Temporary storage */
ROM_LOAD( "u48", 0x0000000, 0x0400000, CRC(19e03bf1) SHA1(2b3a4bb438b0aebf4f6a9fd26b071e5c9dd222b8) ) /* GFX only */
@@ -838,7 +838,7 @@ ROM_START( touchgo ) /* REF: 950906 */
ROM_REGION( 0x0c00000, "gfx2", 0 ) /* Temporary storage */
ROM_LOAD( "ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) /* GFX only */
ROM_LOAD( "ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) /* Sound only */
- ROM_FILL( 0x0600000, 0x0200000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0600000, 0x0200000, nullptr ) /* Empty */
ROM_LOAD( "ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) /* GFX only */
ROM_END
@@ -854,7 +854,7 @@ ROM_START( touchgon ) /* REF 950906, no plug-in daughterboard, Non North America
ROM_REGION( 0x0c00000, "gfx2", 0 ) /* Temporary storage */
ROM_LOAD( "ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) /* GFX only */
ROM_LOAD( "ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) /* Sound only */
- ROM_FILL( 0x0600000, 0x0200000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0600000, 0x0200000, nullptr ) /* Empty */
ROM_LOAD( "ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) /* GFX only */
ROM_END
@@ -870,7 +870,7 @@ ROM_START( touchgoe ) /* REF: 950510-1 */
ROM_REGION( 0x0c00000, "gfx2", 0 ) /* Temporary storage */
ROM_LOAD( "ic65", 0x0000000, 0x0400000, CRC(91b89c7c) SHA1(1c24b494b56845b0f21be40ab737f251d7683c7d) ) /* GFX only */
ROM_LOAD( "ic66", 0x0400000, 0x0200000, CRC(52682953) SHA1(82cde061bdd827ed4a47a9a4256cd0e887ebc29d) ) /* Sound only */
- ROM_FILL( 0x0600000, 0x0200000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0600000, 0x0200000, nullptr ) /* Empty */
ROM_LOAD( "ic67", 0x0800000, 0x0400000, CRC(c0a2ce5b) SHA1(94b024373c7c546c0f4fe9737639f02e9c7ebbdb) ) /* GFX only */
ROM_END
@@ -1009,7 +1009,7 @@ ROM_START( snowboara )
ROM_REGION( 0x1400000, "gfx1", 0 ) /* GFX + Sound */
/* 0x0000000-0x0ffffff filled in in the DRIVER_INIT */
ROM_LOAD( "sb43", 0x1000000, 0x0200000, CRC(afce54ed) SHA1(1d2933d64790612918adbaabcd2a82dad79953c9) ) /* GFX only */
- ROM_FILL( 0x1200000, 0x0200000, 0x0 ) /* Empty */
+ ROM_FILL( 0x1200000, 0x0200000, nullptr ) /* Empty */
ROM_REGION( 0x0c00000, "gfx2", 0 ) /* Temporary storage */
ROM_LOAD( "sb44", 0x0000000, 0x0400000, CRC(1bbe88bc) SHA1(15bce9ada2b742ba4d537fa8efc0f29f661bff00) ) /* GFX only */
@@ -1029,29 +1029,29 @@ ROM_START( snowboar )
ROM_LOAD( "sb.a3", 0x0180000, 0x0080000, CRC(17ed9cf8) SHA1(c6cab61bbba3b2b1d06b64a68313946299205cc5) ) /* GFX only */
ROM_LOAD( "sb.a4", 0x0200000, 0x0080000, CRC(2ba3a5c8) SHA1(93de0382cbb41806ae3349ce7cfecdc1404bfb88) ) /* Sound only */
ROM_LOAD( "sb.a5", 0x0280000, 0x0080000, CRC(ae011eb3) SHA1(17223404640c55637364fa6e51cf07d8e64df085) ) /* Sound only */
- ROM_FILL( 0x0300000, 0x0100000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0300000, 0x0100000, nullptr ) /* Empty */
ROM_LOAD( "sb.b0", 0x0400000, 0x0080000, CRC(96c714cd) SHA1(c6225c43b88531a70436cc8a631b8ba401903e45) ) /* GFX only */
ROM_LOAD( "sb.b1", 0x0480000, 0x0080000, CRC(39a4c30c) SHA1(4598a68ef41483ba372aa3a40383de8eb70d706e) ) /* GFX only */
ROM_LOAD( "sb.b2", 0x0500000, 0x0080000, CRC(b58fcdd6) SHA1(21a8c00778be77165f89421fb2e3123244cf02c6) ) /* GFX only */
ROM_LOAD( "sb.b3", 0x0580000, 0x0080000, CRC(96afdebf) SHA1(880cfb365efa93bbee882aeb483ad6d75d8b7430) ) /* GFX only */
ROM_LOAD( "sb.b4", 0x0600000, 0x0080000, CRC(e62cf8df) SHA1(8df8df45d99967e52dcec5b589246799f7a39601) ) /* Sound only */
ROM_LOAD( "sb.b5", 0x0680000, 0x0080000, CRC(caa90856) SHA1(a8f18a878b211366faaf66911c09d0452770cc3f) ) /* Sound only */
- ROM_FILL( 0x0700000, 0x0100000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0700000, 0x0100000, nullptr ) /* Empty */
ROM_LOAD( "sb.c0", 0x0800000, 0x0080000, CRC(c9d57a71) SHA1(4e8b7d821e31afc0750db283470f9c76bceb54da) ) /* GFX only */
ROM_LOAD( "sb.c1", 0x0880000, 0x0080000, CRC(1d14a3d4) SHA1(eb89cadfe331f77dbc0463151574ba801c248238) ) /* GFX only */
ROM_LOAD( "sb.c2", 0x0900000, 0x0080000, CRC(55026352) SHA1(7b92f45624dbd122c29e44f82c3c2ffded190efa) ) /* GFX only */
ROM_LOAD( "sb.c3", 0x0980000, 0x0080000, CRC(d9b62dee) SHA1(409ab4d9a6f9341cf59510c130c705d1ec42d1b3) ) /* GFX only */
- ROM_FILL( 0x0a00000, 0x0200000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0a00000, 0x0200000, nullptr ) /* Empty */
ROM_LOAD( "sb.d0", 0x0c00000, 0x0080000, CRC(7434c1ae) SHA1(8e0e6567a461c694a8ba2de5d4cf9ad73e0c83c8) ) /* GFX only */
ROM_LOAD( "sb.d1", 0x0c80000, 0x0080000, CRC(f00cc6c8) SHA1(b4835e2187e1a985993471d09495cbc1f5cd9417) ) /* GFX only */
ROM_LOAD( "sb.d2", 0x0d00000, 0x0080000, CRC(019f9aec) SHA1(1a97b84ebbf57e860792ef7a7dc6f51553ae3e26) ) /* GFX only */
ROM_LOAD( "sb.d3", 0x0d80000, 0x0080000, CRC(d05bd286) SHA1(9eff6f5a4755375b7a16b9d4967a0df933e1b9c4) ) /* GFX only */
- ROM_FILL( 0x0e00000, 0x0200000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0e00000, 0x0200000, nullptr ) /* Empty */
ROM_LOAD( "sb.e0", 0x1000000, 0x0080000, CRC(e6195323) SHA1(5ba1cb750dd8cfd0721905174bda6cfbf8c8e694) ) /* GFX only */
ROM_LOAD( "sb.e1", 0x1080000, 0x0080000, CRC(9f38910b) SHA1(0243c19c7b1bdd3361fc6e177c64528bacafcc33) ) /* GFX only */
ROM_LOAD( "sb.e2", 0x1100000, 0x0080000, CRC(f5948c6c) SHA1(91bba817ced194b02885ce84b7a8132ef5ca631a) ) /* GFX only */
ROM_LOAD( "sb.e3", 0x1180000, 0x0080000, CRC(4baa678f) SHA1(a7fbbd687e2d8d7e96207c8ace0799a3cc9c3272) ) /* GFX only */
- ROM_FILL( 0x1200000, 0x0200000, 0x0 ) /* Empty */
+ ROM_FILL( 0x1200000, 0x0200000, nullptr ) /* Empty */
ROM_END
@@ -1086,7 +1086,7 @@ static INPUT_PORTS_START( wrally2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Acc.")
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Gear") PORT_TOGGLE
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, wrally2_state,wrally2_analog_bit_r, (void *)0) /* ADC_1 serial input */
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, wrally2_state,wrally2_analog_bit_r, (void *)nullptr) /* ADC_1 serial input */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
PORT_SERVICE_DIPLOC( 0x0100, IP_ACTIVE_LOW, "SW2:1" )
PORT_DIPNAME( 0x0200, 0x0000, "Coin mechanism" ) PORT_DIPLOCATION("SW2:2")
@@ -1330,13 +1330,13 @@ ROM_START( wrally2 )
ROM_LOAD( "wr2.12d", 0x0380000, 0x0080000, CRC(6dbdaa95) SHA1(f23df65e3df92d79f7b1e99d611c067a79fc849a) ) /* Sound only */
ROM_LOAD( "wr2.01d", 0x0400000, 0x0080000, CRC(753a138d) SHA1(b05348af6d25e95208fc39007eb2082b759384e8) ) /* GFX only */
ROM_LOAD( "wr2.02d", 0x0480000, 0x0080000, CRC(9c2a723c) SHA1(5259c8fa1ad73518e89a8df6e76a565b8f8799e3) ) /* GFX only */
- ROM_FILL( 0x0500000, 0x0100000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0500000, 0x0100000, nullptr ) /* Empty */
ROM_LOAD( "wr2.20d", 0x0600000, 0x0080000, CRC(4f7ade84) SHA1(c8efcd4bcb1f2ad6ab8104ec0daea8324cefd3fd) ) /* GFX only */
ROM_LOAD( "wr2.13d", 0x0680000, 0x0080000, CRC(a4cd32f8) SHA1(bc4cc73b7a58aecd735bf55bb5062baa6dd22f83) ) /* GFX only */
- ROM_FILL( 0x0700000, 0x0100000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0700000, 0x0100000, nullptr ) /* Empty */
ROM_LOAD( "wr2.21d", 0x0800000, 0x0080000, CRC(899b0583) SHA1(a313e679980cc4da22bc70f2c7c9685af4f3d6df) ) /* GFX only */
ROM_LOAD( "wr2.14d", 0x0880000, 0x0080000, CRC(6eb781d5) SHA1(d5c13db88e6de606b34805391cef9f3fbf09fac4) ) /* GFX only */
- ROM_FILL( 0x0900000, 0x0100000, 0x0 ) /* Empty */
+ ROM_FILL( 0x0900000, 0x0100000, nullptr ) /* Empty */
ROM_END
/*
diff --git a/src/mame/drivers/gaelco3d.cpp b/src/mame/drivers/gaelco3d.cpp
index 0170d609e85..208a33a5504 100644
--- a/src/mame/drivers/gaelco3d.cpp
+++ b/src/mame/drivers/gaelco3d.cpp
@@ -852,7 +852,7 @@ static INPUT_PORTS_START( speedup )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // checked after reading analog from port 1
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) // checked after reading analog from port 2
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // checked after reading analog from port 3
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0)
+ PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)nullptr)
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1)
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3)
@@ -891,7 +891,7 @@ static INPUT_PORTS_START( surfplnt )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x0800, IP_ACTIVE_LOW )
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0)
+ PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)nullptr)
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1)
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3)
@@ -928,7 +928,7 @@ static INPUT_PORTS_START( radikalb )
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x08000000, IP_ACTIVE_LOW )
- PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0)
+ PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)nullptr)
PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1)
PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2)
PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3)
diff --git a/src/mame/drivers/galaga.cpp b/src/mame/drivers/galaga.cpp
index b03a0b5c4e1..f350250d906 100644
--- a/src/mame/drivers/galaga.cpp
+++ b/src/mame/drivers/galaga.cpp
@@ -1582,7 +1582,7 @@ static const char *const battles_sample_names[] =
"*battles",
"explo1", /* ground target explosion */
"explo2", /* Solvalou explosion */
- 0 /* end of array */
+ nullptr /* end of array */
};
INTERRUPT_GEN_MEMBER(galaga_state::main_vblank_irq)
@@ -2585,7 +2585,7 @@ ROM_START( xevious )
ROM_LOAD( "xvi_16.4n", 0x4000, 0x1000, CRC(605ca889) SHA1(3bf380ef76c03822a042ecc73b5edd4543c268ce) ) /* sprite set #3, planes 0/1 */
ROM_LOAD( "xvi_18.4r", 0x5000, 0x2000, CRC(02417d19) SHA1(b5f830dd2cf25cf154308d2e640f0ecdcda5d8cd) ) /* sprite set #1, plane 2, set #2, plane 2 */
/* 0x7000-0x8fff will be unpacked from 0x5000-0x6fff */
- ROM_FILL( 0x9000, 0x1000, 0x00 ) // empty space to decode sprite set #3 as 3 bits per pixel
+ ROM_FILL( 0x9000, 0x1000, nullptr ) // empty space to decode sprite set #3 as 3 bits per pixel
ROM_REGION( 0x4000, "gfx4", 0 ) /* background tilemaps */
ROM_LOAD( "xvi_9.2a", 0x0000, 0x1000, CRC(57ed9879) SHA1(3106d1aacff06cf78371bd19967141072b32b7d7) )
@@ -2640,7 +2640,7 @@ ROM_START( xeviousa )
ROM_LOAD( "xvi_16.4n", 0x4000, 0x1000, CRC(605ca889) SHA1(3bf380ef76c03822a042ecc73b5edd4543c268ce) ) /* sprite set #3, planes 0/1 */
ROM_LOAD( "xvi_18.4r", 0x5000, 0x2000, CRC(02417d19) SHA1(b5f830dd2cf25cf154308d2e640f0ecdcda5d8cd) ) /* sprite set #1, plane 2, set #2, plane 2 */
/* 0x7000-0x8fff will be unpacked from 0x5000-0x6fff */
- ROM_FILL( 0x9000, 0x1000, 0x00 ) // empty space to decode sprite set #3 as 3 bits per pixel
+ ROM_FILL( 0x9000, 0x1000, nullptr ) // empty space to decode sprite set #3 as 3 bits per pixel
ROM_REGION( 0x4000, "gfx4", 0 ) /* background tilemaps */
ROM_LOAD( "xvi_9.2a", 0x0000, 0x1000, CRC(57ed9879) SHA1(3106d1aacff06cf78371bd19967141072b32b7d7) )
@@ -2688,7 +2688,7 @@ ROM_START( xeviousb )
ROM_LOAD( "xvi_16.4n", 0x4000, 0x1000, CRC(605ca889) SHA1(3bf380ef76c03822a042ecc73b5edd4543c268ce) ) /* sprite set #3, planes 0/1 */
ROM_LOAD( "xvi_18.4r", 0x5000, 0x2000, CRC(02417d19) SHA1(b5f830dd2cf25cf154308d2e640f0ecdcda5d8cd) ) /* sprite set #1, plane 2, set #2, plane 2 */
/* 0x7000-0x8fff will be unpacked from 0x5000-0x6fff */
- ROM_FILL( 0x9000, 0x1000, 0x00 ) // empty space to decode sprite set #3 as 3 bits per pixel
+ ROM_FILL( 0x9000, 0x1000, nullptr ) // empty space to decode sprite set #3 as 3 bits per pixel
ROM_REGION( 0x4000, "gfx4", 0 ) /* background tilemaps */
ROM_LOAD( "xvi_9.2a", 0x0000, 0x1000, CRC(57ed9879) SHA1(3106d1aacff06cf78371bd19967141072b32b7d7) )
@@ -2739,7 +2739,7 @@ ROM_START( xeviousc )
ROM_LOAD( "xvi_16.4n", 0x4000, 0x1000, CRC(605ca889) SHA1(3bf380ef76c03822a042ecc73b5edd4543c268ce) ) /* sprite set #3, planes 0/1 */
ROM_LOAD( "xvi_18.4r", 0x5000, 0x2000, CRC(02417d19) SHA1(b5f830dd2cf25cf154308d2e640f0ecdcda5d8cd) ) /* sprite set #1, plane 2, set #2, plane 2 */
/* 0x7000-0x8fff will be unpacked from 0x5000-0x6fff */
- ROM_FILL( 0x9000, 0x1000, 0x00 ) // empty space to decode sprite set #3 as 3 bits per pixel
+ ROM_FILL( 0x9000, 0x1000, nullptr ) // empty space to decode sprite set #3 as 3 bits per pixel
ROM_REGION( 0x4000, "gfx4", 0 ) /* background tilemaps */
ROM_LOAD( "xvi_9.2a", 0x0000, 0x1000, CRC(57ed9879) SHA1(3106d1aacff06cf78371bd19967141072b32b7d7) )
@@ -2796,7 +2796,7 @@ ROM_START( xevios )
ROM_LOAD( "14.6d", 0x4000, 0x1000, CRC(605ca889) SHA1(3bf380ef76c03822a042ecc73b5edd4543c268ce) ) /* sprite set #3, planes 0/1 */
ROM_LOAD( "16.8d", 0x5000, 0x2000, CRC(44262c04) SHA1(4291f83193d11064c2ba6a9af27951b93bb945c3) ) /* sprite set #1, plane 2, set #2, plane 2 */
/* 0x7000-0x8fff will be unpacked from 0x5000-0x6fff */
- ROM_FILL( 0x9000, 0x1000, 0x00 ) // empty space to decode sprite set #3 as 3 bits per pixel
+ ROM_FILL( 0x9000, 0x1000, nullptr ) // empty space to decode sprite set #3 as 3 bits per pixel
ROM_REGION( 0x4000, "gfx4", 0 ) /* background tilemaps */
ROM_LOAD( "10.1d", 0x0000, 0x1000, CRC(10baeebb) SHA1(c544c9e0bb7a1ef93b3f2c2c1397f659d5334373) )
@@ -2859,7 +2859,7 @@ ROM_START( battles )
ROM_LOAD( "bg12.c8", 0x4000, 0x1000, CRC(605ca889) SHA1(3bf380ef76c03822a042ecc73b5edd4543c268ce) ) /* sprite set #3, planes 0/1 */
ROM_LOAD( "bg15.c2", 0x5000, 0x2000, CRC(02417d19) SHA1(b5f830dd2cf25cf154308d2e640f0ecdcda5d8cd) ) /* sprite set #1, plane 2, set #2, plane 2 */
/* 0x7000-0x8fff will be unpacked from 0x5000-0x6fff */
- ROM_FILL( 0x9000, 0x1000, 0x00 ) // empty space to decode sprite set #3 as 3 bits per pixel
+ ROM_FILL( 0x9000, 0x1000, nullptr ) // empty space to decode sprite set #3 as 3 bits per pixel
ROM_REGION( 0x4000, "gfx4", 0 ) /* background tilemaps (Located on the middle board) */
ROM_LOAD( "bg6.b14", 0x0000, 0x1000, CRC(57ed9879) SHA1(3106d1aacff06cf78371bd19967141072b32b7d7) )
@@ -2907,7 +2907,7 @@ ROM_START( sxevious )
ROM_LOAD( "xvi_16.4n", 0x4000, 0x1000, CRC(605ca889) SHA1(3bf380ef76c03822a042ecc73b5edd4543c268ce) ) /* sprite set #3, planes 0/1 */
ROM_LOAD( "xvi_18.4r", 0x5000, 0x2000, CRC(02417d19) SHA1(b5f830dd2cf25cf154308d2e640f0ecdcda5d8cd) ) /* sprite set #1, plane 2, set #2, plane 2 */
/* 0x7000-0x8fff will be unpacked from 0x5000-0x6fff */
- ROM_FILL( 0x9000, 0x1000, 0x00 ) // empty space to decode sprite set #3 as 3 bits per pixel
+ ROM_FILL( 0x9000, 0x1000, nullptr ) // empty space to decode sprite set #3 as 3 bits per pixel
ROM_REGION( 0x4000, "gfx4", 0 ) /* background tilemaps */
ROM_LOAD( "xvi_9.2a", 0x0000, 0x1000, CRC(57ed9879) SHA1(3106d1aacff06cf78371bd19967141072b32b7d7) )
@@ -2955,7 +2955,7 @@ ROM_START( sxeviousj )
ROM_LOAD( "xvi_16.4n", 0x4000, 0x1000, CRC(605ca889) SHA1(3bf380ef76c03822a042ecc73b5edd4543c268ce) ) /* sprite set #3, planes 0/1 */
ROM_LOAD( "xvi_18.4r", 0x5000, 0x2000, CRC(02417d19) SHA1(b5f830dd2cf25cf154308d2e640f0ecdcda5d8cd) ) /* sprite set #1, plane 2, set #2, plane 2 */
/* 0x7000-0x8fff will be unpacked from 0x5000-0x6fff */
- ROM_FILL( 0x9000, 0x1000, 0x00 ) // empty space to decode sprite set #3 as 3 bits per pixel
+ ROM_FILL( 0x9000, 0x1000, nullptr ) // empty space to decode sprite set #3 as 3 bits per pixel
ROM_REGION( 0x4000, "gfx4", 0 ) /* background tilemaps */
ROM_LOAD( "xvi_9.2a", 0x0000, 0x1000, CRC(57ed9879) SHA1(3106d1aacff06cf78371bd19967141072b32b7d7) )
diff --git a/src/mame/drivers/galaxi.cpp b/src/mame/drivers/galaxi.cpp
index f22f0176fa8..54dbbcfc498 100644
--- a/src/mame/drivers/galaxi.cpp
+++ b/src/mame/drivers/galaxi.cpp
@@ -322,11 +322,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, (void *)0 ) // hopper sensor
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state,hopper_r, (void *)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, (void *)0 ) // ticket sensor
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state,ticket_r, (void *)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)
@@ -342,11 +342,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, (void *)0 ) // hopper sensor
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_SPECIAL )PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state,hopper_r, (void *)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, (void *)0 ) // ticket sensor
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state,ticket_r, (void *)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 45b20a08663..5337e4e841d 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -833,7 +833,7 @@ WRITE8_MEMBER(galaxian_state::konami_sound_filter_w)
/* AV0 .. AV5 ==> AY8910 #2 */
/* AV6 .. AV11 ==> AY8910 #1 */
for (which = 0; which < 2; which++)
- if (machine().device(ayname[which]) != NULL)
+ if (machine().device(ayname[which]) != nullptr)
for (chan = 0; chan < 3; chan++)
{
UINT8 bits = (offset >> (2 * chan + 6 * (1 - which))) & 3;
@@ -2448,7 +2448,7 @@ static INPUT_PORTS_START( azurian )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, azurian_port_r, (void *)0) /* "linked" with bit 2 of IN2 */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, azurian_port_r, (void *)nullptr) /* "linked" with bit 2 of IN2 */
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x80, "5" )
@@ -4279,7 +4279,7 @@ static INPUT_PORTS_START( scramble )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, scramble_protection_alt_r, (void *)0) /* protection bit */
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, scramble_protection_alt_r, (void *)nullptr) /* protection bit */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, scramble_protection_alt_r, (void *)1) /* protection bit */
@@ -4732,7 +4732,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, (void *)0)
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, moonwar_dial_r, (void *)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 )
@@ -6127,8 +6127,8 @@ void galaxian_state::common_init(galaxian_draw_bullet_func draw_bullet,galaxian_
m_sprites_base = 0x40;
m_frogger_adjust = FALSE;
m_sfx_tilemap = FALSE;
- m_draw_bullet_ptr = (draw_bullet != NULL) ? draw_bullet : &galaxian_state::galaxian_draw_bullet;
- m_draw_background_ptr = (draw_background != NULL) ? draw_background : &galaxian_state::galaxian_draw_background;
+ m_draw_bullet_ptr = (draw_bullet != nullptr) ? draw_bullet : &galaxian_state::galaxian_draw_bullet;
+ m_draw_background_ptr = (draw_background != nullptr) ? draw_background : &galaxian_state::galaxian_draw_background;
m_extend_tile_info_ptr = extend_tile_info;
m_extend_sprite_info_ptr = extend_sprite_info;
}
@@ -6153,7 +6153,7 @@ void galaxian_state::unmap_galaxian_sound(offs_t base)
DRIVER_INIT_MEMBER(galaxian_state,galaxian)
{
- common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, NULL);
+ common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
}
@@ -6174,7 +6174,7 @@ DRIVER_INIT_MEMBER(galaxian_state,azurian)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* yellow bullets instead of white ones */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
/* coin lockout disabled */
space.unmap_write(0x6002, 0x6002, 0, 0x7f8);
@@ -6193,7 +6193,7 @@ DRIVER_INIT_MEMBER(galaxian_state,gmgalax)
membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x4000);
/* callback when the game select is toggled */
- gmgalax_game_changed(*machine().ioport().first_port()->first_field(), NULL, 0, 0);
+ gmgalax_game_changed(*machine().ioport().first_port()->first_field(), nullptr, 0, 0);
save_item(NAME(m_gmgalax_selected_game));
}
@@ -6373,7 +6373,7 @@ DRIVER_INIT_MEMBER(galaxian_state,tenspot)
DRIVER_INIT_MEMBER(galaxian_state,devilfsg)
{
/* video extensions */
- common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, NULL);
+ common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
/* IRQ line is INT, not NMI */
m_irq_line = 0;
@@ -6385,8 +6385,8 @@ DRIVER_INIT_MEMBER(galaxian_state,zigzag)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(NULL, &galaxian_state::galaxian_draw_background, NULL, NULL);
- m_draw_bullet_ptr = NULL;
+ common_init(nullptr, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
+ m_draw_bullet_ptr = nullptr;
/* two sprite generators */
m_numspritegens = 2;
@@ -6449,7 +6449,7 @@ DRIVER_INIT_MEMBER(galaxian_state,checkmaj)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, NULL);
+ common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
/* attach the sound command handler */
space.install_write_handler(0x7800, 0x7800, 0, 0x7ff, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this));
@@ -6464,7 +6464,7 @@ DRIVER_INIT_MEMBER(galaxian_state,dingo)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, NULL);
+ common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
/* attach the sound command handler */
space.install_write_handler(0x7800, 0x7800, 0, 0x7ff, write8_delegate(FUNC(galaxian_state::checkman_sound_command_w),this));
@@ -6519,7 +6519,7 @@ DRIVER_INIT_MEMBER(galaxian_state,kong)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, &galaxian_state::upper_extend_sprite_info);
+ common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, &galaxian_state::upper_extend_sprite_info);
/* needs a full 2k of RAM */
space.install_ram(0x8000, 0x87ff);
@@ -6605,7 +6605,7 @@ DRIVER_INIT_MEMBER(galaxian_state,mshuttlj)
DRIVER_INIT_MEMBER(galaxian_state,fantastc)
{
/* video extensions */
- common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, &galaxian_state::upper_extend_sprite_info);
+ common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, &galaxian_state::upper_extend_sprite_info);
/* two sprite generators */
m_numspritegens = 2;
@@ -6644,7 +6644,7 @@ DRIVER_INIT_MEMBER(galaxian_state,timefgtr)
m_bullets_base = 0xc0;
/* video extensions */
- common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, &galaxian_state::upper_extend_sprite_info);
+ common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, &galaxian_state::upper_extend_sprite_info);
}
@@ -6653,7 +6653,7 @@ DRIVER_INIT_MEMBER(galaxian_state,kingball)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, NULL);
+ common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
/* disable the stars */
space.unmap_write(0xb004, 0xb004, 0, 0x07f8);
@@ -6718,7 +6718,7 @@ DRIVER_INIT_MEMBER(galaxian_state,theend)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(&galaxian_state::theend_draw_bullet, &galaxian_state::galaxian_draw_background, NULL, NULL);
+ common_init(&galaxian_state::theend_draw_bullet, &galaxian_state::galaxian_draw_background, nullptr, nullptr);
/* coin counter on the upper bit of port C */
space.unmap_write(0x6802, 0x6802, 0, 0x7f8);
@@ -6728,7 +6728,7 @@ DRIVER_INIT_MEMBER(galaxian_state,theend)
DRIVER_INIT_MEMBER(galaxian_state,scramble)
{
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
}
@@ -6737,7 +6737,7 @@ DRIVER_INIT_MEMBER(galaxian_state,explorer)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
/* watchdog works for writes as well? (or is it just disabled?) */
space.install_write_handler(0x7000, 0x7000, 0, 0x7ff, write8_delegate(FUNC(galaxian_state::watchdog_reset_w),this));
@@ -6756,7 +6756,7 @@ DRIVER_INIT_MEMBER(galaxian_state,explorer)
DRIVER_INIT_MEMBER(galaxian_state,sfx)
{
/* basic configuration */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, &galaxian_state::upper_extend_tile_info, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, &galaxian_state::upper_extend_tile_info, nullptr);
m_sfx_tilemap = TRUE;
/* sound board has space for extra ROM */
@@ -6770,7 +6770,7 @@ DRIVER_INIT_MEMBER(galaxian_state,atlantis)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
/* watchdog is at $7800? (or is it just disabled?) */
space.unmap_read(0x7000, 0x7000, 0, 0x7ff);
@@ -6784,7 +6784,7 @@ DRIVER_INIT_MEMBER(galaxian_state,atlantis)
DRIVER_INIT_MEMBER(galaxian_state,scobra)
{
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
}
@@ -6813,14 +6813,14 @@ DRIVER_INIT_MEMBER(galaxian_state,scobrae)
}
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
}
DRIVER_INIT_MEMBER(galaxian_state,losttomb)
{
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
/* decrypt */
decode_losttomb_gfx();
@@ -6830,7 +6830,7 @@ DRIVER_INIT_MEMBER(galaxian_state,losttomb)
DRIVER_INIT_MEMBER(galaxian_state,frogger)
{
/* video extensions */
- common_init(NULL, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
+ common_init(nullptr, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
m_frogger_adjust = TRUE;
/* decrypt */
@@ -6842,7 +6842,7 @@ DRIVER_INIT_MEMBER(galaxian_state,frogger)
DRIVER_INIT_MEMBER(galaxian_state,quaak)
{
/* video extensions */
- common_init(NULL, &galaxian_state::quaak_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
+ common_init(nullptr, &galaxian_state::quaak_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
}
@@ -6851,7 +6851,7 @@ DRIVER_INIT_MEMBER(galaxian_state,froggermc)
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(NULL, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
+ common_init(nullptr, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
space.install_write_handler(0xa800, 0xa800, 0, 0x7ff, write8_delegate(FUNC(galaxian_state::soundlatch_byte_w),this));
space.install_write_handler(0xb001, 0xb001, 0, 0x7f8, write8_delegate(FUNC(galaxian_state::froggermc_sound_control_w),this));
@@ -6867,7 +6867,7 @@ DRIVER_INIT_MEMBER(galaxian_state,froggermc)
DRIVER_INIT_MEMBER(galaxian_state,froggers)
{
/* video extensions */
- common_init(NULL, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
+ common_init(nullptr, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
/* decrypt */
decode_frogger_sound();
@@ -6877,7 +6877,7 @@ DRIVER_INIT_MEMBER(galaxian_state,froggers)
DRIVER_INIT_MEMBER(galaxian_state,turtles)
{
/* video extensions */
- common_init(NULL, &galaxian_state::turtles_draw_background, NULL, NULL);
+ common_init(nullptr, &galaxian_state::turtles_draw_background, nullptr, nullptr);
}
@@ -6933,7 +6933,7 @@ DRIVER_INIT_MEMBER(galaxian_state,scorpion)
DRIVER_INIT_MEMBER(galaxian_state,anteater)
{
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::anteater_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::anteater_draw_background, nullptr, nullptr);
/* decode graphics */
decode_anteater_gfx();
@@ -6943,14 +6943,14 @@ DRIVER_INIT_MEMBER(galaxian_state,anteater)
DRIVER_INIT_MEMBER(galaxian_state,anteateruk)
{
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::anteater_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::anteater_draw_background, nullptr, nullptr);
}
DRIVER_INIT_MEMBER(galaxian_state,superbon)
{
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
/* decode code */
decode_superbon();
@@ -6960,14 +6960,14 @@ DRIVER_INIT_MEMBER(galaxian_state,superbon)
DRIVER_INIT_MEMBER(galaxian_state,calipso)
{
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, NULL, &galaxian_state::calipso_extend_sprite_info);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, &galaxian_state::calipso_extend_sprite_info);
}
DRIVER_INIT_MEMBER(galaxian_state,moonwar)
{
/* video extensions */
- common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, NULL, NULL);
+ common_init(&galaxian_state::scramble_draw_bullet, &galaxian_state::scramble_draw_background, nullptr, nullptr);
save_item(NAME(m_moonwar_port_select));
}
@@ -6986,7 +6986,7 @@ DRIVER_INIT_MEMBER( galaxian_state, ghostmun )
DRIVER_INIT_MEMBER( galaxian_state, froggrs )
{
/* video extensions */
- common_init(NULL, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
+ common_init(nullptr, &galaxian_state::frogger_draw_background, &galaxian_state::frogger_extend_tile_info, &galaxian_state::frogger_extend_sprite_info);
/* decrypt */
decode_frogger_sound();
@@ -8226,7 +8226,7 @@ ROM_START( pacmanbla ) /* content is the same as the above bootleg, but arranged
ROM_COPY( "tempgfx", 0x1800, 0x0800, 0x0800 )
ROM_REGION( 0x1000, "gfx2", 0 )
- ROM_COPY( "tempgfx", 0x0000, 0x0000, 0x0800 )
+ ROM_COPY( "tempgfx", nullptr, 0x0000, 0x0800 )
ROM_COPY( "tempgfx", 0x1000, 0x0800, 0x0800 )
ROM_REGION( 0x0020, "proms", 0 )
diff --git a/src/mame/drivers/gamecstl.cpp b/src/mame/drivers/gamecstl.cpp
index 4c6e764bf3d..33f3e7edfb5 100644
--- a/src/mame/drivers/gamecstl.cpp
+++ b/src/mame/drivers/gamecstl.cpp
@@ -437,10 +437,10 @@ static MACHINE_CONFIG_START( gamecstl, gamecstl_state )
MCFG_FRAGMENT_ADD( pcat_common )
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, intel82439tx_pci_r, intel82439tx_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(7, nullptr, intel82371ab_pci_r, intel82371ab_pci_w)
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
/* video hardware */
diff --git a/src/mame/drivers/gaplus.cpp b/src/mame/drivers/gaplus.cpp
index 9bd60dcf29c..85a49598835 100644
--- a/src/mame/drivers/gaplus.cpp
+++ b/src/mame/drivers/gaplus.cpp
@@ -463,7 +463,7 @@ static const char *const gaplus_sample_names[] =
{
"*gaplus",
"bang",
- 0
+ nullptr
};
/***************************************************************************
@@ -633,7 +633,7 @@ ROM_START( gaplus ) /* Version 2 or 3 PCB */
ROM_LOAD( "gp2-12.11r", 0x4000, 0x2000, CRC(7316a1f1) SHA1(368e4541a5151e906a189712bc05192c2ceec8ae) ) /* objects */
ROM_LOAD( "gp2-9.11m", 0x6000, 0x2000, CRC(e6a9ae67) SHA1(99c1e67c3b216aa1b63f199e21c73cdedde80e1b) ) /* objects */
/* 0x8000-0x9fff will be unpacked from 0x6000-0x7fff */
- ROM_FILL( 0xa000, 0x2000, 0x00 ) // optional ROM, not used
+ ROM_FILL( 0xa000, 0x2000, nullptr ) // optional ROM, not used
ROM_REGION( 0x0800, "proms", 0 )
ROM_LOAD( "gp2-3.1p", 0x0000, 0x0100, CRC(a5091352) SHA1(dcd6dfbfbd5281ba0c7b7c189d6fde23617ed3e3) ) /* red palette ROM (4 bits) */
@@ -674,7 +674,7 @@ ROM_START( gaplusa ) /* Version 2 or 3 PCB */
ROM_LOAD( "gp2-12.11r", 0x4000, 0x2000, CRC(7316a1f1) SHA1(368e4541a5151e906a189712bc05192c2ceec8ae) ) /* objects */
ROM_LOAD( "gp2-9.11m", 0x6000, 0x2000, CRC(e6a9ae67) SHA1(99c1e67c3b216aa1b63f199e21c73cdedde80e1b) ) /* objects */
/* 0x8000-0x9fff will be unpacked from 0x6000-0x7fff */
- ROM_FILL( 0xa000, 0x2000, 0x00 ) // optional ROM, not used
+ ROM_FILL( 0xa000, 0x2000, nullptr ) // optional ROM, not used
ROM_REGION( 0x0800, "proms", 0 )
ROM_LOAD( "gp2-3.1p", 0x0000, 0x0100, CRC(a5091352) SHA1(dcd6dfbfbd5281ba0c7b7c189d6fde23617ed3e3) ) /* red palette ROM (4 bits) */
@@ -715,7 +715,7 @@ ROM_START( gaplusd ) /* Alternate hardware */
ROM_LOAD( "gp2-12.11r", 0x4000, 0x2000, CRC(7316a1f1) SHA1(368e4541a5151e906a189712bc05192c2ceec8ae) ) /* objects */
ROM_LOAD( "gp2-9.11m", 0x6000, 0x2000, CRC(e6a9ae67) SHA1(99c1e67c3b216aa1b63f199e21c73cdedde80e1b) ) /* objects */
/* 0x8000-0x9fff will be unpacked from 0x6000-0x7fff */
- ROM_FILL( 0xa000, 0x2000, 0x00 ) // optional ROM, not used
+ ROM_FILL( 0xa000, 0x2000, nullptr ) // optional ROM, not used
ROM_REGION( 0x0800, "proms", 0 )
ROM_LOAD( "gp2-3.1p", 0x0000, 0x0100, CRC(a5091352) SHA1(dcd6dfbfbd5281ba0c7b7c189d6fde23617ed3e3) ) /* red palette ROM (4 bits) */
@@ -756,7 +756,7 @@ ROM_START( gaplust ) /* Tecfri PCB */
ROM_LOAD( "gp2-12.11r", 0x4000, 0x2000, CRC(7316a1f1) SHA1(368e4541a5151e906a189712bc05192c2ceec8ae) ) /* objects */
ROM_LOAD( "gp2-9.11m", 0x6000, 0x2000, CRC(e6a9ae67) SHA1(99c1e67c3b216aa1b63f199e21c73cdedde80e1b) ) /* objects */
/* 0x8000-0x9fff will be unpacked from 0x6000-0x7fff */
- ROM_FILL( 0xa000, 0x2000, 0x00 ) // optional ROM, not used
+ ROM_FILL( 0xa000, 0x2000, nullptr ) // optional ROM, not used
ROM_REGION( 0x0800, "proms", 0 )
ROM_LOAD( "gp2-3.1p", 0x0000, 0x0100, CRC(a5091352) SHA1(dcd6dfbfbd5281ba0c7b7c189d6fde23617ed3e3) ) /* red palette ROM (4 bits) */
@@ -797,7 +797,7 @@ ROM_START( galaga3 ) /* Version 2 or 3 PCB */
ROM_LOAD( "gp2-12.11r", 0x4000, 0x2000, CRC(7316a1f1) SHA1(368e4541a5151e906a189712bc05192c2ceec8ae) ) /* objects */
ROM_LOAD( "gp2-9.11m", 0x6000, 0x2000, CRC(e6a9ae67) SHA1(99c1e67c3b216aa1b63f199e21c73cdedde80e1b) ) /* objects */
/* 0x8000-0x9fff will be unpacked from 0x6000-0x7fff */
- ROM_FILL( 0xa000, 0x2000, 0x00 ) // optional ROM, not used
+ ROM_FILL( 0xa000, 0x2000, nullptr ) // optional ROM, not used
ROM_REGION( 0x0800, "proms", 0 )
ROM_LOAD( "gp2-3.1p", 0x0000, 0x0100, CRC(a5091352) SHA1(dcd6dfbfbd5281ba0c7b7c189d6fde23617ed3e3) ) /* red palette ROM (4 bits) */
@@ -838,7 +838,7 @@ ROM_START( galaga3a ) /* Version 2 or 3 PCB */
ROM_LOAD( "gp2-12.11r", 0x4000, 0x2000, CRC(7316a1f1) SHA1(368e4541a5151e906a189712bc05192c2ceec8ae) ) /* objects */
ROM_LOAD( "gp2-9.11m", 0x6000, 0x2000, CRC(e6a9ae67) SHA1(99c1e67c3b216aa1b63f199e21c73cdedde80e1b) ) /* objects */
/* 0x8000-0x9fff will be unpacked from 0x6000-0x7fff */
- ROM_FILL( 0xa000, 0x2000, 0x00 ) // optional ROM, not used
+ ROM_FILL( 0xa000, 0x2000, nullptr ) // optional ROM, not used
ROM_REGION( 0x0800, "proms", 0 )
ROM_LOAD( "gp2-3.1p", 0x0000, 0x0100, CRC(a5091352) SHA1(dcd6dfbfbd5281ba0c7b7c189d6fde23617ed3e3) ) /* red palette ROM (4 bits) */
@@ -879,7 +879,7 @@ ROM_START( galaga3b ) /* Version 2 or 3 PCB */
ROM_LOAD( "gp2-12.11r", 0x4000, 0x2000, CRC(7316a1f1) SHA1(368e4541a5151e906a189712bc05192c2ceec8ae) ) /* objects */
ROM_LOAD( "gp2-9.11m", 0x6000, 0x2000, CRC(e6a9ae67) SHA1(99c1e67c3b216aa1b63f199e21c73cdedde80e1b) ) /* objects */
/* 0x8000-0x9fff will be unpacked from 0x6000-0x7fff */
- ROM_FILL( 0xa000, 0x2000, 0x00 ) // optional ROM, not used
+ ROM_FILL( 0xa000, 0x2000, nullptr ) // optional ROM, not used
ROM_REGION( 0x0800, "proms", 0 )
ROM_LOAD( "gp2-3.1p", 0x0000, 0x0100, CRC(a5091352) SHA1(dcd6dfbfbd5281ba0c7b7c189d6fde23617ed3e3) ) /* red palette ROM (4 bits) */
@@ -921,7 +921,7 @@ ROM_START( galaga3c ) /* Version (AKA Midway) 1 PCB */
ROM_LOAD( "gp2-12.5k", 0x4000, 0x2000, CRC(7316a1f1) SHA1(368e4541a5151e906a189712bc05192c2ceec8ae) ) /* objects */
ROM_LOAD( "gp2-9.5n", 0x6000, 0x2000, CRC(e6a9ae67) SHA1(99c1e67c3b216aa1b63f199e21c73cdedde80e1b) ) /* objects */
/* 0x8000-0x9fff will be unpacked from 0x6000-0x7fff */
- ROM_FILL( 0xa000, 0x2000, 0x00 ) // optional ROM, not used
+ ROM_FILL( 0xa000, 0x2000, nullptr ) // optional ROM, not used
ROM_REGION( 0x0800, "proms", 0 )
ROM_LOAD( "gp2-3.1c", 0x0000, 0x0100, CRC(a5091352) SHA1(dcd6dfbfbd5281ba0c7b7c189d6fde23617ed3e3) ) /* red palette ROM (4 bits) */
@@ -959,7 +959,7 @@ ROM_START( galaga3m ) /* Version (AKA Midway) 1 PCB */
ROM_LOAD( "gp2-12.5k", 0x4000, 0x2000, CRC(7316a1f1) SHA1(368e4541a5151e906a189712bc05192c2ceec8ae) ) /* objects */
ROM_LOAD( "gp2-9.5n", 0x6000, 0x2000, CRC(e6a9ae67) SHA1(99c1e67c3b216aa1b63f199e21c73cdedde80e1b) ) /* objects */
/* 0x8000-0x9fff will be unpacked from 0x6000-0x7fff */
- ROM_FILL( 0xa000, 0x2000, 0x00 ) // optional ROM, not used
+ ROM_FILL( 0xa000, 0x2000, nullptr ) // optional ROM, not used
ROM_REGION( 0x0800, "proms", 0 )
ROM_LOAD( "gp2-3.1c", 0x0000, 0x0100, CRC(a5091352) SHA1(dcd6dfbfbd5281ba0c7b7c189d6fde23617ed3e3) ) /* red palette ROM (4 bits) */
diff --git a/src/mame/drivers/gb.cpp b/src/mame/drivers/gb.cpp
index 54872914d4e..d5f7331e43b 100644
--- a/src/mame/drivers/gb.cpp
+++ b/src/mame/drivers/gb.cpp
@@ -779,7 +779,7 @@ static MACHINE_CONFIG_START( gameboy, gb_state )
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
/* cartslot */
- MCFG_GB_CARTRIDGE_ADD("gbslot", gb_cart, NULL)
+ MCFG_GB_CARTRIDGE_ADD("gbslot", gb_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","gameboy")
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("gbc_list","gbcolor")
@@ -890,7 +890,7 @@ static MACHINE_CONFIG_START( gbcolor, gb_state )
MCFG_RAM_DEFAULT_SIZE("48K") /* 2 pages of 8KB VRAM, 8 pages of 4KB RAM */
/* cartslot */
- MCFG_GB_CARTRIDGE_ADD("gbslot", gb_cart, NULL)
+ MCFG_GB_CARTRIDGE_ADD("gbslot", gb_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","gbcolor")
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("gb_list","gameboy")
@@ -932,7 +932,7 @@ static MACHINE_CONFIG_START( megaduck, megaduck_state )
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
/* cartslot */
- MCFG_MEGADUCK_CARTRIDGE_ADD("duckslot", megaduck_cart, NULL)
+ MCFG_MEGADUCK_CARTRIDGE_ADD("duckslot", megaduck_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list", "megaduck")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp
index 328e8e918cc..3f8ae3f392a 100644
--- a/src/mame/drivers/gba.cpp
+++ b/src/mame/drivers/gba.cpp
@@ -240,7 +240,7 @@ void gba_state::dma_exec(FPTR ch)
// printf("settng DMA timer %d for %d cycs (tmr %x)\n", ch, cnt, (UINT32)m_dma_timer[ch]);
// m_dma_timer[ch]->adjust(ATTOTIME_IN_CYCLES(0, cnt), ch);
- dma_complete(NULL, ch);
+ dma_complete(nullptr, ch);
}
void gba_state::audio_tick(int ref)
@@ -2279,7 +2279,7 @@ static MACHINE_CONFIG_START( gbadv, gba_state )
MCFG_SOUND_ADD("direct_b_right", DAC, 0) // GBA direct sound B right
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "spkright", 0.50)
- MCFG_GBA_CARTRIDGE_ADD("cartslot", gba_cart, NULL)
+ MCFG_GBA_CARTRIDGE_ADD("cartslot", gba_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","gba")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/gcpinbal.cpp b/src/mame/drivers/gcpinbal.cpp
index c7a3a40650c..5ff65a0ed55 100644
--- a/src/mame/drivers/gcpinbal.cpp
+++ b/src/mame/drivers/gcpinbal.cpp
@@ -503,7 +503,7 @@ MACHINE_CONFIG_END
ROM_START( gcpinbal )
ROM_REGION( 0x200000, "maincpu", 0 ) /* 512k for 68000 program */
ROM_LOAD16_WORD_SWAP( "2_excellent.u43", 0x000000, 0x80000, CRC(d174bd7f) SHA1(0e6c17265e1400de941e3e2ca3be835aaaff6695) ) /* Red line across label */
- ROM_FILL ( 0x80000, 0x080000, 0x0 ) /* unpopulated 27C4096 socket at U44 */
+ ROM_FILL ( 0x80000, 0x080000, nullptr ) /* unpopulated 27C4096 socket at U44 */
ROM_LOAD16_WORD_SWAP( "3_excellent.u45", 0x100000, 0x80000, CRC(0511ad56) SHA1(e0602ece514126ce719ebc9de6649ebe907be904) )
ROM_LOAD16_WORD_SWAP( "4_excellent.u46", 0x180000, 0x80000, CRC(e0f3a1b4) SHA1(761dddf374a92c1a1e4a211ead215d5be461a082) )
diff --git a/src/mame/drivers/gei.cpp b/src/mame/drivers/gei.cpp
index 60d60384c01..e922652ac6b 100644
--- a/src/mame/drivers/gei.cpp
+++ b/src/mame/drivers/gei.cpp
@@ -209,7 +209,7 @@ WRITE8_MEMBER(gei_state::sound_w)
set_led_status(machine(), 9,data & 0x08);
/* bit 5 - ticket out in trivia games */
- if (m_ticket != NULL)
+ if (m_ticket != nullptr)
m_ticket->write(machine().driver_data()->generic_space(), 0, (data & 0x20)<< 2);
/* bit 6 enables NMI */
diff --git a/src/mame/drivers/geneve.cpp b/src/mame/drivers/geneve.cpp
index c366b70b2e7..0a0d6e3303f 100644
--- a/src/mame/drivers/geneve.cpp
+++ b/src/mame/drivers/geneve.cpp
@@ -756,10 +756,10 @@ ROM_START(geneve)
ROM_LOAD_OPTIONAL("gnmbt100.bin", 0x8000, 0x4000, CRC(19b89479) SHA1(6ef297eda78dc705946f6494e9d7e95e5216ec47)) /* CPU ROMs GenMod */
ROM_REGION(SRAM_SIZE, SRAM_TAG, 0)
- ROM_FILL(0x0000, SRAM_SIZE, 0)
+ ROM_FILL(0x0000, SRAM_SIZE, nullptr)
ROM_REGION(DRAM_SIZE, DRAM_TAG, 0)
- ROM_FILL(0x0000, DRAM_SIZE, 0)
+ ROM_FILL(0x0000, DRAM_SIZE, nullptr)
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */
diff --git a/src/mame/drivers/geniusiq.cpp b/src/mame/drivers/geniusiq.cpp
index 516788899c5..f26da7f8952 100644
--- a/src/mame/drivers/geniusiq.cpp
+++ b/src/mame/drivers/geniusiq.cpp
@@ -770,7 +770,7 @@ DEVICE_IMAGE_LOAD_MEMBER(geniusiq_state,iq128_cart)
m_cart_state = IQ128_ROM_CART;
- if (image.software_entry() != NULL)
+ if (image.software_entry() != nullptr)
{
const char *pcb_type = image.get_feature("pcb_type");
if (pcb_type)
diff --git a/src/mame/drivers/genpc.cpp b/src/mame/drivers/genpc.cpp
index edf7297b96b..72d267b69af 100644
--- a/src/mame/drivers/genpc.cpp
+++ b/src/mame/drivers/genpc.cpp
@@ -85,7 +85,7 @@ static MACHINE_CONFIG_START( pcmda, genpc_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "fdc_xt", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "hdc", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "adlib", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
/* keyboard */
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
@@ -113,7 +113,7 @@ static MACHINE_CONFIG_START( pcherc, genpc_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "fdc_xt", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "hdc", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "adlib", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
/* keyboard */
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
@@ -142,7 +142,7 @@ static MACHINE_CONFIG_START( pccga, genpc_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "fdc_xt", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "hdc", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "sblaster1_0", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
/* keyboard */
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
@@ -171,7 +171,7 @@ static MACHINE_CONFIG_START( pcega, genpc_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "hdc", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "sblaster1_0", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "ega", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
/* keyboard */
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
@@ -200,7 +200,7 @@ static MACHINE_CONFIG_START( xtvga, genpc_state )
MCFG_ISA8_SLOT_ADD("mb:isa","isa3", pc_isa8_cards, "hdc", false)
MCFG_ISA8_SLOT_ADD("mb:isa","isa4", pc_isa8_cards, "sblaster1_0", false)
MCFG_ISA8_SLOT_ADD("mb:isa","isa5", pc_isa8_cards, "svga_et4k", false)
- MCFG_ISA8_SLOT_ADD("mb:isa","isa6", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa","isa6", pc_isa8_cards, nullptr, false)
/* keyboard */
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
diff --git a/src/mame/drivers/gimix.cpp b/src/mame/drivers/gimix.cpp
index e695ab827f6..efd62e1a1f4 100644
--- a/src/mame/drivers/gimix.cpp
+++ b/src/mame/drivers/gimix.cpp
@@ -619,7 +619,7 @@ static MACHINE_CONFIG_START( gimix, gimix_state )
MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE("serial4",rs232_port_device,write_txd))
MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE("serial4",rs232_port_device,write_rts))
- MCFG_RS232_PORT_ADD("serial1",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("serial1",default_rs232_devices,nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia1",acia6850_device,write_rxd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia1",acia6850_device,write_cts))
@@ -627,11 +627,11 @@ static MACHINE_CONFIG_START( gimix, gimix_state )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia2",acia6850_device,write_rxd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia2",acia6850_device,write_cts))
- MCFG_RS232_PORT_ADD("serial3",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("serial3",default_rs232_devices,nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia3",acia6850_device,write_rxd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia3",acia6850_device,write_cts))
- MCFG_RS232_PORT_ADD("serial4",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("serial4",default_rs232_devices,nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia4",acia6850_device,write_rxd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia4",acia6850_device,write_cts))
diff --git a/src/mame/drivers/goldnpkr.cpp b/src/mame/drivers/goldnpkr.cpp
index 5060c1aec9f..6ce338ff060 100644
--- a/src/mame/drivers/goldnpkr.cpp
+++ b/src/mame/drivers/goldnpkr.cpp
@@ -1241,7 +1241,7 @@ PALETTE_INIT_MEMBER(goldnpkr_state, goldnpkr)
int i;
/* 0000IBGR */
- if (color_prom == 0) return;
+ if (color_prom == nullptr) return;
for (i = 0;i < palette.entries();i++)
{
@@ -1293,7 +1293,7 @@ PALETTE_INIT_MEMBER(goldnpkr_state,witchcrd)
/* 0000KBGR */
- if (color_prom == 0) return;
+ if (color_prom == nullptr) return;
for (i = 0;i < palette.entries();i++)
{
@@ -1337,7 +1337,7 @@ PALETTE_INIT_MEMBER(goldnpkr_state,wcrdxtnd)
/* 0000KBGR */
- if (color_prom == 0) return;
+ if (color_prom == nullptr) return;
for (i = 0;i < palette.entries();i++)
{
@@ -4246,7 +4246,7 @@ ROM_START( goldnpkr )
ROM_LOAD( "ups39_12a.bin", 0x0000, 0x8000, CRC(216b45fb) SHA1(fbfcd98cc39b2e791cceb845b166ff697f584add) )
ROM_REGION( 0x6000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x4000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38_5a.bin", 0x4000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) ) /* text layer */
ROM_REGION( 0x6000, "gfx2", 0 )
@@ -4268,7 +4268,7 @@ ROM_START( goldnpkb )
ROM_LOAD( "ups31h.12a", 0x0000, 0x8000, CRC(bee5b07a) SHA1(5da60292ecbbedd963c273eac2a1fb88ad66ada8) )
ROM_REGION( 0x6000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x4000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38_5a.bin", 0x4000, 0x2000, CRC(32705e1d) SHA1(84f9305af38179985e0224ae2ea54c01dfef6e12) ) /* text layer */
ROM_REGION( 0x6000, "gfx2", 0 )
@@ -4289,7 +4289,7 @@ ROM_START( videtron )
ROM_LOAD( "5.bin", 0x6000, 0x2000, CRC(395fbc5c) SHA1(f742d7a9312828997a4323ac2b957048687fbed2) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "3.bin", 0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4308,7 +4308,7 @@ ROM_START( videtron2 )
ROM_LOAD( "6.bin", 0x7000, 0x1000, CRC(490c7304) SHA1(1a6c6112571fd0e35b640ed58f66582a2d99c58b) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "3.bin", 0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4330,7 +4330,7 @@ ROM_START( videtrna )
ROM_LOAD( "videotron_poker.prg", 0x6000, 0x2000, CRC(960dcb61) SHA1(a7da40383b0149d21156b461c144d345603d747a) )
ROM_REGION( 0x3000, "gfx1", 0 ) /* taken from videtron */
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "3.bin", 0x2000, 0x0800, BAD_DUMP CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 ) /* taken from videtron */
@@ -4358,7 +4358,7 @@ ROM_START( pottnpkr ) /* Golden Poker style game. Code is intended to start at
ROM_LOAD( "ic14_4.bin", 0x3000, 0x1000, CRC(86a03aab) SHA1(0c4e8699b9fc9943de1fa0a364e043b3878636dc) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "ic7_0.bin", 0x2000, 0x1000, CRC(1090e7f0) SHA1(26a7fc8853debb9a759811d7fee39410614c3895) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4376,7 +4376,7 @@ ROM_START( potnpkra ) /* a Coinmaster game?... seems to be a hack */
ROM_LOAD( "vp-6.bin", 0x3000, 0x1000, CRC(94f82fc1) SHA1(ce95fc429f5389eea45fec877bac992fa7ba2b3c) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "vp-4.bin", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4405,7 +4405,7 @@ ROM_START( potnpkrb )
ROM_LOAD( "517.17a", 0x3000, 0x1000, CRC(75a72877) SHA1(9df8fd2c98526d20aa0fa056a7b71b5c5fb5206b) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "517.8a", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4435,7 +4435,7 @@ ROM_START( potnpkrc )
ROM_LOAD( "pottpok6.bin", 0x3000, 0x1000, CRC(53237873) SHA1(b640cb3db2513784c8d2d8983a17352276c11e07) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "pottpok1.bin", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4453,7 +4453,7 @@ ROM_START( potnpkrd )
ROM_LOAD( "pot6.bin", 0x3000, 0x1000, CRC(53237873) SHA1(b640cb3db2513784c8d2d8983a17352276c11e07) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "pot34.bin", 0x2000, 0x1000, CRC(52fd35d2) SHA1(ad8bf8c222ceb2e9b3b6d9033866867f1977c65f) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4471,7 +4471,7 @@ ROM_START( potnpkre )
ROM_LOAD( "g_luck_b.bin", 0x3000, 0x1000, CRC(7e848e5e) SHA1(45461cfcce06f6240562761d26ba7fdb7ef4986b) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "ic7_0.bin", 0x2000, 0x1000, CRC(1090e7f0) SHA1(26a7fc8853debb9a759811d7fee39410614c3895) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4500,7 +4500,7 @@ ROM_START( potnpkrf )
ROM_LOAD( "prg.bin", 0x4000, 0x4000, CRC(d7a932a2) SHA1(c940ea90378a631c217a09c4a9e73c382acaa48d) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "3.bin", 0x2000, 0x0800, CRC(23e83e89) SHA1(0c6352d46e3dfe176b0e970dd163e2bc01246890) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4521,7 +4521,7 @@ ROM_START( potnpkrg )
ROM_LOAD( "unknown.17a", 0x3000, 0x1000, CRC(1a9cfbf9) SHA1(47b3767dbcb016ae9ba4437d8f2790681553a5b0) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "unknown1.bin", 0x1000, 0x0800, CRC(2c53493f) SHA1(9e71db51499294bb4b16e7d8013e5daf6f1f9d18) ) /* char ROM */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4543,7 +4543,7 @@ ROM_START( potnpkrh )
/* Backcard logo is different, showing 'FR'. The rest matches the common char gfx */
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "unk_2716.8a", 0x1000, 0x0800, CRC(a138afa6) SHA1(80c6d11086f78e36dfc01c15b23e70667fcf17fc) ) /* char ROM */
/* Backplane at 5a has two bits different against the common cards gfx
@@ -4563,7 +4563,7 @@ ROM_START( goodluck )
ROM_LOAD( "goodluck_glh6b.bin", 0x0000, 0x8000, CRC(2cfa4a2c) SHA1(720e2900f3a0ef2632aa201a63b5eba0570e6aa3) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4.bin", 0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4594,7 +4594,7 @@ ROM_START( ngold )
ROM_LOAD( "ngold_2a.17a", 0x3000, 0x1000, CRC(9d07f0fc) SHA1(493b2e778342e1d6b7753902b714c5478bd22bd5) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(f54c6f43) SHA1(fe66542b95259c10f7954d52d1bd5747ce99df42) ) /* char ROM */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4612,7 +4612,7 @@ ROM_START( ngolda )
ROM_LOAD( "2a.bin", 0x3000, 0x1000, CRC(9d07f0fc) SHA1(493b2e778342e1d6b7753902b714c5478bd22bd5) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(f54c6f43) SHA1(fe66542b95259c10f7954d52d1bd5747ce99df42) ) /* char ROM */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4630,7 +4630,7 @@ ROM_START( ngoldb )
ROM_LOAD( "pkr_2.bin", 0x3000, 0x1000, CRC(de03a57d) SHA1(db696a892497ead7aa4ed2c600ba819c3b41a082) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "0.bin", 0x1000, 0x0800, CRC(f54c6f43) SHA1(fe66542b95259c10f7954d52d1bd5747ce99df42) ) /* char ROM */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -4656,7 +4656,7 @@ ROM_START( bsuerte )
ROM_LOAD( "bs_chica.256", 0x0000, 0x8000, CRC(2e92b72b) SHA1(6c90fb265f2cb7ec40ddb0553b5b7fedfa89339c) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4673,7 +4673,7 @@ ROM_START( bsuertea )
ROM_LOAD( "ups39_12a.bin", 0x0000, 0x8000, CRC(e6b661b7) SHA1(b265f6814a168034d24bc1c25f67ece131281bc2) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4690,7 +4690,7 @@ ROM_START( bsuerteb )
ROM_LOAD( "bsrapida.128", 0x4000, 0x4000, CRC(a2c633fa) SHA1(7cda3f56e6bd8e6bfc36a68c16d2e63d76d4dac3) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4707,7 +4707,7 @@ ROM_START( bsuertec )
ROM_LOAD( "x10d4esp.16c", 0x0000, 0x8000, CRC(0606bab4) SHA1(624b0cef1a23a4e7ba2d2d256f30f73b1e455fa7) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4724,7 +4724,7 @@ ROM_START( bsuerted )
ROM_LOAD( "x10d4fix.bin", 0x0000, 0x8000, CRC(c5ecc419) SHA1(5538a1336b877d1780d9a0c5595b02e9b22ee17d) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4741,7 +4741,7 @@ ROM_START( bsuertee )
ROM_LOAD( "x10bb26.bin", 0x0000, 0x8000, CRC(57011385) SHA1(3cbfdb8dd261aa8ce27441326f0916640b13b67a) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4758,7 +4758,7 @@ ROM_START( bsuertef )
ROM_LOAD( "bscat.256", 0x0000, 0x8000, CRC(944accd3) SHA1(f1ed149b9dafe9cdf3745b9344f2ce1814027005) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4775,7 +4775,7 @@ ROM_START( bsuerteg )
ROM_LOAD( "bsjc.256", 0x0000, 0x8000, CRC(3a824d96) SHA1(1eb2b4630be10131416ff84213aa858a072896ac) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4792,7 +4792,7 @@ ROM_START( bsuerteh )
ROM_LOAD( "jc603d.256", 0x0000, 0x8000, CRC(25df69e5) SHA1(54d2798437b61bd0e1919fb62daf24ed9df42678) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4809,7 +4809,7 @@ ROM_START( bsuertei )
ROM_LOAD( "mcs.256", 0x0000, 0x8000, CRC(5c944e9d) SHA1(e394f8a32f4ebe622c0d0c30db5cb9d6d70b2126) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4826,7 +4826,7 @@ ROM_START( bsuertej )
ROM_LOAD( "bsgemini.256", 0x0000, 0x8000, CRC(883f94d0) SHA1(30ff337ed2f454f74dfa354c14a8ab422284d279) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4843,7 +4843,7 @@ ROM_START( bsuertek )
ROM_LOAD( "bsindarg.128", 0x4000, 0x4000, CRC(a9aaff1a) SHA1(13c9fbd0e9a04f42ded4dda0bb8a850de65cc671) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4860,7 +4860,7 @@ ROM_START( bsuertel )
ROM_LOAD( "bslacer.128", 0x4000, 0x4000, CRC(edc254f4) SHA1(20e5543e59bfd67a0afec7cbeeb7000f6bba6c69) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4877,7 +4877,7 @@ ROM_START( bsuertem )
ROM_LOAD( "bslacer.256", 0x0000, 0x8000, CRC(9f8a899a) SHA1(a1f3d0635b309d4734289b7ff48eceda69dfd3d0) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4894,7 +4894,7 @@ ROM_START( bsuerten )
ROM_LOAD( "bs_x10.128", 0x4000, 0x4000, CRC(2549ceeb) SHA1(8c17849c7e9c138c35df584cdc0eabf536edb3d9) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4911,7 +4911,7 @@ ROM_START( bsuerteo )
ROM_LOAD( "bs_x10.256", 0x0000, 0x8000, CRC(ad3427a6) SHA1(d0a954c86c0a4354b5cea4140b8da7a10f66337a) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4928,7 +4928,7 @@ ROM_START( bsuertep )
ROM_LOAD( "bs_p.128", 0x4000, 0x4000, CRC(9503cfef) SHA1(f3246621bb9dff3d357d4c99f7075509899ed05f) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4945,7 +4945,7 @@ ROM_START( bsuerteq )
ROM_LOAD( "bs_r4.128", 0x4000, 0x4000, CRC(22841e2f) SHA1(d547aa6ddb82aff0d87eeb9bae67281d22dc50d5) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4962,7 +4962,7 @@ ROM_START( bsuerter )
ROM_LOAD( "bs_100.128", 0x4000, 0x4000, CRC(1d3104e5) SHA1(9c0f00725270aa4d28b5a539431311bdca2f864a) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4979,7 +4979,7 @@ ROM_START( bsuertes )
ROM_LOAD( "bs_50.128", 0x4000, 0x4000, CRC(8c2e43ca) SHA1(3e3f0848964f4ee6f47ddcf2220ebd06d771eebf) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -4996,7 +4996,7 @@ ROM_START( bsuertet )
ROM_LOAD( "bs_c.128", 0x4000, 0x4000, CRC(8b605bdf) SHA1(a933149999937f44cb62a3b34ab55ac4b5a50f72) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -5013,7 +5013,7 @@ ROM_START( bsuerteu )
ROM_LOAD( "bs_origi.bin", 0x0000, 0x8000, CRC(63a1ba65) SHA1(2354461ec7ad75f7ff2699e89d40517463157aaa) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "u38.bin", 0x2000, 0x1000, CRC(0a159dfa) SHA1(0a9c8e6177b36831b365917a10042aac3383983d) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -5039,7 +5039,7 @@ ROM_END
ROM_LOAD( "epoxy_27128.bin", 0x4000, 0x4000, CRC(48186272) SHA1(d211bfa89404a292e6d0f0169ed11e1e74a361d9) ) /* epoxy block program ROM */
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "wc4.7a", 0x2000, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) ) /* text layer */
ROM_LOAD( "wc4.7a", 0x2800, 0x0800, CRC(6a392b10) SHA1(9f36ae2e5a9a8741c6687e9c875d7b45999d9d6d) ) /* text layer */
@@ -5061,7 +5061,7 @@ ROM_START( witchcda )
ROM_LOAD( "w_card.256", 0x0000, 0x8000, CRC(63a471f8) SHA1(96a2140e2da0050e7865a6662f707cf024130832) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -5081,7 +5081,7 @@ ROM_START( witchcdb )
ROM_LOAD( "w_card.128", 0x4000, 0x4000, CRC(11ecac96) SHA1(717709b31f3dfa09be321c14fbf0e95d492ad2f2) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "bs_4_wcspa.032", 0x2000, 0x1000, CRC(4e520c7a) SHA1(1de3ac4a150160c15f453b0d3f9d3cd3178bfedd) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -5101,7 +5101,7 @@ ROM_START( witchcdc )
ROM_LOAD( "wc_sbruj.256", 0x0000, 0x8000, CRC(5689ae41) SHA1(c7a624ec881204137489b147ce66cc9a9900650a) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "bs_4_wc.032", 0x2000, 0x1000, CRC(41924d13) SHA1(8ab69b6efdc20858960fa5df669470ba90b5f8d7) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -5127,7 +5127,7 @@ ROM_START( witchcdd )
ROM_LOAD( "12a.bin", 0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
ROM_REGION( 0x6000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x4000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "ce-3-tvg.bin", 0x4000, 0x2000, CRC(54b51497) SHA1(8c3a74377fde8c7c5a6b277a9c1e717e6bdd98f8) ) /* text layer */
ROM_REGION( 0x6000, "gfx2", 0 )
@@ -5154,7 +5154,7 @@ ROM_END
ROM_LOAD( "wc4.a7", 0x3000, 0x1000, CRC(d3694522) SHA1(0f66ff2dd5c7ac9bf91fa9f48eb9f356572e814c) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_COPY( "temp", 0x3800, 0x1000, 0x0800 ) /* 0800-0fff of wc4.a7 - charset */
ROM_REGION( 0x1800, "gfx2", 0 ) /* 2nd half of each ROM */
@@ -5180,7 +5180,7 @@ ROM_START( witchcdf )
ROM_LOAD( "$27.bin", 0x7000, 0x1000, CRC(e6f9c973) SHA1(f209d13d1565160bc2c05c6c4fce73d14a9a56ab) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "$14.bin", 0x2000, 0x1000, CRC(19b68bec) SHA1(b8ef17ba5545e2f104cd2783e5f1c97c400fcbbc) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -5212,13 +5212,13 @@ ROM_START( witchcdg )
ROM_REGION( 0x3000, "gfx2", 0 )
ROM_LOAD( "3.b5", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */
- ROM_FILL( 0x0800, 0x0800, 0 ) /* filling the bitplane */
+ ROM_FILL( 0x0800, 0x0800, nullptr ) /* filling the bitplane */
ROM_LOAD( "2.b3", 0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */
- ROM_FILL( 0x1800, 0x0800, 0 ) /* filling the bitplane */
+ ROM_FILL( 0x1800, 0x0800, nullptr ) /* filling the bitplane */
ROM_LOAD( "1.b1", 0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) ) /* cards deck gfx, bitplane3 */
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_COPY( "gfx2", 0x2800, 0x2000, 0x0800 ) /* srctag, srcoffs, offset, length */
ROM_REGION( 0x0100, "proms", 0 )
@@ -5240,7 +5240,7 @@ ROM_START( witchcdh )
ROM_LOAD( "prog3000.a12", 0x0000, 0x8000, CRC(a5c1186a) SHA1(b6c662bf489fbcccc3063ce55c957e630ba96ccb) )
ROM_REGION( 0x6000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x4000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "wc3050.a5", 0x4000, 0x2000, CRC(6f35b9c4) SHA1(df86687164f18f2bfe71e73cccd28fe4117e748c) ) /* text layer, alt gfx */
ROM_REGION( 0x6000, "gfx2", 0 )
@@ -5289,7 +5289,7 @@ ROM_START( witchcdi )
ROM_LOAD( "04.a12", 0x0000, 0x8000, CRC(0f662e02) SHA1(71d7344f63c11082beb4fb4eeb20b04780a9b14c) )
ROM_REGION( 0x6000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x4000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x4000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "03.a5", 0x4000, 0x2000, CRC(f181e5aa) SHA1(44a7696bd223effbc7542142a0c3c623c628071d) ) /* text layer */
ROM_REGION( 0x6000, "gfx2", 0 )
@@ -5315,13 +5315,13 @@ ROM_START( witchgme )
ROM_REGION( 0x3000, "gfx2", 0 )
ROM_LOAD( "1.2a", 0x0000, 0x0800, CRC(f2f94661) SHA1(f37f7c0dff680fd02897dae64e13e297d0fdb3e7) ) /* cards deck gfx, bitplane1 */
- ROM_FILL( 0x0800, 0x0800, 0 ) /* filling the bitplane */
+ ROM_FILL( 0x0800, 0x0800, nullptr ) /* filling the bitplane */
ROM_LOAD( "2.4a", 0x1000, 0x0800, CRC(6bbb1e2d) SHA1(51ee282219bf84218886ad11a24bc6a8e7337527) ) /* cards deck gfx, bitplane2 */
- ROM_FILL( 0x1800, 0x0800, 0 ) /* filling the bitplane */
+ ROM_FILL( 0x1800, 0x0800, nullptr ) /* filling the bitplane */
ROM_LOAD( "3.5a", 0x2000, 0x1000, CRC(8a17d1a7) SHA1(488e4eae287b05923bd6b378574e91cfe49d8c24) ) /* text layer */
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_COPY( "gfx2", 0x2800, 0x2000, 0x0800 ) /* srctag, srcoffs, offset, length */
ROM_REGION( 0x0100, "proms", 0 )
@@ -5340,7 +5340,7 @@ ROM_END
ROM_LOAD( "wc_epoxy.bin", 0x0000, 0x8000, CRC(33f1acd9) SHA1(2facb3d807b5b2a2978e567d0c1106c0a027621a) ) /* epoxy block program ROM */
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "wc4.7a", 0x2000, 0x1000, BAD_DUMP CRC(3bf07c44) SHA1(f6e859b142b7d4585b89ca609d8bc85c84fe2b09) ) /* text chars, corrupt */ // sldh
ROM_COPY( "gfx1", 0x2800, 0x2000, 0x0800 ) /* srctag, srcoffs, offset, length */
@@ -5374,8 +5374,8 @@ ROM_START( witchjol )
ROM_LOAD( "i.2a", 0x08000, 0x2000, CRC(d467f6e2) SHA1(6aaf4cdfb76f5efeeee45635fea120711483648e) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of iii.5a - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of iii.5a - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of i.2a - empty, bitplane 1 */
@@ -5479,8 +5479,8 @@ ROM_START( wldwitch )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -5575,8 +5575,8 @@ ROM_START( wldwitcha )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -5671,8 +5671,8 @@ ROM_START( wldwitchb )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -5767,8 +5767,8 @@ ROM_START( wldwitchc )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -5863,8 +5863,8 @@ ROM_START( wldwitchd )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -5959,8 +5959,8 @@ ROM_START( wldwitche )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6055,8 +6055,8 @@ ROM_START( wldwitchf )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6151,8 +6151,8 @@ ROM_START( wldwitchg )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6247,8 +6247,8 @@ ROM_START( wldwitchh )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6343,8 +6343,8 @@ ROM_START( wldwitchi )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6439,8 +6439,8 @@ ROM_START( wldwitchj )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6535,8 +6535,8 @@ ROM_START( wldwitchk )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6631,8 +6631,8 @@ ROM_START( wldwitchl )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6727,8 +6727,8 @@ ROM_START( wldwitchm )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6823,8 +6823,8 @@ ROM_START( wldwitchn )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -6919,8 +6919,8 @@ ROM_START( wldwitcho )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -7015,8 +7015,8 @@ ROM_START( wldwitchp )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -7111,8 +7111,8 @@ ROM_START( wldwitchq )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -7207,8 +7207,8 @@ ROM_START( wldwitchr )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -7303,8 +7303,8 @@ ROM_START( wldwitchs )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -7399,8 +7399,8 @@ ROM_START( wldwitcht )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -7495,8 +7495,8 @@ ROM_START( wldwitchu )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -7591,8 +7591,8 @@ ROM_START( wldwitchv )
ROM_LOAD( "01.a1", 0x08000, 0x8000, CRC(6d644987) SHA1(26243abe051f3266e2d1743ec599d4e8bbb692e4) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of 03.a3 - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of 01.a1 - empty, bitplane 1 */
@@ -7697,8 +7697,8 @@ ROM_START( wupndown ) /* Witch Up & Down (Export, 6T/12T ver 1.02) */
ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */
@@ -7790,8 +7790,8 @@ ROM_START( wupndowna ) /* Witch Up & Down (Export, 6T/12T ver 0.99, set 1) */
ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */
@@ -7883,8 +7883,8 @@ ROM_START( wupndownb ) /* Witch Up & Down (Export, 6T/12T ver 0.99, set 2) */
ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */
@@ -7976,8 +7976,8 @@ ROM_START( wupndownc ) /* Witch Up & Down (Export, 6T/12T ver 0.99, set 3) */
ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */
@@ -8069,8 +8069,8 @@ ROM_START( wupndownd ) /* Witch Up & Down (Export, 6T/12T ver 0.99T) */
ROM_LOAD( "updown3.bin", 0x10000, 0x8000, CRC(905c3224) SHA1(6356f2bd8a1f8952b186dc6f9ed1705d1e918a64) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of updown1.bin - char rom, bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of updown2.bin - empty, bitplane 1 */
@@ -8171,8 +8171,8 @@ ROM_START( wstrike ) /* Witch Strike (Export, 6T/12T ver 1.01A) */
ROM_LOAD( "wsrom3.bin", 0x10000, 0x8000, CRC(62692e92) SHA1(534a64abba4dabefa2fa1d2dfed0dc8a00d95156) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of wsrom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of wsrom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of wsrom2.bin - empty, bitplane 1 */
@@ -8264,8 +8264,8 @@ ROM_START( wstrikea ) /* Witch Strike (Export, 6T/12T ver 1.01B) */
ROM_LOAD( "wsrom3.bin", 0x10000, 0x8000, CRC(62692e92) SHA1(534a64abba4dabefa2fa1d2dfed0dc8a00d95156) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of wsrom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of wsrom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of wsrom2.bin - empty, bitplane 1 */
@@ -8364,8 +8364,8 @@ ROM_START( wtchjack ) /* Witch Jack 0.87-89 / 1996-10-08, GFX OK */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -8457,8 +8457,8 @@ ROM_START( wtchjacka ) /* Witch Jack 0.87-88 / 1996-10-02, GFX OK */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -8550,8 +8550,8 @@ ROM_START( wtchjackb ) /* Witch Jack 0.87 / 1996-07-16, GFX OK */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -8643,8 +8643,8 @@ ROM_START( wtchjackc ) /* Witch Jack 0.70S / 1996-03-26 */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -8736,8 +8736,8 @@ ROM_START( wtchjackd ) /* Witch Jack 0.70P / 1996-03-26 */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -8829,8 +8829,8 @@ ROM_START( wtchjacke ) /* Witch Jack 0.65 / 1995-10-19 */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -8922,8 +8922,8 @@ ROM_START( wtchjackf ) /* Witch Jack 0.64 / 1995-09-13 */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -9015,8 +9015,8 @@ ROM_START( wtchjackg ) /* Witch Jack 0.62 / 1995-08-02 */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -9108,8 +9108,8 @@ ROM_START( wtchjackh ) /* Witch Jack 0.40T / 1995-02-27, Not Working */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -9201,8 +9201,8 @@ ROM_START( wtchjacki ) /* Witch Jack 0.40 / 1995-02-27 */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -9294,8 +9294,8 @@ ROM_START( wtchjackj ) /* Witch Jackpot 0.25 / 1994-11-24 */
ROM_LOAD( "wj5x5_3zs.bin", 0x10000, 0x8000, BAD_DUMP CRC(708e1d7f) SHA1(518312fd0bc24d7895eae0cfa9dbad99e1adf67c) )
ROM_REGION( 0x1800, "gfx0", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* 0000-07ff of rom1.bin - char rom (placed ok), bitplane 3 */
ROM_REGION( 0x1800, "gfx1", 0 )
ROM_COPY( "temp", 0x08800, 0x0000, 0x0800 ) /* 0800-0fff of rom2.bin - empty, bitplane 1 */
@@ -9405,11 +9405,11 @@ ROM_START( falcnwld )
ROM_LOAD( "fw3.5a", 0x4000, 0x2000, BAD_DUMP CRC(98edfc82) SHA1(e3dd597245b55c3bc6ea86acf80ee024ca28f564) ) /* text layer + cards deck gfx, bitplane3 */
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
ROM_COPY( "temp", 0x4000, 0x1000, 0x0800 ) /* first quarter of fw3.5a */
ROM_REGION( 0x1800, "gfx2", 0 )
- ROM_COPY( "temp", 0x0000, 0x0000, 0x0800 ) /* first quarter of fw1.2a */
+ ROM_COPY( "temp", nullptr, 0x0000, 0x0800 ) /* first quarter of fw1.2a */
ROM_COPY( "temp", 0x2000, 0x0800, 0x0800 ) /* first quarter of fw2.4a */
ROM_COPY( "temp", 0x4800, 0x1000, 0x0800 ) /* second quarter of fw3.5a */
@@ -9431,7 +9431,7 @@ ROM_START( falcnwlda )
ROM_RELOAD( 0x8000, 0x8000 )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) ) /* chars gfx */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9450,7 +9450,7 @@ ROM_START( falcnwldb )
ROM_RELOAD( 0x8000, 0x8000 )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
ROM_LOAD( "fw4.7a", 0x1000, 0x0800, CRC(f0517b0d) SHA1(474bcf429f2539ff1f3d7d32d259c5973ccb0234) ) /* chars gfx */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9496,13 +9496,13 @@ ROM_START( falcnwldc )
ROM_LOAD( "3.b4", 0x1800, 0x0800, CRC(d9246780) SHA1(4ceb24131ec6208b742ba80373201aa53c50732d) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling bitplanes */
ROM_COPY( "temp", 0x0800, 0x1000, 0x0800 ) /* second half of 1.b1 */
ROM_REGION( 0x1800, "gfx2", 0 )
ROM_COPY( "temp", 0x1800, 0x0000, 0x0800 ) /* first half of 3.b4 */
ROM_COPY( "temp", 0x1000, 0x0800, 0x0800 ) /* whole 2.b3 */
- ROM_COPY( "temp", 0x0000, 0x1000, 0x0800 ) /* first half of 1.b1 */
+ ROM_COPY( "temp", nullptr, 0x1000, 0x0800 ) /* first half of 1.b1 */
ROM_REGION( 0x0100, "proms", 0 )
ROM_LOAD( "falcon_1.bin", 0x0000, 0x0100, BAD_DUMP CRC(7f31066b) SHA1(15420780ec6b2870fc4539ec3afe4f0c58eedf12) )
@@ -9519,7 +9519,7 @@ ROM_START( pmpoker )
ROM_LOAD( "2-7.bin", 0x7000, 0x1000, CRC(a9ab972e) SHA1(477441b7ff3acae3a5d5a3e4c2a428e0b3121534) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "1-4.bin", 0x1000, 0x0800, CRC(62b9f90d) SHA1(39c61a01225027572fdb75543bb6a78ed74bb2fb) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9536,7 +9536,7 @@ ROM_START( royale )
ROM_LOAD( "royalex.bin", 0x4000, 0x4000, CRC(ef370617) SHA1(0fc5679e9787aeea3bc592b36efcaa20e859f912) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "royalechr.bin", 0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9553,7 +9553,7 @@ ROM_START( royalea )
ROM_LOAD( "royal.256", 0x0000, 0x8000, CRC(9d7fdb79) SHA1(05cae00bca0f6ae696c69f531cb0fa2104ff696a) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "royalechr.bin", 0x2000, 0x1000, CRC(b1f2cbb8) SHA1(8f4930038f2e21ca90b213c35b45ed14d8fad6fb) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9570,7 +9570,7 @@ ROM_START( sloco93 )
ROM_LOAD( "locoloco.128", 0x4000, 0x4000, CRC(f626a770) SHA1(afbd33b3f65b8a781c716a3d6e5447aa817d856c) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "confloco.032", 0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -9587,7 +9587,7 @@ ROM_START( sloco93a )
ROM_LOAD( "locoloco.256", 0x0000, 0x8000, CRC(ab037b0b) SHA1(16f811daaed5bf7b72549db85755c5274dfee310) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "confloco.032", 0x2000, 0x1000, CRC(b86f219c) SHA1(3f655a96bcf597a271a4eaaa0acbf8dd70fcdae9) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -9610,7 +9610,7 @@ ROM_START( maverik )
ROM_LOAD( "maverik.bin", 0x0000, 0x8000, CRC(65a986e9) SHA1(2e825d3fb2346036357af0e12d3a75b5ef6cfd0d) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -9632,7 +9632,7 @@ ROM_START( brasil86 )
ROM_LOAD( "brasil86.128", 0x4000, 0x4000, CRC(0e88b434) SHA1(80f921c277f4253c29ee80e9cfb046ade1f66300) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -9649,7 +9649,7 @@ ROM_START( brasil87 )
ROM_LOAD( "brasil87.128", 0x4000, 0x4000, CRC(6cfdaea9) SHA1(0704e61c1c573e99e130c22787b529ac5544c631) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -9666,7 +9666,7 @@ ROM_START( brasil89 )
ROM_LOAD( "brasil89.128", 0x4000, 0x4000, CRC(9030e0db) SHA1(d073ed0ddd3e5df6a3387e10e05ca34bc491eb35) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -9683,7 +9683,7 @@ ROM_START( brasil89a )
ROM_LOAD( "brasil89a.128", 0x4000, 0x4000, CRC(41a93a99) SHA1(70eeaddbdd9d3a587d1330b81d21d881ab0a8c91) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -9700,7 +9700,7 @@ ROM_START( brasil93 )
ROM_LOAD( "brasil93.128", 0x4000, 0x4000, CRC(cc25909f) SHA1(635184022bcb8936c396cb9fcfa6367fcae906fb) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -9717,7 +9717,7 @@ ROM_START( poker91 )
ROM_LOAD( "bs_pok91.bin", 0x0000, 0x8000, CRC(90c88b45) SHA1(9b5842075ece5f96a6869d7a8c874dee2b2abde2) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4s.bin", 0x2000, 0x1000, CRC(0ac197eb) SHA1(fdf2b134c662f3c4d4a19d93a82d130ba643ace8) ) /* text layer */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -9762,7 +9762,7 @@ ROM_START( genie )
ROM_LOAD( "3m.17a", 0x3000, 0x1000, CRC(9d67f5c9) SHA1(d3bc13ce07a7b1713544756d7723dd0bcd59cd1a) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(1cdd1db9) SHA1(1940c6654b4a892abc3e4557666d341f407ac54f) ) /* chars gfx */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9786,7 +9786,7 @@ ROM_START( geniea )
ROM_LOAD( "2732.15a", 0x7000, 0x1000, CRC(7137aa06) SHA1(1a2af7dfe41e54fc9c3b4e641319d1a504e84a18) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "2732.9a", 0x2000, 0x1000, BAD_DUMP CRC(ffb7bca3) SHA1(b58175c0342f963cb42a04195e296db952e071b6) ) /* chars + bitplane3 */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9821,7 +9821,7 @@ ROM_START( silverga )
ROM_LOAD( "55", 0x6000, 0x2000, CRC(aad57b3c) SHA1(9508026c1a7b227a70d89ad2f7245e75a615b932) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "13", 0x2000, 0x1000, CRC(98b8cb4f) SHA1(420ea544a41e24478a8eb1c7076f4569607d0379) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9863,7 +9863,7 @@ ROM_START( caspoker )
ROM_LOAD( "237.bin", 0x7000, 0x1000, CRC(b411d0c4) SHA1(0617cd312026da78a171fc23f4788393d70371cf) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "054.bin", 0x1000, 0x0800, CRC(7b401a09) SHA1(affb90a52761c36be7c67f7606f3f982f6dc724e) ) /* text chars */
ROM_IGNORE( 0x0800) /* identical halves, discarding the 2nd half */
@@ -9900,7 +9900,7 @@ ROM_START( superdbl )
ROM_LOAD( "8", 0x3000, 0x1000, CRC(157332c2) SHA1(3c66200c49641b9d876c5fa134dd2f0e80136beb) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4", 0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) ) /* text layer */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9930,7 +9930,7 @@ ROM_START( pokerdub )
ROM_LOAD( "unknown.17a", 0x3000, 0x1000, NO_DUMP )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "4.8a", 0x1000, 0x0800, CRC(1e1d4e33) SHA1(22831984489fdf712ca616c1af3c874a5b12b522) ) /* char ROM (cracked title) */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -9961,7 +9961,7 @@ ROM_START( pokerduc )
ROM_LOAD( "d", 0x7000, 0x1000, CRC(c48096ed) SHA1(279ba433369c7dc9cd902a19200e889eea45d115) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "a.8a", 0x1000, 0x0800, CRC(c70a3e49) SHA1(eb2f15b344f4dec5f05701415848c854bb27aaa3) ) /* char ROM (cracked title) */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -10002,11 +10002,11 @@ ROM_START( bchancep ) /* Bonne Chance! with PIAs 6821 */
// ROM_LOAD( "ups39_12a.bin", 0x0000, 0x8000, CRC(216b45fb) SHA1(fbfcd98cc39b2e791cceb845b166ff697f584add) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_COPY( "gfx", 0x2000, 0x1000, 0x0800 ) /* text layer and cards logo */
ROM_REGION( 0x1800, "gfx2", 0 )
- ROM_COPY( "gfx", 0x0000, 0x0000, 0x0800 ) /* cards deck gfx, bitplane 1 */
+ ROM_COPY( "gfx", nullptr, 0x0000, 0x0800 ) /* cards deck gfx, bitplane 1 */
ROM_COPY( "gfx", 0x1000, 0x0800, 0x0800 ) /* cards deck gfx, bitplane 2 */
ROM_COPY( "gfx", 0x2800, 0x1000, 0x0800 ) /* cards deck gfx, bitplane 3 */
@@ -10019,7 +10019,7 @@ ROM_START( bchanceq )
ROM_LOAD( "pok4-5.014", 0x4000, 0x4000, CRC(92f1f515) SHA1(f79ab453458f71d7e62e895d04a2d6161dbf2aad) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "pok3.014", 0x1000, 0x0800, CRC(fb00e263) SHA1(879660bc3a3eb3d41f80741b157cdefaa7bd9a18) ) /* char ROM, different cardback logo */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -10072,11 +10072,11 @@ ROM_START( pokermon )
ROM_LOAD( "3m.bin", 0x10000, 0x8000, CRC(b2237068) SHA1(ece4f089776bbd5224c63c6a41a2e86a5e89d0c5) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_COPY( "gfx", 0x14800, 0x1000, 0x0800 ) /* text, numbers and soccer ball tiles */
ROM_REGION( 0x1800, "gfx2", 0 )
- ROM_COPY( "gfx", 0x00000, 0x0000, 0x0800 ) /* soccer player gfx, bitplane 1 */
+ ROM_COPY( "gfx", nullptr, 0x0000, 0x0800 ) /* soccer player gfx, bitplane 1 */
ROM_COPY( "gfx", 0x08000, 0x0800, 0x0800 ) /* soccer player gfx, bitplane 2 */
ROM_COPY( "gfx", 0x12000, 0x1000, 0x0800 ) /* soccer player gfx, bitplane 3 */
@@ -10094,7 +10094,7 @@ ROM_START( pokersis )
ROM_LOAD( "gs3.bin", 0x10000, 0x8000, CRC(12c37991) SHA1(e63a0504e697daddcdfcf90b2a136c4180a431a7) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_COPY( "gfx", 0x14800, 0x1000, 0x0800 ) /* text and suppossed 1bpp gfx */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -10118,7 +10118,7 @@ ROM_START( super98 )
ROM_LOAD( "27c256.17a", 0x0000, 0x8000, CRC(dfa319c5) SHA1(e1b2ef40350ee1f40272604cbe33b245210de003) )
ROM_REGION( 0x3000, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x2000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x2000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "2732.9a", 0x2000, 0x1000, CRC(9a478c39) SHA1(614171fa3184f6ceb663d5650d05fac4d4025c9f) ) /* char ROM */
ROM_REGION( 0x3000, "gfx2", 0 )
@@ -10184,7 +10184,7 @@ ROM_START( animpkr )
ROM_LOAD( "2732_bottom.17a", 0x3000, 0x1000, CRC(92c19e72) SHA1(034d077ede5608160ba882227e981751a5dde26d) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "2716.8a", 0x1000, 0x0800, CRC(21c9c7f1) SHA1(daa0eddd4f4a9eec0cff3aebe884792adf830238) ) /* char ROM */
ROM_REGION( 0x1800, "gfx2", 0 )
@@ -10202,7 +10202,7 @@ ROM_START( animpkra )
ROM_LOAD( "2732_top.17a", 0x3000, 0x1000, CRC(13fae924) SHA1(c1c92fdb6e7036e6d9349c9b017e9daf3577345b) )
ROM_REGION( 0x1800, "gfx1", 0 )
- ROM_FILL( 0x0000, 0x1000, 0 ) /* filling the R-G bitplanes */
+ ROM_FILL( 0x0000, 0x1000, nullptr ) /* filling the R-G bitplanes */
ROM_LOAD( "2716.8a", 0x1000, 0x0800, CRC(21c9c7f1) SHA1(daa0eddd4f4a9eec0cff3aebe884792adf830238) ) /* char ROM */
ROM_REGION( 0x1800, "gfx2", 0 )
diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp
index db0a65e5dd1..969fd9c3122 100644
--- a/src/mame/drivers/goldstar.cpp
+++ b/src/mame/drivers/goldstar.cpp
@@ -10414,7 +10414,7 @@ ROM_START( skill98 )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10465,7 +10465,7 @@ ROM_START( schery97 )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10516,7 +10516,7 @@ ROM_START( schery97a )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10560,7 +10560,7 @@ ROM_START( roypok96 )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10602,7 +10602,7 @@ ROM_START( roypok96a )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10643,7 +10643,7 @@ ROM_START( roypok96b )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10684,7 +10684,7 @@ ROM_START( pokonl97 )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10735,7 +10735,7 @@ ROM_START( nfb96 )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10785,7 +10785,7 @@ ROM_START( nfb96a )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10837,7 +10837,7 @@ ROM_START( nfb96b )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10882,7 +10882,7 @@ ROM_START( nfb96c )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10927,7 +10927,7 @@ ROM_START( nfb96txt )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -10971,7 +10971,7 @@ ROM_START( nc96 )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -11012,7 +11012,7 @@ ROM_START( nc96a )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -11053,7 +11053,7 @@ ROM_START( nc96b )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -11094,7 +11094,7 @@ ROM_START( nc96c )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -11135,7 +11135,7 @@ ROM_START( nc96d )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -11176,7 +11176,7 @@ ROM_START( nc96e )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -11217,7 +11217,7 @@ ROM_START( nc96f )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -11257,7 +11257,7 @@ ROM_START( nc96txt )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
// no proms present, using nfb96 ones
@@ -11302,7 +11302,7 @@ ROM_START( match98 )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
@@ -11352,7 +11352,7 @@ ROM_START( fb2010 )
ROM_REGION( 0x8000, "gfx2", 0 )
ROM_COPY( "graphics", 0x02000, 0x00000, 0x2000 )
ROM_COPY( "graphics", 0x12000, 0x02000, 0x2000 )
- ROM_COPY( "graphics", 0x00000, 0x04000, 0x2000 )
+ ROM_COPY( "graphics", nullptr, 0x04000, 0x2000 )
ROM_COPY( "graphics", 0x10000, 0x06000, 0x2000 )
ROM_REGION( 0x200, "proms", 0 ) // palette
diff --git a/src/mame/drivers/goodejan.cpp b/src/mame/drivers/goodejan.cpp
index b8e66f4608b..8cf6a298b90 100644
--- a/src/mame/drivers/goodejan.cpp
+++ b/src/mame/drivers/goodejan.cpp
@@ -668,7 +668,7 @@ ROM_START( totmejan )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "5.1016", 0x000000, 0x08000, CRC(8bfdb304) SHA1(454fd84eb7d9338f0b5f8de0ffae541d17b958d5) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x080000, "spr_gfx", 0 )
ROM_LOAD( "e-jan.078", 0x000000, 0x080000, CRC(ff9ee9d8) SHA1(5e49e9a666630ca9867ee96b9d2b8d6f503b25df) )
@@ -700,7 +700,7 @@ ROM_START( goodejan )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "5.1016", 0x000000, 0x08000, CRC(732e9eae) SHA1(d306610f08630708bbbb97d71e9ed4d7e027579a) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x080000, "spr_gfx", 0 )
ROM_LOAD( "e_jan2obj.078", 0x000000, 0x080000, CRC(0f892ef2) SHA1(188ae43db1c48fb6870aa45c64718e901831499b) )
@@ -732,7 +732,7 @@ ROM_START( goodejana )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "5.1016", 0x000000, 0x08000, CRC(732e9eae) SHA1(d306610f08630708bbbb97d71e9ed4d7e027579a) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x080000, "spr_gfx", 0 )
ROM_LOAD( "e_jan2obj.078", 0x000000, 0x080000, CRC(0f892ef2) SHA1(188ae43db1c48fb6870aa45c64718e901831499b) )
diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp
index ef6232a3b0a..d9913f744d8 100644
--- a/src/mame/drivers/gottlieb.cpp
+++ b/src/mame/drivers/gottlieb.cpp
@@ -224,7 +224,7 @@ void gottlieb_state::machine_start()
save_item(NAME(m_track));
/* see if we have a laserdisc */
- if (m_laserdisc != NULL)
+ if (m_laserdisc != nullptr)
{
/* attach to the I/O ports */
m_maincpu->space(AS_PROGRAM).install_read_handler(0x05805, 0x05807, 0, 0x07f8, read8_delegate(FUNC(gottlieb_state::laserdisc_status_r),this));
@@ -259,7 +259,7 @@ void gottlieb_state::machine_start()
void gottlieb_state::machine_reset()
{
/* if we have a laserdisc, reset our philips code callback for the next line 17 */
- if (m_laserdisc != NULL)
+ if (m_laserdisc != nullptr)
m_laserdisc_philips_timer->adjust(m_screen->time_until_pos(17), 17);
}
@@ -290,8 +290,8 @@ WRITE8_MEMBER(gottlieb_state::gottlieb_analog_reset_w)
CUSTOM_INPUT_MEMBER(gottlieb_state::stooges_joystick_r)
{
- static const char *const joyport[] = { "P2JOY", "P3JOY", "P1JOY", NULL };
- return (joyport[m_joystick_select & 3] != NULL) ? ioport(joyport[m_joystick_select & 3])->read() : 0xff;
+ static const char *const joyport[] = { "P2JOY", "P3JOY", "P1JOY", nullptr };
+ return (joyport[m_joystick_select & 3] != nullptr) ? ioport(joyport[m_joystick_select & 3])->read() : 0xff;
}
@@ -305,7 +305,7 @@ CUSTOM_INPUT_MEMBER(gottlieb_state::stooges_joystick_r)
WRITE8_MEMBER(gottlieb_state::general_output_w)
{
/* bits 0-3 control video features, and are different for laserdisc games */
- if (m_laserdisc == NULL)
+ if (m_laserdisc == nullptr)
gottlieb_video_control_w(space, offset, data);
else
gottlieb_laserdisc_video_control_w(space, offset, data);
@@ -589,7 +589,7 @@ void gottlieb_state::laserdisc_audio_process(laserdisc_device &device, int sampl
logerror("--------------\n");
/* if no data, reset it all */
- if (ch1 == NULL)
+ if (ch1 == nullptr)
{
m_laserdisc_last_time = curtime + time_per_sample * samples;
return;
@@ -665,7 +665,7 @@ static const char *const qbert_knocker_names[] =
{
"*qbert",
"knocker",
- 0 /* end of array */
+ nullptr /* end of array */
};
MACHINE_CONFIG_FRAGMENT( qbert_knocker )
@@ -719,7 +719,7 @@ INTERRUPT_GEN_MEMBER(gottlieb_state::gottlieb_interrupt)
timer_set(m_screen->time_until_pos(0), TIMER_NMI_CLEAR);
/* if we have a laserdisc, update it */
- if (m_laserdisc != NULL)
+ if (m_laserdisc != nullptr)
{
/* set the "disc ready" bit, which basically indicates whether or not we have a proper video frame */
if (!m_laserdisc->video_active())
@@ -739,9 +739,9 @@ INTERRUPT_GEN_MEMBER(gottlieb_state::gottlieb_interrupt)
WRITE8_MEMBER(gottlieb_state::gottlieb_sh_w)
{
- if (m_r1_sound != NULL)
+ if (m_r1_sound != nullptr)
m_r1_sound->write(space, offset, data);
- if (m_r2_sound != NULL)
+ if (m_r2_sound != nullptr)
m_r2_sound->write(space, offset, data);
}
@@ -1747,7 +1747,7 @@ static const gfx_layout fg_layout =
};
static GFXDECODE_START( gfxdecode )
- GFXDECODE_ENTRY( NULL, 0x4000, bg_ram_layout, 0, 1 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x4000, bg_ram_layout, 0, 1 ) /* the game dynamically modifies this */
GFXDECODE_ENTRY( "bgtiles", 0x0000, bg_rom_layout, 0, 1 )
GFXDECODE_ENTRY( "sprites", 0x0000, fg_layout, 0, 1 )
GFXDECODE_END
diff --git a/src/mame/drivers/gotya.cpp b/src/mame/drivers/gotya.cpp
index cdae400d0bb..2bf64918c6e 100644
--- a/src/mame/drivers/gotya.cpp
+++ b/src/mame/drivers/gotya.cpp
@@ -166,7 +166,7 @@ static const char *const sample_names[] =
"18", /* 'Come on!' */ // 194a
"19", /* 'I love you!' */ // 194a
"1a", /* 'See you again!' */ // 194a
- 0
+ nullptr
};
void gotya_state::machine_start()
diff --git a/src/mame/drivers/gp_1.cpp b/src/mame/drivers/gp_1.cpp
index 4a7911c39d8..a07cecd5b52 100644
--- a/src/mame/drivers/gp_1.cpp
+++ b/src/mame/drivers/gp_1.cpp
@@ -413,7 +413,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( gp_1_state::zero_timer )
static const z80_daisy_config daisy_chain[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_START( gp_1, gp_1_state )
diff --git a/src/mame/drivers/gp_2.cpp b/src/mame/drivers/gp_2.cpp
index 1f1cd24fb46..c2c2f5018ca 100644
--- a/src/mame/drivers/gp_2.cpp
+++ b/src/mame/drivers/gp_2.cpp
@@ -566,7 +566,7 @@ TIMER_DEVICE_CALLBACK_MEMBER( gp_2_state::zero_timer )
static const z80_daisy_config daisy_chain[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_START( gp_2, gp_2_state )
diff --git a/src/mame/drivers/gridlee.cpp b/src/mame/drivers/gridlee.cpp
index 6bd0ea52280..54f67139cbe 100644
--- a/src/mame/drivers/gridlee.cpp
+++ b/src/mame/drivers/gridlee.cpp
@@ -397,7 +397,7 @@ static const char *const sample_names[] =
"*gridlee",
"bounce1",
"bounce2",
- 0 /* end of array */
+ nullptr /* end of array */
};
/*************************************
diff --git a/src/mame/drivers/groundfx.cpp b/src/mame/drivers/groundfx.cpp
index ef3386c9985..f67256ea3e2 100644
--- a/src/mame/drivers/groundfx.cpp
+++ b/src/mame/drivers/groundfx.cpp
@@ -380,7 +380,7 @@ ROM_START( groundfx )
ROM_LOAD16_BYTE( "d51-10.95", 0x000000, 0x100000, CRC(d5910604) SHA1(8efe13884cfdef208394ddfe19f43eb1b9f78ff3) ) /* SCC 8x8 tiles, 6bpp */
ROM_LOAD16_BYTE( "d51-11.96", 0x000001, 0x100000, CRC(fee5f5c6) SHA1(1be88747f9c71c348dd61a8f0040007df3a3e6a6) )
ROM_LOAD ( "d51-12.97", 0x300000, 0x100000, CRC(d630287b) SHA1(2fa09e1821b7280d193ca9a2a270759c3c3189d1) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION16_LE( 0x80000, "user1", 0 )
ROM_LOAD16_WORD( "d51-13.7", 0x00000, 0x80000, CRC(36921b8b) SHA1(2130120f78a3b984618a53054fc937cf727177b9) ) /* STY, spritemap */
diff --git a/src/mame/drivers/gstream.cpp b/src/mame/drivers/gstream.cpp
index c56a9c4cc6e..9ef25ea9f54 100644
--- a/src/mame/drivers/gstream.cpp
+++ b/src/mame/drivers/gstream.cpp
@@ -612,7 +612,7 @@ void drawgfx_transpen_x2222(bitmap_rgb32 &dest, const rectangle &cliprect, gfx_e
INT32 dy;
assert(dest.valid());
- assert(gfx != NULL);
+ assert(gfx != nullptr);
assert(dest.cliprect().contains(cliprect));
assert(code < gfx->elements());
diff --git a/src/mame/drivers/gts1.cpp b/src/mame/drivers/gts1.cpp
index 12ff867b851..b92bf8ba992 100644
--- a/src/mame/drivers/gts1.cpp
+++ b/src/mame/drivers/gts1.cpp
@@ -500,7 +500,7 @@ READ8_MEMBER (gts1_state::gts1_nvram_r)
// FIXME: Schematics says TO Z5
if (!m_nvram_wr && m_nvram_e2) {
UINT8* nvram = memregion("nvram")->base();
- assert(nvram != NULL);
+ assert(nvram != nullptr);
data = nvram[m_nvram_addr];
LOG(("%s: nvram[%02x] -> %x\n", __FUNCTION__, m_nvram_addr, data));
}
@@ -532,7 +532,7 @@ WRITE8_MEMBER(gts1_state::gts1_nvram_w)
if (m_nvram_wr && m_nvram_e2) {
LOG(("%s: nvram[%02x] <- %x\n", __FUNCTION__, m_nvram_addr, data & 15));
UINT8* nvram = memregion("nvram")->base();
- assert(nvram != NULL);
+ assert(nvram != nullptr);
nvram[m_nvram_addr] = data & 15;
}
break;
diff --git a/src/mame/drivers/gunpey.cpp b/src/mame/drivers/gunpey.cpp
index ec8995be89e..0b2332a36f4 100644
--- a/src/mame/drivers/gunpey.cpp
+++ b/src/mame/drivers/gunpey.cpp
@@ -1471,7 +1471,7 @@ ROM_START( gunpey )
ROM_REGION( 0x400000, "blit_data", 0 )
ROM_LOAD( "gp_rom3.025", 0x00000, 0x400000, CRC(f2d1f9f0) SHA1(0d20301fd33892074508b9d127456eae80cc3a1c) )
ROM_REGION( 0x400000, "blit_data2", 0 ) // debug test
- ROM_COPY( "blit_data", 0x00000, 0x00000, 0x400000 )
+ ROM_COPY( "blit_data", nullptr, 0x00000, 0x400000 )
ROM_REGION( 0x400000, "vram", ROMREGION_ERASEFF )
diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp
index 95a60fb7134..5f9dd079869 100644
--- a/src/mame/drivers/harddriv.cpp
+++ b/src/mame/drivers/harddriv.cpp
@@ -360,12 +360,12 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
m_hd34010_host_access(0),
m_dsk_pio_access(0),
m_msp_ram(*this, "msp_ram"),
- m_dsk_ram(0),
- m_dsk_rom(0),
+ m_dsk_ram(nullptr),
+ m_dsk_rom(nullptr),
m_dsk_10c(*this, "dsk_10c"),
m_dsk_30c(*this, "dsk_30c"),
- m_m68k_slapstic_base(0),
- m_m68k_sloop_alt_base(0),
+ m_m68k_slapstic_base(nullptr),
+ m_m68k_sloop_alt_base(nullptr),
m_200e(*this, "200e"),
m_210e(*this, "210e"),
m_adsp_data_memory(*this, "adsp_data"),
@@ -373,11 +373,11 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
m_ds3sdsp_data_memory(*this, "ds3sdsp_data"),
m_ds3sdsp_pgm_memory(*this, "ds3sdsp_pgm"),
m_ds3xdsp_pgm_memory(*this, "ds3xdsp_pgm"),
- m_gsp_protection(0),
+ m_gsp_protection(nullptr),
m_gsp_speedup_pc(0),
- m_msp_speedup_addr(0),
+ m_msp_speedup_addr(nullptr),
m_msp_speedup_pc(0),
- m_ds3_speedup_addr(0),
+ m_ds3_speedup_addr(nullptr),
m_ds3_speedup_pc(0),
m_ds3_transfer_pc(0),
m_gsp_multisync(0),
@@ -407,10 +407,10 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
m_adsp_sim_address(0),
m_adsp_som_address(0),
m_adsp_eprom_base(0),
- m_sim_memory(0),
+ m_sim_memory(nullptr),
m_sim_memory_size(0),
- m_adsp_pgm_memory_word(0),
- m_ds3_sdata_memory(0),
+ m_adsp_pgm_memory_word(nullptr),
+ m_ds3_sdata_memory(nullptr),
m_ds3_sdata_memory_size(0),
m_ds3_gcmd(0),
m_ds3_gflag(0),
@@ -452,7 +452,7 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
m_next_msp_sync(0),
m_vram_mask(0),
m_shiftreg_enable(0),
- m_gsp_shiftreg_source(0),
+ m_gsp_shiftreg_source(nullptr),
m_gfx_finescroll(0),
m_gfx_palettebank(0),
m_duart(*this, "duartn68681"),
@@ -466,8 +466,8 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
for (i = 0; i < 2; i++)
{
- m_gsp_speedup_addr[i] = 0;
- m_rddsp32_sync[i] = 0;
+ m_gsp_speedup_addr[i] = nullptr;
+ m_rddsp32_sync[i] = nullptr;
}
for (i = 0; i < 4; i++)
@@ -490,7 +490,7 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d
for (i = 0; i < MAX_MSP_SYNC; i++)
{
- m_dataptr[i] = 0;
+ m_dataptr[i] = nullptr;
m_dataval[i] = 0;
}
@@ -4485,7 +4485,7 @@ ROM_START( strtdriv )
ROM_LOAD( "136091-0033.10j", 0x000000, 0x010000, CRC(57504ab6) SHA1(ec8361b7da964c07ca0da48a87537badc3986fe0) )
ROM_REGION16_BE( 0x100000, "mainpcb:ds3xdsp", 0 ) /* DS III auxillary ADSP-2105 (unused) */
- ROM_FILL( 0x000000, 0x010000, 0x00)
+ ROM_FILL( 0x000000, 0x010000, nullptr)
ROM_REGION( 0x80000, "mainpcb:ds3sdsp_data", 0 )
ROM_LOAD16_BYTE( "136052-1123.12lm",0x00000, 0x10000, CRC(a88411dc) SHA1(1fd53c7eadffa163d5423df2f8338757e58d5f2e) )
@@ -4652,7 +4652,7 @@ void harddriv_state::init_multisync(int compact_inputs)
m_gsp_multisync = TRUE;
// if we have a JSA board, install the read/write handlers
- if (m_jsa != NULL)
+ if (m_jsa != nullptr)
m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x600000, 0x603fff, read8_delegate(FUNC(atari_jsa_base_device::main_response_r),m_jsa.target()), write8_delegate(FUNC(atari_jsa_base_device::main_command_w),m_jsa.target()), 0xff00);
/* install handlers for the compact driving games' inputs */
diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp
index 765c453ce13..a7063ec96f8 100644
--- a/src/mame/drivers/hh_hmcs40.cpp
+++ b/src/mame/drivers/hh_hmcs40.cpp
@@ -665,7 +665,7 @@ static INPUT_PORTS_START( bfriskyt )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, bfriskyt_state, input_changed, NULL)
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)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
INPUT_PORTS_END
INPUT_CHANGED_MEMBER(bfriskyt_state::input_changed)
@@ -1026,7 +1026,7 @@ static INPUT_PORTS_START( bzaxxon )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_CHANGED_MEMBER(DEVICE_SELF, bzaxxon_state, input_changed, NULL)
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)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
PORT_START("IN.5") // port D
PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_SELECT )
@@ -1488,7 +1488,7 @@ WRITE16_MEMBER(bdoramon_state::grid_w)
static INPUT_PORTS_START( bdoramon )
PORT_START("IN.0") // INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
PORT_START("IN.1") // INT1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1)
@@ -1586,7 +1586,7 @@ WRITE16_MEMBER(bultrman_state::grid_w)
static INPUT_PORTS_START( bultrman )
PORT_START("IN.0") // INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
PORT_START("IN.1") // port D
PORT_CONFNAME( 0x0010, 0x0000, "Factory Test" )
@@ -1677,7 +1677,7 @@ WRITE16_MEMBER(machiman_state::grid_w)
static INPUT_PORTS_START( machiman )
PORT_START("IN.0") // INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
PORT_START("IN.1") // port D
PORT_BIT( 0x3fff, IP_ACTIVE_HIGH, IPT_UNUSED )
@@ -2058,7 +2058,7 @@ WRITE16_MEMBER(cdkong_state::grid_w)
static INPUT_PORTS_START( cdkong )
PORT_START("IN.0") // INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
PORT_START("IN.1") // port D
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
@@ -2196,7 +2196,7 @@ static INPUT_PORTS_START( cgalaxn )
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN.2") // INT0
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
PORT_START("IN.3") // INT1
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)1)
@@ -3155,7 +3155,7 @@ static INPUT_PORTS_START( gckong )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_CHANGED_MEMBER(DEVICE_SELF, gckong_state, input_changed, NULL)
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)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
PORT_START("IN.5") // port D
PORT_CONFNAME( 0x0010, 0x0000, "Skill Level" )
@@ -3280,7 +3280,7 @@ static INPUT_PORTS_START( gdigdug )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_CHANGED_MEMBER(DEVICE_SELF, gdigdug_state, input_changed, NULL)
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)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
INPUT_PORTS_END
INPUT_CHANGED_MEMBER(gdigdug_state::input_changed)
@@ -3775,7 +3775,7 @@ static INPUT_PORTS_START( tmtron )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_CHANGED_MEMBER(DEVICE_SELF, tmtron_state, input_changed, NULL)
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)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_hmcs40_state, single_interrupt_line, (void *)nullptr)
INPUT_PORTS_END
INPUT_CHANGED_MEMBER(tmtron_state::input_changed)
diff --git a/src/mame/drivers/hideseek.cpp b/src/mame/drivers/hideseek.cpp
index d17b244a4fb..687dcd1b931 100644
--- a/src/mame/drivers/hideseek.cpp
+++ b/src/mame/drivers/hideseek.cpp
@@ -123,10 +123,10 @@ MACHINE_CONFIG_END
ROM_START( hideseek )
ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASE00)
ROM_LOAD( "hd64f7045f28_internal_rom.bin", 0x000000, 0x040000, NO_DUMP ) // on chip ROM
- ROM_FILL( 0, 1, 0x00 )
+ ROM_FILL( 0, 1, nullptr )
ROM_FILL( 1, 1, 0x40 )
- ROM_FILL( 2, 1, 0x00 )
- ROM_FILL( 3, 1, 0x00 )
+ ROM_FILL( 2, 1, nullptr )
+ ROM_FILL( 3, 1, nullptr )
ROM_FILL( 4, 1, 0x01 )
ROM_FILL( 5, 1, 0xff )
ROM_FILL( 6, 1, 0xff )
diff --git a/src/mame/drivers/homerun.cpp b/src/mame/drivers/homerun.cpp
index 5dfe6ecba4d..65b3c851fb4 100644
--- a/src/mame/drivers/homerun.cpp
+++ b/src/mame/drivers/homerun.cpp
@@ -70,12 +70,12 @@ WRITE8_MEMBER(homerun_state::homerun_control_w)
// d4: d7756 start pin
// d5: d7756 reset pin(?)
- if (m_d7756 != NULL)
+ if (m_d7756 != nullptr)
{
m_d7756->reset_w(~data & 0x20);
m_d7756->start_w(~data & 0x10);
}
- if (m_samples != NULL)
+ if (m_samples != nullptr)
{
// play MAME sample if a dump of the internal rom does not exist
if (data & 0x20 & ~m_control)
@@ -97,7 +97,7 @@ WRITE8_MEMBER(homerun_state::homerun_d7756_sample_w)
{
m_sample = data;
- if (m_d7756 != NULL)
+ if (m_d7756 != nullptr)
m_d7756->port_w(space, 0, data);
}
@@ -285,7 +285,7 @@ static const char *const homerun_sample_names[] =
"13", // aho (be called a fool by supervisor)
"14", // bat hits ball
"15", // crowd cheers
- 0
+ nullptr
};
/**************************************************************************/
diff --git a/src/mame/drivers/horizon.cpp b/src/mame/drivers/horizon.cpp
index 4d9c0b4172e..11076e517f2 100644
--- a/src/mame/drivers/horizon.cpp
+++ b/src/mame/drivers/horizon.cpp
@@ -162,7 +162,7 @@ static MACHINE_CONFIG_START( horizon, horizon_state )
MCFG_I8251_DTR_HANDLER(DEVWRITELINE(RS232_B_TAG, rs232_port_device, write_dtr))
MCFG_I8251_RTS_HANDLER(DEVWRITELINE(RS232_B_TAG, rs232_port_device, write_rts))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8251_R_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_R_TAG, i8251_device, write_dsr))
@@ -170,17 +170,17 @@ static MACHINE_CONFIG_START( horizon, horizon_state )
MCFG_S100_BUS_ADD()
MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT))
//MCFG_S100_SLOT_ADD("s100_1", horizon_s100_cards, NULL, NULL) // CPU
- MCFG_S100_SLOT_ADD("s100_2", horizon_s100_cards, NULL) // RAM
+ 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, NULL) // FPB
- MCFG_S100_SLOT_ADD("s100_5", horizon_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_6", horizon_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_7", horizon_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_8", horizon_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_9", horizon_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_10", horizon_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_11", horizon_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_12", horizon_s100_cards, NULL)
+ MCFG_S100_SLOT_ADD("s100_4", horizon_s100_cards, nullptr) // FPB
+ MCFG_S100_SLOT_ADD("s100_5", horizon_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_6", horizon_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_7", horizon_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_8", horizon_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_9", horizon_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_10", horizon_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_11", horizon_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_12", horizon_s100_cards, nullptr)
// software list
MCFG_SOFTWARE_LIST_ADD("flop_list", "horizon")
diff --git a/src/mame/drivers/hornet.cpp b/src/mame/drivers/hornet.cpp
index e76de3256c8..047b62190c0 100644
--- a/src/mame/drivers/hornet.cpp
+++ b/src/mame/drivers/hornet.cpp
@@ -652,7 +652,7 @@ WRITE32_MEMBER(hornet_state::comm_rombank_w)
{
int bank = data >> 24;
UINT8 *usr3 = memregion("user3")->base();
- if (usr3 != NULL)
+ if (usr3 != nullptr)
membank("bank1")->set_entry(bank & 0x7f);
}
@@ -948,7 +948,7 @@ void hornet_state::machine_reset()
{
UINT8 *usr3 = memregion("user3")->base();
UINT8 *usr5 = memregion("user5")->base();
- if (usr3 != NULL)
+ if (usr3 != nullptr)
{
membank("bank1")->configure_entries(0, memregion("user3")->bytes() / 0x10000, usr3, 0x10000);
membank("bank1")->set_entry(0);
@@ -1041,7 +1041,7 @@ MACHINE_RESET_MEMBER(hornet_state,hornet_2board)
UINT8 *usr3 = memregion("user3")->base();
UINT8 *usr5 = memregion("user5")->base();
- if (usr3 != NULL)
+ if (usr3 != nullptr)
{
membank("bank1")->configure_entries(0, memregion("user3")->bytes() / 0x10000, usr3, 0x10000);
membank("bank1")->set_entry(0);
diff --git a/src/mame/drivers/hp64k.cpp b/src/mame/drivers/hp64k.cpp
index e56ce89f62b..722b27c304d 100644
--- a/src/mame/drivers/hp64k.cpp
+++ b/src/mame/drivers/hp64k.cpp
@@ -402,7 +402,7 @@ void hp64k_state::machine_reset()
m_floppy_intrq = false;
m_floppy_drv_ctrl = ~0;
m_floppy_if_state = HP64K_FLPST_IDLE;
- m_current_floppy = NULL;
+ m_current_floppy = nullptr;
m_floppy0_wpt = false;
m_floppy1_wpt = false;
m_beeper->set_state(0);
@@ -858,7 +858,7 @@ void hp64k_state::hp64k_update_drv_ctrl(void)
} else if (!BIT(m_floppy_drv_ctrl , 0)) {
new_drive = m_floppy0->get_device();
} else {
- new_drive = NULL;
+ new_drive = nullptr;
}
if (new_drive != m_current_floppy) {
@@ -1398,7 +1398,7 @@ static MACHINE_CONFIG_START(hp64k , hp64k_state)
MCFG_I8251_DTR_HANDLER(WRITELINE(hp64k_state , hp64k_dtr_w));
MCFG_I8251_RTS_HANDLER(WRITELINE(hp64k_state , hp64k_rts_w));
- MCFG_RS232_PORT_ADD("rs232" , default_rs232_devices , NULL)
+ MCFG_RS232_PORT_ADD("rs232" , default_rs232_devices , nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(hp64k_state , hp64k_rs232_rxd_w))
MCFG_RS232_DCD_HANDLER(WRITELINE(hp64k_state , hp64k_rs232_dcd_w))
MCFG_RS232_CTS_HANDLER(WRITELINE(hp64k_state , hp64k_rs232_cts_w))
diff --git a/src/mame/drivers/ht68k.cpp b/src/mame/drivers/ht68k.cpp
index 155e3865621..09b743644b0 100644
--- a/src/mame/drivers/ht68k.cpp
+++ b/src/mame/drivers/ht68k.cpp
@@ -46,7 +46,7 @@ public:
m_floppy1(*this, "wd1770:1"),
m_floppy2(*this, "wd1770:2"),
m_floppy3(*this, "wd1770:3"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_p_ram(*this, "p_ram")
{
}
@@ -90,7 +90,7 @@ void ht68k_state::machine_reset()
m_maincpu->reset();
m_fdc->reset();
- m_fdc->set_floppy(NULL);
+ m_fdc->set_floppy(nullptr);
}
WRITE_LINE_MEMBER(ht68k_state::duart_irq_handler)
@@ -105,7 +105,7 @@ WRITE_LINE_MEMBER(ht68k_state::duart_txb)
WRITE8_MEMBER(ht68k_state::duart_output)
{
- m_floppy = NULL;
+ m_floppy = nullptr;
if ((BIT(data, 7)) == 0) { m_floppy = m_floppy0->get_device(); }
if ((BIT(data, 6)) == 0) { m_floppy = m_floppy1->get_device(); }
diff --git a/src/mame/drivers/huebler.cpp b/src/mame/drivers/huebler.cpp
index c97f5aafefc..b3a3be497ce 100644
--- a/src/mame/drivers/huebler.cpp
+++ b/src/mame/drivers/huebler.cpp
@@ -271,7 +271,7 @@ static const z80_daisy_config amu880_daisy_chain[] =
{ Z80SIO_TAG },
{ Z80PIO1_TAG },
{ Z80PIO2_TAG },
- { NULL }
+ { nullptr }
};
/* Machine Initialization */
diff --git a/src/mame/drivers/hunter2.cpp b/src/mame/drivers/hunter2.cpp
index 75eb60c6115..48e8f68e5fd 100644
--- a/src/mame/drivers/hunter2.cpp
+++ b/src/mame/drivers/hunter2.cpp
@@ -400,7 +400,7 @@ static MACHINE_CONFIG_START( hunter2, hunter2_state )
MCFG_NSC810_TIMER0_OUT(WRITELINE(hunter2_state,timer0_out))
MCFG_NSC810_TIMER1_OUT(WRITELINE(hunter2_state,timer1_out))
- MCFG_RS232_PORT_ADD("serial",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("serial",default_rs232_devices,nullptr)
MCFG_RS232_CTS_HANDLER(WRITELINE(hunter2_state,cts_w))
MCFG_RS232_RXD_HANDLER(WRITELINE(hunter2_state,rxd_w))
diff --git a/src/mame/drivers/hx20.cpp b/src/mame/drivers/hx20.cpp
index d1849d1c7e9..56d705e96bd 100644
--- a/src/mame/drivers/hx20.cpp
+++ b/src/mame/drivers/hx20.cpp
@@ -852,7 +852,7 @@ static MACHINE_CONFIG_START( hx20, hx20_state )
// devices
MCFG_MC146818_ADD(MC146818_TAG, XTAL_4_194304Mhz)
MCFG_MC146818_IRQ_HANDLER(WRITELINE(hx20_state, rtc_irq_w))
- MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_TAG, default_rs232_devices, nullptr)
MCFG_CASSETTE_ADD(CASSETTE_TAG)
MCFG_EPSON_SIO_ADD("sio", "tf20")
MCFG_EPSON_SIO_RX(WRITELINE(hx20_state, sio_rx_w))
diff --git a/src/mame/drivers/hyperscan.cpp b/src/mame/drivers/hyperscan.cpp
index baa1c767773..d5cc9d804e5 100644
--- a/src/mame/drivers/hyperscan.cpp
+++ b/src/mame/drivers/hyperscan.cpp
@@ -523,22 +523,22 @@ UINT32 hyperscan_state::spg290_screen_update(screen_device &screen, bitmap_rgb32
void hyperscan_state::spg290_timers_update()
{
- for(int i=0; i<6; i++)
- if (m_timers[i].control & 0x80000000)
+ for(auto & elem : m_timers)
+ if (elem.control & 0x80000000)
{
- if (((m_timers[i].control2 >> 30) & 0x03) == 0x00)
+ if (((elem.control2 >> 30) & 0x03) == 0x00)
{
- if (m_timers[i].counter == 0xffff)
+ if (elem.counter == 0xffff)
{
- m_timers[i].counter = m_timers[i].preload;
- if (m_timers[i].control & 0x08000000)
+ elem.counter = elem.preload;
+ if (elem.control & 0x08000000)
{
- m_timers[i].control |= 0x04000000;
+ elem.control |= 0x04000000;
m_maincpu->set_input_line_and_vector(0, HOLD_LINE, 56);
}
}
else
- m_timers[i].counter++;
+ elem.counter++;
}
else
{
diff --git a/src/mame/drivers/ibmpc.cpp b/src/mame/drivers/ibmpc.cpp
index 0e698be4b90..f49d500e829 100644
--- a/src/mame/drivers/ibmpc.cpp
+++ b/src/mame/drivers/ibmpc.cpp
@@ -315,7 +315,7 @@ static MACHINE_CONFIG_START( ibm5150, ibmpc_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "com", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "fdc_xt", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "hdc", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, nullptr, false)
/* keyboard */
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_KEYTRONIC_PC3270)
@@ -351,10 +351,10 @@ static MACHINE_CONFIG_START( ibm5160, ibmpc_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "com", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "fdc_xt", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "hdc", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa7", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa8", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa7", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa8", pc_isa8_cards, nullptr, false)
/* keyboard */
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
diff --git a/src/mame/drivers/ibmpcjr.cpp b/src/mame/drivers/ibmpcjr.cpp
index 8b3bccc4485..a6ebd5fbaa2 100644
--- a/src/mame/drivers/ibmpcjr.cpp
+++ b/src/mame/drivers/ibmpcjr.cpp
@@ -372,7 +372,7 @@ WRITE8_MEMBER(pcjr_state::pcjr_fdc_dor_w)
logerror("fdc: dor = %02x\n", data);
UINT8 pdor = m_pcjr_dor;
floppy_image_device *floppy0 = m_fdc->subdevice<floppy_connector>("0")->get_device();
- floppy_image_device *floppy1 = NULL;
+ floppy_image_device *floppy1 = nullptr;
if(m_fdc->subdevice("1"))
floppy1 = m_fdc->subdevice<floppy_connector>("1")->get_device();
@@ -388,7 +388,7 @@ WRITE8_MEMBER(pcjr_state::pcjr_fdc_dor_w)
else if(m_pcjr_dor & 2)
m_fdc->set_floppy(floppy1);
else
- m_fdc->set_floppy(NULL);
+ m_fdc->set_floppy(nullptr);
if((pdor^m_pcjr_dor) & 0x80)
m_fdc->reset();
@@ -442,7 +442,7 @@ int pcjr_state::load_cart(device_image_interface &image, generic_slot_device *sl
UINT32 size = slot->common_get_size("rom");
bool imagic_hack = false;
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
int header_size = 0;
@@ -603,7 +603,7 @@ static MACHINE_CONFIG_START( ibmpcjr, pcjr_state)
MCFG_INS8250_OUT_RTS_CB(DEVWRITELINE("serport", rs232_port_device, write_rts))
MCFG_INS8250_OUT_INT_CB(DEVWRITELINE("pic8259", pic8259_device, ir3_w))
- MCFG_RS232_PORT_ADD( "serport", pcjr_com, NULL )
+ MCFG_RS232_PORT_ADD( "serport", pcjr_com, nullptr )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ins8250", ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ins8250", ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ins8250", ins8250_uart_device, dsr_w))
diff --git a/src/mame/drivers/igs009.cpp b/src/mame/drivers/igs009.cpp
index b94f9b163c8..8c6c8446b5d 100644
--- a/src/mame/drivers/igs009.cpp
+++ b/src/mame/drivers/igs009.cpp
@@ -647,7 +647,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, (void *)0 ) // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igs009_state,hopper_r, (void *)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)
@@ -952,7 +952,7 @@ ROM_START( gp98 )
ROM_LOAD( "51", 0x100000, 0x80000, CRC(30a2ef85) SHA1(38ea637acd83b175eccd2969ef21879265b88992) )
ROM_REGION( 0xc0000, "reels", 0 )
- ROM_COPY( "tempgfx", 0x000000, 0x00000, 0x40000 )
+ ROM_COPY( "tempgfx", nullptr, 0x00000, 0x40000 )
ROM_COPY( "tempgfx", 0x080000, 0x40000, 0x40000 )
ROM_COPY( "tempgfx", 0x100000, 0x80000, 0x40000 )
diff --git a/src/mame/drivers/igs011.cpp b/src/mame/drivers/igs011.cpp
index 1e0f0c825d4..f2f7804ba04 100644
--- a/src/mame/drivers/igs011.cpp
+++ b/src/mame/drivers/igs011.cpp
@@ -3126,7 +3126,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, (void *)0) // hopper switch
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, (void *)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 )
@@ -3256,7 +3256,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, (void *)0) // hopper switch
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, (void *)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 )
@@ -3385,7 +3385,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, (void *)0) // hopper switch
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, (void *)nullptr) // hopper switch
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
@@ -3514,7 +3514,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, (void *)0) // hopper switch
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, (void *)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
@@ -3841,7 +3841,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, (void *)0) // hopper switch
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, (void *)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
@@ -4739,9 +4739,9 @@ ROM_START( vbowl )
ROM_REGION( 0x400000, "ics", 0 )
ROM_LOAD( "vrbowlng.u67", 0x00000, 0x80000, CRC(53000936) SHA1(e50c6216f559a9248c095bdfae05c3be4be79ff3) ) // 8 bit signed mono & u-law
ROM_LOAD( "vrbowlng.u66", 0x80000, 0x80000, CRC(f62cf8ed) SHA1(c53e47e2c619ed974ad40ee4aaa4a35147ea8311) ) // 8 bit signed mono
- ROM_COPY( "ics", 0, 0x100000,0x100000)
- ROM_COPY( "ics", 0, 0x200000,0x100000)
- ROM_COPY( "ics", 0, 0x300000,0x100000)
+ ROM_COPY( "ics", nullptr, 0x100000,0x100000)
+ ROM_COPY( "ics", nullptr, 0x200000,0x100000)
+ ROM_COPY( "ics", nullptr, 0x300000,0x100000)
ROM_END
ROM_START( vbowlj )
@@ -4758,9 +4758,9 @@ ROM_START( vbowlj )
ROM_REGION( 0x400000, "ics", 0 )
ROM_LOAD( "vrbowlng.u67", 0x00000, 0x80000, CRC(53000936) SHA1(e50c6216f559a9248c095bdfae05c3be4be79ff3) ) // 8 bit signed mono & u-law
ROM_LOAD( "vrbowlng.u66", 0x80000, 0x80000, CRC(f62cf8ed) SHA1(c53e47e2c619ed974ad40ee4aaa4a35147ea8311) ) // 8 bit signed mono
- ROM_COPY( "ics", 0, 0x100000,0x100000)
- ROM_COPY( "ics", 0, 0x200000,0x100000)
- ROM_COPY( "ics", 0, 0x300000,0x100000)
+ ROM_COPY( "ics", nullptr, 0x100000,0x100000)
+ ROM_COPY( "ics", nullptr, 0x200000,0x100000)
+ ROM_COPY( "ics", nullptr, 0x300000,0x100000)
ROM_END
/***************************************************************************
diff --git a/src/mame/drivers/igspoker.cpp b/src/mame/drivers/igspoker.cpp
index 831a5e687d1..3f38fec2298 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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state,hopper_r, (void *)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")
@@ -2055,7 +2055,7 @@ ROM_START( cpokert )
//copy?
ROM_REGION( 0x60000, "gfx2", 0 )
- ROM_COPY( "gfx1", 0, 0, 0x60000 )
+ ROM_COPY( "gfx1", nullptr, 0, 0x60000 )
// convert them to the pld format
ROM_REGION( 0x2000, "plds", 0 )
@@ -2100,7 +2100,7 @@ ROM_START( cpokerx )
//copy?
ROM_REGION( 0x60000, "gfx2", 0 )
- ROM_COPY( "gfx1", 0, 0, 0x60000 )
+ ROM_COPY( "gfx1", nullptr, 0, 0x60000 )
ROM_REGION( 0x4000, "plds", 0 )
ROM_LOAD( "16v8b.u31", 0x00000, 0x000892, BAD_DUMP CRC(33dec5f5) SHA1(f5c2e45513fa3657160ff38111a745f76cf679e1) ) // all 0's, seems protected
diff --git a/src/mame/drivers/imds2.cpp b/src/mame/drivers/imds2.cpp
index 4cd79a5daab..7a579f7a89b 100644
--- a/src/mame/drivers/imds2.cpp
+++ b/src/mame/drivers/imds2.cpp
@@ -578,7 +578,7 @@ void imds2_state::driver_start()
m_ipc_ram.resize(0x10000);
memory_region *ipcrom = memregion("ipcrom");
- if (ipcrom == NULL) {
+ if (ipcrom == nullptr) {
fatalerror("Unable to find IPC ROM region\n");
} else {
m_ipc_rom = ipcrom->base();
@@ -794,11 +794,11 @@ static MACHINE_CONFIG_START(imds2 , imds2_state)
MCFG_I8251_RTS_HANDLER(DEVWRITELINE("serial1" , rs232_port_device , write_rts))
MCFG_I8251_DTR_HANDLER(DEVWRITELINE("serial1" , rs232_port_device , write_dtr))
- MCFG_RS232_PORT_ADD("serial0" , default_rs232_devices , NULL)
+ MCFG_RS232_PORT_ADD("serial0" , default_rs232_devices , nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ipcusart0" , i8251_device , write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ipcusart0" , i8251_device , write_dsr))
- MCFG_RS232_PORT_ADD("serial1" , default_rs232_devices , NULL)
+ MCFG_RS232_PORT_ADD("serial1" , default_rs232_devices , nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ipcusart1" , i8251_device , write_rxd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("ipcusart1" , i8251_device , write_cts))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ipcusart1" , i8251_device , write_dsr))
diff --git a/src/mame/drivers/intv.cpp b/src/mame/drivers/intv.cpp
index ee2a2b1bc2d..d1d6f8eab6b 100644
--- a/src/mame/drivers/intv.cpp
+++ b/src/mame/drivers/intv.cpp
@@ -582,7 +582,7 @@ static MACHINE_CONFIG_START( intv, intv_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33)
/* cartridge */
- MCFG_INTV_CARTRIDGE_ADD("cartslot", intv_cart, NULL)
+ MCFG_INTV_CARTRIDGE_ADD("cartslot", intv_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list", "intv")
diff --git a/src/mame/drivers/iq151.cpp b/src/mame/drivers/iq151.cpp
index 404f503cb70..e4cbe4a504c 100644
--- a/src/mame/drivers/iq151.cpp
+++ b/src/mame/drivers/iq151.cpp
@@ -170,32 +170,32 @@ READ8_MEMBER(iq151_state::cartslot_r)
{
UINT8 data = 0xff;
- for (int i=0; i<5; i++)
- m_carts[i]->read(offset, data);
+ for (auto & elem : m_carts)
+ elem->read(offset, data);
return data;
}
WRITE8_MEMBER(iq151_state::cartslot_w)
{
- for (int i=0; i<5; i++)
- m_carts[i]->write(offset, data);
+ for (auto & elem : m_carts)
+ elem->write(offset, data);
}
READ8_MEMBER(iq151_state::cartslot_io_r)
{
UINT8 data = 0xff;
- for (int i=0; i<5; i++)
- m_carts[i]->io_read(offset, data);
+ for (auto & elem : m_carts)
+ elem->io_read(offset, data);
return data;
}
WRITE8_MEMBER(iq151_state::cartslot_io_w)
{
- for (int i=0; i<5; i++)
- m_carts[i]->io_write(offset, data);
+ for (auto & elem : m_carts)
+ elem->io_write(offset, data);
}
static ADDRESS_MAP_START(iq151_mem, AS_PROGRAM, 8, iq151_state)
@@ -355,8 +355,8 @@ UINT32 iq151_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c
{
bitmap.fill(0, cliprect);
- for (int i=0; i<5; i++)
- m_carts[i]->video_update(bitmap, cliprect);
+ for (auto & elem : m_carts)
+ elem->video_update(bitmap, cliprect);
return 0;
}
@@ -416,28 +416,28 @@ static MACHINE_CONFIG_START( iq151, iq151_state )
/* cartridge */
MCFG_DEVICE_ADD("slot1", IQ151CART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(iq151_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(iq151_cart, nullptr, false)
MCFG_IQ151CART_SLOT_OUT_IRQ0_CB(DEVWRITELINE("pic8259", pic8259_device, ir0_w))
MCFG_IQ151CART_SLOT_OUT_IRQ1_CB(DEVWRITELINE("pic8259", pic8259_device, ir1_w))
MCFG_IQ151CART_SLOT_OUT_IRQ2_CB(DEVWRITELINE("pic8259", pic8259_device, ir2_w))
MCFG_IQ151CART_SLOT_OUT_IRQ3_CB(DEVWRITELINE("pic8259", pic8259_device, ir3_w))
MCFG_IQ151CART_SLOT_OUT_IRQ4_CB(DEVWRITELINE("pic8259", pic8259_device, ir4_w))
MCFG_DEVICE_ADD("slot2", IQ151CART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(iq151_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(iq151_cart, nullptr, false)
MCFG_IQ151CART_SLOT_OUT_IRQ0_CB(DEVWRITELINE("pic8259", pic8259_device, ir0_w))
MCFG_IQ151CART_SLOT_OUT_IRQ1_CB(DEVWRITELINE("pic8259", pic8259_device, ir1_w))
MCFG_IQ151CART_SLOT_OUT_IRQ2_CB(DEVWRITELINE("pic8259", pic8259_device, ir2_w))
MCFG_IQ151CART_SLOT_OUT_IRQ3_CB(DEVWRITELINE("pic8259", pic8259_device, ir3_w))
MCFG_IQ151CART_SLOT_OUT_IRQ4_CB(DEVWRITELINE("pic8259", pic8259_device, ir4_w))
MCFG_DEVICE_ADD("slot3", IQ151CART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(iq151_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(iq151_cart, nullptr, false)
MCFG_IQ151CART_SLOT_OUT_IRQ0_CB(DEVWRITELINE("pic8259", pic8259_device, ir0_w))
MCFG_IQ151CART_SLOT_OUT_IRQ1_CB(DEVWRITELINE("pic8259", pic8259_device, ir1_w))
MCFG_IQ151CART_SLOT_OUT_IRQ2_CB(DEVWRITELINE("pic8259", pic8259_device, ir2_w))
MCFG_IQ151CART_SLOT_OUT_IRQ3_CB(DEVWRITELINE("pic8259", pic8259_device, ir3_w))
MCFG_IQ151CART_SLOT_OUT_IRQ4_CB(DEVWRITELINE("pic8259", pic8259_device, ir4_w))
MCFG_DEVICE_ADD("slot4", IQ151CART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(iq151_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(iq151_cart, nullptr, false)
MCFG_IQ151CART_SLOT_OUT_IRQ0_CB(DEVWRITELINE("pic8259", pic8259_device, ir0_w))
MCFG_IQ151CART_SLOT_OUT_IRQ1_CB(DEVWRITELINE("pic8259", pic8259_device, ir1_w))
MCFG_IQ151CART_SLOT_OUT_IRQ2_CB(DEVWRITELINE("pic8259", pic8259_device, ir2_w))
diff --git a/src/mame/drivers/isbc.cpp b/src/mame/drivers/isbc.cpp
index d7a9ba149e0..600b0886b74 100644
--- a/src/mame/drivers/isbc.cpp
+++ b/src/mame/drivers/isbc.cpp
@@ -250,12 +250,12 @@ static MACHINE_CONFIG_START( rpc86, isbc_state )
MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE("pic_0", pic8259_device, ir6_w))
/* video hardware */
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
- MCFG_ISBX_SLOT_ADD("sbx1", 0, isbx_cards, NULL)
+ MCFG_ISBX_SLOT_ADD("sbx1", 0, isbx_cards, nullptr)
//MCFG_ISBX_SLOT_MINTR0_CALLBACK(DEVWRITELINE("pic_0", pic8259_device, ir3_w))
//MCFG_ISBX_SLOT_MINTR1_CALLBACK(DEVWRITELINE("pic_0", pic8259_device, ir4_w))
- MCFG_ISBX_SLOT_ADD("sbx2", 0, isbx_cards, NULL)
+ MCFG_ISBX_SLOT_ADD("sbx2", 0, isbx_cards, nullptr)
//MCFG_ISBX_SLOT_MINTR0_CALLBACK(DEVWRITELINE("pic_0", pic8259_device, ir5_w))
//MCFG_ISBX_SLOT_MINTR1_CALLBACK(DEVWRITELINE("pic_0", pic8259_device, ir6_w))
MACHINE_CONFIG_END
@@ -301,7 +301,7 @@ static MACHINE_CONFIG_START( isbc286, isbc_state )
MCFG_Z80DART_OUT_RTSB_CB(DEVWRITELINE("rs232b", rs232_port_device, write_rts))
MCFG_Z80DART_OUT_INT_CB(WRITELINE(isbc_state, isbc_uart8274_irq))
- MCFG_RS232_PORT_ADD("rs232a", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232a", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart8274", z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("uart8274", z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart8274", z80dart_device, ctsa_w))
@@ -312,10 +312,10 @@ static MACHINE_CONFIG_START( isbc286, isbc_state )
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart8274", z80dart_device, ctsb_w))
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", isbc286_terminal)
- MCFG_ISBX_SLOT_ADD("sbx1", 0, isbx_cards, NULL)
+ MCFG_ISBX_SLOT_ADD("sbx1", 0, isbx_cards, nullptr)
MCFG_ISBX_SLOT_MINTR0_CALLBACK(DEVWRITELINE("pic_1", pic8259_device, ir3_w))
MCFG_ISBX_SLOT_MINTR1_CALLBACK(DEVWRITELINE("pic_1", pic8259_device, ir4_w))
- MCFG_ISBX_SLOT_ADD("sbx2", 0, isbx_cards, NULL)
+ MCFG_ISBX_SLOT_ADD("sbx2", 0, isbx_cards, nullptr)
MCFG_ISBX_SLOT_MINTR0_CALLBACK(DEVWRITELINE("pic_1", pic8259_device, ir5_w))
MCFG_ISBX_SLOT_MINTR1_CALLBACK(DEVWRITELINE("pic_1", pic8259_device, ir6_w))
diff --git a/src/mame/drivers/iskr103x.cpp b/src/mame/drivers/iskr103x.cpp
index ba273e44cd7..945415f676b 100644
--- a/src/mame/drivers/iskr103x.cpp
+++ b/src/mame/drivers/iskr103x.cpp
@@ -82,10 +82,10 @@ static MACHINE_CONFIG_START( iskr1030m, iskr103x_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", iskr103x_isa8_cards, "cga_iskr1030m", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", iskr103x_isa8_cards, "fdc_xt", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", iskr103x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", iskr103x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", iskr103x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", iskr103x_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", iskr103x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", iskr103x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", iskr103x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", iskr103x_isa8_cards, nullptr, false)
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_EC_1841)
// MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030)
@@ -106,10 +106,10 @@ static MACHINE_CONFIG_START( iskr1031, iskr103x_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", iskr103x_isa8_cards, "cga_iskr1031", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", iskr103x_isa8_cards, "fdc_xt", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", iskr103x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", iskr103x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", iskr103x_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", iskr103x_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", iskr103x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", iskr103x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", iskr103x_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", iskr103x_isa8_cards, nullptr, false)
// MCFG_SOFTWARE_LIST_ADD("flop_list", "iskr1031")
diff --git a/src/mame/drivers/itech32.cpp b/src/mame/drivers/itech32.cpp
index fc7e178745f..f484f36f101 100644
--- a/src/mame/drivers/itech32.cpp
+++ b/src/mame/drivers/itech32.cpp
@@ -4161,7 +4161,7 @@ ROM_END
void itech32_state::init_program_rom()
{
- if (m_main_ram == NULL)
+ if (m_main_ram == nullptr)
m_main_ram.set_target(m_nvram, m_nvram.bytes());
memcpy(m_main_ram, m_main_rom, 0x80);
}
diff --git a/src/mame/drivers/itech8.cpp b/src/mame/drivers/itech8.cpp
index 4c275d7ceb8..f327fb5051f 100644
--- a/src/mame/drivers/itech8.cpp
+++ b/src/mame/drivers/itech8.cpp
@@ -2537,7 +2537,7 @@ ROM_START( ninclown )
ROM_REGION( 0x80000, "maincpu", 0 )
ROM_LOAD16_BYTE( "prog1", 0x00000, 0x20000, CRC(fabfdcd2) SHA1(7a9852838cf7772d8f8f956b03823c4222520a5a) )
ROM_LOAD16_BYTE( "prog0", 0x00001, 0x20000, CRC(eca63db5) SHA1(b86d75ee81e155a21de18c2e0fa898f15d61560d) )
- ROM_COPY( "maincpu", 0x00000, 0x40000, 0x40000 )
+ ROM_COPY( "maincpu", nullptr, 0x40000, 0x40000 )
ROM_REGION( 0x10000, "soundcpu", 0 )
ROM_LOAD( "nc-snd", 0x08000, 0x8000, CRC(f9d5b4e1) SHA1(e5c3774db349b60baf11baecf55ac432871e612c) )
diff --git a/src/mame/drivers/itt3030.cpp b/src/mame/drivers/itt3030.cpp
index 2a006a84259..7a5875dc559 100644
--- a/src/mame/drivers/itt3030.cpp
+++ b/src/mame/drivers/itt3030.cpp
@@ -447,9 +447,9 @@ WRITE_LINE_MEMBER(itt3030_state::fdchld_w)
READ8_MEMBER(itt3030_state::fdc_stat_r)
{
UINT8 res = 0;
- floppy_image_device *floppy1 = m_con1 ? m_con1->get_device() : 0;
- floppy_image_device *floppy2 = m_con2 ? m_con2->get_device() : 0;
- floppy_image_device *floppy3 = m_con3 ? m_con3->get_device() : 0;
+ floppy_image_device *floppy1 = m_con1 ? m_con1->get_device() : nullptr;
+ floppy_image_device *floppy2 = m_con2 ? m_con2->get_device() : nullptr;
+ floppy_image_device *floppy3 = m_con3 ? m_con3->get_device() : nullptr;
res = m_fdc_drq ? 0x80 : 0x00;
res |= m_fdc_irq ? 0x40 : 0x00;
@@ -485,22 +485,22 @@ WRITE8_MEMBER(itt3030_state::fdc_w)
*/
WRITE8_MEMBER(itt3030_state::fdc_cmd_w)
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
logerror("%02x to fdc_cmd_w: motor %d side %d\n", data, (data & 0x10)>>4, (data & 4)>>2);
// select drive
if (data & 0x80)
{
- floppy = m_con1 ? m_con1->get_device() : 0;
+ floppy = m_con1 ? m_con1->get_device() : nullptr;
}
else if (data & 0x40)
{
- floppy = m_con2 ? m_con2->get_device() : 0;
+ floppy = m_con2 ? m_con2->get_device() : nullptr;
}
else if (data & 0x20)
{
- floppy = m_con3 ? m_con3->get_device() : 0;
+ floppy = m_con3 ? m_con3->get_device() : nullptr;
}
// selecting a new drive?
@@ -510,7 +510,7 @@ WRITE8_MEMBER(itt3030_state::fdc_cmd_w)
m_curfloppy = floppy;
}
- if (floppy != NULL)
+ if (floppy != nullptr)
{
// side select
floppy->ss_w((data & 4) ? 1 : 0);
@@ -729,7 +729,7 @@ void itt3030_state::machine_reset()
m_kbdrow = m_kbdcol = 0;
m_kbdclk = 1;
m_fdc_irq = m_fdc_drq = m_fdc_hld = 0;
- m_curfloppy = NULL;
+ m_curfloppy = nullptr;
m_keyskip = false;
// look up floppies in advance
diff --git a/src/mame/drivers/jack.cpp b/src/mame/drivers/jack.cpp
index c8f3340e2d6..952915820c1 100644
--- a/src/mame/drivers/jack.cpp
+++ b/src/mame/drivers/jack.cpp
@@ -878,8 +878,8 @@ MACHINE_RESET_MEMBER(jack_state,striv)
m_question_address = 0;
m_question_rom = 0;
- for (int i = 0; i < 16; i++)
- m_remap_address[i] = 0;
+ for (auto & elem : m_remap_address)
+ elem = 0;
}
@@ -1204,16 +1204,16 @@ ROM_START( sucasino )
ROM_REGION( 0x4000, "gfx1", 0 )
ROM_LOAD( "11", 0x0000, 0x1000, CRC(f92c4c5b) SHA1(a415c8f55d1792e79d05ece223ef423f8578f896) )
- ROM_FILL( 0x1000, 0x1000, 0 )
+ ROM_FILL( 0x1000, 0x1000, nullptr )
ROM_LOAD( "10", 0x2000, 0x1000, CRC(3b0783ce) SHA1(880f258351a8b0d76abe433cc77d95b991ae1adc) )
- ROM_FILL( 0x3000, 0x1000, 0 )
+ ROM_FILL( 0x3000, 0x1000, nullptr )
ROM_END
ROM_START( tripool )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "tri73a.bin", 0x0000, 0x1000, CRC(96893aa7) SHA1(ea1dc5824d89c1bb131850625a65d018a9127179) )
- ROM_FILL( 0x1000, 0x1000, 0 )
+ ROM_FILL( 0x1000, 0x1000, nullptr )
ROM_LOAD( "tri62a.bin", 0x2000, 0x1000, CRC(3299dc65) SHA1(8f93247e2f49be6b601006be62f4ad539ec899fe) )
ROM_LOAD( "tri52b.bin", 0x3000, 0x1000, CRC(27ef765e) SHA1(2a18a9b74fd4d9f3a724270cd3a98adbfdf22a5e) )
ROM_LOAD( "tri33c.bin", 0xc000, 0x1000, CRC(d7ef061d) SHA1(3ea3a136ecb3b5753a1dd929212b93ad8c7e9157) )
@@ -1226,16 +1226,16 @@ ROM_START( tripool )
ROM_REGION( 0x4000, "gfx1", 0 )
ROM_LOAD( "tri105a.bin", 0x0000, 0x1000, CRC(366a753c) SHA1(30fa8d80e42287e3e8677aefd15beab384265728) )
- ROM_FILL( 0x1000, 0x1000, 0 )
+ ROM_FILL( 0x1000, 0x1000, nullptr )
ROM_LOAD( "tri93a.bin", 0x2000, 0x1000, CRC(35213782) SHA1(05d5a67ffa3d26377c54777917d3ba51677ebd28) )
- ROM_FILL( 0x3000, 0x1000, 0 )
+ ROM_FILL( 0x3000, 0x1000, nullptr )
ROM_END
ROM_START( tripoola )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "tri73a.bin", 0x0000, 0x1000, CRC(96893aa7) SHA1(ea1dc5824d89c1bb131850625a65d018a9127179) )
- ROM_FILL( 0x1000, 0x1000, 0 )
+ ROM_FILL( 0x1000, 0x1000, nullptr )
ROM_LOAD( "tri62a.bin", 0x2000, 0x1000, CRC(3299dc65) SHA1(8f93247e2f49be6b601006be62f4ad539ec899fe) )
ROM_LOAD( "tri52b.bin", 0x3000, 0x1000, CRC(27ef765e) SHA1(2a18a9b74fd4d9f3a724270cd3a98adbfdf22a5e) )
ROM_LOAD( "tri33c.bin", 0xc000, 0x1000, CRC(d7ef061d) SHA1(3ea3a136ecb3b5753a1dd929212b93ad8c7e9157) )
@@ -1248,9 +1248,9 @@ ROM_START( tripoola )
ROM_REGION( 0x4000, "gfx1", 0 )
ROM_LOAD( "tri105a.bin", 0x0000, 0x1000, CRC(366a753c) SHA1(30fa8d80e42287e3e8677aefd15beab384265728) )
- ROM_FILL( 0x1000, 0x1000, 0 )
+ ROM_FILL( 0x1000, 0x1000, nullptr )
ROM_LOAD( "tri93a.bin", 0x2000, 0x1000, CRC(35213782) SHA1(05d5a67ffa3d26377c54777917d3ba51677ebd28) )
- ROM_FILL( 0x3000, 0x1000, 0 )
+ ROM_FILL( 0x3000, 0x1000, nullptr )
ROM_END
diff --git a/src/mame/drivers/jackie.cpp b/src/mame/drivers/jackie.cpp
index 2f59c1c42b3..8097667267f 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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jackie_state,hopper_r, (void *)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 aed17fa95db..db34f98c898 100644
--- a/src/mame/drivers/jaguar.cpp
+++ b/src/mame/drivers/jaguar.cpp
@@ -428,7 +428,7 @@ void jaguar_state::machine_reset()
/* configure banks for gfx/sound ROMs */
UINT8 *romboard = memregion("romboard")->base();
- if (romboard != NULL)
+ if (romboard != nullptr)
{
/* graphics banks */
if (m_is_r3000)
@@ -1815,7 +1815,7 @@ static MACHINE_CONFIG_START( cojagr3k, jaguar_state )
MCFG_NVRAM_ADD_1FILL("nvram")
- MCFG_VT83C461_ADD("ide", cojag_devices, "hdd", NULL, true)
+ MCFG_VT83C461_ADD("ide", cojag_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(jaguar_state, external_int))
/* video hardware */
@@ -1836,7 +1836,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( cojagr3k_rom, cojagr3k )
MCFG_DEVICE_MODIFY("ide:0")
- MCFG_SLOT_DEFAULT_OPTION(NULL)
+ MCFG_SLOT_DEFAULT_OPTION(nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( cojag68k, cojagr3k )
@@ -2052,7 +2052,7 @@ DEVICE_IMAGE_LOAD_MEMBER( jaguar_state, jaguar_cart )
{
UINT32 size, load_offset = 0;
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
size = image.length();
diff --git a/src/mame/drivers/jalmah.cpp b/src/mame/drivers/jalmah.cpp
index 80fee509cf9..37afe098d4c 100644
--- a/src/mame/drivers/jalmah.cpp
+++ b/src/mame/drivers/jalmah.cpp
@@ -1480,13 +1480,13 @@ ROM_START ( urashima )
ROM_REGION( 0x200000, "gfx4", 0 ) /* BG3 */
/*0*/
- ROM_COPY( "gfx2" , 0x000000, 0x000000, 0x40000 )
+ ROM_COPY( "gfx2" , nullptr, 0x000000, 0x40000 )
ROM_COPY( "gfx2", 0x040000, 0x040000, 0x40000 )
/*1*/
- ROM_COPY( "gfx2", 0x000000, 0x080000, 0x40000 )
- ROM_COPY( "gfx3", 0x000000, 0x0c0000, 0x40000 )
+ ROM_COPY( "gfx2", nullptr, 0x080000, 0x40000 )
+ ROM_COPY( "gfx3", nullptr, 0x0c0000, 0x40000 )
/*2*/
- ROM_COPY( "gfx2", 0x000000, 0x100000, 0x40000 )
+ ROM_COPY( "gfx2", nullptr, 0x100000, 0x40000 )
ROM_COPY( "gfx3", 0x040000, 0x140000, 0x40000 )
ROM_REGION( 0x0240, "user1", 0 )
@@ -1710,13 +1710,13 @@ ROM_START( suchipi )
ROM_LOAD( "4.bin", 0x80000, 0x80000, CRC(3fe932a1) SHA1(9e768b901738ee9eba207a67c4fd19efb0035a68) )
ROM_REGION( 0x140000, "oki", ROMREGION_ERASEFF ) /* Samples */
- ROM_COPY( "oki_data" , 0x00000, 0x000000+0x00000, 0x40000 )
+ ROM_COPY( "oki_data" , nullptr, 0x000000+0x00000, 0x40000 )
/* PAL address shuffling for the BGM data (TODO: check this with a side-by-side test)*/
ROM_COPY( "oki_data" , 0x20000, 0x000000+0x40000, 0x20000 ) // 0
ROM_COPY( "oki_data" , 0x40000, 0x020000+0x40000, 0x20000 ) // 1
ROM_COPY( "oki_data" , 0x60000, 0x040000+0x40000, 0x20000 ) // 2
- ROM_COPY( "oki_data" , 0x00000, 0x060000+0x40000, 0x20000 ) // 3
+ ROM_COPY( "oki_data" , nullptr, 0x060000+0x40000, 0x20000 ) // 3
ROM_COPY( "oki_data" , 0x80000, 0x080000+0x40000, 0x40000 )
ROM_COPY( "oki_data" , 0xc0000, 0x0c0000+0x40000, 0x40000 )
diff --git a/src/mame/drivers/jangou.cpp b/src/mame/drivers/jangou.cpp
index e15d5c232d5..9902efbee75 100644
--- a/src/mame/drivers/jangou.cpp
+++ b/src/mame/drivers/jangou.cpp
@@ -127,7 +127,7 @@ PALETTE_INIT_MEMBER(jangou_state, jangou)
compute_resistor_weights(0, 255, -1.0,
3, resistances_rg, weights_rg, 0, 0,
2, resistances_b, weights_b, 0, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
for (i = 0;i < palette.entries(); i++)
{
diff --git a/src/mame/drivers/jankenmn.cpp b/src/mame/drivers/jankenmn.cpp
index 403b7e6841b..fcdaee24841 100644
--- a/src/mame/drivers/jankenmn.cpp
+++ b/src/mame/drivers/jankenmn.cpp
@@ -352,7 +352,7 @@ INPUT_PORTS_END
static const z80_daisy_config daisy_chain[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/jclub2.cpp b/src/mame/drivers/jclub2.cpp
index daffa87c69e..54a827f4b18 100644
--- a/src/mame/drivers/jclub2.cpp
+++ b/src/mame/drivers/jclub2.cpp
@@ -1136,7 +1136,7 @@ ROM_START( darkhors )
ROM_LOAD( "gfx5", 0x200000, 0x80000, CRC(281402cd) SHA1(77f8e5e02c6e7161299c06e65a078c1cdda1ba66) )
ROM_LOAD( "gfx6", 0x280000, 0x80000, CRC(8ea0149b) SHA1(7792fd7e07a7baa4e15f50b6528c78fb15b40b40) )
ROM_LOAD( "gfx7", 0x300000, 0x80000, BAD_DUMP CRC(504bf849) SHA1(13a184ec9e176371808938015111f8918cb4df7d) ) // FIXED BITS (11111111)
- ROM_FILL( 0x300000, 0x80000, 0 ) // a zero-fill seems fine
+ ROM_FILL( 0x300000, 0x80000, nullptr ) // a zero-fill seems fine
ROM_LOAD( "gfx8", 0x380000, 0x80000, CRC(590bec2a) SHA1(7fdbb21f1a3eccde65e91eb2443a0e01487c59c3) ) // 000xxxxxxxxxxxxxxxx = 0x00
ROM_REGION( 0x80000, "oki", 0 ) // Samples
@@ -1314,7 +1314,7 @@ DRIVER_INIT_MEMBER(darkhors_state,darkhors)
// is there a way (key sequence) to reprogram it??
// I bet the original sets need similar get further in their boot sequence
UINT8 *eeprom = (UINT8 *) memregion("eeprom")->base();
- if (eeprom != NULL)
+ if (eeprom != nullptr)
{
size_t len = memregion("eeprom")->bytes();
dynamic_buffer temp(len);
diff --git a/src/mame/drivers/jollyjgr.cpp b/src/mame/drivers/jollyjgr.cpp
index c02763727e2..a9dd7d59955 100644
--- a/src/mame/drivers/jollyjgr.cpp
+++ b/src/mame/drivers/jollyjgr.cpp
@@ -733,7 +733,7 @@ ROM_START( fspiderb )
ROM_LOAD( "11.7h", 0x3000, 0x1000, CRC(7ab56309) SHA1(b43f542a7359c3a4ccf6f116e3a84bd13af6876f) )
ROM_REGION( 0x1000, "gfx1", 0 )
- ROM_COPY( "gfx_bank", 0x0000, 0x0000, 0x800)
+ ROM_COPY( "gfx_bank", nullptr, 0x0000, 0x800)
ROM_COPY( "gfx_bank", 0x1000, 0x0800, 0x800)
ROM_REGION( 0x1000, "gfx2", 0 )
diff --git a/src/mame/drivers/joystand.cpp b/src/mame/drivers/joystand.cpp
index a9e4a9e097c..4a17628eae4 100644
--- a/src/mame/drivers/joystand.cpp
+++ b/src/mame/drivers/joystand.cpp
@@ -306,10 +306,10 @@ void joystand_state::video_start()
m_bg1_tmap->set_transparent_pen(0xf);
m_bg2_tmap->set_transparent_pen(0xf);
- for (int i = 0; i < 2; ++i)
+ for (auto & elem : m_bg15_bitmap)
{
- m_bg15_bitmap[i].allocate(0x200, 0x200);
- m_bg15_bitmap[i].fill(BG15_TRANSPARENT);
+ elem.allocate(0x200, 0x200);
+ elem.fill(BG15_TRANSPARENT);
}
bg15_tiles_dirty = true;
diff --git a/src/mame/drivers/jpmimpct.cpp b/src/mame/drivers/jpmimpct.cpp
index e1855657af3..161549ebba3 100644
--- a/src/mame/drivers/jpmimpct.cpp
+++ b/src/mame/drivers/jpmimpct.cpp
@@ -1368,7 +1368,7 @@ ROM_START( cluedo )
ROM_REGION16_LE( 0x200000, "user1", 0 )
ROM_LOAD16_BYTE( "clugrb1", 0x000000, 0x80000, CRC(176ae2df) SHA1(135fd2640c255e5321b1a6ba35f72fa2ba8f04b8) )
ROM_LOAD16_BYTE( "clugrb2", 0x000001, 0x80000, CRC(06ab2f78) SHA1(4325fd9096e73956310e97e244c7fe1ee8d27f5c) )
- ROM_COPY( "user1", 0x000000, 0x100000, 0x100000 )
+ ROM_COPY( "user1", nullptr, 0x100000, 0x100000 )
ROM_REGION( 0x80000, "upd", 0 )
ROM_LOAD( "1214.bin", 0x000000, 0x80000, CRC(fe43aeae) SHA1(017a471af5766ef41fa46982c02941fb4fc35174) )
@@ -1392,7 +1392,7 @@ ROM_START( cluedod )
ROM_REGION16_LE( 0x200000, "user1", 0 )
ROM_LOAD16_BYTE( "clugrb1", 0x000000, 0x80000, CRC(176ae2df) SHA1(135fd2640c255e5321b1a6ba35f72fa2ba8f04b8) )
ROM_LOAD16_BYTE( "clugrb2", 0x000001, 0x80000, CRC(06ab2f78) SHA1(4325fd9096e73956310e97e244c7fe1ee8d27f5c) )
- ROM_COPY( "user1", 0x000000, 0x100000, 0x100000 )
+ ROM_COPY( "user1", nullptr, 0x100000, 0x100000 )
ROM_REGION( 0x80000, "upd", 0 )
ROM_LOAD( "1214.bin", 0x000000, 0x80000, CRC(fe43aeae) SHA1(017a471af5766ef41fa46982c02941fb4fc35174) )
@@ -1416,7 +1416,7 @@ ROM_START( cluedo2c )
ROM_REGION16_LE( 0x200000, "user1", 0 )
ROM_LOAD16_BYTE( "clugrb1", 0x000000, 0x80000, CRC(176ae2df) SHA1(135fd2640c255e5321b1a6ba35f72fa2ba8f04b8) )
ROM_LOAD16_BYTE( "clugrb2", 0x000001, 0x80000, CRC(06ab2f78) SHA1(4325fd9096e73956310e97e244c7fe1ee8d27f5c) )
- ROM_COPY( "user1", 0x000000, 0x100000, 0x100000 )
+ ROM_COPY( "user1", nullptr, 0x100000, 0x100000 )
ROM_REGION( 0x80000, "upd", 0 )
ROM_LOAD( "1214.bin", 0x000000, 0x80000, CRC(fe43aeae) SHA1(017a471af5766ef41fa46982c02941fb4fc35174) )
@@ -1440,7 +1440,7 @@ ROM_START( cluedo2 )
ROM_REGION16_LE( 0x200000, "user1", 0 )
ROM_LOAD16_BYTE( "clugrb1", 0x000000, 0x80000, CRC(176ae2df) SHA1(135fd2640c255e5321b1a6ba35f72fa2ba8f04b8) )
ROM_LOAD16_BYTE( "clugrb2", 0x000001, 0x80000, CRC(06ab2f78) SHA1(4325fd9096e73956310e97e244c7fe1ee8d27f5c) )
- ROM_COPY( "user1", 0x000000, 0x100000, 0x100000 )
+ ROM_COPY( "user1", nullptr, 0x100000, 0x100000 )
ROM_REGION( 0x80000, "upd", 0 )
ROM_LOAD( "clue2as1.bin", 0x000000, 0x80000, CRC(16b2bc45) SHA1(56963f5d63b5a091b89b96f4ca9327010006c024) )
diff --git a/src/mame/drivers/juicebox.cpp b/src/mame/drivers/juicebox.cpp
index a754668af40..2bb08b77ff5 100644
--- a/src/mame/drivers/juicebox.cpp
+++ b/src/mame/drivers/juicebox.cpp
@@ -339,11 +339,11 @@ MACHINE_CONFIG_END
static INPUT_PORTS_START( juicebox )
PORT_START( "PORTG" )
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)0) PORT_NAME("RETURN") PORT_PLAYER(1)
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)0) PORT_NAME("PLAY") PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)0) PORT_NAME("FORWARD") PORT_PLAYER(1)
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)0) PORT_NAME("REVERSE") PORT_PLAYER(1)
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)0) PORT_NAME("STAR") PORT_PLAYER(1)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)nullptr) PORT_NAME("RETURN") PORT_PLAYER(1)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)nullptr) PORT_NAME("PLAY") PORT_PLAYER(1)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)nullptr) PORT_NAME("FORWARD") PORT_PLAYER(1)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)nullptr) PORT_NAME("REVERSE") PORT_PLAYER(1)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CHANGED_MEMBER(DEVICE_SELF, juicebox_state, port_changed, (void *)nullptr) PORT_NAME("STAR") PORT_PLAYER(1)
INPUT_PORTS_END
/***************************************************************************
diff --git a/src/mame/drivers/jupiter.cpp b/src/mame/drivers/jupiter.cpp
index 7d0fc11250a..e7e545ebd74 100644
--- a/src/mame/drivers/jupiter.cpp
+++ b/src/mame/drivers/jupiter.cpp
@@ -227,7 +227,7 @@ static MACHINE_CONFIG_START( jupiter, jupiter2_state )
// devices
MCFG_DEVICE_ADD(INS1771N1_TAG, FD1771, 1000000)
MCFG_FLOPPY_DRIVE_ADD(INS1771N1_TAG":0", jupiter_floppies, "525ssdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(INS1771N1_TAG":1", jupiter_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(INS1771N1_TAG":1", jupiter_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_DEVICE_ADD(TERMINAL_TAG, GENERIC_TERMINAL, 0)
@@ -261,7 +261,7 @@ static MACHINE_CONFIG_START( jupiter3, jupiter3_state )
// devices
MCFG_DEVICE_ADD(INS1771N1_TAG, FD1771, 1000000)
MCFG_FLOPPY_DRIVE_ADD(INS1771N1_TAG":0", jupiter_floppies, "525ssdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(INS1771N1_TAG":1", jupiter_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(INS1771N1_TAG":1", jupiter_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_DEVICE_ADD(KEYBOARD_TAG, GENERIC_KEYBOARD, 0)
MCFG_GENERIC_KEYBOARD_CB(WRITE8(jupiter3_state, kbd_put))
diff --git a/src/mame/drivers/kaneko16.cpp b/src/mame/drivers/kaneko16.cpp
index 9f28195f9ce..e9832179c94 100644
--- a/src/mame/drivers/kaneko16.cpp
+++ b/src/mame/drivers/kaneko16.cpp
@@ -2319,7 +2319,7 @@ void kaneko16_state::kaneko16_unscramble_tiles(const char *region)
int size = memregion(region)->bytes();
int i;
- if (RAM == NULL) return;
+ if (RAM == nullptr) return;
for (i = 0; i < size; i ++)
{
@@ -2456,22 +2456,22 @@ ROM_START( explbrkr )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x200000, "oki", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0a0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user1", 0x080000, 0x0e0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x100000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x100000, 0x020000)
ROM_COPY( "user1", 0x0a0000, 0x120000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x140000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x140000, 0x020000)
ROM_COPY( "user1", 0x0c0000, 0x160000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x180000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x180000, 0x020000)
ROM_COPY( "user1", 0x0e0000, 0x1a0000, 0x020000)
- ROM_FILL( 0x1c0000, 0x020000, 0x00 )
- ROM_FILL( 0x1e0000, 0x020000, 0x00 )
+ ROM_FILL( 0x1c0000, 0x020000, nullptr )
+ ROM_FILL( 0x1e0000, 0x020000, nullptr )
ROM_END
ROM_START( bakubrkr )
@@ -2498,22 +2498,22 @@ ROM_START( bakubrkr )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x200000, "oki", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0a0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user1", 0x080000, 0x0e0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x100000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x100000, 0x020000)
ROM_COPY( "user1", 0x0a0000, 0x120000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x140000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x140000, 0x020000)
ROM_COPY( "user1", 0x0c0000, 0x160000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x180000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x180000, 0x020000)
ROM_COPY( "user1", 0x0e0000, 0x1a0000, 0x020000)
- ROM_FILL( 0x1c0000, 0x020000, 0x00 )
- ROM_FILL( 0x1e0000, 0x020000, 0x00 )
+ ROM_FILL( 0x1c0000, 0x020000, nullptr )
+ ROM_FILL( 0x1e0000, 0x020000, nullptr )
ROM_END
@@ -3057,7 +3057,7 @@ ROM_START( gtmr )
ROM_LOAD( "mm-300-406-a0.bin", 0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
ROM_REGION( 0x200000, "gfx3", 0 ) /* Tiles (scrambled) */
- ROM_COPY("gfx2",0,0,0x200000) // it isn't on the board twice.
+ ROM_COPY("gfx2",nullptr,0,0x200000) // it isn't on the board twice.
ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */
ROM_LOAD( "mm-100-401-e0.bin", 0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) ) // 16 x $10000
@@ -3086,7 +3086,7 @@ ROM_START( gtmra )
ROM_LOAD( "mm-300-406-a0.bin", 0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
ROM_REGION( 0x200000, "gfx3", 0 ) /* Tiles (scrambled) */
- ROM_COPY("gfx2",0,0,0x200000) // it isn't on the board twice.
+ ROM_COPY("gfx2",nullptr,0,0x200000) // it isn't on the board twice.
ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */
ROM_LOAD( "mm-100-401-e0.bin", 0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) ) // 16 x $10000
@@ -3126,7 +3126,7 @@ ROM_START( gtmre )
ROM_LOAD( "gmmu52.bin", 0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
ROM_REGION( 0x200000, "gfx3", 0 ) /* Tiles (scrambled) */
- ROM_COPY("gfx2",0,0,0x200000) // it isn't on the board twice.
+ ROM_COPY("gfx2",nullptr,0,0x200000) // it isn't on the board twice.
ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */
ROM_LOAD( "gmmu23.bin", 0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) ) // 16 x $10000
@@ -3163,7 +3163,7 @@ ROM_START( gtmrusa )
ROM_LOAD( "mm-300-406-a0.bin", 0x000000, 0x200000, CRC(b15f6b7f) SHA1(5e84919d788add53fc87f4d85f437df413b1dbc5) )
ROM_REGION( 0x200000, "gfx3", 0 ) /* Tiles (scrambled) */
- ROM_COPY("gfx2",0,0,0x200000) // it isn't on the board twice.
+ ROM_COPY("gfx2",nullptr,0,0x200000) // it isn't on the board twice.
ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */
ROM_LOAD( "mm-100-401-a0.bin", 0x000000, 0x100000, CRC(b9cbfbee) SHA1(051d48a68477ef9c29bd5cc0bb7955d513a0ab94) ) // 16 x $10000
@@ -3352,7 +3352,7 @@ ROM_START( gtmr2 )
ROM_LOAD16_BYTE( "m2b1x0.u94", 0x400001, 0x020000, CRC(03c48bdb) SHA1(f5ba45d026530d46f760cf06d02a1ffcca89aa3c) )
ROM_REGION( 0x440000, "gfx3", 0 ) /* Tiles (scrambled) */
- ROM_COPY("gfx2",0,0,0x440000) // it isn't on the board twice.
+ ROM_COPY("gfx2",nullptr,0,0x440000) // it isn't on the board twice.
ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */
ROM_LOAD( "m2-100-0.u48", 0x000000, 0x100000, CRC(5250fa45) SHA1(b1ad4660906997faea0aa89866de01a0e9f2b61d) )
@@ -3383,7 +3383,7 @@ ROM_START( gtmr2a )
ROM_LOAD16_BYTE( "m2b1x0.u94", 0x400001, 0x020000, CRC(03c48bdb) SHA1(f5ba45d026530d46f760cf06d02a1ffcca89aa3c) )
ROM_REGION( 0x440000, "gfx3", 0 ) /* Tiles (scrambled) */
- ROM_COPY("gfx2",0,0,0x440000) // it isn't on the board twice.
+ ROM_COPY("gfx2",nullptr,0,0x440000) // it isn't on the board twice.
ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */
ROM_LOAD( "m2-100-0.u48", 0x000000, 0x100000, CRC(5250fa45) SHA1(b1ad4660906997faea0aa89866de01a0e9f2b61d) )
@@ -3414,7 +3414,7 @@ ROM_START( gtmr2u )
ROM_LOAD16_BYTE( "m2b1x0.u94", 0x400001, 0x020000, CRC(03c48bdb) SHA1(f5ba45d026530d46f760cf06d02a1ffcca89aa3c) )
ROM_REGION( 0x440000, "gfx3", 0 ) /* Tiles (scrambled) */
- ROM_COPY("gfx2",0,0,0x440000) // it isn't on the board twice.
+ ROM_COPY("gfx2",nullptr,0,0x440000) // it isn't on the board twice.
ROM_REGION( 0x400000, "oki1", 0 ) /* Samples, plus room for expansion */
ROM_LOAD( "m2-100-0.u48", 0x000000, 0x100000, CRC(5250fa45) SHA1(b1ad4660906997faea0aa89866de01a0e9f2b61d) )
diff --git a/src/mame/drivers/kaypro.cpp b/src/mame/drivers/kaypro.cpp
index 4886f21359f..56bd657f8ff 100644
--- a/src/mame/drivers/kaypro.cpp
+++ b/src/mame/drivers/kaypro.cpp
@@ -150,14 +150,14 @@ static const z80_daisy_config kayproii_daisy_chain[] =
{ "z80sio" }, /* sio */
{ "z80pio_s" }, /* System pio */
{ "z80pio_g" }, /* General purpose pio */
- { NULL }
+ { nullptr }
};
static const z80_daisy_config kaypro2x_daisy_chain[] =
{
{ "z80sio" }, /* sio for RS232C and keyboard */
{ "z80sio_2x" }, /* sio for serial printer and inbuilt modem */
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/kc.cpp b/src/mame/drivers/kc.cpp
index 3fab3b54d88..09afbd06209 100644
--- a/src/mame/drivers/kc.cpp
+++ b/src/mame/drivers/kc.cpp
@@ -65,7 +65,7 @@ static const z80_daisy_config kc85_daisy_chain[] =
{
{ "z80ctc" },
{ "z80pio" },
- { NULL }
+ { nullptr }
};
extern SLOT_INTERFACE_START(kc85_cart)
@@ -146,7 +146,7 @@ static MACHINE_CONFIG_START( kc85_3, kc_state )
MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_KCCART_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
MCFG_DEVICE_ADD("mc", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
MCFG_KCCART_SLOT_NEXT_SLOT("exp")
MCFG_KCCART_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
@@ -154,8 +154,8 @@ static MACHINE_CONFIG_START( kc85_3, kc_state )
/* expansion interface */
MCFG_DEVICE_ADD("exp", KCEXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_exp, NULL, false)
- MCFG_KCCART_SLOT_NEXT_SLOT(NULL)
+ MCFG_DEVICE_SLOT_INTERFACE(kc85_exp, nullptr, false)
+ MCFG_KCCART_SLOT_NEXT_SLOT(nullptr)
MCFG_KCCART_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_KCCART_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
@@ -230,7 +230,7 @@ static MACHINE_CONFIG_START( kc85_4, kc85_4_state )
MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_KCCART_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
MCFG_DEVICE_ADD("mc", KCCART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(kc85_cart, nullptr, false)
MCFG_KCCART_SLOT_NEXT_SLOT("exp")
MCFG_KCCART_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
@@ -238,8 +238,8 @@ static MACHINE_CONFIG_START( kc85_4, kc85_4_state )
/* expansion interface */
MCFG_DEVICE_ADD("exp", KCEXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(kc85_exp, NULL, false)
- MCFG_KCCART_SLOT_NEXT_SLOT(NULL)
+ MCFG_DEVICE_SLOT_INTERFACE(kc85_exp, nullptr, false)
+ MCFG_KCCART_SLOT_NEXT_SLOT(nullptr)
MCFG_KCCART_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_KCCART_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_KCCART_SLOT_OUT_HALT_CB(INPUTLINE("maincpu", INPUT_LINE_HALT))
diff --git a/src/mame/drivers/kenseim.cpp b/src/mame/drivers/kenseim.cpp
index bf8f0c80f92..3ecc40645fc 100644
--- a/src/mame/drivers/kenseim.cpp
+++ b/src/mame/drivers/kenseim.cpp
@@ -468,7 +468,7 @@ ADDRESS_MAP_END
static const z80_daisy_config daisy_chain_gamecpu[] =
{
TMPZ84C011_DAISY_INTERNAL,
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_DERIVED_CLASS( kenseim, cps1_12MHz, kenseim_state )
diff --git a/src/mame/drivers/kickgoal.cpp b/src/mame/drivers/kickgoal.cpp
index fc22ff78c23..ed09ccdbc3c 100644
--- a/src/mame/drivers/kickgoal.cpp
+++ b/src/mame/drivers/kickgoal.cpp
@@ -720,9 +720,9 @@ ROM_START( kickgoal )
ROM_LOAD( "ic13", 0x00000, 0x40000, BAD_DUMP CRC(c6cb56e9) SHA1(835773b3f0647d3c553180bcf10e57ad44d68353) ) // BAD ADDRESS LINES (mask=010000)
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000)
- ROM_COPY( "oki", 0x00000, 0x80000, 0x20000)
- ROM_COPY( "oki", 0x00000, 0xc0000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x80000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0xc0000, 0x20000)
ROM_END
ROM_START( actionhw )
@@ -750,9 +750,9 @@ ROM_START( actionhw )
ROM_LOAD( "3.ic13", 0x00000, 0x40000, CRC(b8f6705d) SHA1(55116e14aba6dac7334e26f704b3e6b0b9f856c2) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000)
- ROM_COPY( "oki", 0x00000, 0x80000, 0x20000)
- ROM_COPY( "oki", 0x00000, 0xc0000, 0x20000) /* Last bank used in Test Mode */
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x80000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0xc0000, 0x20000) /* Last bank used in Test Mode */
ROM_END
/* GAME drivers **************************************************************/
diff --git a/src/mame/drivers/kingdrby.cpp b/src/mame/drivers/kingdrby.cpp
index 99b098474d0..f9afd0206b1 100644
--- a/src/mame/drivers/kingdrby.cpp
+++ b/src/mame/drivers/kingdrby.cpp
@@ -1031,7 +1031,7 @@ ROM_START( kingdrby )
ROM_LOAD( "im1_yk.g1", 0x0000, 0x1000, CRC(1921605d) SHA1(0aa6f7195ea59d0080620ab02a737e5c319dd3e7) )
ROM_LOAD( "im2_yk.f1", 0x1000, 0x1000, CRC(8504314e) SHA1(309645e17fb3149dce57ae6844cc58652a1eeb35) )
ROM_LOAD( "im3_yk.e1", 0x2000, 0x1000, CRC(b0e473ec) SHA1(234598548b2a2a8f53d40bc07c3b1759074b7d93) )
- ROM_COPY( "soundcpu", 0x0000, 0x3000, 0x1000 )
+ ROM_COPY( "soundcpu", nullptr, 0x3000, 0x1000 )
/* sprites gfxs */
ROM_REGION( 0x8000, "gfx1", 0 )
@@ -1162,7 +1162,7 @@ ROM_START( kingdrbb2 )
ROM_LOAD( "h1", 0x0000, 0x1000, CRC(444aa020) SHA1(0d40e9499892177b4d8123ad7b6909e8f6e0c8ab) )
ROM_LOAD( "h2", 0x1000, 0x1000, CRC(4102d356) SHA1(d9eb2dcc7cbbe2449fe41ef5eef0470d4dcac0c8) )
ROM_LOAD( "h3", 0x2000, 0x1000, CRC(b5a95093) SHA1(dd3e0742042fab113092664bde0e1215d009d861) )
- ROM_COPY( "soundcpu", 0x0000, 0x3000, 0x1000 )
+ ROM_COPY( "soundcpu", nullptr, 0x3000, 0x1000 )
/* sprites gfxs */
ROM_REGION( 0x8000, "gfx1", 0 ) // kingdrby sprites, smaller top roms
diff --git a/src/mame/drivers/kinst.cpp b/src/mame/drivers/kinst.cpp
index 0a404706fbe..ecb0be8f83c 100644
--- a/src/mame/drivers/kinst.cpp
+++ b/src/mame/drivers/kinst.cpp
@@ -679,7 +679,7 @@ static MACHINE_CONFIG_START( kinst, kinst_state )
MCFG_CPU_VBLANK_INT_DRIVER("screen", kinst_state, irq0_start)
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(kinst_state, ide_interrupt))
/* video hardware */
diff --git a/src/mame/drivers/koikoi.cpp b/src/mame/drivers/koikoi.cpp
index 4da01a94adf..0c2aae0c7f2 100644
--- a/src/mame/drivers/koikoi.cpp
+++ b/src/mame/drivers/koikoi.cpp
@@ -409,10 +409,10 @@ ROM_START( koikoi )
ROM_FILL( 0x08, 1, 0x8b )
ROM_FILL( 0x09, 1, 0x3f )
ROM_FILL( 0x0a, 1, 0x07 )
- ROM_FILL( 0x0b, 1, 0x00 ) // unused
+ ROM_FILL( 0x0b, 1, nullptr ) // unused
ROM_FILL( 0x0c, 1, 0x2f )
ROM_FILL( 0x0d, 1, 0xff )
- ROM_FILL( 0x0e, 1, 0x00 )
+ ROM_FILL( 0x0e, 1, nullptr )
ROM_FILL( 0x0f, 1, 0x0b )
ROM_LOAD( "prom.ic23", 0x020, 0x100, CRC(f1d169a6) SHA1(5ee4b1dfe61e8b97a90cc113ba234298189f1a73) )
diff --git a/src/mame/drivers/konamigx.cpp b/src/mame/drivers/konamigx.cpp
index 756f35e2bea..1f981b40e00 100644
--- a/src/mame/drivers/konamigx.cpp
+++ b/src/mame/drivers/konamigx.cpp
@@ -3747,7 +3747,7 @@ DRIVER_INIT_MEMBER(konamigx_state,konamigx)
m_last_prot_op = -1;
m_last_prot_clk = 0;
- m_esc_cb = NULL;
+ m_esc_cb = nullptr;
m_resume_trigger = 0;
m_dmadelay_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(konamigx_state::dmaend_callback),this));
diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp
index 6a9a22bdf3d..c95b9e19a42 100644
--- a/src/mame/drivers/ksys573.cpp
+++ b/src/mame/drivers/ksys573.cpp
@@ -696,7 +696,7 @@ void ksys573_state::update_disc()
int cd = m_cd->read();
cdrom_file *new_cdrom;
- if( m_available_cdroms[ 1 ] != NULL )
+ if( m_available_cdroms[ 1 ] != nullptr )
{
new_cdrom = m_available_cdroms[ cd ];
}
@@ -706,9 +706,9 @@ void ksys573_state::update_disc()
}
atapi_hle_device *image = machine().device<atapi_hle_device>( "ata:0:cr589" );
- if( image != NULL )
+ if( image != nullptr )
{
- void *current_cdrom = NULL;
+ void *current_cdrom = nullptr;
image->GetDevice( &current_cdrom );
if( current_cdrom != new_cdrom )
@@ -941,7 +941,7 @@ READ16_MEMBER( ksys573_state::gx700pwbf_io_r )
void ksys573_state::gx700pwbf_output( int offset, UINT8 data )
{
- if( m_gx700pwfbf_output_callback != NULL )
+ if( m_gx700pwfbf_output_callback != nullptr )
{
int i;
static const int shift[] = { 7, 6, 1, 0, 5, 4, 3, 2 };
diff --git a/src/mame/drivers/kyocera.cpp b/src/mame/drivers/kyocera.cpp
index 23cea619578..40c17efd990 100644
--- a/src/mame/drivers/kyocera.cpp
+++ b/src/mame/drivers/kyocera.cpp
@@ -1374,7 +1374,7 @@ static MACHINE_CONFIG_START( kc85, kc85_state )
MCFG_IM6402_ADD(IM6402_TAG, 0, 0)
MCFG_IM6402_TRO_CALLBACK(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
- 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(IM6402_TAG, im6402_device, write_rri))
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
@@ -1424,7 +1424,7 @@ static MACHINE_CONFIG_START( pc8201, pc8201_state )
MCFG_IM6402_ADD(IM6402_TAG, 0, 0)
MCFG_IM6402_TRO_CALLBACK(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
- 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(IM6402_TAG, im6402_device, write_rri))
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
@@ -1484,7 +1484,7 @@ static MACHINE_CONFIG_START( trsm100, trsm100_state )
MCFG_IM6402_ADD(IM6402_TAG, 0, 0)
MCFG_IM6402_TRO_CALLBACK(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
- 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(IM6402_TAG, im6402_device, write_rri))
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
@@ -1546,7 +1546,7 @@ static MACHINE_CONFIG_START( tandy200, tandy200_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_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr))
diff --git a/src/mame/drivers/legionna.cpp b/src/mame/drivers/legionna.cpp
index 240ad9b5400..8633a386edc 100644
--- a/src/mame/drivers/legionna.cpp
+++ b/src/mame/drivers/legionna.cpp
@@ -1492,7 +1492,7 @@ ROM_START( legionna )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "6.u1110", 0x000000, 0x08000, CRC(fe7b8d06) SHA1(1e5b52ea4b4042940e2ee2db75c7c0f24973422a) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "user1", 0 ) /* load the tiles here so we can split them up into the required regions by hand */
ROM_LOAD16_BYTE( "7.u077", 0x000000, 0x10000, CRC(88e26809) SHA1(40ee55d3b5329b6f657e0621d93c4caf6a035fdf) )
@@ -1502,7 +1502,7 @@ ROM_START( legionna )
ROM_COPY( "user1", 0x010000, 0x000000, 0x010000 )
ROM_REGION( 0x010000, "gfx5", 0 ) /* BK3 */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x010000 ) /* decrambled in INIT */
+ ROM_COPY( "user1", nullptr, 0x000000, 0x010000 ) /* decrambled in INIT */
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "legionnire_obj1.u0815", 0x000000, 0x100000, CRC(d35602f5) SHA1(79379abf1c8131df47f81f42b2dc6876926a4e9d) ) /* sprites */
@@ -1512,7 +1512,7 @@ ROM_START( legionna )
ROM_LOAD( "legionnire_back.u075", 0x000000, 0x100000, CRC(58280989) SHA1(e3eef1f52829a91b8f87cfe27776a1f12679b3ca) ) /* 3 sets of tiles ('MBK','LBK','BK3') */
ROM_REGION( 0x80000, "gfx3", 0 ) /* MBK */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x80000 )
+ ROM_COPY( "user2", nullptr, 0x000000, 0x80000 )
ROM_REGION( 0x100000, "gfx4", ROMREGION_ERASEFF )
/* Not Used */
@@ -1540,7 +1540,7 @@ ROM_START( legionnau )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "6.u1110", 0x000000, 0x08000, CRC(fe7b8d06) SHA1(1e5b52ea4b4042940e2ee2db75c7c0f24973422a) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "user1", 0 ) /* load the tiles here so we can split them up into the required regions by hand */
ROM_LOAD16_BYTE( "7.u077", 0x000000, 0x10000, CRC(88e26809) SHA1(40ee55d3b5329b6f657e0621d93c4caf6a035fdf) )
@@ -1550,7 +1550,7 @@ ROM_START( legionnau )
ROM_COPY( "user1", 0x010000, 0x000000, 0x010000 )
ROM_REGION( 0x010000, "gfx5", 0 ) /* BK3 */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x010000 ) /* decrambled in INIT */
+ ROM_COPY( "user1", nullptr, 0x000000, 0x010000 ) /* decrambled in INIT */
ROM_REGION( 0x200000, "sprite", 0 )
ROM_LOAD( "legionnire_obj1.u0815", 0x000000, 0x100000, CRC(d35602f5) SHA1(79379abf1c8131df47f81f42b2dc6876926a4e9d) ) /* sprites */
@@ -1560,7 +1560,7 @@ ROM_START( legionnau )
ROM_LOAD( "legionnire_back.u075", 0x000000, 0x100000, CRC(58280989) SHA1(e3eef1f52829a91b8f87cfe27776a1f12679b3ca) ) /* 3 sets of tiles ('MBK','LBK','BK3') */
ROM_REGION( 0x80000, "gfx3", 0 ) /* MBK */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x80000 )
+ ROM_COPY( "user2", nullptr, 0x000000, 0x80000 )
ROM_REGION( 0x100000, "gfx4", ROMREGION_ERASEFF )
/* Not Used */
@@ -1588,7 +1588,7 @@ ROM_START( heatbrl )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "barrel_7.u1110", 0x00000, 0x08000, CRC(0784dbd8) SHA1(bdf7f8a3a3eb346eb2aeaf4f9bfc49af059d04c9) )
ROM_CONTINUE( 0x10000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x18000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x18000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 ) /* chars */
ROM_LOAD16_BYTE( "barrel_6.u077", 0x000000, 0x10000, CRC(bea3c581) SHA1(7f7f0a74bf106acaf57c182d47f0c707da2011bd) )
@@ -1630,7 +1630,7 @@ ROM_START( heatbrl2 )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "barrel_7.u1110", 0x00000, 0x08000, CRC(0784dbd8) SHA1(bdf7f8a3a3eb346eb2aeaf4f9bfc49af059d04c9) )
ROM_CONTINUE( 0x10000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x18000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x18000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 ) /* chars */
ROM_LOAD16_BYTE( "barrel_6.u077", 0x000000, 0x10000, CRC(bea3c581) SHA1(7f7f0a74bf106acaf57c182d47f0c707da2011bd) )
@@ -1672,7 +1672,7 @@ ROM_START( heatbrlo )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "barrel_7.u1110", 0x00000, 0x08000, CRC(0784dbd8) SHA1(bdf7f8a3a3eb346eb2aeaf4f9bfc49af059d04c9) )
ROM_CONTINUE( 0x10000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x18000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x18000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 ) /* chars */
ROM_LOAD16_BYTE( "barrel_6.u077", 0x000000, 0x10000, CRC(bea3c581) SHA1(7f7f0a74bf106acaf57c182d47f0c707da2011bd) )
@@ -1718,7 +1718,7 @@ ROM_START( heatbrlu )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "barrel_7.u1110", 0x00000, 0x08000, CRC(0784dbd8) SHA1(bdf7f8a3a3eb346eb2aeaf4f9bfc49af059d04c9) )
ROM_CONTINUE( 0x10000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x18000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x18000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 ) /* chars */
ROM_LOAD16_BYTE( "barrel_6.u077", 0x000000, 0x10000, CRC(bea3c581) SHA1(7f7f0a74bf106acaf57c182d47f0c707da2011bd) )
@@ -1763,7 +1763,7 @@ ROM_START( heatbrle )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "barrel_7.u1110", 0x00000, 0x08000, CRC(0784dbd8) SHA1(bdf7f8a3a3eb346eb2aeaf4f9bfc49af059d04c9) )
ROM_CONTINUE( 0x10000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x18000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x18000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 ) /* chars */
ROM_LOAD16_BYTE( "barrel_6.u077", 0x000000, 0x10000, CRC(bea3c581) SHA1(7f7f0a74bf106acaf57c182d47f0c707da2011bd) )
@@ -1855,7 +1855,7 @@ ROM_START( godzilla )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "8.016", 0x000000, 0x08000, CRC(4ab76e43) SHA1(40c34fade03161c4b50f9f6a2ae61078b8d8ea6d) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "11.620", 0x000000, 0x010000, CRC(58e0e41f) SHA1(563c633eb3d4df41e467c93957c74b540a0ae43c) )
@@ -1973,7 +1973,7 @@ ROM_START( denjinmk )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "rom5.016", 0x000000, 0x08000, CRC(7fe7e352) SHA1(1ceae22186751ca91dfffab7bd11f275e693451f) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "rom7.620", 0x000000, 0x010000, CRC(e1f759b1) SHA1(ddc60e78e7791a59c59403dd4089b3f6e1ecf8cb) )
@@ -1995,7 +1995,7 @@ ROM_START( denjinmk )
ROM_LOAD( "bg-3-ab.619", 0x000000, 0x100000, CRC(de7366ee) SHA1(0c3969d15f3cd963e579d4164b6e0a6b4012c9c6) )
ROM_REGION( 0x100000, "gfx6", 0 ) /* LBK tiles */
- ROM_COPY( "gfx4", 0x00000, 0x00000, 0x100000 )
+ ROM_COPY( "gfx4", nullptr, 0x00000, 0x100000 )
ROM_REGION( 0x080000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "rom6.922", 0x000000, 0x040000, CRC(09e13213) SHA1(9500e057104c6b83da0467938e46d9efa2f49f4c) )
@@ -2069,7 +2069,7 @@ ROM_START( grainbow )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "rb-s.016", 0x000000, 0x08000, CRC(8439bf5b) SHA1(089009b91768d64edef6639e7694723d2d1c46ff) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "rb-f1.620", 0x000000, 0x010000, CRC(792c403d) SHA1(3c606af696fe8f3d6edefdab3940bd5eb341bca9) )
@@ -2109,7 +2109,7 @@ ROM_START( cupsoc )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "seibu7.8a", 0x000000, 0x08000, CRC(f63329f9) SHA1(51736de48efc14415cfdf169b43623d4c95fde2b) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "scc_06.bin", 0x000000, 0x010000, CRC(f1a18ec6) SHA1(43f8ec3fc541b8dc2a17533329dd3448afadcb3b) )
@@ -2127,7 +2127,7 @@ ROM_START( cupsoc )
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@@ -2146,7 +2146,7 @@ ROM_START( cupsoca )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "seibu7.8a", 0x000000, 0x08000, CRC(f63329f9) SHA1(51736de48efc14415cfdf169b43623d4c95fde2b) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "soca_6.bin", 0x000000, 0x010000, CRC(a9e15910) SHA1(305541b16a87d0e38871240fa2e111bb9332e93c) )
@@ -2164,7 +2164,7 @@ ROM_START( cupsoca )
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@@ -2183,7 +2183,7 @@ ROM_START( cupsocb )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "seibu7.8a", 0x000000, 0x08000, CRC(f63329f9) SHA1(51736de48efc14415cfdf169b43623d4c95fde2b) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "soca_6.bin", 0x000000, 0x010000, CRC(a9e15910) SHA1(305541b16a87d0e38871240fa2e111bb9332e93c) )
@@ -2201,7 +2201,7 @@ ROM_START( cupsocb )
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@@ -2220,7 +2220,7 @@ ROM_START( cupsocs )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "seibu7.8a", 0x000000, 0x08000, CRC(f63329f9) SHA1(51736de48efc14415cfdf169b43623d4c95fde2b) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "6_7x.bin", 0x000000, 0x010000, CRC(7981366e) SHA1(b859bf23c5ae466f4020958a06935192fa68ee8d) )
@@ -2238,7 +2238,7 @@ ROM_START( cupsocs )
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "8_7a.bin", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@@ -2259,7 +2259,7 @@ ROM_START( cupsocs2 )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "seibu7.8a", 0x000000, 0x08000, CRC(f63329f9) SHA1(51736de48efc14415cfdf169b43623d4c95fde2b) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "seibu6.7x", 0x000000, 0x010000, CRC(21c1e1b8) SHA1(30928c8ef98bf32ba0bf795ddadba1c95fcffe9d) )
@@ -2277,7 +2277,7 @@ ROM_START( cupsocs2 )
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@@ -2296,7 +2296,7 @@ ROM_START( olysoc92 )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "seibu7.8a", 0x000000, 0x08000, CRC(f63329f9) SHA1(51736de48efc14415cfdf169b43623d4c95fde2b) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "seibu6.7x", 0x000000, 0x010000, CRC(21c1e1b8) SHA1(30928c8ef98bf32ba0bf795ddadba1c95fcffe9d) )
@@ -2314,7 +2314,7 @@ ROM_START( olysoc92 )
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@@ -2333,7 +2333,7 @@ ROM_START( olysoc92a )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "seibu7.8a", 0x000000, 0x08000, CRC(f63329f9) SHA1(51736de48efc14415cfdf169b43623d4c95fde2b) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "6_7x.bin", 0x000000, 0x010000, CRC(7981366e) SHA1(b859bf23c5ae466f4020958a06935192fa68ee8d) )
@@ -2351,7 +2351,7 @@ ROM_START( olysoc92a )
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "seibu8.7a", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@@ -2371,7 +2371,7 @@ ROM_START( olysoc92b )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* Z80 code, banked data */
ROM_LOAD( "7", 0x000000, 0x08000, CRC(f63329f9) SHA1(51736de48efc14415cfdf169b43623d4c95fde2b) )
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "char", 0 )
ROM_LOAD16_BYTE( "6", 0x000000, 0x010000, CRC(7edb1700) SHA1(db30c01fc0e5b9f3c2d6139f89ec88936bc75b38) )
@@ -2389,7 +2389,7 @@ ROM_START( olysoc92b )
ROM_LOAD( "back-2.6y", 0x000000, 0x080000, CRC(e07712af) SHA1(2a0285d6a1e0141838e898252b8d922a6263b05f) )
ROM_REGION( 0x080000, "gfx6", 0 ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x040000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "8", 0x000000, 0x040000, CRC(6f594808) SHA1(218aa12068aa587c7656355f6a6b86d97c868774) )
@@ -2440,7 +2440,7 @@ ROM_START( cupsocsb )
ROM_REGION( 0x200000, "sprite", ROMREGION_INVERT ) /* bootleg sprite gfx */
ROM_LOAD( "sc_07.bin", 0x000000, 0x080000, CRC(dcb29d01) SHA1(72b4234622605f0ab03f21fdb6a61c6dac36000d) )
ROM_LOAD( "sc_06.bin", 0x080000, 0x080000, CRC(2dc70e05) SHA1(f1d0beb8428a7e1d7c7818e6719abdc543b2fa80) )
- ROM_COPY( "sprite", 0x00000, 0x100000, 0x100000 )
+ ROM_COPY( "sprite", nullptr, 0x100000, 0x100000 )
ROM_REGION( 0x200000, "test1", 0 ) /* bootleg tile gfx */
ROM_LOAD16_BYTE( "sc_09.bin", 0x000000, 0x080000, CRC(695b6342) SHA1(dfccb43789021ba2568b9284ae61e64f7f89b152) )
@@ -2452,32 +2452,32 @@ ROM_START( cupsocsb )
ROM_COPY( "test1", 0x080000, 0x00000, 0x020000 )
ROM_REGION( 0x100000, "gfx3", ROMREGION_INVERT ) /* MBK tiles */
- ROM_COPY( "test1", 0x000000, 0x00000, 0x080000 )
+ ROM_COPY( "test1", nullptr, 0x00000, 0x080000 )
ROM_COPY( "test1", 0x100000, 0x80000, 0x080000 )
ROM_REGION( 0x100000, "gfx4", ROMREGION_INVERT ) /* not used */
- ROM_COPY("gfx3",0x00000,0x00000,0x100000)
+ ROM_COPY("gfx3",nullptr,0x00000,0x100000)
ROM_REGION( 0x080000, "gfx5", ROMREGION_INVERT ) /* BK3 tiles */
ROM_COPY( "test1", 0x180000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "gfx6", ROMREGION_INVERT ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x100000, "adpcm", ROMREGION_ERASEFF ) /* ADPCM samples */
ROM_LOAD( "sc_02.bin", 0x000000, 0x020000, CRC(a70d4f03) SHA1(c2482e624c8a828a94206a36d10c1021ad8ca1d0) )
ROM_LOAD( "sc_03.bin", 0x080000, 0x080000, CRC(6e254d12) SHA1(857779dbd276b688201a8ea3afd5817e38acad2e) )
ROM_REGION( 0x200000, "oki", ROMREGION_ERASEFF )
- ROM_COPY( "adpcm", 0x00000, 0x000000, 0x20000 ) //bank 0
- ROM_COPY( "adpcm", 0x00000, 0x020000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x100000, 0x20000 ) //bank 4
+ ROM_COPY( "adpcm", nullptr, 0x000000, 0x20000 ) //bank 0
+ ROM_COPY( "adpcm", nullptr, 0x020000, 0x20000 )
+ ROM_COPY( "adpcm", nullptr, 0x100000, 0x20000 ) //bank 4
ROM_COPY( "adpcm", 0x80000, 0x120000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x140000, 0x20000 ) //bank 5
+ ROM_COPY( "adpcm", nullptr, 0x140000, 0x20000 ) //bank 5
ROM_COPY( "adpcm", 0xa0000, 0x160000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x180000, 0x20000 ) //bank 6
+ ROM_COPY( "adpcm", nullptr, 0x180000, 0x20000 ) //bank 6
ROM_COPY( "adpcm", 0xc0000, 0x1a0000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x1c0000, 0x20000 ) //bank 7
+ ROM_COPY( "adpcm", nullptr, 0x1c0000, 0x20000 ) //bank 7
ROM_COPY( "adpcm", 0xe0000, 0x1e0000, 0x20000 )
@@ -2503,7 +2503,7 @@ ROM_START( cupsocsb2 )
ROM_REGION( 0x200000, "sprite", ROMREGION_INVERT ) /* bootleg sprite gfx */
ROM_LOAD( "sc_07.bin", 0x000000, 0x080000, CRC(dcb29d01) SHA1(72b4234622605f0ab03f21fdb6a61c6dac36000d) )
ROM_LOAD( "sc_06.bin", 0x080000, 0x080000, CRC(2dc70e05) SHA1(f1d0beb8428a7e1d7c7818e6719abdc543b2fa80) )
- ROM_COPY( "sprite", 0x00000, 0x100000, 0x100000 )
+ ROM_COPY( "sprite", nullptr, 0x100000, 0x100000 )
ROM_REGION( 0x200000, "test1", 0 ) /* bootleg tile gfx */
ROM_LOAD16_BYTE( "sc_09.bin", 0x000000, 0x080000, CRC(695b6342) SHA1(dfccb43789021ba2568b9284ae61e64f7f89b152) )
@@ -2515,32 +2515,32 @@ ROM_START( cupsocsb2 )
ROM_COPY( "test1", 0x080000, 0x00000, 0x020000 )
ROM_REGION( 0x100000, "gfx3", ROMREGION_INVERT ) /* MBK tiles */
- ROM_COPY( "test1", 0x000000, 0x00000, 0x080000 )
+ ROM_COPY( "test1", nullptr, 0x00000, 0x080000 )
ROM_COPY( "test1", 0x100000, 0x80000, 0x080000 )
ROM_REGION( 0x100000, "gfx4", ROMREGION_INVERT ) /* not used */
- ROM_COPY("gfx3",0x00000,0x00000,0x100000)
+ ROM_COPY("gfx3",nullptr,0x00000,0x100000)
ROM_REGION( 0x080000, "gfx5", ROMREGION_INVERT ) /* BK3 tiles */
ROM_COPY( "test1", 0x180000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "gfx6", ROMREGION_INVERT ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x100000, "adpcm", ROMREGION_ERASEFF ) /* ADPCM samples */
ROM_LOAD( "sc_02.bin", 0x000000, 0x020000, CRC(a70d4f03) SHA1(c2482e624c8a828a94206a36d10c1021ad8ca1d0) )
ROM_LOAD( "sc_03.bin", 0x080000, 0x080000, CRC(6e254d12) SHA1(857779dbd276b688201a8ea3afd5817e38acad2e) )
ROM_REGION( 0x200000, "oki", ROMREGION_ERASEFF )
- ROM_COPY( "adpcm", 0x00000, 0x000000, 0x20000 ) //bank 0
- ROM_COPY( "adpcm", 0x00000, 0x020000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x100000, 0x20000 ) //bank 4
+ ROM_COPY( "adpcm", nullptr, 0x000000, 0x20000 ) //bank 0
+ ROM_COPY( "adpcm", nullptr, 0x020000, 0x20000 )
+ ROM_COPY( "adpcm", nullptr, 0x100000, 0x20000 ) //bank 4
ROM_COPY( "adpcm", 0x80000, 0x120000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x140000, 0x20000 ) //bank 5
+ ROM_COPY( "adpcm", nullptr, 0x140000, 0x20000 ) //bank 5
ROM_COPY( "adpcm", 0xa0000, 0x160000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x180000, 0x20000 ) //bank 6
+ ROM_COPY( "adpcm", nullptr, 0x180000, 0x20000 ) //bank 6
ROM_COPY( "adpcm", 0xc0000, 0x1a0000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x1c0000, 0x20000 ) //bank 7
+ ROM_COPY( "adpcm", nullptr, 0x1c0000, 0x20000 ) //bank 7
ROM_COPY( "adpcm", 0xe0000, 0x1e0000, 0x20000 )
@@ -2565,7 +2565,7 @@ ROM_START( cupsocsb3 )
ROM_REGION( 0x200000, "sprite", ROMREGION_INVERT ) /* bootleg sprite gfx */
ROM_LOAD( "sc_07.bin", 0x000000, 0x080000, CRC(dcb29d01) SHA1(72b4234622605f0ab03f21fdb6a61c6dac36000d) )
ROM_LOAD( "sc_06.bin", 0x080000, 0x080000, CRC(2dc70e05) SHA1(f1d0beb8428a7e1d7c7818e6719abdc543b2fa80) )
- ROM_COPY( "sprite", 0x00000, 0x100000, 0x100000 )
+ ROM_COPY( "sprite", nullptr, 0x100000, 0x100000 )
ROM_REGION( 0x200000, "test1", 0 ) /* bootleg tile gfx */
ROM_LOAD16_BYTE( "sc_09.bin", 0x000000, 0x080000, CRC(695b6342) SHA1(dfccb43789021ba2568b9284ae61e64f7f89b152) )
@@ -2577,32 +2577,32 @@ ROM_START( cupsocsb3 )
ROM_COPY( "test1", 0x080000, 0x00000, 0x020000 )
ROM_REGION( 0x100000, "gfx3", ROMREGION_INVERT ) /* MBK tiles */
- ROM_COPY( "test1", 0x000000, 0x00000, 0x080000 )
+ ROM_COPY( "test1", nullptr, 0x00000, 0x080000 )
ROM_COPY( "test1", 0x100000, 0x80000, 0x080000 )
ROM_REGION( 0x100000, "gfx4", ROMREGION_INVERT ) /* not used */
- ROM_COPY("gfx3",0x00000,0x00000,0x100000)
+ ROM_COPY("gfx3",nullptr,0x00000,0x100000)
ROM_REGION( 0x080000, "gfx5", ROMREGION_INVERT ) /* BK3 tiles */
ROM_COPY( "test1", 0x180000, 0x00000, 0x080000 )
ROM_REGION( 0x080000, "gfx6", ROMREGION_INVERT ) /* LBK tiles */
- ROM_COPY( "gfx5", 0x00000, 0x00000, 0x080000 )
+ ROM_COPY( "gfx5", nullptr, 0x00000, 0x080000 )
ROM_REGION( 0x100000, "adpcm", ROMREGION_ERASEFF ) /* ADPCM samples */
ROM_LOAD( "sc_02.bin", 0x000000, 0x020000, CRC(a70d4f03) SHA1(c2482e624c8a828a94206a36d10c1021ad8ca1d0) )
ROM_LOAD( "sc_03.bin", 0x080000, 0x080000, CRC(6e254d12) SHA1(857779dbd276b688201a8ea3afd5817e38acad2e) )
ROM_REGION( 0x200000, "oki", ROMREGION_ERASEFF )
- ROM_COPY( "adpcm", 0x00000, 0x000000, 0x20000 ) //bank 0
- ROM_COPY( "adpcm", 0x00000, 0x020000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x100000, 0x20000 ) //bank 4
+ ROM_COPY( "adpcm", nullptr, 0x000000, 0x20000 ) //bank 0
+ ROM_COPY( "adpcm", nullptr, 0x020000, 0x20000 )
+ ROM_COPY( "adpcm", nullptr, 0x100000, 0x20000 ) //bank 4
ROM_COPY( "adpcm", 0x80000, 0x120000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x140000, 0x20000 ) //bank 5
+ ROM_COPY( "adpcm", nullptr, 0x140000, 0x20000 ) //bank 5
ROM_COPY( "adpcm", 0xa0000, 0x160000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x180000, 0x20000 ) //bank 6
+ ROM_COPY( "adpcm", nullptr, 0x180000, 0x20000 ) //bank 6
ROM_COPY( "adpcm", 0xc0000, 0x1a0000, 0x20000 )
- ROM_COPY( "adpcm", 0x00000, 0x1c0000, 0x20000 ) //bank 7
+ ROM_COPY( "adpcm", nullptr, 0x1c0000, 0x20000 ) //bank 7
ROM_COPY( "adpcm", 0xe0000, 0x1e0000, 0x20000 )
/* these are maths tables, for whatever COP replacement the bootlegs use */
diff --git a/src/mame/drivers/lemmings.cpp b/src/mame/drivers/lemmings.cpp
index 321e88e1665..a3aa70f3465 100644
--- a/src/mame/drivers/lemmings.cpp
+++ b/src/mame/drivers/lemmings.cpp
@@ -220,7 +220,7 @@ static const gfx_layout sprite_layout =
static GFXDECODE_START( lemmings )
GFXDECODE_ENTRY( "gfx1", 0, sprite_layout, 0, 16 ) /* Sprites 16x16 */
GFXDECODE_ENTRY( "gfx2", 0, sprite_layout, 0, 16 ) /* Sprites 16x16 */
- GFXDECODE_ENTRY( NULL, 0, charlayout, 0, 16 ) /* Dynamically modified */
+ GFXDECODE_ENTRY( nullptr, 0, charlayout, 0, 16 ) /* Dynamically modified */
GFXDECODE_END
/******************************************************************************/
@@ -304,13 +304,13 @@ ROM_START( lemmings )
ROM_LOAD( "lemmings.9", 0x000000, 0x10000, CRC(e06442f5) SHA1(d9c8b681cce1d0257a0446bc820c7d679e2a1168) )
ROM_LOAD( "lemmings.10", 0x010000, 0x10000, CRC(36398848) SHA1(6c6956607f889c35367e6df4a32359042fad695e) )
ROM_LOAD( "lemmings.11", 0x020000, 0x10000, CRC(b46a54e5) SHA1(53b053346f80357aecff4ab888a8562f99cb318f) )
- ROM_FILL( 0x030000, 0x10000, 0 ) /* 3bpp data but sprite chip expects 4 */
+ ROM_FILL( 0x030000, 0x10000, nullptr ) /* 3bpp data but sprite chip expects 4 */
ROM_REGION( 0x40000, "gfx2", 0 )
ROM_LOAD( "lemmings.12", 0x000000, 0x10000, CRC(dc9047ff) SHA1(1bbe573fa51127a9e8b970a353f3cceab00f486a) )
ROM_LOAD( "lemmings.13", 0x010000, 0x10000, CRC(7cc15491) SHA1(73c1c11b2738f6679c70cae8ac4c55cdc9b8fc27) )
ROM_LOAD( "lemmings.14", 0x020000, 0x10000, CRC(c162788f) SHA1(e1f669efa59699cd1b7da71b112701ee79240c18) )
- ROM_FILL( 0x030000, 0x10000, 0 ) /* 3bpp data but sprite chip expects 4 */
+ ROM_FILL( 0x030000, 0x10000, nullptr ) /* 3bpp data but sprite chip expects 4 */
ROM_REGION( 0x40000, "oki", 0 ) /* ADPCM samples */
ROM_LOAD( "lemmings.16", 0x00000, 0x20000, CRC(f747847c) SHA1(00880fa6dff979e5d15daea61938bd18c768c92f) )
diff --git a/src/mame/drivers/lethal.cpp b/src/mame/drivers/lethal.cpp
index 59015da3704..30f82d8195c 100644
--- a/src/mame/drivers/lethal.cpp
+++ b/src/mame/drivers/lethal.cpp
@@ -481,8 +481,8 @@ void lethal_state::machine_start()
void lethal_state::machine_reset()
{
- for (int i = 0; i < 4; i++)
- m_layer_colorbase[i] = 0;
+ for (auto & elem : m_layer_colorbase)
+ elem = 0;
m_sprite_colorbase = 0;
m_back_colorbase = 0;
diff --git a/src/mame/drivers/lethalj.cpp b/src/mame/drivers/lethalj.cpp
index 7968fe4efed..c49a6a0b26e 100644
--- a/src/mame/drivers/lethalj.cpp
+++ b/src/mame/drivers/lethalj.cpp
@@ -707,8 +707,8 @@ ROM_START( eggventr )
ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */
ROM_LOAD16_BYTE( "evc8.10.vc8", 0x000000, 0x020000, CRC(225d1164) SHA1(b0dc55f2e8ded1fe7874de05987fcf879772289e) ) /* Labeled as EVC8.10 */
ROM_LOAD16_BYTE( "evc9.10.vc9", 0x000001, 0x020000, CRC(42f6e904) SHA1(11be8e7383a218aac0e1a63236bbdb7cca0993bf) ) /* Labeled as EVC9.10 */
- ROM_COPY( "user1", 0x000000, 0x040000, 0x040000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
- ROM_COPY( "user1", 0x000000, 0x080000, 0x080000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
+ ROM_COPY( "user1", nullptr, 0x040000, 0x040000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
+ ROM_COPY( "user1", nullptr, 0x080000, 0x080000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
ROM_REGION16_LE( 0x600000, "gfx1", 0 ) /* graphics data */
ROM_LOAD16_BYTE( "egr1.gr1", 0x000000, 0x100000, CRC(f73f80d9) SHA1(6278b45579a256b9576ba6d4f5a15fab26797c3d) )
@@ -733,8 +733,8 @@ ROM_START( eggventr8 )
ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */
ROM_LOAD16_BYTE( "evc8.8.vc8", 0x000000, 0x020000, CRC(5a130c04) SHA1(00408912b436efa003bb02dce90fae4fe33a0180) ) /* Labeled as EVC8.8 */
ROM_LOAD16_BYTE( "evc9.8.vc9", 0x000001, 0x020000, CRC(3ac0a95b) SHA1(7f3bd0e6d2d790af4aa6881ea8de8b296a64164a) ) /* Labeled as EVC9.8 */
- ROM_COPY( "user1", 0x000000, 0x040000, 0x040000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
- ROM_COPY( "user1", 0x000000, 0x080000, 0x080000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
+ ROM_COPY( "user1", nullptr, 0x040000, 0x040000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
+ ROM_COPY( "user1", nullptr, 0x080000, 0x080000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
ROM_REGION16_LE( 0x600000, "gfx1", 0 ) /* graphics data */
ROM_LOAD16_BYTE( "egr1.gr1", 0x000000, 0x100000, CRC(f73f80d9) SHA1(6278b45579a256b9576ba6d4f5a15fab26797c3d) )
@@ -759,8 +759,8 @@ ROM_START( eggventr7 )
ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */
ROM_LOAD16_BYTE( "evc8.7.vc8", 0x000000, 0x020000, CRC(99999899) SHA1(e3908600fa711baa7f7562f86498ec7e988a5bea) ) /* Labeled as EVC8.7 */
ROM_LOAD16_BYTE( "evc9.7.vc9", 0x000001, 0x020000, CRC(1b608155) SHA1(256dd981515d57f806a3770bdc6ff46b9000f7f3) ) /* Labeled as EVC9.7 */
- ROM_COPY( "user1", 0x000000, 0x040000, 0x040000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
- ROM_COPY( "user1", 0x000000, 0x080000, 0x080000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
+ ROM_COPY( "user1", nullptr, 0x040000, 0x040000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
+ ROM_COPY( "user1", nullptr, 0x080000, 0x080000 ) // Program roms found as 27C010 & 27C040 with 0xff filled 0x20000-0x7ffff
ROM_REGION16_LE( 0x600000, "gfx1", 0 ) /* graphics data */
ROM_LOAD16_BYTE( "egr1.gr1", 0x000000, 0x100000, CRC(f73f80d9) SHA1(6278b45579a256b9576ba6d4f5a15fab26797c3d) )
@@ -833,8 +833,8 @@ ROM_START( eggventrd )
ROM_REGION16_LE( 0x100000, "user1", 0 ) /* 34010 code */
ROM_LOAD16_BYTE( "eggdlx.vc8", 0x000000, 0x020000, CRC(8d678842) SHA1(92b18ec903ec8579e7dffb40284987f1d44255b8) )
ROM_LOAD16_BYTE( "eggdlx.vc9", 0x000001, 0x020000, CRC(9db3fd23) SHA1(165a12a2d107c93cf216e755596e7457010a8f17) )
- ROM_COPY( "user1", 0x000000, 0x040000, 0x040000 ) // Program roms found as 27C010 & 27C040 with data repeated 4 times
- ROM_COPY( "user1", 0x000000, 0x080000, 0x080000 ) // Program roms found as 27C010 & 27C040 with data repeated 4 times
+ ROM_COPY( "user1", nullptr, 0x040000, 0x040000 ) // Program roms found as 27C010 & 27C040 with data repeated 4 times
+ ROM_COPY( "user1", nullptr, 0x080000, 0x080000 ) // Program roms found as 27C010 & 27C040 with data repeated 4 times
ROM_REGION16_LE( 0x600000, "gfx1", 0 ) /* graphics data */
ROM_LOAD16_BYTE( "egr1.gr1", 0x000000, 0x100000, CRC(f73f80d9) SHA1(6278b45579a256b9576ba6d4f5a15fab26797c3d) )
diff --git a/src/mame/drivers/liberate.cpp b/src/mame/drivers/liberate.cpp
index 9e0b2b7d644..a650eb1a7fe 100644
--- a/src/mame/drivers/liberate.cpp
+++ b/src/mame/drivers/liberate.cpp
@@ -877,7 +877,7 @@ ROM_START( prosoccr )
ROM_COPY( "shared_gfx", 0x4800, 0x4800, 0x1800 )
ROM_REGION( 0x6000, "sp_gfx", 0 )
- ROM_COPY( "shared_gfx", 0x0000, 0x0000, 0x2000 )
+ ROM_COPY( "shared_gfx", nullptr, 0x0000, 0x2000 )
ROM_COPY( "shared_gfx", 0x2000, 0x2000, 0x2000 )
ROM_COPY( "shared_gfx", 0x4000, 0x4000, 0x2000 )
@@ -934,7 +934,7 @@ ROM_START( prosport )
/* 8 - Pro Bowling */
ROM_REGION( 0x6000, "probowl_fg_gfx", 0 )
- ROM_COPY( "fg_gfx_src", 0x00000, 0x00000, 0x2000 )
+ ROM_COPY( "fg_gfx_src", nullptr, 0x00000, 0x2000 )
ROM_COPY( "fg_gfx_src", 0x06000, 0x02000, 0x2000 )
ROM_COPY( "fg_gfx_src", 0x0c000, 0x04000, 0x2000 )
@@ -953,7 +953,7 @@ ROM_START( prosport )
ROM_LOAD( "ic45ar17.bin", 0x01000, 0x1000, CRC(5f1c621e) SHA1(29ce85d3d5da5ee16bb67644b0555ab9bce52d05) )
ROM_REGION(0x02000, "user1", 0 )
- ROM_COPY( "gfx2", 0x0000, 0x0000, 0x2000 )
+ ROM_COPY( "gfx2", nullptr, 0x0000, 0x2000 )
ROM_END
ROM_START( prosporta )
@@ -996,7 +996,7 @@ ROM_START( prosporta )
/* 8 - Pro Bowling */
ROM_REGION( 0x6000, "probowl_fg_gfx", 0 )
- ROM_COPY( "fg_gfx_src", 0x00000, 0x00000, 0x2000 )
+ ROM_COPY( "fg_gfx_src", nullptr, 0x00000, 0x2000 )
ROM_COPY( "fg_gfx_src", 0x06000, 0x02000, 0x2000 )
ROM_COPY( "fg_gfx_src", 0x0c000, 0x04000, 0x2000 )
@@ -1015,7 +1015,7 @@ ROM_START( prosporta )
ROM_LOAD( "ar17.45", 0x01000, 0x1000, CRC(5f1c621e) SHA1(29ce85d3d5da5ee16bb67644b0555ab9bce52d05) )
ROM_REGION(0x02000, "user1", 0 )
- ROM_COPY( "gfx2", 0x0000, 0x0000, 0x2000 )
+ ROM_COPY( "gfx2", nullptr, 0x0000, 0x2000 )
ROM_END
ROM_START( boomrang )
diff --git a/src/mame/drivers/llc.cpp b/src/mame/drivers/llc.cpp
index 45cb0ce5348..f6369342344 100644
--- a/src/mame/drivers/llc.cpp
+++ b/src/mame/drivers/llc.cpp
@@ -148,14 +148,14 @@ WRITE8_MEMBER( llc_state::kbd_put )
static const z80_daisy_config llc1_daisy_chain[] =
{
{ "z80ctc" },
- { NULL }
+ { nullptr }
};
static const z80_daisy_config llc2_daisy_chain[] =
{
{ "z80pio1" },
{ "z80ctc" },
- { NULL }
+ { nullptr }
};
/* F4 Character Displayer */
@@ -289,7 +289,7 @@ ROM_START( llc1 )
ROM_LOAD( "llc1_tb1.bin", 0x0800, 0x0400, CRC(0d9d4039) SHA1(b515e385af57f4faf3a9f7b4a1edd59a1c1ea260) )
ROM_LOAD( "llc1_tb2.bin", 0x0c00, 0x0400, CRC(28bfea2a) SHA1(a68a8b87bfc931627ddd8d124b153e511477fbaf) )
ROM_LOAD( "llc1_tb3.bin", 0x1000, 0x0400, CRC(fe5e3132) SHA1(cc3b191e41f5772a4b86b8eb0ebe6fce67872df6) )
- ROM_FILL(0x23b, 1, 0x00) // don't reboot when typing into the monitor
+ ROM_FILL(0x23b, 1, nullptr) // don't reboot when typing into the monitor
ROM_FILL(0x2dc, 1, 0x0f) // fix display of AF in the reg command
ROM_REGION(0x0400, "chargen",0)
ROM_LOAD ("llc1_zg.bin", 0x0000, 0x0400, CRC(fa2cd659) SHA1(1fa5f9992f35929f656c4ce55ed6980c5da1772b) )
diff --git a/src/mame/drivers/lola8a.cpp b/src/mame/drivers/lola8a.cpp
index c6f2e9a6c4f..1bed1666a07 100644
--- a/src/mame/drivers/lola8a.cpp
+++ b/src/mame/drivers/lola8a.cpp
@@ -231,8 +231,8 @@ READ8_MEMBER(lola8a_state::keyboard_r)
{
"line_0", "line_1", "line_2", "line_3",
"line_4", "line_5", "line_6", "line_7",
- "line_8", "line_9", NULL, NULL,
- NULL,NULL,NULL,NULL
+ "line_8", "line_9", nullptr, nullptr,
+ nullptr,nullptr,nullptr,nullptr
};
if( keynames[m_portb & 0x0f])
diff --git a/src/mame/drivers/m10.cpp b/src/mame/drivers/m10.cpp
index bbb08433573..ad8e5ccd3df 100644
--- a/src/mame/drivers/m10.cpp
+++ b/src/mame/drivers/m10.cpp
@@ -796,7 +796,7 @@ static const char *const m10_sample_names[] =
"8", /* UFO/saucer hit */
"9", /* bonus base */
"0", /* UFO sound */
- 0
+ nullptr
};
/*************************************
diff --git a/src/mame/drivers/m20.cpp b/src/mame/drivers/m20.cpp
index 60aa7c8bae4..52259158f2f 100644
--- a/src/mame/drivers/m20.cpp
+++ b/src/mame/drivers/m20.cpp
@@ -185,7 +185,7 @@ WRITE16_MEMBER(m20_state::port21_w)
m_floppy1->mon_w(1);
if(!(data & 3))
- m_fd1797->set_floppy(NULL);
+ m_fd1797->set_floppy(nullptr);
// density select 1 - sd, 0 - dd
m_fd1797->dden_w(data & 8);
@@ -830,7 +830,7 @@ static MACHINE_CONFIG_START( m20, m20_state )
MCFG_RS232_PORT_ADD("kbd", keyboard, "m20")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("i8251_1", i8251_device, write_rxd))
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("i8251_2", i8251_device, write_rxd))
MCFG_DEVICE_ADD("apb", M20_8086, 0)
diff --git a/src/mame/drivers/m24.cpp b/src/mame/drivers/m24.cpp
index 154605f1349..9eafb8abbcf 100644
--- a/src/mame/drivers/m24.cpp
+++ b/src/mame/drivers/m24.cpp
@@ -260,9 +260,9 @@ static MACHINE_CONFIG_START( olivetti, m24_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "mb3", pc_isa8_cards, "lpt", true)
MCFG_ISA8_SLOT_ADD("mb:isa", "mb4", pc_isa8_cards, "com", true)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, nullptr, false)
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp
index 8d7b7ec094a..91b05cf42b5 100644
--- a/src/mame/drivers/m5.cpp
+++ b/src/mame/drivers/m5.cpp
@@ -518,7 +518,7 @@ SLOT_INTERFACE_END
static const z80_daisy_config m5_daisy_chain[] =
{
{ Z80CTC_TAG },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/m63.cpp b/src/mame/drivers/m63.cpp
index 9889122e369..1222a8aac84 100644
--- a/src/mame/drivers/m63.cpp
+++ b/src/mame/drivers/m63.cpp
@@ -399,9 +399,9 @@ WRITE8_MEMBER(m63_state::snddata_w)
m_ay1->address_w(space, 0, offset);
else if ((m_p2 & 0xf0) == 0xa0)
m_ay1->data_w(space, 0, offset);
- else if (m_ay2 != NULL && (m_p1 & 0xe0) == 0x60)
+ else if (m_ay2 != nullptr && (m_p1 & 0xe0) == 0x60)
m_ay2->address_w(space, 0, offset);
- else if (m_ay2 != NULL && (m_p1 & 0xe0) == 0x40)
+ else if (m_ay2 != nullptr && (m_p1 & 0xe0) == 0x40)
m_ay2->data_w(space, 0, offset);
else if ((m_p2 & 0xf0) == 0x70 )
m_sound_status = offset;
@@ -974,7 +974,7 @@ ROM_START( fghtbskt )
ROM_REGION( 0x2000, "gfx1", 0 )
ROM_LOAD( "fb08.12f", 0x0000, 0x1000, CRC(271cd7b8) SHA1(00cfeb6ba429cf6cc59d6542dea8de2ca79155ed) )
- ROM_FILL( 0x1000, 0x1000, 0 )
+ ROM_FILL( 0x1000, 0x1000, nullptr )
ROM_REGION( 0x6000, "gfx2", 0 )
ROM_LOAD( "fb21.25e", 0x0000, 0x2000, CRC(02843591) SHA1(e38ccc97dcbd642d0ac768837f7baf1573fdb91f) )
diff --git a/src/mame/drivers/m92.cpp b/src/mame/drivers/m92.cpp
index 6f06921f32b..3233dabe95f 100644
--- a/src/mame/drivers/m92.cpp
+++ b/src/mame/drivers/m92.cpp
@@ -1577,13 +1577,13 @@ ROM_START( ppan )
ROM_LOAD( "3.u122", 0x000000, 0x080000, CRC(d0d37028) SHA1(0f58d220a1972bafa1299a19e704b7735886c8b6) )
ROM_REGION( 0x100000, "oki", 0) /* OKI Samples copied here */
- ROM_COPY( "okidata", 0x000000, 0x000000, 0x20000 )
- ROM_COPY( "okidata", 0x000000, 0x020000, 0x20000 )
- ROM_COPY( "okidata", 0x000000, 0x040000, 0x20000 )
+ ROM_COPY( "okidata", nullptr, 0x000000, 0x20000 )
+ ROM_COPY( "okidata", nullptr, 0x020000, 0x20000 )
+ ROM_COPY( "okidata", nullptr, 0x040000, 0x20000 )
ROM_COPY( "okidata", 0x020000, 0x060000, 0x20000 )
- ROM_COPY( "okidata", 0x000000, 0x080000, 0x20000 )
+ ROM_COPY( "okidata", nullptr, 0x080000, 0x20000 )
ROM_COPY( "okidata", 0x040000, 0x0a0000, 0x20000 )
- ROM_COPY( "okidata", 0x000000, 0x0c0000, 0x20000 )
+ ROM_COPY( "okidata", nullptr, 0x0c0000, 0x20000 )
ROM_COPY( "okidata", 0x060000, 0x0e0000, 0x20000 )
ROM_END
diff --git a/src/mame/drivers/mac.cpp b/src/mame/drivers/mac.cpp
index a574e596ea6..907dab8926b 100644
--- a/src/mame/drivers/mac.cpp
+++ b/src/mame/drivers/mac.cpp
@@ -995,7 +995,7 @@ static MACHINE_CONFIG_DERIVED( macse, macplus )
MCFG_MACKBD_REMOVE(MACKBD_TAG)
MCFG_MACPDS_BUS_ADD("sepds", "maincpu")
- MCFG_MACPDS_SLOT_ADD("sepds", "pds", mac_sepds_cards, NULL)
+ MCFG_MACPDS_SLOT_ADD("sepds", "pds", mac_sepds_cards, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( macclasc, macplus )
@@ -1104,11 +1104,11 @@ static MACHINE_CONFIG_START( macii, mac_state )
MCFG_NUBUS_OUT_IRQD_CB(WRITELINE(mac_state, nubus_irq_d_w))
MCFG_NUBUS_OUT_IRQE_CB(WRITELINE(mac_state, nubus_irq_e_w))
MCFG_NUBUS_SLOT_ADD("nubus","nb9", mac_nubus_cards, "48gc")
- MCFG_NUBUS_SLOT_ADD("nubus","nba", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbb", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbc", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, NULL)
+ MCFG_NUBUS_SLOT_ADD("nubus","nba", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbb", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbc", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, nullptr)
MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0)
MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "harddisk", SCSIHD, SCSI_ID_6)
@@ -1178,11 +1178,11 @@ static MACHINE_CONFIG_START( maciifx, mac_state )
MCFG_NUBUS_OUT_IRQD_CB(WRITELINE(mac_state, nubus_irq_d_w))
MCFG_NUBUS_OUT_IRQE_CB(WRITELINE(mac_state, nubus_irq_e_w))
MCFG_NUBUS_SLOT_ADD("nubus","nb9", mac_nubus_cards, "48gc")
- MCFG_NUBUS_SLOT_ADD("nubus","nba", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbb", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbc", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, NULL)
+ MCFG_NUBUS_SLOT_ADD("nubus","nba", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbb", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbc", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, nullptr)
MCFG_DEVICE_ADD("scsi", SCSI_PORT, 0)
MCFG_SCSIDEV_ADD("scsi:" SCSI_PORT_DEVICE1, "harddisk", SCSIHD, SCSI_ID_6)
@@ -1258,7 +1258,7 @@ static MACHINE_CONFIG_DERIVED( maclc, macii )
MCFG_NUBUS_OUT_IRQC_CB(WRITELINE(mac_state, nubus_irq_c_w))
MCFG_NUBUS_OUT_IRQD_CB(WRITELINE(mac_state, nubus_irq_d_w))
MCFG_NUBUS_OUT_IRQE_CB(WRITELINE(mac_state, nubus_irq_e_w))
- MCFG_NUBUS_SLOT_ADD("pds","lcpds", mac_lcpds_cards, NULL)
+ MCFG_NUBUS_SLOT_ADD("pds","lcpds", mac_lcpds_cards, nullptr)
MCFG_ASC_REPLACE("asc", C15M, ASC_TYPE_V8, WRITELINE(mac_state, mac_asc_irq))
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
@@ -1356,9 +1356,9 @@ static MACHINE_CONFIG_DERIVED( maciivx, maclc )
MCFG_NUBUS_OUT_IRQC_CB(WRITELINE(mac_state, nubus_irq_c_w))
MCFG_NUBUS_OUT_IRQD_CB(WRITELINE(mac_state, nubus_irq_d_w))
MCFG_NUBUS_OUT_IRQE_CB(WRITELINE(mac_state, nubus_irq_e_w))
- MCFG_NUBUS_SLOT_ADD("nubus","nbc", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, NULL)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbc", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, nullptr)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("4M")
@@ -1391,9 +1391,9 @@ static MACHINE_CONFIG_DERIVED( maciivi, maclc )
MCFG_NUBUS_OUT_IRQC_CB(WRITELINE(mac_state, nubus_irq_c_w))
MCFG_NUBUS_OUT_IRQD_CB(WRITELINE(mac_state, nubus_irq_d_w))
MCFG_NUBUS_OUT_IRQE_CB(WRITELINE(mac_state, nubus_irq_e_w))
- MCFG_NUBUS_SLOT_ADD("nubus","nbc", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, NULL)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbc", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, nullptr)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("4M")
@@ -1467,7 +1467,7 @@ static MACHINE_CONFIG_START( macse30, mac_state )
MCFG_NUBUS_OUT_IRQC_CB(WRITELINE(mac_state, nubus_irq_c_w))
MCFG_NUBUS_OUT_IRQD_CB(WRITELINE(mac_state, nubus_irq_d_w))
MCFG_NUBUS_OUT_IRQE_CB(WRITELINE(mac_state, nubus_irq_e_w))
- MCFG_NUBUS_SLOT_ADD("pds","pds030", mac_pds030_cards, NULL)
+ MCFG_NUBUS_SLOT_ADD("pds","pds030", mac_pds030_cards, nullptr)
MCFG_SWIM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
@@ -1884,8 +1884,8 @@ static MACHINE_CONFIG_START( macqd700, mac_state )
MCFG_NUBUS_OUT_IRQC_CB(WRITELINE(mac_state, nubus_irq_c_w))
MCFG_NUBUS_OUT_IRQD_CB(WRITELINE(mac_state, nubus_irq_d_w))
MCFG_NUBUS_OUT_IRQE_CB(WRITELINE(mac_state, nubus_irq_e_w))
- MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, NULL)
- MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, NULL)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbd", mac_nubus_cards, nullptr)
+ MCFG_NUBUS_SLOT_ADD("nubus","nbe", mac_nubus_cards, nullptr)
MCFG_IWM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
diff --git a/src/mame/drivers/macs.cpp b/src/mame/drivers/macs.cpp
index 1cd74867268..d29d9a7b577 100644
--- a/src/mame/drivers/macs.cpp
+++ b/src/mame/drivers/macs.cpp
@@ -520,7 +520,7 @@ ROM_START( macsbios )
ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x00000, 0x000000, 0x400000 ) // Bios
+ ROM_COPY( "user1", nullptr, 0x000000, 0x400000 ) // Bios
ROM_END
ROM_START( mac2bios )
@@ -529,7 +529,7 @@ ROM_START( mac2bios )
ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x00000, 0x000000, 0x400000 ) // Bios
+ ROM_COPY( "user1", nullptr, 0x000000, 0x400000 ) // Bios
ROM_END
ROM_START( kisekaem )
@@ -545,8 +545,8 @@ ROM_START( kisekaem )
ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x00000, 0x000000, 0x400000 ) // Bios
- ROM_COPY( "user2", 0x00000, 0x400000, 0x400000 ) // Slot A
+ ROM_COPY( "user1", nullptr, 0x000000, 0x400000 ) // Bios
+ ROM_COPY( "user2", nullptr, 0x400000, 0x400000 ) // Slot A
ROM_END
ROM_START( kisekaeh )
@@ -562,8 +562,8 @@ ROM_START( kisekaeh )
ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x00000, 0x000000, 0x400000 ) // Bios
- ROM_COPY( "user2", 0x00000, 0x400000, 0x400000 ) // Slot A
+ ROM_COPY( "user1", nullptr, 0x000000, 0x400000 ) // Bios
+ ROM_COPY( "user2", nullptr, 0x400000, 0x400000 ) // Slot A
ROM_END
ROM_START( cultname ) // uses printer - two different games ? (slot a - checks for printer, slot b - not)
@@ -584,9 +584,9 @@ ROM_START( cultname ) // uses printer - two different games ? (slot a - checks f
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user1", 0x00000, 0x000000, 0x400000 ) // Bios
- ROM_COPY( "user2", 0x00000, 0x400000, 0x400000 ) // Slot A
- ROM_COPY( "user3", 0x00000, 0x800000, 0x400000 ) // Slot B
+ ROM_COPY( "user1", nullptr, 0x000000, 0x400000 ) // Bios
+ ROM_COPY( "user2", nullptr, 0x400000, 0x400000 ) // Slot A
+ ROM_COPY( "user3", nullptr, 0x800000, 0x400000 ) // Slot B
ROM_END
/* these are listed as MACS2 sub-boards, is it the same? - it's not ;) */
@@ -603,7 +603,7 @@ ROM_START( yuka )
ROM_REGION( 0x400000, "user3", ROMREGION_ERASE00 ) // Slot B
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user2", 0x00000, 0x000000, 0x400000 ) // Slot A
+ ROM_COPY( "user2", nullptr, 0x000000, 0x400000 ) // Slot A
ROM_END
ROM_START( yujan )
@@ -618,7 +618,7 @@ ROM_START( yujan )
ROM_REGION( 0x400000, "user3", ROMREGION_ERASEFF ) // Slot B
ROM_REGION( 0x1000000, "maincpu", 0 )
- ROM_COPY( "user2", 0x00000, 0x000000, 0x400000 ) // Slot A
+ ROM_COPY( "user2", nullptr, 0x000000, 0x400000 ) // Slot A
ROM_END
#if 0
diff --git a/src/mame/drivers/magictg.cpp b/src/mame/drivers/magictg.cpp
index 03a296ed606..c74f77db497 100644
--- a/src/mame/drivers/magictg.cpp
+++ b/src/mame/drivers/magictg.cpp
@@ -930,7 +930,7 @@ static MACHINE_CONFIG_START( magictg, magictg_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, pci_dev0_r, pci_dev0_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, pci_dev0_r, pci_dev0_w)
MCFG_PCI_BUS_LEGACY_DEVICE(7, "voodoo_0", voodoo_0_pci_r, voodoo_0_pci_w)
#if defined(USE_TWO_3DFX)
diff --git a/src/mame/drivers/mario.cpp b/src/mame/drivers/mario.cpp
index 371a078c18b..be97bf2ff1b 100644
--- a/src/mame/drivers/mario.cpp
+++ b/src/mame/drivers/mario.cpp
@@ -634,7 +634,7 @@ ROM_START( mario )
ROM_REGION( 0x1800, "audiocpu", 0 ) /* sound */
/* internal rom */
- ROM_FILL( 0x0000, 0x0800, 0x00)
+ ROM_FILL( 0x0000, 0x0800, nullptr)
/* first half banked */
ROM_LOAD( "tma1-c-6k_e.6k", 0x1000, 0x0800, CRC(06b9ff85) SHA1(111a29bcb9cda0d935675fa26eca6b099a88427f) )
/* second half always read */
@@ -668,7 +668,7 @@ ROM_START( marioe )
ROM_REGION( 0x1800, "audiocpu", 0 ) /* sound */
/* internal rom */
- ROM_FILL( 0x0000, 0x0800, 0x00)
+ ROM_FILL( 0x0000, 0x0800, nullptr)
/* first half banked */
ROM_LOAD( "tma1-c-6k_e.6k", 0x1000, 0x0800, CRC(06b9ff85) SHA1(111a29bcb9cda0d935675fa26eca6b099a88427f) )
/* second half always read */
@@ -702,7 +702,7 @@ ROM_START( marioo )
ROM_REGION( 0x1800, "audiocpu", 0 ) /* sound */
/* internal rom */
- ROM_FILL( 0x0000, 0x0800, 0x00)
+ ROM_FILL( 0x0000, 0x0800, nullptr)
/* first half banked */
ROM_LOAD( "tma1-c-6k_e.6k", 0x1000, 0x0800, CRC(06b9ff85) SHA1(111a29bcb9cda0d935675fa26eca6b099a88427f) )
/* second half always read */
@@ -736,7 +736,7 @@ ROM_START( marioj )
ROM_REGION( 0x1800, "audiocpu", 0 ) /* sound */
/* internal rom */
- ROM_FILL( 0x0000, 0x0800, 0x00)
+ ROM_FILL( 0x0000, 0x0800, nullptr)
/* first half banked */
ROM_LOAD( "tma1c-a.6k", 0x1000, 0x0800, CRC(06b9ff85) SHA1(111a29bcb9cda0d935675fa26eca6b099a88427f) )
/* second half always read */
diff --git a/src/mame/drivers/mbc200.cpp b/src/mame/drivers/mbc200.cpp
index 58ccf68eeed..a90b4533ba6 100644
--- a/src/mame/drivers/mbc200.cpp
+++ b/src/mame/drivers/mbc200.cpp
@@ -94,7 +94,7 @@ WRITE8_MEMBER( mbc200_state::pm_porta_w )
WRITE8_MEMBER( mbc200_state::pm_portb_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
// to be verified
switch (data & 0x01)
diff --git a/src/mame/drivers/mbee.cpp b/src/mame/drivers/mbee.cpp
index 35cfd694d67..420aa8340f6 100644
--- a/src/mame/drivers/mbee.cpp
+++ b/src/mame/drivers/mbee.cpp
@@ -585,7 +585,7 @@ INPUT_PORTS_END
static const z80_daisy_config mbee_daisy_chain[] =
{
{ "z80pio" },
- { NULL }
+ { nullptr }
};
/**************************** F4 CHARACTER DISPLAYER */
diff --git a/src/mame/drivers/mc1502.cpp b/src/mame/drivers/mc1502.cpp
index fa3d7866d90..ade7c5accfc 100644
--- a/src/mame/drivers/mc1502.cpp
+++ b/src/mame/drivers/mc1502.cpp
@@ -285,7 +285,7 @@ static MACHINE_CONFIG_START( mc1502, mc1502_state )
MCFG_I8251_TXRDY_HANDLER(DEVWRITELINE("pic8259", pic8259_device, ir7_w))
MCFG_I8251_SYNDET_HANDLER(WRITELINE(mc1502_state, mc1502_i8251_syndet))
- MCFG_RS232_PORT_ADD("irps", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("irps", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("upd8251", i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("upd8251", i8251_device, write_dsr))
diff --git a/src/mame/drivers/mc80.cpp b/src/mame/drivers/mc80.cpp
index ee2ae44bfee..5518a87408a 100644
--- a/src/mame/drivers/mc80.cpp
+++ b/src/mame/drivers/mc80.cpp
@@ -156,7 +156,7 @@ static const z80_daisy_config mc8030_daisy_chain[] =
{ "asp_sio" }, /* sio */
{ "zve_pio" }, /* User pio */
{ "zve_ctc" }, /* User ctc */
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_START( mc8020, mc80_state )
diff --git a/src/mame/drivers/mcr.cpp b/src/mame/drivers/mcr.cpp
index 8bd89ee8ec0..43639f70999 100644
--- a/src/mame/drivers/mcr.cpp
+++ b/src/mame/drivers/mcr.cpp
@@ -1735,7 +1735,7 @@ static const char *const journey_sample_names[] =
{
"*journey",
"sepways",
- 0
+ nullptr
};
static const char *const twotiger_sample_names[] =
@@ -1743,7 +1743,7 @@ static const char *const twotiger_sample_names[] =
"*twotiger",
"left",
"right",
- 0
+ nullptr
};
/*************************************
@@ -2781,7 +2781,7 @@ void mcr_state::mcr_init(int cpuboard, int vidboard, int ssioboard)
save_item(NAME(last_op4));
midway_ssio_device *ssio = machine().device<midway_ssio_device>("ssio");
- if (ssio != NULL)
+ if (ssio != nullptr)
{
ssio->set_custom_output(0, 0xff, write8_delegate(FUNC(mcr_state::mcr_control_port_w), this));
}
diff --git a/src/mame/drivers/mcr3.cpp b/src/mame/drivers/mcr3.cpp
index ef9e885ead8..1c8069c0f17 100644
--- a/src/mame/drivers/mcr3.cpp
+++ b/src/mame/drivers/mcr3.cpp
@@ -1191,7 +1191,7 @@ static const gfx_layout spyhunt_charlayout =
},
128*8,
spyhunt_charlayout_xoffset,
- NULL
+ nullptr
};
@@ -1250,7 +1250,7 @@ static const gfx_layout spyhuntpr_charlayout =
{ 0*8, 4*8, 8*8, 12*8, 16*8, 20*8, 24*8, 28*8, 1*8, 5*8, 9*8, 13*8, 17*8, 21*8, 25*8, 29*8 },
32*8,
spyhuntp_charlayout_xoffset,
- NULL
+ nullptr
};
static GFXDECODE_START( mcr3 )
diff --git a/src/mame/drivers/meadows.cpp b/src/mame/drivers/meadows.cpp
index f1d06deb3a5..801f779049a 100644
--- a/src/mame/drivers/meadows.cpp
+++ b/src/mame/drivers/meadows.cpp
@@ -597,7 +597,7 @@ static const char *const bowl3d_sample_names[] =
"footstep", /* "foot sweep" */
"crash", /* "crash" */
"cheering", /* "cheering" */
- 0
+ nullptr
};
/*************************************
diff --git a/src/mame/drivers/mediagx.cpp b/src/mame/drivers/mediagx.cpp
index cf5aa01f122..92c8ce5b515 100644
--- a/src/mame/drivers/mediagx.cpp
+++ b/src/mame/drivers/mediagx.cpp
@@ -880,9 +880,9 @@ static MACHINE_CONFIG_START( mediagx, mediagx_state )
MCFG_FRAGMENT_ADD( pcat_common )
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(18, NULL, cx5510_pci_r, cx5510_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(18, nullptr, cx5510_pci_r, cx5510_pci_w)
- MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
MCFG_TIMER_DRIVER_ADD("sound_timer", mediagx_state, sound_timer_callback)
@@ -943,9 +943,9 @@ READ32_MEMBER(mediagx_state::speedup11_r) { return generic_speedup(space, 11); }
static const struct { read32_delegate func; } speedup_handlers[] =
{
- { read32_delegate(FUNC(mediagx_state::speedup0_r),(mediagx_state*)0) }, { read32_delegate(FUNC(mediagx_state::speedup1_r),(mediagx_state*)0) }, { read32_delegate(FUNC(mediagx_state::speedup2_r),(mediagx_state*)0) }, { read32_delegate(FUNC(mediagx_state::speedup3_r),(mediagx_state*)0) },
- { read32_delegate(FUNC(mediagx_state::speedup4_r),(mediagx_state*)0) }, { read32_delegate(FUNC(mediagx_state::speedup5_r),(mediagx_state*)0) }, { read32_delegate(FUNC(mediagx_state::speedup6_r),(mediagx_state*)0) }, { read32_delegate(FUNC(mediagx_state::speedup7_r),(mediagx_state*)0) },
- { read32_delegate(FUNC(mediagx_state::speedup8_r),(mediagx_state*)0) }, { read32_delegate(FUNC(mediagx_state::speedup9_r),(mediagx_state*)0) }, { read32_delegate(FUNC(mediagx_state::speedup10_r),(mediagx_state*)0) }, { read32_delegate(FUNC(mediagx_state::speedup11_r),(mediagx_state*)0) }
+ { read32_delegate(FUNC(mediagx_state::speedup0_r),(mediagx_state*)nullptr) }, { read32_delegate(FUNC(mediagx_state::speedup1_r),(mediagx_state*)nullptr) }, { read32_delegate(FUNC(mediagx_state::speedup2_r),(mediagx_state*)nullptr) }, { read32_delegate(FUNC(mediagx_state::speedup3_r),(mediagx_state*)nullptr) },
+ { read32_delegate(FUNC(mediagx_state::speedup4_r),(mediagx_state*)nullptr) }, { read32_delegate(FUNC(mediagx_state::speedup5_r),(mediagx_state*)nullptr) }, { read32_delegate(FUNC(mediagx_state::speedup6_r),(mediagx_state*)nullptr) }, { read32_delegate(FUNC(mediagx_state::speedup7_r),(mediagx_state*)nullptr) },
+ { read32_delegate(FUNC(mediagx_state::speedup8_r),(mediagx_state*)nullptr) }, { read32_delegate(FUNC(mediagx_state::speedup9_r),(mediagx_state*)nullptr) }, { read32_delegate(FUNC(mediagx_state::speedup10_r),(mediagx_state*)nullptr) }, { read32_delegate(FUNC(mediagx_state::speedup11_r),(mediagx_state*)nullptr) }
};
#ifdef MAME_DEBUG
diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp
index 927ef1db48a..1168e340be9 100644
--- a/src/mame/drivers/megadriv.cpp
+++ b/src/mame/drivers/megadriv.cpp
@@ -344,7 +344,7 @@ static MACHINE_CONFIG_START( ms_megadriv, md_cons_state )
MCFG_SCREEN_MODIFY("megadriv")
MCFG_SCREEN_VBLANK_DRIVER(md_cons_state, screen_eof_console)
- MCFG_MD_CARTRIDGE_ADD("mdslot", md_cart, NULL)
+ MCFG_MD_CARTRIDGE_ADD("mdslot", md_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","megadriv")
MACHINE_CONFIG_END
@@ -357,7 +357,7 @@ static MACHINE_CONFIG_START( ms_megadpal, md_cons_state )
MCFG_SCREEN_MODIFY("megadriv")
MCFG_SCREEN_VBLANK_DRIVER(md_cons_state, screen_eof_console)
- MCFG_MD_CARTRIDGE_ADD("mdslot", md_cart, NULL)
+ MCFG_MD_CARTRIDGE_ADD("mdslot", md_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","megadriv")
MACHINE_CONFIG_END
@@ -477,7 +477,7 @@ DEVICE_IMAGE_LOAD_MEMBER( md_cons_state, _32x_cart )
UINT32 *ROM32;
int i;
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
length = image.length();
temp_copy.resize(length);
@@ -928,7 +928,7 @@ ROM_START( 32x_scd )
ROM_LOAD( "mpr-15764-t.bin", 0x000000, 0x020000, CRC(2e49d72c) SHA1(328a3228c29fba244b9db2055adc1ec4f7a87e6b) )
ROM_REGION32_BE( 0x400000, "gamecart_sh2", 0 ) /* Copy for the SH2 */
- ROM_COPY( "gamecart", 0x0, 0x0, 0x400000)
+ ROM_COPY( "gamecart", nullptr, 0x0, 0x400000)
ROM_REGION16_BE( 0x400000, "32x_68k_bios", 0 ) /* 68000 Code */
ROM_LOAD( "32x_g_bios.bin", 0x000000, 0x000100, CRC(5c12eae8) SHA1(dbebd76a448447cb6e524ac3cb0fd19fc065d944) )
@@ -947,7 +947,7 @@ ROM_START( 32x_mcd )
ROM_LOAD( "megacd_model1_bios_1_00_e.bin", 0x000000, 0x020000, CRC(529ac15a) SHA1(f891e0ea651e2232af0c5c4cb46a0cae2ee8f356) )
ROM_REGION32_BE( 0x400000, "gamecart_sh2", 0 ) /* Copy for the SH2 */
- ROM_COPY( "gamecart", 0x0, 0x0, 0x400000)
+ ROM_COPY( "gamecart", nullptr, 0x0, 0x400000)
ROM_REGION16_BE( 0x400000, "32x_68k_bios", 0 ) /* 68000 Code */
ROM_LOAD( "32x_g_bios.bin", 0x000000, 0x000100, CRC(5c12eae8) SHA1(dbebd76a448447cb6e524ac3cb0fd19fc065d944) )
@@ -980,7 +980,7 @@ ROM_START( 32x_mcdj )
ROMX_LOAD( "epr-14088e.bin", 0x000000, 0x020000, CRC(9d2da8f2) SHA1(4846f448160059a7da0215a5df12ca160f26dd69), ROM_BIOS(5) )
ROM_REGION32_BE( 0x400000, "gamecart_sh2", 0 ) /* Copy for the SH2 */
- ROM_COPY( "gamecart", 0x0, 0x0, 0x400000)
+ ROM_COPY( "gamecart", nullptr, 0x0, 0x400000)
ROM_REGION16_BE( 0x400000, "32x_68k_bios", 0 ) /* 68000 Code */
ROM_LOAD( "32x_g_bios.bin", 0x000000, 0x000100, CRC(5c12eae8) SHA1(dbebd76a448447cb6e524ac3cb0fd19fc065d944) )
diff --git a/src/mame/drivers/megatech.cpp b/src/mame/drivers/megatech.cpp
index e3c8e8b1837..281578fd94f 100644
--- a/src/mame/drivers/megatech.cpp
+++ b/src/mame/drivers/megatech.cpp
@@ -371,7 +371,7 @@ void mtech_state::set_genz80_as_sms()
memset(sms_mainram,0x00,0x2000);
// fixed rom bank area
- sms_rom = (UINT8 *)prg.install_rom(0x0000, 0xbfff, NULL);
+ sms_rom = (UINT8 *)prg.install_rom(0x0000, 0xbfff, nullptr);
memcpy(sms_rom, m_region_maincpu->base(), 0xc000);
@@ -735,14 +735,14 @@ int mtech_state::load_cart(device_image_interface &image, generic_slot_device *s
const char *pcb_name;
UINT32 size = slot->common_get_size("rom");
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
return IMAGE_INIT_FAIL;
slot->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
ROM = slot->get_rom_base();
memcpy(ROM, image.get_software_region("rom"), size);
- if ((pcb_name = image.get_feature("pcb_type")) == NULL)
+ if ((pcb_name = image.get_feature("pcb_type")) == nullptr)
return IMAGE_INIT_FAIL;
else
{
diff --git a/src/mame/drivers/meritm.cpp b/src/mame/drivers/meritm.cpp
index f765ac75de5..4796bc5adf2 100644
--- a/src/mame/drivers/meritm.cpp
+++ b/src/mame/drivers/meritm.cpp
@@ -1018,7 +1018,7 @@ static const z80_daisy_config meritm_daisy_chain[] =
{
{ "z80pio_0" },
{ "z80pio_1" },
- { NULL }
+ { nullptr }
};
MACHINE_START_MEMBER(meritm_state,merit_common)
diff --git a/src/mame/drivers/mexico86.cpp b/src/mame/drivers/mexico86.cpp
index a763f0f84e4..b82d086738d 100644
--- a/src/mame/drivers/mexico86.cpp
+++ b/src/mame/drivers/mexico86.cpp
@@ -424,7 +424,7 @@ void mexico86_state::machine_start()
void mexico86_state::machine_reset()
{
/*TODO: check the PCB and see how the halt / reset lines are connected. */
- if (m_subcpu != NULL)
+ if (m_subcpu != nullptr)
m_subcpu->set_input_line(INPUT_LINE_RESET, (ioport("DSW1")->read() & 0x80) ? ASSERT_LINE : CLEAR_LINE);
m_port_a_in = 0;
diff --git a/src/mame/drivers/microvsn.cpp b/src/mame/drivers/microvsn.cpp
index 6214f1cacd0..f15bfd8c0a6 100644
--- a/src/mame/drivers/microvsn.cpp
+++ b/src/mame/drivers/microvsn.cpp
@@ -163,16 +163,16 @@ MACHINE_START_MEMBER(microvision_state, microvision)
MACHINE_RESET_MEMBER(microvision_state, microvision)
{
- for( int i = 0; i < 8; i++ )
+ for(auto & elem : m_lcd_latch)
{
- m_lcd_latch[i] = 0;
+ elem = 0;
}
- for( int i = 0; i < 16; i++ )
+ for(auto & elem : m_lcd)
{
for ( int j = 0; j < 16; j++ )
{
- m_lcd[i][j] = 0;
+ elem[j] = 0;
}
}
@@ -225,11 +225,11 @@ void microvision_state::update_lcd()
{
UINT16 temp = row;
- for ( int j = 0; j < 16; j++ )
+ for (auto & elem : m_lcd)
{
if ( ( temp & col ) & 0x8000 )
{
- m_lcd[j][i] = 15;
+ elem[i] = 15;
}
temp <<= 1;
}
@@ -256,13 +256,13 @@ void microvision_state::screen_vblank(screen_device &screen, bool state)
{
if ( state )
{
- for ( int i = 0; i < 16; i++ )
+ for (auto & elem : m_lcd)
{
for ( int j= 0; j < 16; j++ )
{
- if ( m_lcd[i][j] )
+ if ( elem[j] )
{
- m_lcd[i][j]--;
+ elem[j]--;
}
}
}
@@ -528,7 +528,7 @@ DEVICE_IMAGE_LOAD_MEMBER(microvision_state, microvsn_cart)
}
/* Read cartridge */
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
if (image.fread(rom1, file_size) != file_size)
{
diff --git a/src/mame/drivers/midqslvr.cpp b/src/mame/drivers/midqslvr.cpp
index 0e33354dbb4..fcd74e0e1a8 100644
--- a/src/mame/drivers/midqslvr.cpp
+++ b/src/mame/drivers/midqslvr.cpp
@@ -416,10 +416,10 @@ static MACHINE_CONFIG_START( midqslvr, midqslvr_state )
MCFG_FRAGMENT_ADD( pcat_common )
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE( 0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(31, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE( 0, nullptr, intel82439tx_pci_r, intel82439tx_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(31, nullptr, intel82371ab_pci_r, intel82371ab_pci_w)
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
/* video hardware */
diff --git a/src/mame/drivers/midvunit.cpp b/src/mame/drivers/midvunit.cpp
index d39eb62b880..74470fbe667 100644
--- a/src/mame/drivers/midvunit.cpp
+++ b/src/mame/drivers/midvunit.cpp
@@ -1052,7 +1052,7 @@ static MACHINE_CONFIG_DERIVED( midvplus, midvcommon )
MCFG_MACHINE_RESET_OVERRIDE(midvunit_state,midvplus)
MCFG_DEVICE_REMOVE("nvram")
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_DEVICE_ADD("ioasic", MIDWAY_IOASIC, 0)
MCFG_MIDWAY_IOASIC_SHUFFLE(0)
diff --git a/src/mame/drivers/mikromik.cpp b/src/mame/drivers/mikromik.cpp
index 08493f41970..79741fc137a 100644
--- a/src/mame/drivers/mikromik.cpp
+++ b/src/mame/drivers/mikromik.cpp
@@ -502,10 +502,10 @@ static MACHINE_CONFIG_START( mm1, mm1_state )
MCFG_Z80DART_OUT_RXDRQA_CB(WRITELINE(mm1_state, drq2_w))
MCFG_Z80DART_OUT_TXDRQA_CB(WRITELINE(mm1_state, drq1_w))
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, rxa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
- MCFG_RS232_PORT_ADD(RS232_C_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
+ MCFG_RS232_PORT_ADD(RS232_C_TAG, default_rs232_devices, nullptr)
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, ctsb_w))
MCFG_DEVICE_ADD(KB_TAG, MM1_KEYBOARD, 2500) // actual KBCLK is XTAL_6_144MHz/2/16
diff --git a/src/mame/drivers/miniboy7.cpp b/src/mame/drivers/miniboy7.cpp
index d8d6d3a9abc..94029df5be6 100644
--- a/src/mame/drivers/miniboy7.cpp
+++ b/src/mame/drivers/miniboy7.cpp
@@ -258,7 +258,7 @@ PALETTE_INIT_MEMBER(miniboy7_state, miniboy7)
int i;
/* 0000IBGR */
- if (m_proms == 0) return;
+ if (m_proms == nullptr) return;
for (i = 0;i < palette.entries();i++)
{
diff --git a/src/mame/drivers/mirage.cpp b/src/mame/drivers/mirage.cpp
index caaccf62c47..e9971176c8f 100644
--- a/src/mame/drivers/mirage.cpp
+++ b/src/mame/drivers/mirage.cpp
@@ -376,7 +376,7 @@ ROM_START( mirage )
ROM_LOAD( "mbl-03.10a", 0x000000, 0x200000, CRC(4a599703) SHA1(b49e84faa2d6acca952740d30fc8d1a33ac47e79) )
ROM_REGION( 0x200000, "oki_bgm", 0 )
- ROM_COPY( "oki_bgm_data", 0x000000, 0x000000, 0x080000 )
+ ROM_COPY( "oki_bgm_data", nullptr, 0x000000, 0x080000 )
ROM_COPY( "oki_bgm_data", 0x100000, 0x080000, 0x080000 ) // - banks 2,3 and 4,5 are swapped, PAL address shuffle
ROM_COPY( "oki_bgm_data", 0x080000, 0x100000, 0x080000 ) // /
ROM_COPY( "oki_bgm_data", 0x180000, 0x180000, 0x080000 )
diff --git a/src/mame/drivers/missb2.cpp b/src/mame/drivers/missb2.cpp
index 93abb480bbc..85475271f05 100644
--- a/src/mame/drivers/missb2.cpp
+++ b/src/mame/drivers/missb2.cpp
@@ -332,7 +332,7 @@ static const gfx_layout bglayout =
{ 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 },
256*128,
bglayout_xoffset,
- NULL
+ nullptr
};
static const UINT32 bglayout_xoffset_alt[256] =
@@ -386,7 +386,7 @@ static const gfx_layout bglayout_alt =
{ 0*128, 1*128, 2*128, 3*128, 4*128, 5*128, 6*128, 7*128, 8*128, 9*128, 10*128, 11*128, 12*128, 13*128, 14*128, 15*128 },
256*128,
bglayout_xoffset_alt,
- NULL
+ nullptr
};
diff --git a/src/mame/drivers/missile.cpp b/src/mame/drivers/missile.cpp
index f3cfe2b05f6..7931181910e 100644
--- a/src/mame/drivers/missile.cpp
+++ b/src/mame/drivers/missile.cpp
@@ -671,7 +671,7 @@ UINT32 missile_state::screen_update_missile(screen_device &screen, bitmap_ind16
int effy = m_flipscreen ? ((256+24 - y) & 0xff) : y;
UINT8 *src = &videoram[effy * 64];
- UINT8 *src3 = NULL;
+ UINT8 *src3 = nullptr;
/* compute the base of the 3rd pixel row */
if (effy >= 224)
@@ -684,7 +684,7 @@ UINT32 missile_state::screen_update_missile(screen_device &screen, bitmap_ind16
pix = ((pix >> 2) & 4) | ((pix << 1) & 2);
/* if we're in the lower region, get the 3rd bit */
- if (src3 != NULL)
+ if (src3 != nullptr)
pix |= (src3[(x / 8) * 2] >> (x & 7)) & 1;
dst[x] = pix;
diff --git a/src/mame/drivers/mitchell.cpp b/src/mame/drivers/mitchell.cpp
index 5f8777942cf..afd77f6dc9a 100644
--- a/src/mame/drivers/mitchell.cpp
+++ b/src/mame/drivers/mitchell.cpp
@@ -1907,13 +1907,13 @@ ROM_START( mstworld )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
ROM_REGION( 0x80000, "gfx1", ROMREGION_INVERT ) /* GFX */
@@ -2132,7 +2132,7 @@ DRIVER_INIT_MEMBER(mitchell_state,pangb)
{
m_input_type = 0;
bootleg_decode();
- if (m_nvram != NULL)
+ if (m_nvram != nullptr)
m_nvram->set_base(&m_dummy_nvram, sizeof(m_dummy_nvram)); /* for pangba */
}
DRIVER_INIT_MEMBER(mitchell_state,cworld)
diff --git a/src/mame/drivers/model1.cpp b/src/mame/drivers/model1.cpp
index 69f3882fe96..3d40fe656ff 100644
--- a/src/mame/drivers/model1.cpp
+++ b/src/mame/drivers/model1.cpp
@@ -743,7 +743,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(model1_state::model1_interrupt)
m_m1audio->check_fifo_irq();
- if (m_m1comm != NULL)
+ if (m_m1comm != nullptr)
m_m1comm->check_vint_irq();
}
}
@@ -862,7 +862,7 @@ WRITE16_MEMBER(model1_state::snd_latch_to_68k_w)
m_snd_cmd_state = 0;
}
- if (m_dsbz80 != NULL)
+ if (m_dsbz80 != nullptr)
{
// printf("%d: %02x (last %02x)\n", m_snd_cmd_state, data, m_last_snd_cmd);
// HACK: on h/w, who filters out commands the DSB shouldn't see? Need a wiring diagram.
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index 2dbfe076114..e57eaf78641 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -1199,13 +1199,13 @@ WRITE32_MEMBER(model2_state::model2_serial_w)
{
if (ACCESSING_BITS_0_7 && (offset == 0))
{
- if (m_dsbz80 != NULL)
+ if (m_dsbz80 != nullptr)
{
m_dsbz80->latch_w(space, 0, data&0xff);
}
// for Manx TT DX
- if (m_m1audio != NULL)
+ if (m_m1audio != nullptr)
{
if (!m_m1audio->ready_r(space, 0))
{
diff --git a/src/mame/drivers/model3.cpp b/src/mame/drivers/model3.cpp
index e793b648ab5..b039eed9dce 100644
--- a/src/mame/drivers/model3.cpp
+++ b/src/mame/drivers/model3.cpp
@@ -1632,7 +1632,7 @@ WRITE8_MEMBER(model3_state::model3_sound_w)
// clear the interrupt
set_irq_line(0x40, CLEAR_LINE);
- if (m_dsbz80 != NULL)
+ if (m_dsbz80 != nullptr)
{
m_dsbz80->latch_w(space, 0, data&0xff);
}
@@ -2102,16 +2102,16 @@ ROM_START( lemans24 ) /* step 1.5, Sega game ID# is 833-13159, ROM board ID# 8
ROM_LOAD( "mpr-19870.24", 0x400000, 0x400000, CRC(49c70296) SHA1(9bf88a63c38d318006a9c6c6b7b4452439df876c) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( scud ) /* step 1.5, Sega game ID# is 833-13041, ROM board ID# 834-13072 SPG COMM AUS */
@@ -2181,10 +2181,10 @@ ROM_START( scud ) /* step 1.5, Sega game ID# is 833-13041, ROM board ID# 834-1
ROM_LOAD( "mpr-19606.60", 0x600000, 0x200000, CRC(adad46b2) SHA1(360b23870f1d15ab527fae1bb731da6e7a8b19c1) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
ROM_LOAD( "epr-19338a.bin", 0x000000, 0x010000, CRC(c9fac464) SHA1(47b9ab7921a685c01629afb592d597faa11d2bd6) )
@@ -2256,10 +2256,10 @@ ROM_START( scudj ) /* step 1.5, Sega game ID# is 833-13041, ROM board ID# 12934
ROM_LOAD( "mpr-19606.60", 0x600000, 0x200000, CRC(adad46b2) SHA1(360b23870f1d15ab527fae1bb731da6e7a8b19c1) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
ROM_LOAD( "epr-19338a.bin", 0x000000, 0x010000, CRC(c9fac464) SHA1(47b9ab7921a685c01629afb592d597faa11d2bd6) )
@@ -2331,10 +2331,10 @@ ROM_START( scuda ) /* step 1.5, Sega game ID# is 833-13041, ROM board ID# 834-1
ROM_LOAD( "mpr-19606.60", 0x600000, 0x200000, CRC(adad46b2) SHA1(360b23870f1d15ab527fae1bb731da6e7a8b19c1) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
ROM_LOAD( "epr-19338a.bin", 0x000000, 0x010000, CRC(c9fac464) SHA1(47b9ab7921a685c01629afb592d597faa11d2bd6) )
@@ -2412,10 +2412,10 @@ ROM_START( scudplus ) /* step 1.5, Sega game ID# is 833-13260 SCUD PLUS, ROM b
ROM_LOAD( "mpr-19606.60", 0x600000, 0x200000, CRC(adad46b2) SHA1(360b23870f1d15ab527fae1bb731da6e7a8b19c1) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
ROM_LOAD( "epr-19338.bin", 0x000000, 0x010000, CRC(dbf88de6) SHA1(8f5c83e82c26a37a1ed0476d7dfeb698b8417899) )
@@ -2493,10 +2493,10 @@ ROM_START( scudplusa ) /* step 1.5, Sega game ID# is 833-13260 SCUD PLUS, ROM b
ROM_LOAD( "mpr-19606.60", 0x600000, 0x200000, CRC(adad46b2) SHA1(360b23870f1d15ab527fae1bb731da6e7a8b19c1) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
ROM_LOAD( "epr-19338.bin", 0x000000, 0x010000, CRC(dbf88de6) SHA1(8f5c83e82c26a37a1ed0476d7dfeb698b8417899) )
@@ -2565,16 +2565,16 @@ ROM_START( vf3 ) /* step 1.0, Sega game ID# is 833-12712, ROM board ID# 834-1
ROM_LOAD( "mpr-19210.24", 0x400000, 0x400000, CRC(c03d6502) SHA1(4ca49fe5dd5105ca5f78f4740477beb64137d4be) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( vf3a ) /* step 1.0, Sega game ID# is 833-12712, ROM board ID# 834-12821 */
@@ -2640,16 +2640,16 @@ ROM_START( vf3a ) /* step 1.0, Sega game ID# is 833-12712, ROM board ID# 834-1
ROM_LOAD( "mpr-19210.24", 0x400000, 0x400000, CRC(c03d6502) SHA1(4ca49fe5dd5105ca5f78f4740477beb64137d4be) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( vf3tb ) /* step 1.0? */
@@ -2715,16 +2715,16 @@ ROM_START( vf3tb ) /* step 1.0? */
ROM_LOAD( "mpr-19210.24", 0x400000, 0x400000, CRC(c03d6502) SHA1(4ca49fe5dd5105ca5f78f4740477beb64137d4be) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( bass ) /* step 1.0, Sega game ID# is 833-13317, ROM board ID# 834-13318 BSS */
@@ -2784,16 +2784,16 @@ ROM_START( bass ) /* step 1.0, Sega game ID# is 833-13317, ROM board ID# 834-1
ROM_LOAD( "mpr-20269.24", 0x400000, 0x400000, CRC(105a3181) SHA1(022cbce1d01366461a584ff6225ded40bcb9000b) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( bassdx ) /* step 1.0, Sega game ID# is 833-13476 BSS DX JPN, ROM board ID# 834-13477 BSS DX JPN */
@@ -2853,16 +2853,16 @@ ROM_START( bassdx ) /* step 1.0, Sega game ID# is 833-13476 BSS DX JPN, ROM boar
ROM_LOAD( "mpr-20269.24", 0x400000, 0x400000, CRC(105a3181) SHA1(022cbce1d01366461a584ff6225ded40bcb9000b) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
/*
@@ -2947,16 +2947,16 @@ ROM_START( getbass ) /* step 1.0, Sega game ID# is 833-13416 GET BASS STD, RO
ROM_LOAD( "mpr-20269.24", 0x400000, 0x400000, CRC(105a3181) SHA1(022cbce1d01366461a584ff6225ded40bcb9000b) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "iocpu", 0 ) // kl5c80a16cf code
ROM_LOAD( "epr-20690.ic11", 0x00000, 0x10000, CRC(b7da201d) SHA1(7e58eb45ee6ec78250ece7b4fcc4e955b8b4f084) )
@@ -3025,16 +3025,16 @@ ROM_START( lostwsga ) /* Step 1.5, PCB cage labeled 834-13172 THE LOST WORLD U
ROM_LOAD( "mpr-19935.24", 0x400000, 0x400000, CRC(91c1b618) SHA1(36573304e9a7f19e17b31a69de9b25d9893bc2dc) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( vs2 ) /* Step 2.0 */
@@ -3100,16 +3100,16 @@ ROM_START( vs2 ) /* Step 2.0 */
ROM_LOAD( "mpr-19786.24", 0x400000, 0x400000, CRC(b08d889b) SHA1(790b5b2d62a28c39d43aeec9ffb365ccd9dc93af) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( vs215 ) /* Step 1.5 */
@@ -3175,16 +3175,16 @@ ROM_START( vs215 ) /* Step 1.5 */
ROM_LOAD( "mpr-19786.24", 0x400000, 0x400000, CRC(b08d889b) SHA1(790b5b2d62a28c39d43aeec9ffb365ccd9dc93af) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( vs215o ) /* Step 1.5, original release.. might even be for Step 1.0??? */
@@ -3250,16 +3250,16 @@ ROM_START( vs215o ) /* Step 1.5, original release.. might even be for Step 1.0??
ROM_LOAD( "mpr-19786.24", 0x400000, 0x400000, CRC(b08d889b) SHA1(790b5b2d62a28c39d43aeec9ffb365ccd9dc93af) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( vs298 ) /* Step 2.0, Sega ID# 833-13346, ROM board ID# 834-13347 */
@@ -3325,16 +3325,16 @@ ROM_START( vs298 ) /* Step 2.0, Sega ID# 833-13346, ROM board ID# 834-13347 */
ROM_LOAD( "mpr-20904.24", 0x400000, 0x400000, CRC(21a91b84) SHA1(cd2d7231b8652ff38376b672c47127ce054d1f32) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0237-COM Model 3
ROM_PARAMETER( ":315_5881:key", "29234e96" )
@@ -3403,16 +3403,16 @@ ROM_START( vs29815 ) /* Step 1.5, ROM board ID# 834-13495 VS2 VER98 STEP 1.5
ROM_LOAD( "mpr-20904.24", 0x400000, 0x400000, CRC(21a91b84) SHA1(cd2d7231b8652ff38376b672c47127ce054d1f32) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( vs2v991 ) /* Step 2.0 */
@@ -3478,16 +3478,16 @@ ROM_START( vs2v991 ) /* Step 2.0 */
ROM_LOAD( "mpr-21514.24", 0x400000, 0x400000, CRC(6cedd292) SHA1(c1f44715697a8bac9d39926bcd6558ec9a9b2319) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0245-COM Model 3
ROM_PARAMETER( ":315_5881:key", "29222ac8" )
@@ -3556,16 +3556,16 @@ ROM_START( vs299b ) /* Step 2.0 */
ROM_LOAD( "mpr-21514.24", 0x400000, 0x400000, CRC(6cedd292) SHA1(c1f44715697a8bac9d39926bcd6558ec9a9b2319) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0245-COM Model 3
ROM_PARAMETER( ":315_5881:key", "29222ac8" )
@@ -3634,16 +3634,16 @@ ROM_START( vs299a ) /* Step 2.0 */
ROM_LOAD( "mpr-21514.24", 0x400000, 0x400000, CRC(6cedd292) SHA1(c1f44715697a8bac9d39926bcd6558ec9a9b2319) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0245-COM Model 3
ROM_PARAMETER( ":315_5881:key", "09222ac8" )
@@ -3712,16 +3712,16 @@ ROM_START( vs299 ) /* Step 2.0 */
ROM_LOAD( "mpr-21514.24", 0x400000, 0x400000, CRC(6cedd292) SHA1(c1f44715697a8bac9d39926bcd6558ec9a9b2319) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0245-COM Model 3
ROM_PARAMETER( ":315_5881:key", "29222ac8" )
@@ -3791,16 +3791,16 @@ ROM_START( von2 ) /* Step 2.0 */
ROM_LOAD( "mpr-20666.25", 0xc00000, 0x400000, CRC(3ecb2606) SHA1(a38d1f61933c8873deaff0a913c657b768f9783d) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0234-COM Model 3
ROM_PARAMETER( ":315_5881:key", "292a0e97" )
@@ -3870,16 +3870,16 @@ ROM_START( von254g ) /* Step 2.0, Sega game ID# is 833-13789 */
ROM_LOAD( "mpr-20666.25", 0xc00000, 0x400000, CRC(3ecb2606) SHA1(a38d1f61933c8873deaff0a913c657b768f9783d) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0234-COM Model 3
ROM_PARAMETER( ":315_5881:key", "292a0e97" )
@@ -3945,16 +3945,16 @@ ROM_START( skichamp ) /* Step 2.0 */
ROM_LOAD( "mpr-20335.24", 0x400000, 0x400000, CRC(7300d0a2) SHA1(50aac607e4570883cfc7bd0e1765fd8dfa1f9966) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( swtrilgy ) /* Step 2.1, Sega game ID# is 833-13586, ROM board ID# 834-13587 STAR WARS TRILOGY, Security board ID# 837-13588-COM */
@@ -4020,10 +4020,10 @@ ROM_START( swtrilgy ) /* Step 2.1, Sega game ID# is 833-13586, ROM board ID# 8
ROM_LOAD( "mpr-21378.24", 0xc00000, 0x400000, CRC(1fcf715e) SHA1(9706f36e7a61d885d34a6974311a2410fe3d6760) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "ffcpu", 0 ) /* force feedback controller prg */
ROM_LOAD( "epr-21119.ic8", 0x00000, 0x10000, CRC(65082b14) SHA1(6c3c192dd6ef3780c6202dd63fc6086328928818) )
@@ -4095,10 +4095,10 @@ ROM_START( swtrilgya ) /* Step 2.1, Sega game ID# is 833-13586, ROM board ID# 8
ROM_LOAD( "mpr-21378.24", 0xc00000, 0x400000, CRC(1fcf715e) SHA1(9706f36e7a61d885d34a6974311a2410fe3d6760) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0241-COM Model 3
ROM_PARAMETER( ":315_5881:key", "31272a01" )
@@ -4153,16 +4153,16 @@ ROM_START( dirtdvls ) /* Step 2.1 - Export version, Sega game ID# is 833-13427
ROM_LOAD( "mpr-21032.23", 0x800000, 0x400000, CRC(3d3ff407) SHA1(5e298e24cb3050f8683658cef41ce59948e79166) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0238-COM Model 3
ROM_PARAMETER( ":315_5881:key", "29290f17" )
@@ -4217,16 +4217,16 @@ ROM_START( dirtdvlsa ) /* Step 2.1 - Australia version */
ROM_LOAD( "mpr-21032.23", 0x800000, 0x400000, CRC(3d3ff407) SHA1(5e298e24cb3050f8683658cef41ce59948e79166) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x800000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x800000, 0 )
+ ROM_FILL( 0x000000, 0x800000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0238-COM Model 3
ROM_PARAMETER( ":315_5881:key", "29290f17" )
@@ -4303,10 +4303,10 @@ ROM_START( daytona2 ) /* Step 2.1, ROM board ID# 834-13428 DAYTONA USA2, Secur
ROM_LOAD( "mpr-20890.ic24", 0xc00000, 0x400000, CRC(aac96fa2) SHA1(bc68cd48eae50d3558d3c5a0302a3930639e3019) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
ROM_LOAD( "epr-20985.bin", 0x000000, 0x010000, CRC(b139481d) SHA1(05fca7db7c8b084c53bd157ba3e8296f1a961a99) )
@@ -4386,10 +4386,10 @@ ROM_START( dayto2pe ) /* Step 2.1, Sega game ID# is 833-13610 DAYTONA USA2 SP,
ROM_LOAD( "mpr-20890.ic24", 0xc00000, 0x400000, CRC(aac96fa2) SHA1(bc68cd48eae50d3558d3c5a0302a3930639e3019) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
ROM_LOAD( "epr-20985.bin", 0x000000, 0x010000, CRC(b139481d) SHA1(05fca7db7c8b084c53bd157ba3e8296f1a961a99) )
@@ -4461,10 +4461,10 @@ ROM_START( srally2 ) /* Step 2.0, Sega game ID# is 833-13373, ROM board ID# 8
ROM_LOAD( "mpr-20640.60", 0xc00000, 0x400000, CRC(9eea07b7) SHA1(bdcf136f29e1435c9d82718730ef209d8cfe74d8) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
ROM_LOAD( "epr-20512.bin", 0x000000, 0x010000, CRC(cf64350d) SHA1(f30c8c7b65fb38f7dd63845f12b81388ff3b946d) )
@@ -4524,16 +4524,16 @@ ROM_START( srally2x ) /* Step 2.0 */
ROM_LOAD( "mpr-20485.24", 0x400000, 0x400000, CRC(cfd8c19b) SHA1(3b8cc045cb02b93f9d35b81a48085d4d480d6bff) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x10000, "drivebd", 0 ) /* drive board ROM */
ROM_LOAD( "epr-20512.bin", 0x000000, 0x010000, CRC(cf64350d) SHA1(f30c8c7b65fb38f7dd63845f12b81388ff3b946d) )
@@ -4595,16 +4595,16 @@ ROM_START( harley ) /* Step 2.0, Sega game ID# is 833-13325, ROM board ID# 834-1
ROM_LOAD( "mpr-20376.25", 0xc00000, 0x400000, CRC(deeed366) SHA1(6d4809960c34865374d146605bb3e009394f7a8c) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( harleya ) /* Step 2.0, Sega game ID# is 833-13325, ROM board ID# 834-13326 HARLEY DAVIDSON */
@@ -4663,16 +4663,16 @@ ROM_START( harleya ) /* Step 2.0, Sega game ID# is 833-13325, ROM board ID# 8
ROM_LOAD( "mpr-20376.25", 0xc00000, 0x400000, CRC(deeed366) SHA1(6d4809960c34865374d146605bb3e009394f7a8c) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_END
ROM_START( fvipers2 ) /* Step 2.0 - Japan version */
@@ -4738,16 +4738,16 @@ ROM_START( fvipers2 ) /* Step 2.0 - Japan version */
ROM_LOAD( "mpr-20579", 0xc00000, 0x400000, CRC(08788436) SHA1(6c9af2cf65e803882d6f4c0d57eb9e95cdeb5818) ) /* IC25 ?? */
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0235-COM Model 3
ROM_PARAMETER( ":315_5881:key", "29260e96" )
@@ -4824,10 +4824,10 @@ ROM_START( spikeout ) /* Step 2.1 */
ROM_LOAD( "mpr-21173.ic24", 0xc00000, 0x400000, CRC(ca7226d6) SHA1(e15c6fb9dee91a42889cef350479b1964bf1e5df) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0240-COM Model 3
ROM_PARAMETER( ":315_5881:key", "292f2b04" )
@@ -4904,10 +4904,10 @@ ROM_START( spikeofe ) /* Step 2.1, Sega game ID# is 833-13746, ROM board ID# 8
ROM_LOAD( "mpr-21652.ic24", 0xc00000, 0x400000, CRC(e7c8c9bf) SHA1(76d8fa89aed86fff4d1ba704aeef96fd2c326bc9) )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0247-COM Model 3
ROM_PARAMETER( ":315_5881:key", "29236fc8" )
@@ -4969,16 +4969,16 @@ ROM_START( eca ) /* Step 2.1 Export version */
ROM_LOAD( "mpr-22890.25", 0xc00000, 0x400000, CRC(b638bd7c) SHA1(ed9c69175fd0ca4c6f22e542b4e68398a6e4ad07) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0265-COM Model 3
ROM_PARAMETER( ":315_5881:key", "2923aa91" )
@@ -5040,16 +5040,16 @@ ROM_START( ecau ) /* Step 2.1, ROM board ID# 834-13946-01 ECA */
ROM_LOAD( "mpr-22890.25", 0xc00000, 0x400000, CRC(b638bd7c) SHA1(ed9c69175fd0ca4c6f22e542b4e68398a6e4ad07) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0265-COM Model 3
ROM_PARAMETER( ":315_5881:key", "2923aa91" )
@@ -5114,16 +5114,16 @@ ROM_START( ecap ) /* Step 2.1 - Proto or Location test - No security dongle */
ROM_LOAD( "mpr-22890.25", 0xc00000, 0x400000, CRC(b638bd7c) SHA1(ed9c69175fd0ca4c6f22e542b4e68398a6e4ad07) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0265-COM Model 3
ROM_PARAMETER( ":315_5881:key", "2923aa91" )
@@ -5173,16 +5173,16 @@ ROM_START( magtruck ) /* Step 2.1, Sega game ID# is 833-13601-01 (Export), ROM
ROM_LOAD( "mpr-21432.25", 0xc00000, 0x400000, CRC(59c0f6df) SHA1(ab1c6fbcb1244c2b56b6967018fceb82d8c5414c) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0243-COM Model 3
ROM_PARAMETER( ":315_5881:key", "29266e45" )
@@ -5244,16 +5244,16 @@ ROM_START( oceanhun ) /* Step 2.0, Sega game ID# is 833-13571, ROM board ID# 8
ROM_LOAD( "mpr-21097.25", 0xc00000, 0x400000, CRC(0d8033fc) SHA1(d849a99d5f906d3a8f07b8f14183af14fd0d96e9) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0242-COM Model 3
ROM_PARAMETER( ":315_5881:key", "292b6a01" )
@@ -5316,16 +5316,16 @@ ROM_START( lamachin ) /* Step 2.0, Sega game ID# is 833-13664, ROM board ID# 8
ROM_LOAD( "mpr-21466.25", 0xc00000, 0x400000, CRC(ca20359e) SHA1(1948f71f7eea27f757f0d508ee1390aeb576a8fa) )
ROM_REGION( 0x20000, "cpu2", 0 ) /* Z80 code */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x1000000, "dsb", 0 ) /* DSB samples */
- ROM_FILL( 0x000000, 0x1000000, 0 )
+ ROM_FILL( 0x000000, 0x1000000, nullptr )
ROM_REGION( 0x80000, "scsp1", 0 ) /* first SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x80000, "scsp2", 0 ) /* second SCSP's RAM */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
// ???? 317-0244-COM Model 3
ROM_PARAMETER( ":315_5881:key", "292a2bc5" )
diff --git a/src/mame/drivers/mogura.cpp b/src/mame/drivers/mogura.cpp
index b4588d14e46..875c0391b72 100644
--- a/src/mame/drivers/mogura.cpp
+++ b/src/mame/drivers/mogura.cpp
@@ -190,7 +190,7 @@ static const gfx_layout tiles8x8_layout =
};
static GFXDECODE_START( mogura )
- GFXDECODE_ENTRY( NULL, 0, tiles8x8_layout, 0, 8 )
+ GFXDECODE_ENTRY( nullptr, 0, tiles8x8_layout, 0, 8 )
GFXDECODE_END
void mogura_state::machine_start()
diff --git a/src/mame/drivers/monty.cpp b/src/mame/drivers/monty.cpp
index 3ac595f9691..0167938503b 100644
--- a/src/mame/drivers/monty.cpp
+++ b/src/mame/drivers/monty.cpp
@@ -44,8 +44,8 @@ public:
, m_sed0(*this, "sed1520_0")
, m_writeUpper(false)
{
- for (int i = 0; i < 42*32; i++)
- m_pixels[i] = 0xff000000;
+ for (auto & elem : m_pixels)
+ elem = 0xff000000;
}
DECLARE_WRITE8_MEMBER(sound_w);
@@ -270,7 +270,7 @@ ROM_START( monty )
ROM_LOAD( "monty_main.bin", 0x0000, 0x4000, CRC(720b4f55) SHA1(0106eb88d3fbbf25a745b9b6ee785ba13689d095) ) // 27128
ROM_LOAD( "monty_module1.bin", 0x4000, 0x4000, CRC(2725d8c3) SHA1(8273b9779c0915f9c7c43ea4fb460f43ce036358) ) // 27128
ROM_LOAD( "monty_module2.bin", 0x8000, 0x4000, CRC(db672e47) SHA1(bb14fe86df06cfa4b19625ba417d1a5bc8eae155) ) // 27128
- ROM_FILL(0x1193,1,0) // patch out HALT so we can type in our names
+ ROM_FILL(0x1193,1,nullptr) // patch out HALT so we can type in our names
ROM_END
ROM_START( mmonty )
@@ -278,7 +278,7 @@ ROM_START( mmonty )
ROM_LOAD( "master_monty_main.bin", 0x0000, 0x8000, CRC(bb5ef4d4) SHA1(ba2c759e429f8740df419f9abb60832eddfba8ab) ) // 27C256
ROM_LOAD( "monty_module1.bin", 0x8000, 0x4000, CRC(2725d8c3) SHA1(8273b9779c0915f9c7c43ea4fb460f43ce036358) ) // 27128
ROM_LOAD( "monty_module2.bin", 0xc000, 0x4000, CRC(db672e47) SHA1(bb14fe86df06cfa4b19625ba417d1a5bc8eae155) ) // 27128
- ROM_FILL(0x1487,1,0) // patch out HALT so we can type in our names
+ ROM_FILL(0x1487,1,nullptr) // patch out HALT so we can type in our names
ROM_END
diff --git a/src/mame/drivers/mpf1.cpp b/src/mame/drivers/mpf1.cpp
index b8ed818e0e8..4366184a820 100644
--- a/src/mame/drivers/mpf1.cpp
+++ b/src/mame/drivers/mpf1.cpp
@@ -302,7 +302,7 @@ static const z80_daisy_config mpf1_daisy_chain[] =
{
{ Z80CTC_TAG },
{ Z80PIO_TAG },
- { NULL }
+ { nullptr }
};
/* Machine Initialization */
diff --git a/src/mame/drivers/mpu3.cpp b/src/mame/drivers/mpu3.cpp
index 106db35cbae..d45ecc0de30 100644
--- a/src/mame/drivers/mpu3.cpp
+++ b/src/mame/drivers/mpu3.cpp
@@ -890,7 +890,7 @@ DRIVER_INIT_MEMBER(mpu3_state,m3hprvpr)
ROM_START( m3tst )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "ut5.bin", 0x7800, 0x0800, CRC(89994adb) SHA1(03e38a860b6ba9d7ae2dbfa7845e85bcf67a6f4d))
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -903,7 +903,7 @@ ROM_START( m3acech )
ROM_LOAD( "ac10p.p1", 0x6000, 0x2000, CRC(bf72f9cd) SHA1(78885c39d08949cfac662c37564e71b01129b9bb) )
ROM_LOAD( "ac10p.p2", 0x4000, 0x2000, CRC(2c4fb553) SHA1(65f7d9f07a86a447d77b57d889fd33658531b16d) )
ROM_LOAD( "ac10p.p3", 0x2000, 0x2000, CRC(63955392) SHA1(ee52f42928f5040260e2ad021cf6a668aa02b0f8) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -914,7 +914,7 @@ ROM_START( m3autort )
ROM_LOAD( "ar1.bin", 0x6000, 0x2000, CRC(00ff29b7) SHA1(62c73f313ed8b862fd1e8f261bceafdcb4dd9cdb) )
ROM_LOAD( "ar2.bin", 0x4000, 0x2000, CRC(ca084dbf) SHA1(86eb343e6b252cfd6efcfa4f6166f53fd6627c01) )
ROM_LOAD( "ar3.bin", 0x2000, 0x2000, CRC(6fbe9fa8) SHA1(0b66cb6274c5ffdfff9caf1171a13b3a719ae537) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -922,7 +922,7 @@ ROM_START( m3bankr )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "bankerp1.bin", 0x6000, 0x2000, CRC(912e7c86) SHA1(67de6af2620a5caae34f76266529bd2e0b2dd6de) )
ROM_LOAD( "bankerp2.bin", 0x5000, 0x1000, CRC(7fa01e70) SHA1(82b7a07548cab8d7828409f6b9a0676db0664be2) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -930,7 +930,7 @@ ROM_START( m3big20j )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "b20j11.p1", 0x6000, 0x2000, CRC(ce524bb5) SHA1(f7f21982376a8e5cd6f3f8b6d966a17044e6c1a8) )
ROM_LOAD( "b20j11.p2", 0x5000, 0x1000, CRC(8ce0fffb) SHA1(eda619a1d21cd45eae0c9962dab6559d4b72fc7b) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3biggam )
@@ -938,7 +938,7 @@ ROM_START( m3biggam )
ROM_LOAD( "b2g2-4.p1", 0x6000, 0x002000, CRC(2bd82bcb) SHA1(58140b0ac6035652110dc0a2b2bd39980d5c518b) )
ROM_LOAD( "b2g2-4.p2", 0x4000, 0x002000, CRC(4cbe3dd2) SHA1(3a5d2e693dfb615365eb83c1c3d7ce1144c94b4c) )
ROM_LOAD( "b2g2-4.p3", 0x2000, 0x002000, CRC(2287a208) SHA1(21566c2b713e2e41fe400632510255455cd8ce45) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3bigsht )
@@ -946,7 +946,7 @@ ROM_START( m3bigsht )
ROM_LOAD( "bs.p1", 0x6000, 0x2000, CRC(9a8cf66e) SHA1(de7c916722e20463c1838ad0848826b4a879e9ae) )
ROM_LOAD( "bs.p2", 0x4000, 0x2000, CRC(113927b3) SHA1(c1dee8f967b1678b37fe4109e1ea5d4782882e2b) )
ROM_LOAD( "bs.p3", 0x2000, 0x2000, CRC(ebe9fd8b) SHA1(d1d4184007f998f68db10dbc0f534fc52cc4f6ee) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -955,7 +955,7 @@ ROM_START( m3blkhle )
ROM_LOAD( "p1-4460.bin", 0x7000, 0x1000, CRC(b3f82e48) SHA1(e3968c0e41c3b30fea6e8270aa67e078495fbc4c) )
ROM_LOAD( "p2-4460.bin", 0x6000, 0x1000, CRC(d7dac5a8) SHA1(1e1f8e472e23b617854aab13b4cb6ba5ee21a691) )
ROM_LOAD( "p3-4460.bin", 0x5000, 0x1000, CRC(4ba3ce96) SHA1(599b77026a6351bf1cad0598fd4578c3f65026e9) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_REGION( 0x10000, "altrevs", ROMREGION_ERASE00 )
// missing rom 1, or is it the same?
@@ -969,7 +969,7 @@ ROM_START( m3cabret )
ROM_LOAD( "cab50.p1", 0x7000, 0x1000, CRC(7c651961) SHA1(fdca9e7513d5ae0696c4011eedc05e3abdde074d) )
ROM_LOAD( "cab50.p2", 0x6000, 0x1000, CRC(f187d599) SHA1(7c6482aa4cd426e8046ceb50a18b1a2794f514f6) )
ROM_LOAD( "cab50.p3", 0x5000, 0x1000, CRC(95745414) SHA1(17da3491a77ae7c3320b9d8869f5f01d4a64ea8e) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3cabreta )
@@ -977,7 +977,7 @@ ROM_START( m3cabreta )
ROM_LOAD( "cch12-0.p1", 0x7000, 0x1000, CRC(49376c4b) SHA1(fb8070d43ca103acdc3f120c5bc2b84603998404) )
ROM_LOAD( "cch12-0.p2", 0x6000, 0x1000, CRC(e1d7d4d8) SHA1(107d8ebce24e946119bc7ae54085e847c1bef9b9) )
ROM_LOAD( "cch12-0.p3", 0x5000, 0x1000, CRC(dd3a4d5e) SHA1(d9fa506a8f1d68cc4b7d2d91a4e524f39e269860) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -986,7 +986,7 @@ ROM_END
ROM_START( m3cdash )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "cashdash.bin", 0x6000, 0x2000, CRC(1e8ff344) SHA1(021cca5079d0979767143babd23a6f5da93bc151) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -995,14 +995,14 @@ ROM_START( m3cunlim )
ROM_LOAD( "cu1_2.p1", 0x6000, 0x2000, CRC(bbfe4e36) SHA1(8e3d9809d882a7608b9c75f8950e2d7ad30b2584) )
ROM_LOAD( "cu1_2.p2", 0x4000, 0x2000, CRC(183a90a3) SHA1(faf00b248677538932da036135354ed38187cac3) )
ROM_LOAD( "cu1_2.p3", 0x2000, 0x2000, CRC(a83497d4) SHA1(5092e5c7501e7293e33e5a93177047e3836bcd01) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
//VFS conversion based around Chances and Options unlimited
ROM_START( m3mremon )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "mmchancs.bin", 0x6000, 0x2000, CRC(3eaede51) SHA1(6914fcaed6e51736c6dc725ba82b691803571222) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3chase )
@@ -1010,7 +1010,7 @@ ROM_START( m3chase )
ROM_LOAD( "chaseit1.bin", 0x6000, 0x2000, CRC(bc379354) SHA1(5375774ff7afa0f4623a174de69770630219b446) )
ROM_LOAD( "chaseit2.bin", 0x4000, 0x2000, CRC(2bcabf7b) SHA1(f4d3e9691ddb68e9b678199a2474db1d9383e73e) )
ROM_LOAD( "chaseit3.bin", 0x2000, 0x2000, CRC(6a761b8c) SHA1(3dfc30c13b423368b460b6225399508a00f14c24) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1019,7 +1019,7 @@ ROM_START( m3cskill )
ROM_LOAD( "cs_03_p1.bin", 0x6000, 0x2000, CRC(b230cc6c) SHA1(8cade054c6a3a57991db046baf250d6a5d47eedd) )
ROM_LOAD( "cs_03_p2.bin", 0x4000, 0x2000, CRC(c3acb5be) SHA1(856401da7a84c7495cae7bea5b64c909b1a5cfe9) )
ROM_LOAD( "cs_03_p3.bin", 0x2000, 0x2000, CRC(ad5de108) SHA1(92304e8da523623606c9ed23b82fcbd5711ec55f) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1028,7 +1028,7 @@ ROM_START( m3cjoker )
ROM_LOAD( "crjo54.p1", 0x6000, 0x2000, CRC(fee59a82) SHA1(816f68242a1382a26ff54a92e5d8df55ad6c8ece) )
ROM_LOAD( "crjo54.p2", 0x4000, 0x2000, CRC(b0722d30) SHA1(4ab9785fbb9a04a85015cf8818567f0ec1b41808) )
ROM_LOAD( "crjo54.p3", 0x2000, 0x2000, CRC(7af2985e) SHA1(b11fcfc83e93dc3737f9f71d3166c38a948a8aa4) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1037,7 +1037,7 @@ ROM_START( m3xchngg )
ROM_LOAD( "eg.p1", 0x7000, 0x1000, CRC(92edf95f) SHA1(473a8f1e845170953e55b55249a633bd9d9d03ad) )
ROM_LOAD( "eg.p2", 0x6000, 0x1000, CRC(ba05c6ee) SHA1(6d5f1769ca81fc29f2c1f7257286b8cb287bc01c) )
ROM_LOAD( "eg.p3", 0x5000, 0x1000, CRC(e28ca67d) SHA1(96a7c7dcf06bfad230b581d396c19419b98e2e03) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1046,13 +1046,13 @@ ROM_START( m3xchngu )
ROM_LOAD( "eu3.p1", 0x7000, 0x1000, CRC(db6d5c27) SHA1(c7c9b293bf7c37b499905f9cd00f2ba8d37e560e) )
ROM_LOAD( "eu3.p2", 0x6000, 0x1000, CRC(717277b4) SHA1(6be70f72d4d57d785a85d1b8c9585bf65cca3243) )
ROM_LOAD( "eu3.p3", 0x5000, 0x1000, CRC(0eafec89) SHA1(89b1766d35f69e28e662d87d3df1fee36956aa3b) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3xchngua ) // check if this actually differs
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "exchanges.hex", 0x5000, 0x3000, CRC(758323b9) SHA1(524fcb81148ec940ef98568d99fc7a0bda7d727a) ) // == m3sexcu
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1063,7 +1063,7 @@ ROM_START( m3fortun )
ROM_LOAD( "fn1-5.p1", 0x6000, 0x2000, CRC(110c8c2b) SHA1(daaa4a2c71459b277571d751d44961aed38f1c84) )
ROM_LOAD( "fn1-5.p2", 0x4000, 0x2000, CRC(2fb803de) SHA1(68f8dafc41931aa8882730acb95d0c95be7aa639) )
ROM_LOAD( "fn1-5.p3", 0x2000, 0x2000, CRC(6fbfcb75) SHA1(5c28b2d03b7644715feed9fc31f5de5ad434c824) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3fortuna )
@@ -1071,7 +1071,7 @@ ROM_START( m3fortuna )
ROM_LOAD( "fortune numbers v1-0 p1 (2764)", 0x6000, 0x2000, CRC(e864c266) SHA1(73c9ae327be0c8fd862a2533be1a60c6dd9d44f1) )
ROM_LOAD( "fortune numbers v1-0 p2 (2764)", 0x4000, 0x2000, CRC(34f5ea73) SHA1(2009e87ce80da637c83ed4ca66661e1b95e47b50) )
ROM_LOAD( "fortune numbers v1-0 p3 (2764)", 0x2000, 0x2000, CRC(4779cc92) SHA1(d191263fb11f2521cbbc0012f88294914ed9d17b) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3fortund )
@@ -1079,7 +1079,7 @@ ROM_START( m3fortund )
ROM_LOAD( "dfn-p1.bin", 0x6000, 0x2000, CRC(16ba6cca) SHA1(64ff2c8c60d3e44fa2692f63ec3593e7b1d4eae8) )
ROM_LOAD( "dfn-p2.bin", 0x4000, 0x2000, CRC(c67461b9) SHA1(a63554b7af1bb3748acf43608e8958757a42c7b1) )
ROM_LOAD( "dfn-p3.bin", 0x2000, 0x2000, CRC(f6e880c5) SHA1(13a3668335fb4a916b52fc132f91778edc4b9d01) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1088,7 +1088,7 @@ ROM_START( m3gmine )
ROM_LOAD( "gm1.bin", 0x6000, 0x2000, CRC(94a25adc) SHA1(6e4a3b50229202e1ab6142958d2e00784d6199a8) )
ROM_LOAD( "gm2.bin", 0x4000, 0x2000, CRC(a71c5eb7) SHA1(e08e696a3f2cb0435388848cb2efe608f9d8677a) )
ROM_LOAD( "gm3.bin", 0x2000, 0x2000, CRC(53b6a756) SHA1(e035142ebda9d32e1c430364e0ef7e6acabd6f3b) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1097,7 +1097,7 @@ ROM_START( m3gaward )
ROM_LOAD( "ga04_p1.bin", 0x6000, 0x2000, CRC(730779da) SHA1(a35f80a8b46551b5fd4de2a34fdea4134a989b5d) )
ROM_LOAD( "ga04_p2.bin", 0x4000, 0x2000, CRC(4503e0a7) SHA1(296a909ec5c86ee155b127b20ef9c13cb7824f83) )
ROM_LOAD( "ga04_p3.bin", 0x2000, 0x2000, CRC(d9419ee7) SHA1(cdab52cd1aaa5f2791827ac6ea218bdbeed2648a) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1105,7 +1105,7 @@ ROM_START( m3gcrown )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "crown.2l", 0x7000, 0x1000, CRC(184780c5) SHA1(e07f56e536823c28d524a687d607cb2877199210) ) // == m3nudge
ROM_LOAD( "crown.2l2", 0x6000, 0x1000, CRC(04fadad3) SHA1(d82536f18122b9fb33fae6a238f29e4c615b3681) ) // == m3nudge
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1114,7 +1114,7 @@ ROM_START( m3hprvpr )
ROM_LOAD( "hv.p1", 0x6000, 0x2000, CRC(05c0cf97) SHA1(085f432b608cec6054f1e03cf24ca80d3949a0de))
ROM_LOAD( "hv.p2", 0x4000, 0x2000, CRC(b3b6f19e) SHA1(b2251dbe632b04ea7b5952b8a6217605b0df904c))
ROM_LOAD( "hv.p3", 0x2000, 0x2000, CRC(63f8e04f) SHA1(9bfe06a6ea8c308e4a7035752722babbfd792160))
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3replay )
@@ -1122,14 +1122,14 @@ ROM_START( m3replay )
ROM_LOAD( "ir6sl.p1", 0x7000, 0x1000, CRC(b6346bce) SHA1(56ec83411a21d161f22111abf6977daafcd05e98) )
ROM_LOAD( "ir6sl.p2", 0x6000, 0x1000, CRC(16ce7113) SHA1(e919cfa46c1083fb6073cf34e8ba067035dc81a2) )
ROM_LOAD( "ir6sl.p3", 0x5000, 0x1000, CRC(43951960) SHA1(58560119722c3583bd4094a47137e4d1d41b6c95) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3lineup )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "lineup.hex", 0x4000, 0x4000, CRC(d0c043af) SHA1(39d0fee039c7bd4d257a5537a04f8b35d7ec94df) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1139,7 +1139,7 @@ ROM_START( m3loony )
ROM_LOAD( "loonybin.p1", 0x6000, 0x2000, CRC(33a2877e) SHA1(928ae3968e495b00b3384ba79f229aca25255996) )
ROM_LOAD( "loonybin.p2", 0x4000, 0x2000, CRC(d17dfcec) SHA1(9ffcf392fbf44d751b188d9cefcfd7e98985a4dc) )
ROM_LOAD( "loonybin.p3", 0x2000, 0x2000, CRC(0f3abac7) SHA1(1b6ae40a815ad8841f634816855ac2c0c45976f4) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1148,7 +1148,7 @@ ROM_START( m3llotto )
ROM_LOAD( "llp1.bin", 0x6000, 0x2000, CRC(3ab4045d) SHA1(4df1040c5699716ce3e1b9b3850451da8272d9ba) )
ROM_LOAD( "llp2.bin", 0x4000, 0x2000, CRC(3aa789df) SHA1(a2a95339ae0a670e36eee356282adddb26e9a3e7) )
ROM_LOAD( "llp3.bin", 0x2000, 0x2000, CRC(0c146c03) SHA1(a5e0c3a5b1d324ef702d5cdd583416dda5ea55eb) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1157,7 +1157,7 @@ ROM_START( m3lstrik )
ROM_LOAD( "lucky1.bin", 0x6000, 0x2000, CRC(d543f94c) SHA1(9186914cb3a014c573da1a08985ef4069f6550e4) )
ROM_LOAD( "lucky2.bin", 0x4000, 0x2000, CRC(5708c22b) SHA1(721491de86517ab13eebd77fa0f3cf25410a244a) )
ROM_LOAD( "lucky3.bin", 0x2000, 0x2000, CRC(d3b139ff) SHA1(119001d53f40650c090ebcad0d7263745e33f2ce) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3lstrika )
@@ -1165,7 +1165,7 @@ ROM_START( m3lstrika )
ROM_LOAD( "ls1_3_0.p1", 0x6000, 0x2000, CRC(3369ac39) SHA1(f02a7b14c9e2145813036c7cc2303ae003b618db) )
ROM_LOAD( "lucky2.bin", 0x4000, 0x2000, CRC(5708c22b) SHA1(721491de86517ab13eebd77fa0f3cf25410a244a) )
ROM_LOAD( "lucky3.bin", 0x2000, 0x2000, CRC(d3b139ff) SHA1(119001d53f40650c090ebcad0d7263745e33f2ce) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1173,7 +1173,7 @@ ROM_START( m3magrp )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "mr1.bin", 0x6000, 0x2000, CRC(b6109d11) SHA1(de11cfa34fc3ece4e9de03c1c81e9d082abd2a8c) )
ROM_LOAD( "mr2.bin", 0x4000, 0x2000, CRC(6beedb00) SHA1(37e3addd20068778da8db9aa1c9723b519bfe89e) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1181,7 +1181,7 @@ ROM_START( m3minmax )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "minimax.p1", 0x7000, 0x1000, CRC(941ab5a7) SHA1(c3031e3bd3a71b3a0cabf04059f1c540a8fa745f) )
ROM_LOAD( "minimax.p2", 0x6000, 0x1000, CRC(140a4841) SHA1(822a54a6764226ec81f0c4625af0b2a4a3384db4) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1190,7 +1190,7 @@ ROM_START( m3nnice )
ROM_LOAD( "nn2-1.p1", 0x6000, 0x2000, CRC(584a2420) SHA1(3a2a759d1ab3ce216cde440a81571edf24b95822) )
ROM_LOAD( "nn2-1.p2", 0x4000, 0x2000, CRC(78163deb) SHA1(72779113462a75ca3dacfe2a629f54a5eb5e6cc0) )
ROM_LOAD( "nn2-1.p3", 0x2000, 0x2000, CRC(bed829ee) SHA1(d46ab52f4f250f4ec54bb5bf55dca6e275a20e13) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1198,7 +1198,7 @@ ROM_START( m3oxo )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "oxo1.bin", 0x7000, 0x1000, CRC(ec0c0145) SHA1(817917897360036d26b52d68b9e5594f09b34747) )
ROM_LOAD( "oxo2.bin", 0x6000, 0x1000, CRC(0007923a) SHA1(08207fff9e245033aacceb4f03da866d1703fa80) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1206,7 +1206,7 @@ ROM_START( m3nudge )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "nu1.2l", 0x7000, 0x1000, CRC(184780c5) SHA1(e07f56e536823c28d524a687d607cb2877199210) ) // == m3gcrown
ROM_LOAD( "nu1.2l2", 0x6000, 0x1000, CRC(04fadad3) SHA1(d82536f18122b9fb33fae6a238f29e4c615b3681) ) // == m3gcrown
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1215,14 +1215,14 @@ ROM_START( m3oddson )
ROM_LOAD( "oo3.1x.p1", 0x6000, 0x2000, CRC(bc5f4d43) SHA1(cacdc2d75f908fd85200b6cee014291e8417ce5c) )
ROM_LOAD( "oo3.1x.p2", 0x4000, 0x2000, CRC(87835dc2) SHA1(b9a91a27f930eb3a14e63d566ebae0c5723a150a) )
ROM_LOAD( "oo3.1x.p3", 0x2000, 0x2000, CRC(f621f387) SHA1(5261d501fd51addb510cf1beec2032def08f5873) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3online )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "online2p.bin", 0x6000, 0x2000, CRC(9d5dc1e3) SHA1(74b7af2c25a1a0eb4829328508a4a5d3599ed25f) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1232,7 +1232,7 @@ ROM_START( m3optunl )
ROM_LOAD( "ou6l.p1", 0x6000, 0x2000, CRC(5f65f88f) SHA1(e6353707cf936a80a191d8d068dae9117f2aae45) )
ROM_LOAD( "ou6l.p2", 0x4000, 0x2000, CRC(d8cb1627) SHA1(3c533ee626108c9e962d77ab9b6d651a9a24bdc7) )
ROM_LOAD( "ou6l.p3", 0x2000, 0x2000, CRC(9f097213) SHA1(a95763e35590e51d8e07f55aaab6a6f4afa30f9a) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3ratrce )
@@ -1240,7 +1240,7 @@ ROM_START( m3ratrce )
ROM_LOAD( "rr1", 0x6000, 0x2000, CRC(015263ce) SHA1(5a2253e245acf81b2a6cd288b226e359d77586f1) )
ROM_LOAD( "rr2", 0x4000, 0x2000, CRC(04e69380) SHA1(44561be88548dd46fa3117ca3ab9a1348745b534) )
ROM_LOAD( "rr3", 0x2000, 0x2000, CRC(6f3210c8) SHA1(eb522bf06ac46181e23580bcbfeae5d42ff027ad) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1252,7 +1252,7 @@ ROM_START( m3razdaz )
ROM_LOAD( "rd0-3x.p1", 0x6000, 0x2000, CRC(921a43a9) SHA1(b73446aa28842cc72d30664457743181e0e8a585) )
ROM_LOAD( "rd0-3x.p2", 0x4000, 0x2000, CRC(adf4c26c) SHA1(a1204c2a960691f00dd10cb0073948453b230feb) )
ROM_LOAD( "rd0-3x.p3", 0x2000, 0x2000, CRC(7442e22d) SHA1(b94ced271be0107c56a904e2beedb73af8f4b696) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3razdaza )
@@ -1260,7 +1260,7 @@ ROM_START( m3razdaza )
ROM_LOAD( "rd07x1.bin", 0x6000, 0x2000, CRC(acdd1fc0) SHA1(0011c8af8e8ff5603f41879d897f6ac5fa533e8f) )
ROM_LOAD( "rd07x2.bin", 0x4000, 0x2000, CRC(e7c1be48) SHA1(400f22515a25d208c9345570017cfbf557961def) )
ROM_LOAD( "rd07x3.bin", 0x2000, 0x2000, CRC(f2ffe770) SHA1(ae6a4ce8e2fb1492cdd51d324cd697ed50e22947) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3razdazd )
@@ -1268,7 +1268,7 @@ ROM_START( m3razdazd )
ROM_LOAD( "razzle-p1.bin", 0x6000, 0x2000, CRC(4f1aa030) SHA1(3a09af6a3525300df3ee55d0e129ebd42dfd17c0) )
ROM_LOAD( "razzle-p2.bin", 0x4000, 0x2000, CRC(c1d3ac78) SHA1(dcac9db7be72f0fefd11105c645f2c7a122afe7b) )
ROM_LOAD( "razzle-p3.bin", 0x2000, 0x2000, CRC(98867482) SHA1(8f4a2387ad06fb1e659f8b6a20cb8a1928a28c42) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1276,7 +1276,7 @@ ROM_START( m3rockpl )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "rpl.p1", 0x6000, 0x2000, CRC(8507e316) SHA1(3d7aae76c0ab4d09c286ce0474ad8ae51c204e0b) )
ROM_LOAD( "rpl.p2", 0x4000, 0x2000, CRC(c11a123b) SHA1(52ffa34cd3d196cc7a13fc7d15f144aa198dc1cd) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1284,7 +1284,7 @@ ROM_START( m3rollem )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "roll-em.p1", 0x6000, 0x2000, CRC(2ec2cfa9) SHA1(461240315725f29f53fdcf89e767d17a4d2301eb) )
ROM_LOAD( "roll-em.p2", 0x4000, 0x2000, CRC(fff42143) SHA1(ca0efe2ad5e8d353c6352a4f8fbabe4d2d375fc0) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1293,21 +1293,21 @@ ROM_START( m3rxchng )
ROM_LOAD( "re41tp1.bin", 0x6000, 0x2000, CRC(ba6e84f8) SHA1(fcf6310c5ce285104a0fde00656e3ab1d599fac8) )
ROM_LOAD( "re41tp2.bin", 0x4000, 0x2000, CRC(7c7f67b0) SHA1(5448d755bf6536312898abb7b42141559772fe04) )
ROM_LOAD( "re41tp3.bin", 0x2000, 0x2000, CRC(78b51719) SHA1(78f972ce57cbb0df1d590d6f4302d5405ff1834c) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3snaphp ) // runs but LED display is wrong?
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "sn.bin", 0x6000, 0x2000, CRC(68a9d720) SHA1(5294309082ff89ee33339bee4b350ae672dd34c0) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3snappy ) // clone of hyper viper
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) // this should be split..
ROM_LOAD( "snappy.hex", 0x2000, 0x6000, CRC(6bf2052b) SHA1(3cb1dc19aa58cc60193745a04d8fdebcfc1dc200) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1315,21 +1315,21 @@ ROM_START( m3circle )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "spc.p1", 0x7000, 0x1000, CRC(17bfae90) SHA1(e04ab893dfaaf2bf178a6d51daa99aa9b412dfff) )
ROM_LOAD( "spc.p2", 0x6000, 0x1000, CRC(27fac879) SHA1(bb738cb4f541ed51488ab5e4e50288052cd911c7) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3circlea ) // most likely a bad dump of both roms
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "specialcircle.p1", 0x7000, 0x1000, CRC(21f7e745) SHA1(5b050cad957a055396f5aaa5558034cf55d62d18) ) // bad? boot vectors are missing..
ROM_LOAD( "specialcircle.p2", 0x6000, 0x1000, CRC(8d5d26bd) SHA1(e88e368ad411529e982c76bff0696f6966fd7f11) ) // 1ST AND 2ND HALF IDENTICAL
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3circleb )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "splc4.p1", 0x7000, 0x1000, CRC(252eb228) SHA1(e71b7d04bd0aaf5b047f25c755d0ce0593dd2ade) )
ROM_LOAD( "splc4.p2", 0x6000, 0x1000, CRC(86fb0c95) SHA1(d2dc55241f3dddfd7ece8ed041d81abe0da5ecc8) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3scoop )
@@ -1337,21 +1337,21 @@ ROM_START( m3scoop )
ROM_LOAD( "scoopv-2.p1", 0x7000, 0x1000, CRC(e937e298) SHA1(edb4dfb5afd6c2640b6bbd83be591987225bd8fc) )
ROM_LOAD( "scoopv-2.p2", 0x6000, 0x1000, CRC(2a97a254) SHA1(a249e013d86f7e65e43b07ff916c4d0fd5099f44) )
ROM_LOAD( "scoopv-2.p3", 0x5000, 0x1000, CRC(34ab1805) SHA1(1e389e9b47c4b3305ec70c94f49a4e3ca0a6f439) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3spoof )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "spoof1.bin", 0x7000, 0x1000, CRC(8111eec5) SHA1(9fbfeafa20a79fcb8fb71fcd32b515d04bc6bc3a) )
ROM_LOAD( "spoof2.bin", 0x6000, 0x1000, CRC(47309111) SHA1(af7ee94d9405bcadf9432da4725361c6600d1788) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3spoofa )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "spoof10pp1286.bin", 0x7000, 0x1000, BAD_DUMP CRC(2805d082) SHA1(b6b31ec6705b175a8c641089924b100c8427eac0) ) // 1ST AND 2ND HALF IDENTICAL
ROM_LOAD( "spoof10pp2286.bin", 0x6000, 0x1000, CRC(3c104fbe) SHA1(c7825288ae06cd6adabe02532c39944d5f4d3e44) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1360,7 +1360,7 @@ ROM_START( m3slight )
ROM_LOAD( "sal2-9.p1", 0x6000, 0x2000, CRC(1acccff5) SHA1(5c9cb9fe88ca6e11fcb4f22d93fefe67b5b165ff) )
ROM_LOAD( "sal2-9.p2", 0x4000, 0x2000, CRC(28a02a70) SHA1(d9f68031b02c6ab5aee717c04c1834a1c9b250e9) )
ROM_LOAD( "sal2-9.p3", 0x2000, 0x2000, CRC(4dff2186) SHA1(bd15bbe248ed3270278c9e848d600ed49c06c72d) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1371,7 +1371,7 @@ ROM_START( m3supasw )
ROM_LOAD( "sswop_p1.bin", 0x6000, 0x2000, CRC(8bf34554) SHA1(b981dc67905f7ceb02271ca67dd224dc1b4d5a40) )
ROM_LOAD( "sswop_p2.bin", 0x4000, 0x2000, CRC(8b68fd45) SHA1(8cfbf2b7a427a0360640af142dbce5eb834bc648) )
ROM_LOAD( "sswop_p3.bin", 0x2000, 0x2000, CRC(3d821ed4) SHA1(77fa7c67593ea175ad29f0959524c0e225391bbc) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1379,7 +1379,7 @@ ROM_START( m3supadr )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "sa1_0.p1", 0x6000, 0x2000, CRC(b6088056) SHA1(d887e92a76db848045cfe4fec9b1f16ed4d733d9) )
ROM_LOAD( "sa1_0.p2", 0x5000, 0x1000, CRC(7efb91e0) SHA1(faa9292ba3671e0b6458f010a1005037d01ff501) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1388,14 +1388,14 @@ ROM_START( m3sdeal ) // dutch? (based on error message)
ROM_LOAD( "superdeal-p1.bin", 0x6000, 0x2000, CRC(1ca6bc04) SHA1(477a2a9267cefa1cdd8b173886aedaacf8f83a26) )
ROM_LOAD( "superdeal-p2.bin", 0x4000, 0x2000, CRC(49da28eb) SHA1(4192707eb5abb3d3a0679a2c243810c7e61f873d) )
ROM_LOAD( "superdeal-p3.bin", 0x2000, 0x2000, CRC(94e8341a) SHA1(5908995ae4cbf5cd45704b3e4ed7129859c85c0b) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3sexcu )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 ) // needs to be split
ROM_LOAD( "superexchanges.hex", 0x5000, 0x003000, CRC(758323b9) SHA1(524fcb81148ec940ef98568d99fc7a0bda7d727a) ) // == m3xchngua
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1403,14 +1403,14 @@ ROM_START( m3suplin )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "slu1_1.p1", 0x6000, 0x2000, CRC(5b939310) SHA1(4a668cebef092e1f61172850368489818cd50009) )
ROM_LOAD( "slu1_1.p2", 0x4000, 0x2000, CRC(7ae23b70) SHA1(f516f34884f5967ea9145b227561641391d201f1) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3suplina )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "superlineup2v1-0.p1", 0x6000, 0x2000, CRC(9aa1ea5a) SHA1(4649a28aabb71187e8378d123caf60b8400fc4ad) )
ROM_LOAD( "superlineup2v1-0.p2", 0x4000, 0x2000, CRC(3d341b1b) SHA1(9ca413f8c5eaa10f59ba16e09c12934181d795b4) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1419,7 +1419,7 @@ ROM_START( m3supnud )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "snu.p1", 0x7000, 0x1000, CRC(8255e3a4) SHA1(bc7dc2d5e33f88cb96ca311b323d4442f0ec4e1b) )
ROM_LOAD( "snu.p2", 0x6000, 0x1000, CRC(9a5cf1ef) SHA1(b18049cae70c514b68bad526ef7d27f90f4aa439) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1427,7 +1427,7 @@ ROM_START( m3supser )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "spseries-9f.p1", 0x7000, 0x1000, CRC(baf8f44b) SHA1(3f8fcca4a4125f24fd44dfa995876a6743f2624f) )
ROM_LOAD( "spseries-9f.p2", 0x6000, 0x1000, CRC(c1963f6b) SHA1(8d720a95dd041de22000db2504f97e907480cb80) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1435,14 +1435,14 @@ ROM_START( m3supspo ) // boots
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "s-spoof10p_4.p1", 0x6000, 0x2000, CRC(9ec3896f) SHA1(e9b79a0d3bfd6fb1ae7a7ef21112b095f4386e95) )
ROM_LOAD( "s-spoof10p_4.p2", 0x4000, 0x2000, CRC(5bc9036b) SHA1(6209cebeaf9a4841d8bffd7777df6df3f76457c1) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3supspoa )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "superspoof1.bin", 0x6000, 0x2000, CRC(1a9ce342) SHA1(6297528891e9629e489e0ea0c01465dc650d9b4a) )
ROM_LOAD( "superspoof2.bin", 0x4000, 0x2000, CRC(d5108b58) SHA1(10e81c9a2802b820801d3bdee26a360b1d43ebd7) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1451,14 +1451,14 @@ ROM_START( m3supwin )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "superwin.p1", 0x6000, 0x2000, CRC(d6193f5b) SHA1(2813a982d1527d994a045840aaaa20032bd39c45) )
ROM_LOAD( "superwin.p2", 0x4000, 0x2000, CRC(89f9af8a) SHA1(1705a0eb31a5ee77e77811798d3c99b65dc7ade4) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3supwina ) // odd in only p2 differing
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "superwin.p1", 0x6000, 0x2000, CRC(d6193f5b) SHA1(2813a982d1527d994a045840aaaa20032bd39c45) ) // == m3winagna
ROM_LOAD( "superwin_.p2", 0x4000, 0x2000, CRC(f4210f20) SHA1(e0c7e28950683e35102bfd0bef7b74c63a36798f) ) // == m3winagna
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3sweep )
@@ -1466,7 +1466,7 @@ ROM_START( m3sweep )
ROM_LOAD( "ss56p1.bin", 0x6000, 0x2000, CRC(c1fb3eb0) SHA1(95b9c6fe641ef24135a384c2deb58a249d6db632) )
ROM_LOAD( "ss56p2.bin", 0x4000, 0x2000, CRC(29347490) SHA1(ac033708e396810043b73789daca6af993c095ea) )
ROM_LOAD( "ss56p3.bin", 0x2000, 0x2000, CRC(87bea2a5) SHA1(b654eb19a9285746788f9ef4f5e305ec275abbe1) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3sweepa )
@@ -1474,7 +1474,7 @@ ROM_START( m3sweepa )
ROM_LOAD( "ss56tp1.bin", 0x6000, 0x2000, CRC(815b77f9) SHA1(ba827d9ee73a50b8f0c42e18af899450cb8538b8) )
ROM_LOAD( "ss56tp2.bin", 0x4000, 0x2000, CRC(29347490) SHA1(ac033708e396810043b73789daca6af993c095ea) )
ROM_LOAD( "ss56tp3.bin", 0x2000, 0x2000, CRC(87bea2a5) SHA1(b654eb19a9285746788f9ef4f5e305ec275abbe1) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3tlktwn )
@@ -1482,13 +1482,13 @@ ROM_START( m3tlktwn )
ROM_LOAD( "ttown1.bin", 0x7000, 0x1000, CRC(996c435b) SHA1(1fcf5a637cddacd6660da752a1fe10e56a7653c7) )
ROM_LOAD( "ttown2.bin", 0x6000, 0x1000, CRC(93bd6446) SHA1(ef271bb45d27844f0ef1437bbc7f4847f4c0c6ee) )
ROM_LOAD( "ttown3.bin", 0x5000, 0x1000, CRC(0ca34690) SHA1(1734692d82af89272a2243e2c5f584965bfe197f) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3toplin )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "tlines.hex", 0x6000, 0x2000, CRC(b8d652b4) SHA1(fe356ba773f876a390f845daa6464a41e8cd2826) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1497,7 +1497,7 @@ ROM_START( m3topsht )
ROM_LOAD( "topshtp1.bin", 0x6000, 0x2000, CRC(8ee171c9) SHA1(34db6556c9af75c1cb734fe610814fcd3c4bba93) )
ROM_LOAD( "topshtp2.bin", 0x4000, 0x2000, CRC(708cb3b5) SHA1(1e33ce713d0cc75bac675d739c7332109ce1da2d) )
ROM_LOAD( "topshtp3.bin", 0x2000, 0x2000, CRC(ead364ae) SHA1(207e082fb18049863cbc35975bc6885b39ef76da) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1507,21 +1507,21 @@ ROM_START( m3tfair )
ROM_LOAD( "tf1.bin", 0x6000, 0x2000, CRC(0f0e0ef6) SHA1(768e162463ecc3fb6ca4c8bf01504d25ce427cd9) )
ROM_LOAD( "tf2.bin", 0x4000, 0x2000, CRC(8e25c8a5) SHA1(e924677b1820210157706f093f12bdf5acc5211e) )
ROM_LOAD( "tf3.bin", 0x2000, 0x2000, CRC(2ab74abc) SHA1(cf10fa2d4dfceb6358005525fa71bc58a8875128) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3wacky ) // draws letters with the lights!
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "wacky1.bin", 0x6000, 0x2000, CRC(8fad0357) SHA1(0bcf21bb2edf7cce32fa6f028dcceb8ea8a1bec7) )
ROM_LOAD( "wacky2.bin", 0x5000, 0x1000, CRC(534d31c3) SHA1(51d5e174f19bafde9d6d20c0bd0671b3f2857314) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3wigwam )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "wigwamp1.bin", 0x6000, 0x2000, CRC(2ec2cfa9) SHA1(461240315725f29f53fdcf89e767d17a4d2301eb) )
ROM_LOAD( "wigwamp2.bin", 0x4000, 0x2000, CRC(f386dd1a) SHA1(0506c3b79e7394064b1ee97758cd1deb5933c290) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1529,7 +1529,7 @@ ROM_START( m3winagn )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "2pwag.p1", 0x6000, 0x2000, CRC(597df8e6) SHA1(c28bafa9f7552b1f23218844592f0b12b9215891) )
ROM_LOAD( "2pwag.p2", 0x4000, 0x2000, CRC(a48877f9) SHA1(a52cebb9d2f80b2ee4a821628138c406e1b68fe1) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
// these appear to be something else / different hardware
//ROM_LOAD( "bwbnwagn.bin", 0x0000, 0x8000, CRC(1163559a) SHA1(9e13b23eae478fd5b5468599b1163d06e189d446) )
@@ -1539,14 +1539,14 @@ ROM_START( m3winagna )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "wag.p1", 0x6000, 0x2000, CRC(d6193f5b) SHA1(2813a982d1527d994a045840aaaa20032bd39c45) ) // == m3supwina
ROM_LOAD( "wag.p2", 0x4000, 0x2000, CRC(f4210f20) SHA1(e0c7e28950683e35102bfd0bef7b74c63a36798f) ) // == m3supwina
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3winagnb )
ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASE00 )
ROM_LOAD( "wag1.bin", 0x6000, 0x2000, CRC(ded10570) SHA1(abb938e02cac34ec800c53d1c19a66ef8456d483) )
ROM_LOAD( "wag2.bin", 0x4000, 0x2000, CRC(5c6643b5) SHA1(dbaeb22d6879e005c296456f5424eb6147564e9f) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
@@ -1555,7 +1555,7 @@ ROM_START( m3winstr )
ROM_LOAD( "winst1.bin", 0x6000, 0x2000, CRC(d06f8312) SHA1(b32b6eff6928b26422d66f90d6643d03bc021181) )
ROM_LOAD( "winst2.bin", 0x4000, 0x2000, CRC(8bc5df32) SHA1(6a16223f7f93c87dac29758206abe45cc3f45d78) )
ROM_LOAD( "winst3.bin", 0x2000, 0x2000, CRC(d8ce68e8) SHA1(65518db36a195ac5303033086da8ca8e4a61ca13) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
ROM_START( m3winstra )
@@ -1563,7 +1563,7 @@ ROM_START( m3winstra )
ROM_LOAD( "2p wst p1.bin", 0x6000, 0x2000, CRC(34577170) SHA1(6dbe71074b069e44da5231b40a6a9f89a9315f34) )
ROM_LOAD( "2p wst p2.bin", 0x4000, 0x2000, CRC(8bc5df32) SHA1(6a16223f7f93c87dac29758206abe45cc3f45d78) )
ROM_LOAD( "p3.bin", 0x2000, 0x2000, CRC(80bba633) SHA1(2c8fd48c20e6fd9d6ea7cae7466d18dae82fbec3) )
- ROM_COPY( "maincpu", 0x0000, 0x8000, 0x8000 )
+ ROM_COPY( "maincpu", nullptr, 0x8000, 0x8000 )
ROM_END
diff --git a/src/mame/drivers/mpu4mdm.cpp b/src/mame/drivers/mpu4mdm.cpp
index 61c53be08a2..ecc6b5ac02e 100644
--- a/src/mame/drivers/mpu4mdm.cpp
+++ b/src/mame/drivers/mpu4mdm.cpp
@@ -235,7 +235,7 @@ ROM_START( m4firebld ) // looks weird, bad dump?
// reports src/mame/drivers/mpu4.c: m4firebld has ROM fba2_6 extending past the defined memory region (bug)
//ROM_LOAD( "fba2_6", 0x0000, 0x010000, CRC(cf16b2d0) SHA1(32249fb15708dfa408c4642be7a41fba7aeda657) )
//ROM_IGNORE(0x070000)
- ROM_COPY( "temp", 0x0000, 0x0000, 0x010000 )
+ ROM_COPY( "temp", nullptr, 0x0000, 0x010000 )
ROM_END
diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp
index f87ca949180..9fce43e5215 100644
--- a/src/mame/drivers/mpu4vid.cpp
+++ b/src/mame/drivers/mpu4vid.cpp
@@ -435,7 +435,7 @@ VIDEO_START_MEMBER(mpu4vid_state,mpu4_vid)
/* find first empty slot to decode gfx */
for (m_gfx_index = 0; m_gfx_index < MAX_GFX_ELEMENTS; m_gfx_index++)
- if (m_gfxdecode->gfx(m_gfx_index) == 0)
+ if (m_gfxdecode->gfx(m_gfx_index) == nullptr)
break;
assert(m_gfx_index != MAX_GFX_ELEMENTS);
@@ -1656,15 +1656,15 @@ static mpu4_chr_table quidgrid_data[64] = {
};
static mpu4_chr_table blank_data[72] = {
-{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},
-{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},
-{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},
-{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},
-{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},
-{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},
-{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},
-{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},
-{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},{-1, -1},
+{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},
+{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},
+{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},
+{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},
+{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},
+{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},
+{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},
+{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},
+{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},{0xff, 0xff},
};
diff --git a/src/mame/drivers/mpz80.cpp b/src/mame/drivers/mpz80.cpp
index 3c72db2940b..0c42707b541 100644
--- a/src/mame/drivers/mpz80.cpp
+++ b/src/mame/drivers/mpz80.cpp
@@ -720,17 +720,17 @@ static MACHINE_CONFIG_START( mpz80, mpz80_state )
MCFG_S100_SLOT_ADD("s100_1", mpz80_s100_cards, "mm65k16s")
MCFG_S100_SLOT_ADD("s100_2", mpz80_s100_cards, "wunderbus")
MCFG_S100_SLOT_ADD("s100_3", mpz80_s100_cards, "dj2db")
- MCFG_S100_SLOT_ADD("s100_4", mpz80_s100_cards, NULL)//"hdcdma")
- MCFG_S100_SLOT_ADD("s100_5", mpz80_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_6", mpz80_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_7", mpz80_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_8", mpz80_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_9", mpz80_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_10", mpz80_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_11", mpz80_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_12", mpz80_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_13", mpz80_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_14", mpz80_s100_cards, NULL)
+ MCFG_S100_SLOT_ADD("s100_4", mpz80_s100_cards, nullptr)//"hdcdma")
+ MCFG_S100_SLOT_ADD("s100_5", mpz80_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_6", mpz80_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_7", mpz80_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_8", mpz80_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_9", mpz80_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_10", mpz80_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_11", mpz80_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_12", mpz80_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_13", mpz80_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_14", mpz80_s100_cards, nullptr)
// internal ram
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mame/drivers/mquake.cpp b/src/mame/drivers/mquake.cpp
index 77c38c9db88..bbe0fc9cf4b 100644
--- a/src/mame/drivers/mquake.cpp
+++ b/src/mame/drivers/mquake.cpp
@@ -362,7 +362,7 @@ MACHINE_CONFIG_END
ROM_START( mquake )
ROM_REGION(0x80000, "kickstart", 0)
ROM_LOAD16_WORD_SWAP("315093-01.u2", 0x00000, 0x40000, CRC(a6ce1636) SHA1(11f9e62cf299f72184835b7b2a70a16333fc0d88))
- ROM_COPY("kickstart", 0x00000, 0x40000, 0x40000)
+ ROM_COPY("kickstart", nullptr, 0x40000, 0x40000)
ROM_REGION(0xc0000, "user2", 0)
ROM_LOAD16_BYTE( "rom0l.bin", 0x00000, 0x10000, CRC(60c35ec3) SHA1(84fe88af54903cbd46044ef52bb50e8f94a94dcd) )
diff --git a/src/mame/drivers/mrgame.cpp b/src/mame/drivers/mrgame.cpp
index d6d0b162c0f..7d03c55d687 100644
--- a/src/mame/drivers/mrgame.cpp
+++ b/src/mame/drivers/mrgame.cpp
@@ -432,7 +432,7 @@ UINT32 mrgame_state::screen_update_mrgame(screen_device &screen, bitmap_ind16 &b
}
// scroll each column as needed
- copyscrollbitmap(bitmap,*m_tile_bitmap,0,0,32,scrolly,cliprect);
+ copyscrollbitmap(bitmap,*m_tile_bitmap,0,nullptr,32,scrolly,cliprect);
// sprites
diff --git a/src/mame/drivers/msx.cpp b/src/mame/drivers/msx.cpp
index 9a73ece450d..4202b20f351 100644
--- a/src/mame/drivers/msx.cpp
+++ b/src/mame/drivers/msx.cpp
@@ -6665,7 +6665,7 @@ ROM_START (hbf900)
ROM_LOAD ("f900ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344))
ROM_LOAD ("f900disk.rom", 0xc000, 0x4000, CRC(f83d0ea6) SHA1(fc760d1d7b16370abc7eea39955f230b95b37df6))
ROM_LOAD ("f900util.rom", 0x10000, 0x4000, CRC(bc6c7c66) SHA1(558b7383544542cf7333700ff90c3efbf93ba2a3))
- ROM_FILL (0x14000, 0x4000, 0)
+ ROM_FILL (0x14000, 0x4000, nullptr)
ROM_REGION(0x20000, "kanji", 0)
ROM_LOAD ("f900kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799))
@@ -6699,7 +6699,7 @@ ROM_START (hbf900a)
ROM_LOAD ("f900ext.rom", 0x8000, 0x4000, CRC(43e7a7fc) SHA1(0fbd45ef3dd7bb82d4c31f1947884f411f1ca344))
ROM_LOAD ("f900disa.rom", 0xc000, 0x4000, CRC(54c73ad6) SHA1(12f2cc79b3d09723840bae774be48c0d721ec1c6))
ROM_LOAD ("f900util.rom", 0x10000, 0x4000, CRC(bc6c7c66) SHA1(558b7383544542cf7333700ff90c3efbf93ba2a3))
- ROM_FILL (0x14000, 0x4000, 0)
+ ROM_FILL (0x14000, 0x4000, nullptr)
ROM_REGION(0x20000, "kanji", 0)
ROM_LOAD ("f900kfn.rom", 0, 0x20000, CRC(5a59926e) SHA1(6acaf2eeb57f65f7408235d5e07b7563229de799))
diff --git a/src/mame/drivers/mtx.cpp b/src/mame/drivers/mtx.cpp
index 636a48b1e59..64ffb944e70 100644
--- a/src/mame/drivers/mtx.cpp
+++ b/src/mame/drivers/mtx.cpp
@@ -242,7 +242,7 @@ WRITE_LINE_MEMBER(mtx_state::ctc_trg2_w)
static const z80_daisy_config mtx_daisy_chain[] =
{
{ Z80CTC_TAG },
- { NULL }
+ { nullptr }
};
/*-------------------------------------------------
@@ -253,7 +253,7 @@ static const z80_daisy_config rs128_daisy_chain[] =
{
{ Z80CTC_TAG },
{ Z80DART_TAG },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/multigam.cpp b/src/mame/drivers/multigam.cpp
index a4b9c5d3363..32c79e404dd 100644
--- a/src/mame/drivers/multigam.cpp
+++ b/src/mame/drivers/multigam.cpp
@@ -1267,7 +1267,7 @@ ROM_START( multigam )
ROM_LOAD( "8.bin", 0x00000, 0x20000, CRC(509c0e94) SHA1(9e87c74e76afe6c3a7ba194439434f54e2c879eb) )
ROM_LOAD( "9.bin", 0x20000, 0x20000, CRC(48416f20) SHA1(f461fcbff6d2fa4774d64c26475089d1aeea7fb5) )
ROM_LOAD( "10.bin", 0x40000, 0x20000, CRC(869d1661) SHA1(ac155bd24ebfea8e064859e1a05317001286f9ae) )
- ROM_FILL( 0x60000, 0x20000, 0x00 )
+ ROM_FILL( 0x60000, 0x20000, nullptr )
ROM_END
ROM_START( multigmb )
@@ -1286,7 +1286,7 @@ ROM_START( multigmb )
ROM_LOAD( "8.bin", 0x00000, 0x20000, CRC(509c0e94) SHA1(9e87c74e76afe6c3a7ba194439434f54e2c879eb) )
ROM_LOAD( "9.bin", 0x20000, 0x20000, CRC(48416f20) SHA1(f461fcbff6d2fa4774d64c26475089d1aeea7fb5) )
ROM_LOAD( "10.bin", 0x40000, 0x20000, CRC(869d1661) SHA1(ac155bd24ebfea8e064859e1a05317001286f9ae) )
- ROM_FILL( 0x60000, 0x20000, 0x00 )
+ ROM_FILL( 0x60000, 0x20000, nullptr )
ROM_END
ROM_START( multigm2 )
@@ -1325,7 +1325,7 @@ ROM_START( multigm3 )
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "mg3-7.bin", 0x00000, 0x20000, CRC(d8308cdb) SHA1(7bfb864611c32cf3740cfd650bfe275513d511d7) )
ROM_LOAD( "mg3-8.bin", 0x20000, 0x20000, CRC(b4a53b9d) SHA1(63d8901149d0d9b69f28bfc096f7932448542032) )
- ROM_FILL( 0x40000, 0x20000, 0x00 )
+ ROM_FILL( 0x40000, 0x20000, nullptr )
ROM_LOAD( "mg3-9.bin", 0x60000, 0x20000, CRC(a0ae2b4b) SHA1(5e026ad8a6b2a8120e386471d5178625bda04525) )
ROM_END
@@ -1351,7 +1351,7 @@ ROM_END
ROM_START( sgmt1 )
ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD( "sg1_rom1.bin", 0x0000, 0x10000, CRC(0fcec01d) SHA1(c622fdd99827b8ff8ffc4658363d454fdfb6ec61) )
- ROM_COPY("maincpu", 0x0000, 0x10000, 0x10000)
+ ROM_COPY("maincpu", nullptr, 0x10000, 0x10000)
ROM_REGION( 0x400000, "user1", 0 )
ROM_LOAD( "sg1_rom2.bin", 0x000000, 0x80000, CRC(7ee249f0) SHA1(eeb40ec7e9cd2afd03b5da01e985c5cfe650c8f8) )
@@ -1366,7 +1366,7 @@ ROM_END
ROM_START( supergm3 )
ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD( "sg3.ic36", 0x0000, 0x10000, CRC(f79dd9ef) SHA1(31b84097f4f14bdb6e87a7a624e9974abe680c80) )
- ROM_COPY("maincpu", 0x0000, 0x10000, 0x10000)
+ ROM_COPY("maincpu", nullptr, 0x10000, 0x10000)
ROM_REGION( 0x400000, "user1", 0 )
ROM_LOAD( "sg3.rom18", 0x000000, 0x80000, CRC(aa7b8631) SHA1(4d6695da2baef7cc5b0d3f9f620f6b49d8f89e23) )
diff --git a/src/mame/drivers/mwarr.cpp b/src/mame/drivers/mwarr.cpp
index aff1fae0552..821a4fbb790 100644
--- a/src/mame/drivers/mwarr.cpp
+++ b/src/mame/drivers/mwarr.cpp
@@ -637,13 +637,13 @@ ROM_START( mwarr )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki2", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0e0000, 0x020000)
ROM_END
diff --git a/src/mame/drivers/myb3k.cpp b/src/mame/drivers/myb3k.cpp
index 96677868c1e..a040bec8d73 100644
--- a/src/mame/drivers/myb3k.cpp
+++ b/src/mame/drivers/myb3k.cpp
@@ -128,7 +128,7 @@ WRITE8_MEMBER( myb3k_state::myb3k_video_mode_w )
WRITE8_MEMBER( myb3k_state::myb3k_fdc_output_w )
{
/* TODO: complete guesswork! (it just does a 0x24 -> 0x20 in there) */
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (data & 1) floppy = m_floppy0;
if (data & 2) floppy = m_floppy1;
diff --git a/src/mame/drivers/mz2000.cpp b/src/mame/drivers/mz2000.cpp
index 688956ee405..b44ae2166a2 100644
--- a/src/mame/drivers/mz2000.cpp
+++ b/src/mame/drivers/mz2000.cpp
@@ -41,7 +41,7 @@ public:
mz2000_state(const machine_config &mconfig, device_type type, const char *tag)
: driver_device(mconfig, type, tag),
m_cass(*this, "cassette"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_maincpu(*this, "maincpu"),
m_mb8877a(*this, "mb8877a"),
m_floppy0(*this, "mb8877a:0"),
@@ -635,7 +635,7 @@ READ8_MEMBER(mz2000_state::mz2000_portb_r)
*/
UINT8 res = 0x80;
- if(m_cass->get_image() != NULL)
+ if(m_cass->get_image() != nullptr)
{
res |= (m_cass->input() > 0.0038) ? 0x40 : 0x00;
res |= ((m_cass->get_state() & CASSETTE_MASK_UISTATE) == CASSETTE_PLAY) ? 0x00 : 0x20;
diff --git a/src/mame/drivers/mz2500.cpp b/src/mame/drivers/mz2500.cpp
index 19448ccd16f..980b788df4b 100644
--- a/src/mame/drivers/mz2500.cpp
+++ b/src/mame/drivers/mz2500.cpp
@@ -76,7 +76,7 @@ public:
m_floppy1(*this, "mb8877a:1"),
m_floppy2(*this, "mb8877a:2"),
m_floppy3(*this, "mb8877a:3"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_palette(*this, "palette")
{ }
diff --git a/src/mame/drivers/mz3500.cpp b/src/mame/drivers/mz3500.cpp
index 8a5828e0401..9f480c08563 100644
--- a/src/mame/drivers/mz3500.cpp
+++ b/src/mame/drivers/mz3500.cpp
@@ -770,10 +770,10 @@ void mz3500_state::machine_reset()
{
m_fdd_sel = 0;
{
- for(int i=0;i<4;i++)
+ for(auto & elem : m_floppy_connector)
{
- m_floppy_connector[i]->get_device()->mon_w(ASSERT_LINE);
- m_floppy_connector[i]->get_device()->set_rpm(300);
+ elem->get_device()->mon_w(ASSERT_LINE);
+ elem->get_device()->set_rpm(300);
}
machine().device<upd765a_device>("upd765a")->set_rate(250000);
diff --git a/src/mame/drivers/n64.cpp b/src/mame/drivers/n64.cpp
index 645483f470a..1d4e47a4273 100644
--- a/src/mame/drivers/n64.cpp
+++ b/src/mame/drivers/n64.cpp
@@ -284,7 +284,7 @@ DEVICE_IMAGE_LOAD_MEMBER(n64_mess_state,n64_cart)
n64_periphs *periphs = machine().device<n64_periphs>("rcp");
UINT8 *cart = memregion("user2")->base();
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
length = image.fread(cart, 0x4000000);
}
diff --git a/src/mame/drivers/nakajies.cpp b/src/mame/drivers/nakajies.cpp
index 29b2ba35af8..bcf43ef4071 100644
--- a/src/mame/drivers/nakajies.cpp
+++ b/src/mame/drivers/nakajies.cpp
@@ -649,9 +649,9 @@ void nakajies_state::machine_reset()
m_matrix = 0;
/* Initialize banks */
- for ( int i = 0; i < 8; i++ )
+ for (auto & elem : m_bank)
{
- m_bank[i] = 0;
+ elem = 0;
}
memset(m_ram_base, 0, m_ram_size);
update_banks();
diff --git a/src/mame/drivers/namcoic.cpp b/src/mame/drivers/namcoic.cpp
index 422756fb48f..1cc553b93eb 100644
--- a/src/mame/drivers/namcoic.cpp
+++ b/src/mame/drivers/namcoic.cpp
@@ -1165,8 +1165,8 @@ WRITE16_MEMBER( namcos2_shared_state::c169_roz_bank_w )
UINT16 old_data = m_c169_roz_bank[offset];
COMBINE_DATA(&m_c169_roz_bank[offset]);
if (m_c169_roz_bank[offset] != old_data)
- for (int i = 0; i < ROZ_TILEMAP_COUNT; i++)
- m_c169_roz_tilemap[i]->mark_all_dirty();
+ for (auto & elem : m_c169_roz_tilemap)
+ elem->mark_all_dirty();
}
READ16_MEMBER( namcos2_shared_state::c169_roz_videoram_r )
@@ -1177,6 +1177,6 @@ READ16_MEMBER( namcos2_shared_state::c169_roz_videoram_r )
WRITE16_MEMBER( namcos2_shared_state::c169_roz_videoram_w )
{
COMBINE_DATA(&m_c169_roz_videoram[offset]);
- for (int i = 0; i < ROZ_TILEMAP_COUNT; i++)
- m_c169_roz_tilemap[i]->mark_tile_dirty(offset);
+ for (auto & elem : m_c169_roz_tilemap)
+ elem->mark_tile_dirty(offset);
}
diff --git a/src/mame/drivers/namcona1.cpp b/src/mame/drivers/namcona1.cpp
index a67f2a60de2..690e9926c4c 100644
--- a/src/mame/drivers/namcona1.cpp
+++ b/src/mame/drivers/namcona1.cpp
@@ -892,7 +892,7 @@ static const gfx_layout shape_layout =
static GFXDECODE_START( namcona1 )
GFXDECODE_RAM( "cgram", 0, cg_layout_8bpp, 0, 0x2000/256 )
GFXDECODE_RAM( "cgram", 0, cg_layout_4bpp, 0, 0x2000/16 )
- GFXDECODE_RAM( NULL, 0, shape_layout, 0, 0x2000/2 )
+ GFXDECODE_RAM( nullptr, 0, shape_layout, 0, 0x2000/2 )
GFXDECODE_END
/***************************************************************************/
diff --git a/src/mame/drivers/namcos10.cpp b/src/mame/drivers/namcos10.cpp
index 39e37d3b9d7..8d7607972a7 100644
--- a/src/mame/drivers/namcos10.cpp
+++ b/src/mame/drivers/namcos10.cpp
@@ -572,7 +572,7 @@ ADDRESS_MAP_END
WRITE16_MEMBER(namcos10_state::crypto_switch_w)
{
printf("crypto_switch_w: %04x\n", data);
- if (decrypter == 0)
+ if (decrypter == nullptr)
return;
if (BIT(data, 15) != 0)
@@ -633,7 +633,7 @@ READ16_MEMBER( namcos10_state::nand_data_r )
/* printf( "data<-%08x (%08x)\n", data, nand_address ); */
nand_address++;
- if (decrypter == 0)
+ if (decrypter == nullptr)
return data;
if (decrypter->is_active())
diff --git a/src/mame/drivers/namcos11.cpp b/src/mame/drivers/namcos11.cpp
index 682fccae8f0..fc70c932550 100644
--- a/src/mame/drivers/namcos11.cpp
+++ b/src/mame/drivers/namcos11.cpp
@@ -535,7 +535,7 @@ void namcos11_state::driver_start()
}
memory_region *bankedroms = memregion( "bankedroms" );
- if( bankedroms != NULL )
+ if( bankedroms != nullptr )
{
UINT8 *base = bankedroms->base();
int entries = bankedroms->bytes() / ( 1024 * 1024 );
@@ -545,7 +545,7 @@ void namcos11_state::driver_start()
for( int bank = 0; bank < 8; bank++ )
{
m_bank[ bank ] = membank( bankname[ bank ] );
- if( m_bank[ bank ] != NULL )
+ if( m_bank[ bank ] != nullptr )
{
m_bank[ bank ]->configure_entries( 0, entries, base, 1024 * 1024 );
m_bank[ bank ]->set_entry( 0 );
diff --git a/src/mame/drivers/namcos12.cpp b/src/mame/drivers/namcos12.cpp
index db8652c0ffa..e4a10d76127 100644
--- a/src/mame/drivers/namcos12.cpp
+++ b/src/mame/drivers/namcos12.cpp
@@ -2607,7 +2607,7 @@ ROM_START( sws99 )
ROM_REGION32_LE( 0x2000000, "user2", 0 ) /* main data */
ROM_LOAD( "ss91rom0.9", 0x0000000, 0x800000, CRC(db5bc50d) SHA1(b8b59f6db3a374277871c39b3657cb193525e558) )
ROM_LOAD( "ss91rom1.10", 0x0800000, 0x800000, CRC(4d71f29f) SHA1(3ccc8410d383bfd9fde44574ebb9c24a235cc734) )
- ROM_FILL( 0x1000000, 0x800000, 0 )
+ ROM_FILL( 0x1000000, 0x800000, nullptr )
ROM_LOAD16_BYTE( "ss91fl3l.7", 0x1800000, 0x200000, CRC(61efd65b) SHA1(1e97d5cd51bf778995c3e568ac7e1d3514264d48) )
ROM_LOAD16_BYTE( "ss91fl3h.8", 0x1800001, 0x200000, CRC(7f3c8c54) SHA1(b473a503cc5d532922780139ab3cab974d3df65b) )
ROM_LOAD16_BYTE( "ss91fl4l.5", 0x1c00000, 0x200000, CRC(a6af9511) SHA1(63f14f4fc2b210348e41cdfa552a7a7c86fb1b99) )
diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp
index b3f8443026a..64000211811 100644
--- a/src/mame/drivers/namcos22.cpp
+++ b/src/mame/drivers/namcos22.cpp
@@ -3344,7 +3344,7 @@ static INPUT_PORTS_START( alpiner )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START ) // Decision / View Change
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY // L Selection
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_16WAY // R Selection
- PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)0) // steps are free
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)nullptr) // steps are free
PORT_START("MCUP5B")
PORT_BIT( 0x01, IP_ACTIVE_HIGH,IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22_state,alpine_motor_read, (void *)1) // steps are locked
@@ -3712,12 +3712,12 @@ static const gfx_layout namcos22_cg_layout =
#undef XOR
static GFXDECODE_START( namcos22 )
- GFXDECODE_ENTRY( NULL, 0, namcos22_cg_layout, 0, 0x800 )
+ GFXDECODE_ENTRY( nullptr, 0, namcos22_cg_layout, 0, 0x800 )
GFXDECODE_ENTRY( "textile", 0, texture_tile_layout, 0, 0x80 )
GFXDECODE_END
static GFXDECODE_START( super )
- GFXDECODE_ENTRY( NULL, 0, namcos22_cg_layout, 0, 0x800 )
+ GFXDECODE_ENTRY( nullptr, 0, namcos22_cg_layout, 0, 0x800 )
GFXDECODE_ENTRY( "textile", 0, texture_tile_layout, 0, 0x80 )
GFXDECODE_ENTRY( "sprite", 0, sprite_layout, 0, 0x80 )
GFXDECODE_END
@@ -3874,8 +3874,8 @@ MACHINE_START_MEMBER(namcos22_state,adillor)
{
machine_start();
- for (int axis = 0; axis < 2; axis++)
- m_ar_tb_interrupt[axis] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos22_state::adillor_trackball_interrupt),this));
+ for (auto & elem : m_ar_tb_interrupt)
+ elem = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos22_state::adillor_trackball_interrupt),this));
}
static MACHINE_CONFIG_DERIVED( adillor, namcos22s )
diff --git a/src/mame/drivers/namcos23.cpp b/src/mame/drivers/namcos23.cpp
index 5bdda44220d..8b6a602b2df 100644
--- a/src/mame/drivers/namcos23.cpp
+++ b/src/mame/drivers/namcos23.cpp
@@ -3523,7 +3523,7 @@ static const gfx_layout namcos23_cg_layout =
}; /* cg_layout */
static GFXDECODE_START( namcos23 )
- GFXDECODE_ENTRY( NULL, 0, namcos23_cg_layout, 0, 0x800 )
+ GFXDECODE_ENTRY( nullptr, 0, namcos23_cg_layout, 0, 0x800 )
GFXDECODE_END
diff --git a/src/mame/drivers/namcos86.cpp b/src/mame/drivers/namcos86.cpp
index 40d9da3d67b..df44c853ff2 100644
--- a/src/mame/drivers/namcos86.cpp
+++ b/src/mame/drivers/namcos86.cpp
@@ -194,7 +194,7 @@ WRITE8_MEMBER(namcos86_state::bankswitch1_ext_w)
{
UINT8 *base = memregion("user1")->base();
- if (base == 0) return;
+ if (base == nullptr) return;
membank("bank1")->set_entry(data & 0x1f);
}
@@ -1232,11 +1232,11 @@ ROM_START( hopmappy )
ROM_REGION( 0x06000, "gfx1", 0 )
ROM_LOAD( "hm1_6.7r", 0x00000, 0x04000, CRC(fd0e8887) SHA1(b76737d22bb1c1ae4d700ea6796e8d91f6ffa275) ) /* plane 1,2 */
- ROM_FILL( 0x04000, 0x02000, 0 ) /* no plane 3 */
+ ROM_FILL( 0x04000, 0x02000, nullptr ) /* no plane 3 */
ROM_REGION( 0x06000, "gfx2", 0 )
ROM_LOAD( "hm1_5.4r", 0x00000, 0x04000, CRC(9c4f31ae) SHA1(1c7072355d6f98b8e8554da19eab0512fdd9e2e1) ) /* plane 1,2 */
- ROM_FILL( 0x04000, 0x02000, 0 ) /* no plane 3 */
+ ROM_FILL( 0x04000, 0x02000, nullptr ) /* no plane 3 */
ROM_REGION( 0x40000, "gfx3", 0 )
ROM_LOAD( "hm1_4.12h", 0x00000, 0x8000, CRC(78719c52) SHA1(06d7bb9f29ccdbf563b3bf13c0290510b26e186f) )
diff --git a/src/mame/drivers/nanos.cpp b/src/mame/drivers/nanos.cpp
index 6552b696a98..4497418a6de 100644
--- a/src/mame/drivers/nanos.cpp
+++ b/src/mame/drivers/nanos.cpp
@@ -140,7 +140,7 @@ static const z80_daisy_config nanos_daisy_chain[] =
{ "z80ctc_0" },
{ "z80sio_1" },
{ "z80ctc_1" },
- { NULL }
+ { nullptr }
};
static ADDRESS_MAP_START( nanos_io , AS_IO, 8, nanos_state)
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index 61a1fd02870..62ed9cabc61 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -2689,7 +2689,7 @@ MACHINE_CONFIG_START( naomi_aw_base, naomi_state )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( naomi_base, naomi_aw_base )
- MCFG_MIE_ADD("mie", XTAL_32MHz/2, "maple_dc", 0, 0, 0, 0, ":MIE.3", 0, ":MIE.5", 0, 0) // Actual frequency unknown, most likely 1/2 of 32MHz XTAL or even 2/3 (yes, 21MHz Z80 core)
+ MCFG_MIE_ADD("mie", XTAL_32MHz/2, "maple_dc", 0, nullptr, nullptr, nullptr, ":MIE.3", nullptr, ":MIE.5", nullptr, nullptr) // Actual frequency unknown, most likely 1/2 of 32MHz XTAL or even 2/3 (yes, 21MHz Z80 core)
MCFG_SEGA_837_13551_DEVICE_ADD("837_13551", "mie", ":TILT", ":P1", ":P2", ":A0", ":A1", ":A2", ":A3", ":A4", ":A5", ":A6", ":A7", ":OUTPUT")
MCFG_EEPROM_SERIAL_93C46_8BIT_ADD("mie_eeprom")
diff --git a/src/mame/drivers/nascom1.cpp b/src/mame/drivers/nascom1.cpp
index 3ac6bc7c1d6..8580a4b78d7 100644
--- a/src/mame/drivers/nascom1.cpp
+++ b/src/mame/drivers/nascom1.cpp
@@ -219,7 +219,7 @@ DEVICE_IMAGE_LOAD_MEMBER( nascom_state, nascom1_cassette )
DEVICE_IMAGE_UNLOAD_MEMBER( nascom_state, nascom1_cassette )
{
- m_tape_image = NULL;
+ m_tape_image = nullptr;
m_tape_size = m_tape_index = 0;
}
@@ -261,7 +261,7 @@ SNAPSHOT_LOAD_MEMBER( nascom_state, nascom1 )
int nascom2_state::load_cart(device_image_interface &image, generic_slot_device *slot, int slot_id)
{
// loading directly from file
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
if (slot->length() > 0x1000)
{
@@ -291,19 +291,19 @@ int nascom2_state::load_cart(device_image_interface &image, generic_slot_device
UINT8 *region_c000 = image.get_software_region("c000");
UINT8 *region_d000 = image.get_software_region("d000");
- if (region_b000 != NULL)
+ if (region_b000 != nullptr)
{
UINT32 size = image.get_software_region_length("b000");
m_maincpu->space(AS_PROGRAM).install_rom(0xb000, 0xb000 + size - 1, region_b000);
}
- if (region_c000 != NULL)
+ if (region_c000 != nullptr)
{
UINT32 size = image.get_software_region_length("c000");
m_maincpu->space(AS_PROGRAM).install_rom(0xc000, 0xc000 + size - 1, region_c000);
}
- if (region_d000 != NULL)
+ if (region_d000 != nullptr)
{
UINT32 size = image.get_software_region_length("d000");
m_maincpu->space(AS_PROGRAM).install_rom(0xd000, 0xd000 + size - 1, region_d000);
@@ -705,10 +705,10 @@ static MACHINE_CONFIG_DERIVED_CLASS( nascom2, nascom1, nascom2_state )
// nasbus expansion bus
MCFG_NASBUS_ADD(NASBUS_TAG)
MCFG_NASBUS_RAM_DISABLE_HANDLER(WRITELINE(nascom2_state, ram_disable_w))
- MCFG_NASBUS_SLOT_ADD("nasbus1", nasbus_slot_cards, NULL)
- MCFG_NASBUS_SLOT_ADD("nasbus2", nasbus_slot_cards, NULL)
- MCFG_NASBUS_SLOT_ADD("nasbus3", nasbus_slot_cards, NULL)
- MCFG_NASBUS_SLOT_ADD("nasbus4", nasbus_slot_cards, NULL)
+ MCFG_NASBUS_SLOT_ADD("nasbus1", nasbus_slot_cards, nullptr)
+ MCFG_NASBUS_SLOT_ADD("nasbus2", nasbus_slot_cards, nullptr)
+ MCFG_NASBUS_SLOT_ADD("nasbus3", nasbus_slot_cards, nullptr)
+ MCFG_NASBUS_SLOT_ADD("nasbus4", nasbus_slot_cards, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( nascom2c, nascom2, nascom2_state )
diff --git a/src/mame/drivers/nbmj9195.cpp b/src/mame/drivers/nbmj9195.cpp
index 1c335c0bf22..c670df4dbf0 100644
--- a/src/mame/drivers/nbmj9195.cpp
+++ b/src/mame/drivers/nbmj9195.cpp
@@ -2665,13 +2665,13 @@ INPUT_PORTS_END
static const z80_daisy_config daisy_chain_main[] =
{
TMPZ84C011_DAISY_INTERNAL,
- { NULL }
+ { nullptr }
};
static const z80_daisy_config daisy_chain_sound[] =
{
TMPZ84C011_DAISY_INTERNAL,
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/nc.cpp b/src/mame/drivers/nc.cpp
index 7bf13f6d188..37901ff622d 100644
--- a/src/mame/drivers/nc.cpp
+++ b/src/mame/drivers/nc.cpp
@@ -571,7 +571,7 @@ void nc_state::nc_sound_update(int channel)
int on;
int frequency;
int period;
- beep_device *beeper_device = NULL;
+ beep_device *beeper_device = nullptr;
switch(channel)
{
@@ -1444,7 +1444,7 @@ static MACHINE_CONFIG_START( nc100, nc_state )
MCFG_RP5C01_OUT_ALARM_CB(WRITELINE(nc_state, nc100_tc8521_alarm_callback))
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cardslot", generic_plain_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("cardslot", generic_plain_slot, nullptr)
MCFG_GENERIC_LOAD(nc_state, nc_pcmcia_card)
MCFG_GENERIC_UNLOAD(nc_state, nc_pcmcia_card)
@@ -1460,7 +1460,7 @@ MACHINE_CONFIG_END
static const floppy_format_type ibmpc_floppy_formats[] = {
FLOPPY_PC_FORMAT,
FLOPPY_MFI_FORMAT,
- NULL
+ nullptr
};
static SLOT_INTERFACE_START( ibmpc_floppies )
diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp
index a8a0c4bf327..b58f3dfaaa0 100644
--- a/src/mame/drivers/nemesis.cpp
+++ b/src/mame/drivers/nemesis.cpp
@@ -246,7 +246,7 @@ READ8_MEMBER(nemesis_state::nemesis_portA_r)
res |= 0xd0;
- if (m_vlm != NULL && m_vlm->bsy())
+ if (m_vlm != nullptr && m_vlm->bsy())
res |= 0x20;
return res;
@@ -1450,7 +1450,7 @@ void nemesis_state::machine_start()
save_item(NAME(m_irq_port_last));
/* gx400 voice data is not in a ROM but in sound RAM at $8000 */
- if (m_vlm != NULL && memregion("vlm")->bytes() == 0x800)
+ if (m_vlm != nullptr && memregion("vlm")->bytes() == 0x800)
m_vlm->set_rom(m_voiceram);
}
diff --git a/src/mame/drivers/neogeo.cpp b/src/mame/drivers/neogeo.cpp
index 0e9813edbb4..891ca4dfca8 100644
--- a/src/mame/drivers/neogeo.cpp
+++ b/src/mame/drivers/neogeo.cpp
@@ -1485,12 +1485,12 @@ static MACHINE_CONFIG_DERIVED( mvs, neogeo_arcade )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(main_map_slot)
- MCFG_NEOGEO_CARTRIDGE_ADD("cartslot1", neogeo_cart, NULL)
- MCFG_NEOGEO_CARTRIDGE_ADD("cartslot2", neogeo_cart, NULL)
- MCFG_NEOGEO_CARTRIDGE_ADD("cartslot3", neogeo_cart, NULL)
- MCFG_NEOGEO_CARTRIDGE_ADD("cartslot4", neogeo_cart, NULL)
- MCFG_NEOGEO_CARTRIDGE_ADD("cartslot5", neogeo_cart, NULL)
- MCFG_NEOGEO_CARTRIDGE_ADD("cartslot6", neogeo_cart, NULL)
+ MCFG_NEOGEO_CARTRIDGE_ADD("cartslot1", neogeo_cart, nullptr)
+ MCFG_NEOGEO_CARTRIDGE_ADD("cartslot2", neogeo_cart, nullptr)
+ MCFG_NEOGEO_CARTRIDGE_ADD("cartslot3", neogeo_cart, nullptr)
+ MCFG_NEOGEO_CARTRIDGE_ADD("cartslot4", neogeo_cart, nullptr)
+ MCFG_NEOGEO_CARTRIDGE_ADD("cartslot5", neogeo_cart, nullptr)
+ MCFG_NEOGEO_CARTRIDGE_ADD("cartslot6", neogeo_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","neogeo")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/neogeo_noslot.cpp b/src/mame/drivers/neogeo_noslot.cpp
index aac77ba8640..b3436446beb 100644
--- a/src/mame/drivers/neogeo_noslot.cpp
+++ b/src/mame/drivers/neogeo_noslot.cpp
@@ -222,7 +222,7 @@ static INPUT_PORTS_START( kizuna4p )
PORT_DIPNAME( 0x0002, 0x0000, DEF_STR( Players ) ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x0002, "2" )
PORT_DIPSETTING( 0x0000, "4" )
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, kizuna4p_controller_r, (void *)0)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, kizuna4p_controller_r, (void *)nullptr)
PORT_MODIFY("P2")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state, kizuna4p_controller_r, (void *)1)
@@ -282,7 +282,7 @@ static INPUT_PORTS_START( irrmaze )
PORT_INCLUDE( neogeo )
PORT_MODIFY("P1/DSW")
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)0)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)nullptr)
PORT_MODIFY("P2")
PORT_BIT( 0x0fff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -307,7 +307,7 @@ static INPUT_PORTS_START( popbounc )
PORT_INCLUDE( neogeo )
PORT_MODIFY("P1/DSW")
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)0)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)nullptr)
PORT_MODIFY("P2")
PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_state,multiplexed_controller_r, (void *)1)
@@ -2935,7 +2935,7 @@ ROM_START( zupapa ) /* Original Version - Encrypted GFX */ /* MVS ONLY RELEASE *
/* The Encrypted Boards do _not_ have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -5792,7 +5792,7 @@ ROM_START( kof99 ) /* Original Version - Encrypted Code & GFX */ /* MVS VERSION
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -5828,7 +5828,7 @@ ROM_START( kof99h ) /* Original Version - Encrypted Code & GFX */ /* AES VERSION
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -5867,7 +5867,7 @@ ROM_START( kof99e ) /* Original Version - Encrypted Code & GFX */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -5902,7 +5902,7 @@ ROM_START( kof99k ) /* Original Version - Encrypted GFX */ /* KOREAN VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -5974,7 +5974,7 @@ ROM_START( ganryu ) /* Original Version - Encrypted GFX */ /* MVS ONLY RELEASE *
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6011,7 +6011,7 @@ ROM_START( garou ) /* Original Version - Encrypted GFX */ /* MVS VERSION - later
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6047,7 +6047,7 @@ ROM_START( garouh ) /* Original Version - Encrypted GFX */ /* MVS AND AES VERSIO
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6116,7 +6116,7 @@ ROM_START( s1945p ) /* Original Version, Encrypted GFX Roms */ /* MVS ONLY RELEA
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6156,7 +6156,7 @@ ROM_START( preisle2 ) /* Original Version, Encrypted GFX */ /* MVS ONLY RELEASE
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6200,7 +6200,7 @@ ROM_START( mslug3 ) /* Original Version - Encrypted Code & GFX */ /* revision 20
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6237,7 +6237,7 @@ ROM_START( mslug3h ) /* Original Version - Encrypted GFX */ /* revision 2000.3.1
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6284,7 +6284,7 @@ ROM_START( kof2000 ) /* Original Version, Encrypted Code + Sound + GFX Roms */ /
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6319,7 +6319,7 @@ ROM_START( kof2000n ) /* Original Version, Encrypted Sound + GFX Roms */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6365,7 +6365,7 @@ ROM_START( bangbead ) /* Original Version - Encrypted GFX */ /* MVS ONLY RELEASE
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6397,7 +6397,7 @@ ROM_START( nitd ) /* Original Version - Encrypted GFX */ /* MVS ONLY RELEASE */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6431,7 +6431,7 @@ ROM_START( sengoku3 ) /* Original Version - Encrypted GFX */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6471,7 +6471,7 @@ ROM_START( kof2001 ) /* MVS VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6507,7 +6507,7 @@ ROM_START( kof2001h ) /* AES VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6554,7 +6554,7 @@ ROM_START( mslug4 ) /* Original Version - Encrypted GFX */ /* MVS VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6587,7 +6587,7 @@ ROM_START( mslug4h ) /* Original Version - Encrypted GFX */ /* AES VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6628,7 +6628,7 @@ ROM_START( rotd ) /* Encrypted Set */ /* MVS VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6671,7 +6671,7 @@ ROM_START( kof2002 ) /* Encrypted Set */ /* MVS AND AES VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6714,7 +6714,7 @@ ROM_START( matrim ) /* Encrypted Set */ /* MVS AND AES VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6755,7 +6755,7 @@ ROM_START( pnyaa ) /* Encrypted Set */ /* MVS ONLY RELEASE */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6791,7 +6791,7 @@ ROM_START( mslug5 ) /* Encrypted Set */ /* MVS VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6827,7 +6827,7 @@ ROM_START( mslug5h ) /* Encrypted Set */ /* AES release of the game but is also
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6870,7 +6870,7 @@ ROM_START( svc ) /* Encrypted Set */ /* MVS AND AES VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6911,7 +6911,7 @@ ROM_START( samsho5 ) /* Encrypted Set */ /* MVS VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6946,7 +6946,7 @@ ROM_START( samsho5h ) /* Encrypted Set, Alternate Set */ /* AES VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -6990,7 +6990,7 @@ ROM_START( kof2003 ) /* Encrypted Code + Sound + GFX Roms */ /* MVS VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7027,7 +7027,7 @@ ROM_START( kof2003h ) /* Encrypted Code + Sound + GFX Roms */ /* AES VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7070,7 +7070,7 @@ ROM_START( samsh5sp ) /* Encrypted Set */ /* MVS VERSION */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7118,7 +7118,7 @@ ROM_START( samsh5sph ) /* Encrypted Set */ /* AES VERSION, 2nd bugfix release */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7154,7 +7154,7 @@ ROM_START( samsh5spho ) /* Encrypted Set */ /* AES VERSION, 1st release */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7204,7 +7204,7 @@ ROM_START( jockeygp ) /* MVS ONLY RELEASE */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7232,7 +7232,7 @@ ROM_START( jockeygpa ) /* MVS ONLY RELEASE */
/* The Encrypted Boards do not have an s1 rom, data for it comes from the Cx ROMs */
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7354,7 +7354,7 @@ ROM_START( ms5pcb ) /* Encrypted Set */
ROM_LOAD32_WORD_SWAP( "268-p2r.p2", 0x000002, 0x400000, CRC(fbf6b61e) SHA1(9ec743d5988b5e3183f37f8edf45c72a8c0c893e) )
ROM_REGION( 0x20000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x20000, 0 )
+ ROM_FILL( 0x000000, 0x20000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7396,7 +7396,7 @@ ROM_START( svcpcb ) /* Encrypted Set, JAMMA PCB */
ROM_LOAD16_WORD_SWAP( "269-p1.p1", 0x000000, 0x2000000, CRC(432cfdfc) SHA1(19b40d32188a8bace6d2d570c6cf3d2f1e31e379) )
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7435,7 +7435,7 @@ ROM_START( svcpcba ) /* Encrypted Set, JAMMA PCB */
ROM_LOAD32_WORD_SWAP( "269-p2a.p1", 0x000002, 0x400000, CRC(6d13797c) SHA1(3cb71a95cea6b006b44cac0f547df88aec0007b7) )
ROM_REGION( 0x80000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -7475,7 +7475,7 @@ ROM_START( kf2k3pcb ) /* Encrypted Set, JAMMA PCB */
ROM_LOAD16_WORD_SWAP( "271-p3.p3", 0x800000, 0x100000, CRC(5cefd0d2) SHA1(cddc3164629fed4b6f715e12b109ad35d1009355) )
ROM_REGION( 0x100000, "fixed", 0 ) /* larger char set */
- ROM_FILL( 0x000000, 0x100000, 0 )
+ ROM_FILL( 0x000000, 0x100000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -8017,7 +8017,7 @@ ROM_START( kof10th )
ROM_Y_ZOOM
ROM_REGION( 0x40000, "fixed", 0 ) // modified
- ROM_FILL( 0x000000, 0x40000, 0 ) // modified
+ ROM_FILL( 0x000000, 0x40000, nullptr ) // modified
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -8153,7 +8153,7 @@ ROM_START( matrimbl )
ROM_Y_ZOOM
ROM_REGION( 0x80000, "fixed", 0 )
- ROM_FILL( 0x000000, 0x80000, 0 )
+ ROM_FILL( 0x000000, 0x80000, nullptr )
ROM_REGION( 0x20000, "fixedbios", 0 )
ROM_LOAD( "sfix.sfix", 0x000000, 0x20000, CRC(c2ea0cfd) SHA1(fd4a618cdcdbf849374f0a50dd8efe9dbab706c3) )
@@ -8257,7 +8257,7 @@ ROM_START( svcboot )
ROM_REGION( 0x50000, "audiocpu", 0 )
ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
ROM_CONTINUE( 0x00000, 0x10000 )
- ROM_COPY( "audiocpu", 0x00000, 0x10000, 0x10000 )
+ ROM_COPY( "audiocpu", nullptr, 0x10000, 0x10000 )
ROM_Y_ZOOM
@@ -8296,7 +8296,7 @@ ROM_START( svcplus )
ROM_REGION( 0x50000, "audiocpu", 0 )
ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
ROM_CONTINUE( 0x00000, 0x10000 )
- ROM_COPY( "audiocpu", 0x00000, 0x10000, 0x10000 )
+ ROM_COPY( "audiocpu", nullptr, 0x10000, 0x10000 )
ROM_REGION( 0x1000000, "ymsnd", 0 )
ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
@@ -8336,7 +8336,7 @@ ROM_START( svcplusa )
ROM_REGION( 0x50000, "audiocpu", 0 )
ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
ROM_CONTINUE( 0x00000, 0x10000 )
- ROM_COPY( "audiocpu", 0x00000, 0x10000, 0x10000 )
+ ROM_COPY( "audiocpu", nullptr, 0x10000, 0x10000 )
ROM_Y_ZOOM
@@ -8374,7 +8374,7 @@ ROM_START( svcsplus )
ROM_REGION( 0x50000, "audiocpu", 0 )
ROM_LOAD( "svc-m1.bin", 0x20000, 0x10000, CRC(804328c3) SHA1(f931636c563b0789d4812033a77b47bf663db43f) )
ROM_CONTINUE( 0x00000, 0x10000 )
- ROM_COPY( "audiocpu", 0x00000, 0x10000, 0x10000 )
+ ROM_COPY( "audiocpu", nullptr, 0x10000, 0x10000 )
ROM_REGION( 0x1000000, "ymsnd", 0 )
ROM_LOAD16_WORD_SWAP( "svc-v2.bin", 0x000000, 0x400000, CRC(b5097287) SHA1(3ba3a9b5624879616382ed40337a3d9c50a0f314) )
diff --git a/src/mame/drivers/nes.cpp b/src/mame/drivers/nes.cpp
index 3e6fcaaa880..96292db4b15 100644
--- a/src/mame/drivers/nes.cpp
+++ b/src/mame/drivers/nes.cpp
@@ -99,7 +99,7 @@ static MACHINE_CONFIG_START( nes, nes_state )
MCFG_NES_CONTROL_PORT_ADD("ctrl2", nes_control_port2_devices, "joypad")
MCFG_NESCTRL_BRIGHTPIXEL_CB(nes_state, bright_pixel)
- MCFG_NES_CARTRIDGE_ADD("nes_slot", nes_cart, NULL)
+ MCFG_NES_CARTRIDGE_ADD("nes_slot", nes_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list", "nes")
MCFG_SOFTWARE_LIST_ADD("ade_list", "nes_ade") // Camerica/Codemasters Aladdin Deck Enhancer mini-carts
MCFG_SOFTWARE_LIST_ADD("ntb_list", "nes_ntbrom") // Sunsoft Nantettate! Baseball mini-carts
@@ -158,7 +158,7 @@ static MACHINE_CONFIG_DERIVED( famicom, nes )
MCFG_DEVICE_REMOVE("ctrl2")
MCFG_NES_CONTROL_PORT_ADD("ctrl1", fc_control_port1_devices, "joypad")
MCFG_NES_CONTROL_PORT_ADD("ctrl2", fc_control_port2_devices, "joypad")
- MCFG_FC_EXPANSION_PORT_ADD("exp", fc_expansion_devices, NULL)
+ MCFG_FC_EXPANSION_PORT_ADD("exp", fc_expansion_devices, nullptr)
MCFG_NESCTRL_BRIGHTPIXEL_CB(nes_state, bright_pixel)
MCFG_SOFTWARE_LIST_ADD("flop_list", "famicom_flop")
diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp
index 0193b80f67c..26c29072d18 100644
--- a/src/mame/drivers/next.cpp
+++ b/src/mame/drivers/next.cpp
@@ -272,10 +272,10 @@ void next_state::irq_check()
}
const char *next_state::dma_targets[0x20] = {
- 0, "scsi", 0, 0, "soundout", "disk", 0, 0,
- "soundin", "printer", 0, 0, "scc", "dsp", 0, 0,
- "s-enetx", "enetx", 0, 0, "s-enetr", "enetr", 0, 0,
- "video", 0, 0, 0, "r2m", "m2r", 0, 0
+ nullptr, "scsi", nullptr, nullptr, "soundout", "disk", nullptr, nullptr,
+ "soundin", "printer", nullptr, nullptr, "scc", "dsp", nullptr, nullptr,
+ "s-enetx", "enetx", nullptr, nullptr, "s-enetr", "enetr", nullptr, nullptr,
+ "video", nullptr, nullptr, nullptr, "r2m", "m2r", nullptr, nullptr
};
const int next_state::dma_irqs[0x20] = {
@@ -1035,11 +1035,11 @@ static MACHINE_CONFIG_START( next_base, next_state )
MCFG_NEXTKBD_INT_NMI_CALLBACK(WRITELINE(next_state, nmi_irq))
MCFG_NSCSI_ADD("scsibus:0", next_scsi_devices, "harddisk", false)
MCFG_NSCSI_ADD("scsibus:1", next_scsi_devices, "cdrom", false)
- MCFG_NSCSI_ADD("scsibus:2", next_scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:3", next_scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:4", next_scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:5", next_scsi_devices, 0, false)
- MCFG_NSCSI_ADD("scsibus:6", next_scsi_devices, 0, false)
+ MCFG_NSCSI_ADD("scsibus:2", next_scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:3", next_scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:4", next_scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:5", next_scsi_devices, nullptr, false)
+ MCFG_NSCSI_ADD("scsibus:6", next_scsi_devices, nullptr, false)
MCFG_NSCSI_ADD("scsibus:7", next_scsi_devices, "ncr5390", true)
MCFG_DEVICE_CARD_MACHINE_CONFIG("ncr5390", ncr5390)
diff --git a/src/mame/drivers/ng_aes.cpp b/src/mame/drivers/ng_aes.cpp
index 0de3a9567f3..97666db8c81 100644
--- a/src/mame/drivers/ng_aes.cpp
+++ b/src/mame/drivers/ng_aes.cpp
@@ -740,7 +740,7 @@ void ng_aes_state::NeoCDDoDMA(address_space& curr_space)
// - DMA controller program[14] -> 0xFFFE (PC: 0xC0A1A0)
char* data = m_tempcdc->LC8915InitTransfer(NeoCDDMACount);
- if (data == NULL) {
+ if (data == nullptr) {
break;
}
@@ -838,7 +838,7 @@ if (NeoCDDMAAddress2 == 0x0800) {
// - DMA controller program[14] -> 0xDA92 (PC: 0xC0A1A0)
char* data = m_tempcdc->LC8915InitTransfer(NeoCDDMACount);
- if (data == NULL) {
+ if (data == nullptr) {
break;
}
@@ -1399,7 +1399,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( aes, neogeo_base, ng_aes_state )
MCFG_MACHINE_START_OVERRIDE(ng_aes_state, neogeo)
MCFG_MACHINE_RESET_OVERRIDE(ng_aes_state, neogeo)
- MCFG_NEOGEO_CARTRIDGE_ADD("cartslot1", neogeo_cart, NULL)
+ MCFG_NEOGEO_CARTRIDGE_ADD("cartslot1", neogeo_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","neogeo")
MCFG_SOFTWARE_LIST_FILTER("cart_list","AES")
diff --git a/src/mame/drivers/ngen.cpp b/src/mame/drivers/ngen.cpp
index 29f492e5f30..a0f9e2419d5 100644
--- a/src/mame/drivers/ngen.cpp
+++ b/src/mame/drivers/ngen.cpp
@@ -833,7 +833,7 @@ void ngen_state::machine_start()
memory_share* vidshare = memshare("vram");
memory_share* fontshare = memshare("fontram");
m_hd_buffer.allocate(1024*8); // 8kB buffer RAM for HD controller
- if(vidshare == NULL || fontshare == NULL)
+ if(vidshare == nullptr || fontshare == nullptr)
fatalerror("Error: VRAM not found");
m_vram.set(*vidshare,2);
m_fontram.set(*fontshare,2);
@@ -955,13 +955,13 @@ static MACHINE_CONFIG_START( ngen, ngen_state )
MCFG_Z80DART_OUT_RTSA_CB(DEVWRITELINE("rs232_a", rs232_port_device, write_rts))
MCFG_Z80DART_OUT_RTSB_CB(DEVWRITELINE("rs232_b", rs232_port_device, write_rts))
- MCFG_RS232_PORT_ADD("rs232_a", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_a", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("iouart", upd7201_device, rxa_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("iouart", upd7201_device, ctsa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("iouart", upd7201_device, dcda_w))
MCFG_RS232_RI_HANDLER(DEVWRITELINE("iouart", upd7201_device, ria_w))
- MCFG_RS232_PORT_ADD("rs232_b", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_b", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("iouart", upd7201_device, rxb_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("iouart", upd7201_device, ctsb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("iouart", upd7201_device, dcdb_w))
@@ -976,7 +976,7 @@ static MACHINE_CONFIG_START( ngen, ngen_state )
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_UPDATE_DEVICE("crtc",mc6845_device, screen_update)
- MCFG_MC6845_ADD("crtc", MC6845, NULL, 19980000 / 9) // divisor unknown -- /9 gives 60Hz output, so likely correct
+ MCFG_MC6845_ADD("crtc", MC6845, nullptr, 19980000 / 9) // divisor unknown -- /9 gives 60Hz output, so likely correct
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(9)
MCFG_MC6845_UPDATE_ROW_CB(ngen_state, crtc_update_row)
@@ -1065,13 +1065,13 @@ static MACHINE_CONFIG_START( ngen386, ngen386_state )
MCFG_Z80DART_OUT_RTSA_CB(DEVWRITELINE("rs232_a", rs232_port_device, write_rts))
MCFG_Z80DART_OUT_RTSB_CB(DEVWRITELINE("rs232_b", rs232_port_device, write_rts))
- MCFG_RS232_PORT_ADD("rs232_a", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_a", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("iouart", upd7201_device, rxa_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("iouart", upd7201_device, ctsa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("iouart", upd7201_device, dcda_w))
MCFG_RS232_RI_HANDLER(DEVWRITELINE("iouart", upd7201_device, ria_w))
- MCFG_RS232_PORT_ADD("rs232_b", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_b", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("iouart", upd7201_device, rxb_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("iouart", upd7201_device, ctsb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("iouart", upd7201_device, dcdb_w))
@@ -1086,7 +1086,7 @@ static MACHINE_CONFIG_START( ngen386, ngen386_state )
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_SCREEN_UPDATE_DEVICE("crtc",mc6845_device, screen_update)
- MCFG_MC6845_ADD("crtc", MC6845, NULL, 19980000 / 9) // divisor unknown -- /9 gives 60Hz output, so likely correct
+ MCFG_MC6845_ADD("crtc", MC6845, nullptr, 19980000 / 9) // divisor unknown -- /9 gives 60Hz output, so likely correct
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(9)
MCFG_MC6845_UPDATE_ROW_CB(ngen_state, crtc_update_row)
diff --git a/src/mame/drivers/ngp.cpp b/src/mame/drivers/ngp.cpp
index 98dcfd0f76e..9341deba7f8 100644
--- a/src/mame/drivers/ngp.cpp
+++ b/src/mame/drivers/ngp.cpp
@@ -143,11 +143,11 @@ public:
{
m_flash_chip[0].present = 0;
m_flash_chip[0].state = F_READ;
- m_flash_chip[0].data = NULL;
+ m_flash_chip[0].data = nullptr;
m_flash_chip[1].present = 0;
m_flash_chip[1].state = F_READ;
- m_flash_chip[1].data = NULL;
+ m_flash_chip[1].data = nullptr;
m_nvram_loaded = false;
}
diff --git a/src/mame/drivers/nightgal.cpp b/src/mame/drivers/nightgal.cpp
index 32cb1d6a949..59b051ec6bb 100644
--- a/src/mame/drivers/nightgal.cpp
+++ b/src/mame/drivers/nightgal.cpp
@@ -314,7 +314,7 @@ PALETTE_INIT_MEMBER(nightgal_state, nightgal)
compute_resistor_weights(0, 255, -1.0,
3, resistances_rg, weights_rg, 0, 0,
2, resistances_b, weights_b, 0, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
for (i = 0; i < palette.entries(); i++)
{
diff --git a/src/mame/drivers/ninjaw.cpp b/src/mame/drivers/ninjaw.cpp
index f42371ed561..463c7721226 100644
--- a/src/mame/drivers/ninjaw.cpp
+++ b/src/mame/drivers/ninjaw.cpp
@@ -379,7 +379,7 @@ READ16_MEMBER(ninjaw_state::sound_r)
WRITE8_MEMBER(ninjaw_state::pancontrol_w)
{
- filter_volume_device *flt = NULL;
+ filter_volume_device *flt = nullptr;
offset &= 3;
switch (offset)
@@ -997,7 +997,7 @@ ROM_START( ninjaw )
ROM_LOAD( "b31-04.173", 0x180000, 0x80000, CRC(2e1e4cb5) SHA1(4733cfc015a68e021108a9e1e8ea807b0e7eac7a) )
ROM_REGION( 0x100000, "gfx3", 0 )
- ROM_COPY( "gfx1", 0x000000, 0x000000, 0x100000 ) /* SCR (screens 2+) */
+ ROM_COPY( "gfx1", nullptr, 0x000000, 0x100000 ) /* SCR (screens 2+) */
/* The actual board duplicates the SCR gfx roms for 2nd/3rd TC0100SCN */
// ROM_LOAD( "b31-01.26", 0x00000, 0x80000, CRC(8e8237a7) SHA1(3e181a153d9b4b7f6a620614ea9022285583a5b5) ) /* SCR (screen 2) */
@@ -1052,7 +1052,7 @@ ROM_START( ninjawu )
ROM_LOAD( "b31-04.173", 0x180000, 0x80000, CRC(2e1e4cb5) SHA1(4733cfc015a68e021108a9e1e8ea807b0e7eac7a) )
ROM_REGION( 0x100000, "gfx3", 0 )
- ROM_COPY( "gfx1", 0x000000, 0x000000, 0x100000 ) /* SCR (screens 2+) */
+ ROM_COPY( "gfx1", nullptr, 0x000000, 0x100000 ) /* SCR (screens 2+) */
/* The actual board duplicates the SCR gfx roms for 2nd/3rd TC0100SCN */
// ROM_LOAD( "b31-01.26", 0x00000, 0x80000, CRC(8e8237a7) SHA1(3e181a153d9b4b7f6a620614ea9022285583a5b5) ) /* SCR (screen 2) */
@@ -1107,7 +1107,7 @@ ROM_START( ninjawj )
ROM_LOAD( "b31-04.173", 0x180000, 0x80000, CRC(2e1e4cb5) SHA1(4733cfc015a68e021108a9e1e8ea807b0e7eac7a) )
ROM_REGION( 0x100000, "gfx3", 0 )
- ROM_COPY( "gfx1", 0x000000, 0x000000, 0x100000 ) /* SCR (screens 2+) */
+ ROM_COPY( "gfx1", nullptr, 0x000000, 0x100000 ) /* SCR (screens 2+) */
/* The actual board duplicates the SCR gfx roms for 2nd/3rd TC0100SCN */
// ROM_LOAD( "b31-01.26", 0x00000, 0x80000, CRC(8e8237a7) SHA1(3e181a153d9b4b7f6a620614ea9022285583a5b5) ) /* SCR (screen 2) */
@@ -1160,7 +1160,7 @@ ROM_START( darius2 )
ROM_LOAD( "c07-02", 0x80000, 0x80000, CRC(75d16d4b) SHA1(795423278b66eca41accce1f8a4425d65af7b629) )
ROM_REGION( 0x100000, "gfx3", 0 )
- ROM_COPY( "gfx1", 0x000000, 0x000000, 0x100000 ) /* SCR (screens 2+) */
+ ROM_COPY( "gfx1", nullptr, 0x000000, 0x100000 ) /* SCR (screens 2+) */
ROM_REGION( 0x100000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "c07-10.95", 0x00000, 0x80000, CRC(4bbe0ed9) SHA1(081b73c4e4d4fa548445e5548573099bcb1e9213) )
diff --git a/src/mame/drivers/niyanpai.cpp b/src/mame/drivers/niyanpai.cpp
index ef411c20158..81bbe457dcc 100644
--- a/src/mame/drivers/niyanpai.cpp
+++ b/src/mame/drivers/niyanpai.cpp
@@ -725,7 +725,7 @@ INTERRUPT_GEN_MEMBER(niyanpai_state::interrupt)
static const z80_daisy_config daisy_chain_sound[] =
{
TMPZ84C011_DAISY_INTERNAL,
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_START( niyanpai, niyanpai_state )
diff --git a/src/mame/drivers/nmk16.cpp b/src/mame/drivers/nmk16.cpp
index 517d912d6ac..b6fb64db249 100644
--- a/src/mame/drivers/nmk16.cpp
+++ b/src/mame/drivers/nmk16.cpp
@@ -5551,7 +5551,7 @@ ROM_START( mustangb )
ROM_REGION(0x20000, "audiocpu", 0 ) /* 64k for sound cpu code */
ROM_LOAD( "mustang.16", 0x00000, 0x8000, CRC(99ee7505) SHA1(b97c8ee5e26e8554b5de506fba3b32cc2fde53c9) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "fgtile", 0 )
ROM_LOAD( "90058-1", 0x00000, 0x20000, CRC(81ccfcad) SHA1(70a0f769c0d4588f6f17bd52cc86a745f30e9f00) )
@@ -5575,7 +5575,7 @@ ROM_START( mustangb2 )
ROM_REGION(0x20000, "audiocpu", 0 ) /* 64k for sound cpu code */
ROM_LOAD( "01.bin", 0x00000, 0x8000, CRC(90820499) SHA1(ddd43373eb1891a05159085b52bf74760824e5aa) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "fgtile", 0 )
ROM_LOAD( "06.bin", 0x00000, 0x20000, CRC(81ccfcad) SHA1(70a0f769c0d4588f6f17bd52cc86a745f30e9f00) )
@@ -5882,7 +5882,7 @@ ROM_START( tdragonb )
ROM_REGION(0x20000, "audiocpu", 0 ) /* 64k for sound cpu code */
ROM_LOAD( "td_02.bin", 0x00000, 0x8000, CRC(99ee7505) SHA1(b97c8ee5e26e8554b5de506fba3b32cc2fde53c9) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "fgtile", 0 )
ROM_LOAD( "td_08.bin", 0x000000, 0x20000, CRC(5144dc69) SHA1(e64d88dc0e7672f811868621f74ec209aeafbc6f) ) /* 8x8 tiles */
@@ -6687,7 +6687,7 @@ ROM_START( atombjt ) // based off bjtwina set
ROM_LOAD32_BYTE( "26.u45", 0x000000, 0x80000, CRC(6cc4e817) SHA1(70f2ab50e228a029d3157c94fe0a79e7aad010bd) )
ROM_REGION( 0x100000, "fgtile", 0 )
- ROM_COPY( "gfxtemp", 0x000000, 0x00000, 0x100000 )
+ ROM_COPY( "gfxtemp", nullptr, 0x00000, 0x100000 )
ROM_REGION( 0x100000, "bgtile", 0 )
ROM_COPY( "gfxtemp", 0x100000, 0x00000, 0x100000 )
diff --git a/src/mame/drivers/ob68k1a.cpp b/src/mame/drivers/ob68k1a.cpp
index e28b6234825..389a9e7f409 100644
--- a/src/mame/drivers/ob68k1a.cpp
+++ b/src/mame/drivers/ob68k1a.cpp
@@ -241,7 +241,7 @@ static MACHINE_CONFIG_START( ob68k1a, ob68k1a_state )
MCFG_ACIA6850_TXD_HANDLER(DEVWRITELINE(RS232_B_TAG, rs232_port_device, write_txd))
MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE(RS232_B_TAG, rs232_port_device, write_rts))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(MC6850_1_TAG, acia6850_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(MC6850_1_TAG, acia6850_device, write_dcd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(MC6850_1_TAG, acia6850_device, write_cts))
diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp
index f7b945fecbd..a87c565057e 100644
--- a/src/mame/drivers/odyssey2.cpp
+++ b/src/mame/drivers/odyssey2.cpp
@@ -665,7 +665,7 @@ GFXDECODE_END
static MACHINE_CONFIG_FRAGMENT( odyssey2_cartslot )
- MCFG_O2_CARTRIDGE_ADD("cartslot", o2_cart, NULL)
+ MCFG_O2_CARTRIDGE_ADD("cartslot", o2_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","odyssey2")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/oric.cpp b/src/mame/drivers/oric.cpp
index 5748b412c0b..29bbebe9c55 100644
--- a/src/mame/drivers/oric.cpp
+++ b/src/mame/drivers/oric.cpp
@@ -808,7 +808,7 @@ static MACHINE_CONFIG_START( oric, oric_state )
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(oric_state, via_irq_w))
/* extension port */
- MCFG_ORICEXT_ADD( "ext", oricext_intf, NULL, "maincpu", WRITELINE(oric_state, ext_irq_w))
+ MCFG_ORICEXT_ADD( "ext", oricext_intf, nullptr, "maincpu", WRITELINE(oric_state, ext_irq_w))
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( prav8d, oric )
@@ -847,9 +847,9 @@ static MACHINE_CONFIG_DERIVED_CLASS( telstrat, oric, telestrat_state )
MCFG_WD_FDC_FORCE_READY
MCFG_FLOPPY_DRIVE_ADD("fdc:0", telestrat_floppies, "3dsdd", telestrat_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", telestrat_floppies, NULL, telestrat_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:2", telestrat_floppies, NULL, telestrat_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:3", telestrat_floppies, NULL, telestrat_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:1", telestrat_floppies, nullptr, telestrat_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:2", telestrat_floppies, nullptr, telestrat_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:3", telestrat_floppies, nullptr, telestrat_state::floppy_formats)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/osbexec.cpp b/src/mame/drivers/osbexec.cpp
index 848cf8aaadc..35f903281e9 100644
--- a/src/mame/drivers/osbexec.cpp
+++ b/src/mame/drivers/osbexec.cpp
@@ -388,7 +388,7 @@ WRITE8_MEMBER(osbexec_state::osbexec_pia0_b_w)
m_floppy0->mon_w(0);
break;
default:
- m_mb8877->set_floppy(NULL);
+ m_mb8877->set_floppy(nullptr);
break;
}
@@ -520,7 +520,7 @@ void osbexec_state::machine_reset()
static const z80_daisy_config osbexec_daisy_config[] =
{
{ "sio" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/osborne1.cpp b/src/mame/drivers/osborne1.cpp
index 78f27c93e4c..19074acc235 100644
--- a/src/mame/drivers/osborne1.cpp
+++ b/src/mame/drivers/osborne1.cpp
@@ -278,7 +278,7 @@ static MACHINE_CONFIG_START( osborne1, osborne1_state )
MCFG_ACIA6850_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
MCFG_ACIA6850_IRQ_HANDLER(WRITELINE(osborne1_state, serial_acia_irq_func))
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia", acia6850_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("acia", acia6850_device, write_dcd))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("acia", acia6850_device, write_cts))
diff --git a/src/mame/drivers/osi.cpp b/src/mame/drivers/osi.cpp
index 01e59360901..5429460ee6f 100644
--- a/src/mame/drivers/osi.cpp
+++ b/src/mame/drivers/osi.cpp
@@ -828,7 +828,7 @@ static MACHINE_CONFIG_DERIVED_CLASS( c1pmf, c1p, c1pmf_state )
MCFG_CLOCK_SIGNAL_HANDLER(DEVWRITELINE("acia_1", acia6850_device, write_txc))
MCFG_FLOPPY_DRIVE_ADD("floppy0", osi_floppies, "ssdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("floppy1", osi_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("floppy1", osi_floppies, nullptr, floppy_image_device::default_floppy_formats)
/* internal ram */
MCFG_RAM_MODIFY(RAM_TAG)
diff --git a/src/mame/drivers/p8k.cpp b/src/mame/drivers/p8k.cpp
index c4f326f76c7..c21f5e2654c 100644
--- a/src/mame/drivers/p8k.cpp
+++ b/src/mame/drivers/p8k.cpp
@@ -262,7 +262,7 @@ static const z80_daisy_config p8k_daisy_chain[] =
{ "z80pio_0" },
{ "z80pio_1" },
{ "z80ctc_1" },
- { NULL }
+ { nullptr }
};
/* Intel 8272 Interface */
@@ -431,7 +431,7 @@ static const z80_daisy_config p8k_16_daisy_chain[] =
{ "z80pio_0" },
{ "z80pio_1" },
{ "z80pio_2" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/palm.cpp b/src/mame/drivers/palm.cpp
index 8ed4c93a6c8..4a4d900e15c 100644
--- a/src/mame/drivers/palm.cpp
+++ b/src/mame/drivers/palm.cpp
@@ -235,7 +235,7 @@ static INPUT_PORTS_START( palm )
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_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)
+ 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*)nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Up") PORT_CODE(KEYCODE_Y) PORT_CHANGED_MEMBER(DEVICE_SELF, palm_state, button_check, (void*)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Down") PORT_CODE(KEYCODE_H) PORT_CHANGED_MEMBER(DEVICE_SELF, palm_state, button_check, (void*)2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_NAME("Button 1") PORT_CODE(KEYCODE_F) PORT_CHANGED_MEMBER(DEVICE_SELF, palm_state, button_check, (void*)3)
diff --git a/src/mame/drivers/palm_dbg.inc b/src/mame/drivers/palm_dbg.inc
index d02f6117574..8c89146b955 100644
--- a/src/mame/drivers/palm_dbg.inc
+++ b/src/mame/drivers/palm_dbg.inc
@@ -1159,7 +1159,7 @@ static const char *lookup_trap(UINT16 opcode)
if (traps[i].trap == opcode)
return traps[i].name;
}
- return NULL;
+ return nullptr;
}
static offs_t palm_dasm_override(device_t &device, char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, int options)
diff --git a/src/mame/drivers/palmz22.cpp b/src/mame/drivers/palmz22.cpp
index 7228d55d288..629a47e964d 100644
--- a/src/mame/drivers/palmz22.cpp
+++ b/src/mame/drivers/palmz22.cpp
@@ -237,7 +237,7 @@ READ32_MEMBER(palmz22_state::s3c2410_adc_data_r )
INPUT_CHANGED_MEMBER(palmz22_state::palmz22_input_changed)
{
- if (param == 0)
+ if (param == nullptr)
{
m_s3c2410->s3c2410_touch_screen( (newval & 0x01) ? 1 : 0);
}
@@ -310,7 +310,7 @@ MACHINE_CONFIG_END
static INPUT_PORTS_START( palmz22 )
PORT_START( "PENB" )
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pen Button") PORT_CHANGED_MEMBER(DEVICE_SELF, palmz22_state, palmz22_input_changed, (void *)0) PORT_PLAYER(2)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Pen Button") PORT_CHANGED_MEMBER(DEVICE_SELF, palmz22_state, palmz22_input_changed, (void *)nullptr) PORT_PLAYER(2)
PORT_START( "PENX" )
PORT_BIT( 0x3ff, 0x200, IPT_LIGHTGUN_X ) PORT_NAME("Pen X") PORT_SENSITIVITY(50) PORT_CROSSHAIR(X, 1, 0, 0) PORT_KEYDELTA(30) PORT_PLAYER(2)
PORT_START( "PENY" )
diff --git a/src/mame/drivers/pasogo.cpp b/src/mame/drivers/pasogo.cpp
index b81999ff2f7..a70314143f2 100644
--- a/src/mame/drivers/pasogo.cpp
+++ b/src/mame/drivers/pasogo.cpp
@@ -527,7 +527,7 @@ void pasogo_state::machine_reset()
membank("bank27")->set_base(m_cart_rom->base());
m_ems_index = 0;
memset(m_ems_bank, 0, sizeof(m_ems_bank));
- contrast(*color->first_field(), NULL, 0, color->read());
+ contrast(*color->first_field(), nullptr, 0, color->read());
}
static MACHINE_CONFIG_START( pasogo, pasogo_state )
diff --git a/src/mame/drivers/pasopia.cpp b/src/mame/drivers/pasopia.cpp
index 03a27a2d2fb..453903266f7 100644
--- a/src/mame/drivers/pasopia.cpp
+++ b/src/mame/drivers/pasopia.cpp
@@ -275,7 +275,7 @@ static const z80_daisy_config pasopia_daisy[] =
{ "z80ctc" },
{ "z80pio" },
// { "upd765" }, /* TODO */
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/pasopia7.cpp b/src/mame/drivers/pasopia7.cpp
index 926b4401a1a..1a53241a3db 100644
--- a/src/mame/drivers/pasopia7.cpp
+++ b/src/mame/drivers/pasopia7.cpp
@@ -767,7 +767,7 @@ static const z80_daisy_config p7_daisy[] =
{ "z80ctc" },
{ "z80pio" },
// { "fdc" }, /* TODO */
- { NULL }
+ { nullptr }
};
READ8_MEMBER( pasopia7_state::crtc_portb_r )
diff --git a/src/mame/drivers/pc.cpp b/src/mame/drivers/pc.cpp
index bbbcd20487d..b6836ab5f3a 100644
--- a/src/mame/drivers/pc.cpp
+++ b/src/mame/drivers/pc.cpp
@@ -287,7 +287,7 @@ static MACHINE_CONFIG_START( siemens, pc_state )
MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, "lpt", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, "com", false)
MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, "hdc", false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, nullptr, false)
/* keyboard */
MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_IBM_PC_XT_83)
diff --git a/src/mame/drivers/pc1512.cpp b/src/mame/drivers/pc1512.cpp
index caa90c0855b..37c1212d5e8 100644
--- a/src/mame/drivers/pc1512.cpp
+++ b/src/mame/drivers/pc1512.cpp
@@ -1253,7 +1253,7 @@ static MACHINE_CONFIG_START( pc1512, pc1512_state )
MCFG_PC_FDC_INTRQ_CALLBACK(WRITELINE(pc1512_state, fdc_int_w))
MCFG_PC_FDC_DRQ_CALLBACK(WRITELINE(pc1512_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(PC_FDC_XT_TAG ":0", pc1512_floppies, "525dd", pc1512_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(PC_FDC_XT_TAG ":1", pc1512_floppies, NULL, pc1512_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(PC_FDC_XT_TAG ":1", pc1512_floppies, nullptr, pc1512_state::floppy_formats)
MCFG_DEVICE_ADD(INS8250_TAG, INS8250, XTAL_1_8432MHz)
MCFG_INS8250_OUT_TX_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
MCFG_INS8250_OUT_DTR_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_dtr))
@@ -1269,7 +1269,7 @@ static MACHINE_CONFIG_START( pc1512, pc1512_state )
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- 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(INS8250_TAG, ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_TAG, ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_TAG, ins8250_uart_device, dsr_w))
@@ -1288,9 +1288,9 @@ static MACHINE_CONFIG_START( pc1512, pc1512_state )
MCFG_ISA_OUT_DRQ1_CB(DEVWRITELINE(I8237A5_TAG, am9517a_device, dreq1_w))
MCFG_ISA_OUT_DRQ2_CB(DEVWRITELINE(I8237A5_TAG, am9517a_device, dreq2_w))
MCFG_ISA_OUT_DRQ3_CB(DEVWRITELINE(I8237A5_TAG, am9517a_device, dreq3_w))
- MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa1", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa2", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa3", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa1", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa2", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa3", pc_isa8_cards, nullptr, false)
// internal ram
MCFG_RAM_ADD(RAM_TAG)
@@ -1373,7 +1373,7 @@ static MACHINE_CONFIG_START( pc1640, pc1640_state )
MCFG_PC_FDC_INTRQ_CALLBACK(WRITELINE(pc1512_state, fdc_int_w))
MCFG_PC_FDC_DRQ_CALLBACK(WRITELINE(pc1512_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(PC_FDC_XT_TAG ":0", pc1512_floppies, "525dd", pc1512_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(PC_FDC_XT_TAG ":1", pc1512_floppies, NULL, pc1512_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(PC_FDC_XT_TAG ":1", pc1512_floppies, nullptr, pc1512_state::floppy_formats)
MCFG_DEVICE_ADD(INS8250_TAG, INS8250, XTAL_1_8432MHz)
MCFG_INS8250_OUT_TX_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_txd))
MCFG_INS8250_OUT_DTR_CB(DEVWRITELINE(RS232_TAG, rs232_port_device, write_dtr))
@@ -1390,7 +1390,7 @@ static MACHINE_CONFIG_START( pc1640, pc1640_state )
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- 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(INS8250_TAG, ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(INS8250_TAG, ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(INS8250_TAG, ins8250_uart_device, dsr_w))
@@ -1409,10 +1409,10 @@ static MACHINE_CONFIG_START( pc1640, pc1640_state )
MCFG_ISA_OUT_DRQ1_CB(DEVWRITELINE(I8237A5_TAG, am9517a_device, dreq1_w))
MCFG_ISA_OUT_DRQ2_CB(DEVWRITELINE(I8237A5_TAG, am9517a_device, dreq2_w))
MCFG_ISA_OUT_DRQ3_CB(DEVWRITELINE(I8237A5_TAG, am9517a_device, dreq3_w))
- MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa1", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa2", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa3", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa4", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa1", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa2", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa3", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa4", pc_isa8_cards, nullptr, false)
MCFG_ISA8_SLOT_ADD(ISA_BUS_TAG, "isa5", pc1640_isa8_cards, "iga", false)
// internal ram
diff --git a/src/mame/drivers/pc8401a.cpp b/src/mame/drivers/pc8401a.cpp
index 0f5ccc2a0c0..80bdf86f708 100644
--- a/src/mame/drivers/pc8401a.cpp
+++ b/src/mame/drivers/pc8401a.cpp
@@ -588,7 +588,7 @@ static MACHINE_CONFIG_START( pc8401a, pc8401a_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_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr))
@@ -596,11 +596,11 @@ static MACHINE_CONFIG_START( pc8401a, pc8401a_state )
MCFG_FRAGMENT_ADD(pc8401a_video)
/* option ROM cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
/* I/O ROM cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("io_cart", generic_linear_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("io_cart", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
/* internal ram */
@@ -630,7 +630,7 @@ static MACHINE_CONFIG_START( pc8500, pc8500_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_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_TAG, i8251_device, write_dsr))
@@ -638,11 +638,11 @@ static MACHINE_CONFIG_START( pc8500, pc8500_state )
MCFG_FRAGMENT_ADD(pc8500_video)
/* option ROM cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
/* I/O ROM cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("io_cart", generic_linear_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("io_cart", generic_linear_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
/* internal ram */
diff --git a/src/mame/drivers/pc88va.cpp b/src/mame/drivers/pc88va.cpp
index 2b49707efd3..54eb6404a89 100644
--- a/src/mame/drivers/pc88va.cpp
+++ b/src/mame/drivers/pc88va.cpp
@@ -1157,7 +1157,7 @@ WRITE8_MEMBER(pc88va_state::pc88va_fdc_w)
m_fdc_ctrl_2 = data;
- pc88va_fdc_update_ready(NULL, 0);
+ pc88va_fdc_update_ready(nullptr, 0);
break; // FDC control port 2
}
diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp
index 27913c265ba..eb0a7b49ea3 100644
--- a/src/mame/drivers/pc9801.cpp
+++ b/src/mame/drivers/pc9801.cpp
@@ -3202,7 +3202,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( pc9801_cbus )
MCFG_PC9801CBUS_SLOT_ADD("cbus0", pc9801_cbus, "pc9801_26")
- MCFG_PC9801CBUS_SLOT_ADD("cbus1", pc9801_cbus, NULL)
+ MCFG_PC9801CBUS_SLOT_ADD("cbus1", pc9801_cbus, nullptr)
// TODO: six max slots
MACHINE_CONFIG_END
@@ -3229,7 +3229,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_FRAGMENT( pc9801_ide )
- MCFG_ATA_INTERFACE_ADD("ide", ata_devices, "hdd", NULL, false)
+ MCFG_ATA_INTERFACE_ADD("ide", ata_devices, "hdd", nullptr, false)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_slave", pic8259_device, ir1_w))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/pcd.cpp b/src/mame/drivers/pcd.cpp
index a532aae7723..108409cf24b 100644
--- a/src/mame/drivers/pcd.cpp
+++ b/src/mame/drivers/pcd.cpp
@@ -42,7 +42,7 @@ public:
m_scsi_data_out(*this, "scsi_data_out"),
m_scsi_data_in(*this, "scsi_data_in"),
m_ram(*this, "ram"),
- m_req_hack(NULL)
+ m_req_hack(nullptr)
{ }
DECLARE_READ8_MEMBER( irq_callback );
@@ -524,9 +524,9 @@ static MACHINE_CONFIG_START( pcd, pcd_state )
MCFG_MC2661_TXRDY_HANDLER(DEVWRITELINE("pic1", pic8259_device, ir4_w))
MCFG_MC2661_TXD_HANDLER(DEVWRITELINE("rs232_2", rs232_port_device, write_txd))
- MCFG_RS232_PORT_ADD("rs232_1", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_1", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("usart1", mc2661_device, rx_w))
- MCFG_RS232_PORT_ADD("rs232_2", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_2", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("usart3", mc2661_device, rx_w))
// sound hardware
diff --git a/src/mame/drivers/pce.cpp b/src/mame/drivers/pce.cpp
index b95cb6c9750..4a2db078dcd 100644
--- a/src/mame/drivers/pce.cpp
+++ b/src/mame/drivers/pce.cpp
@@ -345,13 +345,13 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( pce, pce_common )
- MCFG_PCE_CARTRIDGE_ADD("cartslot", pce_cart, NULL)
+ MCFG_PCE_CARTRIDGE_ADD("cartslot", pce_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","pce")
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( tg16, pce_common )
- MCFG_TG16_CARTRIDGE_ADD("cartslot", pce_cart, NULL)
+ MCFG_TG16_CARTRIDGE_ADD("cartslot", pce_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","tg16")
MACHINE_CONFIG_END
@@ -403,7 +403,7 @@ static MACHINE_CONFIG_START( sgx, pce_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
- MCFG_PCE_CARTRIDGE_ADD("cartslot", pce_cart, NULL)
+ MCFG_PCE_CARTRIDGE_ADD("cartslot", pce_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","sgx")
MCFG_SOFTWARE_LIST_COMPATIBLE_ADD("pce_list","pce")
diff --git a/src/mame/drivers/pcfx.cpp b/src/mame/drivers/pcfx.cpp
index d2faa292087..f80150959e6 100644
--- a/src/mame/drivers/pcfx.cpp
+++ b/src/mame/drivers/pcfx.cpp
@@ -380,13 +380,13 @@ inline void pcfx_state::check_irqs()
UINT16 active_irqs = m_irq_pending & ~m_irq_mask;
int highest_prio = -1;
- for ( int i = 0; i < 8; i++ )
+ for (auto & elem : m_irq_priority)
{
if ( active_irqs & 0x80 )
{
- if ( m_irq_priority[i] >= highest_prio )
+ if ( elem >= highest_prio )
{
- highest_prio = m_irq_priority[i];
+ highest_prio = elem;
}
}
active_irqs <<= 1;
diff --git a/src/mame/drivers/pcm.cpp b/src/mame/drivers/pcm.cpp
index ee4024b4b02..e0400d8f482 100644
--- a/src/mame/drivers/pcm.cpp
+++ b/src/mame/drivers/pcm.cpp
@@ -228,7 +228,7 @@ static const z80_daisy_config pcm_daisy_chain[] =
{ "z80sio" }, /* sio */
{ "z80pio_u" }, /* User pio */
{ "z80ctc_u" }, /* User ctc */
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/drivers/pcw.cpp b/src/mame/drivers/pcw.cpp
index 8f6cc56eba1..e98b7cae2f1 100644
--- a/src/mame/drivers/pcw.cpp
+++ b/src/mame/drivers/pcw.cpp
@@ -1350,7 +1350,7 @@ MACHINE_CONFIG_END
ROM_START(pcw8256)
ROM_REGION(0x10000,"maincpu",0)
- ROM_FILL(0x0000,0x10000,0x00) \
+ ROM_FILL(0x0000,0x10000,nullptr) \
ROM_REGION(0x400,"printer_mcu",0) // i8041 9-pin dot-matrix
ROM_LOAD("40026.ic701", 0, 0x400, CRC(ee8890ae) SHA1(91679cc5e07464ac55ef9a10f7095b2438223332))
ROM_REGION(0x400,"keyboard_mcu",0) // i8048
@@ -1359,7 +1359,7 @@ ROM_END
ROM_START(pcw8512)
ROM_REGION(0x10000,"maincpu",0)
- ROM_FILL(0x0000,0x10000,0x00) \
+ ROM_FILL(0x0000,0x10000,nullptr) \
ROM_REGION(0x400,"printer_mcu",0) // i8041 9-pin dot-matrix
ROM_LOAD("40026.ic701", 0, 0x400, CRC(ee8890ae) SHA1(91679cc5e07464ac55ef9a10f7095b2438223332))
ROM_REGION(0x400,"keyboard_mcu",0) // i8048
@@ -1368,7 +1368,7 @@ ROM_END
ROM_START(pcw9256)
ROM_REGION(0x10000,"maincpu",0)
- ROM_FILL(0x0000,0x10000,0x00) \
+ ROM_FILL(0x0000,0x10000,nullptr) \
ROM_REGION(0x2000,"printer_mcu",0) // i8041 9-pin dot-matrix
ROM_LOAD("40026.ic701", 0, 0x400, CRC(ee8890ae) SHA1(91679cc5e07464ac55ef9a10f7095b2438223332))
ROM_REGION(0x400,"keyboard_mcu",0) // i8048
@@ -1377,7 +1377,7 @@ ROM_END
ROM_START(pcw9512)
ROM_REGION(0x10000,"maincpu",0)
- ROM_FILL(0x0000,0x10000,0x00) \
+ ROM_FILL(0x0000,0x10000,nullptr) \
ROM_REGION(0x2000,"printer_mcu",0) // i8041 daisywheel (schematics say i8039?)
ROM_LOAD("40103.ic109", 0, 0x2000, CRC(a64d450a) SHA1(ebbf0ef19d39912c1c127c748514dd299915f88b))
ROM_REGION(0x400,"keyboard_mcu",0) // i8048
@@ -1386,7 +1386,7 @@ ROM_END
ROM_START(pcw10)
ROM_REGION(0x10000,"maincpu",0)
- ROM_FILL(0x0000,0x10000,0x00) \
+ ROM_FILL(0x0000,0x10000,nullptr) \
ROM_REGION(0x2000,"printer_mcu",0) // i8041 9-pin dot matrix
ROM_LOAD("40026.ic701", 0, 0x400, CRC(ee8890ae) SHA1(91679cc5e07464ac55ef9a10f7095b2438223332))
ROM_REGION(0x400,"keyboard_mcu",0) // i8048
diff --git a/src/mame/drivers/pcw16.cpp b/src/mame/drivers/pcw16.cpp
index d8e165d4216..ec455d8ff0f 100644
--- a/src/mame/drivers/pcw16.cpp
+++ b/src/mame/drivers/pcw16.cpp
@@ -1029,7 +1029,7 @@ static MACHINE_CONFIG_START( pcw16, pcw16_state )
MCFG_INS8250_OUT_DTR_CB(DEVWRITELINE("serport2", rs232_port_device, write_dtr))
MCFG_INS8250_OUT_RTS_CB(DEVWRITELINE("serport2", rs232_port_device, write_rts))
MCFG_INS8250_OUT_INT_CB(WRITELINE(pcw16_state, pcw16_com_interrupt_2))
- MCFG_RS232_PORT_ADD( "serport2", pcw16_com, NULL )
+ MCFG_RS232_PORT_ADD( "serport2", pcw16_com, nullptr )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("ns16550_2", ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("ns16550_2", ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("ns16550_2", ins8250_uart_device, dsr_w))
diff --git a/src/mame/drivers/pdp1.cpp b/src/mame/drivers/pdp1.cpp
index 0e01f6d21c3..c0bc33bada2 100644
--- a/src/mame/drivers/pdp1.cpp
+++ b/src/mame/drivers/pdp1.cpp
@@ -460,21 +460,21 @@ static pdp1_reset_param_t pdp1_reset_param =
BULLETIN no. 2 (drumInstrWriteup.bin/drumInstrWriteup.txt), and are
similar to IOT documented in Parallel Drum Type 23 Instruction Manual. */
/* (iot) rpa rpb tyo tyi ppa ppb dpy */
- NULL, iot_rpa, iot_rpb, iot_tyo, iot_tyi, iot_ppa, iot_ppb, iot_dpy,
+ nullptr, iot_rpa, iot_rpb, iot_tyo, iot_tyi, iot_ppa, iot_ppb, iot_dpy,
/* spacewar */
- NULL, iot_011, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, iot_011, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
/* lag glf?/jsp? gpl?/gpr?/gcf? */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
/* rrb rcb? rcc? cks mcs mes mel */
- iot_rrb, NULL, NULL, iot_cks, NULL, NULL, NULL, NULL,
+ iot_rrb, nullptr, nullptr, iot_cks, nullptr, nullptr, nullptr, nullptr,
/* cad? rac? rbc? pac lpr/lfb/lsp swc/sci/sdf?/shr? scv? */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
/* (dsc) (asc) (isb) (cac) (lsm) (esm) (cbs) */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
/* icv? dia dba dcc dra mri|rlc? mrf/inr?/ccr? */
- NULL, iot_dia, iot_dba, iot_dcc, iot_dra, NULL, NULL, NULL,
+ nullptr, iot_dia, iot_dba, iot_dcc, iot_dra, nullptr, nullptr, nullptr,
/* mcb|dur? mwc|mtf? mrc|sfc?... msm|cgo? (eem/lem) mic muf */
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
},
pdp1_tape_read_binary,
pdp1_io_sc_callback,
@@ -505,7 +505,7 @@ void pdp1_state::pdp1_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 */
- m_tape_reader.timer = m_tape_puncher.timer = m_typewriter.tyo_timer = m_dpy_timer = NULL;
+ m_tape_reader.timer = m_tape_puncher.timer = m_typewriter.tyo_timer = m_dpy_timer = nullptr;
}
@@ -677,9 +677,9 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "tap,rim"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -712,9 +712,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "tap,rim"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -748,9 +748,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "typ"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -783,9 +783,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "drm"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -841,7 +841,7 @@ void pdp1_readtape_image_device::call_unload()
pdp1_state *state = machine().driver_data<pdp1_state>();
/* reader unit */
- state->m_tape_reader.fd = NULL;
+ state->m_tape_reader.fd = nullptr;
/* stop motor */
state->m_tape_reader.motor_on = 0;
@@ -1055,7 +1055,7 @@ void pdp1_punchtape_image_device::call_unload()
pdp1_state *state = machine().driver_data<pdp1_state>();
/* punch unit */
- state->m_tape_puncher.fd = NULL;
+ state->m_tape_puncher.fd = nullptr;
}
/*
@@ -1165,7 +1165,7 @@ bool pdp1_printer_image_device::call_load()
void pdp1_printer_image_device::call_unload()
{
pdp1_state *state = machine().driver_data<pdp1_state>();
- state->m_typewriter.fd = NULL;
+ state->m_typewriter.fd = nullptr;
}
/*
@@ -1499,7 +1499,7 @@ bool pdp1_cylinder_image_device::call_load()
void pdp1_cylinder_image_device::call_unload()
{
pdp1_state *state = machine().driver_data<pdp1_state>();
- state->m_parallel_drum.fd = NULL;
+ state->m_parallel_drum.fd = nullptr;
}
static void iot_dia(device_t *device, int op2, int nac, int mb, int *io, int ac)
diff --git a/src/mame/drivers/pegasus.cpp b/src/mame/drivers/pegasus.cpp
index 8563f597020..9057b0d51cb 100644
--- a/src/mame/drivers/pegasus.cpp
+++ b/src/mame/drivers/pegasus.cpp
@@ -424,7 +424,7 @@ int pegasus_state::load_cart(device_image_interface &image, generic_slot_device
return IMAGE_INIT_FAIL;
}
- if (image.software_entry() != NULL && size == 0)
+ if (image.software_entry() != nullptr && size == 0)
{
// we might be loading a cart compatible with all sockets!
// so try to get region "rom"
diff --git a/src/mame/drivers/peplus.cpp b/src/mame/drivers/peplus.cpp
index e1f83b422ac..a59e66c4111 100644
--- a/src/mame/drivers/peplus.cpp
+++ b/src/mame/drivers/peplus.cpp
@@ -3006,7 +3006,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
Programs Available: PP0060, X000060P & PP0420 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 ) /* 11/13/97 @IGT CRUIS */
- ROM_LOAD( "pp0060_a6h-a8h.u68", 0x00000, 0x10000, CRC(81963084) SHA1(2493bb040b9d0ea5cfe77f8d07546d3a3ac3716a) ) /* Game Version: A6H, Library Version: A8H */
+ ROM_LOAD( "pp0060_a6h-a8h.u68", 0x00000, 0x10000, CRC(81963084) SHA1(2493bb040b9d0ea5cfe77f8d07546d3a3ac3716a) ) /* Game Version: A6H, Library Version: A8H - 11/13/97 IGT CRUIS */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2002.u72", 0x00000, 0x8000, CRC(d9d03979) SHA1(9729cbb2e5472eb652f8f549dd85047abe11cae0) ) /* 08/30/94 @IGT CRUIS */
@@ -3166,7 +3166,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
Programs Available: PP0094
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0094_a45-a74.u68", 0x00000, 0x10000, CRC(249280bc) SHA1(1f50dfc1192212b880ff9cd83f15eefd4414d36a) ) /* Game Version: A45, Library Version: A74*/
+ ROM_LOAD( "pp0094_a45-a74.u68", 0x00000, 0x10000, CRC(249280bc) SHA1(1f50dfc1192212b880ff9cd83f15eefd4414d36a) ) /* Game Version: A45, Library Version: A74 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg740.u72", 0x00000, 0x8000, CRC(72667f6c) SHA1(89843f472cc0329317cfc643c63bdfd11234b194) )
@@ -4000,7 +4000,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
Programs Available: PP0197, X000197P & PP0419 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0197_a6h-a8h.u68", 0x00000, 0x10000, CRC(c8825e06) SHA1(a26607b0aa4f76371a0b9d3fdd069e8ada204daf) ) /* Game Version: A6H, Library Version: A8H */
+ ROM_LOAD( "pp0197_a6h-a8h.u68", 0x00000, 0x10000, CRC(c8825e06) SHA1(a26607b0aa4f76371a0b9d3fdd069e8ada204daf) ) /* Game Version: A6H, Library Version: A8H - 11/13/97 IGT L97-2583 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2002.u72", 0x00000, 0x8000, CRC(d9d03979) SHA1(9729cbb2e5472eb652f8f549dd85047abe11cae0) ) /* 08/30/94 @IGT CRUIS */
@@ -4023,7 +4023,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: PP0203, X000203P, PP0590 & PP0409 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0203_a46-a75.u68", 0x00000, 0x10000, CRC(2955eeb5) SHA1(ac2483dbb92de84ab64d0d7e55acff196966ea1b) ) /* Game Version: A46, Library Version: A75, Video Lib ver: A0Y */
+ ROM_LOAD( "pp0203_a46-a75.u68", 0x00000, 0x10000, CRC(2955eeb5) SHA1(ac2483dbb92de84ab64d0d7e55acff196966ea1b) ) /* Game Version: A46, Library Version: A75, Video Lib ver: A0Y - 10/23/95 IGT L95-2446 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2003.u72", 0x00000, 0x8000, CRC(0d425f48) SHA1(b60aaf3f4bd76f75f72f6e8dda724bdf795cb521) ) /* 08/30/94 @ IGT L95-0145 */
@@ -4046,7 +4046,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: PP0203, X000203P, PP0590 & PP0409 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0203_a0n-a23.u68", 0x00000, 0x10000, CRC(fce4ea36) SHA1(4c1be0cb3600bbcac768b942f7b8bddd5d626ef6) ) /* Game Version: A0N, Library Version: A23, Video Lib ver: A0Y */
+ ROM_LOAD( "pp0203_a0n-a23.u68", 0x00000, 0x10000, CRC(fce4ea36) SHA1(4c1be0cb3600bbcac768b942f7b8bddd5d626ef6) ) /* Game Version: A0N, Library Version: A23, Video Lib ver: A0Y - 04/16/94 IGT L94-1048 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2003.u72", 0x00000, 0x8000, CRC(0d425f48) SHA1(b60aaf3f4bd76f75f72f6e8dda724bdf795cb521) ) /* 08/30/94 @ IGT L95-0145 */
@@ -4069,7 +4069,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: PP0203, X000203P, PP0590 & PP0409 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0203_989-974.u68", 0x00000, 0x10000, CRC(15b6b464) SHA1(672d9e198d00bfc7d444957d31b8f8de7ba48ca0) ) /* Game Version: 989, Library Version: 974, Video Lib ver: A0Y */
+ ROM_LOAD( "pp0203_989-974.u68", 0x00000, 0x10000, CRC(15b6b464) SHA1(672d9e198d00bfc7d444957d31b8f8de7ba48ca0) ) /* Game Version: 989, Library Version: 974, Video Lib ver: A0Y - 12/20/93 IGT L94-0037 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2003.u72", 0x00000, 0x8000, CRC(0d425f48) SHA1(b60aaf3f4bd76f75f72f6e8dda724bdf795cb521) ) /* 08/30/94 @ IGT L95-0145 */
@@ -4137,7 +4137,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
NOTE: While this is a 32K version, it does require DOOR OPEN cycling and isn't compatible with earlier non-plus boards
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0203_631-607.u68", 0x00000, 0x8000, CRC(ad61ee10) SHA1(477d1b17c368ea194a460e839d7de4c2a9a256a4) ) /* Game Version: 631, Library Version: 607, Video Lib Ver: 607 */
+ ROM_LOAD( "pp0203_631-607.u68", 0x00000, 0x8000, CRC(ad61ee10) SHA1(477d1b17c368ea194a460e839d7de4c2a9a256a4) ) /* Game Version: 631, Library Version: 607, Video Lib Ver: 607 - 08/22/90 IGT L90-1414 */
ROM_RELOAD( 0x08000, 0x8000) /* 32K version built using earlier gaming libraries */
ROM_REGION( 0x020000, "gfx1", 0 )
@@ -4671,7 +4671,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: PP0203, X000203P, PP0590 & PP0409 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0409_a45-a75.u68", 0x00000, 0x10000, CRC(a71fdad9) SHA1(a719787895ad035b2b930d2692930466a9bfb19d) ) /* Game Version: A46, Library Version: A75, Game Lib ver: A0Y */
+ ROM_LOAD( "pp0409_a45-a75.u68", 0x00000, 0x10000, CRC(a71fdad9) SHA1(a719787895ad035b2b930d2692930466a9bfb19d) ) /* Game Version: A46, Library Version: A75, Game Lib ver: A0Y 02/11/96 IGT CO */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2003.u72", 0x00000, 0x8000, CRC(0d425f48) SHA1(b60aaf3f4bd76f75f72f6e8dda724bdf795cb521) ) /* 08/30/94 @ IGT L95-0145 */
@@ -4781,7 +4781,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0125, PP0418, X000291P & PP0291 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0418_a46-a75.u68", 0x00000, 0x10000, CRC(a0725de3) SHA1(fb2e7570862b48608041c833fc5c7c7198cbb041) ) /* Game Version: A46, Library Version: A75 */
+ ROM_LOAD( "pp0418_a46-a75.u68", 0x00000, 0x10000, CRC(a0725de3) SHA1(fb2e7570862b48608041c833fc5c7c7198cbb041) ) /* Game Version: A46, Library Version: A75 - 11/13/95 IGT LA */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2133.u72", 0x00000, 0x8000, CRC(b21a789f) SHA1(c49f9b5f51c29bbc0e1392e86d6602bd44e46380) ) /* 02/02/95 @ IGT L95-0276 */
@@ -5382,7 +5382,7 @@ PayTable Js+ TP 3K STR FL FH 4K SF RF (Bonus)
Programs Available: PP0510
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0510_782-779.u68", 0x00000, 0x10000, CRC(40ce3464) SHA1(230725ac3dd6eb6f891d4abfbcb4c41592531d4e) ) /* Game Version: 782, Library Version: 779 */
+ ROM_LOAD( "pp0510_782-779.u68", 0x00000, 0x10000, CRC(40ce3464) SHA1(230725ac3dd6eb6f891d4abfbcb4c41592531d4e) ) /* Game Version: 782, Library Version: 779 - 11-24-92 IGT L92-1614 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2004.u72", 0x00000, 0x8000, CRC(e5e40ea5) SHA1(e0d9e50b30cc0c25c932b2bf444990df1fb2c38c) ) /* 08/31/94 @ IGT L95-0146 */
@@ -5404,7 +5404,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: PP0514, X000514P & PP0538 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0514_a46-a75.u68", 0x00000, 0x10000, CRC(53ca68c7) SHA1(2c46c89c6347bb8cf80b0ff85daabd0e925c87ec) ) /* Game Version: A46, Library Version: A75, Video Lib ver: A0Y */
+ ROM_LOAD( "pp0514_a46-a75.u68", 0x00000, 0x10000, CRC(53ca68c7) SHA1(2c46c89c6347bb8cf80b0ff85daabd0e925c87ec) ) /* Game Version: A46, Library Version: A75, Video Lib ver: A0Y - 11/15/95 IGT L95-2471 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2003.u72", 0x00000, 0x8000, CRC(0d425f48) SHA1(b60aaf3f4bd76f75f72f6e8dda724bdf795cb521) ) /* 08/30/94 @ IGT L95-0145 */
@@ -5492,7 +5492,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: PP0515, X000515P & PP0539 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0515_a0n-a23.u68", 0x00000, 0x10000, CRC(76389889) SHA1(992fb7d3f296d1cecab75ab4cf13fff1b7a5cc11) ) /* Game Version: A0N, Library Version: A23, Video Lib ver: A0Y */
+ ROM_LOAD( "pp0515_a0n-a23.u68", 0x00000, 0x10000, CRC(76389889) SHA1(992fb7d3f296d1cecab75ab4cf13fff1b7a5cc11) ) /* Game Version: A0N, Library Version: A23, Video Lib ver: A0Y - 04/19/94 IGT L94-0949 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2003.u72", 0x00000, 0x8000, CRC(0d425f48) SHA1(b60aaf3f4bd76f75f72f6e8dda724bdf795cb521) ) /* 08/30/94 @ IGT L95-0145 */
@@ -5690,7 +5690,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: PP0514, X000514P & PP0538 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0538_a46-a75.u68", 0x00000, 0x10000, CRC(f9e8dbe7) SHA1(dd745a48764f7da7314236016bf9c7fa67a78fad) ) /* Game Version: A46, Library Version: A75, Video Lib ver: A0Y */
+ ROM_LOAD( "pp0538_a46-a75.u68", 0x00000, 0x10000, CRC(f9e8dbe7) SHA1(dd745a48764f7da7314236016bf9c7fa67a78fad) ) /* Game Version: A46, Library Version: A75, Video Lib ver: A0Y - 02/13/96 IGT CO */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2003.u72", 0x00000, 0x8000, CRC(0d425f48) SHA1(b60aaf3f4bd76f75f72f6e8dda724bdf795cb521) ) /* 08/30/94 @ IGT L95-0145 */
@@ -5778,7 +5778,7 @@ PayTable 2P 3K STR FL FH 4K SF RF 5K RF (Bonus)
Programs Available: PP0550, X000550P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0550_a6k-a9g.u68", 0x00000, 0x10000, CRC(1de4ee32) SHA1(0e06a43e7e3988cc2fddd1a57af724f5421d2ca4) ) /* Game Version: A6K, Library Version: A9G */
+ ROM_LOAD( "pp0550_a6k-a9g.u68", 0x00000, 0x10000, CRC(1de4ee32) SHA1(0e06a43e7e3988cc2fddd1a57af724f5421d2ca4) ) /* Game Version: A6K, Library Version: A9G - 05/21/98 IGT NJ */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2004.u72", 0x00000, 0x8000, CRC(e5e40ea5) SHA1(e0d9e50b30cc0c25c932b2bf444990df1fb2c38c) ) /* 08/31/94 @ IGT L95-0146 */
@@ -5933,7 +5933,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0587_a45-a74.u68", 0x00000, 0x10000, CRC(b45f0725) SHA1(1bedfa12211de1cef0b25214c38a10094b248d63) ) /* Game Version: A45, Library Version: A74 */
+ ROM_LOAD( "pp0587_a45-a74.u68", 0x00000, 0x10000, CRC(b45f0725) SHA1(1bedfa12211de1cef0b25214c38a10094b248d63) ) /* Game Version: A45, Library Version: A74 - 02/12/96 IGT CO */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2004.u72", 0x00000, 0x8000, CRC(e5e40ea5) SHA1(e0d9e50b30cc0c25c932b2bf444990df1fb2c38c) ) /* 08/31/94 @ IGT L95-0146 */
@@ -5959,7 +5959,7 @@ Currently errors out with CCOM LINK DOWN
CCOM linking is not supported
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0596_a41-a5y.u68", 0x00000, 0x10000, CRC(18475dfe) SHA1(98b8dfd98ce163e78e5c6e80b31dcc58d3ee74e6) ) /* Game Version: A45, Library Version: A5Y, Video Library: A4N - 09/05/95 IGT NJ */
+ ROM_LOAD( "pp0596_a41-a5y.u68", 0x00000, 0x10000, CRC(18475dfe) SHA1(98b8dfd98ce163e78e5c6e80b31dcc58d3ee74e6) ) /* Game Version: A45, Library Version: A5Y, Video Lib Ver: A4N - 09/05/95 IGT NJ */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cgxxxx.u72", 0x00000, 0x8000, NO_DUMP ) /* Unknown set needed for correct paytable graphics */
@@ -5989,7 +5989,7 @@ Currently errors out with CCOM LINK DOWN
CCOM linking is not supported
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0598_a41-a96.u68", 0x00000, 0x10000, CRC(075295db) SHA1(7cb238d4df7be7e393dcfe7102aeffa13b1454d9) ) /* Game Version: A45, Library Version: A96, Video Library: A4N - 12/21/95 IGT MS */
+ ROM_LOAD( "pp0598_a41-a96.u68", 0x00000, 0x10000, CRC(075295db) SHA1(7cb238d4df7be7e393dcfe7102aeffa13b1454d9) ) /* Game Version: A45, Library Version: A96, Video Lib Ver: A4N - 12/21/95 IGT MS */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cgxxxx.u72", 0x00000, 0x8000, NO_DUMP ) /* Unknown set needed for correct paytable graphics */
@@ -6123,7 +6123,7 @@ P437A/4K/5 1 1 3 4 5 6 50 80 160 50 250 800
Programs Available: PP0728
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0728_a46-a75.u68", 0x00000, 0x10000, CRC(ecfbdb77) SHA1(072dc5d59b6a705591045162612b5101e85e1b10) )/* Game Version: A46, Library Version: A75, Video Lib ver: A0Y */
+ ROM_LOAD( "pp0728_a46-a75.u68", 0x00000, 0x10000, CRC(ecfbdb77) SHA1(072dc5d59b6a705591045162612b5101e85e1b10) )/* Game Version: A46, Library Version: A75, Video Lib ver: A0Y - 11/30/95 IGT L96-0247 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2003.u72", 0x00000, 0x8000, CRC(0d425f48) SHA1(b60aaf3f4bd76f75f72f6e8dda724bdf795cb521) ) /* 08/30/94 @ IGT L95-0145 */
@@ -6146,7 +6146,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: PP0733
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0733_a4y-a6g.u68", 0x00000, 0x10000, CRC(027e8e0c) SHA1(8735a6d9cc59ac5ecb615a4e437fb5beaac0dc9f) ) /* Game Version: A4Y, Library Version: A6G, Video Library: A0Y */
+ ROM_LOAD( "pp0733_a4y-a6g.u68", 0x00000, 0x10000, CRC(027e8e0c) SHA1(8735a6d9cc59ac5ecb615a4e437fb5beaac0dc9f) ) /* Game Version: A4Y, Library Version: A6G, Video Lib Ver: A0Y - 05/09/96 IGT MS */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2135.u72", 0x00000, 0x8000, CRC(ecb5c319) SHA1(8c6dce009017c919b4ebfeb0292cfb8819b652a0) ) /* 02/08/95 @ IGT MS */
@@ -6167,7 +6167,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
Programs Available: PP0750
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0750_979-a0c.u68", 0x00000, 0x10000, CRC(2224c865) SHA1(6080c29d69c847603b79b7b15f65b32e36d305d8) ) /* Game Version: 979, Library Version: A0C */
+ ROM_LOAD( "pp0750_979-a0c.u68", 0x00000, 0x10000, CRC(2224c865) SHA1(6080c29d69c847603b79b7b15f65b32e36d305d8) ) /* Game Version: 979, Library Version: A0C - 01/23/95 IGT MS */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2004.u72", 0x00000, 0x8000, CRC(e5e40ea5) SHA1(e0d9e50b30cc0c25c932b2bf444990df1fb2c38c) ) /* 08/31/94 @ IGT L95-0146 */
@@ -6189,7 +6189,7 @@ PayTable 8s+ 2P 3K STR FL FH 4K SF RF 5K RF (Bonus)
Programs Available: PP0757
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0757_a5v-a6d.u68", 0x00000, 0x10000, CRC(dcf3004f) SHA1(c095a874a8813f7100ec430e034530eeb93c4117) ) /* Game Version: A5V, Library Version: A6D */
+ ROM_LOAD( "pp0757_a5v-a6d.u68", 0x00000, 0x10000, CRC(dcf3004f) SHA1(c095a874a8813f7100ec430e034530eeb93c4117) ) /* Game Version: A5V, Library Version: A6D - 11/08/96 IGT L97-0062 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2015.u72", 0x00000, 0x8000, CRC(7f73ee5c) SHA1(b6c5d423c8176555c1f32605c328ffbfcf94b656) ) /* Verified CG set for PP0760 set */
@@ -6254,7 +6254,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: PP0764, X000764P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0764_a46-a75.u68", 0x00000, 0x10000, CRC(9176732a) SHA1(4a9898334aa76c483757addb3a28ace71b008c7e) ) /* Game Version: A46, Library Version: A75, Game Lib ver: A0Y */
+ ROM_LOAD( "pp0764_a46-a75.u68", 0x00000, 0x10000, CRC(9176732a) SHA1(4a9898334aa76c483757addb3a28ace71b008c7e) ) /* Game Version: A46, Library Version: A75, Game Lib ver: A0Y - 11/03/96 IGT L96-0250 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2003.u72", 0x00000, 0x8000, CRC(0d425f48) SHA1(b60aaf3f4bd76f75f72f6e8dda724bdf795cb521) ) /* 08/30/94 @ IGT L95-0145 */
@@ -6327,7 +6327,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF 4D (Bonus)
Programs Available: PP0812
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "pp0812_a47-a76.u68", 0x00000, 0x10000, CRC(0de2a7ec) SHA1(fedb8da0608328a9d33e46af18de25004b1d03de) ) /* Game Version: A47, Library Version: A76 */
+ ROM_LOAD( "pp0812_a47-a76.u68", 0x00000, 0x10000, CRC(0de2a7ec) SHA1(fedb8da0608328a9d33e46af18de25004b1d03de) ) /* Game Version: A47, Library Version: A76 - 06/18/96 IGT L96-1818 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg1215.u72", 0x00000, 0x8000, CRC(425f57be) SHA1(6d53ae86bec7189a35671a7f691e101a2ed4d8c4) ) /* 06/09/93 @ IGT L93-1585 */
@@ -6980,11 +6980,11 @@ ROM_END
ROM_START( peke0017 ) /* Normal board : Keno 1-10 Spot (KE0017) */
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "ke0017_560-a07.u68", 0x00000, 0x08000, CRC(a0f70116) SHA1(15808cd3245e2e5934f3365f95590da0be552e8b) ) /* Game Version: 560, Library Version: A07 */
+ ROM_LOAD( "ke0017_560-a07.u68", 0x00000, 0x08000, CRC(a0f70116) SHA1(15808cd3245e2e5934f3365f95590da0be552e8b) ) /* Game Version: 560, Library Version: A07 - 02/11/94 IGT L94-0689 */
ROM_RELOAD( 0x08000, 0x8000) /* 32K version built using earlier gaming libraries */
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg1016.u72", 0x00000, 0x8000, CRC(92072064) SHA1(ccd12303afb559a57f135f5feff1eada4394c45b) )
+ ROM_LOAD( "mro-cg1016.u72", 0x00000, 0x8000, CRC(92072064) SHA1(ccd12303afb559a57f135f5feff1eada4394c45b) ) /* 03/04/91 IGT L91-0306 */
ROM_LOAD( "mgo-cg1016.u73", 0x08000, 0x8000, CRC(fd54f031) SHA1(0990338d00574d798bed2c13ed2cf65118698a65) )
ROM_LOAD( "mbo-cg1016.u74", 0x10000, 0x8000, CRC(6325ff0b) SHA1(cca693b42d458024d11badf02923f0aedc5252ba) )
ROM_LOAD( "mxo-cg1016.u75", 0x18000, 0x8000, CRC(54345a8c) SHA1(928f1633343a1d81ef193ebd09de0d36c52057ca) )
@@ -6995,10 +6995,10 @@ ROM_END
ROM_START( peke1001 ) /* Normal board : Keno 2-10 Spot (KE1001) - Payout 85.02%, Paytable 85-H */
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "ke1001_590-a77.u68", 0x00000, 0x10000, CRC(a3dfee24) SHA1(f6c4822dbaab67319fc05ac0a0b2cd03313eb1e6) ) /* Game Version: 590, Library Version: A77 */
+ ROM_LOAD( "ke1001_590-a77.u68", 0x00000, 0x10000, CRC(a3dfee24) SHA1(f6c4822dbaab67319fc05ac0a0b2cd03313eb1e6) ) /* Game Version: 590, Library Version: A77 - 09/08/99 IGT L99-1902 */
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) )
+ ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) ) /* 03/24/94 IGT L94-0873 */
ROM_LOAD( "mgo-cg1267.u73", 0x08000, 0x8000, CRC(80847c5a) SHA1(8422cd13a91c3c462af5efcfca8615e7eeaa2e52) )
ROM_LOAD( "mbo-cg1267.u74", 0x10000, 0x8000, CRC(ce7af8a7) SHA1(38675122c764b8fa9260246ea99ac0f0750da277) )
ROM_LOAD( "mxo-cg1267.u75", 0x18000, 0x8000, CRC(a4394303) SHA1(30a07028de35f74cc4fb776b0505ca743c8d7b5b) )
@@ -7012,7 +7012,7 @@ ROM_START( peke1006 ) /* Normal board : Keno 2-10 Spot (KE1006) - Payout 87.61%,
ROM_LOAD( "ke1006_590-a77.u68", 0x00000, 0x10000, CRC(5f2a9aac) SHA1(67d24e376d0dcea30d68c3019919e02261c38d7d) ) /* Game Version: 590, Library Version: A77 */
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) )
+ ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) ) /* 03/24/94 IGT L94-0873 */
ROM_LOAD( "mgo-cg1267.u73", 0x08000, 0x8000, CRC(80847c5a) SHA1(8422cd13a91c3c462af5efcfca8615e7eeaa2e52) )
ROM_LOAD( "mbo-cg1267.u74", 0x10000, 0x8000, CRC(ce7af8a7) SHA1(38675122c764b8fa9260246ea99ac0f0750da277) )
ROM_LOAD( "mxo-cg1267.u75", 0x18000, 0x8000, CRC(a4394303) SHA1(30a07028de35f74cc4fb776b0505ca743c8d7b5b) )
@@ -7023,10 +7023,10 @@ ROM_END
ROM_START( peke1012 ) /* Normal board : Keno 1-10 Spot (KE1012) - Payout 90.27%, Paytable 90-P */
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "ke1012_590-a77.u68", 0x00000, 0x10000, CRC(18ec2146) SHA1(6a5bae2accd15f8e5efa18d26dcadb2bec7b6163) ) /* Game Version: 582, Library Version: A77 */
+ ROM_LOAD( "ke1012_590-a77.u68", 0x00000, 0x10000, CRC(18ec2146) SHA1(6a5bae2accd15f8e5efa18d26dcadb2bec7b6163) ) /* Game Version: 582, Library Version: A77 - 09/09/99 IGT MNI S */
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) )
+ ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) ) /* 03/24/94 IGT L94-0873 */
ROM_LOAD( "mgo-cg1267.u73", 0x08000, 0x8000, CRC(80847c5a) SHA1(8422cd13a91c3c462af5efcfca8615e7eeaa2e52) )
ROM_LOAD( "mbo-cg1267.u74", 0x10000, 0x8000, CRC(ce7af8a7) SHA1(38675122c764b8fa9260246ea99ac0f0750da277) )
ROM_LOAD( "mxo-cg1267.u75", 0x18000, 0x8000, CRC(a4394303) SHA1(30a07028de35f74cc4fb776b0505ca743c8d7b5b) )
@@ -7037,10 +7037,10 @@ ROM_END
ROM_START( peke1012a ) /* Normal board : Keno 1-10 Spot (KE1012) - Payout 90.27%, Paytable 90-P */
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "ke1012_582-a77.u68", 0x00000, 0x10000, CRC(87f696ba) SHA1(de6cc7ff799218ae6fb75521243534484ef4b9a8) ) /* Game Version: 582, Library Version: A77 */
+ ROM_LOAD( "ke1012_582-a77.u68", 0x00000, 0x10000, CRC(87f696ba) SHA1(de6cc7ff799218ae6fb75521243534484ef4b9a8) ) /* Game Version: 582, Library Version: A77 - 10/23/95 IGT L95-2454 */
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) )
+ ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) ) /* 03/24/94 IGT L94-0873 */
ROM_LOAD( "mgo-cg1267.u73", 0x08000, 0x8000, CRC(80847c5a) SHA1(8422cd13a91c3c462af5efcfca8615e7eeaa2e52) )
ROM_LOAD( "mbo-cg1267.u74", 0x10000, 0x8000, CRC(ce7af8a7) SHA1(38675122c764b8fa9260246ea99ac0f0750da277) )
ROM_LOAD( "mxo-cg1267.u75", 0x18000, 0x8000, CRC(a4394303) SHA1(30a07028de35f74cc4fb776b0505ca743c8d7b5b) )
@@ -7051,10 +7051,10 @@ ROM_END
ROM_START( peke1012b ) /* Normal board : Keno 1-10 Spot (KE1012) - Payout 90.27%, Paytable 90-P */
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "ke1012_576-a3u.u68", 0x00000, 0x10000, CRC(470e8c10) SHA1(f8a65a3a73477e9e9d2f582eeefa93b470497dfa) ) /* Game Version: 576, Library Version: A3U */
+ ROM_LOAD( "ke1012_576-a3u.u68", 0x00000, 0x10000, CRC(470e8c10) SHA1(f8a65a3a73477e9e9d2f582eeefa93b470497dfa) ) /* Game Version: 576, Library Version: A3U - 08/03/94 IGT L94-1550 */
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) )
+ ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) ) /* 03/24/94 IGT L94-0873 */
ROM_LOAD( "mgo-cg1267.u73", 0x08000, 0x8000, CRC(80847c5a) SHA1(8422cd13a91c3c462af5efcfca8615e7eeaa2e52) )
ROM_LOAD( "mbo-cg1267.u74", 0x10000, 0x8000, CRC(ce7af8a7) SHA1(38675122c764b8fa9260246ea99ac0f0750da277) )
ROM_LOAD( "mxo-cg1267.u75", 0x18000, 0x8000, CRC(a4394303) SHA1(30a07028de35f74cc4fb776b0505ca743c8d7b5b) )
@@ -7068,7 +7068,7 @@ ROM_START( peke1013 ) /* Normal board : Keno 2-10 Spot (KE1013) - Payout 91.97%,
ROM_LOAD( "ke1013_686-a8r.u68", 0x00000, 0x10000, CRC(97ae2ee7) SHA1(df680ff46320e21a352406e2eaf92003f86434a4) ) /* Game Version: 686, Library Version: A8R */
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) )
+ ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) ) /* 03/24/94 IGT L94-0873 */
ROM_LOAD( "mgo-cg1267.u73", 0x08000, 0x8000, CRC(80847c5a) SHA1(8422cd13a91c3c462af5efcfca8615e7eeaa2e52) )
ROM_LOAD( "mbo-cg1267.u74", 0x10000, 0x8000, CRC(ce7af8a7) SHA1(38675122c764b8fa9260246ea99ac0f0750da277) )
ROM_LOAD( "mxo-cg1267.u75", 0x18000, 0x8000, CRC(a4394303) SHA1(30a07028de35f74cc4fb776b0505ca743c8d7b5b) )
@@ -7082,7 +7082,7 @@ ROM_START( peke1013a ) /* Normal board : Keno 2-10 Spot (KE1013) - Payout 91.97%
ROM_LOAD( "ke1013_590-a77.u68", 0x00000, 0x10000, CRC(3b178f94) SHA1(c601150a728d750b73f949ba6e2d2979c4c4be2e) ) /* Game Version: 590, Library Version: A77 */
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) )
+ ROM_LOAD( "mro-cg1267.u72", 0x00000, 0x8000, CRC(16498b57) SHA1(9c22726299af7204c4be1c6d8afc4c1b512ad918) ) /* 03/24/94 IGT L94-0873 */
ROM_LOAD( "mgo-cg1267.u73", 0x08000, 0x8000, CRC(80847c5a) SHA1(8422cd13a91c3c462af5efcfca8615e7eeaa2e52) )
ROM_LOAD( "mbo-cg1267.u74", 0x10000, 0x8000, CRC(ce7af8a7) SHA1(38675122c764b8fa9260246ea99ac0f0750da277) )
ROM_LOAD( "mxo-cg1267.u75", 0x18000, 0x8000, CRC(a4394303) SHA1(30a07028de35f74cc4fb776b0505ca743c8d7b5b) )
@@ -7879,7 +7879,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0055, X000055P, PP0723
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000040.u67", 0x00000, 0x10000, CRC(7b30b1d5) SHA1(394c964cf6269a4cd9b9debe8f4a5a0c96db06a7) )
+ ROM_LOAD( "xp000040.u67", 0x00000, 0x10000, CRC(7b30b1d5) SHA1(394c964cf6269a4cd9b9debe8f4a5a0c96db06a7) ) /* 10/23/96 IGT L96-2682 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x000055p.u66", 0x00000, 0x10000, CRC(e06819df) SHA1(36590c4588b8036908e63714fbb3e77d23e60eae) ) /* Deuces Wild Poker */
@@ -7904,7 +7904,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0055, X000055P, PP0723
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x000055p.u66", 0x00000, 0x10000, CRC(e06819df) SHA1(36590c4588b8036908e63714fbb3e77d23e60eae) ) /* Deuces Wild Poker */
@@ -8054,7 +8054,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0055, X000055P, PP0723
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000095.u67", 0x00000, 0x10000, CRC(6a1679ea) SHA1(421e8c9eacc8e397267a48cad7ae96f541b1c19a) )
+ ROM_LOAD( "xp000095.u67", 0x00000, 0x10000, CRC(6a1679ea) SHA1(421e8c9eacc8e397267a48cad7ae96f541b1c19a) ) /* 12/19/97 IGT L98-0197 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x000055p.u66", 0x00000, 0x10000, CRC(e06819df) SHA1(36590c4588b8036908e63714fbb3e77d23e60eae) ) /* Deuces Wild Poker */
@@ -8154,7 +8154,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0055, X000055P, PP0723
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* No Double-up */
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x000055p.u66", 0x00000, 0x10000, CRC(e06819df) SHA1(36590c4588b8036908e63714fbb3e77d23e60eae) ) /* Deuces Wild Poker */
@@ -8253,7 +8253,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0124, X000124P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x000124p.u66", 0x00000, 0x10000, CRC(08096310) SHA1(34d41a67ecdab93be3af0cd33fcdacfe75da6c08) ) /* Deuces Wild Poker - 05/09/95 @ IGT L95-1139 */
@@ -8376,7 +8376,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0417, X000417P, X000190P & PP0190 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x000190p.u66", 0x00000, 0x10000, CRC(17cc52f6) SHA1(90818df05c6bba3ffcbc2047c7eedea31abdc05a) ) /* Deuces Wild Poker */
@@ -8450,10 +8450,10 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0290, X000224P & PP0224 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "x000224p.u66", 0x00000, 0x10000, CRC(69ca6ac7) SHA1(e6f119b69f769a1f484a4ced3eb4d9e5406f0b09) ) /* Deuces Wild Poker */
+ ROM_LOAD( "x000224p.u66", 0x00000, 0x10000, CRC(69ca6ac7) SHA1(e6f119b69f769a1f484a4ced3eb4d9e5406f0b09) ) /* Deuces Wild Poker - 10/31/94 IGT L94-2065 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2185.u77", 0x00000, 0x8000, CRC(7e64bd1a) SHA1(e988a380ee58078bf5bdc7747e83aed1393cfad8) ) /* 07/10/95 @ IGT L95-1506 */
@@ -8501,7 +8501,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0242, X000242P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x000242p.u66", 0x00000, 0x10000, CRC(e0292d63) SHA1(8d8ec5dc1abaf8e8a8a7451d3a814023d8195fb5) ) /* Deuces Wild Poker */
@@ -8551,7 +8551,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0418, X000291P & PP0291 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x000291p.u66", 0x00000, 0x10000, CRC(7aa72bbd) SHA1(f754b85579720abd2efd57efa31091bca3c01425) ) /* Deuces Wild Poker - 05/04/95 @ IGT L95-1156 */
@@ -8576,7 +8576,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0417, X000417P & PP0190 - Non Double-up Only
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x000417p.u66", 0x00000, 0x10000, CRC(8c80433d) SHA1(508f49522fa391ca39523829c0dda6af7c99a5fe) ) /* Deuces Wild Poker */
@@ -9233,7 +9233,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
ROM_LOAD( "xp000038.u67", 0x00000, 0x10000, CRC(8707ab9e) SHA1(3e00a2ad8017e1495c6d6fe900d0efa68a1772b8) ) /* 09/05/95 @ IGT L95-2452 */
ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "x000725p.u66", 0x00000, 0x10000, CRC(a56f3910) SHA1(06d0d4a8722e033ff1fbe0947135952ce8274725) ) /* Double Bonus Poker */
+ ROM_LOAD( "x000725p.u66", 0x00000, 0x10000, CRC(a56f3910) SHA1(06d0d4a8722e033ff1fbe0947135952ce8274725) ) /* Double Bonus Poker 03/13/95 IGT MSI S */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2185.u77", 0x00000, 0x8000, CRC(7e64bd1a) SHA1(e988a380ee58078bf5bdc7747e83aed1393cfad8) ) /* 07/10/95 @ IGT L95-1506 */
@@ -9458,7 +9458,7 @@ Straights or Better on the initial deal PAY DOUBLE!
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002021p.u66", 0x00000, 0x10000, CRC(bf7f6f41) SHA1(c04fcab15da546929f8e15037f33cd99da4ae286) ) /* Lucky Deal Poker - 03/07/95 @ IGT L95-0833 */
@@ -9538,7 +9538,7 @@ PayTable 3K STR FL FH 4K SF RF 5K 5K 5A 4D 4D RF (Bonus)
ROM_LOAD( "xp000019.u67", 0x00000, 0x10000, CRC(8ac876eb) SHA1(105b4aee2692ccb20795586ccbdf722c59db66cf) )
ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "x002026p.u66", 0x00000, 0x10000, CRC(7fcbc10a) SHA1(5d50b356ae1a3461a5916b469f85b690b086e675) ) /* Deuces Wild Bonus Poker */
+ ROM_LOAD( "x002026p.u66", 0x00000, 0x10000, CRC(7fcbc10a) SHA1(5d50b356ae1a3461a5916b469f85b690b086e675) ) /* Deuces Wild Bonus Poker - 04/06/95 IGT CO */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2185.u77", 0x00000, 0x8000, CRC(7e64bd1a) SHA1(e988a380ee58078bf5bdc7747e83aed1393cfad8) ) /* 07/10/95 @ IGT L95-1506 */
@@ -9613,7 +9613,7 @@ PayTable 3K STR FL FH 4K SF RF 5K 5K 5A 4D 4D RF (Bonus)
ROM_LOAD( "xp000019.u67", 0x00000, 0x10000, CRC(8ac876eb) SHA1(105b4aee2692ccb20795586ccbdf722c59db66cf) )
ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "x002029p.u66", 0x00000, 0x10000, CRC(e2f6fb89) SHA1(4b60b580b00b4268d1cb9065ffe0d21f8fa6a931) ) /* Deuces Wild Bonus Poker */
+ ROM_LOAD( "x002029p.u66", 0x00000, 0x10000, CRC(e2f6fb89) SHA1(4b60b580b00b4268d1cb9065ffe0d21f8fa6a931) ) /* Deuces Wild Bonus Poker - 04/06/95 IGT L95-1001 */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2185.u77", 0x00000, 0x8000, CRC(7e64bd1a) SHA1(e988a380ee58078bf5bdc7747e83aed1393cfad8) ) /* 07/10/95 @ IGT L95-1506 */
@@ -9638,7 +9638,7 @@ Straights or Better on the initial deal PAY DOUBLE!
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002031p.u66", 0x00000, 0x10000, CRC(c883fbdd) SHA1(c0444ffdac1ffe542d0d6a65f3c810346e2b2e05) ) /* Lucky Deal Poker */
@@ -9663,7 +9663,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: X002033P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002033p.u66", 0x00000, 0x10000, CRC(c1c8f279) SHA1(f159d1f2b8c1632538af51cfbd995c1c8ec61ff6) ) /* White Hot Aces Poker */
@@ -9688,7 +9688,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: X002034P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002034p.u66", 0x00000, 0x10000, CRC(b1e6c19d) SHA1(fd8982bad9de099345a2570d44a603a885a68ed4) ) /* White Hot Aces Poker - 05/02/95 @ IGT L95-1148 */
@@ -9713,10 +9713,10 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: X002035P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "x002035p.u66", 0x00000, 0x10000, CRC(dc3f0742) SHA1(d57cf3353b81f41895458019e47203f98645f17a) ) /* White Hot Aces Poker */
+ ROM_LOAD( "x002035p.u66", 0x00000, 0x10000, CRC(dc3f0742) SHA1(d57cf3353b81f41895458019e47203f98645f17a) ) /* White Hot Aces Poker - 05/02/95 IGT CO */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2324.u77", 0x00000, 0x8000, CRC(6eceef42) SHA1(a2ddd2a3290c41e510f483c6b633fe0002694d0b) )
@@ -9738,10 +9738,10 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: X002036P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "x002036p.u66", 0x00000, 0x10000, CRC(69207baf) SHA1(fe038b969106ae5cdc8dde1c06497be9c7b5b8bf) ) /* White Hot Aces Poker */
+ ROM_LOAD( "x002036p.u66", 0x00000, 0x10000, CRC(69207baf) SHA1(fe038b969106ae5cdc8dde1c06497be9c7b5b8bf) ) /* White Hot Aces Poker - 05/02/95 IGT CO */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2324.u77", 0x00000, 0x8000, CRC(6eceef42) SHA1(a2ddd2a3290c41e510f483c6b633fe0002694d0b) )
@@ -9791,7 +9791,7 @@ PayTable Js+ 2PR 3K 3A STR FL FH 4K 4A SF RF (Bonus)
ROM_LOAD( "xp000038.u67", 0x00000, 0x10000, CRC(8707ab9e) SHA1(3e00a2ad8017e1495c6d6fe900d0efa68a1772b8) ) /* 09/05/95 @ IGT L95-2452 */
ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "x002038p.u66", 0x00000, 0x10000, CRC(58d01ba5) SHA1(6d4cde9c9e55967db2b661c7123cce9958a00639) ) /* Nevada Bonus Poker */
+ ROM_LOAD( "x002038p.u66", 0x00000, 0x10000, CRC(58d01ba5) SHA1(6d4cde9c9e55967db2b661c7123cce9958a00639) ) /* Nevada Bonus Poker - 05/02/95 IGT LA */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2185.u77", 0x00000, 0x8000, CRC(7e64bd1a) SHA1(e988a380ee58078bf5bdc7747e83aed1393cfad8) ) /* 07/10/95 @ IGT L95-1506 */
@@ -10178,7 +10178,7 @@ Designed and co-created by Best Bet Products
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) )
+ ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) ) /* 8/5/96 L96/1960 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002127p.u66", 0x00000, 0x10000, CRC(7e50b749) SHA1(37255823b7ccc2304875a46c6e798fee3b0ee4d1) ) /* Double Bonus Poker featuring "Your Property" Royals - 4/15/96 L96/0990 */
@@ -10210,7 +10210,7 @@ Designed and co-created by Best Bet Products
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) )
+ ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) ) /* 8/5/96 L96/1960 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002134p.u66", 0x00000, 0x10000, CRC(23c8bbad) SHA1(0a7b2836e180f5ac7900469550f28d2357fa1261) ) /* Faces 'n' Deuces Double Bonus - 4/15/96 L96/1375 */
@@ -10268,7 +10268,7 @@ Designed and co-created by Best Bet Products
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) )
+ ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) ) /* 8/5/96 L96/1960 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002152p.u66", 0x00000, 0x10000, CRC(10befd5e) SHA1(b5c6bebed5e5ed4e610be9a3f27a5bbb19b697be) ) /* Blackjack Poker - 4/18/96 L96/0978 */
@@ -10296,7 +10296,7 @@ SA$ - Sequential ACE$ pays the same as RF
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002172p.u66", 0x00000, 0x10000, CRC(d4c44409) SHA1(8082b76a51fa131751b8c2c446cb29fb04f531dc) ) /* Ace$ Bonus Poker - 05/09/96 @ IGT L96-1119 */
@@ -10324,7 +10324,7 @@ SA$ - Sequential ACE$ pays the same as RF
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002172p.u66", 0x00000, 0x10000, CRC(d4c44409) SHA1(8082b76a51fa131751b8c2c446cb29fb04f531dc) ) /* Ace$ Bonus Poker - 05/09/96 @ IGT L96-1119 */
@@ -10467,7 +10467,7 @@ Designed and co-created by Best Bet Products
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) )
+ ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) ) /* 8/5/96 L96/1960 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002211p.u66", 0x00000, 0x10000, CRC(ff677806) SHA1(e7d74c3de278df86c6900d6e2dbb3b12978fe969) ) /* Double Double Bonus with 3 Jacks - 08/9/96 L96/2013 */
@@ -10500,7 +10500,7 @@ Designed and co-created by Best Bet Products
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) )
+ ROM_LOAD( "xp000043.u67", 0x00000, 0x10000, CRC(630756ee) SHA1(b5582bdd0172ad926d4a7636c27afa3a0fbc0fd1) ) /* 8/5/96 L96/1960 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002236p.u66", 0x00000, 0x10000, CRC(44912158) SHA1(3c2323773277af31c220d7c3e6491694b9cfc5cc) ) /* Double Double Bonus with 3 Aces Poker */
@@ -10704,7 +10704,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002270p.u66", 0x00000, 0x10000, CRC(d3cffd4d) SHA1(6fcba550ee62d66f947aa5ab45b1e7dd66854475) ) /* Jackpot Poker */
@@ -10952,7 +10952,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K SF RF (Bonus)
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002297p.u66", 0x00000, 0x10000, CRC(7ebe809e) SHA1(5aafdf499455b8c96f6d780894cc442ed21e0dc2) ) /* Jackpot Poker */
@@ -11001,7 +11001,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: X002303P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002303p.u66", 0x00000, 0x10000, CRC(81cfd71b) SHA1(485a45412cad705d050b369c4cd1472a438374e8) ) /* White Hot Aces Poker */
@@ -11028,7 +11028,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A A,2-4 2-4 SF RF (Bonus)
Programs Available: X002306P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002306p.u66", 0x00000, 0x10000, CRC(ef36ea67) SHA1(8914ad20526fd63e14d9fa1901e9c779a11eb29d) ) /* Triple Double Bonus Poker */
@@ -11055,7 +11055,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A A,2-4 2-4 SF RF (Bonus)
Programs Available: X002307P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002307p.u66", 0x00000, 0x10000, CRC(c6d5db70) SHA1(017e1e382fb789e4cd8b410362ad5e82b61f61db) ) /* Triple Double Bonus Poker */
@@ -11082,7 +11082,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A A,2-4 2-4 SF RF (Bonus)
Programs Available: X002308P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002308p.u66", 0x00000, 0x10000, CRC(632fe9e4) SHA1(bb99a610f42aa32ad4729bb2bb4b99b4070977cf) ) /* Triple Double Bonus Poker - 03/05/97 @ IGT L97-0615 */
@@ -11109,7 +11109,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A A,2-4 2-4 SF RF (Bonus)
Programs Available: X002310P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002310p.u66", 0x00000, 0x10000, CRC(c006c3f1) SHA1(45c87a2f882147d1d132237cfa12ae47b202264f) ) /* Triple Double Bonus Poker */
@@ -11134,7 +11134,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: X002312P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002312p.u66", 0x00000, 0x10000, CRC(d3b405b5) SHA1(321ce89a12c7d4849379731f45482c567c25b3a1) ) /* Triple Bonus Poker Plus - 03/04/97 @ IGT L97-0619 */
@@ -11159,7 +11159,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: X002314P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002314p.u66", 0x00000, 0x10000, CRC(bfc0acf0) SHA1(a6b7c228a84d0ea224ad945964c53de2d44e4a8d) ) /* Triple Bonus Poker Plus */
@@ -11184,7 +11184,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4A SF RF (Bonus)
Programs Available: X002374P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002374p.u66", 0x00000, 0x10000, CRC(fc4b6c8d) SHA1(b101f9042bd54dbfdeed4c7a3acf3798096f6857) ) /* Super Aces Poker */
@@ -11209,7 +11209,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4K 4A SF RF (Bonus)
Programs Available: X002376P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002376p.u66", 0x00000, 0x10000, CRC(acc2b3fc) SHA1(01724f6dddccf1c84042b58829602713428476c1) ) /* Super Double Bonus Poker */
@@ -11234,7 +11234,7 @@ PayTable Js+ 2PR 3K STR FL FH 4K 4K 4K 4A SF RF (Bonus)
Programs Available: X002377P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) )
+ ROM_LOAD( "xp000112.u67", 0x00000, 0x10000, CRC(c1ae96ad) SHA1(da109602f0fbe9b225cdcd60be0613fd41014864) ) /* 06/05/98 IGT CO */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002377p.u66", 0x00000, 0x10000, CRC(541320d2) SHA1(670b17432e994fe1937091e5e96e1d58b9afbf29) ) /* Super Double Bonus Poker */
@@ -11286,7 +11286,7 @@ NOTE: This version uses 5 separate decks of cards, one deck for each HOLD button
ROM_LOAD( "xp000096.u67", 0x00000, 0x10000, CRC(5aca14e1) SHA1(13bcb8069f9d704983632bb60db119f7308f9d80) )
ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "x002412p.u66", 0x00000, 0x10000, CRC(43c250d1) SHA1(868a8ab1795b05c2e57a9b8bf3b2b6be688783e9) ) /* Deuces Wild Bonus Poker - French */
+ ROM_LOAD( "x002412p.u66", 0x00000, 0x10000, CRC(43c250d1) SHA1(868a8ab1795b05c2e57a9b8bf3b2b6be688783e9) ) /* Standard Draw with 5 decks - Two Pair or Better */
ROM_REGION( 0x020000, "gfx1", 0 )
ROM_LOAD( "mro-cg2315.u77", 0x00000, 0x8000, CRC(2c2bb000) SHA1(46135803c9a3066aaaccbf998d91ae3270ab99c4) ) /* 8-17-98 L97-0343 SHUFFLEMASTER NJ */
@@ -11389,7 +11389,7 @@ PayTable 3K STR FL FH 4K SF 5K RF 4D RF (Bonus)
Programs Available: PP0469, X002440P
*/
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) )
+ ROM_LOAD( "xp000053.u67", 0x00000, 0x10000, CRC(f4f1f986) SHA1(84cfc2c4a10ed24d3a971fe75041a4108ec1d7f2) ) /* 02/03/97 IGT L97-0535 */
ROM_REGION( 0x10000, "user1", 0 )
ROM_LOAD( "x002440p.u66", 0x00000, 0x10000, CRC(2ecb28cc) SHA1(a7b902bdfbf8f5ceedc778b8408c39ee279a1a1d) ) /* Deuces Wild Poker */
@@ -11824,7 +11824,7 @@ ROM_START( pex0006k ) /* Superboard : Keno (X000006K+XK000001) Paytable: 87-C, P
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg2120.u77", 0x00000, 0x8000, CRC(bb607f11) SHA1(575b5a0bea07864c2f7a42f4e5ff5c8d586b652d) )
+ ROM_LOAD( "mro-cg2120.u77", 0x00000, 0x8000, CRC(bb607f11) SHA1(575b5a0bea07864c2f7a42f4e5ff5c8d586b652d) ) /* 04/25/95 IGT L95-1503 */
ROM_LOAD( "mgo-cg2120.u78", 0x08000, 0x8000, CRC(aa5fc2a4) SHA1(576b06e01751d78bd948c4b0eef9c519750028c8) )
ROM_LOAD( "mbo-cg2120.u79", 0x10000, 0x8000, CRC(1f2f7d66) SHA1(56e0b6d05c148aa9262350cfcd0ae3a2fa7974c3) )
ROM_LOAD( "mxo-cg2120.u80", 0x18000, 0x8000, CRC(c4696495) SHA1(45b5ecba73cf590ac5685d951664bc73fdb02940) )
@@ -11833,15 +11833,15 @@ ROM_START( pex0006k ) /* Superboard : Keno (X000006K+XK000001) Paytable: 87-C, P
ROM_LOAD( "capx1267.u43", 0x0000, 0x0200, CRC(ce920b36) SHA1(1ddac0e227ac8210b314acbe92c6adb86800a45e) )
ROM_END
-ROM_START( pex0013k ) /* Superboard : Keno (X000013K+XK000001) Paytable: 91-D, Payout Percentage: 91.97 */
+ROM_START( pex0013k ) /* Superboard : Keno (X000013K+XK000011) Paytable: 91-D, Payout Percentage: 91.97 */
ROM_REGION( 0x10000, "maincpu", 0 )
- ROM_LOAD( "xk000011.u67", 0x00000, 0x10000, CRC(bad69e8d) SHA1(b742ba30654636e8f339cabcd13793f5452caf5a) )
+ ROM_LOAD( "xk000011.u67", 0x00000, 0x10000, CRC(bad69e8d) SHA1(b742ba30654636e8f339cabcd13793f5452caf5a) ) /* 09/09/99 IGT IN */
ROM_REGION( 0x10000, "user1", 0 )
- ROM_LOAD( "x000013k.u66", 0x00000, 0x10000, CRC(e8ed1053) SHA1(9f373ad28c341a0a586f4d077fbab4c93e4c0632) )
+ ROM_LOAD( "x000013k.u66", 0x00000, 0x10000, CRC(e8ed1053) SHA1(9f373ad28c341a0a586f4d077fbab4c93e4c0632) ) /* 01/22/95 IGT IN */
ROM_REGION( 0x020000, "gfx1", 0 )
- ROM_LOAD( "mro-cg2120.u77", 0x00000, 0x8000, CRC(bb607f11) SHA1(575b5a0bea07864c2f7a42f4e5ff5c8d586b652d) )
+ ROM_LOAD( "mro-cg2120.u77", 0x00000, 0x8000, CRC(bb607f11) SHA1(575b5a0bea07864c2f7a42f4e5ff5c8d586b652d) ) /* 04/25/95 IGT L95-1503 */
ROM_LOAD( "mgo-cg2120.u78", 0x08000, 0x8000, CRC(aa5fc2a4) SHA1(576b06e01751d78bd948c4b0eef9c519750028c8) )
ROM_LOAD( "mbo-cg2120.u79", 0x10000, 0x8000, CRC(1f2f7d66) SHA1(56e0b6d05c148aa9262350cfcd0ae3a2fa7974c3) )
ROM_LOAD( "mxo-cg2120.u80", 0x18000, 0x8000, CRC(c4696495) SHA1(45b5ecba73cf590ac5685d951664bc73fdb02940) )
diff --git a/src/mame/drivers/pet.cpp b/src/mame/drivers/pet.cpp
index 969834679a9..3a25ac12358 100644
--- a/src/mame/drivers/pet.cpp
+++ b/src/mame/drivers/pet.cpp
@@ -1522,11 +1522,11 @@ static MACHINE_CONFIG_START( pet, pet_state )
MCFG_IEEE488_SRQ_CALLBACK(DEVWRITELINE(M6520_2_TAG, pia6821_device, cb1_w))
MCFG_IEEE488_ATN_CALLBACK(DEVWRITELINE(M6520_2_TAG, pia6821_device, ca1_w))
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, cbm_datassette_devices, "c2n", DEVWRITELINE(M6520_1_TAG, pia6821_device, ca1_w))
- MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT2_TAG, cbm_datassette_devices, NULL, DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
- MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_8MHz/8, pet_expansion_cards, NULL)
+ MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT2_TAG, cbm_datassette_devices, nullptr, DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_8MHz/8, pet_expansion_cards, nullptr)
MCFG_PET_EXPANSION_SLOT_DMA_CALLBACKS(READ8(pet_state, read), WRITE8(pet_state, write))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, pet_user_port_cards, NULL)
+ MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, pet_user_port_cards, nullptr)
MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(pet_state, user_diag_w))
MCFG_PET_USER_PORT_B_HANDLER(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
MCFG_PET_USER_PORT_C_HANDLER(DEVWRITELINE(M6522_TAG, via6522_device, write_pa0))
@@ -1957,11 +1957,11 @@ static MACHINE_CONFIG_START( pet80, pet80_state )
MCFG_IEEE488_SRQ_CALLBACK(DEVWRITELINE(M6520_2_TAG, pia6821_device, cb1_w))
MCFG_IEEE488_ATN_CALLBACK(DEVWRITELINE(M6520_2_TAG, pia6821_device, ca1_w))
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, cbm_datassette_devices, "c2n", DEVWRITELINE(M6520_1_TAG, pia6821_device, ca1_w))
- MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT2_TAG, cbm_datassette_devices, NULL, DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
- MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_16MHz/16, pet_expansion_cards, NULL)
+ MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT2_TAG, cbm_datassette_devices, nullptr, DEVWRITELINE(M6522_TAG, via6522_device, write_cb1))
+ MCFG_PET_EXPANSION_SLOT_ADD(PET_EXPANSION_SLOT_TAG, XTAL_16MHz/16, pet_expansion_cards, nullptr)
MCFG_PET_EXPANSION_SLOT_DMA_CALLBACKS(READ8(pet_state, read), WRITE8(pet_state, write))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, pet_user_port_cards, NULL)
+ MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, pet_user_port_cards, nullptr)
MCFG_PET_USER_PORT_B_HANDLER(DEVWRITELINE(M6522_TAG, via6522_device, write_ca1))
MCFG_PET_USER_PORT_C_HANDLER(DEVWRITELINE(M6522_TAG, via6522_device, write_pa0))
MCFG_PET_USER_PORT_D_HANDLER(DEVWRITELINE(M6522_TAG, via6522_device, write_pa1))
diff --git a/src/mame/drivers/photon2.cpp b/src/mame/drivers/photon2.cpp
index 6f327d4833d..e132faa7ab6 100644
--- a/src/mame/drivers/photon2.cpp
+++ b/src/mame/drivers/photon2.cpp
@@ -388,7 +388,7 @@ ROM_END
ROM_START( brod )
ROM_REGION( 0x20000, "maincpu", 0 )
ROM_LOAD( "brod00.bin", 0x0000, 0x2000, CRC(cbd6653f) SHA1(18b9134529a1e56c6e90f3bcef5102d5d4b352e3) )
- ROM_FILL( 0x2000, 0x2000, 0x00 )
+ ROM_FILL( 0x2000, 0x2000, nullptr )
ROM_LOAD( "brod10.bin", 0x4000, 0x2000, CRC(9c25d44a) SHA1(f78c7e5b4e6f9fe34f81dc574ca335f70b61e68d) )
ROM_LOAD( "brod11.bin", 0x6000, 0x2000, CRC(f6505a16) SHA1(3b2ccca78fd83855003cc752766df83b19f89364) )
ROM_LOAD( "brod12.bin", 0x8000, 0x2000, CRC(94e53d47) SHA1(698415c5e25528e3b1dcab7471cc98c1dc9cb335) )
diff --git a/src/mame/drivers/photoply.cpp b/src/mame/drivers/photoply.cpp
index d1a0a758a2d..6c38e5f87eb 100644
--- a/src/mame/drivers/photoply.cpp
+++ b/src/mame/drivers/photoply.cpp
@@ -125,7 +125,7 @@ static MACHINE_CONFIG_START( photoply, photoply_state )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", photoply )
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
MCFG_FRAGMENT_ADD( pcvideo_vga )
diff --git a/src/mame/drivers/pinball2k.cpp b/src/mame/drivers/pinball2k.cpp
index 37666de9a8c..946209aeeb5 100644
--- a/src/mame/drivers/pinball2k.cpp
+++ b/src/mame/drivers/pinball2k.cpp
@@ -602,9 +602,9 @@ static MACHINE_CONFIG_START( mediagx, pinball2k_state )
MCFG_FRAGMENT_ADD( pcat_common )
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(18, NULL, cx5510_pci_r, cx5510_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(18, nullptr, cx5510_pci_r, cx5510_pci_w)
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
MCFG_RAMDAC_ADD("ramdac", ramdac_map, "palette")
diff --git a/src/mame/drivers/pinkiri8.cpp b/src/mame/drivers/pinkiri8.cpp
index 365f47b74c4..6a90c386acb 100644
--- a/src/mame/drivers/pinkiri8.cpp
+++ b/src/mame/drivers/pinkiri8.cpp
@@ -147,7 +147,7 @@ void janshi_vdp_device::device_reset() {}
const address_space_config *janshi_vdp_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
void pinkiri8_state::video_start() {}
diff --git a/src/mame/drivers/pipedrm.cpp b/src/mame/drivers/pipedrm.cpp
index c349cadd7de..2f38b839d67 100644
--- a/src/mame/drivers/pipedrm.cpp
+++ b/src/mame/drivers/pipedrm.cpp
@@ -873,9 +873,9 @@ ROM_START( hatris )
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b0-ic56.bin", 0x00000, 0x20000, CRC(34f337a4) SHA1(ad74bb3fbfd16c9e92daa1cf5c5e522d11ba7dfb) )
- ROM_FILL( 0x20000, 0x20000, 0 )
+ ROM_FILL( 0x20000, 0x20000, nullptr )
ROM_LOAD( "b1-ic73.bin", 0x40000, 0x08000, CRC(6351d0ba) SHA1(6d6b2e23f0569e625414de11803955df60bbbd48) )
- ROM_FILL( 0x48000, 0x18000, 0 )
+ ROM_FILL( 0x48000, 0x18000, nullptr )
ROM_REGION( 0x40000, "gfx2", 0 )
ROM_LOAD( "a0-ic55.bin", 0x00000, 0x20000, CRC(7b7bc619) SHA1(b661c772e33aa7352dcdc20c4a9a84ed25ff89d7) )
@@ -895,9 +895,9 @@ ROM_START( hatrisj )
ROM_REGION( 0x80000, "gfx1", 0 )
ROM_LOAD( "b0-ic56.bin", 0x00000, 0x20000, CRC(34f337a4) SHA1(ad74bb3fbfd16c9e92daa1cf5c5e522d11ba7dfb) )
- ROM_FILL( 0x20000, 0x20000, 0 )
+ ROM_FILL( 0x20000, 0x20000, nullptr )
ROM_LOAD( "b1-ic73.bin", 0x40000, 0x08000, CRC(6351d0ba) SHA1(6d6b2e23f0569e625414de11803955df60bbbd48) )
- ROM_FILL( 0x48000, 0x18000, 0 )
+ ROM_FILL( 0x48000, 0x18000, nullptr )
ROM_REGION( 0x40000, "gfx2", 0 )
ROM_LOAD( "a0-ic55.bin", 0x00000, 0x20000, CRC(7b7bc619) SHA1(b661c772e33aa7352dcdc20c4a9a84ed25ff89d7) )
diff --git a/src/mame/drivers/pipeline.cpp b/src/mame/drivers/pipeline.cpp
index c46934f1b4b..1d779d8640e 100644
--- a/src/mame/drivers/pipeline.cpp
+++ b/src/mame/drivers/pipeline.cpp
@@ -339,7 +339,7 @@ GFXDECODE_END
static const z80_daisy_config daisy_chain_sound[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
PALETTE_INIT_MEMBER(pipeline_state, pipeline)
diff --git a/src/mame/drivers/playmark.cpp b/src/mame/drivers/playmark.cpp
index b378aa5feaa..e6438cff2da 100644
--- a/src/mame/drivers/playmark.cpp
+++ b/src/mame/drivers/playmark.cpp
@@ -1597,19 +1597,19 @@ ROM_START( wbeachvl )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x1c0000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x080000, 0x0e0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x100000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x100000, 0x020000)
ROM_COPY( "user2", 0x0a0000, 0x120000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x140000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x140000, 0x020000)
ROM_COPY( "user2", 0x0c0000, 0x160000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x180000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x180000, 0x020000)
ROM_COPY( "user2", 0x0e0000, 0x1a0000, 0x020000)
ROM_END
@@ -1642,19 +1642,19 @@ ROM_START( wbeachvl2 )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x1c0000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x080000, 0x0e0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x100000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x100000, 0x020000)
ROM_COPY( "user2", 0x0a0000, 0x120000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x140000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x140000, 0x020000)
ROM_COPY( "user2", 0x0c0000, 0x160000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x180000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x180000, 0x020000)
ROM_COPY( "user2", 0x0e0000, 0x1a0000, 0x020000)
ROM_END
@@ -1687,19 +1687,19 @@ ROM_START( wbeachvl3 )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x1c0000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x080000, 0x0e0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x100000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x100000, 0x020000)
ROM_COPY( "user2", 0x0a0000, 0x120000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x140000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x140000, 0x020000)
ROM_COPY( "user2", 0x0c0000, 0x160000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x180000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x180000, 0x020000)
ROM_COPY( "user2", 0x0e0000, 0x1a0000, 0x020000)
ROM_END
@@ -1736,11 +1736,11 @@ ROM_START( excelsr )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0xc0000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
ROM_END
@@ -1777,11 +1777,11 @@ ROM_START( excelsra )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0xc0000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0a0000, 0x020000)
ROM_END
@@ -1815,10 +1815,10 @@ ROM_START( hrdtimes )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
ROM_CONTINUE( 0xe0000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x20000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x80000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0xc0000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x20000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x80000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0xc0000, 0x20000 )
ROM_END
/* Different revision of the PCB, uses larger gfx ROMs, however the content is the same */
@@ -1849,10 +1849,10 @@ ROM_START( hrdtimesa )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
ROM_CONTINUE( 0xe0000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x20000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x80000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0xc0000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x20000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x80000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0xc0000, 0x20000 )
ROM_END
/*
@@ -1929,8 +1929,8 @@ ROM_START( hotmind )
ROM_REGION( 0x80000, "oki", 0 ) /* Samples */
ROM_LOAD( "20.io13", 0x00000, 0x20000, CRC(0bf3a3e5) SHA1(2ae06f37a6bcd20bc5fbaa90d970aba2ebf3cf5a) )
ROM_CONTINUE( 0x60000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x20000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x20000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000 )
ROM_REGION( 0x8000, "plds", 0 ) /* These were read protected */
ROM_LOAD( "palce16v8h-25-pc4_u58.jed", 0x0000, 0xb89, BAD_DUMP CRC(ba88c1da) SHA1(9b55e96eee44a467bdfbf760137ccb2fb3afedf0) )
@@ -1972,8 +1972,8 @@ ROM_START( luckboomh )
ROM_REGION( 0x80000, "oki", 0 ) /* Samples */
ROM_LOAD( "20.io13", 0x00000, 0x20000, CRC(0d42c0a3) SHA1(1b1d4c7dcbb063e8bf133063770b753947d1a017) )
ROM_CONTINUE( 0x60000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x20000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x20000, 0x20000 )
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000 )
ROM_END
diff --git a/src/mame/drivers/plus4.cpp b/src/mame/drivers/plus4.cpp
index 77e4116f1f6..d46753aff88 100644
--- a/src/mame/drivers/plus4.cpp
+++ b/src/mame/drivers/plus4.cpp
@@ -171,7 +171,7 @@ UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int
break;
case CS0_FUNCTION_LO:
- if (m_function != NULL)
+ if (m_function != nullptr)
{
data = m_function->base()[offset & 0x7fff];
}
@@ -184,7 +184,7 @@ UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int
case CS0_C2_LOW:
c2l = 0;
- if (m_c2 != NULL)
+ if (m_c2 != nullptr)
{
data = m_c2->base()[offset & 0x7fff];
}
@@ -206,7 +206,7 @@ UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int
break;
case CS1_FUNCTION_HI:
- if (m_function != NULL)
+ if (m_function != nullptr)
{
data = m_function->base()[offset & 0x7fff];
}
@@ -219,7 +219,7 @@ UINT8 plus4_state::read_memory(address_space &space, offs_t offset, int ba, int
case CS1_C2_HIGH:
c2h = 0;
- if (m_c2 != NULL)
+ if (m_c2 != nullptr)
{
data = m_c2->base()[offset & 0x7fff];
}
@@ -749,7 +749,7 @@ static MACHINE_CONFIG_START( plus4, plus4_state )
// devices
MCFG_PLS100_ADD(PLA_TAG)
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, plus4_user_port_cards, NULL)
+ MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, plus4_user_port_cards, nullptr)
MCFG_PET_USER_PORT_4_HANDLER(DEVWRITELINE(MOS6529_USER_TAG, mos6529_device, write_p2)) // cassette sense
MCFG_PET_USER_PORT_5_HANDLER(DEVWRITELINE(MOS6529_USER_TAG, mos6529_device, write_p3))
MCFG_PET_USER_PORT_6_HANDLER(DEVWRITELINE(MOS6529_USER_TAG, mos6529_device, write_p4))
@@ -796,9 +796,9 @@ static MACHINE_CONFIG_START( plus4, plus4_state )
MCFG_CBM_IEC_ADD("c1541")
MCFG_CBM_IEC_BUS_ATN_CALLBACK(DEVWRITELINE(PET_USER_PORT_TAG, pet_user_port_device, write_9))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy")
- MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/16, plus4_expansion_cards, NULL)
+ MCFG_PLUS4_EXPANSION_SLOT_ADD(PLUS4_EXPANSION_SLOT_TAG, XTAL_14_31818MHz/16, plus4_expansion_cards, nullptr)
MCFG_PLUS4_EXPANSION_SLOT_IRQ_CALLBACK(WRITELINE(plus4_state, exp_irq_w))
MCFG_PLUS4_EXPANSION_SLOT_CD_INPUT_CALLBACK(READ8(plus4_state, read))
MCFG_PLUS4_EXPANSION_SLOT_CD_OUTPUT_CALLBACK(WRITE8(plus4_state, write))
diff --git a/src/mame/drivers/poisk1.cpp b/src/mame/drivers/poisk1.cpp
index fce63ee23ac..0ac808a8553 100644
--- a/src/mame/drivers/poisk1.cpp
+++ b/src/mame/drivers/poisk1.cpp
@@ -260,9 +260,9 @@ static MACHINE_CONFIG_START( poisk1, p1_state )
MCFG_ISA_OUT_IRQ5_CB(DEVWRITELINE("pic8259", pic8259_device, ir5_w))
MCFG_ISA_OUT_IRQ7_CB(DEVWRITELINE("pic8259", pic8259_device, ir7_w))
MCFG_ISA8_SLOT_ADD("isa", "isa1", p1_isa8_cards, "fdc", false)
- MCFG_ISA8_SLOT_ADD("isa", "isa2", p1_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("isa", "isa3", p1_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("isa", "isa4", p1_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("isa", "isa2", p1_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("isa", "isa3", p1_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("isa", "isa4", p1_isa8_cards, nullptr, false)
MCFG_CASSETTE_ADD( "cassette" )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_PLAY | CASSETTE_MOTOR_DISABLED | CASSETTE_SPEAKER_ENABLED)
diff --git a/src/mame/drivers/polyplay.cpp b/src/mame/drivers/polyplay.cpp
index bc9311a830b..f714f28dc77 100644
--- a/src/mame/drivers/polyplay.cpp
+++ b/src/mame/drivers/polyplay.cpp
@@ -250,7 +250,7 @@ static const gfx_layout charlayout_3_bit =
static GFXDECODE_START( polyplay )
GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout_1_bit, 0, 1 )
- GFXDECODE_ENTRY( NULL, 0xec00, charlayout_3_bit, 2, 1 )
+ GFXDECODE_ENTRY( nullptr, 0xec00, charlayout_3_bit, 2, 1 )
GFXDECODE_END
diff --git a/src/mame/drivers/portfoli.cpp b/src/mame/drivers/portfoli.cpp
index 5102997046c..66960292fda 100644
--- a/src/mame/drivers/portfoli.cpp
+++ b/src/mame/drivers/portfoli.cpp
@@ -862,7 +862,7 @@ static MACHINE_CONFIG_START( portfolio, portfolio_state )
MCFG_TIMER_DRIVER_ADD_PERIODIC("counter", portfolio_state, counter_tick, attotime::from_hz(XTAL_32_768kHz/16384))
MCFG_TIMER_DRIVER_ADD_PERIODIC(TIMER_TICK_TAG, portfolio_state, system_tick, attotime::from_hz(XTAL_32_768kHz/32768))
- 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(M82C50A_TAG, ins8250_uart_device, rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(M82C50A_TAG, ins8250_uart_device, dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(M82C50A_TAG, ins8250_uart_device, dsr_w))
diff --git a/src/mame/drivers/powerbal.cpp b/src/mame/drivers/powerbal.cpp
index dbdf096117e..239a4628d53 100644
--- a/src/mame/drivers/powerbal.cpp
+++ b/src/mame/drivers/powerbal.cpp
@@ -626,8 +626,8 @@ ROM_START( powerbal )
ROM_LOAD( "1.u16", 0x00000, 0x40000, CRC(12776dbc) SHA1(9ab9930fd581296642834d2cb4ba65264a588af3) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000)
- ROM_COPY( "oki", 0x00000, 0x80000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x80000, 0x20000)
ROM_REGION( 0x1200, "plds", 0 )
ROM_LOAD( "palce16v8h.u102", 0x0000, 0x0117, NO_DUMP ) /* PAL is read protected */
diff --git a/src/mame/drivers/primo.cpp b/src/mame/drivers/primo.cpp
index 65e40039316..7ad1739139c 100644
--- a/src/mame/drivers/primo.cpp
+++ b/src/mame/drivers/primo.cpp
@@ -274,12 +274,12 @@ static MACHINE_CONFIG_START( primoa32, primo_state )
MCFG_CASSETTE_DEFAULT_STATE(CASSETTE_STOPPED | CASSETTE_SPEAKER_ENABLED)
/* floppy from serial bus */
- MCFG_CBM_IEC_ADD(NULL)
+ MCFG_CBM_IEC_ADD(nullptr)
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_plain_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot1", generic_plain_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_CARTSLOT_ADD("cartslot2", generic_plain_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot2", generic_plain_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/proconn.cpp b/src/mame/drivers/proconn.cpp
index 2b7fca581c5..8d4ef9b730b 100644
--- a/src/mame/drivers/proconn.cpp
+++ b/src/mame/drivers/proconn.cpp
@@ -305,7 +305,7 @@ static const z80_daisy_config z80_daisy_chain[] =
{
{ "z80ctc" },
{ "z80sio" },
- { NULL }
+ { nullptr }
};
void proconn_state::machine_reset()
diff --git a/src/mame/drivers/prof80.cpp b/src/mame/drivers/prof80.cpp
index 4a7d205ce32..1fb8c811930 100644
--- a/src/mame/drivers/prof80.cpp
+++ b/src/mame/drivers/prof80.cpp
@@ -512,20 +512,20 @@ static MACHINE_CONFIG_START( prof80, prof80_state )
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)
- MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":2", prof80_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":3", prof80_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":2", prof80_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(UPD765_TAG ":3", prof80_floppies, nullptr, floppy_image_device::default_floppy_formats)
// ECB bus
MCFG_ECBBUS_ADD()
MCFG_ECBBUS_SLOT_ADD(1, "ecb_1", ecbbus_cards, "grip21")
- MCFG_ECBBUS_SLOT_ADD(2, "ecb_2", ecbbus_cards, NULL)
- MCFG_ECBBUS_SLOT_ADD(3, "ecb_3", ecbbus_cards, NULL)
- MCFG_ECBBUS_SLOT_ADD(4, "ecb_4", ecbbus_cards, NULL)
- MCFG_ECBBUS_SLOT_ADD(5, "ecb_5", ecbbus_cards, NULL)
+ MCFG_ECBBUS_SLOT_ADD(2, "ecb_2", ecbbus_cards, nullptr)
+ MCFG_ECBBUS_SLOT_ADD(3, "ecb_3", ecbbus_cards, nullptr)
+ MCFG_ECBBUS_SLOT_ADD(4, "ecb_4", ecbbus_cards, nullptr)
+ MCFG_ECBBUS_SLOT_ADD(5, "ecb_5", ecbbus_cards, nullptr)
// V24
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
// internal ram
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mame/drivers/proteus3.cpp b/src/mame/drivers/proteus3.cpp
index dabf6d29957..34d0111d58a 100644
--- a/src/mame/drivers/proteus3.cpp
+++ b/src/mame/drivers/proteus3.cpp
@@ -376,7 +376,7 @@ ROM_START(proteus3)
ROMX_LOAD( "bas5.bin", 0xe800, 0x0800, CRC(bd81bb34) SHA1(6325735e5750a9536e63b67048f74711fae1fa42), ROM_BIOS(1) )
ROMX_LOAD( "bas6.bin", 0xf000, 0x0800, CRC(60cd006b) SHA1(28354f78490da1eb5116cbbc43eaca0670f7f398), ROM_BIOS(1) )
ROMX_LOAD( "bas7.bin", 0xf800, 0x0800, CRC(84c3dc22) SHA1(8fddba61b5f0270ca2daef32ab5edfd60300c776), ROM_BIOS(1) )
- ROM_FILL( 0xc000, 1, 0 ) // if c000 isn't 0 it assumes a rom is there and jumps to it
+ ROM_FILL( 0xc000, 1, nullptr ) // if c000 isn't 0 it assumes a rom is there and jumps to it
ROM_SYSTEM_BIOS( 1, "8k", "8k BASIC")
ROMX_LOAD( "proteus3_basic8k.m0", 0xe000, 0x2000, CRC(7d9111c2) SHA1(3c032c9c7f87d22a1a9819b3b812be84404d2ad2), ROM_BIOS(2) )
diff --git a/src/mame/drivers/psikyo.cpp b/src/mame/drivers/psikyo.cpp
index adcc50dd6c0..906bd5fd00a 100644
--- a/src/mame/drivers/psikyo.cpp
+++ b/src/mame/drivers/psikyo.cpp
@@ -1887,7 +1887,7 @@ DRIVER_INIT_MEMBER(psikyo_state,tengai)
m_maincpu->space(AS_PROGRAM).install_write_handler(0xc00004, 0xc0000b, write32_delegate(FUNC(psikyo_state::s1945_mcu_w),this));
s1945_mcu_init();
- m_s1945_mcu_table = 0;
+ m_s1945_mcu_table = nullptr;
m_ka302c_banking = 0; // Banking is controlled by mcu
diff --git a/src/mame/drivers/psikyo4.cpp b/src/mame/drivers/psikyo4.cpp
index 17e0224ef35..b1c04ab7ae8 100644
--- a/src/mame/drivers/psikyo4.cpp
+++ b/src/mame/drivers/psikyo4.cpp
@@ -296,13 +296,13 @@ WRITE32_MEMBER(psikyo4_state::io_select_w)
{
UINT32 bankdata = data >> 16;
UINT32 bankmask = mem_mask >> 16;
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_ymf_bank)
{
if (bankmask & 0x0f)
{
int banknum = bankdata & 0x0f;
if (banknum < m_ymf_max_bank)
- m_ymf_bank[i]->set_entry(banknum);
+ elem->set_entry(banknum);
}
bankdata >>= 4;
bankmask >>= 4;
@@ -351,7 +351,7 @@ static INPUT_PORTS_START( hotgmck )
PORT_START("P1_P2")
PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "SYSTEM")
PORT_BIT( 0x00ffff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state,mahjong_ctrl_r, (void *)0)
+ PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state,mahjong_ctrl_r, (void *)nullptr)
PORT_START("P3_P4")
PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, driver_device,custom_port_read, "SYSTEM")
diff --git a/src/mame/drivers/pt68k4.cpp b/src/mame/drivers/pt68k4.cpp
index f9c840660e7..33ab39dc80c 100644
--- a/src/mame/drivers/pt68k4.cpp
+++ b/src/mame/drivers/pt68k4.cpp
@@ -193,8 +193,8 @@ WRITE8_MEMBER(pt68k4_state::fdc_select_w)
{
floppy_connector *con = machine().device<floppy_connector>(WDFDC_TAG":0");
floppy_connector *con2 = machine().device<floppy_connector>(WDFDC_TAG":1");
- floppy_image_device *floppy = con ? con->get_device() : 0;
- floppy_image_device *floppy2 = con2 ? con2->get_device() : 0;
+ floppy_image_device *floppy = con ? con->get_device() : nullptr;
+ floppy_image_device *floppy2 = con2 ? con2->get_device() : nullptr;
int drive = data & 3;
if (drive != m_lastdrive)
@@ -210,7 +210,7 @@ WRITE8_MEMBER(pt68k4_state::fdc_select_w)
break;
default:
- m_wdfdc->set_floppy(NULL);
+ m_wdfdc->set_floppy(nullptr);
break;
}
@@ -330,7 +330,7 @@ void pt68k4_state::machine_reset()
if (m_wdfdc)
{
floppy_connector *con = machine().device<floppy_connector>(WDFDC_TAG":0");
- floppy_image_device *floppy = con ? con->get_device() : 0;
+ floppy_image_device *floppy = con ? con->get_device() : nullptr;
m_wdfdc->set_floppy(floppy);
floppy->ss_w(0);
@@ -407,11 +407,11 @@ static MACHINE_CONFIG_START( pt68k2, pt68k4_state )
MCFG_ISA8_BUS_CUSTOM_SPACES()
MCFG_ISA_OUT_IRQ5_CB(WRITELINE(pt68k4_state, irq5_w))
MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa1", pt68k4_isa8_cards, "cga", false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa2", pt68k4_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa3", pt68k4_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa4", pt68k4_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa5", pt68k4_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa6", pt68k4_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa2", pt68k4_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa3", pt68k4_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa4", pt68k4_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa5", pt68k4_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa6", pt68k4_isa8_cards, nullptr, false)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
@@ -444,11 +444,11 @@ static MACHINE_CONFIG_START( pt68k4, pt68k4_state )
MCFG_ISA8_BUS_CUSTOM_SPACES()
MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa1", pt68k4_isa8_cards, "fdc_at", false)
MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa2", pt68k4_isa8_cards, "cga", false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa3", pt68k4_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa4", pt68k4_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa5", pt68k4_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa6", pt68k4_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa7", pt68k4_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa3", pt68k4_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa4", pt68k4_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa5", pt68k4_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa6", pt68k4_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD(ISABUS_TAG, "isa7", pt68k4_isa8_cards, nullptr, false)
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD(SPEAKER_TAG, SPEAKER_SOUND, 0)
diff --git a/src/mame/drivers/pulsar.cpp b/src/mame/drivers/pulsar.cpp
index b44cc9c8e6a..48030adce83 100644
--- a/src/mame/drivers/pulsar.cpp
+++ b/src/mame/drivers/pulsar.cpp
@@ -125,7 +125,7 @@ TIMER_CALLBACK_MEMBER( pulsar_state::pulsar_reset)
static const z80_daisy_config daisy_chain_intf[] =
{
{ "z80dart" },
- { NULL }
+ { nullptr }
};
/*
@@ -137,7 +137,7 @@ d7 XMEMEX line (for external memory, not emulated)
*/
WRITE8_MEMBER( pulsar_state::ppi_pa_w )
{
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
m_fdc->set_floppy(m_floppy);
m_fdc->dden_w(BIT(data, 5));
diff --git a/src/mame/drivers/pve500.cpp b/src/mame/drivers/pve500.cpp
index 9bc202d51e1..9f5c1e07e25 100644
--- a/src/mame/drivers/pve500.cpp
+++ b/src/mame/drivers/pve500.cpp
@@ -105,7 +105,7 @@ static const z80_daisy_config maincpu_daisy_chain[] =
TMPZ84C015_DAISY_INTERNAL,
{ "external_ctc" },
{ "external_sio" },
- { NULL }
+ { nullptr }
};
@@ -387,22 +387,22 @@ static MACHINE_CONFIG_START( pve500, pve500_state )
MCFG_EEPROM_SERIAL_MSM16911_8BIT_ADD("eeprom")
/* FIX-ME: These are actually RS422 ports (except EDL IN/OUT which is indeed an RS232 port)*/
- MCFG_RS232_PORT_ADD("recorder", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("recorder", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("maincpu", tmpz84c015_device, rxa_w))
- MCFG_RS232_PORT_ADD("player1", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("player1", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("maincpu", tmpz84c015_device, rxb_w))
- MCFG_RS232_PORT_ADD("player2", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("player2", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("external_sio", z80dart_device, rxa_w))
- MCFG_RS232_PORT_ADD("edl_inout", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("edl_inout", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("external_sio", z80dart_device, rxb_w))
- MCFG_RS232_PORT_ADD("switcher", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("switcher", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("subcpu", tmpz84c015_device, rxa_w))
- MCFG_RS232_PORT_ADD("serial_mixer", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("serial_mixer", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("subcpu", tmpz84c015_device, rxb_w))
/* ICF5: 2kbytes of RAM shared between the two CPUs (dual-port RAM)*/
diff --git a/src/mame/drivers/px4.cpp b/src/mame/drivers/px4.cpp
index 0b01d174aec..8244b5434b7 100644
--- a/src/mame/drivers/px4.cpp
+++ b/src/mame/drivers/px4.cpp
@@ -61,12 +61,12 @@ public:
m_sio(*this, "sio"),
m_rs232(*this, "rs232"),
m_caps1(*this, "capsule1"), m_caps2(*this, "capsule2"),
- m_caps1_rom(NULL), m_caps2_rom(NULL),
+ m_caps1_rom(nullptr), m_caps2_rom(nullptr),
m_ctrl1(0), m_icrb(0), m_bankr(0),
m_isr(0), m_ier(0), m_str(0), m_sior(0xbf),
m_frc_value(0), m_frc_latch(0),
m_vadr(0), m_yoff(0),
- m_receive_timer(NULL), m_transmit_timer(NULL),
+ m_receive_timer(nullptr), m_transmit_timer(nullptr),
m_artdir(0xff), m_artdor(0xff), m_artsr(0), m_artcr(0),
m_swr(0),
m_one_sec_int_enabled(true), m_alarm_int_enabled(true), m_key_int_enabled(true),
@@ -257,7 +257,7 @@ public:
m_rdnvram(*this, "rdnvram"),
m_rdsocket(*this, "ramdisk_socket"),
m_ramdisk_address(0),
- m_ramdisk(NULL)
+ m_ramdisk(nullptr)
{ }
DECLARE_DRIVER_INIT( px4p );
@@ -1349,23 +1349,23 @@ static INPUT_PORTS_START( px4_h450a )
PORT_INCLUDE(px4_dips)
PORT_START("keyboard_0")
- PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(ESC)) // 00
- PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(PAUSE)) // 01
- PORT_BIT(0x00000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_NAME("Help") // 02
- PORT_BIT(0x00000008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_NAME("PF1") // 03
- PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_NAME("PF2") // 04
- PORT_BIT(0x00000020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_NAME("PF3") // 05
- PORT_BIT(0x00000040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_NAME("PF4") // 06
- PORT_BIT(0x00000080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_NAME("PF5") // 07
+ PORT_BIT(0x00000001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(ESC)) // 00
+ PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(PAUSE)) // 01
+ PORT_BIT(0x00000004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_NAME("Help") // 02
+ PORT_BIT(0x00000008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_NAME("PF1") // 03
+ PORT_BIT(0x00000010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_NAME("PF2") // 04
+ PORT_BIT(0x00000020, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_NAME("PF3") // 05
+ PORT_BIT(0x00000040, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_NAME("PF4") // 06
+ PORT_BIT(0x00000080, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_NAME("PF5") // 07
PORT_BIT(0x0000ff00, IP_ACTIVE_HIGH, IPT_UNUSED) // 08-0f
- PORT_BIT(0x00010000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(CANCEL)) PORT_NAME("Stop") // 10
- PORT_BIT(0x00020000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') // 11
- PORT_BIT(0x00040000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') // 12
- PORT_BIT(0x00080000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') // 13
- PORT_BIT(0x00100000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') // 14
- PORT_BIT(0x00200000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') // 15
- PORT_BIT(0x00400000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') // 16
- PORT_BIT(0x00800000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)0) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') // 17
+ PORT_BIT(0x00010000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(CANCEL)) PORT_NAME("Stop") // 10
+ PORT_BIT(0x00020000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') // 11
+ PORT_BIT(0x00040000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') // 12
+ PORT_BIT(0x00080000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') // 13
+ PORT_BIT(0x00100000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR('$') // 14
+ PORT_BIT(0x00200000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') // 15
+ PORT_BIT(0x00400000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') // 16
+ PORT_BIT(0x00800000, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CHANGED_MEMBER(DEVICE_SELF, px4_state, key_callback, (void *)nullptr) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('\'') // 17
PORT_BIT(0xff000000, IP_ACTIVE_HIGH, IPT_UNUSED) // 18-1f
PORT_START("keyboard_1")
@@ -1520,12 +1520,12 @@ static MACHINE_CONFIG_START( px4, px4_state )
MCFG_TIMER_DRIVER_ADD("extcas_timer", px4_state, ext_cassette_read)
// sio port
- MCFG_EPSON_SIO_ADD("sio", NULL)
+ MCFG_EPSON_SIO_ADD("sio", nullptr)
MCFG_EPSON_SIO_RX(WRITELINE(px4_state, sio_rx_w))
MCFG_EPSON_SIO_PIN(WRITELINE(px4_state, sio_pin_w))
// rs232 port
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(px4_state, rs232_rx_w))
MCFG_RS232_DCD_HANDLER(WRITELINE(px4_state, rs232_dcd_w))
MCFG_RS232_DSR_HANDLER(WRITELINE(px4_state, rs232_dsr_w))
diff --git a/src/mame/drivers/px8.cpp b/src/mame/drivers/px8.cpp
index f243f8a9e63..6af4feed268 100644
--- a/src/mame/drivers/px8.cpp
+++ b/src/mame/drivers/px8.cpp
@@ -789,10 +789,10 @@ static MACHINE_CONFIG_START( px8, px8_state )
MCFG_SOUND_ROUTE(0, "mono", 0.25)
/* cartridge */
- MCFG_GENERIC_CARTSLOT_ADD("capsule1", generic_plain_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("capsule1", generic_plain_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
- MCFG_GENERIC_CARTSLOT_ADD("capsule2", generic_plain_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("capsule2", generic_plain_slot, nullptr)
MCFG_GENERIC_EXTENSIONS("bin,rom")
/* devices */
diff --git a/src/mame/drivers/pzletime.cpp b/src/mame/drivers/pzletime.cpp
index 72d5e3ac1ed..e9ae94b024c 100644
--- a/src/mame/drivers/pzletime.cpp
+++ b/src/mame/drivers/pzletime.cpp
@@ -377,13 +377,13 @@ ROM_START( pzletime )
ROM_LOAD( "12.bin", 0x00000, 0x80000, CRC(203897c1) SHA1(c2495871c796bc7f2dabca1630317313b5aa740a) )
ROM_REGION( 0x100000, "oki", 0 )
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000 )
- ROM_COPY( "user1", 0x000000, 0x020000, 0x020000 )
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000 )
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000 )
+ ROM_COPY( "user1", nullptr, 0x020000, 0x020000 )
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000 )
ROM_COPY( "user1", 0x020000, 0x060000, 0x020000 )
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000 )
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000 )
ROM_COPY( "user1", 0x040000, 0x0a0000, 0x020000 )
- ROM_COPY( "user1", 0x000000, 0x0c0000, 0x020000 )
+ ROM_COPY( "user1", nullptr, 0x0c0000, 0x020000 )
ROM_COPY( "user1", 0x060000, 0x0e0000, 0x020000 )
ROM_REGION( 0x80000, "gfx1", 0 )
diff --git a/src/mame/drivers/qdrmfgp.cpp b/src/mame/drivers/qdrmfgp.cpp
index 7da7012633c..cfc4084b392 100644
--- a/src/mame/drivers/qdrmfgp.cpp
+++ b/src/mame/drivers/qdrmfgp.cpp
@@ -581,7 +581,7 @@ static MACHINE_CONFIG_START( qdrmfgp, qdrmfgp_state )
MCFG_MACHINE_START_OVERRIDE(qdrmfgp_state,qdrmfgp)
MCFG_NVRAM_ADD_1FILL("nvram")
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(qdrmfgp_state, ide_interrupt))
/* video hardware */
@@ -628,7 +628,7 @@ static MACHINE_CONFIG_START( qdrmfgp2, qdrmfgp_state )
MCFG_MACHINE_START_OVERRIDE(qdrmfgp_state,qdrmfgp2)
MCFG_NVRAM_ADD_1FILL("nvram")
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(qdrmfgp_state, gp2_ide_interrupt))
/* video hardware */
diff --git a/src/mame/drivers/ql.cpp b/src/mame/drivers/ql.cpp
index d2e0d0e17aa..9822373350b 100644
--- a/src/mame/drivers/ql.cpp
+++ b/src/mame/drivers/ql.cpp
@@ -821,17 +821,17 @@ static MACHINE_CONFIG_START( ql, ql_state )
MCFG_MICRODRIVE_COMMS_OUT_CALLBACK(DEVWRITELINE(MDV_2, microdrive_image_device, comms_in_w))
MCFG_MICRODRIVE_ADD(MDV_2)
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL) // wired as DCE
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL) // wired as DTE
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr) // wired as DCE
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr) // wired as DTE
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(ZX8302_TAG, zx8302_device, write_cts2))
- MCFG_QL_EXPANSION_SLOT_ADD("exp", ql_expansion_cards, NULL)
+ MCFG_QL_EXPANSION_SLOT_ADD("exp", ql_expansion_cards, nullptr)
//MCFG_QL_EXPANSION_SLOT_IPL0L_CALLBACK()
//MCFG_QL_EXPANSION_SLOT_IPL1L_CALLBACK()
//MCFG_QL_EXPANSION_SLOT_BERRL_CALLBACK()
MCFG_QL_EXPANSION_SLOT_EXTINTL_CALLBACK(WRITELINE(ql_state, exp_extintl_w))
- MCFG_QL_ROM_CARTRIDGE_SLOT_ADD("rom", ql_rom_cartridge_cards, NULL)
+ MCFG_QL_ROM_CARTRIDGE_SLOT_ADD("rom", ql_rom_cartridge_cards, nullptr)
MCFG_DEVICE_ADD(QIMI_TAG, QIMI, 0)
MCFG_QIMI_EXTINT_CALLBACK(WRITELINE(ql_state, qimi_extintl_w))
diff --git a/src/mame/drivers/queen.cpp b/src/mame/drivers/queen.cpp
index d6899a3d04d..36e2348691b 100644
--- a/src/mame/drivers/queen.cpp
+++ b/src/mame/drivers/queen.cpp
@@ -279,13 +279,13 @@ static MACHINE_CONFIG_START( queen, queen_state )
MCFG_FRAGMENT_ADD( pcat_common )
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, intel82439tx_pci_r, intel82439tx_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(7, nullptr, intel82371ab_pci_r, intel82371ab_pci_w)
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
- MCFG_IDE_CONTROLLER_32_ADD("ide2", ata_devices, NULL, NULL, true)
+ MCFG_IDE_CONTROLLER_32_ADD("ide2", ata_devices, nullptr, nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir7_w))
/* video hardware */
diff --git a/src/mame/drivers/qx10.cpp b/src/mame/drivers/qx10.cpp
index 1e1ca26f738..9e0b5fc4b62 100644
--- a/src/mame/drivers/qx10.cpp
+++ b/src/mame/drivers/qx10.cpp
@@ -350,7 +350,7 @@ READ8_MEMBER( qx10_state::qx10_30_r )
return m_fdcint |
/*m_fdcmotor*/ 0 << 1 |
- ((floppy1 != NULL) || (floppy2 != NULL) ? 1 : 0) << 3 |
+ ((floppy1 != nullptr) || (floppy2 != nullptr) ? 1 : 0) << 3 |
m_membank << 4;
}
@@ -749,7 +749,7 @@ static MACHINE_CONFIG_START( qx10, qx10_state )
MCFG_FLOPPY_DRIVE_ADD("upd765:0", qx10_floppies, "525dd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("upd765:1", qx10_floppies, "525dd", floppy_image_device::default_floppy_formats)
- 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("upd7201", upd7201_device, rxb_w))
MCFG_RS232_PORT_ADD("kbd", keyboard, "qx10")
diff --git a/src/mame/drivers/r2dx_v33.cpp b/src/mame/drivers/r2dx_v33.cpp
index 27561bbe8e5..81c2c62b9b0 100644
--- a/src/mame/drivers/r2dx_v33.cpp
+++ b/src/mame/drivers/r2dx_v33.cpp
@@ -1020,7 +1020,7 @@ ROM_START( nzeroteam ) /* V33 SYSTEM TYPE_B hardware, uses SEI333 (AKA COPX-D3)
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "sound", 0x000000, 0x08000, CRC(7ec1fbc3) SHA1(48299d6530f641b18764cc49e283c347d0918a47) ) /* Same as some of other Zero Team sets */
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "fix1", 0x000000, 0x010000, CRC(0c4895b0) SHA1(f595dbe5a19edb8a06ea60105ee26b95db4a2619) )
@@ -1050,7 +1050,7 @@ ROM_START( zerotm2k ) /* V33 SYSTEM TYPE_C VER2 hardware, uses SEI333 (AKA COPX-
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "syz-02.u019", 0x000000, 0x08000, CRC(55371073) SHA1(f6e182fa64630595dc8c25ac820e12983cfbed12) ) /* PCB silkscreened SOUND */
ROM_CONTINUE( 0x010000, 0x08000 ) /* banked stuff */
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "syz-04.u0616", 0x000000, 0x010000, CRC(3515a45f) SHA1(a25a7e23a5d9cf5a95a0d0e828848a8d223bdf51) ) /* PCB silkscreened FIX E */
diff --git a/src/mame/drivers/raiden.cpp b/src/mame/drivers/raiden.cpp
index 97b74c6c947..cc882b6d53c 100644
--- a/src/mame/drivers/raiden.cpp
+++ b/src/mame/drivers/raiden.cpp
@@ -363,7 +363,7 @@ ROM_START( raiden ) /* from a board with 2 daughter cards, no official board #s?
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "8.u212", 0x000000, 0x08000, CRC(cbe055c7) SHA1(34a06a541d059c621d87fdf41546c9d052a61963) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x010000, "gfx1", 0 ) /* Chars */
ROM_LOAD( "9", 0x00000, 0x08000, CRC(1922b25e) SHA1(da27122dd1c43770e7385ad602ef397c64d2f754) ) /* On some PCBs there is no explicit */
@@ -396,7 +396,7 @@ ROM_START( raidena )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "8.u212", 0x000000, 0x08000, CRC(cbe055c7) SHA1(34a06a541d059c621d87fdf41546c9d052a61963) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x010000, "gfx1", 0 ) /* Chars */
ROM_LOAD( "9", 0x00000, 0x08000, CRC(1922b25e) SHA1(da27122dd1c43770e7385ad602ef397c64d2f754) ) /* On some PCBs there is no explicit */
@@ -429,7 +429,7 @@ ROM_START( raident )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "8.u212", 0x000000, 0x08000, CRC(cbe055c7) SHA1(34a06a541d059c621d87fdf41546c9d052a61963) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x010000, "gfx1", 0 ) /* Chars */
ROM_LOAD( "9", 0x00000, 0x08000, CRC(1922b25e) SHA1(da27122dd1c43770e7385ad602ef397c64d2f754) ) /* On some PCBs there is no explicit */
@@ -462,7 +462,7 @@ ROM_START( raidenu )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "8.u212", 0x000000, 0x08000, CRC(cbe055c7) SHA1(34a06a541d059c621d87fdf41546c9d052a61963) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x010000, "gfx1", 0 ) /* Chars */
ROM_LOAD( "9", 0x00000, 0x08000, CRC(1922b25e) SHA1(da27122dd1c43770e7385ad602ef397c64d2f754) ) /* On some PCBs there is no explicit */
@@ -495,7 +495,7 @@ ROM_START( raidenk ) /* Same board as above. Not sure why the sound CPU would be
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "8b.u212", 0x000000, 0x08000, CRC(99ee7505) SHA1(b97c8ee5e26e8554b5de506fba3b32cc2fde53c9) ) /* Not encrypted */
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x010000, "gfx1", 0 ) /* Chars */
ROM_LOAD( "9", 0x00000, 0x08000, CRC(1922b25e) SHA1(da27122dd1c43770e7385ad602ef397c64d2f754) ) /* On some PCBs there is no explicit */
@@ -528,7 +528,7 @@ ROM_START( raidenb )/* Different hardware, Main & Sub CPU code not encrypted. */
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "rai6.u212", 0x000000, 0x08000, CRC(723a483b) SHA1(50e67945e83ea1748fb748de3287d26446d4e0a0) ) /* Should be labeled "8" ??? */
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x010000, "gfx1", 0 ) /* Chars */
ROM_LOAD( "9", 0x00000, 0x08000, CRC(1922b25e) SHA1(da27122dd1c43770e7385ad602ef397c64d2f754) ) /* On some PCBs there is no explicit */
@@ -565,7 +565,7 @@ ROM_START( raidenua )/* Different hardware, Main, Sub & sound CPU code not encry
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "8.w8", 0x00000, 0x08000, CRC(105b9c11) SHA1(eb142806f8410d584d914b91207361a15ab18e6f) )
ROM_CONTINUE( 0x10000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x18000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x18000, 0x08000 )
ROM_REGION( 0x010000, "gfx1", 0 ) /* Chars */
ROM_LOAD( "9", 0x00000, 0x08000, CRC(1922b25e) SHA1(da27122dd1c43770e7385ad602ef397c64d2f754) ) /* U016 on this PCB */
diff --git a/src/mame/drivers/raiden2.cpp b/src/mame/drivers/raiden2.cpp
index 888a9663a10..661f7fd9e27 100644
--- a/src/mame/drivers/raiden2.cpp
+++ b/src/mame/drivers/raiden2.cpp
@@ -366,7 +366,7 @@ WRITE16_MEMBER(raiden2_state::tile_scroll_w)
COMBINE_DATA(scrollvals + offset);
data = scrollvals[offset];
- tilemap_t *tm = 0;
+ tilemap_t *tm = nullptr;
switch(offset/2) {
case 0: tm = background_layer; break;
case 1: tm = midground_layer; break;
@@ -1559,7 +1559,7 @@ ROM_START( raiden2 )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "snd.u1110", 0x000000, 0x08000, CRC(f51a28f9) SHA1(7ae2e2ba0c8159a544a8fd2bb0c2c694ba849302) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "seibu7.u0724", 0x000000, 0x020000, CRC(c9ec9469) SHA1(a29f480a1bee073be7a177096ef58e1887a5af24) ) /* PCB silkscreened FX0 */
@@ -1599,7 +1599,7 @@ ROM_START( raiden2sw ) // original board with serial # 0008307
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "seibu_5.u1110", 0x000000, 0x08000, CRC(c2028ba2) SHA1(f6a9322b669ff82dea6ecf52ad3bd5d0901cce1b) ) // 99.993896% match
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "seibu_7.u0724", 0x000000, 0x020000, CRC(c9ec9469) SHA1(a29f480a1bee073be7a177096ef58e1887a5af24) ) /* PCB silkscreened FX0 */
@@ -1656,7 +1656,7 @@ ROM_START( raiden2hk )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "seibu5.u1110", 0x000000, 0x08000, CRC(8f130589) SHA1(e58c8beaf9f27f063ffbcb0ab4600123c25ce6f3) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "seibu7.u0724", 0x000000, 0x020000, CRC(c9ec9469) SHA1(a29f480a1bee073be7a177096ef58e1887a5af24) ) /* PCB silkscreened FX0 */
@@ -1730,7 +1730,7 @@ ROM_START( raiden2j )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "seibu5.u1110", 0x000000, 0x08000, CRC(8f130589) SHA1(e58c8beaf9f27f063ffbcb0ab4600123c25ce6f3) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "seibu7.u0724", 0x000000, 0x020000, CRC(c9ec9469) SHA1(a29f480a1bee073be7a177096ef58e1887a5af24) ) /* PCB silkscreened FX0 */
@@ -1769,7 +1769,7 @@ ROM_START( raiden2i )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "seibu5.c.u1110", 0x000000, 0x08000, CRC(5db9f922) SHA1(8257aab98657fe44df19d2a48d85fcf65b3d98c6) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "seibu7.u0724", 0x000000, 0x020000, CRC(c9ec9469) SHA1(a29f480a1bee073be7a177096ef58e1887a5af24) ) /* PCB silkscreened FX0 */
@@ -1826,7 +1826,7 @@ ROM_START( raiden2e )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "r2_snd.u1110", 0x000000, 0x08000, CRC(6bad0a3e) SHA1(eb7ae42353e1984cd60b569c26cdbc3b025a7da6) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "r2_fx0.u0724", 0x000000, 0x020000, CRC(c709bdf6) SHA1(0468d90412b7590d67eaadc0a5e3537cd5e73943) )
@@ -1865,7 +1865,7 @@ ROM_START( raiden2ea )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "r2.5.u1110", 0x000000, 0x08000, CRC(f5f835af) SHA1(5be82ebc582d0da919e9ae1b9e64528bb295efc7) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "r2.7.u0724", 0x000000, 0x020000, CRC(c7aa4d00) SHA1(9ad99d3891598c1ea3f12318400ee67666da56dd) )
@@ -1904,7 +1904,7 @@ ROM_START( raiden2eu ) // same as raiden2ea, different region
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "r2.5.u1110", 0x000000, 0x08000, CRC(f5f835af) SHA1(5be82ebc582d0da919e9ae1b9e64528bb295efc7) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "r2.7.u0724", 0x000000, 0x020000, CRC(c7aa4d00) SHA1(9ad99d3891598c1ea3f12318400ee67666da56dd) )
@@ -1947,7 +1947,7 @@ ROM_START( raiden2eua ) // sort of a mixture of raiden2e easy set with voice rom
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "seibu__5.27c512.u1110", 0x000000, 0x08000, CRC(6d362472) SHA1(a362e500bb9492affde1f7a4da7e08dd16e755df) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "seibu__7.fx0.27c210.u0724", 0x000000, 0x020000, CRC(c7aa4d00) SHA1(9ad99d3891598c1ea3f12318400ee67666da56dd) )
@@ -1991,7 +1991,7 @@ ROM_START( raiden2g ) // this is the same code revision as raiden2eua but a germ
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "raiden_2_5.bin", 0x000000, 0x08000, CRC(6d362472) SHA1(a362e500bb9492affde1f7a4da7e08dd16e755df) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "raiden_2_7.bin", 0x000000, 0x020000, CRC(c7aa4d00) SHA1(9ad99d3891598c1ea3f12318400ee67666da56dd) )
@@ -2030,7 +2030,7 @@ ROM_START( raiden2nl )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "5_u1110.bin", 0x000000, 0x08000, CRC(8f130589) SHA1(e58c8beaf9f27f063ffbcb0ab4600123c25ce6f3) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "7_u0724.bin", 0x000000, 0x020000, CRC(c9ec9469) SHA1(a29f480a1bee073be7a177096ef58e1887a5af24) ) /* PCB silkscreened FX0 */
@@ -2069,7 +2069,7 @@ ROM_START( raiden2f ) // original board with serial # 12476 that matches raiden2
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "seibu5_u1110.bin", 0x000000, 0x08000, CRC(f51a28f9) SHA1(7ae2e2ba0c8159a544a8fd2bb0c2c694ba849302) ) // == raiden2
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "7_u0724.bin", 0x000000, 0x020000, CRC(c9ec9469) SHA1(a29f480a1bee073be7a177096ef58e1887a5af24) ) /* PCB silkscreened FX0 */
@@ -2108,7 +2108,7 @@ ROM_START( raiden2u )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "seibu5.u1110", 0x000000, 0x08000, CRC(6d362472) SHA1(a362e500bb9492affde1f7a4da7e08dd16e755df) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "seibu7.u0724", 0x000000, 0x020000, CRC(c7aa4d00) SHA1(9ad99d3891598c1ea3f12318400ee67666da56dd) )
@@ -2148,7 +2148,7 @@ ROM_START( raiden2dx ) // this set is very weird, it's Raiden II on a Raiden DX
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "u1110.bin", 0x000000, 0x08000, CRC(b8ad8fe7) SHA1(290896f811f717ef6e3ec2152d4db98a9fe9b310) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
//ROM_LOAD( "fx0_u0724.bin", 0x000000, 0x020000, CRC(ded3c718) SHA1(c722ec45cd1b2dab23aac14e9113e0e9697830d3) ) // bad dump
@@ -2186,7 +2186,7 @@ ROM_START( raidendx )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "dx_5.5b", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "dx_7.4s", 0x000000, 0x020000, CRC(c73986d4) SHA1(d29345077753bda53560dedc95dd23f329e521d9) )
@@ -2221,7 +2221,7 @@ ROM_START( raidendxa1 )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "dx_5.5b", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "dx_7.4s", 0x000000, 0x020000, CRC(c73986d4) SHA1(d29345077753bda53560dedc95dd23f329e521d9) )
@@ -2256,7 +2256,7 @@ ROM_START( raidendxa2 )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "dx_5.5b", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "dx_7.4s", 0x000000, 0x020000, CRC(c73986d4) SHA1(d29345077753bda53560dedc95dd23f329e521d9) )
@@ -2291,7 +2291,7 @@ ROM_START( raidendxk )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "dx_5.5b", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "dx_7.4s", 0x000000, 0x020000, CRC(c73986d4) SHA1(d29345077753bda53560dedc95dd23f329e521d9) )
@@ -2326,7 +2326,7 @@ ROM_START( raidendxu )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "dx_5.5b", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "dx_7.4s", 0x000000, 0x020000, CRC(c73986d4) SHA1(d29345077753bda53560dedc95dd23f329e521d9) )
@@ -2361,7 +2361,7 @@ ROM_START( raidendxg )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "5.u1110", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "7.u0724", 0x000000, 0x020000, CRC(c73986d4) SHA1(d29345077753bda53560dedc95dd23f329e521d9) )
@@ -2397,7 +2397,7 @@ ROM_START( raidendxnl )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "u1110_5b.bin", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "seibu_7b_u724.bin", 0x000000, 0x020000, CRC(c73986d4) SHA1(d29345077753bda53560dedc95dd23f329e521d9) )
@@ -2433,7 +2433,7 @@ ROM_START( raidendxj )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "rdxj_5.u1110", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "rdxj_7.u0724", 0x000000, 0x020000, CRC(ec31fa10) SHA1(e39c9d95699dbeb21e3661d863eee503c9011bbc) )
@@ -2471,7 +2471,7 @@ ROM_START( raidendxch )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "dx_5.5b", 0x000000, 0x08000, CRC(8c46857a) SHA1(8b269cb20adf960ba4eb594d8add7739dbc9a837) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD( "dx_7.4s", 0x000000, 0x020000, CRC(c73986d4) SHA1(d29345077753bda53560dedc95dd23f329e521d9) )
@@ -2599,7 +2599,7 @@ ROM_START( zeroteam ) // Fabtek, US licensee, displays 'USA' under zero team log
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "seibu__5.u1110.5b", 0x000000, 0x08000, CRC(7ec1fbc3) SHA1(48299d6530f641b18764cc49e283c347d0918a47) ) // // alternate label "5"
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "seibu__7.u072.5s", 0x000000, 0x010000, CRC(9f6aa0f0) SHA1(1caad7092c07723d12a07aa363ae2aa69cb6be0d) ) // alternate label "7"
@@ -2636,7 +2636,7 @@ ROM_START( zeroteama ) // No licensee, original japan?
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "5.a.u1110.5b", 0x000000, 0x08000, CRC(efc484ca) SHA1(c34b8e3e7f4c2967bc6414348993478ed637d338) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "7.a.u072.5s", 0x000000, 0x010000, CRC(eb10467f) SHA1(fc7d576dc41bc878ff20f0370e669e19d54fcefb) )
@@ -2680,7 +2680,7 @@ ROM_START( zeroteamb ) // No licensee, later japan?
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "5.u1110.5b", 0x000000, 0x08000, CRC(7ec1fbc3) SHA1(48299d6530f641b18764cc49e283c347d0918a47) ) // 5.5c
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "7.u072.5s", 0x000000, 0x010000, CRC(9f6aa0f0) SHA1(1caad7092c07723d12a07aa363ae2aa69cb6be0d) )
@@ -2717,7 +2717,7 @@ ROM_START( zeroteamc ) // Liang Hwa, Taiwan licensee, no special word under logo
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "5.c.u1110.5b", 0x000000, 0x08000, CRC(efc484ca) SHA1(c34b8e3e7f4c2967bc6414348993478ed637d338) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "b7.u072.5s", 0x000000, 0x010000, CRC(30ec0241) SHA1(a0d0be9458bf97cb9764fb85c988bb816710475e) )
@@ -2755,7 +2755,7 @@ ROM_START( zeroteamd ) // Dream Soft, Korea licensee, no special word under logo
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "512kb.u1110.5b", 0x000000, 0x08000, CRC(efc484ca) SHA1(c34b8e3e7f4c2967bc6414348993478ed637d338) ) // this is a soldered mask rom on this pcb version! the contents match the taiwan version eprom; the mask rom has no label
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "512kb.u072.5s", 0x000000, 0x010000, CRC(30ec0241) SHA1(a0d0be9458bf97cb9764fb85c988bb816710475e) ) // this is a soldered mask rom on this pcb version! the contents match the taiwan version eprom; the mask rom has no label
@@ -2793,7 +2793,7 @@ ROM_START( zeroteams ) // No license, displays 'Selection' under logo
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "5_sel.bin", 0x000000, 0x08000, CRC(ed91046c) SHA1(de815c999aeeb814d3f091d5a9ac34ea9a388ddb) )
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "7.u072.5s", 0x000000, 0x010000, CRC(9f6aa0f0) SHA1(1caad7092c07723d12a07aa363ae2aa69cb6be0d) )
@@ -2842,7 +2842,7 @@ ROM_START( zeroteamsr )
ROM_REGION( 0x20000, "audiocpu", ROMREGION_ERASEFF ) /* 64k code for sound Z80 */
ROM_LOAD( "5.5c", 0x000000, 0x08000, CRC(7ec1fbc3) SHA1(48299d6530f641b18764cc49e283c347d0918a47) ) // 5.5c
ROM_CONTINUE(0x10000,0x8000)
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "7.u072.5s", 0x000000, 0x010000, CRC(9f6aa0f0) SHA1(1caad7092c07723d12a07aa363ae2aa69cb6be0d) )
@@ -2918,7 +2918,7 @@ ROM_START( xsedae )
ROM_LOAD( "8.u1110", 0x000000, 0x08000, CRC(2dc2f81a) SHA1(0f6605042e0e295b4256b43dbdf5d53daebe1a9a) )
ROM_CONTINUE(0x10000,0x8000)
ROM_CONTINUE(0x20000,0x10000) // TODO
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x020000, "gfx1", 0 ) /* chars */
ROM_LOAD16_BYTE( "6.u072.5s", 0x000000, 0x010000, CRC(a788402d) SHA1(8a1ac4760cf75cd2e32c1d15f36ad15cce3d411b) )
@@ -2988,8 +2988,8 @@ const UINT16 raiden2_state::raiden_blended_colors[] = {
void raiden2_state::init_blending(const UINT16 *table)
{
- for(int i=0; i<0x800; i++)
- blend_active[i] = false;
+ for(auto & elem : blend_active)
+ elem = false;
while(*table != 0xffff)
blend_active[*table++] = true;
}
diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp
index e5b1969ca82..20fed3aec02 100644
--- a/src/mame/drivers/rainbow.cpp
+++ b/src/mame/drivers/rainbow.cpp
@@ -893,7 +893,7 @@ void rainbow_state::machine_reset()
// *********** FLOPPY DISK CONTROLLER
m_unit = INVALID_DRIVE;
m_fdc->reset();
- m_fdc->set_floppy(NULL);
+ m_fdc->set_floppy(nullptr);
m_fdc->dden_w(0);
m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
@@ -1150,19 +1150,19 @@ hard_disk_file *(rainbow_state::rainbow_hdc_file(int drv))
m_hdc_drive_ready = false;
if (m_inp5->read() != 0x01) // ...PRESENT?
- return NULL;
+ return nullptr;
if (drv != 0)
- return NULL;
+ return nullptr;
- harddisk_image_device *img = NULL;
+ harddisk_image_device *img = nullptr;
img = dynamic_cast<harddisk_image_device *>(machine().device(subtag("harddisk1").c_str()));
if (!img)
- return NULL;
+ return nullptr;
if (!img->exists())
- return NULL;
+ return nullptr;
hard_disk_file *file = img->get_hard_disk_file();
hard_disk_info *info = hard_disk_get_info(file);
@@ -1184,14 +1184,14 @@ hard_disk_file *(rainbow_state::rainbow_hdc_file(int drv))
info->heads, info->cylinders, info->sectors, info->sectorbytes);
printf("\n <<< === REJECTED = (SANITY CHECK FAILED) === >>> \n");
- return NULL;
+ return nullptr;
}
}
// LBA sector from CHS
static UINT32 get_and_print_lbasector(device_t *device,hard_disk_info *info, UINT16 cylinder, UINT8 head, UINT8 sector_number)
{
- if (info == NULL)
+ if (info == nullptr)
return 0;
// LBA_ADDRESS = (C * HEADS + H) * NUMBER_SECTORS + (S - 1)
@@ -1296,7 +1296,7 @@ WRITE_LINE_MEMBER(rainbow_state::hdc_write_sector)
output_set_value("led1", 0); // (1 = OFF ) =HARD DISK ACTIVITY =
MOTOR_DISABLE_counter = 20;
- if (rainbow_hdc_file(0) != NULL)
+ if (rainbow_hdc_file(0) != nullptr)
{
success = do_write_sector();
if (success < 88)
@@ -1428,7 +1428,7 @@ READ8_MEMBER(rainbow_state::hd_status_68_r)
{
// (*) Bits 5-7 : HARD WIRED IDENTIFICATION BITS, bits 5+7 = 1 and bit 6 = 0 (= 101 f?r RD51 module)
int data = 0xe0; // 111 gives DRIVE NOT READY (when W is pressed on boot screen)
- if ((m_inp5->read() == 0x01) && (rainbow_hdc_file(0) != NULL))
+ if ((m_inp5->read() == 0x01) && (rainbow_hdc_file(0) != nullptr))
data = 0xa0; // A0 : OK, DRIVE IS READY (!)
int my_offset = 0x07;
@@ -1955,7 +1955,7 @@ WRITE8_MEMBER(rainbow_state::z80_diskcontrol_w)
else
drive = data & 3;
- floppy_connector *con = NULL;
+ floppy_connector *con = nullptr;
if (drive < MAX_FLOPPIES)
con = machine().device<floppy_connector>(names[drive]);
@@ -1971,15 +1971,15 @@ WRITE8_MEMBER(rainbow_state::z80_diskcontrol_w)
{
printf("(m_unit = %i) ** SELECTED DRIVE ** INVALID. (selected drive = %i)\n", m_unit, selected_drive);
m_unit = INVALID_DRIVE;
- m_floppy = NULL;
+ m_floppy = nullptr;
}
- if (m_floppy != NULL)
+ if (m_floppy != nullptr)
{
m_fdc->set_floppy(m_floppy); // Sets new _image device_
if (!m_floppy->exists())
{
- m_floppy = NULL;
+ m_floppy = nullptr;
printf("(m_unit = %i) SELECTED IMAGE *** DOES NOT EXIST *** (selected drive = %i)\n", m_unit, selected_drive);
selected_drive = INVALID_DRIVE;
//m_unit = INVALID_DRIVE;
diff --git a/src/mame/drivers/rallyx.cpp b/src/mame/drivers/rallyx.cpp
index c9556c7e0bf..25b73075293 100644
--- a/src/mame/drivers/rallyx.cpp
+++ b/src/mame/drivers/rallyx.cpp
@@ -803,7 +803,7 @@ static const char *const rallyx_sample_names[] =
{
"*rallyx",
"bang",
- 0 /* end of array */
+ nullptr /* end of array */
};
/*************************************
diff --git a/src/mame/drivers/rc759.cpp b/src/mame/drivers/rc759.cpp
index aa69efb9dd2..0c8c4654921 100644
--- a/src/mame/drivers/rc759.cpp
+++ b/src/mame/drivers/rc759.cpp
@@ -577,7 +577,7 @@ static MACHINE_CONFIG_START( rc759, rc759_state )
MCFG_CENTRONICS_SELECT_HANDLER(WRITELINE(rc759_state, centronics_select_w))
// isbx slot
- MCFG_ISBX_SLOT_ADD("isbx", 0, isbx_cards, NULL)
+ MCFG_ISBX_SLOT_ADD("isbx", 0, isbx_cards, nullptr)
MCFG_ISBX_SLOT_MINTR0_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, int1_w))
MCFG_ISBX_SLOT_MINTR1_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, int3_w))
MCFG_ISBX_SLOT_MDRQT_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, drq0_w))
diff --git a/src/mame/drivers/retofinv.cpp b/src/mame/drivers/retofinv.cpp
index a4376a6f082..b6eebccd332 100644
--- a/src/mame/drivers/retofinv.cpp
+++ b/src/mame/drivers/retofinv.cpp
@@ -43,7 +43,7 @@ void retofinv_state::machine_start()
save_item(NAME(m_sub_irq_mask));
save_item(NAME(m_cpu2_m6000));
- if (m_68705 != NULL) // only for the parent (with MCU)
+ if (m_68705 != nullptr) // only for the parent (with MCU)
{
save_item(NAME(m_from_main));
save_item(NAME(m_from_mcu));
@@ -74,7 +74,7 @@ WRITE8_MEMBER(retofinv_state::cpu2_reset_w)
WRITE8_MEMBER(retofinv_state::mcu_reset_w)
{
/* the bootlegs don't have a MCU, so make sure it's there before trying to reset it */
- if (m_68705 != NULL)
+ if (m_68705 != nullptr)
m_68705->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
}
diff --git a/src/mame/drivers/rmnimbus.cpp b/src/mame/drivers/rmnimbus.cpp
index 4df84e3d92a..52248450e84 100644
--- a/src/mame/drivers/rmnimbus.cpp
+++ b/src/mame/drivers/rmnimbus.cpp
@@ -166,7 +166,7 @@ static MACHINE_CONFIG_START( nimbus, rmnimbus_state )
MCFG_RS232_PORT_ADD("rs232a", keyboard, "rmnkbd")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxa_w))
- MCFG_RS232_PORT_ADD("rs232b", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232b", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rxb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, dcdb_w))
MCFG_RS232_RI_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80dart_device, rib_w))
diff --git a/src/mame/drivers/rotaryf.cpp b/src/mame/drivers/rotaryf.cpp
index ff74598e930..7c9c27304e8 100644
--- a/src/mame/drivers/rotaryf.cpp
+++ b/src/mame/drivers/rotaryf.cpp
@@ -63,7 +63,7 @@ static const char *const rotaryf_sample_names[] =
"7", /* fleet move 4 */
"8", /* UFO/saucer hit */
"9", /* bonus base */
- 0
+ nullptr
};
diff --git a/src/mame/drivers/royalmah.cpp b/src/mame/drivers/royalmah.cpp
index 0d49e09ae8c..899f449e6e5 100644
--- a/src/mame/drivers/royalmah.cpp
+++ b/src/mame/drivers/royalmah.cpp
@@ -3782,7 +3782,7 @@ ROM_START( daisyari )
ROM_REGION( 0x50000, "maincpu", 0 )
ROM_LOAD( "1a.bin", 0x00000, 0x10000, CRC(7d14f90c) SHA1(742684d0785a93a45de0467e004db00531d016e2) )
/* bank switched ROMs follow */
- ROM_COPY( "maincpu", 0x00000, 0x10000, 0x10000 )
+ ROM_COPY( "maincpu", nullptr, 0x10000, 0x10000 )
ROM_LOAD( "1c.bin", 0x20000, 0x10000, CRC(edfe52b9) SHA1(704c107fc8b89f561d2031d10468c124ab3d007a) ) /*2*/
ROM_LOAD( "1d.bin", 0x30000, 0x10000, CRC(38f54a98) SHA1(d06eb851c75bfb2d8dd99bf5072c7f359f1f17e2) ) /*3*/
ROM_LOAD( "1f.bin", 0x40000, 0x10000, CRC(b635f295) SHA1(dba3a59133c33c915dba678c510f00fb476f24da) ) /*4*/
@@ -3814,7 +3814,7 @@ ROM_START( mjclub )
ROM_REGION( 0x80000, "maincpu", 0 )
ROM_LOAD( "5", 0x00000, 0x10000, CRC(cd148465) SHA1(42d1848656e461cfbf3fc0ba88ef8f4e67425f8c) )
/* bank switched ROMs follow */
- ROM_COPY( "maincpu", 0x00000, 0x10000, 0x10000 )
+ ROM_COPY( "maincpu", nullptr, 0x10000, 0x10000 )
ROM_LOAD( "1", 0x50000, 0x10000, CRC(d0131f4b) SHA1(aac40b47b48f0ebfb07aaf17cb2a080fdcaa4697) )
ROM_LOAD( "3", 0x60000, 0x10000, CRC(25628c38) SHA1(5166934c488c2f91bd6026c7896ad3536727d950) )
ROM_LOAD( "4", 0x70000, 0x10000, CRC(a6ada333) SHA1(5fd44bf298a6f327118b98641af1aa0910519ded) )
diff --git a/src/mame/drivers/rpunch.cpp b/src/mame/drivers/rpunch.cpp
index e1307464550..445e9395a61 100644
--- a/src/mame/drivers/rpunch.cpp
+++ b/src/mame/drivers/rpunch.cpp
@@ -822,7 +822,7 @@ DRIVER_INIT_MEMBER(rpunch_state,svolley)
/* the main differences between Super Volleyball and Rabbit Punch are */
/* the lack of direct-mapped bitmap and a different palette base for sprites */
m_sprite_palette = 0x080;
- m_bitmapram.set_target(NULL, 0);
+ m_bitmapram.set_target(nullptr, 0);
}
diff --git a/src/mame/drivers/rt1715.cpp b/src/mame/drivers/rt1715.cpp
index 30b2a2e43cb..fe9f22c8b30 100644
--- a/src/mame/drivers/rt1715.cpp
+++ b/src/mame/drivers/rt1715.cpp
@@ -262,7 +262,7 @@ static const z80_daisy_config rt1715_daisy_chain[] =
{ "a72" },
{ "a30" },
{ "a29" },
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_START( rt1715, rt1715_state )
diff --git a/src/mame/drivers/rungun.cpp b/src/mame/drivers/rungun.cpp
index 7bf3c7d71a3..ff9b5825517 100644
--- a/src/mame/drivers/rungun.cpp
+++ b/src/mame/drivers/rungun.cpp
@@ -164,7 +164,7 @@ INTERRUPT_GEN_MEMBER(rungun_state::rng_interrupt)
address_space &space = m_maincpu->space(AS_PROGRAM);
for(int i=0;i<0x1000;i+=2)
- m_k055673->k053247_word_w(space,i/2,m_banked_ram[(i + m_current_frame_number*0x2000) /2],0xffff);
+ m_k055673->k053247_word_w(space,i/2,m_banked_ram[(i + m_current_display_bank*0x2000) /2],0xffff);
if (m_sysreg[0x0c / 2] & 0x09)
device.execute().set_input_line(M68K_IRQ_5, ASSERT_LINE);
@@ -200,7 +200,7 @@ WRITE16_MEMBER(rungun_state::palette_write)
static ADDRESS_MAP_START( rungun_map, AS_PROGRAM, 16, rungun_state )
AM_RANGE(0x000000, 0x2fffff) AM_ROM // main program + data
- AM_RANGE(0x300000, 0x3007ff) AM_READWRITE(palette_read,palette_write) AM_SHARE("palette")
+ AM_RANGE(0x300000, 0x3007ff) AM_READWRITE(palette_read,palette_write)
AM_RANGE(0x380000, 0x39ffff) AM_RAM // work RAM
AM_RANGE(0x400000, 0x43ffff) AM_READ8(rng_53936_rom_r,0x00ff) // '936 ROM readback window
AM_RANGE(0x480000, 0x48001f) AM_READWRITE(rng_sysregs_r, rng_sysregs_w) AM_SHARE("sysreg")
diff --git a/src/mame/drivers/s11.cpp b/src/mame/drivers/s11.cpp
index 2b9ef22a0eb..38e5c3dd98c 100644
--- a/src/mame/drivers/s11.cpp
+++ b/src/mame/drivers/s11.cpp
@@ -502,7 +502,7 @@ ROM_START(grand_l4)
ROM_LOAD("lzrd_u26.l4", 0x4000, 0x2000, CRC(5fe50db6) SHA1(7e2adfefce5c33ad605606574dbdfb2642aa0e85))
ROM_RELOAD( 0x6000, 0x2000)
ROM_LOAD("lzrd_u27.l4", 0x8000, 0x8000, CRC(6462ca55) SHA1(0ebfa998d3cefc213ada9ed815d44977120e5d6d))
- ROM_FILL(0x6035, 1, 0) // default to English
+ ROM_FILL(0x6035, 1, nullptr) // default to English
// according to the manual these should be 32K roms just like the other games here
ROM_REGION(0x20000, "audiocpu", ROMREGION_ERASEFF)
diff --git a/src/mame/drivers/safarir.cpp b/src/mame/drivers/safarir.cpp
index f04a846576d..7a912b2d191 100644
--- a/src/mame/drivers/safarir.cpp
+++ b/src/mame/drivers/safarir.cpp
@@ -294,7 +294,7 @@ static const char *const safarir_sample_names[] =
"sound6",
"sound7",
"sound8",
- 0
+ nullptr
};
diff --git a/src/mame/drivers/sage2.cpp b/src/mame/drivers/sage2.cpp
index 86b6fa4bb17..6b39a24db2e 100644
--- a/src/mame/drivers/sage2.cpp
+++ b/src/mame/drivers/sage2.cpp
@@ -232,7 +232,7 @@ WRITE8_MEMBER( sage2_state::ppi0_pc_w )
update_fdc_int();
// drive select
- m_floppy = NULL;
+ m_floppy = nullptr;
if (!BIT(data, 3)) m_floppy = m_floppy0->get_device();
if (!BIT(data, 4)) m_floppy = m_floppy1->get_device();
@@ -490,7 +490,7 @@ static MACHINE_CONFIG_START( sage2, sage2_state )
MCFG_I8251_RXRDY_HANDLER(DEVWRITELINE(I8259_TAG, pic8259_device, ir1_w))
MCFG_I8251_TXRDY_HANDLER(DEVWRITELINE(I8259_TAG, pic8259_device, ir3_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8251_1_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_1_TAG, i8251_device, write_dsr))
diff --git a/src/mame/drivers/samcoupe.cpp b/src/mame/drivers/samcoupe.cpp
index ba3cb454cf6..743c76a58cf 100644
--- a/src/mame/drivers/samcoupe.cpp
+++ b/src/mame/drivers/samcoupe.cpp
@@ -76,7 +76,7 @@ READ8_MEMBER(samcoupe_state::samcoupe_disk_r)
{
/* drive and side is encoded into bit 5 and 3 */
floppy_connector *con = (BIT(offset, 4) ? m_wd1772_1 : m_wd1772_0);
- floppy_image_device *floppy = con ? con->get_device() : 0;
+ floppy_image_device *floppy = con ? con->get_device() : nullptr;
if(floppy)
floppy->ss_w(BIT(offset, 2));
@@ -98,7 +98,7 @@ WRITE8_MEMBER(samcoupe_state::samcoupe_disk_w)
{
/* drive and side is encoded into bit 5 and 3 */
floppy_connector *con = (BIT(offset, 4) ? m_wd1772_1 : m_wd1772_0);
- floppy_image_device *floppy = con ? con->get_device() : 0;
+ floppy_image_device *floppy = con ? con->get_device() : nullptr;
if(floppy)
floppy->ss_w(BIT(offset, 2));
diff --git a/src/mame/drivers/saturn.cpp b/src/mame/drivers/saturn.cpp
index 05f67b642fc..ede18d2ae0d 100644
--- a/src/mame/drivers/saturn.cpp
+++ b/src/mame/drivers/saturn.cpp
@@ -1159,7 +1159,7 @@ MACHINE_CONFIG_DERIVED( saturnus, saturn )
MCFG_SOFTWARE_LIST_ADD("cd_list","saturn")
MCFG_SOFTWARE_LIST_FILTER("cd_list","NTSC-U")
- MCFG_SATURN_CARTRIDGE_ADD("exp", saturn_cart, NULL)
+ MCFG_SATURN_CARTRIDGE_ADD("exp", saturn_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","sat_cart")
MACHINE_CONFIG_END
@@ -1170,7 +1170,7 @@ MACHINE_CONFIG_DERIVED( saturneu, saturn )
MCFG_SOFTWARE_LIST_ADD("cd_list","saturn")
MCFG_SOFTWARE_LIST_FILTER("cd_list","PAL")
- MCFG_SATURN_CARTRIDGE_ADD("exp", saturn_cart, NULL)
+ MCFG_SATURN_CARTRIDGE_ADD("exp", saturn_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","sat_cart")
MACHINE_CONFIG_END
@@ -1181,7 +1181,7 @@ MACHINE_CONFIG_DERIVED( saturnjp, saturn )
MCFG_SOFTWARE_LIST_ADD("cd_list","saturn")
MCFG_SOFTWARE_LIST_FILTER("cd_list","NTSC-J")
- MCFG_SATURN_CARTRIDGE_ADD("exp", saturn_cart, NULL)
+ MCFG_SATURN_CARTRIDGE_ADD("exp", saturn_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","sat_cart")
MACHINE_CONFIG_END
@@ -1240,7 +1240,7 @@ ROM_START(saturnjp)
ROM_SYSTEM_BIOS(2, "100", "Japan v1.00 (940921)")
ROMX_LOAD("sega_100.bin", 0x00000000, 0x00080000, CRC(2aba43c2) SHA1(2b8cb4f87580683eb4d760e4ed210813d667f0a2), ROM_BIOS(3))
ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */
- ROM_COPY( "maincpu",0,0,0x080000)
+ ROM_COPY( "maincpu",nullptr,0,0x080000)
ROM_END
/* Overseas Saturn */
@@ -1252,7 +1252,7 @@ ROM_START(saturn)
ROM_SYSTEM_BIOS(1, "100a", "Overseas v1.00a (941115)")
ROMX_LOAD("sega_100a.bin", 0x00000000, 0x00080000, CRC(f90f0089) SHA1(3bb41feb82838ab9a35601ac666de5aacfd17a58), ROM_BIOS(2))
ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */
- ROM_COPY( "maincpu",0,0,0x080000)
+ ROM_COPY( "maincpu",nullptr,0,0x080000)
ROM_END
ROM_START(saturneu)
@@ -1263,14 +1263,14 @@ ROM_START(saturneu)
ROM_SYSTEM_BIOS(1, "100a", "Overseas v1.00a (941115)")
ROMX_LOAD("sega_100a.bin", 0x00000000, 0x00080000, CRC(f90f0089) SHA1(3bb41feb82838ab9a35601ac666de5aacfd17a58), ROM_BIOS(2))
ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */
- ROM_COPY( "maincpu",0,0,0x080000)
+ ROM_COPY( "maincpu",nullptr,0,0x080000)
ROM_END
ROM_START(vsaturn)
ROM_REGION( 0x480000, "maincpu", ROMREGION_ERASEFF ) /* SH2 code */
ROM_LOAD("vsaturn.bin", 0x00000000, 0x00080000, CRC(e4d61811) SHA1(4154e11959f3d5639b11d7902b3a393a99fb5776))
ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */
- ROM_COPY( "maincpu",0,0,0x080000)
+ ROM_COPY( "maincpu",nullptr,0,0x080000)
ROM_END
ROM_START(hisaturn)
@@ -1280,7 +1280,7 @@ ROM_START(hisaturn)
ROM_SYSTEM_BIOS(1, "101", "v1.01 (950130)")
ROMX_LOAD("hisaturn.bin", 0x00000000, 0x00080000, CRC(721e1b60) SHA1(49d8493008fa715ca0c94d99817a5439d6f2c796), ROM_BIOS(2))
ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */
- ROM_COPY( "maincpu",0,0,0x080000)
+ ROM_COPY( "maincpu",nullptr,0,0x080000)
ROM_END
/* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */
diff --git a/src/mame/drivers/savquest.cpp b/src/mame/drivers/savquest.cpp
index b34f8a84a95..54a5a32934e 100644
--- a/src/mame/drivers/savquest.cpp
+++ b/src/mame/drivers/savquest.cpp
@@ -808,14 +808,14 @@ static MACHINE_CONFIG_START( savquest, savquest_state )
MCFG_DS12885_ADD("rtc")
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(13, NULL, pci_3dfx_r, pci_3dfx_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, intel82439tx_pci_r, intel82439tx_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(7, nullptr, intel82371ab_pci_r, intel82371ab_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(13, nullptr, pci_3dfx_r, pci_3dfx_w)
- MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_32_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
- MCFG_IDE_CONTROLLER_32_ADD("ide2", ata_devices, NULL, NULL, true)
+ MCFG_IDE_CONTROLLER_32_ADD("ide2", ata_devices, nullptr, nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir7_w))
/* sound hardware */
diff --git a/src/mame/drivers/sbrain.cpp b/src/mame/drivers/sbrain.cpp
index 6c760eee0fe..84439358b81 100644
--- a/src/mame/drivers/sbrain.cpp
+++ b/src/mame/drivers/sbrain.cpp
@@ -153,7 +153,7 @@ WRITE8_MEMBER( sbrain_state::port08_w )
{
m_port08 = data | 0xc0;
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(m_port08, 1)) floppy = m_floppy0->get_device();
if (BIT(m_port08, 2)) floppy = m_floppy1->get_device();
diff --git a/src/mame/drivers/scorpion.cpp b/src/mame/drivers/scorpion.cpp
index 897cd6ff054..8f8dc435c68 100644
--- a/src/mame/drivers/scorpion.cpp
+++ b/src/mame/drivers/scorpion.cpp
@@ -188,7 +188,7 @@ MACHINE_RESET_MEMBER(scorpion_state,scorpion)
address_space &space = m_maincpu->space(AS_PROGRAM);
m_p_ram = memregion("maincpu")->base();
- m_ram_0000 = NULL;
+ m_ram_0000 = nullptr;
space.install_read_bank(0x0000, 0x3fff, "bank1");
space.install_write_handler(0x0000, 0x3fff, write8_delegate(FUNC(scorpion_state::scorpion_0000_w),this));
diff --git a/src/mame/drivers/scv.cpp b/src/mame/drivers/scv.cpp
index 66b0d213c47..321be2388b5 100644
--- a/src/mame/drivers/scv.cpp
+++ b/src/mame/drivers/scv.cpp
@@ -679,7 +679,7 @@ static MACHINE_CONFIG_START( scv, scv_state )
MCFG_UPD1771_ACK_HANDLER(WRITELINE(scv_state, upd1771_ack_w))
MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 )
- MCFG_SCV_CARTRIDGE_ADD("cartslot", scv_cart, NULL)
+ MCFG_SCV_CARTRIDGE_ADD("cartslot", scv_cart, nullptr)
/* Software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","scv")
diff --git a/src/mame/drivers/sealy.cpp b/src/mame/drivers/sealy.cpp
index 00edc0730f2..00373c57a35 100644
--- a/src/mame/drivers/sealy.cpp
+++ b/src/mame/drivers/sealy.cpp
@@ -122,7 +122,7 @@ MACHINE_CONFIG_END
ROM_START( crzyddz )
ROM_REGION( 0x40000, "maincpu", 0 )
ROM_LOAD( "crzyddz_m30624.mcu", 0x00000, 0x40000, NO_DUMP )
- ROM_FILL( 0x00000, 0x40000, 0 )
+ ROM_FILL( 0x00000, 0x40000, nullptr )
ROM_REGION( 0x200000, "gfx1", 0 )
ROM_LOAD( "1", 0x000000, 0x200000, CRC(d202a278) SHA1(3ae75d6942527e58a56a703e40de22e70535b332) )
diff --git a/src/mame/drivers/seattle.cpp b/src/mame/drivers/seattle.cpp
index 6f09430432c..3a83f2d8d9d 100644
--- a/src/mame/drivers/seattle.cpp
+++ b/src/mame/drivers/seattle.cpp
@@ -611,12 +611,12 @@ void seattle_state::machine_reset()
m_cpu_stalled_on_voodoo = FALSE;
/* reset either the DCS2 board or the CAGE board */
- if (machine().device("dcs") != NULL)
+ if (machine().device("dcs") != nullptr)
{
m_dcs->reset_w(1);
m_dcs->reset_w(0);
}
- else if (machine().device("cage") != NULL)
+ else if (machine().device("cage") != nullptr)
{
m_cage->control_w(0);
m_cage->control_w(3);
@@ -2518,7 +2518,7 @@ static MACHINE_CONFIG_START( seattle_common, seattle_state )
MCFG_NVRAM_ADD_1FILL("nvram")
- MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(seattle_state, ide_interrupt))
MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE("maincpu", AS_PROGRAM)
diff --git a/src/mame/drivers/segac2.cpp b/src/mame/drivers/segac2.cpp
index 56c92e7b2e1..506ed4fdc0c 100644
--- a/src/mame/drivers/segac2.cpp
+++ b/src/mame/drivers/segac2.cpp
@@ -277,7 +277,7 @@ MACHINE_RESET_MEMBER(segac2_state,segac2)
WRITE16_MEMBER(segac2_state::segac2_upd7759_w)
{
/* make sure we have a UPD chip */
- if (m_upd7759 == NULL)
+ if (m_upd7759 == nullptr)
return;
/* only works if we're accessing the low byte */
@@ -415,7 +415,7 @@ READ8_MEMBER(segac2_state::io_portc_r)
{
// D7 : From MB3773P pin 1. (/RESET output)
// D6 : From uPD7759 pin 18. (/BUSY output)
- int busy = (m_upd7759 != NULL) ? (m_upd7759->busy_r() << 6) : 0x40;
+ int busy = (m_upd7759 != nullptr) ? (m_upd7759->busy_r() << 6) : 0x40;
return 0xbf | busy;
}
@@ -1706,7 +1706,7 @@ ROM_START( ribbit ) /* Ribbit (c)1991 Sega */
ROM_REGION( 0x200000, "maincpu", 0 )
ROM_LOAD16_BYTE( "epr-13833.ic32", 0x000000, 0x040000, CRC(5347f8ce) SHA1(b95b99536157edfbf0d74a42f64235f47dca7ee1) )
ROM_LOAD16_BYTE( "epr-13832.ic31", 0x000001, 0x040000, CRC(889c42c2) SHA1(0839a50a68b64a66d995f1bfaff42fcb60bb4d45) )
- ROM_COPY( "maincpu", 0x000000, 0x080000, 0x080000 )
+ ROM_COPY( "maincpu", nullptr, 0x080000, 0x080000 )
ROM_LOAD16_BYTE( "epr-13838.ic34", 0x100000, 0x080000, CRC(a5d62ac3) SHA1(8d83a7bc4017e125ef4231278f766b2368d5fc1f) )
ROM_LOAD16_BYTE( "epr-13837.ic33", 0x100001, 0x080000, CRC(434de159) SHA1(cf2973131cabf2bc0ebb2bfe9f804ad3d7d0a733) )
@@ -1981,7 +1981,7 @@ void segac2_state::segac2_common_init(segac2_prot_delegate prot_func)
DRIVER_INIT_CALL(megadriv_c2);
m_prot_func = prot_func;
- if (m_upd7759 != NULL)
+ if (m_upd7759 != nullptr)
m_maincpu->space(AS_PROGRAM).install_write_handler(0x880000, 0x880001, 0, 0x13fefe, write16_delegate(FUNC(segac2_state::segac2_upd7759_w),this));
}
diff --git a/src/mame/drivers/segag80r.cpp b/src/mame/drivers/segag80r.cpp
index 4b3d4c86657..6eb4edb91f3 100644
--- a/src/mame/drivers/segag80r.cpp
+++ b/src/mame/drivers/segag80r.cpp
@@ -785,18 +785,18 @@ static const gfx_layout charlayout =
static GFXDECODE_START( segag80r )
- GFXDECODE_ENTRY( NULL, 0x0000, charlayout, 0, 16 )
+ GFXDECODE_ENTRY( nullptr, 0x0000, charlayout, 0, 16 )
GFXDECODE_END
static GFXDECODE_START( spaceod )
- GFXDECODE_ENTRY( NULL, 0x0000, charlayout, 0, 16 )
+ GFXDECODE_ENTRY( nullptr, 0x0000, charlayout, 0, 16 )
GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x6_planar, 64, 1 )
GFXDECODE_END
static GFXDECODE_START( monsterb )
- GFXDECODE_ENTRY( NULL, 0x0000, charlayout, 0, 16 )
+ GFXDECODE_ENTRY( nullptr, 0x0000, charlayout, 0, 16 )
GFXDECODE_ENTRY( "gfx1", 0x0000, gfx_8x8x2_planar, 64, 16 )
GFXDECODE_END
diff --git a/src/mame/drivers/segag80v.cpp b/src/mame/drivers/segag80v.cpp
index 6bbbf9cb348..5410b92b122 100644
--- a/src/mame/drivers/segag80v.cpp
+++ b/src/mame/drivers/segag80v.cpp
@@ -811,7 +811,7 @@ static const char *const elim_sample_names[] =
"elim10",
"elim11",
"elim12",
- 0 /* end of array */
+ nullptr /* end of array */
};
@@ -835,7 +835,7 @@ static const char *const spacfury_sample_names[] =
"sfury8",
"sfury9",
"sfury10",
- 0 /* end of array */
+ nullptr /* end of array */
};
/*************************************
@@ -858,7 +858,7 @@ static const char *const zektor_sample_names[] =
"elim9", /* 8 small explosion */
"elim10", /* 9 med explosion */
"elim11", /* 10 big explosion */
- 0
+ nullptr
};
diff --git a/src/mame/drivers/segahang.cpp b/src/mame/drivers/segahang.cpp
index 270f2f4f442..d74a074e55e 100644
--- a/src/mame/drivers/segahang.cpp
+++ b/src/mame/drivers/segahang.cpp
@@ -372,7 +372,7 @@ void segahang_state::device_timer(emu_timer &timer, device_timer_id id, int para
case TID_INIT_I8751:
if (!m_i8751_vblank_hook.isnull())
m_mcu->suspend(SUSPEND_REASON_DISABLE, 1);
- else if (m_mcu != NULL)
+ else if (m_mcu != nullptr)
machine().scheduler().boost_interleave(attotime::zero, attotime::from_msec(10));
break;
diff --git a/src/mame/drivers/segaorun.cpp b/src/mame/drivers/segaorun.cpp
index 6f33389a665..1b443a03487 100644
--- a/src/mame/drivers/segaorun.cpp
+++ b/src/mame/drivers/segaorun.cpp
@@ -566,7 +566,7 @@ READ8_MEMBER( segaorun_state::sound_data_r )
void segaorun_state::machine_reset()
{
// reset misc components
- if (m_custom_map != NULL)
+ if (m_custom_map != nullptr)
m_mapper->configure_explicit(m_custom_map);
m_segaic16vid->tilemap_reset(*m_screen);
@@ -2894,7 +2894,7 @@ DRIVER_INIT_MEMBER(segaorun_state,generic)
m_scanline_timer = timer_alloc(TID_SCANLINE);
// configure the NVRAM to point to our workram
- if (m_nvram != NULL)
+ if (m_nvram != nullptr)
m_nvram->set_base(m_workram, m_workram.bytes());
// point globals to allocated memory regions
diff --git a/src/mame/drivers/segapico.cpp b/src/mame/drivers/segapico.cpp
index cc28f00d4dd..5efbeb7ceef 100644
--- a/src/mame/drivers/segapico.cpp
+++ b/src/mame/drivers/segapico.cpp
@@ -396,7 +396,7 @@ static MACHINE_CONFIG_START( pico, pico_state )
MCFG_MACHINE_START_OVERRIDE( pico_state, pico )
MCFG_MACHINE_RESET_OVERRIDE( pico_base_state, ms_megadriv )
- MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, NULL)
+ MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","pico")
MCFG_SOUND_ADD("315_5641", SEGA_315_5641_PCM, UPD7759_STANDARD_CLOCK*2)
@@ -417,7 +417,7 @@ static MACHINE_CONFIG_START( picopal, pico_state )
MCFG_MACHINE_START_OVERRIDE( pico_state, pico )
MCFG_MACHINE_RESET_OVERRIDE( pico_base_state, ms_megadriv )
- MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, NULL)
+ MCFG_PICO_CARTRIDGE_ADD("picoslot", pico_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","pico")
MCFG_SOUND_ADD("315_5641", SEGA_315_5641_PCM, UPD7759_STANDARD_CLOCK*2)
@@ -608,7 +608,7 @@ static MACHINE_CONFIG_START( copera, copera_state )
MCFG_MACHINE_START_OVERRIDE( copera_state, copera )
MCFG_MACHINE_RESET_OVERRIDE( pico_base_state, ms_megadriv )
- MCFG_COPERA_CARTRIDGE_ADD("coperaslot", copera_cart, NULL)
+ MCFG_COPERA_CARTRIDGE_ADD("coperaslot", copera_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","copera")
MCFG_SOUND_ADD("315_5641", SEGA_315_5641_PCM, UPD7759_STANDARD_CLOCK)
diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp
index 4a1ddcce8ca..5dfa7865ca0 100644
--- a/src/mame/drivers/segas16a.cpp
+++ b/src/mame/drivers/segas16a.cpp
@@ -191,7 +191,7 @@ WRITE8_MEMBER( segas16a_state::misc_control_w )
m_sprites->set_flip(data & 0x80);
// bit 6: set 8751 interrupt line
- if (m_mcu != NULL)
+ if (m_mcu != nullptr)
m_mcu->set_input_line(MCS51_INT1_LINE, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE);
// bit 4: enable display
@@ -636,7 +636,7 @@ void segas16a_state::device_timer(emu_timer &timer, device_timer_id id, int para
case TID_INIT_I8751:
if (!m_i8751_vblank_hook.isnull())
m_mcu->suspend(SUSPEND_REASON_DISABLE, 1);
- else if (m_mcu != NULL)
+ else if (m_mcu != nullptr)
machine().scheduler().boost_interleave(attotime::zero, attotime::from_msec(10));
break;
diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp
index 818044b0781..923135b376b 100644
--- a/src/mame/drivers/segas16b.cpp
+++ b/src/mame/drivers/segas16b.cpp
@@ -984,7 +984,7 @@ UINT8 segas16b_state::mapper_sound_r()
void segas16b_state::mapper_sound_w(UINT8 data)
{
soundlatch_write(data & 0xff);
- if (m_soundcpu != NULL)
+ if (m_soundcpu != nullptr)
m_soundcpu->set_input_line(0, HOLD_LINE);
}
@@ -1283,7 +1283,7 @@ INTERRUPT_GEN_MEMBER( segas16b_state::i8751_main_cpu_vblank )
void segas16b_state::machine_reset()
{
// if we have a hard-coded mapping configuration, set it now
- if (m_i8751_initial_config != NULL)
+ if (m_i8751_initial_config != nullptr)
m_mapper->configure_explicit(m_i8751_initial_config);
// queue up a timer to either boost interleave or disable the MCU
@@ -1313,7 +1313,7 @@ void segas16b_state::device_timer(emu_timer &timer, device_timer_id id, int para
case TID_INIT_I8751:
if (!m_i8751_vblank_hook.isnull())
m_mcu->suspend(SUSPEND_REASON_DISABLE, 1);
- else if (m_mcu != NULL)
+ else if (m_mcu != nullptr)
machine().scheduler().boost_interleave(attotime::zero, attotime::from_msec(10));
break;
@@ -8540,7 +8540,7 @@ READ16_MEMBER( isgsm_state::cart_data_r )
WRITE16_MEMBER( isgsm_state::data_w )
{
- UINT8 *dest = 0;
+ UINT8 *dest = nullptr;
// m_data_type
// rrrp o?dd
diff --git a/src/mame/drivers/segas18.cpp b/src/mame/drivers/segas18.cpp
index 3983dbc8098..90b84b9d9e6 100644
--- a/src/mame/drivers/segas18.cpp
+++ b/src/mame/drivers/segas18.cpp
@@ -182,7 +182,7 @@ void segas18_state::machine_reset()
m_vdp->device_reset_old();
// if we are running with a real live 8751, we need to boost the interleave at startup
- if (m_mcu != NULL && m_mcu->type() == I8751)
+ if (m_mcu != nullptr && m_mcu->type() == I8751)
synchronize(TID_INITIAL_BOOST);
}
diff --git a/src/mame/drivers/segas24.cpp b/src/mame/drivers/segas24.cpp
index 644b4f723c0..729fee2197e 100644
--- a/src/mame/drivers/segas24.cpp
+++ b/src/mame/drivers/segas24.cpp
@@ -2374,7 +2374,7 @@ DRIVER_INIT_MEMBER(segas24_state,hotrod)
{
io_r = &segas24_state::hotrod_io_r;
io_w = &segas24_state::hotrod_io_w;
- mlatch_table = 0;
+ mlatch_table = nullptr;
// Sector Size
// 1 8192
@@ -2409,7 +2409,7 @@ DRIVER_INIT_MEMBER(segas24_state,sspirits)
{
io_r = &segas24_state::hotrod_io_r;
io_w = &segas24_state::hotrod_io_w;
- mlatch_table = 0;
+ mlatch_table = nullptr;
track_size = 0x2d00;
}
@@ -2417,7 +2417,7 @@ DRIVER_INIT_MEMBER(segas24_state,sspiritj)
{
io_r = &segas24_state::hotrod_io_r;
io_w = &segas24_state::hotrod_io_w;
- mlatch_table = 0;
+ mlatch_table = nullptr;
track_size = 0x2f00;
}
@@ -2434,7 +2434,7 @@ DRIVER_INIT_MEMBER(segas24_state,sgmast)
{
io_r = &segas24_state::hotrod_io_r;
io_w = &segas24_state::hotrod_io_w;
- mlatch_table = 0;
+ mlatch_table = nullptr;
track_size = 0x2d00;
}
@@ -2442,7 +2442,7 @@ DRIVER_INIT_MEMBER(segas24_state,qsww)
{
io_r = &segas24_state::hotrod_io_r;
io_w = &segas24_state::hotrod_io_w;
- mlatch_table = 0;
+ mlatch_table = nullptr;
track_size = 0x2d00;
}
@@ -2450,7 +2450,7 @@ DRIVER_INIT_MEMBER(segas24_state,gground)
{
io_r = &segas24_state::hotrod_io_r;
io_w = &segas24_state::hotrod_io_w;
- mlatch_table = 0;
+ mlatch_table = nullptr;
track_size = 0x2d00;
}
@@ -2458,7 +2458,7 @@ DRIVER_INIT_MEMBER(segas24_state,crkdown)
{
io_r = &segas24_state::hotrod_io_r;
io_w = &segas24_state::hotrod_io_w;
- mlatch_table = 0;
+ mlatch_table = nullptr;
track_size = 0x2d00;
}
@@ -2466,7 +2466,7 @@ DRIVER_INIT_MEMBER(segas24_state,roughrac)
{
io_r = &segas24_state::hotrod_io_r;
io_w = &segas24_state::hotrod_io_w;
- mlatch_table = 0;
+ mlatch_table = nullptr;
track_size = 0x2d00;
}
diff --git a/src/mame/drivers/segas32.cpp b/src/mame/drivers/segas32.cpp
index 6e107d3070c..54dc575c541 100644
--- a/src/mame/drivers/segas32.cpp
+++ b/src/mame/drivers/segas32.cpp
@@ -791,7 +791,7 @@ INTERRUPT_GEN_MEMBER(segas32_state::start_of_vblank_int)
machine().scheduler().timer_set(m_screen->time_until_pos(0), timer_expired_delegate(FUNC(segas32_state::end_of_vblank_int),this));
if (m_system32_prot_vblank)
(this->*m_system32_prot_vblank)();
- if (m_s32comm != NULL)
+ if (m_s32comm != nullptr)
m_s32comm->check_vint_irq();
}
@@ -4921,10 +4921,10 @@ void segas32_state::segas32_common_init(read16_delegate custom_r, write16_delega
/* reset the custom handlers and other pointers */
m_custom_io_r[0] = custom_r;
m_custom_io_w[0] = custom_w;
- m_system32_prot_vblank = NULL;
- m_sw1_output = NULL;
- m_sw2_output = NULL;
- m_sw3_output = NULL;
+ m_system32_prot_vblank = nullptr;
+ m_sw1_output = nullptr;
+ m_sw2_output = nullptr;
+ m_sw3_output = nullptr;
}
@@ -5203,8 +5203,8 @@ void segas32_state::init_arescue(int m_hasdsp)
segas32_common_init(read16_delegate(FUNC(segas32_state::analog_custom_io_r),this), write16_delegate(FUNC(segas32_state::analog_custom_io_w),this));
if (m_hasdsp) m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa00000, 0xa00007, read16_delegate(FUNC(segas32_state::arescue_dsp_r),this), write16_delegate(FUNC(segas32_state::arescue_dsp_w),this));
- for (int i = 0; i < 6; i++)
- m_arescue_dsp_io[i] = 0x00;
+ for (auto & elem : m_arescue_dsp_io)
+ elem = 0x00;
m_sw1_output = &segas32_state::arescue_sw1_output;
}
diff --git a/src/mame/drivers/segaufo.cpp b/src/mame/drivers/segaufo.cpp
index c73f27938b7..a125a11dc0c 100644
--- a/src/mame/drivers/segaufo.cpp
+++ b/src/mame/drivers/segaufo.cpp
@@ -726,12 +726,12 @@ void ufo_state::machine_start()
for (int m = 0; m < 4; m++)
{
- for (int p = 0; p < 2; p++)
+ for (auto & elem : m_player)
{
- m_player[p].motor[m].running = 0;
- m_player[p].motor[m].direction = 0;
- m_player[p].motor[m].position = 0.5;
- m_player[p].motor[m].speed = motor_speeds[m];
+ elem.motor[m].running = 0;
+ elem.motor[m].direction = 0;
+ elem.motor[m].position = 0.5;
+ elem.motor[m].speed = motor_speeds[m];
}
save_item(NAME(m_player[0].motor[m].running), m);
diff --git a/src/mame/drivers/segaxbd.cpp b/src/mame/drivers/segaxbd.cpp
index 98a709b5810..5758c0957c2 100644
--- a/src/mame/drivers/segaxbd.cpp
+++ b/src/mame/drivers/segaxbd.cpp
@@ -284,10 +284,10 @@ segaxbd_state::segaxbd_state(const machine_config &mconfig, const char *tag, dev
m_segaic16vid(*this, "segaic16vid"),
m_segaic16road(*this, "segaic16road"),
m_road_priority(1),
- m_scanline_timer(NULL),
+ m_scanline_timer(nullptr),
m_timer_irq_state(0),
m_vblank_irq_state(0),
- m_loffire_sync(NULL),
+ m_loffire_sync(nullptr),
m_lastsurv_mux(0),
m_paletteram(*this, "paletteram"),
m_gprider_hack(false),
@@ -369,9 +369,9 @@ public:
: segaxbd_new_state(mconfig, type, tag),
m_subpcb(*this, "subpcb")
{
- for (int i = 0; i < 0x800; i++)
+ for (auto & elem : shareram)
{
- shareram[i] = 0x0000;
+ elem = 0x0000;
}
rampage1 = 0x0000;
rampage2 = 0x0000;
@@ -598,7 +598,7 @@ WRITE16_MEMBER( segaxbd_state::iochip_0_w )
m_segaic16vid->set_display_enable(data & 0x20);
m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
- if (m_soundcpu2 != NULL)
+ if (m_soundcpu2 != nullptr)
m_soundcpu2->set_input_line(INPUT_LINE_RESET, (data & 0x01) ? CLEAR_LINE : ASSERT_LINE);
break;
@@ -793,7 +793,7 @@ void segaxbd_state::device_timer(emu_timer &timer, device_timer_id id, int param
m_soundcpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
// if an extra sound board is attached, do an nmi there as well
- if (m_soundcpu2 != NULL)
+ if (m_soundcpu2 != nullptr)
m_soundcpu2->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
break;
@@ -1024,16 +1024,16 @@ void segaxbd_state::palette_init()
double weights_normal[6];
compute_resistor_weights(0, 255, -1.0,
6, resistances_normal, weights_normal, 0, 0,
- 0, NULL, NULL, 0, 0,
- 0, NULL, NULL, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
// compute weight table for shadow/hilight palette entries
static const int resistances_sh[6] = { 3900, 2000, 1000, 1000/2, 1000/4, 470 };
double weights_sh[6];
compute_resistor_weights(0, 255, -1.0,
6, resistances_sh, weights_sh, 0, 0,
- 0, NULL, NULL, 0, 0,
- 0, NULL, NULL, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
// compute R, G, B for each weight
for (int value = 0; value < 32; value++)
diff --git a/src/mame/drivers/seibuspi.cpp b/src/mame/drivers/seibuspi.cpp
index 85a8ddd99bb..27011a13ef4 100644
--- a/src/mame/drivers/seibuspi.cpp
+++ b/src/mame/drivers/seibuspi.cpp
@@ -879,7 +879,7 @@ READ8_MEMBER(seibuspi_state::sound_fifo_status_r)
// d0: fifo full flag (z80)
// d1: fifo empty flag (main)
// other bits: unused?
- int d1 = (m_soundfifo2 != NULL) ? m_soundfifo2->ef_r() << 1 : 0;
+ int d1 = (m_soundfifo2 != nullptr) ? m_soundfifo2->ef_r() << 1 : 0;
return d1 | m_soundfifo1->ff_r();
}
@@ -1060,7 +1060,7 @@ READ8_MEMBER(seibuspi_state::z80_soundfifo_status_r)
// d0: fifo full flag (main)
// d1: fifo empty flag (z80)
// other bits: unused?
- int d0 = (m_soundfifo2 != NULL) ? m_soundfifo2->ff_r() : 0;
+ int d0 = (m_soundfifo2 != nullptr) ? m_soundfifo2->ff_r() : 0;
return d0 | m_soundfifo1->ef_r() << 1;
}
@@ -1767,7 +1767,7 @@ IRQ_CALLBACK_MEMBER(seibuspi_state::spi_irq_callback)
void seibuspi_state::init_spi_common()
{
- if (m_z80_rom != NULL)
+ if (m_z80_rom != nullptr)
membank("bank1")->configure_entries(0, 8, m_z80_rom->base(), 0x8000);
}
@@ -1806,7 +1806,7 @@ void seibuspi_state::machine_start()
save_item(NAME(m_z80_lastbank));
save_item(NAME(m_sb_coin_latch));
save_item(NAME(m_ejsakura_input_port));
- if (m_z80_rom != NULL) save_pointer(NAME(m_z80_rom->base()), m_z80_rom->bytes());
+ if (m_z80_rom != nullptr) save_pointer(NAME(m_z80_rom->base()), m_z80_rom->bytes());
}
MACHINE_RESET_MEMBER(seibuspi_state,spi)
diff --git a/src/mame/drivers/sengokmj.cpp b/src/mame/drivers/sengokmj.cpp
index 1771d9515a5..8484553cab2 100644
--- a/src/mame/drivers/sengokmj.cpp
+++ b/src/mame/drivers/sengokmj.cpp
@@ -612,7 +612,7 @@ ROM_START( sengokmj )
ROM_REGION( 0x20000, "audiocpu", 0 ) /* 64k code for sound Z80 */
ROM_LOAD( "mah1-2-1.013", 0x000000, 0x08000, CRC(6a4f31b8) SHA1(5e1d7ed299c1fd65c7a43faa02831220f4251733) )
ROM_CONTINUE( 0x010000, 0x08000 )
- ROM_COPY( "audiocpu", 0, 0x018000, 0x08000 )
+ ROM_COPY( "audiocpu", nullptr, 0x018000, 0x08000 )
ROM_REGION( 0x100000, "spr_gfx", 0 ) /*Sprites gfx rom*/
ROM_LOAD( "rssengo2.72", 0x00000, 0x100000, CRC(fb215ff8) SHA1(f98c0a53ad9b97d209dd1f85c994fc17ec585bd7) )
@@ -622,7 +622,7 @@ ROM_START( sengokmj )
ROM_LOAD( "rssengo1.68", 0x100000, 0x100000, CRC(1bbd00e5) SHA1(86391323b8e0d3b7e09a5914d87fb2adc48e5af4) )
ROM_REGION( 0x080000, "bg_gfx", 0 )
- ROM_COPY( "gfx_tiles" , 0x000000, 0x00000, 0x080000)
+ ROM_COPY( "gfx_tiles" , nullptr, 0x00000, 0x080000)
ROM_REGION( 0x080000, "md_gfx", 0 )
ROM_COPY( "gfx_tiles" , 0x080000, 0x00000, 0x080000)
diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp
index d3f652cfa6b..6b16f2e6ace 100644
--- a/src/mame/drivers/seta.cpp
+++ b/src/mame/drivers/seta.cpp
@@ -1397,7 +1397,7 @@ static void uPD71054_update_timer( running_machine &machine, device_t *cpu, int
} else {
uPD71054->timer[no]->adjust( attotime::never, no);
state->logerror( "CPU #0 PC %06X: uPD71054 error, timer %d duration is 0\n",
- (cpu != NULL) ? cpu->safe_pc() : -1, no );
+ (cpu != nullptr) ? cpu->safe_pc() : -1, no );
}
}
@@ -1409,7 +1409,7 @@ static void uPD71054_update_timer( running_machine &machine, device_t *cpu, int
TIMER_CALLBACK_MEMBER(seta_state::uPD71054_timer_callback)
{
m_maincpu->set_input_line(4, HOLD_LINE );
- uPD71054_update_timer( machine(), NULL, param );
+ uPD71054_update_timer( machine(), nullptr, param );
}
@@ -10316,7 +10316,7 @@ ROM_START( zingzipbl )
ROM_LOAD16_BYTE( "14", 0x100001, 0x080000, CRC(fefad62f) SHA1(13aaf6cc6af4b42a1184f3fc6c07d9d966153dc1) )
ROM_REGION( 0x200000, "gfx2", 0 ) /* Layer 1 */
- ROM_COPY( "gfxtemp", 0x000000, 0x000000, 0x80000 )
+ ROM_COPY( "gfxtemp", nullptr, 0x000000, 0x80000 )
ROM_COPY( "gfxtemp", 0x100000, 0x080000, 0x80000 )
// 2bpp of extra planes for this layer
ROM_LOAD16_BYTE( "15", 0x100000, 0x040000, CRC(af7a786f) SHA1(de67960f529ebfff0f1d55c79912685f9eca9623) )
@@ -10666,7 +10666,7 @@ ROM_START( jjsquawkb )
ROM_LOAD( "1.bin", 0x200000, 0x200000, CRC(a5d37cf7) SHA1(9573777f3cdd6b25f0bd56f65f583fddda21c900) )
ROM_REGION( 0x200000, "gfx2", 0 ) /* Layer 1 */
- ROM_COPY( "gfxtemp", 0x000000, 0x000000, 0x100000 )
+ ROM_COPY( "gfxtemp", nullptr, 0x000000, 0x100000 )
ROM_COPY( "gfxtemp", 0x200000, 0x100000, 0x100000 )
@@ -10713,7 +10713,7 @@ ROM_START( kamenrid )
ROM_LOAD( "fj001007.152", 0x000000, 0x080000, CRC(d9ffe80b) SHA1(c1f919b53cd1b9874a5e5dc5640891e1b227cfc6) )
ROM_REGION( 0x40000, "gfx2", 0 ) /* Layer 1 */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x040000 )
+ ROM_COPY( "user1", nullptr, 0x000000, 0x040000 )
ROM_REGION( 0x40000, "gfx3", 0 ) /* Layer 2 */
ROM_COPY( "user1", 0x040000, 0x000000, 0x040000 )
@@ -11076,7 +11076,7 @@ ROM_START( madshark )
ROM_LOAD16_BYTE( "fq001005.205", 0x200000, 0x100000, CRC(5f6c6d4a) SHA1(eed5661738282a14ce89917335fd1b695eb7351e) )
ROM_REGION( 0x200000, "gfx2", 0 ) /* Layer 1 */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x100000 )
+ ROM_COPY( "user1", nullptr, 0x000000, 0x100000 )
ROM_COPY( "user1", 0x200000, 0x100000, 0x100000 )
ROM_REGION( 0x200000, "gfx3", 0 ) /* Layer 2 */
@@ -11100,7 +11100,7 @@ ROM_START( magspeed )
ROM_LOAD( "fu001006.152", 0x000000, 0x100000, CRC(70855139) SHA1(24d635aceb823b0569169c8ecced13ac82c17d6a) )
ROM_REGION( 0x80000, "gfx2", 0 ) /* Layer 1 */
- ROM_COPY( "user1", 0x00000, 0x00000, 0x80000 )
+ ROM_COPY( "user1", nullptr, 0x00000, 0x80000 )
ROM_REGION( 0x80000, "gfx3", 0 ) /* Layer 2 */
ROM_COPY( "user1", 0x80000, 0x00000, 0x80000 )
diff --git a/src/mame/drivers/seta2.cpp b/src/mame/drivers/seta2.cpp
index 6827df7fb95..c5d810639c7 100644
--- a/src/mame/drivers/seta2.cpp
+++ b/src/mame/drivers/seta2.cpp
@@ -2720,7 +2720,7 @@ ROM_START( gundamex )
ROM_LOAD( "ka001006.u21", 0x1000000, 0x200000, CRC(6aac2f2f) SHA1(fac5478ca2941a93c57f670a058ff626e537bcde) )
ROM_LOAD( "ka001007.u22", 0x1200000, 0x200000, CRC(588f9d63) SHA1(ed5148d09d02e3bc12c50c39c5c86e6356b2dd7a) )
ROM_LOAD( "ka001008.u23", 0x1400000, 0x200000, CRC(db55a60a) SHA1(03d118c7284ca86219891c473e2a89489710ea27) )
- ROM_FILL( 0x1800000, 0x600000, 0 ) // 6bpp instead of 8bpp
+ ROM_FILL( 0x1800000, 0x600000, nullptr ) // 6bpp instead of 8bpp
ROM_REGION( 0x300000, "x1snd", 0 ) // Samples
// Leave 1MB empty (addressable by the chip)
@@ -2759,7 +2759,7 @@ ROM_START( mj4simai )
ROM_LOAD( "cha-06.u17", 0x0c00000, 0x400000, CRC(5cb0b3a9) SHA1(92fb82d45b4c46326d5796981f812e20a8ddb4f2) )
ROM_LOAD( "cha-01.u21", 0x1000000, 0x400000, CRC(35f47b37) SHA1(4a8eb088890272f2a069e2c3f00fadf6421f7b0e) )
ROM_LOAD( "cha-02.u22", 0x1400000, 0x400000, CRC(f6346860) SHA1(4eebd3fa315b97964fa39b88224f9de7622ba881) )
- ROM_FILL( 0x1800000, 0x800000, 0 ) // 6bpp instead of 8bpp
+ ROM_FILL( 0x1800000, 0x800000, nullptr ) // 6bpp instead of 8bpp
ROM_REGION( 0x500000, "x1snd", 0 ) // Samples
// Leave 1MB empty (addressable by the chip)
@@ -3035,7 +3035,7 @@ ROM_START( penbros )
ROM_LOAD( "u38.bin", 0x000000, 0x400000, CRC(4247b39e) SHA1(f273931293beced312e02c870bf35e9cf0c91a8b) )
ROM_LOAD( "u39.bin", 0x400000, 0x400000, CRC(f9f07faf) SHA1(66fc4a9ad422fb384d2c775e43619137226898fc) )
ROM_LOAD( "u40.bin", 0x800000, 0x400000, CRC(dc9e0a96) SHA1(c2c8ccf9039ee0e179b08fdd2d37f29899349cda) )
- ROM_FILL( 0xc00000, 0x400000, 0 ) // 6bpp instead of 8bpp
+ ROM_FILL( 0xc00000, 0x400000, nullptr ) // 6bpp instead of 8bpp
ROM_REGION( 0x300000, "x1snd", 0 ) // Samples
// Leave 1MB empty (addressable by the chip)
diff --git a/src/mame/drivers/sg1000.cpp b/src/mame/drivers/sg1000.cpp
index 607c56cf4b1..23790083a21 100644
--- a/src/mame/drivers/sg1000.cpp
+++ b/src/mame/drivers/sg1000.cpp
@@ -590,7 +590,7 @@ WRITE8_MEMBER( sf7000_state::ppi_pc_w )
if (!BIT(data, 0))
m_fdc->set_floppy(m_floppy0);
else
- m_fdc->set_floppy(NULL);
+ m_fdc->set_floppy(nullptr);
/* floppy motor */
m_floppy0->mon_w(BIT(data, 1));
@@ -735,7 +735,7 @@ static MACHINE_CONFIG_START( sg1000, sg1000_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
/* cartridge */
- MCFG_SG1000_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, NULL)
+ MCFG_SG1000_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","sg1000")
@@ -755,7 +755,7 @@ static MACHINE_CONFIG_DERIVED( omv, sg1000 )
MCFG_CPU_IO_MAP(omv_io_map)
MCFG_DEVICE_REMOVE(CARTSLOT_TAG)
- MCFG_OMV_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, NULL)
+ MCFG_OMV_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, nullptr)
MCFG_RAM_MODIFY(RAM_TAG)
MCFG_RAM_DEFAULT_SIZE("2K")
@@ -798,7 +798,7 @@ static MACHINE_CONFIG_START( sc3000, sc3000_state )
MCFG_CASSETTE_INTERFACE("sc3000_cass")
/* cartridge */
- MCFG_SC3000_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, NULL)
+ MCFG_SC3000_CARTRIDGE_ADD(CARTSLOT_TAG, sg1000_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","sg1000")
@@ -849,7 +849,7 @@ static MACHINE_CONFIG_START( sf7000, sf7000_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(UPD8251_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(UPD8251_TAG, i8251_device, write_dsr))
diff --git a/src/mame/drivers/shangha3.cpp b/src/mame/drivers/shangha3.cpp
index 5b610aa7cce..ab41398f789 100644
--- a/src/mame/drivers/shangha3.cpp
+++ b/src/mame/drivers/shangha3.cpp
@@ -702,13 +702,13 @@ ROM_START( blocken ) /* PCB labeled KID-07 */
ROM_REGION( 0x100000, "oki", 0 )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
- ROM_COPY( "samples", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "samples", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "samples", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "samples", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "samples", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "samples", nullptr, 0x040000, 0x020000)
ROM_COPY( "samples", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "samples", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "samples", nullptr, 0x080000, 0x020000)
ROM_COPY( "samples", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "samples", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "samples", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "samples", 0x060000, 0x0e0000, 0x020000)
ROM_END
diff --git a/src/mame/drivers/sigmab98.cpp b/src/mame/drivers/sigmab98.cpp
index a4b9719bfcc..3cdbd746b38 100644
--- a/src/mame/drivers/sigmab98.cpp
+++ b/src/mame/drivers/sigmab98.cpp
@@ -2706,7 +2706,7 @@ ROM_START( sammymdl )
ROM_REGION( 0x1000000, "oki", ROMREGION_ERASEFF )
ROM_REGION( 0x40000, "maincpu", ROMREGION_ERASEFF )
- ROM_COPY( "mainbios", 0x0000, 0x0000, 0x40000 )
+ ROM_COPY( "mainbios", nullptr, 0x0000, 0x40000 )
ROM_REGION( 0x200000, "sprites", ROMREGION_ERASEFF )
ROM_END
diff --git a/src/mame/drivers/silkroad.cpp b/src/mame/drivers/silkroad.cpp
index ed80f4eebdc..d7bf3416254 100644
--- a/src/mame/drivers/silkroad.cpp
+++ b/src/mame/drivers/silkroad.cpp
@@ -342,11 +342,11 @@ ROM_START( silkroad )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0xc0000, "oki1", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0a0000, 0x020000)
ROM_REGION( 0x080000, "oki2", 0 )
@@ -378,11 +378,11 @@ ROM_START( silkroada )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0xc0000, "oki1", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0a0000, 0x020000)
ROM_REGION( 0x080000, "oki2", 0 )
diff --git a/src/mame/drivers/skykid.cpp b/src/mame/drivers/skykid.cpp
index 37172964a2d..222869725dc 100644
--- a/src/mame/drivers/skykid.cpp
+++ b/src/mame/drivers/skykid.cpp
@@ -489,7 +489,7 @@ ROM_START( skykid )
ROM_LOAD( "sk1_8.10n", 0x0000, 0x4000, CRC(44bb7375) SHA1(5b2fa6782671150bab5f3c3ac46b47bc23f3d7e0) ) /* sprites */
ROM_LOAD( "sk1_7.10m", 0x4000, 0x4000, CRC(3454671d) SHA1(723b26a0f208addc2a22736457cb4be6ab6c69cc) )
/* 0x8000-0xbfff will be unpacked from 0x4000-0x5fff */
- ROM_FILL( 0xc000, 0x4000, 0x00 ) // part of the gfx is 2bpp decoded as 3bpp
+ ROM_FILL( 0xc000, 0x4000, nullptr ) // part of the gfx is 2bpp decoded as 3bpp
ROM_REGION( 0x0700, "proms", 0 )
ROM_LOAD( "sk1-1.2n", 0x0000, 0x0100, CRC(0218e726) SHA1(8b766162a4783c058d9a1ecf8741673d7ef955fb) ) /* red component */
@@ -519,7 +519,7 @@ ROM_START( skykido )
ROM_LOAD( "sk1_8.10n", 0x0000, 0x4000, CRC(44bb7375) SHA1(5b2fa6782671150bab5f3c3ac46b47bc23f3d7e0) ) /* sprites */
ROM_LOAD( "sk1_7.10m", 0x4000, 0x4000, CRC(3454671d) SHA1(723b26a0f208addc2a22736457cb4be6ab6c69cc) )
/* 0x8000-0xbfff will be unpacked from 0x4000-0x5fff */
- ROM_FILL( 0xc000, 0x4000, 0x00 ) // part of the gfx is 2bpp decoded as 3bpp
+ ROM_FILL( 0xc000, 0x4000, nullptr ) // part of the gfx is 2bpp decoded as 3bpp
ROM_REGION( 0x0700, "proms", 0 )
ROM_LOAD( "sk1-1.2n", 0x0000, 0x0100, CRC(0218e726) SHA1(8b766162a4783c058d9a1ecf8741673d7ef955fb) ) /* red component */
@@ -549,7 +549,7 @@ ROM_START( skykidd )
ROM_LOAD( "sk1_8.10n", 0x0000, 0x4000, CRC(44bb7375) SHA1(5b2fa6782671150bab5f3c3ac46b47bc23f3d7e0) ) /* sprites */
ROM_LOAD( "sk1_7.10m", 0x4000, 0x4000, CRC(3454671d) SHA1(723b26a0f208addc2a22736457cb4be6ab6c69cc) )
/* 0x8000-0xbfff will be unpacked from 0x4000-0x5fff */
- ROM_FILL( 0xc000, 0x4000, 0x00 ) // part of the gfx is 2bpp decoded as 3bpp
+ ROM_FILL( 0xc000, 0x4000, nullptr ) // part of the gfx is 2bpp decoded as 3bpp
ROM_REGION( 0x0700, "proms", 0 )
ROM_LOAD( "sk1-1.2n", 0x0000, 0x0100, CRC(0218e726) SHA1(8b766162a4783c058d9a1ecf8741673d7ef955fb) ) /* red component */
@@ -579,7 +579,7 @@ ROM_START( skykids )
ROM_LOAD( "sk1_8.10n", 0x0000, 0x4000, CRC(44bb7375) SHA1(5b2fa6782671150bab5f3c3ac46b47bc23f3d7e0) ) /* sprites */
ROM_LOAD( "sk1_7.10m", 0x4000, 0x4000, CRC(3454671d) SHA1(723b26a0f208addc2a22736457cb4be6ab6c69cc) )
/* 0x8000-0xbfff will be unpacked from 0x4000-0x5fff */
- ROM_FILL( 0xc000, 0x4000, 0x00 ) // part of the gfx is 2bpp decoded as 3bpp
+ ROM_FILL( 0xc000, 0x4000, nullptr ) // part of the gfx is 2bpp decoded as 3bpp
ROM_REGION( 0x0700, "proms", 0 )
ROM_LOAD( "sk1-1.2n", 0x0000, 0x0100, CRC(0218e726) SHA1(8b766162a4783c058d9a1ecf8741673d7ef955fb) ) /* red component */
@@ -609,7 +609,7 @@ ROM_START( drgnbstr )
ROM_LOAD( "db1_8.10n", 0x0000, 0x4000, CRC(11942c61) SHA1(0f065cb82cf83967e90b3c7326b36956f4fa9a52) ) /* sprites */
ROM_LOAD( "db1_7.10m", 0x4000, 0x4000, CRC(cc130fe2) SHA1(4f5d4f21152b3b4e523a6d17dd5ff5cef52447f2) )
/* 0x8000-0xbfff will be unpacked from 0x4000-0x5fff */
- ROM_FILL( 0xc000, 0x4000, 0x00 ) // part of the gfx is 2bpp decoded as 3bpp
+ ROM_FILL( 0xc000, 0x4000, nullptr ) // part of the gfx is 2bpp decoded as 3bpp
ROM_REGION( 0x0700, "proms", 0 )
ROM_LOAD( "db1-1.2n", 0x0000, 0x0100, CRC(3f8cce97) SHA1(027b3fb0f322a9d68b434b207a40b31799a8a8d6) ) /* red component */
diff --git a/src/mame/drivers/slapshot.cpp b/src/mame/drivers/slapshot.cpp
index 3eeddfd1646..af6c965a493 100644
--- a/src/mame/drivers/slapshot.cpp
+++ b/src/mame/drivers/slapshot.cpp
@@ -600,7 +600,7 @@ ROM_START( slapshot )
ROM_LOAD16_BYTE( "d71-01.23", 0x000000, 0x100000, CRC(0b1e8c27) SHA1(ffa452f7414f3d61edb69bb61b29a0cc8d9176d0) ) /* OBJ 6bpp */
ROM_LOAD16_BYTE( "d71-02.24", 0x000001, 0x100000, CRC(ccaaea2d) SHA1(71b507f215f37e991abae5523642417a6b23a70d) )
ROM_LOAD ( "d71-03.25", 0x300000, 0x100000, CRC(dccef9ec) SHA1(ee7a49727b822cf4c1d7acff994b77ea6191c423) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION( 0x80000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "d71-06.37", 0x00000, 0x80000, CRC(f3324188) SHA1(70dd724441eae8614218bc7f0f51860bd2462f0c) )
@@ -634,7 +634,7 @@ ROM_START( opwolf3 )
ROM_LOAD16_BYTE( "d74_02.23", 0x000000, 0x200000, CRC(aab86332) SHA1(b9133407504e9ef4fd5ae7d284cdb0c7f78f9a99) ) /* OBJ 6bpp */
ROM_LOAD16_BYTE( "d74_03.24", 0x000001, 0x200000, CRC(3f398916) SHA1(4b6a3ee0baf5f32e24e5040f233300f1ca347fe7) )
ROM_LOAD ( "d74_04.25", 0x600000, 0x200000, CRC(2f385638) SHA1(1ba2ec7d9b1c491e1cc6d7e646e09ef2bc063f25) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION( 0x200000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "d74_01.37", 0x000000, 0x200000, CRC(115313e0) SHA1(51a69e7a26960b1328ccefeaec0fb26bdccc39f2) )
@@ -660,7 +660,7 @@ ROM_START( opwolf3u )
ROM_LOAD16_BYTE( "d74_02.23", 0x000000, 0x200000, CRC(aab86332) SHA1(b9133407504e9ef4fd5ae7d284cdb0c7f78f9a99) ) /* OBJ 6bpp */
ROM_LOAD16_BYTE( "d74_03.24", 0x000001, 0x200000, CRC(3f398916) SHA1(4b6a3ee0baf5f32e24e5040f233300f1ca347fe7) )
ROM_LOAD ( "d74_04.25", 0x600000, 0x200000, CRC(2f385638) SHA1(1ba2ec7d9b1c491e1cc6d7e646e09ef2bc063f25) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION( 0x200000, "ymsnd", 0 ) /* ADPCM samples */
ROM_LOAD( "d74_01.37", 0x000000, 0x200000, CRC(115313e0) SHA1(51a69e7a26960b1328ccefeaec0fb26bdccc39f2) )
diff --git a/src/mame/drivers/slicer.cpp b/src/mame/drivers/slicer.cpp
index ca322b43001..ce294cfcea4 100644
--- a/src/mame/drivers/slicer.cpp
+++ b/src/mame/drivers/slicer.cpp
@@ -110,16 +110,16 @@ static MACHINE_CONFIG_START( slicer, slicer_state )
MCFG_RS232_PORT_ADD("rs232_1", default_rs232_devices, "terminal")
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("sc2681", mc68681_device, rx_a_w))
- MCFG_RS232_PORT_ADD("rs232_2", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232_2", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("sc2681", mc68681_device, rx_b_w))
MCFG_FD1797_ADD("fdc", XTAL_16MHz/2/8)
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, int1_w))
MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE("maincpu", i80186_cpu_device, drq0_w))
MCFG_FLOPPY_DRIVE_ADD("fdc:0", slicer_floppies, "525dd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:1", slicer_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:2", slicer_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("fdc:3", slicer_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:1", slicer_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:2", slicer_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("fdc:3", slicer_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_DEVICE_ADD("sasi", SCSI_PORT, 0)
MCFG_SCSI_DATA_INPUT_BUFFER("sasi_data_in")
diff --git a/src/mame/drivers/smc777.cpp b/src/mame/drivers/smc777.cpp
index 6932842d06c..dc3be14211f 100644
--- a/src/mame/drivers/smc777.cpp
+++ b/src/mame/drivers/smc777.cpp
@@ -406,7 +406,7 @@ READ8_MEMBER( smc777_state::fdc_request_r )
WRITE8_MEMBER( smc777_state::floppy_select_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
// ---- xxxx select floppy drive (yes, 15 of them, A to P)
switch (data & 0x01)
diff --git a/src/mame/drivers/sms.cpp b/src/mame/drivers/sms.cpp
index 510849ccc67..4bad2a9de79 100644
--- a/src/mame/drivers/sms.cpp
+++ b/src/mame/drivers/sms.cpp
@@ -503,7 +503,7 @@ static MACHINE_CONFIG_START( sms_ntsc_base, sms_state )
MCFG_SOUND_ADD("segapsg", SEGAPSG, XTAL_53_693175MHz/15)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- MCFG_SMS_CARTRIDGE_ADD("slot", sms_cart, NULL)
+ MCFG_SMS_CARTRIDGE_ADD("slot", sms_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","sms")
@@ -592,8 +592,8 @@ static MACHINE_CONFIG_DERIVED( sms1_ntsc, sms_ntsc_base )
MCFG_SEGA315_5124_PAUSE_CB(WRITELINE(sms_state, sms_pause_callback))
// card and expansion slots, not present in Master System II
- MCFG_SMS_CARD_ADD("mycard", sms_cart, NULL)
- MCFG_SMS_EXPANSION_ADD("exp", sms_expansion_devices, NULL)
+ MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
+ MCFG_SMS_EXPANSION_ADD("exp", sms_expansion_devices, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED_CLASS( sms_sdisp, sms1_ntsc, smssdisp_state )
@@ -609,38 +609,38 @@ static MACHINE_CONFIG_DERIVED_CLASS( sms_sdisp, sms1_ntsc, smssdisp_state )
MCFG_DEVICE_REMOVE("mycard")
MCFG_DEVICE_REMOVE("exp")
- MCFG_SMS_CARTRIDGE_ADD("slot2", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot3", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot4", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot5", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot6", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot7", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot8", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot9", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot10", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot11", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot12", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot13", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot14", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot15", sms_cart, NULL)
- MCFG_SMS_CARTRIDGE_ADD("slot16", sms_cart, NULL)
-
- MCFG_SMS_CARD_ADD("slot17", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot18", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot19", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot20", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot21", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot22", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot23", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot24", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot25", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot26", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot27", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot28", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot29", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot30", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot31", sms_cart, NULL)
- MCFG_SMS_CARD_ADD("slot32", sms_cart, NULL)
+ MCFG_SMS_CARTRIDGE_ADD("slot2", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot3", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot4", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot5", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot6", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot7", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot8", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot9", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot10", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot11", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot12", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot13", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot14", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot15", sms_cart, nullptr)
+ MCFG_SMS_CARTRIDGE_ADD("slot16", sms_cart, nullptr)
+
+ MCFG_SMS_CARD_ADD("slot17", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot18", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot19", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot20", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot21", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot22", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot23", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot24", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot25", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot26", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot27", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot28", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot29", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot30", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot31", sms_cart, nullptr)
+ MCFG_SMS_CARD_ADD("slot32", sms_cart, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( sms_pal_base, sms_state )
@@ -660,7 +660,7 @@ static MACHINE_CONFIG_START( sms_pal_base, sms_state )
MCFG_SOUND_ADD("segapsg", SEGAPSG, MASTER_CLOCK_PAL/15)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.00)
- MCFG_SMS_CARTRIDGE_ADD("slot", sms_cart, NULL)
+ MCFG_SMS_CARTRIDGE_ADD("slot", sms_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","sms")
@@ -732,8 +732,8 @@ static MACHINE_CONFIG_DERIVED( sms1_pal, sms_pal_base )
MCFG_SEGA315_5124_PAUSE_CB(WRITELINE(sms_state, sms_pause_callback))
// card and expansion slots, not present in Master System II
- MCFG_SMS_CARD_ADD("mycard", sms_cart, NULL)
- MCFG_SMS_EXPANSION_ADD("exp", sms_expansion_devices, NULL)
+ MCFG_SMS_CARD_ADD("mycard", sms_cart, nullptr)
+ MCFG_SMS_EXPANSION_ADD("exp", sms_expansion_devices, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sms1_kr, sms1_ntsc )
@@ -741,7 +741,7 @@ static MACHINE_CONFIG_DERIVED( sms1_kr, sms1_ntsc )
MCFG_CPU_IO_MAP(sms1kr_io)
MCFG_DEVICE_REMOVE("slot")
- MCFG_SG1000MK3_CARTRIDGE_ADD("slot", sg1000mk3_cart, NULL)
+ MCFG_SG1000MK3_CARTRIDGE_ADD("slot", sg1000mk3_cart, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( sms1_krfm, sms1_kr )
@@ -770,7 +770,7 @@ static MACHINE_CONFIG_DERIVED( sms2_kr, sms2_ntsc )
MCFG_CPU_IO_MAP(smsj_io)
MCFG_DEVICE_REMOVE("slot")
- MCFG_SG1000MK3_CARTRIDGE_ADD("slot", sg1000mk3_cart, NULL)
+ MCFG_SG1000MK3_CARTRIDGE_ADD("slot", sg1000mk3_cart, nullptr)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( gamegear, sms_state )
@@ -809,11 +809,11 @@ static MACHINE_CONFIG_START( gamegear, sms_state )
MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
/* cartridge */
- MCFG_GG_CARTRIDGE_ADD("slot", gg_cart, NULL)
+ MCFG_GG_CARTRIDGE_ADD("slot", gg_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list", "gamegear")
- MCFG_GG_EXT_PORT_ADD("ext", gg_ext_port_devices, NULL)
+ MCFG_GG_EXT_PORT_ADD("ext", gg_ext_port_devices, nullptr)
MCFG_GG_EXT_PORT_TH_INPUT_HANDLER(WRITELINE(sms_state, gg_ext_th_input))
//MCFG_GG_EXT_PORT_PIXEL_HANDLER(READ32(sms_state, sms_pixel_color)) // only for GG-TV mod
MACHINE_CONFIG_END
@@ -849,7 +849,7 @@ ROM_END
ROM_START(smssdisp)
ROM_REGION(0x4000, "maincpu", 0)
- ROM_FILL(0x0000, 0x4000, 0x00)
+ ROM_FILL(0x0000, 0x4000, nullptr)
ROM_REGION(0x4000, "user1", 0)
ROM_FILL(0x0000, 0x4000, 0xff)
@@ -888,7 +888,7 @@ ROM_END
ROM_START(sg1000m3)
ROM_REGION(0x4000, "maincpu", 0)
- ROM_FILL(0x0000, 0x4000, 0x00)
+ ROM_FILL(0x0000, 0x4000, nullptr)
ROM_END
ROM_START(smsj) /* PCB Label: "SEGA(R) IC BOARD M4J MAIN // 837-6418"; has "YM2413 // 78 04 71 G" at IC10; Back of pcb has traces marked "171-5541 (C)SEGA 1987 MADE IN JAPAN"
@@ -912,7 +912,7 @@ ROM_END
ROM_START(gamegear)
ROM_REGION(0x4000, "maincpu", 0)
- ROM_FILL(0x0000, 0x4000, 0x00)
+ ROM_FILL(0x0000, 0x4000, nullptr)
ROM_REGION(0x0400, "user1", 0)
ROM_SYSTEM_BIOS( 0, "none", "No BIOS" ) /* gamegear */
diff --git a/src/mame/drivers/snes.cpp b/src/mame/drivers/snes.cpp
index f92d7a5098e..9a914506d19 100644
--- a/src/mame/drivers/snes.cpp
+++ b/src/mame/drivers/snes.cpp
@@ -1355,7 +1355,7 @@ static MACHINE_CONFIG_START( snes, snes_console_state )
MCFG_SOUND_ROUTE(0, "lspeaker", 1.00)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.00)
- MCFG_SNS_CARTRIDGE_ADD("snsslot", snes_cart, NULL)
+ MCFG_SNS_CARTRIDGE_ADD("snsslot", snes_cart, nullptr)
MCFG_SOFTWARE_LIST_ADD("cart_list","snes")
MCFG_SOFTWARE_LIST_ADD("bsx_list","snes_bspack")
MCFG_SOFTWARE_LIST_ADD("st_list","snes_strom")
diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp
index 1088dd68140..166866ccbe0 100644
--- a/src/mame/drivers/snk.cpp
+++ b/src/mame/drivers/snk.cpp
@@ -2962,7 +2962,7 @@ static INPUT_PORTS_START( gwar )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwar_rotary, (void*)0)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwar_rotary, (void*)nullptr)
PORT_START("P1ROT")
PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
@@ -3043,7 +3043,7 @@ static INPUT_PORTS_START( gwarb )
// connected. If rotary is not connected, player fires in the direction he's facing.
PORT_MODIFY("IN1")
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwarb_rotary, (void*)0)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwarb_rotary, (void*)nullptr)
PORT_MODIFY("IN2")
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwarb_rotary, (void*)1)
diff --git a/src/mame/drivers/snk6502.cpp b/src/mame/drivers/snk6502.cpp
index 42aada4d580..4631b0fff65 100644
--- a/src/mame/drivers/snk6502.cpp
+++ b/src/mame/drivers/snk6502.cpp
@@ -725,17 +725,17 @@ static const gfx_layout charlayout_memory =
static GFXDECODE_START( sasuke )
- GFXDECODE_ENTRY( NULL, 0x1000, swapcharlayout, 0, 4 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x1000, swapcharlayout, 0, 4 ) /* the game dynamically modifies this */
GFXDECODE_ENTRY( "gfx1", 0x0000, swapcharlayout, 4*4, 4 )
GFXDECODE_END
static GFXDECODE_START( satansat )
- GFXDECODE_ENTRY( NULL, 0x1000, charlayout_memory, 0, 4 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x1000, charlayout_memory, 0, 4 ) /* the game dynamically modifies this */
GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 4*4, 4 )
GFXDECODE_END
static GFXDECODE_START( vanguard )
- GFXDECODE_ENTRY( NULL, 0x1000, charlayout_memory, 0, 8 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x1000, charlayout_memory, 0, 8 ) /* the game dynamically modifies this */
GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 8*4, 8 )
GFXDECODE_END
diff --git a/src/mame/drivers/socrates.cpp b/src/mame/drivers/socrates.cpp
index 71100467664..b18b711f1ab 100644
--- a/src/mame/drivers/socrates.cpp
+++ b/src/mame/drivers/socrates.cpp
@@ -1464,7 +1464,7 @@ static MACHINE_CONFIG_START( iqunlimz, iqunlim_state )
MCFG_SOUND_ADD("soc_snd", SOCRATES_SOUND, XTAL_21_4772MHz/(512+256))
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
- MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, NULL)
+ MCFG_GENERIC_CARTSLOT_ADD("cartslot", generic_plain_slot, nullptr)
MACHINE_CONFIG_END
/******************************************************************************
diff --git a/src/mame/drivers/softbox.cpp b/src/mame/drivers/softbox.cpp
index 2e07b77f02a..c55adbcae7e 100644
--- a/src/mame/drivers/softbox.cpp
+++ b/src/mame/drivers/softbox.cpp
@@ -412,7 +412,7 @@ static MACHINE_CONFIG_START( softbox, softbox_state )
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)
// software lists
MCFG_SOFTWARE_LIST_ADD("flop_list", "softbox")
diff --git a/src/mame/drivers/spc1000.cpp b/src/mame/drivers/spc1000.cpp
index 8548922844f..4c1d894e016 100644
--- a/src/mame/drivers/spc1000.cpp
+++ b/src/mame/drivers/spc1000.cpp
@@ -484,7 +484,7 @@ static MACHINE_CONFIG_START( spc1000, spc1000_state )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
MCFG_DEVICE_ADD("ext1", SPC1000_EXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(spc1000_exp, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(spc1000_exp, nullptr, false)
MCFG_CENTRONICS_ADD("centronics", centronics_devices, "printer")
MCFG_CENTRONICS_BUSY_HANDLER(WRITELINE(spc1000_state, centronics_busy_w))
diff --git a/src/mame/drivers/spectrum.cpp b/src/mame/drivers/spectrum.cpp
index 17ce768f55a..e47a9ab6e75 100644
--- a/src/mame/drivers/spectrum.cpp
+++ b/src/mame/drivers/spectrum.cpp
@@ -614,9 +614,9 @@ DRIVER_INIT_MEMBER(spectrum_state,spectrum)
switch (m_ram->size())
{
case 48*1024:
- space.install_ram(0x8000, 0xffff, NULL); // Fall through
+ space.install_ram(0x8000, 0xffff, nullptr); // Fall through
case 16*1024:
- space.install_ram(0x5b00, 0x7fff, NULL);
+ space.install_ram(0x5b00, 0x7fff, nullptr);
}
}
diff --git a/src/mame/drivers/speedatk.cpp b/src/mame/drivers/speedatk.cpp
index ddd38cf4ab1..60184fe3942 100644
--- a/src/mame/drivers/speedatk.cpp
+++ b/src/mame/drivers/speedatk.cpp
@@ -348,7 +348,7 @@ ROM_START( speedatk )
ROM_REGION( 0x6000, "gfx2", 0 )
ROM_LOAD( "cb0-5", 0x0000, 0x2000, CRC(47a966e7) SHA1(fdaa0f88656afc431bae367679ce6298fa962e0f) )
ROM_LOAD( "cb0-6", 0x2000, 0x2000, CRC(cc1da937) SHA1(1697bb008bfa5c33a282bd470ac39c324eea7509) )
- ROM_COPY( "gfx2", 0x0000, 0x4000, 0x1000 ) /* Fill the blank space with cards gfx */
+ ROM_COPY( "gfx2", nullptr, 0x4000, 0x1000 ) /* Fill the blank space with cards gfx */
ROM_COPY( "gfx1", 0x1000, 0x5000, 0x1000 ) /* Gfx from cb0-7 */
ROM_REGION( 0x0120, "proms", 0 )
diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp
index ff0e54a0321..919dee1b898 100644
--- a/src/mame/drivers/spoker.cpp
+++ b/src/mame/drivers/spoker.cpp
@@ -348,7 +348,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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, (void *)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 )
@@ -417,7 +417,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, (void *)0 ) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, (void *)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 )
@@ -680,9 +680,9 @@ ROM_START( 3super8 )
ROM_LOAD( "1.bin", 0x00000, 0x40000, BAD_DUMP CRC(d9d3e21e) SHA1(2f3f07ca427d9f56f0ff143d15d95cbf15255e33) ) // sldh
ROM_LOAD( "2.bin", 0x40000, 0x40000, BAD_DUMP CRC(fbb50ab1) SHA1(50a7ef9219c38d59117c510fe6d53fb3ba1fa456) ) // sldh
ROM_LOAD( "3.bin", 0x80000, 0x40000, BAD_DUMP CRC(545aa4e6) SHA1(3348d4b692900c9e9cd4a52b20922a84e596cd35) ) // sldh
- ROM_FILL( 0x00000 ,0x20000, 0x00 )
- ROM_FILL( 0x40000 ,0x20000, 0x00 )
- ROM_FILL( 0x80000 ,0x20000, 0x00 )
+ ROM_FILL( 0x00000 ,0x20000, nullptr )
+ ROM_FILL( 0x40000 ,0x20000, nullptr )
+ ROM_FILL( 0x80000 ,0x20000, nullptr )
ROM_REGION( 0x30000, "gfx2", ROMREGION_ERASE00 )
diff --git a/src/mame/drivers/sprint2.cpp b/src/mame/drivers/sprint2.cpp
index db6bd8233a2..6117db51869 100644
--- a/src/mame/drivers/sprint2.cpp
+++ b/src/mame/drivers/sprint2.cpp
@@ -682,7 +682,7 @@ ROM_START( dominos )
ROM_LOAD_NIB_LOW ( "7440-01.r4", 0x0000, 0x0200, CRC(957dd8df) SHA1(280457392f40cd66eae34d2fcdbd4d2142793402) )
ROM_REGION( 0x200, "gfx2", 0 ) /* sprites, not used */
- ROM_FILL( 0x0000, 0x0200, 0 )
+ ROM_FILL( 0x0000, 0x0200, nullptr )
ROM_REGION( 0x0120, "proms", 0 )
ROM_LOAD( "6400-01.m2", 0x0000, 0x0100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) ) /* SYNC */
@@ -705,7 +705,7 @@ ROM_START( dominos4 ) // built from original Atari source code
ROM_LOAD_NIB_LOW ( "007765-01.r4", 0x0000, 0x0200, CRC(6e4e6c75) SHA1(0fc77fecaa73eac57baf778bc51387c75883aad4) )
ROM_REGION( 0x200, "gfx2", 0 ) /* sprites, not used */
- ROM_FILL( 0x0000, 0x0200, 0 )
+ ROM_FILL( 0x0000, 0x0200, nullptr )
ROM_REGION( 0x0120, "proms", 0 )
ROM_LOAD( "6400-01.m2", 0x0000, 0x0100, CRC(b8094b4c) SHA1(82dc6799a19984f3b204ee3aeeb007e55afc8be3) ) /* SYNC */
diff --git a/src/mame/drivers/sprint4.cpp b/src/mame/drivers/sprint4.cpp
index 715a654ab21..69959caf8d0 100644
--- a/src/mame/drivers/sprint4.cpp
+++ b/src/mame/drivers/sprint4.cpp
@@ -276,7 +276,7 @@ static INPUT_PORTS_START( sprint4 )
PORT_START("COLLISION")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 1 Gas") PORT_PLAYER(1)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)0 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)nullptr )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 2 Gas") PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 3 Gas") PORT_PLAYER(3)
@@ -313,8 +313,8 @@ static INPUT_PORTS_START( sprint4 )
PORT_DIPSETTING( 0xe0, "150 seconds" )
PORT_START("ANALOG")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)0)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)nullptr)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)1)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)1)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)2)
diff --git a/src/mame/drivers/srmp5.cpp b/src/mame/drivers/srmp5.cpp
index d63eb4182ee..7f2969351e3 100644
--- a/src/mame/drivers/srmp5.cpp
+++ b/src/mame/drivers/srmp5.cpp
@@ -604,7 +604,7 @@ ROM_START( srmp5 )
ROM_LOAD( "sx008-07.bin", 0xc00000, 0x200000, CRC(3564485d) SHA1(12464de4e2b6c4df1595183996d1987f0ecffb01) )
#ifdef DEBUG_CHAR
ROM_REGION( 0x100000, "gfx1", 0)
- ROM_FILL( 0, 0x100000, 0x00)
+ ROM_FILL( 0, 0x100000, nullptr)
#endif
ROM_END
diff --git a/src/mame/drivers/ssfindo.cpp b/src/mame/drivers/ssfindo.cpp
index d9806b614fa..f7736cff78b 100644
--- a/src/mame/drivers/ssfindo.cpp
+++ b/src/mame/drivers/ssfindo.cpp
@@ -887,7 +887,7 @@ ROM_END
DRIVER_INIT_MEMBER(ssfindo_state,common)
{
- m_speedup = 0;
+ m_speedup = nullptr;
m_PS7500timer0 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ssfindo_state::PS7500_Timer0_callback),this));
m_PS7500timer1 = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(ssfindo_state::PS7500_Timer1_callback),this));
diff --git a/src/mame/drivers/ssingles.cpp b/src/mame/drivers/ssingles.cpp
index 4dd959a9145..fb3e6fa1749 100644
--- a/src/mame/drivers/ssingles.cpp
+++ b/src/mame/drivers/ssingles.cpp
@@ -647,7 +647,7 @@ ROM_START( atamanot )
ROM_REGION( 0x10000, "kanji_uc", 0 ) //upper case
ROM_COPY( "kanji", 0x10000, 0x08000, 0x08000 )
- ROM_COPY( "kanji", 0x00000, 0x00000, 0x08000 )
+ ROM_COPY( "kanji", nullptr, 0x00000, 0x08000 )
ROM_REGION( 0x10000, "kanji_lc", 0 ) //lower case
ROM_COPY( "kanji", 0x18000, 0x08000, 0x08000 )
diff --git a/src/mame/drivers/sslam.cpp b/src/mame/drivers/sslam.cpp
index 0d6f13e65fd..67bd6cc7596 100644
--- a/src/mame/drivers/sslam.cpp
+++ b/src/mame/drivers/sslam.cpp
@@ -813,8 +813,8 @@ ROM_START( sslam )
ROM_LOAD( "3.u13", 0x00000, 0x40000, CRC(d0a9245f) SHA1(2e840cdd7bdfe7c6f986daf88576de0559597499) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000)
- ROM_COPY( "oki", 0x00000, 0x80000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x80000, 0x20000)
ROM_END
ROM_START( sslama )
@@ -873,8 +873,8 @@ ROM_START( sslama )
ROM_LOAD( "3.u13", 0x00000, 0x40000, CRC(d0a9245f) SHA1(2e840cdd7bdfe7c6f986daf88576de0559597499) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000)
- ROM_COPY( "oki", 0x00000, 0x80000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x80000, 0x20000)
ROM_END
// it's a conversion for a sslam pcb
@@ -904,8 +904,8 @@ ROM_START( powerbals )
ROM_LOAD( "20.i013", 0x00000, 0x40000, CRC(12776dbc) SHA1(9ab9930fd581296642834d2cb4ba65264a588af3) )
ROM_CONTINUE( 0x60000, 0x20000 )
ROM_CONTINUE( 0xa0000, 0x20000 )
- ROM_COPY( "oki", 0x00000, 0x40000, 0x20000)
- ROM_COPY( "oki", 0x00000, 0x80000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x40000, 0x20000)
+ ROM_COPY( "oki", nullptr, 0x80000, 0x20000)
ROM_END
DRIVER_INIT_MEMBER(sslam_state,sslam)
diff --git a/src/mame/drivers/ssv.cpp b/src/mame/drivers/ssv.cpp
index 2ca54ab52d4..52081e94ecc 100644
--- a/src/mame/drivers/ssv.cpp
+++ b/src/mame/drivers/ssv.cpp
@@ -2444,8 +2444,8 @@ static const gfx_layout layout_16x8x6_ram =
};
static GFXDECODE_START( eaglshot )
- GFXDECODE_ENTRY( NULL, 0, layout_16x8x8_ram, 0, 0x8000/64 ) // [0] Sprites (256 colors, decoded from ram)
- GFXDECODE_ENTRY( NULL, 0, layout_16x8x6_ram, 0, 0x8000/64 ) // [1] Sprites (64 colors, decoded from ram)
+ GFXDECODE_ENTRY( nullptr, 0, layout_16x8x8_ram, 0, 0x8000/64 ) // [0] Sprites (256 colors, decoded from ram)
+ GFXDECODE_ENTRY( nullptr, 0, layout_16x8x6_ram, 0, 0x8000/64 ) // [1] Sprites (64 colors, decoded from ram)
GFXDECODE_END
static const gfx_layout layout_16x16x8 =
@@ -2964,7 +2964,7 @@ ROM_START( cairblad )
ROM_LOAD( "ac1805m0.u8", 0x1000000, 0x400000, CRC(19771f43) SHA1(d6a05392c58d3f60d666e08b3a82f06fa2c8e3a3) ) // AC1805M01.U8 32M Mask
ROM_LOAD( "ac1806m0.u11", 0x1400000, 0x400000, CRC(816b97dc) SHA1(3737cb37a4db720901661fa9b4e30c44181efb94) ) // AC1806M01.U11 32M Mask
- ROM_FILL( 0x1800000, 0x800000, 0)
+ ROM_FILL( 0x1800000, 0x800000, nullptr)
ROM_REGION16_BE( 0x400000, "ensoniq.0", 0 ) /* Samples */
ROM_LOAD16_WORD_SWAP( "ac1410m0.u41", 0x000000, 0x400000, CRC(ecf1f255) SHA1(984b1529b8f0c7d94ea713c85d71df00f54eba79) ) // AC1807M01.U41 32M Mask
@@ -3193,13 +3193,13 @@ ROM_START( eaglshot )
ROM_LOAD16_WORD_SWAP( "si003-08.u24", 0x200000, 0x200000, CRC(d0122ba2) SHA1(96230fb690cf144cd873f7d51c0304736a698316) )
ROM_REGION16_BE( 0x400000, "ensoniq.1", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.2", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.3", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_END
@@ -3231,7 +3231,7 @@ ROM_START( hypreact )
ROM_LOAD( "s14-1-11.u14", 0x0e00000, 0x200000, CRC(6d8e7bae) SHA1(93258663ceb6174917560bb66d72a42ba0f96c0e) )
ROM_LOAD( "s14-1-12.u11", 0x1000000, 0x200000, CRC(233a8e23) SHA1(0c813ec80ac63aa342c8ea57d9e38cada74456d9) )
- ROM_FILL( 0x1200000, 0x600000, 0 )
+ ROM_FILL( 0x1200000, 0x600000, nullptr )
// The chip seems to use REGION1 too, but produces no sound from there.
@@ -3271,7 +3271,7 @@ ROM_START( hypreac2 )
ROM_LOAD( "s16-1-12.u11", 0x1800000, 0x400000, CRC(87d9c748) SHA1(1332db901e50e2fd25d3323920f99e0ef0b0533d) )
ROM_LOAD( "s16-1-11.u14", 0x1c00000, 0x200000, CRC(70b3c0a0) SHA1(009e2f2f292ed6f10a9d54557861294156664e72) )
- ROM_FILL( 0x1e00000,0x0a00000, 0)
+ ROM_FILL( 0x1e00000,0x0a00000, nullptr)
ROM_REGION16_BE( 0x400000, "ensoniq.0", 0 ) /* Samples */
ROM_LOAD16_WORD_SWAP( "s16-1-06.u41", 0x000000, 0x400000, CRC(626e8a81) SHA1(45ef5b630aed575acd160ede1413e0370f4f9761) )
@@ -3433,13 +3433,13 @@ ROM_START( jsk )
ROM_LOAD16_BYTE( "jsk-s0.u65", 0x000000, 0x200000, CRC(8d1a9aeb) SHA1(37316bd3e8cbe2a84239e1a11a56d4fe4723ae1a) )
ROM_REGION16_BE( 0x400000, "ensoniq.1", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.2", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.3", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_END
@@ -3528,10 +3528,10 @@ ROM_START( koikois2 )
ROM_LOAD16_BYTE( "kk2_snd1.bin", 0x000000, 0x200000, CRC(e5a963e1) SHA1(464ffd53ac2e6db62225b18d12bfea93160771ec) )
ROM_REGION16_BE( 0x400000, "ensoniq.2", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.3", 0 ) /* Samples */
- ROM_COPY( "ensoniq.1", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.1", nullptr, 0x000000, 0x400000 )
ROM_END
@@ -3614,7 +3614,7 @@ ROM_START( mslider )
ROM_LOAD( "ms-c0.bin", 0x500000, 0x200000, CRC(f9d3e052) SHA1(4cdde756b24ee980f3c79a35a1fe071861fdeef9) )
ROM_LOAD( "ms-c1.bin", 0x700000, 0x080000, CRC(7f910c5a) SHA1(23ea13b6c07d3d31a25c21704d6a3e506578b199) )
- ROM_FILL( 0x780000, 0x280000, 0)
+ ROM_FILL( 0x780000, 0x280000, nullptr)
ROM_REGION16_BE( 0x400000, "ensoniq.0", 0 ) /* Samples */
ROM_LOAD16_WORD_SWAP( "ms-snd0.bin", 0x000000, 0x200000, CRC(cda6e3a5) SHA1(28ad8f34bc4f907654582f3522b377b97234eba8) )
@@ -3709,7 +3709,7 @@ ROM_START( srmp4 )
ROM_LOAD( "sx001-06.c1", 0x0e00000, 0x200000, CRC(6fe7229e) SHA1(e1432aa500460f79b5b78ee4b249d8fc9f566ce1) )
ROM_LOAD( "sx001-09.c2", 0x1000000, 0x200000, CRC(91dd8218) SHA1(a500dca9eefbf93187b1dfde7ddff1d22b886d44) )
- ROM_FILL( 0x1200000, 0x600000, 0)
+ ROM_FILL( 0x1200000, 0x600000, nullptr)
ROM_REGION16_BE( 0x400000, "ensoniq.0", 0 ) /* Samples */
ROM_LOAD16_WORD_SWAP( "sx001-10.sd0", 0x000000, 0x200000, CRC(45409ef1) SHA1(327d0a63deac6f0f8b9a408a321c03dd4e965569) )
@@ -3734,7 +3734,7 @@ ROM_START( srmp4o )
ROM_LOAD( "sx001-06.c1", 0x0e00000, 0x200000, CRC(6fe7229e) SHA1(e1432aa500460f79b5b78ee4b249d8fc9f566ce1) )
ROM_LOAD( "sx001-09.c2", 0x1000000, 0x200000, CRC(91dd8218) SHA1(a500dca9eefbf93187b1dfde7ddff1d22b886d44) )
- ROM_FILL( 0x1200000, 0x600000, 0)
+ ROM_FILL( 0x1200000, 0x600000, nullptr)
ROM_REGION16_BE( 0x400000, "ensoniq.0", 0 ) /* Samples */
ROM_LOAD16_WORD_SWAP( "sx001-10.sd0", 0x000000, 0x200000, CRC(45409ef1) SHA1(327d0a63deac6f0f8b9a408a321c03dd4e965569) )
@@ -3917,7 +3917,7 @@ ROM_START( survarts )
ROM_LOAD( "si001-06.u16", 0x0e00000, 0x200000, CRC(9a62f532) SHA1(7e7ba1224e52b33a9bd14058230efc871178c4f8) ) /* C1 */
ROM_LOAD( "si001-09.u15", 0x1000000, 0x200000, CRC(0955e393) SHA1(0be9134190706eaee49177034b0536b05c4bc7ac) ) /* C2 */
- ROM_FILL( 0x1200000, 0x600000, 0)
+ ROM_FILL( 0x1200000, 0x600000, nullptr)
// The chip seems to use REGION1 too, but produces no sound from there.
@@ -3949,7 +3949,7 @@ ROM_START( survartsu )
ROM_LOAD( "si001-06.u16", 0x0e00000, 0x200000, CRC(9a62f532) SHA1(7e7ba1224e52b33a9bd14058230efc871178c4f8) ) /* C1 */
ROM_LOAD( "si001-09.u15", 0x1000000, 0x200000, CRC(0955e393) SHA1(0be9134190706eaee49177034b0536b05c4bc7ac) ) /* C2 */
- ROM_FILL( 0x1200000, 0x600000, 0)
+ ROM_FILL( 0x1200000, 0x600000, nullptr)
// The chip seems to use REGION1 too, but produces no sound from there.
@@ -3978,7 +3978,7 @@ ROM_START( survartsj )
ROM_LOAD( "si001-06.u16", 0x0e00000, 0x200000, CRC(9a62f532) SHA1(7e7ba1224e52b33a9bd14058230efc871178c4f8) ) /* C1 */
ROM_LOAD( "si001-09.u15", 0x1000000, 0x200000, CRC(0955e393) SHA1(0be9134190706eaee49177034b0536b05c4bc7ac) ) /* C2 */
- ROM_FILL( 0x1200000, 0x600000, 0)
+ ROM_FILL( 0x1200000, 0x600000, nullptr)
// The chip seems to use REGION1 too, but produces no sound from there.
@@ -4048,7 +4048,7 @@ ROM_START( dynagear )
ROM_LOAD( "si002-03.u17", 0x0800000, 0x200000, CRC(4261a6b8) SHA1(df163faa84a86f126d5d405aef316ff9dd3c05eb) )
ROM_LOAD( "si002-06.u16", 0x0a00000, 0x200000, CRC(0e1f23f6) SHA1(ea35c75776b75131ef9133a16a36d95132dc6776) )
- ROM_FILL( 0xc00000, 0x400000, 0)
+ ROM_FILL( 0xc00000, 0x400000, nullptr)
// The chip seems to use REGION1 too, but produces no sound from there.
@@ -4094,7 +4094,7 @@ ROM_START( sxyreact )
ROM_LOAD( "ac1408m0.u11", 0x1800000, 0x400000, CRC(c45bab47) SHA1(d00802005e091088eabeb672a6428417db43cb66) )
ROM_LOAD( "ac1409m0.u14", 0x1c00000, 0x200000, CRC(be1c66c2) SHA1(6d7b60d3b4286a768eac122c3d163e6e5287adc3) )
- ROM_FILL( 0x1e00000, 0xa00000, 0)
+ ROM_FILL( 0x1e00000, 0xa00000, nullptr)
ROM_REGION16_BE( 0x400000, "ensoniq.0", 0 ) /* Samples */
ROM_LOAD16_WORD_SWAP( "ac1410m0.u41", 0x000000, 0x400000, CRC(2a880afc) SHA1(193235bccde28a7d693a1a1f0159260a3a63a7d5) )
@@ -4105,7 +4105,7 @@ ROM_START( sxyreact )
// a few sparse samples are played from here
ROM_REGION16_BE( 0x400000, "ensoniq.2", 0 ) /* Samples */
- ROM_COPY( "ensoniq.1", 0x000000, 0x200000, 0x200000 )
+ ROM_COPY( "ensoniq.1", nullptr, 0x200000, 0x200000 )
ROM_END
/***************************************************************************
@@ -4176,7 +4176,7 @@ ROM_START( sxyreac2 )
ROM_LOAD( "ac1705t00.u8", 0x1000000, 0x400000, CRC(2dff0652) SHA1(3c68ec3b233f248208ea80e4799a9504318b4e7c) )
ROM_LOAD( "ac1706t00.u11", 0x1400000, 0x400000, CRC(e7a168e0) SHA1(b4e19cc3a1fd0f18db7476ebe7cbb397c60e01b3) )
- ROM_FILL( 0x1800000, 0x800000, 0)
+ ROM_FILL( 0x1800000, 0x800000, nullptr)
ROM_REGION16_BE( 0x400000, "ensoniq.0", 0 ) /* Samples */
ROM_LOAD16_WORD_SWAP( "ac1707t00.u41", 0x000000, 0x400000, CRC(28999bc4) SHA1(4cddaa4a155cc03d456e6edb20dd207f7ff3d9c4) )
@@ -4186,7 +4186,7 @@ ROM_START( sxyreac2 )
ROM_CONTINUE( 0x000000, 0x200000 )
ROM_REGION16_BE( 0x400000, "ensoniq.2", 0 ) /* Samples */
- ROM_COPY( "ensoniq.1", 0x000000, 0x200000, 0x200000 )
+ ROM_COPY( "ensoniq.1", nullptr, 0x200000, 0x200000 )
ROM_END
@@ -4273,7 +4273,7 @@ ROM_START( stmblade )
ROM_LOAD( "sb-c0.u11", 0x0c00000, 0x200000, CRC(825dd8f1) SHA1(39d32f54c97e21f92598442f05fd91ae2403a0d2) )
ROM_LOAD( "sb-c1.u7", 0x0e00000, 0x200000, CRC(744afcd7) SHA1(db716a1a2ad5864ebdb4865430cb637fb94ed34f) )
ROM_LOAD( "sb-c2.u4", 0x1000000, 0x080000, CRC(fd1d2a92) SHA1(957a8a52b79e252c7f1a4b6383107ae609dce5ef) )
- ROM_FILL( 0x1200000, 0x600000, 0)
+ ROM_FILL( 0x1200000, 0x600000, nullptr)
ROM_REGION16_BE( 0x400000, "ensoniq.0", ROMREGION_ERASE | 0 ) /* Samples */
ROM_LOAD16_BYTE( "sb-snd0.u22", 0x000000, 0x200000, CRC(4efd605b) SHA1(9c97be105c923c7db847d9b9aea37025edb685a0) )
@@ -4302,7 +4302,7 @@ ROM_START( stmbladej )
ROM_LOAD( "sb-c0.u11", 0x0c00000, 0x200000, CRC(825dd8f1) SHA1(39d32f54c97e21f92598442f05fd91ae2403a0d2) )
ROM_LOAD( "sb-c1.u7", 0x0e00000, 0x200000, CRC(744afcd7) SHA1(db716a1a2ad5864ebdb4865430cb637fb94ed34f) )
ROM_LOAD( "sb-c2.u4", 0x1000000, 0x080000, CRC(fd1d2a92) SHA1(957a8a52b79e252c7f1a4b6383107ae609dce5ef) )
- ROM_FILL( 0x1200000, 0x600000, 0)
+ ROM_FILL( 0x1200000, 0x600000, nullptr)
ROM_REGION16_BE( 0x400000, "ensoniq.0", ROMREGION_ERASE | 0 ) /* Samples */
ROM_LOAD16_BYTE( "sb-snd0.u22", 0x000000, 0x200000, CRC(4efd605b) SHA1(9c97be105c923c7db847d9b9aea37025edb685a0) )
@@ -4368,7 +4368,7 @@ ROM_START( twineag2 )
ROM_LOAD( "sx002-08.u3", 0x0e00000, 0x200000, CRC(64edcefa) SHA1(55a71afe87da93e35c5ba291e970bdcd91b52a7a) ) /* C1 */
ROM_LOAD( "sx002-09.u2", 0x1000000, 0x200000, CRC(51527c56) SHA1(378155a585e5b847bd8ae1f17cb651138d844e33) ) /* C2, C3 is unpopulated */
- ROM_FILL( 0x1200000, 0x600000, 0 )
+ ROM_FILL( 0x1200000, 0x600000, nullptr )
ROM_REGION16_BE( 0x400000, "ensoniq.0", ROMREGION_ERASE | 0 ) /* Samples */
ROM_LOAD16_BYTE( "sx002-10.u14", 0x000000, 0x200000, CRC(b0669dfa) SHA1(ff805f59864ac4ccee3e249c06804d844d3df59c) )
@@ -4377,10 +4377,10 @@ ROM_START( twineag2 )
ROM_LOAD16_BYTE( "sx002-11.u7", 0x000000, 0x200000, CRC(b8dd621a) SHA1(f9b43e018f2bb121e4f4e9554419cd32b870556b) )
ROM_REGION16_BE( 0x400000, "ensoniq.2", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.3", 0 ) /* Samples */
- ROM_COPY( "ensoniq.1", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.1", nullptr, 0x000000, 0x400000 )
ROM_REGION( 0x11000, "st010", 0)
ROM_LOAD( "st010.bin", 0x000000, 0x011000, CRC(aa11ee2d) SHA1(cc1984e989cb94e3dcbb5f99e085b5414e18a017) )
@@ -4412,7 +4412,7 @@ ROM_START( ultrax )
ROM_LOAD( "71047-04.u77", 0x0500000, 0x100000, CRC(d9e710d1) SHA1(063459a247f9ff81cb558802e9943b3ea8a2ea3a) )
ROM_LOAD( "71047-05.u75", 0x0600000, 0x200000, CRC(10848193) SHA1(40b7ebb6011dc703bbf620cd22cd678c10ec67a4) )
ROM_LOAD( "71047-06.u88", 0x0800000, 0x100000, CRC(b8ac2942) SHA1(3e85e8f5669d469dd3114455248546d32a642315) )
- ROM_FILL( 0x0900000, 0x300000, 0 )
+ ROM_FILL( 0x0900000, 0x300000, nullptr )
ROM_REGION16_BE( 0x400000, "ensoniq.0", ROMREGION_ERASE | 0 ) /* Samples */
ROM_LOAD16_BYTE( "71047-07.u59", 0x000000, 0x200000, CRC(d9828b62) SHA1(f66a388d7a00b3a45d386671c061f5b840453451) )
@@ -4421,10 +4421,10 @@ ROM_START( ultrax )
ROM_LOAD16_BYTE( "71047-08.u60", 0x000000, 0x200000, CRC(30ebff6d) SHA1(53824c1fc37e22b545fd68b59722f7968f0ca1e2) )
ROM_REGION16_BE( 0x400000, "ensoniq.2", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.3", 0 ) /* Samples */
- ROM_COPY( "ensoniq.1", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.1", nullptr, 0x000000, 0x400000 )
ROM_END
@@ -4442,7 +4442,7 @@ ROM_START( ultraxg )
ROM_LOAD( "71047-04.u77", 0x0500000, 0x100000, CRC(d9e710d1) SHA1(063459a247f9ff81cb558802e9943b3ea8a2ea3a) )
ROM_LOAD( "71047-05.u75", 0x0600000, 0x200000, CRC(10848193) SHA1(40b7ebb6011dc703bbf620cd22cd678c10ec67a4) )
ROM_LOAD( "71047-06.u88", 0x0800000, 0x100000, CRC(b8ac2942) SHA1(3e85e8f5669d469dd3114455248546d32a642315) )
- ROM_FILL( 0x0900000, 0x300000, 0 )
+ ROM_FILL( 0x0900000, 0x300000, nullptr )
ROM_REGION16_BE( 0x400000, "ensoniq.0", ROMREGION_ERASE | 0 ) /* Samples */
ROM_LOAD16_BYTE( "71047-07.u59", 0x000000, 0x200000, CRC(d9828b62) SHA1(f66a388d7a00b3a45d386671c061f5b840453451) )
@@ -4451,10 +4451,10 @@ ROM_START( ultraxg )
ROM_LOAD16_BYTE( "71047-08.u60", 0x000000, 0x200000, CRC(30ebff6d) SHA1(53824c1fc37e22b545fd68b59722f7968f0ca1e2) )
ROM_REGION16_BE( 0x400000, "ensoniq.2", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.3", 0 ) /* Samples */
- ROM_COPY( "ensoniq.1", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.1", nullptr, 0x000000, 0x400000 )
ROM_END
/***************************************************************************
@@ -4693,13 +4693,13 @@ ROM_START( gdfs )
ROM_LOAD16_BYTE( "vg004-13.u5", 0x000001, 0x200000, CRC(a4ed3977) SHA1(5843d56f69789e70ce0201a693ffae322b628459) )
ROM_REGION16_BE( 0x400000, "ensoniq.1", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.2", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_REGION16_BE( 0x400000, "ensoniq.3", 0 ) /* Samples */
- ROM_COPY( "ensoniq.0", 0x000000, 0x000000, 0x400000 )
+ ROM_COPY( "ensoniq.0", nullptr, 0x000000, 0x400000 )
ROM_END
/***************************************************************************
diff --git a/src/mame/drivers/starcrus.cpp b/src/mame/drivers/starcrus.cpp
index 71998e30cd5..f855f6eb459 100644
--- a/src/mame/drivers/starcrus.cpp
+++ b/src/mame/drivers/starcrus.cpp
@@ -126,7 +126,7 @@ static const char *const starcrus_sample_names[] =
"explos1", /* explosion sound, first part, channel 1 */
"explos2", /* explosion sound, second part, channel 1 */
"launch", /* launch sound, channels 2 and 3 */
- 0
+ nullptr
};
diff --git a/src/mame/drivers/starfire.cpp b/src/mame/drivers/starfire.cpp
index a3a4b21ae3b..38bc76ccf61 100644
--- a/src/mame/drivers/starfire.cpp
+++ b/src/mame/drivers/starfire.cpp
@@ -314,7 +314,7 @@ static const char *const starfire_sample_names[] =
"lock",
"scanner",
"overheat",
- 0
+ nullptr
};
INTERRUPT_GEN_MEMBER(starfire_state::vblank_int)
diff --git a/src/mame/drivers/starshp1.cpp b/src/mame/drivers/starshp1.cpp
index 60cefc0d6b0..d52a674f60d 100644
--- a/src/mame/drivers/starshp1.cpp
+++ b/src/mame/drivers/starshp1.cpp
@@ -282,7 +282,7 @@ static const gfx_layout shiplayout =
{ STEP16(0x000, 0x080) },
0x800, /* step */
shiplayout_xoffset,
- NULL
+ nullptr
};
diff --git a/src/mame/drivers/stlforce.cpp b/src/mame/drivers/stlforce.cpp
index 102eb722f59..baea64ca1c1 100644
--- a/src/mame/drivers/stlforce.cpp
+++ b/src/mame/drivers/stlforce.cpp
@@ -312,13 +312,13 @@ ROM_START( twinbrat )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0e0000, 0x020000)
ROM_REGION16_BE( 0x80, "eeprom", 0 )
@@ -348,13 +348,13 @@ ROM_START( twinbrata )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- ROM_COPY( "user1", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x040000, 0x020000)
ROM_COPY( "user1", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x080000, 0x020000)
ROM_COPY( "user1", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user1", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user1", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user1", 0x060000, 0x0e0000, 0x020000)
ROM_REGION16_BE( 0x80, "eeprom", 0 )
diff --git a/src/mame/drivers/stratos.cpp b/src/mame/drivers/stratos.cpp
index 3ad13837193..733f62b979f 100644
--- a/src/mame/drivers/stratos.cpp
+++ b/src/mame/drivers/stratos.cpp
@@ -77,7 +77,7 @@ void stratos_state::machine_reset()
void stratos_state::show_leds()
{
static const char *led_pos[18] = {
- 0, 0, "gPawn", "gKnight", "gBishop", "gRook", "gQueen", "gKing", 0, 0, "rPawn", "rKnight", "rBishop", "rRook", "rQueen", "rKing", 0, 0
+ nullptr, nullptr, "gPawn", "gKnight", "gBishop", "gRook", "gQueen", "gKing", nullptr, nullptr, "rPawn", "rKnight", "rBishop", "rRook", "rQueen", "rKing", nullptr, nullptr
};
char str_red[64];
char str_green[64];
@@ -320,8 +320,8 @@ WRITE8_MEMBER(stratos_state::lcd_w)
idx++;
if(idx == 18*2) {
logerror("lcd");
- for(int i=0; i<18; i++)
- logerror(" %02x", vals[i]);
+ for(auto & val : vals)
+ logerror(" %02x", val);
logerror("\n");
}
}
diff --git a/src/mame/drivers/studio2.cpp b/src/mame/drivers/studio2.cpp
index 3712fa2e65a..28080198b47 100644
--- a/src/mame/drivers/studio2.cpp
+++ b/src/mame/drivers/studio2.cpp
@@ -534,7 +534,7 @@ DEVICE_IMAGE_LOAD_MEMBER( studio2_state, studio2_cart_load )
// always alloc 3K, even if range $400-$600 is not read by the system (RAM is present there)
m_cart->rom_alloc(0xc00, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
if (!strcmp(image.filetype(), "st2"))
{
diff --git a/src/mame/drivers/stv.cpp b/src/mame/drivers/stv.cpp
index 61c6c44d2a7..c858c580bea 100644
--- a/src/mame/drivers/stv.cpp
+++ b/src/mame/drivers/stv.cpp
@@ -1273,7 +1273,7 @@ int stv_state::load_cart(device_image_interface &image, generic_slot_device *slo
UINT8 *ROM;
UINT32 size = slot->common_get_size("rom");
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
return IMAGE_INIT_FAIL;
slot->rom_alloc(size, GENERIC_ROM32_WIDTH, ENDIANNESS_BIG);
@@ -2730,7 +2730,7 @@ ROM_START( sfish2 )
ROM_REGION( 0x080000, "maincpu", 0 ) /* SH2 code */
ROM_LOAD16_WORD_SWAP( "epr18343.bin", 0x000000, 0x080000, CRC(48e2eecf) SHA1(a38bfbd5f279525e413b18b5ed3f37f6e9e31cdc) ) /* sport fishing 2 bios */
ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */
- ROM_COPY( "maincpu",0,0,0x080000)
+ ROM_COPY( "maincpu",nullptr,0,0x080000)
ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
ROM_LOAD16_BYTE( "epr-18427.ic13", 0x0000001, 0x0100000, CRC(3f25bec8) SHA1(43a5342b882d5aec0f35a8777cb475659f43b1c4) )
@@ -2752,7 +2752,7 @@ ROM_START( sfish2j )
ROM_REGION( 0x080000, "maincpu", 0 ) /* SH2 code */
ROM_LOAD16_WORD_SWAP( "epr18343.bin", 0x000000, 0x080000, CRC(48e2eecf) SHA1(a38bfbd5f279525e413b18b5ed3f37f6e9e31cdc) ) /* sport fishing 2 bios */
ROM_REGION( 0x080000, "slave", 0 ) /* SH2 code */
- ROM_COPY( "maincpu",0,0,0x080000)
+ ROM_COPY( "maincpu",nullptr,0,0x080000)
ROM_REGION32_BE( 0x3000000, "cart", ROMREGION_ERASE00 ) /* SH2 code */
ROM_LOAD16_BYTE( "epr18344.a", 0x0000001, 0x0100000, CRC(5a7de018) SHA1(88e0c2a9a9d4ebf699878c0aa9737af85f95ccf8) )
diff --git a/src/mame/drivers/subsino.cpp b/src/mame/drivers/subsino.cpp
index 3008bb0e288..6b83bcb135a 100644
--- a/src/mame/drivers/subsino.cpp
+++ b/src/mame/drivers/subsino.cpp
@@ -3759,11 +3759,11 @@ ROM_START( mtrainnv )
ROM_REGION( 0x10000, "tilemap", 0 )
ROM_LOAD( "mtrain_tilemap.bin", 0x00000, 0x10000, NO_DUMP )
- ROM_COPY( "maincpu", 0x0000, 0x00000, 0x10000 ) // just to show something
+ ROM_COPY( "maincpu", nullptr, 0x00000, 0x10000 ) // just to show something
ROM_REGION( 0x10000, "reels", 0 )
ROM_LOAD( "mtrain_reels.bin", 0x00000, 0x10000, NO_DUMP )
- ROM_COPY( "maincpu", 0x0000, 0x00000, 0x10000 ) // just to show something
+ ROM_COPY( "maincpu", nullptr, 0x00000, 0x10000 ) // just to show something
ROM_END
diff --git a/src/mame/drivers/subsino2.cpp b/src/mame/drivers/subsino2.cpp
index a521bc00b92..fda484cd19e 100644
--- a/src/mame/drivers/subsino2.cpp
+++ b/src/mame/drivers/subsino2.cpp
@@ -712,9 +712,9 @@ UINT32 subsino2_state::screen_update_subsino2(screen_device &screen, bitmap_ind1
l->tmap->set_scroll_rows(1);
l->tmap->set_scroll_cols(1);
- for (int r = 0; r < 3; r++)
+ for (auto visible : m_ss9601_reelrects)
{
- rectangle visible = m_ss9601_reelrects[r];
+
for (int x = 0; x < 0x40; x++)
{
diff --git a/src/mame/drivers/suna8.cpp b/src/mame/drivers/suna8.cpp
index 0a34955cf34..a6cd117d3d2 100644
--- a/src/mame/drivers/suna8.cpp
+++ b/src/mame/drivers/suna8.cpp
@@ -2835,7 +2835,7 @@ ROM_START( starfigh )
// bitplanes 0-1
ROM_LOAD( "starfgtr.e4", 0x00000, 0x10000, CRC(54c0ca3d) SHA1(87f785502beb8a52d47bd48275d695ee303054f8) ) // banks 00-03
ROM_LOAD( "starfgtr.d4", 0x10000, 0x10000, CRC(4313ba40) SHA1(3c41f99dc40136517f172b3525987d8909f877c3) ) // banks 04-07
- ROM_COPY( "gfx1", 0x00000, 0x20000, 0x20000 ) // banks 08-0f == 00-07
+ ROM_COPY( "gfx1", nullptr, 0x20000, 0x20000 ) // banks 08-0f == 00-07
ROM_LOAD( "starfgtr.b4", 0x40000, 0x10000, CRC(ad8d0f21) SHA1(ffdb407c7fe76b5f290de6bbed2fec34e40daf3f) ) // banks 10-13
ROM_LOAD( "starfgtr.a4", 0x50000, 0x10000, CRC(6d8f74c8) SHA1(c40b77e27bd29d6c3a9b4d43189933c10543786b) ) // banks 14-17
ROM_COPY( "gfx1", 0x40000, 0x60000, 0x20000 ) // banks 18-1f == 10-17
@@ -2898,13 +2898,13 @@ ROM_START( sparkman )
ROM_REGION( 0x100000, "gfx2", ROMREGION_INVERT | ROMREGION_ERASEFF) /* Sprites (1) */
// bitplanes 0-1
ROM_LOAD( "p7.u4", 0x00000, 0x10000, CRC(17c16ce4) SHA1(b4127e9aedab69193bef1d85e68003e225913417) ) // banks 00-03 (alt gfx)
- ROM_COPY( "gfx2", 0x00000, 0x10000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x20000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x30000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x40000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x50000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x60000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x70000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x10000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x20000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x30000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x40000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x50000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x60000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x70000, 0x10000 )
// bitplanes 2-3
ROM_LOAD( "p8.u6", 0x80000, 0x10000, CRC(414222ea) SHA1(e05f0504c6e735c73027312a85cc55fc98728e53) )
ROM_COPY( "gfx2", 0x80000, 0x90000, 0x10000 )
@@ -2954,13 +2954,13 @@ ROM_START( sparkmana )
ROM_REGION( 0x100000, "gfx2", ROMREGION_INVERT | ROMREGION_ERASEFF) /* Sprites (1) */
// bitplanes 0-1
ROM_LOAD( "p7.u4", 0x00000, 0x10000, CRC(17c16ce4) SHA1(b4127e9aedab69193bef1d85e68003e225913417) ) // banks 00-03 (alt gfx)
- ROM_COPY( "gfx2", 0x00000, 0x10000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x20000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x30000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x40000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x50000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x60000, 0x10000 )
- ROM_COPY( "gfx2", 0x00000, 0x70000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x10000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x20000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x30000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x40000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x50000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x60000, 0x10000 )
+ ROM_COPY( "gfx2", nullptr, 0x70000, 0x10000 )
// bitplanes 2-3
ROM_LOAD( "p8.u6", 0x80000, 0x10000, CRC(414222ea) SHA1(e05f0504c6e735c73027312a85cc55fc98728e53) )
ROM_COPY( "gfx2", 0x80000, 0x90000, 0x10000 )
diff --git a/src/mame/drivers/super6.cpp b/src/mame/drivers/super6.cpp
index 65b7d47ce93..599aadbcdf5 100644
--- a/src/mame/drivers/super6.cpp
+++ b/src/mame/drivers/super6.cpp
@@ -222,7 +222,7 @@ WRITE8_MEMBER( super6_state::fdc_w )
*/
// disk drive select
- floppy_image_device *m_floppy = NULL;
+ floppy_image_device *m_floppy = nullptr;
if ((data & 3) == 0)
m_floppy = m_floppy0->get_device();
@@ -431,7 +431,7 @@ static const z80_daisy_config super6_daisy_chain[] =
{ Z80CTC_TAG },
{ Z80DART_TAG },
{ Z80PIO_TAG },
- { NULL }
+ { nullptr }
};
@@ -514,7 +514,7 @@ static MACHINE_CONFIG_START( super6, super6_state )
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(super6_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(WD2793_TAG":0", super6_floppies, "525dd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD2793_TAG":1", super6_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD2793_TAG":1", super6_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_Z80DART_ADD(Z80DART_TAG, XTAL_24MHz/4, 0, 0, 0, 0 )
MCFG_Z80DART_OUT_TXDA_CB(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_txd))
@@ -529,7 +529,7 @@ static MACHINE_CONFIG_START( super6, super6_state )
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal)
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
MCFG_DEVICE_ADD(BR1945_TAG, COM8116, XTAL_5_0688MHz)
diff --git a/src/mame/drivers/super80.cpp b/src/mame/drivers/super80.cpp
index 2c6b069e4bf..ec9cd2286b4 100644
--- a/src/mame/drivers/super80.cpp
+++ b/src/mame/drivers/super80.cpp
@@ -643,7 +643,7 @@ GFXDECODE_END
static const z80_daisy_config super80_daisy_chain[] =
{
{ "z80pio" },
- { NULL }
+ { nullptr }
};
//-------------------------------------------------
diff --git a/src/mame/drivers/supercon.cpp b/src/mame/drivers/supercon.cpp
index 7c286f6b4c2..57164aae3b5 100644
--- a/src/mame/drivers/supercon.cpp
+++ b/src/mame/drivers/supercon.cpp
@@ -612,7 +612,7 @@ void supercon_state::machine_start()
{
m_timer_update_irq = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(supercon_state::update_irq),this));
m_timer_update_irq->adjust( attotime::zero, 0, attotime::from_hz(1000) );
- m_timer_mouse_click = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(supercon_state::mouse_click),this),NULL);
+ m_timer_mouse_click = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(supercon_state::mouse_click),this),nullptr);
save_item(NAME(m_save_board));
machine().save().register_postload(save_prepost_delegate(FUNC(supercon_state::board_postload),this));
machine().save().register_presave(save_prepost_delegate(FUNC(supercon_state::board_presave),this));
diff --git a/src/mame/drivers/superslave.cpp b/src/mame/drivers/superslave.cpp
index 440edac81de..11e4de4b815 100644
--- a/src/mame/drivers/superslave.cpp
+++ b/src/mame/drivers/superslave.cpp
@@ -287,7 +287,7 @@ static const z80_daisy_config superslave_daisy_chain[] =
{ Z80DART_0_TAG },
{ Z80DART_1_TAG },
{ Z80PIO_TAG },
- { NULL }
+ { nullptr }
};
@@ -352,7 +352,7 @@ static MACHINE_CONFIG_START( superslave, superslave_state )
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_0_TAG, z80dart_device, ctsa_w))
MCFG_DEVICE_CARD_DEVICE_INPUT_DEFAULTS("terminal", terminal)
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_0_TAG, z80dart_device, rxb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_0_TAG, z80dart_device, dcdb_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_0_TAG, z80dart_device, ctsb_w))
@@ -366,12 +366,12 @@ static MACHINE_CONFIG_START( superslave, superslave_state )
MCFG_Z80DART_OUT_RTSB_CB(DEVWRITELINE(RS232_D_TAG, rs232_port_device, write_rts))
MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_RS232_PORT_ADD(RS232_C_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_C_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, dcda_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, ctsa_w))
- MCFG_RS232_PORT_ADD(RS232_D_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_D_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, rxb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, dcdb_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(Z80DART_1_TAG, z80dart_device, ctsb_w))
diff --git a/src/mame/drivers/system1.cpp b/src/mame/drivers/system1.cpp
index cc2e1d5fcdd..20a7f74594c 100644
--- a/src/mame/drivers/system1.cpp
+++ b/src/mame/drivers/system1.cpp
@@ -436,11 +436,11 @@ void system1_state::bank0c_custom_w(UINT8 data, UINT8 prevdata)
WRITE8_MEMBER(system1_state::videomode_w)
{
/* bit 6 is connected to the 8751 IRQ */
- if (m_mcu != NULL)
+ if (m_mcu != nullptr)
m_mcu->set_input_line(MCS51_INT1_LINE, (data & 0x40) ? CLEAR_LINE : ASSERT_LINE);
/* handle any custom banking or other stuff */
- if (m_videomode_custom != NULL)
+ if (m_videomode_custom != nullptr)
(this->*m_videomode_custom)(data, m_videomode_prev);
m_videomode_prev = data;
@@ -526,7 +526,7 @@ READ8_MEMBER(system1_state::sound_data_r)
z80pio_device *pio = machine().device<z80pio_device>("pio");
/* if we have an 8255 PPI, get the data from the port and toggle the ack */
- if (m_ppi8255 != NULL)
+ if (m_ppi8255 != nullptr)
{
m_ppi8255->pc6_w(0);
m_ppi8255->pc6_w(1);
@@ -534,7 +534,7 @@ READ8_MEMBER(system1_state::sound_data_r)
}
/* if we have a Z80 PIO, get the data from the port and toggle the strobe */
- else if (pio != NULL)
+ else if (pio != nullptr)
{
UINT8 data = pio->port_read(z80pio_device::PORT_A);
pio->strobe(z80pio_device::PORT_A, false);
@@ -4789,20 +4789,20 @@ ROM_END
DRIVER_INIT_MEMBER(system1_state,bank00)
{
- m_videomode_custom = NULL;
- m_banked_decrypted_opcodes = NULL;
+ m_videomode_custom = nullptr;
+ m_banked_decrypted_opcodes = nullptr;
}
DRIVER_INIT_MEMBER(system1_state,bank44)
{
m_videomode_custom = &system1_state::bank44_custom_w;
- m_banked_decrypted_opcodes = NULL;
+ m_banked_decrypted_opcodes = nullptr;
}
DRIVER_INIT_MEMBER(system1_state,bank0c)
{
m_videomode_custom = &system1_state::bank0c_custom_w;
- m_banked_decrypted_opcodes = NULL;
+ m_banked_decrypted_opcodes = nullptr;
}
DRIVER_INIT_MEMBER(system1_state,regulus)
diff --git a/src/mame/drivers/system16.cpp b/src/mame/drivers/system16.cpp
index 9d5bb80a0fa..c71cbeab08c 100644
--- a/src/mame/drivers/system16.cpp
+++ b/src/mame/drivers/system16.cpp
@@ -404,7 +404,7 @@ WRITE8_MEMBER(segas1x_bootleg_state::tturfbl_soundbank_w)
m_soundbank_ptr = mem;
break;
default:
- m_soundbank_ptr = NULL;
+ m_soundbank_ptr = nullptr;
logerror("Invalid bank setting %02X (%04X)\n", data, space.device().safe_pc());
break;
}
@@ -1024,7 +1024,7 @@ WRITE16_MEMBER(segas1x_bootleg_state::sys18_tilebank_w)
READ8_MEMBER(segas1x_bootleg_state::system18_bank_r)
{
- if (m_sound_bank != NULL)
+ if (m_sound_bank != nullptr)
return m_sound_bank[offset];
return 0xff;
@@ -1051,7 +1051,7 @@ WRITE8_MEMBER(segas1x_bootleg_state::sys18_soundbank_w)
if (mask)
m_sound_bank = &mem[0x10000 + offs + ((bank & mask) << 13)];
else
- m_sound_bank = NULL;
+ m_sound_bank = nullptr;
}
static ADDRESS_MAP_START( sound_18_io_map, AS_IO, 8, segas1x_bootleg_state )
@@ -1223,7 +1223,7 @@ WRITE8_MEMBER(segas1x_bootleg_state::shdancbl_bankctrl_w)
m_soundbank_ptr = &mem[0x24000]; /* IC46 4000-7FFF */
break;
default:
- m_soundbank_ptr = NULL;
+ m_soundbank_ptr = nullptr;
logerror("Invalid bank setting %02X (%04X)\n", data, space.device().safe_pc());
break;
}
@@ -3486,10 +3486,10 @@ ROM_END
DRIVER_INIT_MEMBER(segas1x_bootleg_state,common)
{
m_bg1_trans = 0;
- m_splittab_bg_x = 0;
- m_splittab_bg_y = 0;
- m_splittab_fg_x = 0;
- m_splittab_fg_y = 0;
+ m_splittab_bg_x = nullptr;
+ m_splittab_bg_y = nullptr;
+ m_splittab_fg_x = nullptr;
+ m_splittab_fg_y = nullptr;
m_spritebank_type = 0;
m_back_yscroll = 0;
@@ -3499,7 +3499,7 @@ DRIVER_INIT_MEMBER(segas1x_bootleg_state,common)
m_sample_buffer = 0;
m_sample_select = 0;
- m_soundbank_ptr = NULL;
+ m_soundbank_ptr = nullptr;
m_beautyb_unkx = 0;
diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp
index 570034e603c..ffc5c4f25e1 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, (void *)0)
- PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,eeprom_read, (void *)0)
+ PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,eeprom_read, (void *)nullptr)
+ PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,eeprom_read, (void *)nullptr)
/* MSW: Coin counters/lockouts are readable, LSW: Joysticks (Player 1 & 2) */
PORT_START("IN.1")
@@ -247,7 +247,7 @@ static INPUT_PORTS_START( f3 )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0000ff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* These must be high */
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_coin_r, (void *)0)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_coin_r, (void *)nullptr)
/* Player 3 & 4 fire buttons (Player 2 top fire buttons in Kaiser Knuckle) */
PORT_START("IN.4")
@@ -277,7 +277,7 @@ static INPUT_PORTS_START( f3 )
/* Analog control 1 */
PORT_START("IN.2")
- PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_analog_r, (void*)0)
+ PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_analog_r, (void*)nullptr)
PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* Analog control 2 */
@@ -386,10 +386,10 @@ static const gfx_layout tile_layout =
};
static GFXDECODE_START( taito_f3 )
- GFXDECODE_ENTRY( NULL, 0x000000, charlayout, 0x0000, 0x0400>>4 ) /* Dynamically modified */
+ GFXDECODE_ENTRY( nullptr, 0x000000, charlayout, 0x0000, 0x0400>>4 ) /* Dynamically modified */
GFXDECODE_ENTRY( "gfx2", 0x000000, tile_layout, 0x0000, 0x2000>>4 ) /* Tiles area */
GFXDECODE_ENTRY( "gfx1", 0x000000, spriteram_layout, 0x1000, 0x1000>>4 ) /* Sprites area */
- GFXDECODE_ENTRY( NULL, 0x000000, pivotlayout, 0x0000, 0x400>>4 ) /* Dynamically modified */
+ GFXDECODE_ENTRY( nullptr, 0x000000, pivotlayout, 0x0000, 0x400>>4 ) /* Dynamically modified */
GFXDECODE_END
/******************************************************************************/
@@ -523,10 +523,10 @@ static const gfx_layout bubsympb_tile_layout =
static GFXDECODE_START( bubsympb )
- GFXDECODE_ENTRY( NULL, 0x000000, charlayout, 0, 64 ) /* Dynamically modified */
+ GFXDECODE_ENTRY( nullptr, 0x000000, charlayout, 0, 64 ) /* Dynamically modified */
GFXDECODE_ENTRY( "gfx2", 0x000000, bubsympb_tile_layout, 0, 512 ) /* Tiles area */
GFXDECODE_ENTRY( "gfx1", 0x000000, bubsympb_sprite_layout, 4096, 256 ) /* Sprites area */
- GFXDECODE_ENTRY( NULL, 0x000000, pivotlayout, 0, 64 ) /* Dynamically modified */
+ GFXDECODE_ENTRY( nullptr, 0x000000, pivotlayout, 0, 64 ) /* Dynamically modified */
GFXDECODE_END
static MACHINE_CONFIG_START( bubsympb, taito_f3_state )
@@ -573,13 +573,13 @@ ROM_START( ringrage )
ROM_LOAD16_BYTE("d21-02.66", 0x000000, 0x200000, CRC(facd3a02) SHA1(360c6e65d01dd2c33495ba928ef9986f754b3694) )
ROM_LOAD16_BYTE("d21-03.67", 0x000001, 0x200000, CRC(6f653e68) SHA1(840905f012c37d58160cc554c036ad25218ce3e6) )
ROM_LOAD ("d21-04.68", 0x600000, 0x200000, CRC(9dcdceca) SHA1(e12bab5307ebe4c3b5f9284c91f3bf7ba4c8e9bc) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0 ) /* Tiles */
ROM_LOAD16_BYTE("d21-06.49", 0x000000, 0x080000, CRC(92d4a720) SHA1(81dc58c58d5f4f20ceeb5d6b90491f1efcbc67d3) )
ROM_LOAD16_BYTE("d21-07.50", 0x000001, 0x080000, CRC(6da696e9) SHA1(74332090b0de4193a669cd5242fd655e7b90f772) )
ROM_LOAD ("d21-08.51", 0x180000, 0x080000, CRC(a0d95be9) SHA1(1746097e827ac10906f012c5c4f93c388a30f4b3) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d21-18.5", 0x100000, 0x20000, CRC(133b55d0) SHA1(feb5c9d0b1adcae3b16eb206c8ac4e73fd88bef4) )
@@ -602,13 +602,13 @@ ROM_START( ringrageu )
ROM_LOAD16_BYTE("d21-02.66", 0x000000, 0x200000, CRC(facd3a02) SHA1(360c6e65d01dd2c33495ba928ef9986f754b3694) )
ROM_LOAD16_BYTE("d21-03.67", 0x000001, 0x200000, CRC(6f653e68) SHA1(840905f012c37d58160cc554c036ad25218ce3e6) )
ROM_LOAD ("d21-04.68", 0x600000, 0x200000, CRC(9dcdceca) SHA1(e12bab5307ebe4c3b5f9284c91f3bf7ba4c8e9bc) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0 ) /* Tiles */
ROM_LOAD16_BYTE("d21-06.49", 0x000000, 0x080000, CRC(92d4a720) SHA1(81dc58c58d5f4f20ceeb5d6b90491f1efcbc67d3) )
ROM_LOAD16_BYTE("d21-07.50", 0x000001, 0x080000, CRC(6da696e9) SHA1(74332090b0de4193a669cd5242fd655e7b90f772) )
ROM_LOAD ("d21-08.51", 0x180000, 0x080000, CRC(a0d95be9) SHA1(1746097e827ac10906f012c5c4f93c388a30f4b3) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d21-18.5", 0x100000, 0x20000, CRC(133b55d0) SHA1(feb5c9d0b1adcae3b16eb206c8ac4e73fd88bef4) )
@@ -631,13 +631,13 @@ ROM_START( ringragej )
ROM_LOAD16_BYTE("d21-02.66", 0x000000, 0x200000, CRC(facd3a02) SHA1(360c6e65d01dd2c33495ba928ef9986f754b3694) )
ROM_LOAD16_BYTE("d21-03.67", 0x000001, 0x200000, CRC(6f653e68) SHA1(840905f012c37d58160cc554c036ad25218ce3e6) )
ROM_LOAD ("d21-04.68", 0x600000, 0x200000, CRC(9dcdceca) SHA1(e12bab5307ebe4c3b5f9284c91f3bf7ba4c8e9bc) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0 ) /* Tiles */
ROM_LOAD16_BYTE("d21-06.49", 0x000000, 0x080000, CRC(92d4a720) SHA1(81dc58c58d5f4f20ceeb5d6b90491f1efcbc67d3) )
ROM_LOAD16_BYTE("d21-07.50", 0x000001, 0x080000, CRC(6da696e9) SHA1(74332090b0de4193a669cd5242fd655e7b90f772) )
ROM_LOAD ("d21-08.51", 0x180000, 0x080000, CRC(a0d95be9) SHA1(1746097e827ac10906f012c5c4f93c388a30f4b3) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d21-18.5", 0x100000, 0x20000, CRC(133b55d0) SHA1(feb5c9d0b1adcae3b16eb206c8ac4e73fd88bef4) )
@@ -660,13 +660,13 @@ ROM_START( arabianm )
ROM_LOAD16_BYTE("d29-03.ic66", 0x000000, 0x100000, CRC(aeaff456) SHA1(e70d0089e69d33d213be8195c31891f38fbcb53a) )
ROM_LOAD16_BYTE("d29-04.ic67", 0x000001, 0x100000, CRC(01711cfe) SHA1(26da4cc9dcb8d38bdf8c93015f77e58ffc9d1ba9) )
ROM_LOAD ("d29-05.ic68", 0x300000, 0x100000, CRC(9b5f7a17) SHA1(89d9faedc7b55df6237f2c2ebb43de7de685cb66) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d29-06.ic49", 0x000000, 0x080000, CRC(eea07bf3) SHA1(7860a2c0c592af000b56e59bd39d67b086fe3606) )
ROM_LOAD16_BYTE("d29-07.ic50", 0x000001, 0x080000, CRC(db3c094d) SHA1(5b60f0fa1054bf93ce51d310376b1abdb3022541) )
ROM_LOAD ("d29-08.ic51", 0x180000, 0x080000, CRC(d7562851) SHA1(91d86e75ba7a590ca298b932b4cf8fa9228f115e) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d29-18.ic5", 0x100000, 0x20000, CRC(d97780df) SHA1(d0f9d2fd7ce13f620bb44083bf012f67dda4b10b) )
@@ -700,13 +700,13 @@ ROM_START( arabianmj )
ROM_LOAD16_BYTE("d29-03.ic66", 0x000000, 0x100000, CRC(aeaff456) SHA1(e70d0089e69d33d213be8195c31891f38fbcb53a) )
ROM_LOAD16_BYTE("d29-04.ic67", 0x000001, 0x100000, CRC(01711cfe) SHA1(26da4cc9dcb8d38bdf8c93015f77e58ffc9d1ba9) )
ROM_LOAD ("d29-05.ic68", 0x300000, 0x100000, CRC(9b5f7a17) SHA1(89d9faedc7b55df6237f2c2ebb43de7de685cb66) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d29-06.ic49", 0x000000, 0x080000, CRC(eea07bf3) SHA1(7860a2c0c592af000b56e59bd39d67b086fe3606) )
ROM_LOAD16_BYTE("d29-07.ic50", 0x000001, 0x080000, CRC(db3c094d) SHA1(5b60f0fa1054bf93ce51d310376b1abdb3022541) )
ROM_LOAD ("d29-08.ic51", 0x180000, 0x080000, CRC(d7562851) SHA1(91d86e75ba7a590ca298b932b4cf8fa9228f115e) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d29-18.ic5", 0x100000, 0x20000, CRC(d97780df) SHA1(d0f9d2fd7ce13f620bb44083bf012f67dda4b10b) )
@@ -740,13 +740,13 @@ ROM_START( arabianmu )
ROM_LOAD16_BYTE("d29-03.ic66", 0x000000, 0x100000, CRC(aeaff456) SHA1(e70d0089e69d33d213be8195c31891f38fbcb53a) )
ROM_LOAD16_BYTE("d29-04.ic67", 0x000001, 0x100000, CRC(01711cfe) SHA1(26da4cc9dcb8d38bdf8c93015f77e58ffc9d1ba9) )
ROM_LOAD ("d29-05.ic68", 0x300000, 0x100000, CRC(9b5f7a17) SHA1(89d9faedc7b55df6237f2c2ebb43de7de685cb66) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d29-06.ic49", 0x000000, 0x080000, CRC(eea07bf3) SHA1(7860a2c0c592af000b56e59bd39d67b086fe3606) )
ROM_LOAD16_BYTE("d29-07.ic50", 0x000001, 0x080000, CRC(db3c094d) SHA1(5b60f0fa1054bf93ce51d310376b1abdb3022541) )
ROM_LOAD ("d29-08.ic51", 0x180000, 0x080000, CRC(d7562851) SHA1(91d86e75ba7a590ca298b932b4cf8fa9228f115e) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d29-18.ic5", 0x100000, 0x20000, CRC(d97780df) SHA1(d0f9d2fd7ce13f620bb44083bf012f67dda4b10b) )
@@ -779,12 +779,12 @@ ROM_START( ridingf )
ROM_REGION(0x800000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("d34-01.66", 0x000000, 0x200000, CRC(7974e6aa) SHA1(f3f697d0e2f52011046aa2db2df25a4b55a631d5) )
ROM_LOAD16_BYTE("d34-02.67", 0x000001, 0x200000, CRC(f4422370) SHA1(27ba051e0dc27b39652ff1d940a2dd29965c6528) )
- ROM_FILL ( 0x400000, 0x400000, 0 )
+ ROM_FILL ( 0x400000, 0x400000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d34-05.49", 0x000000, 0x080000, CRC(72e3ee4b) SHA1(2b69487338c18ced7a2ac4f280e8e22aa7209eb3) )
ROM_LOAD16_BYTE("d34-06.50", 0x000001, 0x080000, CRC(edc9b9f3) SHA1(c57bec1c8882d95388c3fae7cb5a321bdb202737) )
- ROM_FILL ( 0x100000, 0x100000, 0 )
+ ROM_FILL ( 0x100000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d34-07.5", 0x100000, 0x20000, CRC(67239e2b) SHA1(8e0268fab53d26cde5c1928326c4787533dc6ffe) )
@@ -806,12 +806,12 @@ ROM_START( ridingfj )
ROM_REGION(0x800000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("d34-01.66", 0x000000, 0x200000, CRC(7974e6aa) SHA1(f3f697d0e2f52011046aa2db2df25a4b55a631d5) )
ROM_LOAD16_BYTE("d34-02.67", 0x000001, 0x200000, CRC(f4422370) SHA1(27ba051e0dc27b39652ff1d940a2dd29965c6528) )
- ROM_FILL ( 0x400000, 0x400000, 0 )
+ ROM_FILL ( 0x400000, 0x400000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d34-05.49", 0x000000, 0x080000, CRC(72e3ee4b) SHA1(2b69487338c18ced7a2ac4f280e8e22aa7209eb3) )
ROM_LOAD16_BYTE("d34-06.50", 0x000001, 0x080000, CRC(edc9b9f3) SHA1(c57bec1c8882d95388c3fae7cb5a321bdb202737) )
- ROM_FILL ( 0x100000, 0x100000, 0 )
+ ROM_FILL ( 0x100000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d34-07.5", 0x100000, 0x20000, CRC(67239e2b) SHA1(8e0268fab53d26cde5c1928326c4787533dc6ffe) )
@@ -833,12 +833,12 @@ ROM_START( ridingfu )
ROM_REGION(0x800000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("d34-01.66", 0x000000, 0x200000, CRC(7974e6aa) SHA1(f3f697d0e2f52011046aa2db2df25a4b55a631d5) )
ROM_LOAD16_BYTE("d34-02.67", 0x000001, 0x200000, CRC(f4422370) SHA1(27ba051e0dc27b39652ff1d940a2dd29965c6528) )
- ROM_FILL ( 0x400000, 0x400000, 0 )
+ ROM_FILL ( 0x400000, 0x400000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d34-05.49", 0x000000, 0x080000, CRC(72e3ee4b) SHA1(2b69487338c18ced7a2ac4f280e8e22aa7209eb3) )
ROM_LOAD16_BYTE("d34-06.50", 0x000001, 0x080000, CRC(edc9b9f3) SHA1(c57bec1c8882d95388c3fae7cb5a321bdb202737) )
- ROM_FILL ( 0x100000, 0x100000, 0 )
+ ROM_FILL ( 0x100000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d34-07.5", 0x100000, 0x20000, CRC(67239e2b) SHA1(8e0268fab53d26cde5c1928326c4787533dc6ffe) )
@@ -864,12 +864,12 @@ ROM_START( gseeker )
ROM_LOAD16_BYTE("d40_15.rom", 0x000000, 0x080000, CRC(50555125) SHA1(587cdfb2e027c1d96ecc46d2612956deca5fd36f) )
ROM_LOAD16_BYTE("d40_16.rom", 0x000001, 0x080000, CRC(3f9bbe1e) SHA1(6d9b2d2d893257ad096c276eff4077f60a81921f) )
/* Taito manufactured mask roms 3 + 4 wrong, and later added 15 + 16 as a patch */
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d40_05.rom", 0x000000, 0x100000, CRC(be6eec8f) SHA1(725e5e09f6ee60bd4c38fa223c4dea202c56f75f) )
ROM_LOAD16_BYTE("d40_06.rom", 0x000001, 0x100000, CRC(a822abe4) SHA1(1a0dd9dcb8e24daab6eb1661307ef0e10f7e4d4e) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d40_07.rom", 0x100000, 0x20000, CRC(7e9b26c2) SHA1(d88ad39a9d70b4a5bd3f83e0d4d0725f659f1d2a) )
@@ -895,12 +895,12 @@ ROM_START( gseekerj )
ROM_LOAD16_BYTE("d40_15.rom", 0x000000, 0x080000, CRC(50555125) SHA1(587cdfb2e027c1d96ecc46d2612956deca5fd36f) )
ROM_LOAD16_BYTE("d40_16.rom", 0x000001, 0x080000, CRC(3f9bbe1e) SHA1(6d9b2d2d893257ad096c276eff4077f60a81921f) )
/* Taito manufactured mask roms 3 + 4 wrong, and later added 15 + 16 as a patch */
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d40_05.rom", 0x000000, 0x100000, CRC(be6eec8f) SHA1(725e5e09f6ee60bd4c38fa223c4dea202c56f75f) )
ROM_LOAD16_BYTE("d40_06.rom", 0x000001, 0x100000, CRC(a822abe4) SHA1(1a0dd9dcb8e24daab6eb1661307ef0e10f7e4d4e) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d40_07.rom", 0x100000, 0x20000, CRC(7e9b26c2) SHA1(d88ad39a9d70b4a5bd3f83e0d4d0725f659f1d2a) )
@@ -926,12 +926,12 @@ ROM_START( gseekeru )
ROM_LOAD16_BYTE("d40_15.rom", 0x000000, 0x080000, CRC(50555125) SHA1(587cdfb2e027c1d96ecc46d2612956deca5fd36f) )
ROM_LOAD16_BYTE("d40_16.rom", 0x000001, 0x080000, CRC(3f9bbe1e) SHA1(6d9b2d2d893257ad096c276eff4077f60a81921f) )
/* Taito manufactured mask roms 3 + 4 wrong, and later added 15 + 16 as a patch */
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d40_05.rom", 0x000000, 0x100000, CRC(be6eec8f) SHA1(725e5e09f6ee60bd4c38fa223c4dea202c56f75f) )
ROM_LOAD16_BYTE("d40_06.rom", 0x000001, 0x100000, CRC(a822abe4) SHA1(1a0dd9dcb8e24daab6eb1661307ef0e10f7e4d4e) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d40_07.rom", 0x100000, 0x20000, CRC(7e9b26c2) SHA1(d88ad39a9d70b4a5bd3f83e0d4d0725f659f1d2a) )
@@ -957,13 +957,13 @@ ROM_START( commandw )
ROM_LOAD16_BYTE("cw_objm1.bin", 0x400001, 0x200000, CRC(504b1bf5) SHA1(7b8ff7834907a9cdab5416bf713487bf71b9070e) )
ROM_LOAD ("cw_objh0.bin", 0xc00000, 0x200000, CRC(83d7e0ae) SHA1(774a07d0cadc2c8f5ec155270bf927e4462654e2) )
ROM_LOAD ("cw_objh1.bin", 0xe00000, 0x200000, CRC(324f5832) SHA1(ff91243c5d09c4c46904640fe278a7485db70577) )
- ROM_FILL ( 0x800000, 0x400000, 0 )
+ ROM_FILL ( 0x800000, 0x400000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("cw_scr_l.bin", 0x000000, 0x100000, CRC(4d202323) SHA1(0150bcba6d2bf2c3cde88bb519f57f3b58314244) )
ROM_LOAD16_BYTE("cw_scr_m.bin", 0x000001, 0x100000, CRC(537b1c7d) SHA1(bc61aa61891366cbea4b8ecb820d93e28d01f8d2) )
ROM_LOAD ("cw_scr_h.bin", 0x300000, 0x100000, CRC(001f85dd) SHA1(2532377c0b54bc964ea4e74911ff62fea2d53975) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("cw_spr1.bin", 0x100000, 0x20000, CRC(c8f81c25) SHA1(1c914053826587cc2d5d2c0220a3e29a641fe6f9) )
@@ -988,13 +988,13 @@ ROM_START( cupfinal )
ROM_LOAD16_BYTE("d49-07.7", 0x400001, 0x100000, CRC(e5655b8f) SHA1(2c21745370bfe9dbf0e95f7ce42ed34a162bff64) )
ROM_LOAD ("d49-03.4", 0x900000, 0x200000, CRC(cf9a8727) SHA1(f21787fdcdd8be2009c2d481a9b2d7fc03ce782e) )
ROM_LOAD ("d49-08.3", 0xb00000, 0x100000, CRC(7d3c6536) SHA1(289b4bf79ebd9cbdf64ab956784d226e6d546654) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d49-09.47", 0x000000, 0x080000, CRC(257ede01) SHA1(c36397d95706c5e68a7738c84829a51c5e8f5ef7) )
ROM_LOAD16_BYTE("d49-10.45", 0x000001, 0x080000, CRC(f587b787) SHA1(22db4904c134756ddd0f753f197419d27e60a827) )
ROM_LOAD ("d49-11.43", 0x180000, 0x080000, CRC(11318b26) SHA1(a7153f9f406d52189f59cbe58d65f88f4e2e6fcc) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d49-17.32", 0x100000, 0x20000, CRC(f2058eba) SHA1(7faaa94fadf02b6304287b61fb9613f9f4169fef) )
@@ -1020,13 +1020,13 @@ ROM_START( hthero93 )
ROM_LOAD16_BYTE("d49-07.7", 0x400001, 0x100000, CRC(e5655b8f) SHA1(2c21745370bfe9dbf0e95f7ce42ed34a162bff64) )
ROM_LOAD ("d49-03.4", 0x900000, 0x200000, CRC(cf9a8727) SHA1(f21787fdcdd8be2009c2d481a9b2d7fc03ce782e) )
ROM_LOAD ("d49-08.3", 0xb00000, 0x100000, CRC(7d3c6536) SHA1(289b4bf79ebd9cbdf64ab956784d226e6d546654) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d49-09.47", 0x000000, 0x080000, CRC(257ede01) SHA1(c36397d95706c5e68a7738c84829a51c5e8f5ef7) )
ROM_LOAD16_BYTE("d49-10.45", 0x000001, 0x080000, CRC(f587b787) SHA1(22db4904c134756ddd0f753f197419d27e60a827) )
ROM_LOAD ("d49-11.43", 0x180000, 0x080000, CRC(11318b26) SHA1(a7153f9f406d52189f59cbe58d65f88f4e2e6fcc) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d49-17.32", 0x100000, 0x20000, CRC(f2058eba) SHA1(7faaa94fadf02b6304287b61fb9613f9f4169fef) )
@@ -1052,13 +1052,13 @@ ROM_START( trstar )
ROM_LOAD16_BYTE("d53-07.65", 0x400001, 0x100000, CRC(2f4773c3) SHA1(17cef13de0836923743b336cc5a64f7452629486) )
ROM_LOAD ("d53-05.47", 0x900000, 0x200000, CRC(b9b68b15) SHA1(c3783b09b22954a959188b80e537fa84d827ac47) )
ROM_LOAD ("d53-08.66", 0xb00000, 0x100000, CRC(ad13a1ee) SHA1(341112055b6bee33072c262f4ea7c4d0970888a6) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d53-09.48", 0x000000, 0x100000, CRC(690554d3) SHA1(113afd8fe7b77a30c2e3c5baca3f19d74902625b) )
ROM_LOAD16_BYTE("d53-10.49", 0x000001, 0x100000, CRC(0ec05dc5) SHA1(781a6362ef963417fb6383a62dcc70d6f5b3131b) )
ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) )
@@ -1083,13 +1083,13 @@ ROM_START( trstarj )
ROM_LOAD16_BYTE("d53-07.65", 0x400001, 0x100000, CRC(2f4773c3) SHA1(17cef13de0836923743b336cc5a64f7452629486) )
ROM_LOAD ("d53-05.47", 0x900000, 0x200000, CRC(b9b68b15) SHA1(c3783b09b22954a959188b80e537fa84d827ac47) )
ROM_LOAD ("d53-08.66", 0xb00000, 0x100000, CRC(ad13a1ee) SHA1(341112055b6bee33072c262f4ea7c4d0970888a6) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d53-09.48", 0x000000, 0x100000, CRC(690554d3) SHA1(113afd8fe7b77a30c2e3c5baca3f19d74902625b) )
ROM_LOAD16_BYTE("d53-10.49", 0x000001, 0x100000, CRC(0ec05dc5) SHA1(781a6362ef963417fb6383a62dcc70d6f5b3131b) )
ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) )
@@ -1114,13 +1114,13 @@ ROM_START( prmtmfgt )
ROM_LOAD16_BYTE("d53-07.65", 0x400001, 0x100000, CRC(2f4773c3) SHA1(17cef13de0836923743b336cc5a64f7452629486) )
ROM_LOAD ("d53-05.47", 0x900000, 0x200000, CRC(b9b68b15) SHA1(c3783b09b22954a959188b80e537fa84d827ac47) )
ROM_LOAD ("d53-08.66", 0xb00000, 0x100000, CRC(ad13a1ee) SHA1(341112055b6bee33072c262f4ea7c4d0970888a6) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d53-09.48", 0x000000, 0x100000, CRC(690554d3) SHA1(113afd8fe7b77a30c2e3c5baca3f19d74902625b) )
ROM_LOAD16_BYTE("d53-10.49", 0x000001, 0x100000, CRC(0ec05dc5) SHA1(781a6362ef963417fb6383a62dcc70d6f5b3131b) )
ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) )
@@ -1145,13 +1145,13 @@ ROM_START( trstaro )
ROM_LOAD16_BYTE("d53-07.65", 0x400001, 0x100000, CRC(2f4773c3) SHA1(17cef13de0836923743b336cc5a64f7452629486) )
ROM_LOAD ("d53-05.47", 0x900000, 0x200000, CRC(b9b68b15) SHA1(c3783b09b22954a959188b80e537fa84d827ac47) )
ROM_LOAD ("d53-08.66", 0xb00000, 0x100000, CRC(ad13a1ee) SHA1(341112055b6bee33072c262f4ea7c4d0970888a6) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d53-09.48", 0x000000, 0x100000, CRC(690554d3) SHA1(113afd8fe7b77a30c2e3c5baca3f19d74902625b) )
ROM_LOAD16_BYTE("d53-10.49", 0x000001, 0x100000, CRC(0ec05dc5) SHA1(781a6362ef963417fb6383a62dcc70d6f5b3131b) )
ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) )
@@ -1176,13 +1176,13 @@ ROM_START( trstaroj )
ROM_LOAD16_BYTE("d53-07.65", 0x400001, 0x100000, CRC(2f4773c3) SHA1(17cef13de0836923743b336cc5a64f7452629486) )
ROM_LOAD ("d53-05.47", 0x900000, 0x200000, CRC(b9b68b15) SHA1(c3783b09b22954a959188b80e537fa84d827ac47) )
ROM_LOAD ("d53-08.66", 0xb00000, 0x100000, CRC(ad13a1ee) SHA1(341112055b6bee33072c262f4ea7c4d0970888a6) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d53-09.48", 0x000000, 0x100000, CRC(690554d3) SHA1(113afd8fe7b77a30c2e3c5baca3f19d74902625b) )
ROM_LOAD16_BYTE("d53-10.49", 0x000001, 0x100000, CRC(0ec05dc5) SHA1(781a6362ef963417fb6383a62dcc70d6f5b3131b) )
ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) )
@@ -1207,13 +1207,13 @@ ROM_START( prmtmfgto )
ROM_LOAD16_BYTE("d53-07.65", 0x400001, 0x100000, CRC(2f4773c3) SHA1(17cef13de0836923743b336cc5a64f7452629486) )
ROM_LOAD ("d53-05.47", 0x900000, 0x200000, CRC(b9b68b15) SHA1(c3783b09b22954a959188b80e537fa84d827ac47) )
ROM_LOAD ("d53-08.66", 0xb00000, 0x100000, CRC(ad13a1ee) SHA1(341112055b6bee33072c262f4ea7c4d0970888a6) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d53-09.48", 0x000000, 0x100000, CRC(690554d3) SHA1(113afd8fe7b77a30c2e3c5baca3f19d74902625b) )
ROM_LOAD16_BYTE("d53-10.49", 0x000001, 0x100000, CRC(0ec05dc5) SHA1(781a6362ef963417fb6383a62dcc70d6f5b3131b) )
ROM_LOAD ("d53-11.50", 0x300000, 0x100000, CRC(39c0a546) SHA1(53f03586f6586032fc3b4f90e987c1128edbb0a7) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d53-13.10", 0x100000, 0x20000, CRC(877f0361) SHA1(eda58d71fb06f739bee1451d7aa7e7e6dee10e03) )
@@ -1235,13 +1235,13 @@ ROM_START( gunlock )
ROM_LOAD16_BYTE("d66-03.ic45", 0x000000, 0x100000, CRC(e7a4a491) SHA1(87837e8dd1c9a1db5e540b678233634bd52328f0) )
ROM_LOAD16_BYTE("d66-04.ic46", 0x000001, 0x100000, CRC(c1c7aaa7) SHA1(f929516cf50d82b2d1d1b4c49a0eb1dea819aae1) )
ROM_LOAD ("d66-05.ic47", 0x300000, 0x100000, CRC(a3cefe04) SHA1(dd4f47a814853f4512ce25c5f25121c53ee4ada1) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d66-06.ic48", 0x000000, 0x100000, CRC(b3d8126d) SHA1(3cbb44f396973c36abdf3fdf391becb22bb6d661) )
ROM_LOAD16_BYTE("d66-07.ic49", 0x000001, 0x100000, CRC(a6da9be7) SHA1(b528505ab925db75acf31bfbed2035cbe36e7a74) )
ROM_LOAD ("d66-08.ic49", 0x300000, 0x100000, CRC(9959f30b) SHA1(64bf2bf995c283c00d968e3c078b824de4084d3d) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */
ROM_LOAD16_BYTE("d66-23.ic10", 0x100000, 0x40000, CRC(57fb7c49) SHA1(f8709fd1e9ea7cee10ee2288d13339f675a7d3ae) )
@@ -1263,13 +1263,13 @@ ROM_START( rayforce )
ROM_LOAD16_BYTE("d66-03.ic45", 0x000000, 0x100000, CRC(e7a4a491) SHA1(87837e8dd1c9a1db5e540b678233634bd52328f0) )
ROM_LOAD16_BYTE("d66-04.ic46", 0x000001, 0x100000, CRC(c1c7aaa7) SHA1(f929516cf50d82b2d1d1b4c49a0eb1dea819aae1) )
ROM_LOAD ("d66-05.ic47", 0x300000, 0x100000, CRC(a3cefe04) SHA1(dd4f47a814853f4512ce25c5f25121c53ee4ada1) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d66-06.ic48", 0x000000, 0x100000, CRC(b3d8126d) SHA1(3cbb44f396973c36abdf3fdf391becb22bb6d661) )
ROM_LOAD16_BYTE("d66-07.ic49", 0x000001, 0x100000, CRC(a6da9be7) SHA1(b528505ab925db75acf31bfbed2035cbe36e7a74) )
ROM_LOAD ("d66-08.ic49", 0x300000, 0x100000, CRC(9959f30b) SHA1(64bf2bf995c283c00d968e3c078b824de4084d3d) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */
ROM_LOAD16_BYTE("d66-23.ic10", 0x100000, 0x40000, CRC(57fb7c49) SHA1(f8709fd1e9ea7cee10ee2288d13339f675a7d3ae) )
@@ -1291,13 +1291,13 @@ ROM_START( rayforcej )
ROM_LOAD16_BYTE("d66-03.ic45", 0x000000, 0x100000, CRC(e7a4a491) SHA1(87837e8dd1c9a1db5e540b678233634bd52328f0) )
ROM_LOAD16_BYTE("d66-04.ic46", 0x000001, 0x100000, CRC(c1c7aaa7) SHA1(f929516cf50d82b2d1d1b4c49a0eb1dea819aae1) )
ROM_LOAD ("d66-05.ic47", 0x300000, 0x100000, CRC(a3cefe04) SHA1(dd4f47a814853f4512ce25c5f25121c53ee4ada1) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d66-06.ic48", 0x000000, 0x100000, CRC(b3d8126d) SHA1(3cbb44f396973c36abdf3fdf391becb22bb6d661) )
ROM_LOAD16_BYTE("d66-07.ic49", 0x000001, 0x100000, CRC(a6da9be7) SHA1(b528505ab925db75acf31bfbed2035cbe36e7a74) )
ROM_LOAD ("d66-08.ic49", 0x300000, 0x100000, CRC(9959f30b) SHA1(64bf2bf995c283c00d968e3c078b824de4084d3d) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */
ROM_LOAD16_BYTE("d66-23.ic10", 0x100000, 0x40000, CRC(57fb7c49) SHA1(f8709fd1e9ea7cee10ee2288d13339f675a7d3ae) )
@@ -1322,13 +1322,13 @@ ROM_START( scfinals ) /* This is the single PCB version */
ROM_LOAD16_BYTE("d49-07.7", 0x400001, 0x100000, CRC(e5655b8f) SHA1(2c21745370bfe9dbf0e95f7ce42ed34a162bff64) )
ROM_LOAD ("d49-03.4", 0x900000, 0x200000, CRC(cf9a8727) SHA1(f21787fdcdd8be2009c2d481a9b2d7fc03ce782e) )
ROM_LOAD ("d49-08.3", 0xb00000, 0x100000, CRC(7d3c6536) SHA1(289b4bf79ebd9cbdf64ab956784d226e6d546654) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d49-09.47", 0x000000, 0x080000, CRC(257ede01) SHA1(c36397d95706c5e68a7738c84829a51c5e8f5ef7) ) /* Single PCB version locations may differ */
ROM_LOAD16_BYTE("d49-10.45", 0x000001, 0x080000, CRC(f587b787) SHA1(22db4904c134756ddd0f753f197419d27e60a827) )
ROM_LOAD ("d49-11.43", 0x180000, 0x080000, CRC(11318b26) SHA1(a7153f9f406d52189f59cbe58d65f88f4e2e6fcc) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d49-17.ic5", 0x100000, 0x20000, CRC(f2058eba) SHA1(7faaa94fadf02b6304287b61fb9613f9f4169fef) )
@@ -1357,13 +1357,13 @@ ROM_START( scfinalso ) /* Cart version */
ROM_LOAD16_BYTE("d49-07.7", 0x400001, 0x100000, CRC(e5655b8f) SHA1(2c21745370bfe9dbf0e95f7ce42ed34a162bff64) )
ROM_LOAD ("d49-03.4", 0x900000, 0x200000, CRC(cf9a8727) SHA1(f21787fdcdd8be2009c2d481a9b2d7fc03ce782e) )
ROM_LOAD ("d49-08.3", 0xb00000, 0x100000, CRC(7d3c6536) SHA1(289b4bf79ebd9cbdf64ab956784d226e6d546654) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d49-09.47", 0x000000, 0x080000, CRC(257ede01) SHA1(c36397d95706c5e68a7738c84829a51c5e8f5ef7) )
ROM_LOAD16_BYTE("d49-10.45", 0x000001, 0x080000, CRC(f587b787) SHA1(22db4904c134756ddd0f753f197419d27e60a827) )
ROM_LOAD ("d49-11.43", 0x180000, 0x080000, CRC(11318b26) SHA1(a7153f9f406d52189f59cbe58d65f88f4e2e6fcc) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d49-17.32", 0x100000, 0x20000, CRC(f2058eba) SHA1(7faaa94fadf02b6304287b61fb9613f9f4169fef) )
@@ -1392,13 +1392,13 @@ ROM_START( lightbr )
ROM_LOAD16_BYTE("d69-10.bin", 0x400001, 0x100000, CRC(36aa80c6) SHA1(aeb5f7632810564426761b5798539bf4c4a0c64c) )
ROM_LOAD ("d69-08.bin", 0x900000, 0x200000, CRC(5b68d7d8) SHA1(f2ee3dd7100a3c9d8f402fe36dae2bc66cb17be3) )
ROM_LOAD ("d69-11.bin", 0xb00000, 0x100000, CRC(c11adf92) SHA1(ee9ce49a43b419c4f44ac1aea8d0a12d7b289244) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d69-03.bin", 0x000000, 0x200000, CRC(6999c86f) SHA1(8a91930edfc0b5d23e59f8c3b43131db6edb4d37) )
ROM_LOAD16_BYTE("d69-04.bin", 0x000001, 0x200000, CRC(cc91dcb7) SHA1(97f510b1e1a3adf49efe82babdd7abce3756ce4b) )
ROM_LOAD ("d69-05.bin", 0x600000, 0x200000, CRC(f9f5433c) SHA1(d3de66385d883c72967c44bc29983d7a79f665d1) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d69-18.bin", 0x100000, 0x20000, CRC(04600d7b) SHA1(666cfab09b61fd6e0bc4ff277018ebf1cda01b0e) )
@@ -1423,13 +1423,13 @@ ROM_START( dungeonm )
ROM_LOAD16_BYTE("d69-10.bin", 0x400001, 0x100000, CRC(36aa80c6) SHA1(aeb5f7632810564426761b5798539bf4c4a0c64c) )
ROM_LOAD ("d69-08.bin", 0x900000, 0x200000, CRC(5b68d7d8) SHA1(f2ee3dd7100a3c9d8f402fe36dae2bc66cb17be3) )
ROM_LOAD ("d69-11.bin", 0xb00000, 0x100000, CRC(c11adf92) SHA1(ee9ce49a43b419c4f44ac1aea8d0a12d7b289244) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d69-03.bin", 0x000000, 0x200000, CRC(6999c86f) SHA1(8a91930edfc0b5d23e59f8c3b43131db6edb4d37) )
ROM_LOAD16_BYTE("d69-04.bin", 0x000001, 0x200000, CRC(cc91dcb7) SHA1(97f510b1e1a3adf49efe82babdd7abce3756ce4b) )
ROM_LOAD ("d69-05.bin", 0x600000, 0x200000, CRC(f9f5433c) SHA1(d3de66385d883c72967c44bc29983d7a79f665d1) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d69-18.bin", 0x100000, 0x20000, CRC(04600d7b) SHA1(666cfab09b61fd6e0bc4ff277018ebf1cda01b0e) )
@@ -1454,13 +1454,13 @@ ROM_START( dungeonmu )
ROM_LOAD16_BYTE("d69-10.bin", 0x400001, 0x100000, CRC(36aa80c6) SHA1(aeb5f7632810564426761b5798539bf4c4a0c64c) )
ROM_LOAD ("d69-08.bin", 0x900000, 0x200000, CRC(5b68d7d8) SHA1(f2ee3dd7100a3c9d8f402fe36dae2bc66cb17be3) )
ROM_LOAD ("d69-11.bin", 0xb00000, 0x100000, CRC(c11adf92) SHA1(ee9ce49a43b419c4f44ac1aea8d0a12d7b289244) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d69-03.bin", 0x000000, 0x200000, CRC(6999c86f) SHA1(8a91930edfc0b5d23e59f8c3b43131db6edb4d37) )
ROM_LOAD16_BYTE("d69-04.bin", 0x000001, 0x200000, CRC(cc91dcb7) SHA1(97f510b1e1a3adf49efe82babdd7abce3756ce4b) )
ROM_LOAD ("d69-05.bin", 0x600000, 0x200000, CRC(f9f5433c) SHA1(d3de66385d883c72967c44bc29983d7a79f665d1) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d69-18.bin", 0x100000, 0x20000, CRC(04600d7b) SHA1(666cfab09b61fd6e0bc4ff277018ebf1cda01b0e) )
@@ -1545,13 +1545,13 @@ ROM_START( lightbrj )
ROM_LOAD16_BYTE("d69-10.bin", 0x400001, 0x100000, CRC(36aa80c6) SHA1(aeb5f7632810564426761b5798539bf4c4a0c64c) )
ROM_LOAD ("d69-08.bin", 0x900000, 0x200000, CRC(5b68d7d8) SHA1(f2ee3dd7100a3c9d8f402fe36dae2bc66cb17be3) )
ROM_LOAD ("d69-11.bin", 0xb00000, 0x100000, CRC(c11adf92) SHA1(ee9ce49a43b419c4f44ac1aea8d0a12d7b289244) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d69-03.bin", 0x000000, 0x200000, CRC(6999c86f) SHA1(8a91930edfc0b5d23e59f8c3b43131db6edb4d37) )
ROM_LOAD16_BYTE("d69-04.bin", 0x000001, 0x200000, CRC(cc91dcb7) SHA1(97f510b1e1a3adf49efe82babdd7abce3756ce4b) )
ROM_LOAD ("d69-05.bin", 0x600000, 0x200000, CRC(f9f5433c) SHA1(d3de66385d883c72967c44bc29983d7a79f665d1) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d69-18.bin", 0x100000, 0x20000, CRC(04600d7b) SHA1(666cfab09b61fd6e0bc4ff277018ebf1cda01b0e) )
@@ -1576,13 +1576,13 @@ ROM_START( intcup94 )
ROM_LOAD16_BYTE("d49-07.7", 0x400001, 0x100000, CRC(e5655b8f) SHA1(2c21745370bfe9dbf0e95f7ce42ed34a162bff64) )
ROM_LOAD ("d49-03.4", 0x900000, 0x200000, CRC(cf9a8727) SHA1(f21787fdcdd8be2009c2d481a9b2d7fc03ce782e) )
ROM_LOAD ("d49-08.3", 0xb00000, 0x100000, CRC(7d3c6536) SHA1(289b4bf79ebd9cbdf64ab956784d226e6d546654) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d78-01.47", 0x000000, 0x080000, CRC(543f8967) SHA1(2efa935e7d0fd317bbbad2758a618d408a56317c) )
ROM_LOAD16_BYTE("d78-02.45", 0x000001, 0x080000, CRC(e8289394) SHA1(b9957675f868f772943678b6a19fcc21dfd97a8d) )
ROM_LOAD ("d78-03.43", 0x180000, 0x080000, CRC(a8bc36e5) SHA1(5777b9457292e8a9cbb4e8226ba939530ffab07c) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d78-08.32", 0x100000, 0x20000, CRC(a629d07c) SHA1(b2904e106633a3960ceb2bc58b600ea60034ff0b) )
@@ -1608,13 +1608,13 @@ ROM_START( hthero94 )
ROM_LOAD16_BYTE("d49-07.7", 0x400001, 0x100000, CRC(e5655b8f) SHA1(2c21745370bfe9dbf0e95f7ce42ed34a162bff64) )
ROM_LOAD ("d49-03.4", 0x900000, 0x200000, CRC(cf9a8727) SHA1(f21787fdcdd8be2009c2d481a9b2d7fc03ce782e) )
ROM_LOAD ("d49-08.3", 0xb00000, 0x100000, CRC(7d3c6536) SHA1(289b4bf79ebd9cbdf64ab956784d226e6d546654) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d78-01.47", 0x000000, 0x080000, CRC(543f8967) SHA1(2efa935e7d0fd317bbbad2758a618d408a56317c) )
ROM_LOAD16_BYTE("d78-02.45", 0x000001, 0x080000, CRC(e8289394) SHA1(b9957675f868f772943678b6a19fcc21dfd97a8d) )
ROM_LOAD ("d78-03.43", 0x180000, 0x080000, CRC(a8bc36e5) SHA1(5777b9457292e8a9cbb4e8226ba939530ffab07c) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d78-08.32", 0x100000, 0x20000, CRC(a629d07c) SHA1(b2904e106633a3960ceb2bc58b600ea60034ff0b) )
@@ -1636,12 +1636,12 @@ ROM_START( recalh )
ROM_REGION(0x400000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("rh_objl.bin", 0x000000, 0x100000, CRC(c1772b55) SHA1(f9a04b968c63e61fa8ca60d6f331f6df0d7dd10a) )
ROM_LOAD16_BYTE("rh_objm.bin", 0x000001, 0x100000, CRC(ef87c0fd) SHA1(63e99f331d05a1ff4faf0ea94019393fe2117f54) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("rh_scrl.bin", 0x000000, 0x100000, CRC(1e3f6b79) SHA1(fef029def6393a13f4a638686a7ec7c13851a5c0) )
ROM_LOAD16_BYTE("rh_scrm.bin", 0x000001, 0x100000, CRC(37200968) SHA1(4a8d5a17af7eb732f481bf174099845e8d8d6b87) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("rh_spr1.bin", 0x100000, 0x20000, CRC(504cbc1d) SHA1(35a775c1ebc8107c553e43b9d84eb735446c26fd) )
@@ -1673,7 +1673,7 @@ ROM_START( kaiserkn )
ROM_LOAD ("d84-08.rom", 0x1580000, 0x200000, CRC(07347bf1) SHA1(34bd359933acdec7fd1ce047092a30d1177afc2c) )
ROM_LOAD ("d84-11.rom", 0x1780000, 0x200000, CRC(a062c1d4) SHA1(158912aa3dd75c3961bf738f9ac9034f0b005b60) )
ROM_LOAD ("d84-21.rom", 0x1980000, 0x080000, CRC(89f68b66) SHA1(95916f02f71357324effe59da4f847f2f30ea34a) )
- ROM_FILL ( 0x0d00000, 0x680000, 0 )
+ ROM_FILL ( 0x0d00000, 0x680000, nullptr )
ROM_REGION(0xc00000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d84-12.rom", 0x000000, 0x200000, CRC(66a7a9aa) SHA1(a7d21f8b6370d16de3c1569019f2ad71d36e7a61) )
@@ -1682,7 +1682,7 @@ ROM_START( kaiserkn )
ROM_LOAD16_BYTE("d84-17.rom", 0x400001, 0x100000, CRC(0be37cc3) SHA1(b10c10b93858cad0c962ef614cfd6daea712ef6b) )
ROM_LOAD ("d84-14.rom", 0x900000, 0x200000, CRC(2b2e693e) SHA1(03eb37fa7dc68d54bf0f1800b8c0b581c344a40f) )
ROM_LOAD ("d84-18.rom", 0xb00000, 0x100000, CRC(e812bcc5) SHA1(3574e4a99232d9fc7989ec5d1e8fe76b4b30784a) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d84-26.32", 0x100000, 0x40000, CRC(4f5b8563) SHA1(1d4e06cbea7bc73a99d6e30be714fff420151bbc) )
@@ -1716,7 +1716,7 @@ ROM_START( kaiserknj )
ROM_LOAD ("d84-08.rom", 0x1580000, 0x200000, CRC(07347bf1) SHA1(34bd359933acdec7fd1ce047092a30d1177afc2c) )
ROM_LOAD ("d84-11.rom", 0x1780000, 0x200000, CRC(a062c1d4) SHA1(158912aa3dd75c3961bf738f9ac9034f0b005b60) )
ROM_LOAD ("d84-21.rom", 0x1980000, 0x080000, CRC(89f68b66) SHA1(95916f02f71357324effe59da4f847f2f30ea34a) )
- ROM_FILL ( 0x0d00000, 0x680000, 0 )
+ ROM_FILL ( 0x0d00000, 0x680000, nullptr )
ROM_REGION(0xc00000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d84-12.rom", 0x000000, 0x200000, CRC(66a7a9aa) SHA1(a7d21f8b6370d16de3c1569019f2ad71d36e7a61) )
@@ -1725,7 +1725,7 @@ ROM_START( kaiserknj )
ROM_LOAD16_BYTE("d84-17.rom", 0x400001, 0x100000, CRC(0be37cc3) SHA1(b10c10b93858cad0c962ef614cfd6daea712ef6b) )
ROM_LOAD ("d84-14.rom", 0x900000, 0x200000, CRC(2b2e693e) SHA1(03eb37fa7dc68d54bf0f1800b8c0b581c344a40f) )
ROM_LOAD ("d84-18.rom", 0xb00000, 0x100000, CRC(e812bcc5) SHA1(3574e4a99232d9fc7989ec5d1e8fe76b4b30784a) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d84-26.32", 0x100000, 0x40000, CRC(4f5b8563) SHA1(1d4e06cbea7bc73a99d6e30be714fff420151bbc) )
@@ -1759,7 +1759,7 @@ ROM_START( gblchmp )
ROM_LOAD ("d84-08.rom", 0x1580000, 0x200000, CRC(07347bf1) SHA1(34bd359933acdec7fd1ce047092a30d1177afc2c) )
ROM_LOAD ("d84-11.rom", 0x1780000, 0x200000, CRC(a062c1d4) SHA1(158912aa3dd75c3961bf738f9ac9034f0b005b60) )
ROM_LOAD ("d84-21.rom", 0x1980000, 0x080000, CRC(89f68b66) SHA1(95916f02f71357324effe59da4f847f2f30ea34a) )
- ROM_FILL ( 0x0d00000, 0x680000, 0 )
+ ROM_FILL ( 0x0d00000, 0x680000, nullptr )
ROM_REGION(0xc00000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d84-12.rom", 0x000000, 0x200000, CRC(66a7a9aa) SHA1(a7d21f8b6370d16de3c1569019f2ad71d36e7a61) )
@@ -1768,7 +1768,7 @@ ROM_START( gblchmp )
ROM_LOAD16_BYTE("d84-17.rom", 0x400001, 0x100000, CRC(0be37cc3) SHA1(b10c10b93858cad0c962ef614cfd6daea712ef6b) )
ROM_LOAD ("d84-14.rom", 0x900000, 0x200000, CRC(2b2e693e) SHA1(03eb37fa7dc68d54bf0f1800b8c0b581c344a40f) )
ROM_LOAD ("d84-18.rom", 0xb00000, 0x100000, CRC(e812bcc5) SHA1(3574e4a99232d9fc7989ec5d1e8fe76b4b30784a) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d84-26.32", 0x100000, 0x40000, CRC(4f5b8563) SHA1(1d4e06cbea7bc73a99d6e30be714fff420151bbc) )
@@ -1802,7 +1802,7 @@ ROM_START( dankuga )
ROM_LOAD ("d84-08.rom", 0x1580000, 0x200000, CRC(07347bf1) SHA1(34bd359933acdec7fd1ce047092a30d1177afc2c) )
ROM_LOAD ("d84-11.rom", 0x1780000, 0x200000, CRC(a062c1d4) SHA1(158912aa3dd75c3961bf738f9ac9034f0b005b60) )
ROM_LOAD ("d84-21.rom", 0x1980000, 0x080000, CRC(89f68b66) SHA1(95916f02f71357324effe59da4f847f2f30ea34a) )
- ROM_FILL ( 0x0d00000, 0x680000, 0 )
+ ROM_FILL ( 0x0d00000, 0x680000, nullptr )
ROM_REGION(0xc00000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d84-12.rom", 0x000000, 0x200000, CRC(66a7a9aa) SHA1(a7d21f8b6370d16de3c1569019f2ad71d36e7a61) )
@@ -1811,7 +1811,7 @@ ROM_START( dankuga )
ROM_LOAD16_BYTE("d84-17.rom", 0x400001, 0x100000, CRC(0be37cc3) SHA1(b10c10b93858cad0c962ef614cfd6daea712ef6b) )
ROM_LOAD ("d84-14.rom", 0x900000, 0x200000, CRC(2b2e693e) SHA1(03eb37fa7dc68d54bf0f1800b8c0b581c344a40f) )
ROM_LOAD ("d84-18.rom", 0xb00000, 0x100000, CRC(e812bcc5) SHA1(3574e4a99232d9fc7989ec5d1e8fe76b4b30784a) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d84-26.32", 0x100000, 0x40000, CRC(4f5b8563) SHA1(1d4e06cbea7bc73a99d6e30be714fff420151bbc) )
@@ -1836,13 +1836,13 @@ ROM_START( dariusg )
ROM_LOAD16_BYTE("d87-03.bin", 0x000000, 0x200000, CRC(4be1666e) SHA1(35ba7bcf29ec7a8f8b6944ee3544693d4df1bfc2) )
ROM_LOAD16_BYTE("d87-04.bin", 0x000001, 0x200000, CRC(2616002c) SHA1(003f98b740a697274385b8da03c78f3c6f7b5e89) )
ROM_LOAD ("d87-05.bin", 0x600000, 0x200000, CRC(4e5891a9) SHA1(fd08d848079841c9237fa359a850980fd00114d8) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d87-06.bin", 0x000000, 0x200000, CRC(3b97a07c) SHA1(72cdeffedeab0c1bd0e47f03172085390a2be393) )
ROM_LOAD16_BYTE("d87-17.bin", 0x000001, 0x200000, CRC(e601d63e) SHA1(256a6aeb5633fe1db407fad567169a9d0c911219) )
ROM_LOAD ("d87-08.bin", 0x600000, 0x200000, CRC(76d23602) SHA1(ca53ea6641182c44a4038bbeaa5effb1687f1980) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d87-13.bin", 0x100000, 0x40000, CRC(15b1fff4) SHA1(28692b731ae98a47c2c5e11a8a71b61a813d9a64) )
@@ -1864,13 +1864,13 @@ ROM_START( dariusgj )
ROM_LOAD16_BYTE("d87-03.bin", 0x000000, 0x200000, CRC(4be1666e) SHA1(35ba7bcf29ec7a8f8b6944ee3544693d4df1bfc2) )
ROM_LOAD16_BYTE("d87-04.bin", 0x000001, 0x200000, CRC(2616002c) SHA1(003f98b740a697274385b8da03c78f3c6f7b5e89) )
ROM_LOAD ("d87-05.bin", 0x600000, 0x200000, CRC(4e5891a9) SHA1(fd08d848079841c9237fa359a850980fd00114d8) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d87-06.bin", 0x000000, 0x200000, CRC(3b97a07c) SHA1(72cdeffedeab0c1bd0e47f03172085390a2be393) )
ROM_LOAD16_BYTE("d87-17.bin", 0x000001, 0x200000, CRC(e601d63e) SHA1(256a6aeb5633fe1db407fad567169a9d0c911219) )
ROM_LOAD ("d87-08.bin", 0x600000, 0x200000, CRC(76d23602) SHA1(ca53ea6641182c44a4038bbeaa5effb1687f1980) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d87-13.bin", 0x100000, 0x40000, CRC(15b1fff4) SHA1(28692b731ae98a47c2c5e11a8a71b61a813d9a64) )
@@ -1892,13 +1892,13 @@ ROM_START( dariusgu )
ROM_LOAD16_BYTE("d87-03.bin", 0x000000, 0x200000, CRC(4be1666e) SHA1(35ba7bcf29ec7a8f8b6944ee3544693d4df1bfc2) )
ROM_LOAD16_BYTE("d87-04.bin", 0x000001, 0x200000, CRC(2616002c) SHA1(003f98b740a697274385b8da03c78f3c6f7b5e89) )
ROM_LOAD ("d87-05.bin", 0x600000, 0x200000, CRC(4e5891a9) SHA1(fd08d848079841c9237fa359a850980fd00114d8) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d87-06.bin", 0x000000, 0x200000, CRC(3b97a07c) SHA1(72cdeffedeab0c1bd0e47f03172085390a2be393) )
ROM_LOAD16_BYTE("d87-17.bin", 0x000001, 0x200000, CRC(e601d63e) SHA1(256a6aeb5633fe1db407fad567169a9d0c911219) )
ROM_LOAD ("d87-08.bin", 0x600000, 0x200000, CRC(76d23602) SHA1(ca53ea6641182c44a4038bbeaa5effb1687f1980) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d87-13.bin", 0x100000, 0x40000, CRC(15b1fff4) SHA1(28692b731ae98a47c2c5e11a8a71b61a813d9a64) )
@@ -1920,13 +1920,13 @@ ROM_START( dariusgx )
ROM_LOAD16_BYTE("d87-03.bin", 0x000000, 0x200000, CRC(4be1666e) SHA1(35ba7bcf29ec7a8f8b6944ee3544693d4df1bfc2) )
ROM_LOAD16_BYTE("d87-04.bin", 0x000001, 0x200000, CRC(2616002c) SHA1(003f98b740a697274385b8da03c78f3c6f7b5e89) )
ROM_LOAD ("d87-05.bin", 0x600000, 0x200000, CRC(4e5891a9) SHA1(fd08d848079841c9237fa359a850980fd00114d8) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d87-06.bin", 0x000000, 0x200000, CRC(3b97a07c) SHA1(72cdeffedeab0c1bd0e47f03172085390a2be393) )
ROM_LOAD16_BYTE("d87-17.bin", 0x000001, 0x200000, CRC(e601d63e) SHA1(256a6aeb5633fe1db407fad567169a9d0c911219) )
ROM_LOAD ("d87-08.bin", 0x600000, 0x200000, CRC(76d23602) SHA1(ca53ea6641182c44a4038bbeaa5effb1687f1980) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d87-13.bin", 0x100000, 0x40000, CRC(15b1fff4) SHA1(28692b731ae98a47c2c5e11a8a71b61a813d9a64) )
@@ -1949,13 +1949,13 @@ ROM_START( bublbob2 )
ROM_LOAD16_BYTE("d90-03", 0x000000, 0x100000, CRC(6fa894a1) SHA1(7c33e6d41e8928029b92d66557a3712b51c49c67) )
ROM_LOAD16_BYTE("d90-02", 0x000001, 0x100000, CRC(5ab04ca2) SHA1(6d87e7ca3167ff81a041cfedbbed84d51da997de) )
ROM_LOAD ("d90-01", 0x300000, 0x100000, CRC(8aedb9e5) SHA1(fb49330f7985a829c9544ecfd0bc672494f29cf6) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d90-08", 0x000000, 0x100000, CRC(25a4fb2c) SHA1(c8bf6fe2291c05386b32cd26bfcb379da756d7b5) )
ROM_LOAD16_BYTE("d90-07", 0x000001, 0x100000, CRC(b436b42d) SHA1(559827120273733147b260e0723054d926dbea5e) )
ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) )
@@ -1983,13 +1983,13 @@ ROM_START( bublbob2o )
ROM_LOAD16_BYTE("d90-03", 0x000000, 0x100000, CRC(6fa894a1) SHA1(7c33e6d41e8928029b92d66557a3712b51c49c67) )
ROM_LOAD16_BYTE("d90-02", 0x000001, 0x100000, CRC(5ab04ca2) SHA1(6d87e7ca3167ff81a041cfedbbed84d51da997de) )
ROM_LOAD ("d90-01", 0x300000, 0x100000, CRC(8aedb9e5) SHA1(fb49330f7985a829c9544ecfd0bc672494f29cf6) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d90-08", 0x000000, 0x100000, CRC(25a4fb2c) SHA1(c8bf6fe2291c05386b32cd26bfcb379da756d7b5) )
ROM_LOAD16_BYTE("d90-07", 0x000001, 0x100000, CRC(b436b42d) SHA1(559827120273733147b260e0723054d926dbea5e) )
ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) )
@@ -2058,13 +2058,13 @@ ROM_START( bubsymphe )
ROM_LOAD16_BYTE("d90-03", 0x000000, 0x100000, CRC(6fa894a1) SHA1(7c33e6d41e8928029b92d66557a3712b51c49c67) )
ROM_LOAD16_BYTE("d90-02", 0x000001, 0x100000, CRC(5ab04ca2) SHA1(6d87e7ca3167ff81a041cfedbbed84d51da997de) )
ROM_LOAD ("d90-01", 0x300000, 0x100000, CRC(8aedb9e5) SHA1(fb49330f7985a829c9544ecfd0bc672494f29cf6) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d90-08", 0x000000, 0x100000, CRC(25a4fb2c) SHA1(c8bf6fe2291c05386b32cd26bfcb379da756d7b5) )
ROM_LOAD16_BYTE("d90-07", 0x000001, 0x100000, CRC(b436b42d) SHA1(559827120273733147b260e0723054d926dbea5e) )
ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) )
@@ -2086,13 +2086,13 @@ ROM_START( bubsymphj )
ROM_LOAD16_BYTE("d90-03", 0x000000, 0x100000, CRC(6fa894a1) SHA1(7c33e6d41e8928029b92d66557a3712b51c49c67) )
ROM_LOAD16_BYTE("d90-02", 0x000001, 0x100000, CRC(5ab04ca2) SHA1(6d87e7ca3167ff81a041cfedbbed84d51da997de) )
ROM_LOAD ("d90-01", 0x300000, 0x100000, CRC(8aedb9e5) SHA1(fb49330f7985a829c9544ecfd0bc672494f29cf6) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d90-08", 0x000000, 0x100000, CRC(25a4fb2c) SHA1(c8bf6fe2291c05386b32cd26bfcb379da756d7b5) )
ROM_LOAD16_BYTE("d90-07", 0x000001, 0x100000, CRC(b436b42d) SHA1(559827120273733147b260e0723054d926dbea5e) )
ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) )
@@ -2145,7 +2145,7 @@ ROM_START( bubsymphb )
ROM_LOAD32_BYTE("bsb_d15.bin", 0x000003, 0x40000, CRC(014cf8e0) SHA1(5e91fc6665c1d472d0651c06108ea6a8eb5ae8b4) )
ROM_REGION(0x300000, "gfx1" , 0) /* Sprites (5bpp) */
- ROM_FILL ( 0x000000, 0x080000, 0 )
+ ROM_FILL ( 0x000000, 0x080000, nullptr )
ROM_LOAD("bsb_d18.bin", 0x080000, 0x080000, CRC(22d7eeb5) SHA1(30aa4493c5bc98d9256817b9e3341b20d2b76f1f) )
ROM_LOAD("bsb_d19.bin", 0x100000, 0x080000, CRC(d36801fd) SHA1(5dc00942dbd9bb29214c206ea192f158b71b09dc) )
ROM_LOAD("bsb_d20.bin", 0x180000, 0x080000, CRC(20222e15) SHA1(41f2f94afd65d0c106752f254f20b593906cba28) )
@@ -2175,13 +2175,13 @@ ROM_START( bubsymphu )
ROM_LOAD16_BYTE("d90-03", 0x000000, 0x100000, CRC(6fa894a1) SHA1(7c33e6d41e8928029b92d66557a3712b51c49c67) )
ROM_LOAD16_BYTE("d90-02", 0x000001, 0x100000, CRC(5ab04ca2) SHA1(6d87e7ca3167ff81a041cfedbbed84d51da997de) )
ROM_LOAD ("d90-01", 0x300000, 0x100000, CRC(8aedb9e5) SHA1(fb49330f7985a829c9544ecfd0bc672494f29cf6) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d90-08", 0x000000, 0x100000, CRC(25a4fb2c) SHA1(c8bf6fe2291c05386b32cd26bfcb379da756d7b5) )
ROM_LOAD16_BYTE("d90-07", 0x000001, 0x100000, CRC(b436b42d) SHA1(559827120273733147b260e0723054d926dbea5e) )
ROM_LOAD ("d90-06", 0x300000, 0x100000, CRC(166a72b8) SHA1(7f70b8c960794322e1dc88e6600a2d13d948d873) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* sound CPU */
ROM_LOAD16_BYTE("d90-13.ic32", 0x100000, 0x40000, CRC(6762bd90) SHA1(771db0382bc8dab2caf13d0fc20648366c685829) )
@@ -2202,12 +2202,12 @@ ROM_START( spcinvdj )
ROM_REGION(0x200000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("d93-07.12", 0x000000, 0x80000, CRC(8cf5b972) SHA1(75e383aed8548f4ac7d38f1f08bf33fae2a93064) )
ROM_LOAD16_BYTE("d93-08.08", 0x000001, 0x80000, CRC(4c11af2b) SHA1(e332372ab0d1322faa8d6d98f8a6e3bbf51d2008) )
- ROM_FILL ( 0x100000, 0x100000,0 )
+ ROM_FILL ( 0x100000, 0x100000,nullptr )
ROM_REGION(0x80000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d93-09.47", 0x000000, 0x20000, CRC(9076f663) SHA1(c94e93e40926df33b6bb528e0ef30381631913d7) )
ROM_LOAD16_BYTE("d93-10.45", 0x000001, 0x20000, CRC(8a3f531b) SHA1(69f9971c45971018108a5d312d5bbcfd3caf9bd0) )
- ROM_FILL ( 0x040000, 0x40000, 0 )
+ ROM_FILL ( 0x040000, 0x40000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d93-05.bin", 0x100000, 0x20000, CRC(ff365596) SHA1(4cf2e0d6f42cf3fb69796be6092eff8a47f7f8b9) )
@@ -2237,13 +2237,13 @@ ROM_START( pwrgoal )
ROM_LOAD ("d94-03.bin", 0x1200000, 0x200000, CRC(95e32072) SHA1(9797f65ecadc6b0f209bf262396315b61855c433) )
ROM_LOAD ("d94-02.bin", 0x1400000, 0x200000, CRC(f460b9ac) SHA1(e36a812791bd0360380f397b1bc6c357391f585a) )
ROM_LOAD ("d94-01.bin", 0x1600000, 0x200000, CRC(410ffccd) SHA1(0cab00c8e9de92ad81ac61f25bbe8bfd60f45ae0) )
- ROM_FILL ( 0xc00000, 0x600000,0 )
+ ROM_FILL ( 0xc00000, 0x600000,nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d94-14.bin", 0x000000, 0x100000, CRC(b8ba5761) SHA1(7966ef3166d7d6b9913478eaef5dd4a2bf7d5a06) )
ROM_LOAD16_BYTE("d94-13.bin", 0x000001, 0x100000, CRC(cafc68ce) SHA1(5c1f49951e83d812f0c7697751f4876ab1d08141) )
ROM_LOAD ("d94-12.bin", 0x300000, 0x100000, CRC(47064189) SHA1(99ceeb326dcc2e1c3acba8ac14d94dcb17c6e032) )
- ROM_FILL ( 0x200000, 0x100000,0 )
+ ROM_FILL ( 0x200000, 0x100000,nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d94-19.bin", 0x100000, 0x40000, CRC(c93dbcf4) SHA1(413520e652d809651aff9b1b74e6353112d34c12) ) /* Over dump?? 0x20000-0x3ffff == 0xFF */
@@ -2271,13 +2271,13 @@ ROM_START( hthero95 )
ROM_LOAD ("d94-03.bin", 0x1200000, 0x200000, CRC(95e32072) SHA1(9797f65ecadc6b0f209bf262396315b61855c433) )
ROM_LOAD ("d94-02.bin", 0x1400000, 0x200000, CRC(f460b9ac) SHA1(e36a812791bd0360380f397b1bc6c357391f585a) )
ROM_LOAD ("d94-01.bin", 0x1600000, 0x200000, CRC(410ffccd) SHA1(0cab00c8e9de92ad81ac61f25bbe8bfd60f45ae0) )
- ROM_FILL ( 0xc00000, 0x600000,0 )
+ ROM_FILL ( 0xc00000, 0x600000,nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d94-14.bin", 0x000000, 0x100000, CRC(b8ba5761) SHA1(7966ef3166d7d6b9913478eaef5dd4a2bf7d5a06) )
ROM_LOAD16_BYTE("d94-13.bin", 0x000001, 0x100000, CRC(cafc68ce) SHA1(5c1f49951e83d812f0c7697751f4876ab1d08141) )
ROM_LOAD ("d94-12.bin", 0x300000, 0x100000, CRC(47064189) SHA1(99ceeb326dcc2e1c3acba8ac14d94dcb17c6e032) )
- ROM_FILL ( 0x200000, 0x100000,0 )
+ ROM_FILL ( 0x200000, 0x100000,nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d94-19.bin", 0x100000, 0x40000, CRC(c93dbcf4) SHA1(413520e652d809651aff9b1b74e6353112d34c12) ) /* Over dump?? 0x20000-0x3ffff == 0xFF */
@@ -2305,13 +2305,13 @@ ROM_START( hthero95u )
ROM_LOAD ("d94-03.bin", 0x1200000, 0x200000, CRC(95e32072) SHA1(9797f65ecadc6b0f209bf262396315b61855c433) )
ROM_LOAD ("d94-02.bin", 0x1400000, 0x200000, CRC(f460b9ac) SHA1(e36a812791bd0360380f397b1bc6c357391f585a) )
ROM_LOAD ("d94-01.bin", 0x1600000, 0x200000, CRC(410ffccd) SHA1(0cab00c8e9de92ad81ac61f25bbe8bfd60f45ae0) )
- ROM_FILL ( 0xc00000, 0x600000,0 )
+ ROM_FILL ( 0xc00000, 0x600000,nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d94-14.bin", 0x000000, 0x100000, CRC(b8ba5761) SHA1(7966ef3166d7d6b9913478eaef5dd4a2bf7d5a06) )
ROM_LOAD16_BYTE("d94-13.bin", 0x000001, 0x100000, CRC(cafc68ce) SHA1(5c1f49951e83d812f0c7697751f4876ab1d08141) )
ROM_LOAD ("d94-12.bin", 0x300000, 0x100000, CRC(47064189) SHA1(99ceeb326dcc2e1c3acba8ac14d94dcb17c6e032) )
- ROM_FILL ( 0x200000, 0x100000,0 )
+ ROM_FILL ( 0x200000, 0x100000,nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d94-19.bin", 0x100000, 0x40000, CRC(c93dbcf4) SHA1(413520e652d809651aff9b1b74e6353112d34c12) ) /* Over dump?? 0x20000-0x3ffff == 0xFF */
@@ -2332,12 +2332,12 @@ ROM_START( qtheater )
ROM_REGION(0x800000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("d95-02.12", 0x000000, 0x200000, CRC(74ce6f3e) SHA1(eb03f44889bd2d5705e9d8cda6516b39758d9554) )
ROM_LOAD16_BYTE("d95-01.8", 0x000001, 0x200000, CRC(141beb7d) SHA1(bba91f47f68367e2bb3d89298cb62fac2d4edf7b) )
- ROM_FILL ( 0x400000, 0x400000, 0 )
+ ROM_FILL ( 0x400000, 0x400000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("d95-06.47", 0x000000, 0x200000, CRC(70a0dcbb) SHA1(b1abe6a9a4afe55201229a62bae11ad1d96ca244) )
ROM_LOAD16_BYTE("d95-05.45", 0x000001, 0x200000, CRC(1a1a852b) SHA1(89827485a31af4e2457775a5d16f747a764b6d67) )
- ROM_FILL ( 0x400000, 0x400000, 0 )
+ ROM_FILL ( 0x400000, 0x400000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("d95-07.32", 0x100000, 0x40000, CRC(3c201d70) SHA1(89fe4d363f4e1a847ba7d2894a2092708b287a33) )
@@ -2359,13 +2359,13 @@ ROM_START( spcinv95u )
ROM_LOAD16_BYTE("e06-03", 0x000000, 0x100000, CRC(a24070ef) SHA1(9b6ac7852114c606e871a08cfb3b9e1081ac7030) )
ROM_LOAD16_BYTE("e06-02", 0x000001, 0x100000, CRC(8f646dea) SHA1(07cd79671f36df1a5bbf2434e92a601351a36259) )
ROM_LOAD ("e06-01", 0x300000, 0x100000, CRC(51721b15) SHA1(448a9a7f3631072d8987351f5c0b8dd2c908d266) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e06-08", 0x000000, 0x100000, CRC(72ae2fbf) SHA1(7fa7ec94a8031342a2446fb8eca0d89ecfd2fa4f) )
ROM_LOAD16_BYTE("e06-07", 0x000001, 0x100000, CRC(4b02e8f5) SHA1(02d8a97da52f9ba4033b8f0c3f455a908a9dce89) )
ROM_LOAD ("e06-06", 0x300000, 0x100000, CRC(9380db3c) SHA1(83f5a46a01b9c15499e0dc2222df496d26baa0d4) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e06-09.32", 0x100000, 0x40000, CRC(9bcafc87) SHA1(10b3f6da00a41550fe6a705232f0e33fda3c7e7c) )
@@ -2394,13 +2394,13 @@ ROM_START( spcinv95 )
ROM_LOAD16_BYTE("e06-03", 0x000000, 0x100000, CRC(a24070ef) SHA1(9b6ac7852114c606e871a08cfb3b9e1081ac7030) )
ROM_LOAD16_BYTE("e06-02", 0x000001, 0x100000, CRC(8f646dea) SHA1(07cd79671f36df1a5bbf2434e92a601351a36259) )
ROM_LOAD ("e06-01", 0x300000, 0x100000, CRC(51721b15) SHA1(448a9a7f3631072d8987351f5c0b8dd2c908d266) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e06-08", 0x000000, 0x100000, CRC(72ae2fbf) SHA1(7fa7ec94a8031342a2446fb8eca0d89ecfd2fa4f) )
ROM_LOAD16_BYTE("e06-07", 0x000001, 0x100000, CRC(4b02e8f5) SHA1(02d8a97da52f9ba4033b8f0c3f455a908a9dce89) )
ROM_LOAD ("e06-06", 0x300000, 0x100000, CRC(9380db3c) SHA1(83f5a46a01b9c15499e0dc2222df496d26baa0d4) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e06-09.32", 0x100000, 0x40000, CRC(9bcafc87) SHA1(10b3f6da00a41550fe6a705232f0e33fda3c7e7c) )
@@ -2429,13 +2429,13 @@ ROM_START( akkanvdr )
ROM_LOAD16_BYTE("e06-03", 0x000000, 0x100000, CRC(a24070ef) SHA1(9b6ac7852114c606e871a08cfb3b9e1081ac7030) )
ROM_LOAD16_BYTE("e06-02", 0x000001, 0x100000, CRC(8f646dea) SHA1(07cd79671f36df1a5bbf2434e92a601351a36259) )
ROM_LOAD ("e06-01", 0x300000, 0x100000, CRC(51721b15) SHA1(448a9a7f3631072d8987351f5c0b8dd2c908d266) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e06-08", 0x000000, 0x100000, CRC(72ae2fbf) SHA1(7fa7ec94a8031342a2446fb8eca0d89ecfd2fa4f) )
ROM_LOAD16_BYTE("e06-07", 0x000001, 0x100000, CRC(4b02e8f5) SHA1(02d8a97da52f9ba4033b8f0c3f455a908a9dce89) )
ROM_LOAD ("e06-06", 0x300000, 0x100000, CRC(9380db3c) SHA1(83f5a46a01b9c15499e0dc2222df496d26baa0d4) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e06-09.32", 0x100000, 0x40000, CRC(9bcafc87) SHA1(10b3f6da00a41550fe6a705232f0e33fda3c7e7c) )
@@ -2542,13 +2542,13 @@ ROM_START( elvactr )
ROM_LOAD16_BYTE("e02-03.12", 0x000000, 0x200000, CRC(c884ebb5) SHA1(49009056bfdc564eac0ae6b7b49f070f05dc4ee3) )
ROM_LOAD16_BYTE("e02-02.8", 0x000001, 0x200000, CRC(c8e06cfb) SHA1(071d095a4930ce18a782c577811b553a9705fbd7) )
ROM_LOAD ("e02-01.4", 0x600000, 0x200000, CRC(2ba94726) SHA1(3e9cdd076338e0e5358571ce4f97576f1a6a12a7) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2", 0 ) /* Tiles */
ROM_LOAD16_BYTE("e02-08.47", 0x000000, 0x200000, CRC(29c9bd02) SHA1(a5b552ae7ac15f514ee6105410ec3e6e34ea0adb) )
ROM_LOAD16_BYTE("e02-07.45", 0x000001, 0x200000, CRC(5eeee925) SHA1(d302da28df8ac6d406ef45f1d282ee22ce243857) )
ROM_LOAD ("e02-06.43", 0x600000, 0x200000, CRC(4c8726e9) SHA1(8ce2320a087f43c49428a39dafffec8c40d61b03) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e02-13.32", 0x100000, 0x40000, CRC(80932702) SHA1(c468234d03aa31b2aa0c3bd6bec32034216c2ae4) )
@@ -2579,13 +2579,13 @@ ROM_START( elvactrj )
ROM_LOAD16_BYTE("e02-03.12", 0x000000, 0x200000, CRC(c884ebb5) SHA1(49009056bfdc564eac0ae6b7b49f070f05dc4ee3) )
ROM_LOAD16_BYTE("e02-02.8", 0x000001, 0x200000, CRC(c8e06cfb) SHA1(071d095a4930ce18a782c577811b553a9705fbd7) )
ROM_LOAD ("e02-01.4", 0x600000, 0x200000, CRC(2ba94726) SHA1(3e9cdd076338e0e5358571ce4f97576f1a6a12a7) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2", 0 ) /* Tiles */
ROM_LOAD16_BYTE("e02-08.47", 0x000000, 0x200000, CRC(29c9bd02) SHA1(a5b552ae7ac15f514ee6105410ec3e6e34ea0adb) )
ROM_LOAD16_BYTE("e02-07.45", 0x000001, 0x200000, CRC(5eeee925) SHA1(d302da28df8ac6d406ef45f1d282ee22ce243857) )
ROM_LOAD ("e02-06.43", 0x600000, 0x200000, CRC(4c8726e9) SHA1(8ce2320a087f43c49428a39dafffec8c40d61b03) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e02-13.32", 0x100000, 0x40000, CRC(80932702) SHA1(c468234d03aa31b2aa0c3bd6bec32034216c2ae4) )
@@ -2607,13 +2607,13 @@ ROM_START( elvact2u )
ROM_LOAD16_BYTE("e02-03.12", 0x000000, 0x200000, CRC(c884ebb5) SHA1(49009056bfdc564eac0ae6b7b49f070f05dc4ee3) )
ROM_LOAD16_BYTE("e02-02.8", 0x000001, 0x200000, CRC(c8e06cfb) SHA1(071d095a4930ce18a782c577811b553a9705fbd7) )
ROM_LOAD ("e02-01.4", 0x600000, 0x200000, CRC(2ba94726) SHA1(3e9cdd076338e0e5358571ce4f97576f1a6a12a7) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2", 0 ) /* Tiles */
ROM_LOAD16_BYTE("e02-08.47", 0x000000, 0x200000, CRC(29c9bd02) SHA1(a5b552ae7ac15f514ee6105410ec3e6e34ea0adb) )
ROM_LOAD16_BYTE("e02-07.45", 0x000001, 0x200000, CRC(5eeee925) SHA1(d302da28df8ac6d406ef45f1d282ee22ce243857) )
ROM_LOAD ("e02-06.43", 0x600000, 0x200000, CRC(4c8726e9) SHA1(8ce2320a087f43c49428a39dafffec8c40d61b03) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e02-13.32", 0x100000, 0x40000, CRC(80932702) SHA1(c468234d03aa31b2aa0c3bd6bec32034216c2ae4) )
@@ -2634,7 +2634,7 @@ ROM_START( twinqix )
ROM_REGION(0x200000, "gfx1" , 0 ) /* Sprites */
ROM_LOAD16_BYTE("obj0-0.a08", 0x000000, 0x080000, CRC(c6ea845c) SHA1(9df710637e8f64f7fec232b5ebbede588e07c2db) )
ROM_LOAD16_BYTE("obj0-1.a20", 0x000001, 0x080000, CRC(8c12b7fb) SHA1(8a52870fb9f508148619763fb6f37dd74b5386ca) )
- ROM_FILL ( 0x100000, 0x100000, 0 )
+ ROM_FILL ( 0x100000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0 ) /* Tiles */
ROM_LOAD32_BYTE("scr0-0.b07", 0x000000, 0x080000, CRC(9a1b9b34) SHA1(ddf9c6ba0f9c340b580573e1d96ac76b1cd35beb) )
@@ -2678,13 +2678,13 @@ ROM_START( quizhuhu )
ROM_LOAD16_BYTE("e08-03.7", 0x400001, 0x100000, CRC(07b9ab6a) SHA1(db205822233c385e1dbe4a9d40b311df9bca7053) )
ROM_LOAD ("e08-02.4", 0x900000, 0x200000, CRC(d89eb067) SHA1(bd8e1cf4c2046894c629d927fa05806b9b73505d) )
ROM_LOAD ("e08-01.3", 0xb00000, 0x100000, CRC(90223c06) SHA1(f07dae563946908d471ae89db74a2e55c5ab5890) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e08-12.47", 0x000000, 0x100000, CRC(6c711d36) SHA1(3fbff7783323d968ade72ac53531a7bcf7b9d234) )
ROM_LOAD16_BYTE("e08-11.45", 0x000001, 0x100000, CRC(56775a60) SHA1(8bb8190101f2e8487ebb707022ff89d97bb7b39a) )
ROM_LOAD ("e08-10.43", 0x300000, 0x100000, CRC(60abc71b) SHA1(f4aa906920c6134c33a4dfb51724f3adbd3d7de4) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e08-18.32", 0x100000, 0x20000, CRC(e695497e) SHA1(9d845b4c0bd9b40471fb4b5ab2f9240058bc324f) )
@@ -2708,13 +2708,13 @@ ROM_START( pbobble2 )
ROM_REGION(0x400000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e10-02.rom", 0x000000, 0x100000, CRC(c0564490) SHA1(cbe9f880192c08f4d1db21d5ba14073b97e5f1d3) )
ROM_LOAD16_BYTE("e10-01.rom", 0x000001, 0x100000, CRC(8c26ff49) SHA1(cbb514c061106003d2ae2b6c43958b24feaad656) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e10-07.rom", 0x000000, 0x100000, CRC(dcb3c29b) SHA1(b80c3a8ce53d696c57675e654c9927ef8687759e) )
ROM_LOAD16_BYTE("e10-06.rom", 0x000001, 0x100000, CRC(1b0f20e2) SHA1(66b44d059c2896abac2f0e7fc932489dee440ba0) )
ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e10-12.32", 0x100000, 0x40000, CRC(b92dc8ad) SHA1(0c1428d313507b1ae5a2af3b2fbaaa5650135e1e) )
@@ -2740,13 +2740,13 @@ ROM_START( pbobble2o )
ROM_REGION(0x400000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e10-02.rom", 0x000000, 0x100000, CRC(c0564490) SHA1(cbe9f880192c08f4d1db21d5ba14073b97e5f1d3) )
ROM_LOAD16_BYTE("e10-01.rom", 0x000001, 0x100000, CRC(8c26ff49) SHA1(cbb514c061106003d2ae2b6c43958b24feaad656) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e10-07.rom", 0x000000, 0x100000, CRC(dcb3c29b) SHA1(b80c3a8ce53d696c57675e654c9927ef8687759e) )
ROM_LOAD16_BYTE("e10-06.rom", 0x000001, 0x100000, CRC(1b0f20e2) SHA1(66b44d059c2896abac2f0e7fc932489dee440ba0) )
ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e10-12.32", 0x100000, 0x40000, CRC(b92dc8ad) SHA1(0c1428d313507b1ae5a2af3b2fbaaa5650135e1e) )
@@ -2767,13 +2767,13 @@ ROM_START( pbobble2j )
ROM_REGION(0x400000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e10-02.rom", 0x000000, 0x100000, CRC(c0564490) SHA1(cbe9f880192c08f4d1db21d5ba14073b97e5f1d3) )
ROM_LOAD16_BYTE("e10-01.rom", 0x000001, 0x100000, CRC(8c26ff49) SHA1(cbb514c061106003d2ae2b6c43958b24feaad656) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e10-07.rom", 0x000000, 0x100000, CRC(dcb3c29b) SHA1(b80c3a8ce53d696c57675e654c9927ef8687759e) )
ROM_LOAD16_BYTE("e10-06.rom", 0x000001, 0x100000, CRC(1b0f20e2) SHA1(66b44d059c2896abac2f0e7fc932489dee440ba0) )
ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e10-12.32", 0x100000, 0x40000, CRC(b92dc8ad) SHA1(0c1428d313507b1ae5a2af3b2fbaaa5650135e1e) )
@@ -2794,13 +2794,13 @@ ROM_START( pbobble2u )
ROM_REGION(0x400000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e10-02.rom", 0x000000, 0x100000, CRC(c0564490) SHA1(cbe9f880192c08f4d1db21d5ba14073b97e5f1d3) )
ROM_LOAD16_BYTE("e10-01.rom", 0x000001, 0x100000, CRC(8c26ff49) SHA1(cbb514c061106003d2ae2b6c43958b24feaad656) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e10-07.rom", 0x000000, 0x100000, CRC(dcb3c29b) SHA1(b80c3a8ce53d696c57675e654c9927ef8687759e) )
ROM_LOAD16_BYTE("e10-06.rom", 0x000001, 0x100000, CRC(1b0f20e2) SHA1(66b44d059c2896abac2f0e7fc932489dee440ba0) )
ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e10-16.32", 0x100000, 0x40000, CRC(765ce77a) SHA1(e2723bd6238da91d28307081909a7172a1825c83) )
@@ -2821,13 +2821,13 @@ ROM_START( pbobble2x )
ROM_REGION(0x400000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e10-02.rom", 0x000000, 0x100000, CRC(c0564490) SHA1(cbe9f880192c08f4d1db21d5ba14073b97e5f1d3) )
ROM_LOAD16_BYTE("e10-01.rom", 0x000001, 0x100000, CRC(8c26ff49) SHA1(cbb514c061106003d2ae2b6c43958b24feaad656) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e10-07.rom", 0x000000, 0x100000, CRC(dcb3c29b) SHA1(b80c3a8ce53d696c57675e654c9927ef8687759e) )
ROM_LOAD16_BYTE("e10-06.rom", 0x000001, 0x100000, CRC(1b0f20e2) SHA1(66b44d059c2896abac2f0e7fc932489dee440ba0) )
ROM_LOAD ("e10-05.rom", 0x300000, 0x100000, CRC(81266151) SHA1(aa3b144f32995425db97efce440e234a3c7a6715) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e10-30.32", 0x100000, 0x40000, CRC(bb090c1e) SHA1(af2ff23d6f9bd56c25530cb9bf9f452b6f5210f5) )
@@ -2856,13 +2856,13 @@ ROM_START( gekiridn )
ROM_LOAD16_BYTE("e11-03.ic12", 0x000000, 0x200000, CRC(f73877c5) SHA1(1f6b7c0b8a0aaab3e5427d21de7fad3d3cbf737a) )
ROM_LOAD16_BYTE("e11-02.ic8", 0x000001, 0x200000, CRC(5722a83b) SHA1(823c20a33016a5506ca5415ec615c3d2546ca9ab) )
ROM_LOAD ("e11-01.ic4", 0x600000, 0x200000, CRC(c2cd1069) SHA1(9744dd3d8a6d9200cea4429dafce5620b60e2960) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e11-08.ic47", 0x000000, 0x200000, CRC(907f69d3) SHA1(0899ed58edcae22144625c349c9d2fe4d46d11e3) )
ROM_LOAD16_BYTE("e11-07.ic45", 0x000001, 0x200000, CRC(ef018607) SHA1(61b602b13754c3be21caf76acbfc10c87518ba47) )
ROM_LOAD ("e11-06.ic43", 0x600000, 0x200000, CRC(200ce305) SHA1(c80a0b96510913a6411e6763fb72bf413fb792da) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e11-13.ic32", 0x100000, 0x40000, CRC(f5c5486a) SHA1(4091f3ddb1e6cbc9dc89485e1e784a4b6fa191b7) )
@@ -2884,13 +2884,13 @@ ROM_START( gekiridnj )
ROM_LOAD16_BYTE("e11-03.ic12", 0x000000, 0x200000, CRC(f73877c5) SHA1(1f6b7c0b8a0aaab3e5427d21de7fad3d3cbf737a) )
ROM_LOAD16_BYTE("e11-02.ic8", 0x000001, 0x200000, CRC(5722a83b) SHA1(823c20a33016a5506ca5415ec615c3d2546ca9ab) )
ROM_LOAD ("e11-01.ic4", 0x600000, 0x200000, CRC(c2cd1069) SHA1(9744dd3d8a6d9200cea4429dafce5620b60e2960) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e11-08.ic47", 0x000000, 0x200000, CRC(907f69d3) SHA1(0899ed58edcae22144625c349c9d2fe4d46d11e3) )
ROM_LOAD16_BYTE("e11-07.ic45", 0x000001, 0x200000, CRC(ef018607) SHA1(61b602b13754c3be21caf76acbfc10c87518ba47) )
ROM_LOAD ("e11-06.ic43", 0x600000, 0x200000, CRC(200ce305) SHA1(c80a0b96510913a6411e6763fb72bf413fb792da) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e11-13.ic32", 0x100000, 0x40000, CRC(f5c5486a) SHA1(4091f3ddb1e6cbc9dc89485e1e784a4b6fa191b7) )
@@ -2917,14 +2917,14 @@ ROM_START( tcobra2 )
ROM_LOAD16_BYTE("e15-02.ic8", 0x000001, 0x200000, CRC(bf1232aa) SHA1(1381bae2a18ed62f4ca28bcdaf07debfc9bf21af) )
ROM_LOAD16_BYTE("e15-03.ic11", 0x400000, 0x100000, CRC(be45a52f) SHA1(5d9735a774233b43003057cbab6ae7d6e0195dd2) )
ROM_LOAD16_BYTE("e15-01.ic7", 0x400001, 0x100000, CRC(85421aac) SHA1(327e72f0107e024ec9fc9dc20d381e2e20f36248) )
- ROM_FILL ( 0x600000, 0x600000, 0 )
+ ROM_FILL ( 0x600000, 0x600000, nullptr )
ROM_REGION(0xc00000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e15-10.ic47", 0x000000, 0x200000, CRC(d8c96b00) SHA1(9cd275abb66b3475433ea2649dc872d7d35eb5b8) )
ROM_LOAD16_BYTE("e15-08.ic45", 0x000001, 0x200000, CRC(4bdb2bf3) SHA1(1146b7a5d9f26d3173a7c64768e55d53a0ab7b8e) )
ROM_LOAD16_BYTE("e15-09.ic46", 0x400000, 0x100000, CRC(07c29f60) SHA1(3ca0f632e7047cc50ee3ce24cd6c0c8c7252a278) )
ROM_LOAD16_BYTE("e15-07.ic44", 0x400001, 0x100000, CRC(8164f7ee) SHA1(4550521f820e93ec08b86d148135966d016cbf22) )
- ROM_FILL ( 0x600000, 0x600000, 0 )
+ ROM_FILL ( 0x600000, 0x600000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e15-15.ic32", 0x100000, 0x20000, CRC(22126dfb) SHA1(a1af17e5c3440f1bab50d79f92c251f1a4536ca0) )
@@ -2954,14 +2954,14 @@ ROM_START( tcobra2u )
ROM_LOAD16_BYTE("e15-02.ic8", 0x000001, 0x200000, CRC(bf1232aa) SHA1(1381bae2a18ed62f4ca28bcdaf07debfc9bf21af) )
ROM_LOAD16_BYTE("e15-03.ic11", 0x400000, 0x100000, CRC(be45a52f) SHA1(5d9735a774233b43003057cbab6ae7d6e0195dd2) )
ROM_LOAD16_BYTE("e15-01.ic7", 0x400001, 0x100000, CRC(85421aac) SHA1(327e72f0107e024ec9fc9dc20d381e2e20f36248) )
- ROM_FILL ( 0x600000, 0x600000, 0 )
+ ROM_FILL ( 0x600000, 0x600000, nullptr )
ROM_REGION(0xc00000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e15-10.ic47", 0x000000, 0x200000, CRC(d8c96b00) SHA1(9cd275abb66b3475433ea2649dc872d7d35eb5b8) )
ROM_LOAD16_BYTE("e15-08.ic45", 0x000001, 0x200000, CRC(4bdb2bf3) SHA1(1146b7a5d9f26d3173a7c64768e55d53a0ab7b8e) )
ROM_LOAD16_BYTE("e15-09.ic46", 0x400000, 0x100000, CRC(07c29f60) SHA1(3ca0f632e7047cc50ee3ce24cd6c0c8c7252a278) )
ROM_LOAD16_BYTE("e15-07.ic44", 0x400001, 0x100000, CRC(8164f7ee) SHA1(4550521f820e93ec08b86d148135966d016cbf22) )
- ROM_FILL ( 0x600000, 0x600000, 0 )
+ ROM_FILL ( 0x600000, 0x600000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e15-15.ic32", 0x100000, 0x20000, CRC(22126dfb) SHA1(a1af17e5c3440f1bab50d79f92c251f1a4536ca0) )
@@ -2991,14 +2991,14 @@ ROM_START( ktiger2 )
ROM_LOAD16_BYTE("e15-02.ic8", 0x000001, 0x200000, CRC(bf1232aa) SHA1(1381bae2a18ed62f4ca28bcdaf07debfc9bf21af) )
ROM_LOAD16_BYTE("e15-03.ic11", 0x400000, 0x100000, CRC(be45a52f) SHA1(5d9735a774233b43003057cbab6ae7d6e0195dd2) )
ROM_LOAD16_BYTE("e15-01.ic7", 0x400001, 0x100000, CRC(85421aac) SHA1(327e72f0107e024ec9fc9dc20d381e2e20f36248) )
- ROM_FILL ( 0x600000, 0x600000, 0 )
+ ROM_FILL ( 0x600000, 0x600000, nullptr )
ROM_REGION(0xc00000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e15-10.ic47", 0x000000, 0x200000, CRC(d8c96b00) SHA1(9cd275abb66b3475433ea2649dc872d7d35eb5b8) )
ROM_LOAD16_BYTE("e15-08.ic45", 0x000001, 0x200000, CRC(4bdb2bf3) SHA1(1146b7a5d9f26d3173a7c64768e55d53a0ab7b8e) )
ROM_LOAD16_BYTE("e15-09.ic46", 0x400000, 0x100000, CRC(07c29f60) SHA1(3ca0f632e7047cc50ee3ce24cd6c0c8c7252a278) )
ROM_LOAD16_BYTE("e15-07.ic44", 0x400001, 0x100000, CRC(8164f7ee) SHA1(4550521f820e93ec08b86d148135966d016cbf22) )
- ROM_FILL ( 0x600000, 0x600000, 0 )
+ ROM_FILL ( 0x600000, 0x600000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e15-15.ic32", 0x100000, 0x20000, CRC(22126dfb) SHA1(a1af17e5c3440f1bab50d79f92c251f1a4536ca0) )
@@ -3026,13 +3026,13 @@ ROM_START( bubblem )
ROM_REGION(0x800000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e21-02.rom", 0x000000, 0x200000, CRC(b7cb9232) SHA1(ba71cb98d49eadebb26d9f53bbaec1dc211077f5) )
ROM_LOAD16_BYTE("e21-01.rom", 0x000001, 0x200000, CRC(a11f2f99) SHA1(293c5996600cad05bf98f936f5f820d93d546099) )
- ROM_FILL ( 0x400000, 0x400000, 0 )
+ ROM_FILL ( 0x400000, 0x400000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e21-07.rom", 0x000000, 0x100000, CRC(7789bf7c) SHA1(bc8ef1696adac99a1fabae9b79afcd3461cf323b) )
ROM_LOAD16_BYTE("e21-06.rom", 0x000001, 0x100000, CRC(997fc0d7) SHA1(58a546f739072fedebfe7c972fe85f72107726b2) )
ROM_LOAD ("e21-05.rom", 0x300000, 0x100000, CRC(07eab58f) SHA1(ae2d7b839b39d88d11652df74804a39230674467) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* Sound CPU */
ROM_LOAD16_BYTE("e21-12.32", 0x100000, 0x40000, CRC(34093de1) SHA1(d69d6b5f10b8fe86f727d739ed5aecceb15e01f7) )
@@ -3056,13 +3056,13 @@ ROM_START( bubblemj )
ROM_REGION(0x800000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e21-02.rom", 0x000000, 0x200000, CRC(b7cb9232) SHA1(ba71cb98d49eadebb26d9f53bbaec1dc211077f5) )
ROM_LOAD16_BYTE("e21-01.rom", 0x000001, 0x200000, CRC(a11f2f99) SHA1(293c5996600cad05bf98f936f5f820d93d546099) )
- ROM_FILL ( 0x400000, 0x400000, 0 )
+ ROM_FILL ( 0x400000, 0x400000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e21-07.rom", 0x000000, 0x100000, CRC(7789bf7c) SHA1(bc8ef1696adac99a1fabae9b79afcd3461cf323b) )
ROM_LOAD16_BYTE("e21-06.rom", 0x000001, 0x100000, CRC(997fc0d7) SHA1(58a546f739072fedebfe7c972fe85f72107726b2) )
ROM_LOAD ("e21-05.rom", 0x300000, 0x100000, CRC(07eab58f) SHA1(ae2d7b839b39d88d11652df74804a39230674467) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* Sound CPU */
ROM_LOAD16_BYTE("e21-12.32", 0x100000, 0x40000, CRC(34093de1) SHA1(d69d6b5f10b8fe86f727d739ed5aecceb15e01f7) )
@@ -3086,13 +3086,13 @@ ROM_START( cleopatr )
ROM_REGION(0x200000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e28-02.bin", 0x000000, 0x080000, CRC(b20d47cb) SHA1(6888e5564688840fed1c123ab38467066cd59c7f) )
ROM_LOAD16_BYTE("e28-01.bin", 0x000001, 0x080000, CRC(4440e659) SHA1(71dece81bac8d638473c6531fed5c32798096af9) )
- ROM_FILL ( 0x100000, 0x100000, 0 )
+ ROM_FILL ( 0x100000, 0x100000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e28-06.bin", 0x000000, 0x100000, CRC(21d0c454) SHA1(f4c815984b19321cfab303fa6f21d9cad35b09f2) )
ROM_LOAD16_BYTE("e28-05.bin", 0x000001, 0x100000, CRC(2870dbbc) SHA1(4e412b90cbd9a05956cde3d8cff615ebadca9db6) )
ROM_LOAD ("e28-04.bin", 0x300000, 0x100000, CRC(57aef029) SHA1(5c07209015d4749d1ffb3e9c1a890e6cfeec8cb0) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x140000, "audiocpu", 0) /* Sound CPU */
ROM_LOAD16_BYTE("e28-11.bin", 0x100000, 0x20000, CRC(01a06950) SHA1(94d22cd839f9027e9d45264c366e0cb5d698e0b6) )
@@ -3112,13 +3112,13 @@ ROM_START( pbobble3 )
ROM_REGION(0x400000, "gfx1" , 0 ) /* Sprites */
ROM_LOAD16_BYTE("e29-02.rom", 0x000000, 0x100000, CRC(437391d3) SHA1(b3cc64c68553d37e0bd09e0dece14901d8df5866) )
ROM_LOAD16_BYTE("e29-01.rom", 0x000001, 0x100000, CRC(52547c77) SHA1(d0cc8b8915cec1506c9733a1ce1638038ea93d25) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0 ) /* Tiles */
ROM_LOAD16_BYTE("e29-08.rom", 0x000000, 0x100000, CRC(7040a3d5) SHA1(ea284ec530aac20348f84122e38a508bbc283f44) )
ROM_LOAD16_BYTE("e29-07.rom", 0x000001, 0x100000, CRC(fca2ea9b) SHA1(a87ebedd0d16657288df434a70b8933fafe0ca25) )
ROM_LOAD ("e29-06.rom", 0x300000, 0x100000, CRC(c16184f8) SHA1(ded417d9d116b5a2f7518fa404bc2dda1c6a6366) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */
ROM_LOAD16_BYTE("e29-13.rom", 0x100000, 0x40000, CRC(1ef551ef) SHA1(527defe8f35314304adb4b483285b08cd6ebe865) )
@@ -3141,13 +3141,13 @@ ROM_START( pbobble3u )
ROM_REGION(0x400000, "gfx1" , 0 ) /* Sprites */
ROM_LOAD16_BYTE("e29-02.rom", 0x000000, 0x100000, CRC(437391d3) SHA1(b3cc64c68553d37e0bd09e0dece14901d8df5866) )
ROM_LOAD16_BYTE("e29-01.rom", 0x000001, 0x100000, CRC(52547c77) SHA1(d0cc8b8915cec1506c9733a1ce1638038ea93d25) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0 ) /* Tiles */
ROM_LOAD16_BYTE("e29-08.rom", 0x000000, 0x100000, CRC(7040a3d5) SHA1(ea284ec530aac20348f84122e38a508bbc283f44) )
ROM_LOAD16_BYTE("e29-07.rom", 0x000001, 0x100000, CRC(fca2ea9b) SHA1(a87ebedd0d16657288df434a70b8933fafe0ca25) )
ROM_LOAD ("e29-06.rom", 0x300000, 0x100000, CRC(c16184f8) SHA1(ded417d9d116b5a2f7518fa404bc2dda1c6a6366) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */
ROM_LOAD16_BYTE("e29-13.rom", 0x100000, 0x40000, CRC(1ef551ef) SHA1(527defe8f35314304adb4b483285b08cd6ebe865) )
@@ -3170,13 +3170,13 @@ ROM_START( pbobble3j )
ROM_REGION(0x400000, "gfx1" , 0 ) /* Sprites */
ROM_LOAD16_BYTE("e29-02.ic8", 0x000000, 0x100000, CRC(437391d3) SHA1(b3cc64c68553d37e0bd09e0dece14901d8df5866) )
ROM_LOAD16_BYTE("e29-01.ic12", 0x000001, 0x100000, CRC(52547c77) SHA1(d0cc8b8915cec1506c9733a1ce1638038ea93d25) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0 ) /* Tiles */
ROM_LOAD16_BYTE("e29-08.ic47", 0x000000, 0x100000, CRC(7040a3d5) SHA1(ea284ec530aac20348f84122e38a508bbc283f44) )
ROM_LOAD16_BYTE("e29-07.ic45", 0x000001, 0x100000, CRC(fca2ea9b) SHA1(a87ebedd0d16657288df434a70b8933fafe0ca25) )
ROM_LOAD ("e29-06.ic43", 0x300000, 0x100000, CRC(c16184f8) SHA1(ded417d9d116b5a2f7518fa404bc2dda1c6a6366) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */
ROM_LOAD16_BYTE("e29-13.ic32", 0x100000, 0x40000, CRC(1ef551ef) SHA1(527defe8f35314304adb4b483285b08cd6ebe865) )
@@ -3211,13 +3211,13 @@ ROM_START( arkretrn )
ROM_LOAD16_BYTE("e36-03.12", 0x000000, 0x040000, CRC(1ea8558b) SHA1(b8ea4d6e1fb551b3c47f336a5e60ec33f7be525f) )
ROM_LOAD16_BYTE("e36-02.8", 0x000001, 0x040000, CRC(694eda31) SHA1(1a6f85057395052571491f85c633d5632ab64865) )
ROM_LOAD ("e36-01.4", 0x0c0000, 0x040000, CRC(54b9b2cd) SHA1(55ae964ea1d2cc40a6578c5339754a270096f01f) )
- ROM_FILL ( 0x080000, 0x040000, 0 )
+ ROM_FILL ( 0x080000, 0x040000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e36-07.47", 0x000000, 0x080000, CRC(266bf1c1) SHA1(489549478d7016400af2e643d4b98bf605237d34) )
ROM_LOAD16_BYTE("e36-06.45", 0x000001, 0x080000, CRC(110ab729) SHA1(0ccc0a5abbcfd79a069daf5162cd344a5fb225d5) )
ROM_LOAD ("e36-05.43", 0x180000, 0x080000, CRC(db18bce2) SHA1(b6653facc7f5c624f5710a51f2b2abfe640177e2) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION16_BE(0x400000, "ensoniq.0" , ROMREGION_ERASE00 ) // V2: 4 banks, only 1 populated
ROM_LOAD16_BYTE("e36-04.38", 0x000000, 0x200000, CRC(2250959b) SHA1(06943f1b72bdf325485356a01278d88aeae93d87) ) // C8 C9 CA CB
@@ -3245,13 +3245,13 @@ ROM_START( arkretrnu )
ROM_LOAD16_BYTE("e36-03.12", 0x000000, 0x040000, CRC(1ea8558b) SHA1(b8ea4d6e1fb551b3c47f336a5e60ec33f7be525f) )
ROM_LOAD16_BYTE("e36-02.8", 0x000001, 0x040000, CRC(694eda31) SHA1(1a6f85057395052571491f85c633d5632ab64865) )
ROM_LOAD ("e36-01.4", 0x0c0000, 0x040000, CRC(54b9b2cd) SHA1(55ae964ea1d2cc40a6578c5339754a270096f01f) )
- ROM_FILL ( 0x080000, 0x040000, 0 )
+ ROM_FILL ( 0x080000, 0x040000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e36-07.47", 0x000000, 0x080000, CRC(266bf1c1) SHA1(489549478d7016400af2e643d4b98bf605237d34) )
ROM_LOAD16_BYTE("e36-06.45", 0x000001, 0x080000, CRC(110ab729) SHA1(0ccc0a5abbcfd79a069daf5162cd344a5fb225d5) )
ROM_LOAD ("e36-05.43", 0x180000, 0x080000, CRC(db18bce2) SHA1(b6653facc7f5c624f5710a51f2b2abfe640177e2) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION16_BE(0x400000, "ensoniq.0" , ROMREGION_ERASE00 ) // V2: 4 banks, only 1 populated
ROM_LOAD16_BYTE("e36-04.38", 0x000000, 0x200000, CRC(2250959b) SHA1(06943f1b72bdf325485356a01278d88aeae93d87) ) // C8 C9 CA CB
@@ -3279,13 +3279,13 @@ ROM_START( arkretrnj )
ROM_LOAD16_BYTE("e36-03.12", 0x000000, 0x040000, CRC(1ea8558b) SHA1(b8ea4d6e1fb551b3c47f336a5e60ec33f7be525f) )
ROM_LOAD16_BYTE("e36-02.8", 0x000001, 0x040000, CRC(694eda31) SHA1(1a6f85057395052571491f85c633d5632ab64865) )
ROM_LOAD ("e36-01.4", 0x0c0000, 0x040000, CRC(54b9b2cd) SHA1(55ae964ea1d2cc40a6578c5339754a270096f01f) )
- ROM_FILL ( 0x080000, 0x040000, 0 )
+ ROM_FILL ( 0x080000, 0x040000, nullptr )
ROM_REGION(0x200000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e36-07.47", 0x000000, 0x080000, CRC(266bf1c1) SHA1(489549478d7016400af2e643d4b98bf605237d34) )
ROM_LOAD16_BYTE("e36-06.45", 0x000001, 0x080000, CRC(110ab729) SHA1(0ccc0a5abbcfd79a069daf5162cd344a5fb225d5) )
ROM_LOAD ("e36-05.43", 0x180000, 0x080000, CRC(db18bce2) SHA1(b6653facc7f5c624f5710a51f2b2abfe640177e2) )
- ROM_FILL ( 0x100000, 0x080000, 0 )
+ ROM_FILL ( 0x100000, 0x080000, nullptr )
ROM_REGION16_BE(0x400000, "ensoniq.0" , ROMREGION_ERASE00 ) // V2: 4 banks, only 1 populated
ROM_LOAD16_BYTE("e36-04.38", 0x000000, 0x200000, CRC(2250959b) SHA1(06943f1b72bdf325485356a01278d88aeae93d87) ) // C8 C9 CA CB
@@ -3312,7 +3312,7 @@ ROM_START( kirameki )
ROM_LOAD16_BYTE("e44-03.7", 0x0800001, 0x200000, CRC(d9e63fb0) SHA1(f2d8c30a4aaa2090673d5d2b1071e586a05c0236) )
ROM_LOAD ("e44-02.4", 0x1200000, 0x400000, CRC(5481efde) SHA1(560a1b8acf672781e912dca51599b5aa4d69520a) )
ROM_LOAD ("e44-01.3", 0x1600000, 0x200000, CRC(c4bdf727) SHA1(793a22a30ef44db818cfac96ff8e9d2f99cb672f) )
- ROM_FILL ( 0x0c00000, 0x600000, 0 )
+ ROM_FILL ( 0x0c00000, 0x600000, nullptr )
ROM_REGION(0xc00000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e44-14.47", 0x000000, 0x200000, CRC(4597c034) SHA1(3c16c20969df9e439d42a89e649146319df1b996) )
@@ -3321,7 +3321,7 @@ ROM_START( kirameki )
ROM_LOAD16_BYTE("e44-11.44", 0x400001, 0x100000, CRC(34d84143) SHA1(d553ab2da9188b1881f70802637d46574a42787e) )
ROM_LOAD ("e44-10.43", 0x900000, 0x200000, CRC(326f738e) SHA1(29c0c870341345eba10993446fecee08b6f13027) )
ROM_LOAD ("e44-09.42", 0xb00000, 0x100000, CRC(a8e68eb7) SHA1(843bbb8a61bd4b9cbb14c7242281ce0c83c432ff) )
- ROM_FILL ( 0x600000, 0x300000, 0 )
+ ROM_FILL ( 0x600000, 0x300000, nullptr )
ROM_REGION(0x400000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e44-20.51", 0x100000, 0x080000, CRC(4df7e051) SHA1(db0f5758458764a1c04116d5d5bbb20d4d36c875) )
@@ -3347,13 +3347,13 @@ ROM_START( puchicar )
ROM_LOAD16_BYTE("e46-03", 0x400001, 0x200000, CRC(eb768193) SHA1(1d48334c0dfb9f72484717c267ac9b9b8d887fc8) )
ROM_LOAD ("e46-02", 0xc00000, 0x200000, CRC(fb046018) SHA1(48d9c582ec9ef59dcc7538598fbd7ea2117896af) )
ROM_LOAD ("e46-01", 0xe00000, 0x200000, CRC(34fc2103) SHA1(dca199bbd0ad28a11960101cda8d110943b10822) )
- ROM_FILL ( 0x800000, 0x400000, 0 )
+ ROM_FILL ( 0x800000, 0x400000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e46-12", 0x000000, 0x100000, CRC(1f3a9851) SHA1(c8711e2ef0096b41cc9b4c41e521d44b824f7181) )
ROM_LOAD16_BYTE("e46-11", 0x000001, 0x100000, CRC(e9f10bf1) SHA1(4ee9be3846b262dc0992c904c40580353b164d46) )
ROM_LOAD ("e46-10", 0x300000, 0x100000, CRC(1999b76a) SHA1(83d6d2efe250bf3b119982bbf701f9b9d856af2d) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e46-21", 0x100000, 0x40000, CRC(b466cff6) SHA1(0757984f15a6ac9939c1e8625d5b9bfcbc788acc) )
@@ -3387,13 +3387,13 @@ ROM_START( puchicarj )
ROM_LOAD16_BYTE("e46-03", 0x400001, 0x200000, CRC(eb768193) SHA1(1d48334c0dfb9f72484717c267ac9b9b8d887fc8) )
ROM_LOAD ("e46-02", 0xc00000, 0x200000, CRC(fb046018) SHA1(48d9c582ec9ef59dcc7538598fbd7ea2117896af) )
ROM_LOAD ("e46-01", 0xe00000, 0x200000, CRC(34fc2103) SHA1(dca199bbd0ad28a11960101cda8d110943b10822) )
- ROM_FILL ( 0x800000, 0x400000, 0 )
+ ROM_FILL ( 0x800000, 0x400000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e46-12", 0x000000, 0x100000, CRC(1f3a9851) SHA1(c8711e2ef0096b41cc9b4c41e521d44b824f7181) )
ROM_LOAD16_BYTE("e46-11", 0x000001, 0x100000, CRC(e9f10bf1) SHA1(4ee9be3846b262dc0992c904c40580353b164d46) )
ROM_LOAD ("e46-10", 0x300000, 0x100000, CRC(1999b76a) SHA1(83d6d2efe250bf3b119982bbf701f9b9d856af2d) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e46-19", 0x100000, 0x40000, CRC(2624eba0) SHA1(ba0b13bda241c648c7f8520106acd8c0c888fe29) )
@@ -3423,13 +3423,13 @@ ROM_START( pbobble4 )
ROM_REGION(0x400000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e49-02", 0x000000, 0x100000, CRC(c7d2f40b) SHA1(cc6813189d6b31d7db099e49443af395f137462c) )
ROM_LOAD16_BYTE("e49-01", 0x000001, 0x100000, CRC(a3dd5f85) SHA1(2b305fdc18806bb5d7c3de0ac6a6eb07f98b4d3d) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e49-08", 0x000000, 0x100000, CRC(87408106) SHA1(6577568ab4b92d6a81f43cf9ea2f0e30e17e2742) )
ROM_LOAD16_BYTE("e49-07", 0x000001, 0x100000, CRC(1e1e8e1c) SHA1(9c3b994064c6af62b6a24cab85089a74fd92cf7f) )
ROM_LOAD ("e49-06", 0x300000, 0x100000, CRC(ec85f7ce) SHA1(9fead68c38fc9ca84d34d70343b13665978c362b) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */
ROM_LOAD16_BYTE("e49-13.32", 0x100000, 0x40000, CRC(83536f7f) SHA1(2252cee00ae260954cc76d92af8eb2a87d23cbfb) )
@@ -3459,13 +3459,13 @@ ROM_START( pbobble4j )
ROM_REGION(0x400000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e49-02", 0x000000, 0x100000, CRC(c7d2f40b) SHA1(cc6813189d6b31d7db099e49443af395f137462c) )
ROM_LOAD16_BYTE("e49-01", 0x000001, 0x100000, CRC(a3dd5f85) SHA1(2b305fdc18806bb5d7c3de0ac6a6eb07f98b4d3d) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e49-08", 0x000000, 0x100000, CRC(87408106) SHA1(6577568ab4b92d6a81f43cf9ea2f0e30e17e2742) )
ROM_LOAD16_BYTE("e49-07", 0x000001, 0x100000, CRC(1e1e8e1c) SHA1(9c3b994064c6af62b6a24cab85089a74fd92cf7f) )
ROM_LOAD ("e49-06", 0x300000, 0x100000, CRC(ec85f7ce) SHA1(9fead68c38fc9ca84d34d70343b13665978c362b) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */
ROM_LOAD16_BYTE("e49-13.32", 0x100000, 0x40000, CRC(83536f7f) SHA1(2252cee00ae260954cc76d92af8eb2a87d23cbfb) )
@@ -3495,13 +3495,13 @@ ROM_START( pbobble4u )
ROM_REGION(0x400000, "gfx1" , 0) /* Sprites */
ROM_LOAD16_BYTE("e49-02", 0x000000, 0x100000, CRC(c7d2f40b) SHA1(cc6813189d6b31d7db099e49443af395f137462c) )
ROM_LOAD16_BYTE("e49-01", 0x000001, 0x100000, CRC(a3dd5f85) SHA1(2b305fdc18806bb5d7c3de0ac6a6eb07f98b4d3d) )
- ROM_FILL ( 0x200000, 0x200000, 0 )
+ ROM_FILL ( 0x200000, 0x200000, nullptr )
ROM_REGION(0x400000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e49-08", 0x000000, 0x100000, CRC(87408106) SHA1(6577568ab4b92d6a81f43cf9ea2f0e30e17e2742) )
ROM_LOAD16_BYTE("e49-07", 0x000001, 0x100000, CRC(1e1e8e1c) SHA1(9c3b994064c6af62b6a24cab85089a74fd92cf7f) )
ROM_LOAD ("e49-06", 0x300000, 0x100000, CRC(ec85f7ce) SHA1(9fead68c38fc9ca84d34d70343b13665978c362b) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 code */
ROM_LOAD16_BYTE("e49-13.32", 0x100000, 0x40000, CRC(83536f7f) SHA1(2252cee00ae260954cc76d92af8eb2a87d23cbfb) )
@@ -3532,13 +3532,13 @@ ROM_START( popnpopj )
ROM_LOAD16_BYTE("e51-03.12",0x000000, 0x100000, CRC(a24c4607) SHA1(2396fa927446568ad8d98ad6756813e2f30523dd) )
ROM_LOAD16_BYTE("e51-02.8", 0x000001, 0x100000, CRC(6aa8b96c) SHA1(aaf7917dce5fed43c68cd3065538b58666ef3dbc) )
ROM_LOAD ("e51-01.4", 0x300000, 0x100000, CRC(70347e24) SHA1(6b4ab90f0209e50eac7bee3abcf40afb71ab950a) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e51-08.47", 0x000000, 0x200000, CRC(3ad41f02) SHA1(a4959113c01062003df41cdf6146e8a034917ee2) )
ROM_LOAD16_BYTE("e51-07.45", 0x000001, 0x200000, CRC(95873e46) SHA1(02504cbd920c8dbcb5abec6388305eff38f7efe0) )
ROM_LOAD ("e51-06.43", 0x600000, 0x200000, CRC(c240d6c8) SHA1(6f3b5224b7eb8783893375d432bbbfc37f81c230) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e51-13.32", 0x100000, 0x40000, CRC(3b9e3986) SHA1(26340bda0ad2ea580e2395135617966676a71ad5) )
@@ -3567,13 +3567,13 @@ ROM_START( popnpop )
ROM_LOAD16_BYTE("e51-03.12",0x000000, 0x100000, CRC(a24c4607) SHA1(2396fa927446568ad8d98ad6756813e2f30523dd) )
ROM_LOAD16_BYTE("e51-02.8", 0x000001, 0x100000, CRC(6aa8b96c) SHA1(aaf7917dce5fed43c68cd3065538b58666ef3dbc) )
ROM_LOAD ("e51-01.4", 0x300000, 0x100000, CRC(70347e24) SHA1(6b4ab90f0209e50eac7bee3abcf40afb71ab950a) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e51-08.47", 0x000000, 0x200000, CRC(3ad41f02) SHA1(a4959113c01062003df41cdf6146e8a034917ee2) )
ROM_LOAD16_BYTE("e51-07.45", 0x000001, 0x200000, CRC(95873e46) SHA1(02504cbd920c8dbcb5abec6388305eff38f7efe0) )
ROM_LOAD ("e51-06.43", 0x600000, 0x200000, CRC(c240d6c8) SHA1(6f3b5224b7eb8783893375d432bbbfc37f81c230) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e51-13.32", 0x100000, 0x40000, CRC(3b9e3986) SHA1(26340bda0ad2ea580e2395135617966676a71ad5) )
@@ -3602,13 +3602,13 @@ ROM_START( popnpopu )
ROM_LOAD16_BYTE("e51-03.12",0x000000, 0x100000, CRC(a24c4607) SHA1(2396fa927446568ad8d98ad6756813e2f30523dd) )
ROM_LOAD16_BYTE("e51-02.8", 0x000001, 0x100000, CRC(6aa8b96c) SHA1(aaf7917dce5fed43c68cd3065538b58666ef3dbc) )
ROM_LOAD ("e51-01.4", 0x300000, 0x100000, CRC(70347e24) SHA1(6b4ab90f0209e50eac7bee3abcf40afb71ab950a) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e51-08.47", 0x000000, 0x200000, CRC(3ad41f02) SHA1(a4959113c01062003df41cdf6146e8a034917ee2) )
ROM_LOAD16_BYTE("e51-07.45", 0x000001, 0x200000, CRC(95873e46) SHA1(02504cbd920c8dbcb5abec6388305eff38f7efe0) )
ROM_LOAD ("e51-06.43", 0x600000, 0x200000, CRC(c240d6c8) SHA1(6f3b5224b7eb8783893375d432bbbfc37f81c230) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x180000, "audiocpu", 0) /* 68000 sound CPU */
ROM_LOAD16_BYTE("e51-13.32", 0x100000, 0x40000, CRC(3b9e3986) SHA1(26340bda0ad2ea580e2395135617966676a71ad5) )
@@ -3679,13 +3679,13 @@ ROM_START( landmakr )
ROM_LOAD16_BYTE("e61-03.12",0x000000, 0x200000, CRC(e8abfc46) SHA1(fbde006f9822af3ed8debec525270d329981ea21) )
ROM_LOAD16_BYTE("e61-02.08",0x000001, 0x200000, CRC(1dc4a164) SHA1(33b412d9653099aaff8ed5e62d1ba4fc30aa9058) )
ROM_LOAD ("e61-01.04",0x600000, 0x200000, CRC(6cdd8311) SHA1(7810a5a81f3b5a730d2088c79b12fffd77659b5b) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD16_BYTE("e61-09.47", 0x000000, 0x200000, CRC(6ba29987) SHA1(b63c12523e19da66b3ca07c3548ac81bf57b59a1) )
ROM_LOAD16_BYTE("e61-08.45", 0x000001, 0x200000, CRC(76c98e14) SHA1(c021c325ab4ae410fa54e2eab61d34318867432b) )
ROM_LOAD ("e61-07.43", 0x600000, 0x200000, CRC(4a57965d) SHA1(8e80788e0f47fb242da9af3aa19077dc0ec829b8) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
@@ -3720,7 +3720,7 @@ ROM_START( landmakrp )
ROM_LOAD ("obj1-2.31",0x680000, 0x080000, CRC(c2757722) SHA1(83a921647eb0375e10c7f76c08ebe66f2a6fdcd9) )
ROM_LOAD ("obj2-2.30",0x700000, 0x080000, CRC(934556ff) SHA1(aca8585680e66635b8872259cfd38edc96e92066) )
ROM_LOAD ("obj3-2.29",0x780000, 0x080000, CRC(97f0f777) SHA1(787a33b91cb262cc3983a46ba259dd9b153d532a) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
ROM_REGION(0x800000, "gfx2" , 0) /* Tiles */
ROM_LOAD32_BYTE("scr0-0.7", 0x000000, 0x080000, CRC(da6ba562) SHA1(6aefd249d3491380837e04583a0069ed9c495d05) )
@@ -3735,7 +3735,7 @@ ROM_START( landmakrp )
ROM_LOAD16_BYTE("scr0-5.2", 0x600001, 0x080000, CRC(8e1ea0fe) SHA1(aa815d1d67bf72be6a0c4076490dfd36f28a82ab) )
ROM_LOAD16_BYTE("scr1-4.15",0x700000, 0x080000, CRC(783b6d10) SHA1(eab2c7b19890c1f6c13f0062978db5b81988499b) )
ROM_LOAD16_BYTE("scr1-5.14",0x700001, 0x080000, CRC(24aba128) SHA1(b03804c738d86bfafc1f8fb91f8e77e878d2dc83) )
- ROM_FILL ( 0x400000, 0x200000, 0 )
+ ROM_FILL ( 0x400000, 0x200000, nullptr )
diff --git a/src/mame/drivers/taito_l.cpp b/src/mame/drivers/taito_l.cpp
index 8d6e6e97aa8..41e57d48498 100644
--- a/src/mame/drivers/taito_l.cpp
+++ b/src/mame/drivers/taito_l.cpp
@@ -196,47 +196,47 @@ void taitol_state::taito_machine_reset()
MACHINE_RESET_MEMBER(taitol_state,fhawk)
{
taito_machine_reset();
- m_porte0_tag = NULL;
- m_porte1_tag = NULL;
- m_portf0_tag = NULL;
- m_portf1_tag = NULL;
+ m_porte0_tag = nullptr;
+ m_porte1_tag = nullptr;
+ m_portf0_tag = nullptr;
+ m_portf1_tag = nullptr;
}
MACHINE_RESET_MEMBER(taitol_state,raimais)
{
taito_machine_reset();
- m_porte0_tag = NULL;
- m_porte1_tag = NULL;
- m_portf0_tag = NULL;
- m_portf1_tag = NULL;
+ m_porte0_tag = nullptr;
+ m_porte1_tag = nullptr;
+ m_portf0_tag = nullptr;
+ m_portf1_tag = nullptr;
}
MACHINE_RESET_MEMBER(taitol_state,champwr)
{
taito_machine_reset();
- m_porte0_tag = NULL;
- m_porte1_tag = NULL;
- m_portf0_tag = NULL;
- m_portf1_tag = NULL;
+ m_porte0_tag = nullptr;
+ m_porte1_tag = nullptr;
+ m_portf0_tag = nullptr;
+ m_portf1_tag = nullptr;
}
MACHINE_RESET_MEMBER(taitol_state,kurikint)
{
taito_machine_reset();
- m_porte0_tag = NULL;
- m_porte1_tag = NULL;
- m_portf0_tag = NULL;
- m_portf1_tag = NULL;
+ m_porte0_tag = nullptr;
+ m_porte1_tag = nullptr;
+ m_portf0_tag = nullptr;
+ m_portf1_tag = nullptr;
}
MACHINE_RESET_MEMBER(taitol_state,evilston)
{
taito_machine_reset();
- m_porte0_tag = NULL;
- m_porte1_tag = NULL;
- m_portf0_tag = NULL;
- m_portf1_tag = NULL;
+ m_porte0_tag = nullptr;
+ m_porte1_tag = nullptr;
+ m_portf0_tag = nullptr;
+ m_portf1_tag = nullptr;
}
MACHINE_RESET_MEMBER(taitol_state,puzznic)
@@ -261,18 +261,18 @@ MACHINE_RESET_MEMBER(taitol_state,palamed)
{
taito_machine_reset();
m_porte0_tag = "DSWA";
- m_porte1_tag = NULL;
+ m_porte1_tag = nullptr;
m_portf0_tag = "DSWB";
- m_portf1_tag = NULL;
+ m_portf1_tag = nullptr;
}
MACHINE_RESET_MEMBER(taitol_state,cachat)
{
taito_machine_reset();
m_porte0_tag = "DSWA";
- m_porte1_tag = NULL;
+ m_porte1_tag = nullptr;
m_portf0_tag = "DSWB";
- m_portf1_tag = NULL;
+ m_portf1_tag = nullptr;
}
MACHINE_RESET_MEMBER(taitol_state,horshoes)
@@ -409,7 +409,7 @@ WRITE8_MEMBER(taitol_state::rambankswitch_w)
else
{
logerror("unknown rambankswitch %d, %02x (%04x)\n", offset, data, space.device().safe_pc());
- m_current_notifier[offset] = 0;
+ m_current_notifier[offset] = nullptr;
m_current_base[offset] = m_empty_ram;
}
membank(bankname[offset])->set_base(m_current_base[offset]);
@@ -1700,7 +1700,7 @@ static const gfx_layout char_layout =
static GFXDECODE_START( taito_l )
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
diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp
index b86595aa6a6..2d6460b2afc 100644
--- a/src/mame/drivers/taitosj.cpp
+++ b/src/mame/drivers/taitosj.cpp
@@ -1607,7 +1607,7 @@ static INPUT_PORTS_START( kikstart )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("IN3") /* Service */
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)0)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)nullptr)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* needs to be 0, otherwise cannot shift */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE1 )
@@ -1703,10 +1703,10 @@ static const gfx_layout spritelayout =
static GFXDECODE_START( taitosj )
- GFXDECODE_ENTRY( NULL, 0x9000, charlayout, 0, 8 ) /* the game dynamically modifies this */
- GFXDECODE_ENTRY( NULL, 0x9000, spritelayout, 0, 8 ) /* the game dynamically modifies this */
- GFXDECODE_ENTRY( NULL, 0xa800, charlayout, 0, 8 ) /* the game dynamically modifies this */
- GFXDECODE_ENTRY( NULL, 0xa800, spritelayout, 0, 8 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x9000, charlayout, 0, 8 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0x9000, spritelayout, 0, 8 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0xa800, charlayout, 0, 8 ) /* the game dynamically modifies this */
+ GFXDECODE_ENTRY( nullptr, 0xa800, spritelayout, 0, 8 ) /* the game dynamically modifies this */
GFXDECODE_END
diff --git a/src/mame/drivers/taitotz.cpp b/src/mame/drivers/taitotz.cpp
index 3d8829db0a5..2acde2b420a 100644
--- a/src/mame/drivers/taitotz.cpp
+++ b/src/mame/drivers/taitotz.cpp
@@ -2628,7 +2628,7 @@ INPUT_PORTS_END
void taitotz_state::machine_reset()
{
- if (m_hdd_serial_number != NULL)
+ if (m_hdd_serial_number != nullptr)
{
ide_hdd_device *hdd = m_ata->subdevice<ata_slot_device>("0")->subdevice<ide_hdd_device>("hdd");
UINT16 *identify_device = hdd->identify_device_buffer();
@@ -2680,7 +2680,7 @@ static MACHINE_CONFIG_START( taitotz, taitotz_state )
MCFG_QUANTUM_TIME(attotime::from_hz(120))
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(taitotz_state, ide_interrupt))
MCFG_NVRAM_ADD_0FILL("nvram")
@@ -2746,7 +2746,7 @@ DRIVER_INIT_MEMBER(taitotz_state,batlgear)
init_taitotz_111a();
// unknown, not used by BIOS 1.11a
- m_hdd_serial_number = NULL;
+ m_hdd_serial_number = nullptr;
m_scr_base = 0x1c0000;
@@ -2780,7 +2780,7 @@ DRIVER_INIT_MEMBER(taitotz_state,pwrshovl)
init_taitotz_111a();
// unknown, not used by BIOS 1.11a
- m_hdd_serial_number = NULL;
+ m_hdd_serial_number = nullptr;
m_scr_base = 0x1c0000;
diff --git a/src/mame/drivers/taitowlf.cpp b/src/mame/drivers/taitowlf.cpp
index 24f8d5ef1be..8f2f0387fec 100644
--- a/src/mame/drivers/taitowlf.cpp
+++ b/src/mame/drivers/taitowlf.cpp
@@ -373,8 +373,8 @@ static MACHINE_CONFIG_START( taitowlf, taitowlf_state )
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, intel82439tx_pci_r, intel82439tx_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(7, nullptr, intel82371ab_pci_r, intel82371ab_pci_w)
MCFG_FRAGMENT_ADD( pcat_common )
diff --git a/src/mame/drivers/tandy1t.cpp b/src/mame/drivers/tandy1t.cpp
index 88acf29a4a6..3ba893c7610 100644
--- a/src/mame/drivers/tandy1t.cpp
+++ b/src/mame/drivers/tandy1t.cpp
@@ -297,11 +297,11 @@ READ8_MEMBER(tandy1000_state::tandy1000_pio_r)
void tandy1000_state::tandy1000_set_bios_bank()
{
- UINT8 *p = NULL;
+ UINT8 *p = nullptr;
- assert( m_romcs0 != NULL );
- assert( m_romcs1 != NULL );
- assert( m_biosbank != NULL );
+ assert( m_romcs0 != nullptr );
+ assert( m_romcs1 != nullptr );
+ assert( m_biosbank != nullptr );
if ( m_tandy_bios_bank & 0x10 )
{
@@ -590,17 +590,17 @@ static MACHINE_CONFIG_START( t1000hx, tandy1000_state )
MCFG_FRAGMENT_ADD(tandy1000_common)
// plus cards are isa with a nonstandard conntector
- MCFG_ISA8_SLOT_ADD("mb:isa", "plus1", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "plus1", pc_isa8_cards, nullptr, false)
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( t1000sx, t1000hx )
MCFG_DEVICE_MODIFY("isa_fdc")
MCFG_SLOT_OPTION_MACHINE_CONFIG("fdc_xt", cfg_fdc_525)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, nullptr, false)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("disk_list","ibm5150")
@@ -622,10 +622,10 @@ static MACHINE_CONFIG_DERIVED( t1000_16_8, t1000_16 )
MCFG_CPU_MODIFY( "maincpu" )
MCFG_CPU_CLOCK( XTAL_24MHz / 3 )
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, nullptr, false)
MACHINE_CONFIG_END
static MACHINE_CONFIG_START( t1000_286, tandy1000_state )
@@ -636,11 +636,11 @@ static MACHINE_CONFIG_START( t1000_286, tandy1000_state )
MCFG_FRAGMENT_ADD(tandy1000_common)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false)
- MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, nullptr, false)
+ MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, nullptr, false)
MACHINE_CONFIG_END
#ifdef UNUSED_DEFINITION
diff --git a/src/mame/drivers/tandy2k.cpp b/src/mame/drivers/tandy2k.cpp
index 4fca7d9d1f3..d88f3120b98 100644
--- a/src/mame/drivers/tandy2k.cpp
+++ b/src/mame/drivers/tandy2k.cpp
@@ -822,7 +822,7 @@ static MACHINE_CONFIG_START( tandy2k, tandy2k_state )
MCFG_I8251_RXRDY_HANDLER(WRITELINE(tandy2k_state, rxrdy_w))
MCFG_I8251_TXRDY_HANDLER(WRITELINE(tandy2k_state, txrdy_w))
- 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(I8251A_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251A_TAG, i8251_device, write_dsr))
// TODO pin 15 external transmit clock
diff --git a/src/mame/drivers/tankbatt.cpp b/src/mame/drivers/tankbatt.cpp
index 4757c1469da..dabda547e02 100644
--- a/src/mame/drivers/tankbatt.cpp
+++ b/src/mame/drivers/tankbatt.cpp
@@ -275,7 +275,7 @@ static const char *const tankbatt_sample_names[] =
"engine1",
"engine2",
"explode1",
- 0 /* end of array */
+ nullptr /* end of array */
};
diff --git a/src/mame/drivers/tatsumi.cpp b/src/mame/drivers/tatsumi.cpp
index 192e4e1ec0c..6d3056d6e77 100644
--- a/src/mame/drivers/tatsumi.cpp
+++ b/src/mame/drivers/tatsumi.cpp
@@ -832,7 +832,7 @@ GFXDECODE_END
static GFXDECODE_START( roundup5 )
GFXDECODE_ENTRY( "gfx1", 0, spritelayout, 1024, 256)
- GFXDECODE_ENTRY( NULL, 0, roundup5_vramlayout, 0, 16)
+ GFXDECODE_ENTRY( nullptr, 0, roundup5_vramlayout, 0, 16)
GFXDECODE_END
static GFXDECODE_START( cyclwarr )
diff --git a/src/mame/drivers/tavernie.cpp b/src/mame/drivers/tavernie.cpp
index c1ea74dc14d..4733eacb843 100644
--- a/src/mame/drivers/tavernie.cpp
+++ b/src/mame/drivers/tavernie.cpp
@@ -192,7 +192,7 @@ SLOT_INTERFACE_END
// can support 3 drives
WRITE8_MEMBER( tavernie_state::ds_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if ((data & 3) == 1) floppy = m_floppy0->get_device();
//if ((data & 3) == 2) floppy = m_floppy1->get_device();
//if ((data & 3) == 3) floppy = m_floppy2->get_device();
diff --git a/src/mame/drivers/tecnbras.cpp b/src/mame/drivers/tecnbras.cpp
index 5e1b7870e38..a3e70591dda 100644
--- a/src/mame/drivers/tecnbras.cpp
+++ b/src/mame/drivers/tecnbras.cpp
@@ -60,9 +60,9 @@ ADDRESS_MAP_END
DRIVER_INIT_MEMBER( tecnbras_state, tecnbras )
{
m_xcoord = 0;
- for (int x=0; x<14; x++){
+ for (auto & elem : m_digit){
for (int y=0; y<7; y++){
- m_digit[x][y] = 0;
+ elem[y] = 0;
}
}
}
diff --git a/src/mame/drivers/thayers.cpp b/src/mame/drivers/thayers.cpp
index 26db8693aef..c481ae0c3b5 100644
--- a/src/mame/drivers/thayers.cpp
+++ b/src/mame/drivers/thayers.cpp
@@ -382,8 +382,8 @@ READ8_MEMBER(thayers_state::dsw_b_r)
READ8_MEMBER(thayers_state::laserdsc_data_r)
{
- if (m_ldv1000 != NULL) return m_ldv1000->status_r();
- if (m_pr7820 != NULL) return m_pr7820->data_r();
+ if (m_ldv1000 != nullptr) return m_ldv1000->status_r();
+ if (m_pr7820 != nullptr) return m_pr7820->data_r();
return 0;
}
@@ -413,12 +413,12 @@ WRITE8_MEMBER(thayers_state::laserdsc_control_w)
if (BIT(data, 5))
{
- if (m_ldv1000 != NULL)
+ if (m_ldv1000 != nullptr)
{
m_ldv1000->data_w(m_laserdisc_data);
m_ldv1000->enter_w(BIT(data, 7) ? CLEAR_LINE : ASSERT_LINE);
}
- if (m_pr7820 != NULL)
+ if (m_pr7820 != nullptr)
{
m_pr7820->data_w(m_laserdisc_data);
m_pr7820_enter = BIT(data, 6) ? CLEAR_LINE : ASSERT_LINE;
@@ -627,15 +627,15 @@ ADDRESS_MAP_END
CUSTOM_INPUT_MEMBER(thayers_state::laserdisc_enter_r)
{
- if (m_pr7820 != NULL) return m_pr7820_enter;
- if (m_ldv1000 != NULL) return (m_ldv1000->status_strobe_r() == ASSERT_LINE) ? 0 : 1;
+ if (m_pr7820 != nullptr) return m_pr7820_enter;
+ if (m_ldv1000 != nullptr) return (m_ldv1000->status_strobe_r() == ASSERT_LINE) ? 0 : 1;
return 0;
}
CUSTOM_INPUT_MEMBER(thayers_state::laserdisc_ready_r)
{
- if (m_pr7820 != NULL) return (m_pr7820->ready_r() == ASSERT_LINE) ? 0 : 1;
- if (m_ldv1000 != NULL) return (m_ldv1000->command_strobe_r() == ASSERT_LINE) ? 0 : 1;
+ if (m_pr7820 != nullptr) return (m_pr7820->ready_r() == ASSERT_LINE) ? 0 : 1;
+ if (m_ldv1000 != nullptr) return (m_ldv1000->command_strobe_r() == ASSERT_LINE) ? 0 : 1;
return 0;
}
diff --git a/src/mame/drivers/thief.cpp b/src/mame/drivers/thief.cpp
index 960fdd08614..86ba9f5eae9 100644
--- a/src/mame/drivers/thief.cpp
+++ b/src/mame/drivers/thief.cpp
@@ -385,7 +385,7 @@ static const char *const sharkatt_sample_names[] =
"*sharkatt",
"talk",
"crash",
- 0 /* end of array */
+ nullptr /* end of array */
};
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -395,7 +395,7 @@ static const char *const thief_sample_names[] =
"*thief",
"talk",
"crash",
- 0 /* end of array */
+ nullptr /* end of array */
};
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
@@ -405,7 +405,7 @@ static const char *const natodef_sample_names[] =
"*natodef",
"talk",
"crash",
- 0 /* end of array */
+ nullptr /* end of array */
};
diff --git a/src/mame/drivers/thomson.cpp b/src/mame/drivers/thomson.cpp
index f8a9a301e3a..dc906e196ce 100644
--- a/src/mame/drivers/thomson.cpp
+++ b/src/mame/drivers/thomson.cpp
@@ -591,7 +591,7 @@ static const floppy_interface thomson_floppy_interface =
{
FLOPPY_STANDARD_5_25_DSHD,
LEGACY_FLOPPY_OPTIONS_NAME(thomson),
- NULL
+ nullptr
};
FLOPPY_FORMATS_MEMBER( thomson_state::cd90_640_formats )
@@ -708,7 +708,7 @@ static MACHINE_CONFIG_START( to7, thomson_state )
MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_txd))
/// 2400 7N2
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("acia", mos6551_device, write_rxd))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("acia", mos6551_device, write_dcd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("acia", mos6551_device, write_dsr))
diff --git a/src/mame/drivers/ti99_4p.cpp b/src/mame/drivers/ti99_4p.cpp
index 7122ab40a05..b1d4aea0f51 100644
--- a/src/mame/drivers/ti99_4p.cpp
+++ b/src/mame/drivers/ti99_4p.cpp
@@ -272,7 +272,7 @@ INPUT_PORTS_END
READ16_MEMBER( ti99_4p_state::memread )
{
int addroff = offset << 1;
- if (m_rom0 == NULL) return 0; // premature access
+ if (m_rom0 == nullptr) return 0; // premature access
UINT16 zone = addroff & 0xe000;
UINT16 value = 0;
diff --git a/src/mame/drivers/ti99_4x.cpp b/src/mame/drivers/ti99_4x.cpp
index 0e647f2f2cd..2d9e11f4dc2 100644
--- a/src/mame/drivers/ti99_4x.cpp
+++ b/src/mame/drivers/ti99_4x.cpp
@@ -769,28 +769,28 @@ WRITE_LINE_MEMBER( ti99_4x_state::notconnected )
*/
static const dmux_device_list_entry dmux_devices[] =
{
- { VIDEO_SYSTEM_TAG, 0x8800, 0xfc01, 0x0400, NULL, 0, 0 },
+ { VIDEO_SYSTEM_TAG, 0x8800, 0xfc01, 0x0400, nullptr, 0, 0 },
{ GROM0_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
{ GROM1_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
{ GROM2_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
- { TISOUND_TAG, 0x8400, 0xfc01, 0x0000, NULL, 0, 0 },
- { GROMPORT_TAG, 0x9800, 0xfc01, 0x0400, NULL, 0, 0 },
- { GROMPORT_TAG, 0x6000, 0xe000, 0x0000, NULL, 0, 0 },
- { PERIBOX_TAG, 0x0000, 0x0000, 0x0000, NULL, 0, 0 }, // Peribox needs all addresses
- { NULL, 0, 0, 0, NULL, 0, 0 }
+ { TISOUND_TAG, 0x8400, 0xfc01, 0x0000, nullptr, 0, 0 },
+ { GROMPORT_TAG, 0x9800, 0xfc01, 0x0400, nullptr, 0, 0 },
+ { GROMPORT_TAG, 0x6000, 0xe000, 0x0000, nullptr, 0, 0 },
+ { PERIBOX_TAG, 0x0000, 0x0000, 0x0000, nullptr, 0, 0 }, // Peribox needs all addresses
+ { nullptr, 0, 0, 0, nullptr, 0, 0 }
};
static const dmux_device_list_entry dmux_devices_ev[] =
{
- { VIDEO_SYSTEM_TAG, 0x8800, 0xfc01, 0x0400, NULL, 0, 0 },
+ { VIDEO_SYSTEM_TAG, 0x8800, 0xfc01, 0x0400, nullptr, 0, 0 },
{ GROM0_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
{ GROM1_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
{ GROM2_TAG, 0x9800, 0xfc01, 0x0400, "GROMENA", 0x01, 0x00 },
- { TISOUND_TAG, 0x8400, 0xfc01, 0x0000, NULL, 0, 0 },
- { GROMPORT_TAG, 0x9800, 0xfc01, 0x0400, NULL, 0, 0 },
- { GROMPORT_TAG, 0x6000, 0xe000, 0x0000, NULL, 0, 0 },
- { PERIBOX_TAG, 0x0000, 0x0000, 0x0000, NULL, 0, 0 }, // Peribox needs all addresses
- { NULL, 0, 0, 0, NULL, 0, 0 }
+ { TISOUND_TAG, 0x8400, 0xfc01, 0x0000, nullptr, 0, 0 },
+ { GROMPORT_TAG, 0x9800, 0xfc01, 0x0400, nullptr, 0, 0 },
+ { GROMPORT_TAG, 0x6000, 0xe000, 0x0000, nullptr, 0, 0 },
+ { PERIBOX_TAG, 0x0000, 0x0000, 0x0000, nullptr, 0, 0 }, // Peribox needs all addresses
+ { nullptr, 0, 0, 0, nullptr, 0, 0 }
};
static DMUX_CONFIG( datamux_conf )
diff --git a/src/mame/drivers/ti99_8.cpp b/src/mame/drivers/ti99_8.cpp
index eeaacff3591..278682f9bf2 100644
--- a/src/mame/drivers/ti99_8.cpp
+++ b/src/mame/drivers/ti99_8.cpp
@@ -933,7 +933,7 @@ static const mapper8_list_entry mapper_devices[] =
{ INTSNAME, PHYSIC, STOP, 0xffe000, 0xfffff0, 0x000000 }, // ffe000-ffe00f Interrupt level sense
{ PERIBOX_TAG, PHYSIC, STOP, 0x000000, 0x000000, 0x000000 }, // Peripheral Expansion Box
- { NULL, 0, 0, 0, 0, 0 }
+ { nullptr, 0, 0, 0, 0, 0 }
};
static MAPPER8_CONFIG( mapper_conf )
@@ -1111,10 +1111,10 @@ ROM_START(ti99_8)
// Built-in RAM
ROM_REGION(SRAM_SIZE, SRAM_TAG, 0)
- ROM_FILL(0x0000, SRAM_SIZE, 0x00)
+ ROM_FILL(0x0000, SRAM_SIZE, nullptr)
ROM_REGION(DRAM_SIZE, DRAM_TAG, 0)
- ROM_FILL(0x0000, DRAM_SIZE, 0x00)
+ ROM_FILL(0x0000, DRAM_SIZE, nullptr)
ROM_END
#define rom_ti99_8e rom_ti99_8
diff --git a/src/mame/drivers/tiamc1.cpp b/src/mame/drivers/tiamc1.cpp
index 7fcebb77877..7ef89edea64 100644
--- a/src/mame/drivers/tiamc1.cpp
+++ b/src/mame/drivers/tiamc1.cpp
@@ -216,7 +216,7 @@ static const gfx_layout char_layout =
};
static GFXDECODE_START( tiamc1 )
- GFXDECODE_ENTRY( NULL, 0x0000, char_layout, 0, 16 )
+ GFXDECODE_ENTRY( nullptr, 0x0000, char_layout, 0, 16 )
GFXDECODE_ENTRY( "gfx1", 0x0000, sprites16x16_layout, 0, 16 )
GFXDECODE_END
@@ -258,7 +258,7 @@ ROM_START( konek )
ROM_LOAD( "g3.d17", 0x04000, 0x2000, CRC(91301282) SHA1(cb448a1bb7a9c1768f870a8c062e37807431c9c7) )
ROM_LOAD( "g4.d17", 0x06000, 0x2000, CRC(3ff0c20b) SHA1(3d999c05b3986149e569630779ed5581fc202842) )
ROM_LOAD( "g5.d17", 0x08000, 0x2000, CRC(e3196d30) SHA1(a03d9f75926be9fcf5ee05df8b00fbf87361ea5b) )
- ROM_FILL( 0xa000, 0x2000, 0x00 ) /* g6.d17 is unpopulated */
+ ROM_FILL( 0xa000, 0x2000, nullptr ) /* g6.d17 is unpopulated */
ROM_LOAD( "g7.d17", 0x0c000, 0x2000, CRC(fe4e9fdd) SHA1(2033585a6c53455d1dafee85cbb807d424ed231d) )
ROM_REGION( 0x8000, "gfx1", 0 )
@@ -283,7 +283,7 @@ ROM_START( sosterm )
ROM_LOAD( "06.3g", 0x04000, 0x2000, CRC(34dacde6) SHA1(6c91e4dc1d3c85768a94fb4c7d38f29c23664740) )
ROM_LOAD( "07.4g", 0x06000, 0x2000, CRC(9f6f8cdd) SHA1(3fa3928935d98906fdf07ed372764456d7a9729a) )
ROM_LOAD( "08.5g", 0x08000, 0x2000, CRC(25e70da4) SHA1(ec77b0b79c0477c0939022d7f2a24ae48e4530bf) )
- ROM_FILL( 0xa000, 0x2000, 0x00 ) /* 09.6g is unpopulated */
+ ROM_FILL( 0xa000, 0x2000, nullptr ) /* 09.6g is unpopulated */
ROM_LOAD( "10.7g", 0x0c000, 0x2000, CRC(22bc9997) SHA1(fd638529e29d9fd32dd22534cb748841dde9a2c3) )
ROM_REGION( 0x8000, "gfx1", 0 )
@@ -301,7 +301,7 @@ ROM_START( koroleva )
ROM_LOAD( "06.3g", 0x04000, 0x2000, CRC(48074786) SHA1(145749053cd00c8547024c9afe3ab0ff7d8f5ff9) )
ROM_LOAD( "07.4g", 0x06000, 0x2000, CRC(41a4adb5) SHA1(cdbdf6884307dd0f1fc991e6e1bc4c4fdc351ab1) )
ROM_LOAD( "08.5g", 0x08000, 0x2000, CRC(8f379d95) SHA1(0ea70bc14c52b1f4b38b0d14e4249252a2577f2a) )
- ROM_FILL( 0xa000, 0x2000, 0x00 ) /* 09.6g is unpopulated */
+ ROM_FILL( 0xa000, 0x2000, nullptr ) /* 09.6g is unpopulated */
ROM_LOAD( "10.7g", 0x0c000, 0x2000, CRC(397f41f8) SHA1(2d07462afad39dda067114ce8d47e64d6a854283) )
ROM_REGION( 0x8000, "gfx1", 0 )
@@ -316,10 +316,10 @@ ROM_START( bilyard )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "04.1g", 0x00000, 0x2000, CRC(a44f913d) SHA1(f01a0e931fb0f719bc7b3f1ca7802dd747c8a56f) )
ROM_LOAD( "05.2g", 0x02000, 0x2000, CRC(6e41219f) SHA1(b09a16c9bd48b503ec0f2c636f021199d7ac7924) )
- ROM_FILL( 0x04000, 0x2000, 0x00 ) /* 06.3g is unpopulated */
- ROM_FILL( 0x06000, 0x2000, 0x00 ) /* 07.4g is unpopulated */
- ROM_FILL( 0x08000, 0x2000, 0x00 ) /* 08.5g is unpopulated */
- ROM_FILL( 0x0a000, 0x2000, 0x00 ) /* 09.6g is unpopulated */
+ ROM_FILL( 0x04000, 0x2000, nullptr ) /* 06.3g is unpopulated */
+ ROM_FILL( 0x06000, 0x2000, nullptr ) /* 07.4g is unpopulated */
+ ROM_FILL( 0x08000, 0x2000, nullptr ) /* 08.5g is unpopulated */
+ ROM_FILL( 0x0a000, 0x2000, nullptr ) /* 09.6g is unpopulated */
ROM_LOAD( "10.7g", 0x0c000, 0x2000, CRC(173adb85) SHA1(53f27b45e61365907e8996c283ae70ca5b498129) )
ROM_REGION( 0x8000, "gfx1", 0 )
diff --git a/src/mame/drivers/tiki100.cpp b/src/mame/drivers/tiki100.cpp
index b9da9b4f8b4..990a4194986 100644
--- a/src/mame/drivers/tiki100.cpp
+++ b/src/mame/drivers/tiki100.cpp
@@ -273,7 +273,7 @@ WRITE8_MEMBER( tiki100_state::system_w )
*/
// drive select
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -655,7 +655,7 @@ static const z80_daisy_config tiki100_daisy_chain[] =
{ "slot1" },
{ "slot2" },
{ "slot3" },
- { NULL }
+ { nullptr }
};
TIMER_DEVICE_CALLBACK_MEMBER( tiki100_state::tape_tick )
@@ -722,7 +722,7 @@ static MACHINE_CONFIG_START( tiki100, tiki100_state )
MCFG_TIKI100_BUS_OUT_MREQ_CALLBACK(WRITE8(tiki100_state, mrq_w))
MCFG_TIKI100_BUS_SLOT_ADD("slot1", "8088")
MCFG_TIKI100_BUS_SLOT_ADD("slot2", "hdc")
- MCFG_TIKI100_BUS_SLOT_ADD("slot3", NULL)
+ MCFG_TIKI100_BUS_SLOT_ADD("slot3", nullptr)
/* devices */
MCFG_Z80DART_ADD(Z80DART_TAG, XTAL_8MHz/4, 0, 0, 0, 0 )
@@ -753,10 +753,10 @@ static MACHINE_CONFIG_START( tiki100, tiki100_state )
MCFG_FLOPPY_DRIVE_ADD(FD1797_TAG":0", tiki100_floppies, "525qd", tiki100_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(FD1797_TAG":1", tiki100_floppies, "525qd", tiki100_state::floppy_formats)
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80DART_TAG, z80dart_device, rxb_w))
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
diff --git a/src/mame/drivers/tim011.cpp b/src/mame/drivers/tim011.cpp
index 005efa249a2..a98ef46f7a3 100644
--- a/src/mame/drivers/tim011.cpp
+++ b/src/mame/drivers/tim011.cpp
@@ -117,7 +117,7 @@ static const floppy_format_type tim011_floppy_formats[] = {
FLOPPY_IMD_FORMAT,
FLOPPY_MFI_FORMAT,
FLOPPY_MFM_FORMAT,
- NULL
+ nullptr
};
static MACHINE_CONFIG_START( tim011,tim011_state )
diff --git a/src/mame/drivers/timex.cpp b/src/mame/drivers/timex.cpp
index ad12202fae0..ee30790defb 100644
--- a/src/mame/drivers/timex.cpp
+++ b/src/mame/drivers/timex.cpp
@@ -595,7 +595,7 @@ DEVICE_IMAGE_LOAD_MEMBER( spectrum_state, timex_cart )
{
UINT32 size = m_dock->common_get_size("rom");
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
UINT8 *DOCK;
int chunks_in_file = 0;
@@ -607,7 +607,7 @@ DEVICE_IMAGE_LOAD_MEMBER( spectrum_state, timex_cart )
image.seterror(IMAGE_ERROR_UNSPECIFIED, "File corrupted");
return IMAGE_INIT_FAIL;
}
- if (image.software_entry() != NULL)
+ if (image.software_entry() != nullptr)
{
image.seterror(IMAGE_ERROR_UNSPECIFIED, "Loading from softlist is not supported yet");
return IMAGE_INIT_FAIL;
diff --git a/src/mame/drivers/tispeak.cpp b/src/mame/drivers/tispeak.cpp
index 261f189ed1a..92869018edb 100644
--- a/src/mame/drivers/tispeak.cpp
+++ b/src/mame/drivers/tispeak.cpp
@@ -432,7 +432,7 @@ void tispeak_state::init_cartridge()
{
m_overlay = 0;
- if (m_cart != NULL && m_cart->exists())
+ if (m_cart != nullptr && m_cart->exists())
{
std::string region_tag;
memory_region *src = memregion(region_tag.assign(m_cart->tag()).append(GENERIC_ROM_REGION_TAG).c_str());
diff --git a/src/mame/drivers/tk2000.cpp b/src/mame/drivers/tk2000.cpp
index 6a5cd4a276c..f4fc8ac2730 100644
--- a/src/mame/drivers/tk2000.cpp
+++ b/src/mame/drivers/tk2000.cpp
@@ -119,7 +119,7 @@ void tk2000_state::machine_start()
// setup video pointers
m_video->m_ram_ptr = m_ram_ptr;
m_video->m_aux_ptr = m_ram_ptr;
- m_video->m_char_ptr = NULL;
+ m_video->m_char_ptr = nullptr;
m_video->m_char_size = 0;
}
diff --git a/src/mame/drivers/tm990189.cpp b/src/mame/drivers/tm990189.cpp
index f6c778dd305..e478c7cb997 100644
--- a/src/mame/drivers/tm990189.cpp
+++ b/src/mame/drivers/tm990189.cpp
@@ -441,9 +441,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return ""; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
diff --git a/src/mame/drivers/tmaster.cpp b/src/mame/drivers/tmaster.cpp
index 2d0ae72cf60..d4183a8b242 100644
--- a/src/mame/drivers/tmaster.cpp
+++ b/src/mame/drivers/tmaster.cpp
@@ -1739,7 +1739,7 @@ ROM_START( galgbios )
GALGAMES_BIOS_ROMS
ROM_REGION( 0x200000, "blitter", 0 )
- ROM_COPY( "maincpu", 0, 0, 0x200000 )
+ ROM_COPY( "maincpu", nullptr, 0, 0x200000 )
ROM_REGION( 0x40000, "oki", ROMREGION_ERASE )
// RAM, filled by the 68000 and fed to the OKI
@@ -1772,7 +1772,7 @@ ROM_START( galgame2 )
ROM_LOAD( "namco.u4", 0x000, 0x9db, CRC(63ec1224) SHA1(2966b2aa431e6b8d46cbba18a6fc4de7395caa04) )
ROM_REGION( 0x200000 * 2, "blitter", 0 )
- ROM_COPY( "maincpu", 0, 0, 0x200000 * 2 )
+ ROM_COPY( "maincpu", nullptr, 0, 0x200000 * 2 )
ROM_REGION( 0x40000, "oki", ROMREGION_ERASE )
// RAM, filled by the 68000 and fed to the OKI
diff --git a/src/mame/drivers/toaplan2.cpp b/src/mame/drivers/toaplan2.cpp
index 90bea610ee6..e12b8796e75 100644
--- a/src/mame/drivers/toaplan2.cpp
+++ b/src/mame/drivers/toaplan2.cpp
@@ -378,7 +378,7 @@ MACHINE_START_MEMBER(toaplan2_state,toaplan2)
WRITE_LINE_MEMBER(toaplan2_state::toaplan2_reset)
{
- if (m_audiocpu != NULL)
+ if (m_audiocpu != nullptr)
m_audiocpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
@@ -3057,7 +3057,7 @@ static const gfx_layout fixeightblayout =
};
static GFXDECODE_START( truxton2 )
- GFXDECODE_ENTRY( NULL, 0, truxton2_tx_tilelayout, 64*16, 64 )
+ GFXDECODE_ENTRY( nullptr, 0, truxton2_tx_tilelayout, 64*16, 64 )
GFXDECODE_END
static GFXDECODE_START( raizing )
@@ -3065,7 +3065,7 @@ static GFXDECODE_START( raizing )
GFXDECODE_END
static GFXDECODE_START( batrider )
- GFXDECODE_ENTRY( NULL, 0, batrider_tx_tilelayout, 64*16, 64 )
+ GFXDECODE_ENTRY( nullptr, 0, batrider_tx_tilelayout, 64*16, 64 )
GFXDECODE_END
static GFXDECODE_START( fixeightbl )
diff --git a/src/mame/drivers/topspeed.cpp b/src/mame/drivers/topspeed.cpp
index 524dfd5b96c..74c44cfd8df 100644
--- a/src/mame/drivers/topspeed.cpp
+++ b/src/mame/drivers/topspeed.cpp
@@ -313,7 +313,7 @@ WRITE8_MEMBER(topspeed_state::msm5205_command_w)
WRITE8_MEMBER(topspeed_state::volume_w)
{
// The volume is controlled by two Taito TC0060DCA hybrid volume modules
- filter_volume_device *filter = NULL;
+ filter_volume_device *filter = nullptr;
switch (offset)
{
diff --git a/src/mame/drivers/triforce.cpp b/src/mame/drivers/triforce.cpp
index ed68898359f..170ae357979 100644
--- a/src/mame/drivers/triforce.cpp
+++ b/src/mame/drivers/triforce.cpp
@@ -579,7 +579,7 @@ static MACHINE_CONFIG_START( triforce_base, triforce_state )
MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( triforcegd, triforce_base )
- MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", ":pic", NULL, NOOP)
+ MCFG_NAOMI_GDROM_BOARD_ADD("rom_board", ":gdrom", ":pic", nullptr, NOOP)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/trs80m2.cpp b/src/mame/drivers/trs80m2.cpp
index 7aa50ad6dfd..9c84301cc74 100644
--- a/src/mame/drivers/trs80m2.cpp
+++ b/src/mame/drivers/trs80m2.cpp
@@ -132,7 +132,7 @@ WRITE8_MEMBER( trs80m2_state::drvslt_w )
*/
// drive select
- m_floppy = NULL;
+ m_floppy = nullptr;
if (!BIT(data, 0)) m_floppy = m_floppy0->get_device();
if (!BIT(data, 1)) m_floppy = m_floppy1->get_device();
@@ -629,7 +629,7 @@ static const z80_daisy_config trs80m2_daisy_chain[] =
{ Z80SIO_TAG },
{ Z80DMA_TAG },
{ Z80PIO_TAG },
- { NULL }
+ { nullptr }
};
//**************************************************************************
@@ -727,9 +727,9 @@ static MACHINE_CONFIG_START( trs80m2, trs80m2_state )
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITE8(Z80PIO_TAG, z80pio_device, pa_w))
MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE(Z80DMA_TAG, z80dma_device, rdy_w))
MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":0", trs80m2_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":1", trs80m2_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":2", trs80m2_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":3", trs80m2_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":1", trs80m2_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":2", trs80m2_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":3", trs80m2_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_DEVICE_ADD(Z80CTC_TAG, Z80CTC, XTAL_8MHz/2)
MCFG_Z80CTC_INTR_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
@@ -817,9 +817,9 @@ static MACHINE_CONFIG_START( trs80m16, trs80m16_state )
MCFG_WD_FDC_INTRQ_CALLBACK(DEVWRITE8(Z80PIO_TAG, z80pio_device, pa_w))
MCFG_WD_FDC_DRQ_CALLBACK(DEVWRITELINE(Z80DMA_TAG, z80dma_device, rdy_w))
MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":0", trs80m2_floppies, "8dsdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":1", trs80m2_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":2", trs80m2_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":3", trs80m2_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":1", trs80m2_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":2", trs80m2_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(FD1791_TAG":3", trs80m2_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_DEVICE_ADD(Z80CTC_TAG, Z80CTC, XTAL_8MHz/2)
MCFG_Z80CTC_INTR_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
diff --git a/src/mame/drivers/trvmadns.cpp b/src/mame/drivers/trvmadns.cpp
index fdf3f241261..85a489ea832 100644
--- a/src/mame/drivers/trvmadns.cpp
+++ b/src/mame/drivers/trvmadns.cpp
@@ -294,7 +294,7 @@ static const gfx_layout charlayout =
};
static GFXDECODE_START( trvmadns )
- GFXDECODE_ENTRY( NULL, 0x6000, charlayout, 0, 4 ) // doesn't matter where we point this, all the tiles are decoded while the game runs
+ GFXDECODE_ENTRY( nullptr, 0x6000, charlayout, 0, 4 ) // doesn't matter where we point this, all the tiles are decoded while the game runs
GFXDECODE_END
TILE_GET_INFO_MEMBER(trvmadns_state::get_bg_tile_info)
diff --git a/src/mame/drivers/tryout.cpp b/src/mame/drivers/tryout.cpp
index 37ae3318f66..aa1769db1a7 100644
--- a/src/mame/drivers/tryout.cpp
+++ b/src/mame/drivers/tryout.cpp
@@ -185,7 +185,7 @@ static const gfx_layout spritelayout =
static GFXDECODE_START( tryout )
GFXDECODE_ENTRY( "gfx1", 0, charlayout, 0, 8 )
GFXDECODE_ENTRY( "gfx2", 0, spritelayout, 0, 4 )
- GFXDECODE_ENTRY( NULL, 0, vramlayout, 0, 4 )
+ GFXDECODE_ENTRY( nullptr, 0, vramlayout, 0, 4 )
GFXDECODE_END
static MACHINE_CONFIG_START( tryout, tryout_state )
diff --git a/src/mame/drivers/turrett.cpp b/src/mame/drivers/turrett.cpp
index ba7c5cac401..9f11225e838 100644
--- a/src/mame/drivers/turrett.cpp
+++ b/src/mame/drivers/turrett.cpp
@@ -359,7 +359,7 @@ static MACHINE_CONFIG_START( turrett, turrett_state )
MCFG_CPU_VBLANK_INT_DRIVER("screen", turrett_state, vblank)
MCFG_CPU_PERIODIC_INT_DRIVER(turrett_state, adc, 60)
- MCFG_ATA_INTERFACE_ADD("ata", turrett_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", turrett_devices, "hdd", nullptr, true)
/* video hardware */
MCFG_SCREEN_ADD("screen", RASTER)
diff --git a/src/mame/drivers/tvc.cpp b/src/mame/drivers/tvc.cpp
index 3a90e2344e8..0994dcb1b38 100644
--- a/src/mame/drivers/tvc.cpp
+++ b/src/mame/drivers/tvc.cpp
@@ -801,19 +801,19 @@ static MACHINE_CONFIG_START( tvc, tvc_state )
/* expansion interface */
MCFG_DEVICE_ADD("exp1", TVCEXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , nullptr, false)
MCFG_TVCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_DEVICE_ADD("exp2", TVCEXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , nullptr, false)
MCFG_TVCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_DEVICE_ADD("exp3", TVCEXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , nullptr, false)
MCFG_TVCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
MCFG_DEVICE_ADD("exp4", TVCEXP_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(tvc_exp , nullptr, false)
MCFG_TVCEXP_SLOT_OUT_IRQ_CB(INPUTLINE("maincpu", 0))
MCFG_TVCEXP_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
diff --git a/src/mame/drivers/twinkle.cpp b/src/mame/drivers/twinkle.cpp
index 1886a81481a..b96e438101c 100644
--- a/src/mame/drivers/twinkle.cpp
+++ b/src/mame/drivers/twinkle.cpp
@@ -956,7 +956,7 @@ static MACHINE_CONFIG_START( twinkle, twinkle_state )
MCFG_LEGACY_SCSI_PORT("scsi")
MCFG_AM53CF96_IRQ_HANDLER(DEVWRITELINE("maincpu:irq", psxirq_device, intin10))
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(twinkle_state, spu_ata_irq))
MCFG_ATA_INTERFACE_DMARQ_HANDLER(WRITELINE(twinkle_state, spu_ata_dmarq))
diff --git a/src/mame/drivers/tx0.cpp b/src/mame/drivers/tx0.cpp
index d2a2865572e..8128a31be8a 100644
--- a/src/mame/drivers/tx0.cpp
+++ b/src/mame/drivers/tx0.cpp
@@ -333,7 +333,7 @@ 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 */
- m_tape_reader.timer = m_tape_puncher.timer = m_typewriter.prt_timer = m_dis_timer = NULL;
+ m_tape_reader.timer = m_tape_puncher.timer = m_typewriter.prt_timer = m_dis_timer = nullptr;
}
@@ -367,9 +367,9 @@ public:
virtual bool is_creatable() const { return 0; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "tap,rim"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -402,9 +402,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "tap,rim"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -438,9 +438,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "typ"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -473,9 +473,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "tap"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
@@ -534,7 +534,7 @@ void tx0_readtape_image_device::call_unload()
tx0_state *state = machine().driver_data<tx0_state>();
/* reader unit */
- state->m_tape_reader.fd = NULL;
+ state->m_tape_reader.fd = nullptr;
/* stop motor */
state->m_tape_reader.motor_on = 0;
@@ -649,7 +649,7 @@ void tx0_punchtape_image_device::call_unload()
tx0_state *state = machine().driver_data<tx0_state>();
/* punch unit */
- state->m_tape_puncher.fd = NULL;
+ state->m_tape_puncher.fd = nullptr;
}
TIMER_CALLBACK_MEMBER(tx0_state::puncher_callback)
@@ -726,7 +726,7 @@ bool tx0_printer_image_device::call_load()
void tx0_printer_image_device::call_unload()
{
tx0_state *state = machine().driver_data<tx0_state>();
- state->m_typewriter.fd = NULL;
+ state->m_typewriter.fd = nullptr;
}
/*
@@ -877,7 +877,7 @@ bool tx0_magtape_image_device::call_load()
void tx0_magtape_image_device::call_unload()
{
tx0_state *state = machine().driver_data<tx0_state>();
- state->m_magtape.img = NULL;
+ state->m_magtape.img = nullptr;
if (state->m_magtape.timer)
{
diff --git a/src/mame/drivers/ultratnk.cpp b/src/mame/drivers/ultratnk.cpp
index ccb8e1b4858..82ae96aa553 100644
--- a/src/mame/drivers/ultratnk.cpp
+++ b/src/mame/drivers/ultratnk.cpp
@@ -203,7 +203,7 @@ static INPUT_PORTS_START( ultratnk )
PORT_START("COLLISION")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)0 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)nullptr )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* VCC */
diff --git a/src/mame/drivers/undrfire.cpp b/src/mame/drivers/undrfire.cpp
index 97d7d4fe49a..97e4a16a4e0 100644
--- a/src/mame/drivers/undrfire.cpp
+++ b/src/mame/drivers/undrfire.cpp
@@ -794,7 +794,7 @@ ROM_START( undrfire )
ROM_LOAD16_BYTE( "d67-10", 0x000000, 0x100000, CRC(d79e6ce9) SHA1(8b38302971816d599cdaa3279cb6395441373c6f) ) /* PIV 8x8 tiles, 6bpp */
ROM_LOAD16_BYTE( "d67-11", 0x000001, 0x100000, CRC(7a401bb3) SHA1(47257a6a4b37ec1ceb4e974b776ee3ea30db06fa) )
ROM_LOAD ( "d67-12", 0x300000, 0x100000, CRC(67b16fec) SHA1(af0f9f50516331780ef6cfab1e12a23edf87daa7) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION16_LE( 0x80000, "user1", 0 )
ROM_LOAD16_WORD( "d67-13", 0x00000, 0x80000, CRC(42e7690d) SHA1(5f00f3f814653733bf9a5cb010675799de02fa76) ) /* STY, spritemap */
@@ -834,7 +834,7 @@ ROM_START( undrfireu )
ROM_LOAD16_BYTE( "d67-10", 0x000000, 0x100000, CRC(d79e6ce9) SHA1(8b38302971816d599cdaa3279cb6395441373c6f) ) /* PIV 8x8 tiles, 6bpp */
ROM_LOAD16_BYTE( "d67-11", 0x000001, 0x100000, CRC(7a401bb3) SHA1(47257a6a4b37ec1ceb4e974b776ee3ea30db06fa) )
ROM_LOAD ( "d67-12", 0x300000, 0x100000, CRC(67b16fec) SHA1(af0f9f50516331780ef6cfab1e12a23edf87daa7) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION16_LE( 0x80000, "user1", 0 )
ROM_LOAD16_WORD( "d67-13", 0x00000, 0x80000, CRC(42e7690d) SHA1(5f00f3f814653733bf9a5cb010675799de02fa76) ) /* STY, spritemap */
@@ -873,7 +873,7 @@ ROM_START( undrfirej )
ROM_LOAD16_BYTE( "d67-10", 0x000000, 0x100000, CRC(d79e6ce9) SHA1(8b38302971816d599cdaa3279cb6395441373c6f) ) /* PIV 8x8 tiles, 6bpp */
ROM_LOAD16_BYTE( "d67-11", 0x000001, 0x100000, CRC(7a401bb3) SHA1(47257a6a4b37ec1ceb4e974b776ee3ea30db06fa) )
ROM_LOAD ( "d67-12", 0x300000, 0x100000, CRC(67b16fec) SHA1(af0f9f50516331780ef6cfab1e12a23edf87daa7) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION16_LE( 0x80000, "user1", 0 )
ROM_LOAD16_WORD( "d67-13", 0x00000, 0x80000, CRC(42e7690d) SHA1(5f00f3f814653733bf9a5cb010675799de02fa76) ) /* STY, spritemap */
@@ -921,7 +921,7 @@ ROM_START( cbombers )
ROM_LOAD16_BYTE( "d83_16.ic19", 0x000000, 0x100000, CRC(d364cf1e) SHA1(ee43f50edf50ec840acfb98b1314140ee9693839) )
ROM_LOAD16_BYTE( "d83_17.ic5", 0x000001, 0x100000, CRC(0ffe737c) SHA1(5923a4edf9d0c8339f793840c2bdc691e2c651e6) )
ROM_LOAD ( "d83_18.ic6", 0x300000, 0x100000, CRC(87979155) SHA1(0ffafa970f9f9c98f8938104b97e63d2b5757804) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION16_LE( 0x80000, "user1", 0 )
ROM_LOAD16_BYTE( "d83_31.ic10", 0x000001, 0x40000, CRC(85c37961) SHA1(15ea5c4904d910575e984e146c8941dff913d45f) )
@@ -975,7 +975,7 @@ ROM_START( cbombersj )
ROM_LOAD16_BYTE( "d83_16.ic19", 0x000000, 0x100000, CRC(d364cf1e) SHA1(ee43f50edf50ec840acfb98b1314140ee9693839) )
ROM_LOAD16_BYTE( "d83_17.ic5", 0x000001, 0x100000, CRC(0ffe737c) SHA1(5923a4edf9d0c8339f793840c2bdc691e2c651e6) )
ROM_LOAD ( "d83_18.ic6", 0x300000, 0x100000, CRC(87979155) SHA1(0ffafa970f9f9c98f8938104b97e63d2b5757804) )
- ROM_FILL ( 0x200000, 0x100000, 0 )
+ ROM_FILL ( 0x200000, 0x100000, nullptr )
ROM_REGION16_LE( 0x80000, "user1", 0 )
ROM_LOAD16_BYTE( "d83_31.ic10", 0x000001, 0x40000, CRC(85c37961) SHA1(15ea5c4904d910575e984e146c8941dff913d45f) )
@@ -1060,11 +1060,11 @@ ROM_START( cbombersp )
ROM_LOAD16_BYTE( "ic44_scc1.bin", 0x000001, 0x080000, CRC(868d0d3d) SHA1(29251d545548856296b5ae32a96f2eeef2418dc4) )
ROM_LOAD16_BYTE( "ic43_scc4.bin", 0x000000, 0x080000, CRC(2f170ee4) SHA1(2b8f07186c9f7589e1af131b8c377443a29bd149) )
ROM_LOAD ( "ic45_5cc2.bin", 0x300000, 0x080000, CRC(7ae48d63) SHA1(2a8b291f0a683ed5b0c39d221737956b6fc72fa5) )
- ROM_FILL ( 0x200000, 0x080000, 0 )
+ ROM_FILL ( 0x200000, 0x080000, nullptr )
ROM_LOAD16_BYTE( "ic58_f357.bin", 0x100001, 0x080000, CRC(16486967) SHA1(c2fd6c9f21232656b52ab589ac61f94aa728524e) )
ROM_LOAD16_BYTE( "ic57_1a62.bin", 0x100000, 0x080000, CRC(afd45e35) SHA1(6d7c0729c7d2b204473679b97923130e289f429d) )
ROM_LOAD ( "ic59_7cce.bin", 0x380000, 0x080000, CRC(ee762199) SHA1(d56e96feeedba8b77f8f18cb380d2902ca3f1e50) )
- ROM_FILL ( 0x280000, 0x080000, 0 )
+ ROM_FILL ( 0x280000, 0x080000, nullptr )
ROM_REGION16_LE( 0x80000, "user1", 0 )
ROM_LOAD16_BYTE( "st8_ic2.bin", 0x000001, 0x40000, CRC(d74254d8) SHA1(f4a4f9d95f70edf74d937be067d6a9f68a955ea7) )
diff --git a/src/mame/drivers/univac.cpp b/src/mame/drivers/univac.cpp
index d26216c3bc5..b6bce0a65ec 100644
--- a/src/mame/drivers/univac.cpp
+++ b/src/mame/drivers/univac.cpp
@@ -163,7 +163,7 @@ static const z80_daisy_config daisy_chain[] =
{
{ "dart" },
{ "ctc" },
- { NULL }
+ { nullptr }
};
static MACHINE_CONFIG_START( uts20, univac_state )
@@ -201,7 +201,7 @@ ROM_START( uts20 )
ROM_LOAD( "uts20e.rom", 0x4000, 0x1000, CRC(0dfc8062) SHA1(cd681020bfb4829d4cebaf1b5bf618e67b55bda3) )
ROM_FILL(0x2bd,1,0xaf) // test 2
ROM_FILL(0x3c1,2,0xaf) // test 5
- ROM_FILL(0x928,1,0)
+ ROM_FILL(0x928,1,nullptr)
/* character generator not dumped, using the one from 'c10' for now */
ROM_REGION( 0x2000, "chargen", 0 )
diff --git a/src/mame/drivers/unixpc.cpp b/src/mame/drivers/unixpc.cpp
index 0372d6493d2..e08ce2a57a7 100644
--- a/src/mame/drivers/unixpc.cpp
+++ b/src/mame/drivers/unixpc.cpp
@@ -124,7 +124,7 @@ WRITE16_MEMBER( unixpc_state::disk_control_w )
if (BIT(data, 6))
m_wd2797->set_floppy(m_floppy);
else
- m_wd2797->set_floppy(NULL);
+ m_wd2797->set_floppy(nullptr);
}
WRITE_LINE_MEMBER( unixpc_state::wd2797_intrq_w )
diff --git a/src/mame/drivers/upscope.cpp b/src/mame/drivers/upscope.cpp
index 2e4d0b60eb6..366817bff63 100644
--- a/src/mame/drivers/upscope.cpp
+++ b/src/mame/drivers/upscope.cpp
@@ -317,7 +317,7 @@ MACHINE_CONFIG_END
ROM_START( upscope )
ROM_REGION(0x80000, "kickstart", 0)
ROM_LOAD16_WORD_SWAP("315093-01.u2", 0x00000, 0x40000, CRC(a6ce1636) SHA1(11f9e62cf299f72184835b7b2a70a16333fc0d88))
- ROM_COPY("kickstart", 0x00000, 0x40000, 0x40000)
+ ROM_COPY("kickstart", nullptr, 0x40000, 0x40000)
ROM_REGION(0x080000, "user2", 0)
ROM_LOAD16_BYTE( "upscope.u5", 0x000000, 0x008000, CRC(c109912e) SHA1(dcac9522e3c4818b2a02212b9173540fcf4bd463) )
diff --git a/src/mame/drivers/usgames.cpp b/src/mame/drivers/usgames.cpp
index f391ff6d2a2..892dfbc9649 100644
--- a/src/mame/drivers/usgames.cpp
+++ b/src/mame/drivers/usgames.cpp
@@ -209,7 +209,7 @@ static const gfx_layout charlayout =
};
static GFXDECODE_START( usgames )
- GFXDECODE_ENTRY( NULL, 0x2800, charlayout, 0, 256 )
+ GFXDECODE_ENTRY( nullptr, 0x2800, charlayout, 0, 256 )
GFXDECODE_END
diff --git a/src/mame/drivers/uzebox.cpp b/src/mame/drivers/uzebox.cpp
index 1df64b89fee..477765842de 100644
--- a/src/mame/drivers/uzebox.cpp
+++ b/src/mame/drivers/uzebox.cpp
@@ -247,7 +247,7 @@ DEVICE_IMAGE_LOAD_MEMBER(uzebox_state, uzebox_cart)
m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
dynamic_buffer data(size);
image.fread(&data[0], size);
diff --git a/src/mame/drivers/v1050.cpp b/src/mame/drivers/v1050.cpp
index aa099470f2a..4c61fbecdbf 100644
--- a/src/mame/drivers/v1050.cpp
+++ b/src/mame/drivers/v1050.cpp
@@ -677,7 +677,7 @@ WRITE8_MEMBER( v1050_state::misc_ppi_pa_w )
*/
// floppy drive select
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (!BIT(data, 0)) floppy = m_floppy0->get_device();
if (!BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -1085,7 +1085,7 @@ static MACHINE_CONFIG_START( v1050, v1050_state )
MCFG_I8251_RXRDY_HANDLER(WRITELINE(v1050_state, sio_rxrdy_w))
MCFG_I8251_TXRDY_HANDLER(WRITELINE(v1050_state, sio_txrdy_w))
- 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(I8251A_SIO_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251A_SIO_TAG, i8251_device, write_dsr))
@@ -1097,8 +1097,8 @@ static MACHINE_CONFIG_START( v1050, v1050_state )
MCFG_WD_FDC_DRQ_CALLBACK(WRITELINE(v1050_state, fdc_drq_w))
MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":0", v1050_floppies, "525qd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":1", v1050_floppies, "525qd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":2", v1050_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":3", v1050_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":2", v1050_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(MB8877_TAG":3", v1050_floppies, nullptr, floppy_image_device::default_floppy_formats)
// SASI bus
MCFG_DEVICE_ADD(SASIBUS_TAG, SCSI_PORT, 0)
diff --git a/src/mame/drivers/v6809.cpp b/src/mame/drivers/v6809.cpp
index 1b408d95335..6acbf18954e 100644
--- a/src/mame/drivers/v6809.cpp
+++ b/src/mame/drivers/v6809.cpp
@@ -257,7 +257,7 @@ READ8_MEMBER( v6809_state::pb_r )
// can support 4 drives
WRITE8_MEMBER( v6809_state::pa_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if ((data & 3) == 0) floppy = m_floppy0->get_device();
//if ((data & 3) == 1) floppy = m_floppy1->get_device();
//if ((data & 3) == 2) floppy = m_floppy2->get_device();
diff --git a/src/mame/drivers/vamphalf.cpp b/src/mame/drivers/vamphalf.cpp
index 9ac27ab39f5..7ca4be26787 100644
--- a/src/mame/drivers/vamphalf.cpp
+++ b/src/mame/drivers/vamphalf.cpp
@@ -644,7 +644,7 @@ void vamphalf_state::draw_sprites(screen_device &screen, bitmap_ind16 &bitmap)
offs = (block + cnt) / 2;
// 16bit version
- if(m_tiles != NULL)
+ if(m_tiles != nullptr)
{
if(m_tiles[offs] & 0x0100) continue;
@@ -2162,13 +2162,13 @@ ROM_START( finalgdr ) /* version 2.20.5915, Korea only */
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
ROM_END
@@ -2280,13 +2280,13 @@ ROM_START( mrkickera )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
ROM_REGION16_BE( 0x80, "eeprom", 0 ) /* Default EEPROM (it doesn't boot without and the game code crashes) (game also refuses to boot if program attempts to rewrite it, CPU bug or protection?) */
@@ -2314,13 +2314,13 @@ ROM_START( mrkicker )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
ROM_END
@@ -2392,13 +2392,13 @@ ROM_START( aoh )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x100000, "oki_2", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
ROM_END
@@ -2445,21 +2445,21 @@ ROM_START( boonggab )
/* $00000-$20000 stays the same in all sound banks, */
/* the second half of the bank is what gets switched */
ROM_REGION( 0x200000, "oki", 0 ) /* Samples */
- ROM_COPY( "user2", 0x000000, 0x000000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x020000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x040000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x000000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x020000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x040000, 0x020000)
ROM_COPY( "user2", 0x020000, 0x060000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x080000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x080000, 0x020000)
ROM_COPY( "user2", 0x040000, 0x0a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x0c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x0c0000, 0x020000)
ROM_COPY( "user2", 0x060000, 0x0e0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x100000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x100000, 0x020000)
ROM_COPY( "user2", 0x080000, 0x120000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x140000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x140000, 0x020000)
ROM_COPY( "user2", 0x0a0000, 0x160000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x180000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x180000, 0x020000)
ROM_COPY( "user2", 0x0c0000, 0x1a0000, 0x020000)
- ROM_COPY( "user2", 0x000000, 0x1c0000, 0x020000)
+ ROM_COPY( "user2", nullptr, 0x1c0000, 0x020000)
ROM_COPY( "user2", 0x0e0000, 0x1e0000, 0x020000)
ROM_END
diff --git a/src/mame/drivers/vboy.cpp b/src/mame/drivers/vboy.cpp
index a50522781a6..bfa75598ee5 100644
--- a/src/mame/drivers/vboy.cpp
+++ b/src/mame/drivers/vboy.cpp
@@ -1375,7 +1375,7 @@ static MACHINE_CONFIG_START( vboy, vboy_state )
MCFG_SCREEN_PALETTE("palette")
/* cartridge */
- MCFG_VBOY_CARTRIDGE_ADD("cartslot", vboy_cart, NULL)
+ MCFG_VBOY_CARTRIDGE_ADD("cartslot", vboy_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","vboy")
diff --git a/src/mame/drivers/vc4000.cpp b/src/mame/drivers/vc4000.cpp
index 37217c2d82d..d6e72d6fbec 100644
--- a/src/mame/drivers/vc4000.cpp
+++ b/src/mame/drivers/vc4000.cpp
@@ -551,7 +551,7 @@ static MACHINE_CONFIG_START( vc4000, vc4000_state )
MCFG_QUICKLOAD_ADD("quickload", vc4000_state, vc4000, "pgm,tvc", 0)
/* cartridge */
- MCFG_VC4000_CARTRIDGE_ADD("cartslot", vc4000_cart, NULL)
+ MCFG_VC4000_CARTRIDGE_ADD("cartslot", vc4000_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list", "vc4000")
@@ -579,7 +579,7 @@ MACHINE_CONFIG_END
static MACHINE_CONFIG_DERIVED( h21, vc4000 )
MCFG_DEVICE_REMOVE("cartslot")
- MCFG_H21_CARTRIDGE_ADD("cartslot", vc4000_cart, NULL)
+ MCFG_H21_CARTRIDGE_ADD("cartslot", vc4000_cart, nullptr)
MCFG_DEVICE_REMOVE("cart_list")
MCFG_SOFTWARE_LIST_ADD("cart_list", "h21")
diff --git a/src/mame/drivers/vcombat.cpp b/src/mame/drivers/vcombat.cpp
index 98818ffa0d2..baf394599a9 100644
--- a/src/mame/drivers/vcombat.cpp
+++ b/src/mame/drivers/vcombat.cpp
@@ -328,7 +328,7 @@ WRITE16_MEMBER(vcombat_state::crtc_w)
{
mc6845_device *crtc = machine().device<mc6845_device>("crtc");
- if (crtc == NULL)
+ if (crtc == nullptr)
return;
if (m_crtc_select == 0)
@@ -470,8 +470,8 @@ DRIVER_INIT_MEMBER(vcombat_state,shadfgtr)
/* Only one i860 */
m_i860_framebuffer[0][0] = auto_alloc_array(machine(), UINT16, 0x8000);
m_i860_framebuffer[0][1] = auto_alloc_array(machine(), UINT16, 0x8000);
- m_i860_framebuffer[1][0] = NULL;
- m_i860_framebuffer[1][1] = NULL;
+ m_i860_framebuffer[1][0] = nullptr;
+ m_i860_framebuffer[1][1] = nullptr;
}
diff --git a/src/mame/drivers/vcs80.cpp b/src/mame/drivers/vcs80.cpp
index cd6e9512825..7903d237359 100644
--- a/src/mame/drivers/vcs80.cpp
+++ b/src/mame/drivers/vcs80.cpp
@@ -187,7 +187,7 @@ WRITE8_MEMBER( vcs80_state::pio_pb_w )
static const z80_daisy_config vcs80_daisy_chain[] =
{
{ Z80PIO_TAG },
- { NULL }
+ { nullptr }
};
/* Machine Initialization */
diff --git a/src/mame/drivers/vectrex.cpp b/src/mame/drivers/vectrex.cpp
index 695ef55619e..2cbc763c581 100644
--- a/src/mame/drivers/vectrex.cpp
+++ b/src/mame/drivers/vectrex.cpp
@@ -124,7 +124,7 @@ static MACHINE_CONFIG_START( vectrex, vectrex_state )
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(vectrex_state, vectrex_via_irq))
/* cartridge */
- MCFG_VECTREX_CARTRIDGE_ADD("cartslot", vectrex_cart, NULL)
+ MCFG_VECTREX_CARTRIDGE_ADD("cartslot", vectrex_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","vectrex")
diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp
index 1c80c3730de..33f0c3d3d5f 100644
--- a/src/mame/drivers/vegas.cpp
+++ b/src/mame/drivers/vegas.cpp
@@ -588,9 +588,9 @@ void vegas_state::machine_start()
m_timer[3] = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vegas_state::nile_timer_callback),this));
/* identify our sound board */
- if (machine().device("dsio") != NULL)
+ if (machine().device("dsio") != nullptr)
m_dcs_idma_cs = 6;
- else if (machine().device("denver") != NULL)
+ else if (machine().device("denver") != nullptr)
m_dcs_idma_cs = 7;
else
m_dcs_idma_cs = 0;
@@ -628,7 +628,7 @@ void vegas_state::machine_reset()
memset(m_pci_3dfx_regs, 0, sizeof(m_pci_3dfx_regs));
/* reset the DCS system if we have one */
- if (machine().device("dcs") != NULL)
+ if (machine().device("dcs") != nullptr)
{
m_dcs->reset_w(1);
m_dcs->reset_w(0);
@@ -2225,7 +2225,7 @@ static MACHINE_CONFIG_START( vegascore, vegas_state )
MCFG_M48T37_ADD("timekeeper")
- MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(vegas_state, ide_interrupt))
MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE("maincpu", AS_PROGRAM)
diff --git a/src/mame/drivers/vertigo.cpp b/src/mame/drivers/vertigo.cpp
index 87b297f5165..5d38034109f 100644
--- a/src/mame/drivers/vertigo.cpp
+++ b/src/mame/drivers/vertigo.cpp
@@ -159,7 +159,7 @@ ROM_START( topgunnr )
ROM_LOAD16_BYTE( "tgl-2.9p", 0x000000, 0x002000, CRC(1d10b31e) SHA1(c66f11d2bee81a51baccf96f8e8335fc86dc20e4) )
ROM_LOAD16_BYTE( "tgl-2.10p", 0x000001, 0x002000, CRC(9c80b387) SHA1(aa7b770ddfaf65fd26959e7f9a3f15ba60979e50) )
- ROM_COPY( "maincpu", 0x000000, 0x800000,0x004000)
+ ROM_COPY( "maincpu", nullptr, 0x800000,0x004000)
ROM_LOAD16_BYTE( "tgl-2.9r", 0x804000, 0x002000, CRC(74454ac9) SHA1(4cf1e5373d5940ed81fe7d07324abb10667df097) )
ROM_LOAD16_BYTE( "tgl-2.10r", 0x804001, 0x002000, CRC(f5c28223) SHA1(16bf122f289129b50545e463f685f517cb9baca7) )
ROM_LOAD16_BYTE( "tgl-2.9t", 0x808000, 0x002000, CRC(d415d189) SHA1(3b726815292365a9206b83d1f2f5e314fcb24e73) )
diff --git a/src/mame/drivers/vic10.cpp b/src/mame/drivers/vic10.cpp
index 56c9884f7a8..73a6a9bf11c 100644
--- a/src/mame/drivers/vic10.cpp
+++ b/src/mame/drivers/vic10.cpp
@@ -641,10 +641,10 @@ static MACHINE_CONFIG_START( vic10, vic10_state )
MCFG_MOS6526_PB_INPUT_CALLBACK(READ8(vic10_state, cia_pb_r))
MCFG_MOS6526_PB_OUTPUT_CALLBACK(WRITE8(vic10_state, cia_pb_w))
MCFG_PET_DATASSETTE_PORT_ADD(PET_DATASSETTE_PORT_TAG, cbm_datassette_devices, "c1530", DEVWRITELINE(MOS6526_TAG, mos6526_device, flag_w))
- MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, NULL)
+ MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, nullptr)
MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(DEVWRITELINE(MOS6566_TAG, mos6566_device, lp_w))
MCFG_VCS_CONTROL_PORT_ADD(CONTROL2_TAG, vcs_control_port_devices, "joy")
- MCFG_VIC10_EXPANSION_SLOT_ADD(VIC10_EXPANSION_SLOT_TAG, XTAL_8MHz/8, vic10_expansion_cards, NULL)
+ MCFG_VIC10_EXPANSION_SLOT_ADD(VIC10_EXPANSION_SLOT_TAG, XTAL_8MHz/8, vic10_expansion_cards, nullptr)
MCFG_VIC10_EXPANSION_SLOT_IRQ_CALLBACK(WRITELINE(vic10_state, exp_irq_w))
MCFG_VIC10_EXPANSION_SLOT_RES_CALLBACK(WRITELINE(vic10_state, exp_reset_w))
MCFG_VIC10_EXPANSION_SLOT_CNT_CALLBACK(DEVWRITELINE(MOS6526_TAG, mos6526_device, cnt_w))
diff --git a/src/mame/drivers/vic20.cpp b/src/mame/drivers/vic20.cpp
index 43dc17e7714..1b504f877af 100644
--- a/src/mame/drivers/vic20.cpp
+++ b/src/mame/drivers/vic20.cpp
@@ -681,7 +681,7 @@ static MACHINE_CONFIG_START( vic20, vic20_state )
MCFG_VCS_CONTROL_PORT_ADD(CONTROL1_TAG, vcs_control_port_devices, "joy")
MCFG_VCS_CONTROL_PORT_TRIGGER_CALLBACK(WRITELINE(vic20_state, write_light_pen))
- MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, vic20_user_port_cards, NULL)
+ MCFG_PET_USER_PORT_ADD(PET_USER_PORT_TAG, vic20_user_port_cards, nullptr)
MCFG_PET_USER_PORT_3_HANDLER(WRITELINE(vic20_state, exp_reset_w))
MCFG_PET_USER_PORT_4_HANDLER(WRITELINE(vic20_state, write_user_joy0))
MCFG_PET_USER_PORT_5_HANDLER(WRITELINE(vic20_state, write_user_joy1))
@@ -730,7 +730,7 @@ static MACHINE_CONFIG_DERIVED( ntsc, vic20 )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
// devices
- MCFG_VIC20_EXPANSION_SLOT_ADD(VIC20_EXPANSION_SLOT_TAG, MOS6560_CLOCK, vic20_expansion_cards, NULL)
+ MCFG_VIC20_EXPANSION_SLOT_ADD(VIC20_EXPANSION_SLOT_TAG, MOS6560_CLOCK, vic20_expansion_cards, nullptr)
MCFG_VIC20_EXPANSION_SLOT_IRQ_CALLBACK(INPUTLINE(M6502_TAG, M6502_IRQ_LINE))
MCFG_VIC20_EXPANSION_SLOT_NMI_CALLBACK(INPUTLINE(M6502_TAG, M6502_NMI_LINE))
MCFG_VIC20_EXPANSION_SLOT_RES_CALLBACK(WRITELINE(vic20_state, exp_reset_w))
@@ -760,7 +760,7 @@ static MACHINE_CONFIG_DERIVED( pal, vic20 )
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.25)
// devices
- MCFG_VIC20_EXPANSION_SLOT_ADD(VIC20_EXPANSION_SLOT_TAG, MOS6561_CLOCK, vic20_expansion_cards, NULL)
+ MCFG_VIC20_EXPANSION_SLOT_ADD(VIC20_EXPANSION_SLOT_TAG, MOS6561_CLOCK, vic20_expansion_cards, nullptr)
MCFG_VIC20_EXPANSION_SLOT_IRQ_CALLBACK(INPUTLINE(M6502_TAG, M6502_IRQ_LINE))
MCFG_VIC20_EXPANSION_SLOT_NMI_CALLBACK(INPUTLINE(M6502_TAG, M6502_NMI_LINE))
MCFG_VIC20_EXPANSION_SLOT_RES_CALLBACK(WRITELINE(vic20_state, exp_reset_w))
diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp
index 7c11760bf3d..31af4ff77da 100644
--- a/src/mame/drivers/vicdual.cpp
+++ b/src/mame/drivers/vicdual.cpp
@@ -164,7 +164,7 @@ CUSTOM_INPUT_MEMBER(vicdual_state::get_vblank_comp)
CUSTOM_INPUT_MEMBER(vicdual_state::get_composite_blank_comp)
{
- return (get_vblank_comp(field, 0) && !m_screen->hblank());
+ return (get_vblank_comp(field, nullptr) && !m_screen->hblank());
}
@@ -2334,7 +2334,7 @@ static INPUT_PORTS_START( nsub )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, NULL)
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,nsub_coin_in, (void*)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,nsub_coin_in, (void*)nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,nsub_coin_in, (void*)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, vicdual_state,nsub_coin_in, (void*)2)
@@ -3561,8 +3561,8 @@ ROM_START( heiankyo )
ROM_LOAD( "ha7.u7", 0x2400, 0x0400, CRC(6d2f9527) SHA1(4e51c5404d0302547c1ae85b27ffe4de11d68224) )
ROM_LOAD( "ha6.u6", 0x2800, 0x0400, CRC(e467c353) SHA1(a76b4f6d9702f760f287b5285f76ea4206c6934a) )
ROM_LOAD( "ha3.u3", 0x2c00, 0x0400, CRC(6a55eda8) SHA1(f526ebf18a33271b798e53cfcadb27e4c3a03466) )
- ROM_FILL( 0x3000, 0x0400, 0 )
- ROM_FILL( 0x3400, 0x0400, 0 )
+ ROM_FILL( 0x3000, 0x0400, nullptr )
+ ROM_FILL( 0x3400, 0x0400, nullptr )
ROM_LOAD( "ha2.u2", 0x3800, 0x0400, CRC(056b3b8b) SHA1(3cce6c928599604ffdcdb767caa7b32d8ec1e03d) )
ROM_LOAD( "ha1.u1", 0x3c00, 0x0400, CRC(b8da2b5e) SHA1(70d97b89cb3162bd479203c53148319179a9873f) )
diff --git a/src/mame/drivers/victor9k.cpp b/src/mame/drivers/victor9k.cpp
index 0684e958935..6c48143b051 100644
--- a/src/mame/drivers/victor9k.cpp
+++ b/src/mame/drivers/victor9k.cpp
@@ -539,14 +539,14 @@ static MACHINE_CONFIG_START( victor9k, victor9k_state )
MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE(M6522_1_TAG, via6522_device, write_pb6))
MCFG_CENTRONICS_SELECT_HANDLER(DEVWRITELINE(M6522_1_TAG, via6522_device, write_pb7))
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, rxa_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, dcda_w))
MCFG_RS232_RI_HANDLER(WRITELINE(victor9k_state, write_ria))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, ctsa_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(M6522_2_TAG, via6522_device, write_pa3))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, rxb_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE(UPD7201_TAG, z80dart_device, dcdb_w))
MCFG_RS232_RI_HANDLER(WRITELINE(victor9k_state, write_ria))
diff --git a/src/mame/drivers/vidbrain.cpp b/src/mame/drivers/vidbrain.cpp
index dbb5b35c706..8d9e64a9c1b 100644
--- a/src/mame/drivers/vidbrain.cpp
+++ b/src/mame/drivers/vidbrain.cpp
@@ -561,7 +561,7 @@ static MACHINE_CONFIG_START( vidbrain, vidbrain_state )
MCFG_F3853_EXT_INPUT_CB(vidbrain_state, f3853_int_req_w)
// cartridge
- MCFG_VIDEOBRAIN_EXPANSION_SLOT_ADD(VIDEOBRAIN_EXPANSION_SLOT_TAG, vidbrain_expansion_cards, NULL)
+ MCFG_VIDEOBRAIN_EXPANSION_SLOT_ADD(VIDEOBRAIN_EXPANSION_SLOT_TAG, vidbrain_expansion_cards, nullptr)
// software lists
MCFG_SOFTWARE_LIST_ADD("cart_list", "vidbrain")
diff --git a/src/mame/drivers/vip.cpp b/src/mame/drivers/vip.cpp
index f6d3ebd9a29..c9ca8d323ac 100644
--- a/src/mame/drivers/vip.cpp
+++ b/src/mame/drivers/vip.cpp
@@ -663,7 +663,7 @@ void vip_state::machine_reset()
QUICKLOAD_LOAD_MEMBER( vip_state, vip )
{
UINT8 *ram = m_ram->pointer();
- UINT8 *chip8_ptr = NULL;
+ UINT8 *chip8_ptr = nullptr;
int chip8_size = 0;
int size = image.length();
@@ -738,8 +738,8 @@ static MACHINE_CONFIG_START( vip, vip_state )
MCFG_DISCRETE_INTF(vip)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.80)
- MCFG_VIP_BYTEIO_PORT_ADD(VIP_BYTEIO_PORT_TAG, vip_byteio_cards, NULL, WRITELINE(vip_state, byteio_inst_w))
- MCFG_VIP_EXPANSION_SLOT_ADD(VIP_EXPANSION_SLOT_TAG, XTAL_3_52128MHz/2, vip_expansion_cards, NULL)
+ MCFG_VIP_BYTEIO_PORT_ADD(VIP_BYTEIO_PORT_TAG, vip_byteio_cards, nullptr, WRITELINE(vip_state, byteio_inst_w))
+ MCFG_VIP_EXPANSION_SLOT_ADD(VIP_EXPANSION_SLOT_TAG, XTAL_3_52128MHz/2, vip_expansion_cards, nullptr)
MCFG_VIP_EXPANSION_SLOT_INT_CALLBACK(WRITELINE(vip_state, exp_int_w))
MCFG_VIP_EXPANSION_SLOT_DMA_OUT_CALLBACK(WRITELINE(vip_state, exp_dma_out_w))
MCFG_VIP_EXPANSION_SLOT_DMA_IN_CALLBACK(WRITELINE(vip_state, exp_dma_in_w))
diff --git a/src/mame/drivers/viper.cpp b/src/mame/drivers/viper.cpp
index 4abb7bd119a..11d815e74a2 100644
--- a/src/mame/drivers/viper.cpp
+++ b/src/mame/drivers/viper.cpp
@@ -2100,7 +2100,7 @@ static MACHINE_CONFIG_START( viper, viper_state )
MCFG_PCI_BUS_LEGACY_DEVICE(0, "mpc8240", mpc8240_pci_r, mpc8240_pci_w)
MCFG_PCI_BUS_LEGACY_DEVICE(12, "voodoo", voodoo3_pci_r, voodoo3_pci_w)
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_DEVICE_ADD("voodoo", VOODOO_3, STD_VOODOO_3_CLOCK)
MCFG_VOODOO_FBMEM(8)
diff --git a/src/mame/drivers/vixen.cpp b/src/mame/drivers/vixen.cpp
index 5606330d627..0365076cb5f 100644
--- a/src/mame/drivers/vixen.cpp
+++ b/src/mame/drivers/vixen.cpp
@@ -526,7 +526,7 @@ WRITE8_MEMBER( vixen_state::i8155_pc_w )
*/
// drive select
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (!BIT(data, 0)) floppy = m_floppy0->get_device();
if (!BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -773,7 +773,7 @@ static MACHINE_CONFIG_START( vixen, vixen_state )
MCFG_I8251_RXRDY_HANDLER(WRITELINE(vixen_state, rxrdy_w))
MCFG_I8251_TXRDY_HANDLER(WRITELINE(vixen_state, txrdy_w))
- 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(P8251A_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(P8251A_TAG, i8251_device, write_dsr))
diff --git a/src/mame/drivers/vk100.cpp b/src/mame/drivers/vk100.cpp
index 376b54efbcb..5d7ed0411d0 100644
--- a/src/mame/drivers/vk100.cpp
+++ b/src/mame/drivers/vk100.cpp
@@ -1052,7 +1052,7 @@ static MACHINE_CONFIG_START( vk100, vk100_state )
MCFG_I8251_RXRDY_HANDLER(WRITELINE(vk100_state, i8251_rxrdy_int))
MCFG_I8251_TXRDY_HANDLER(WRITELINE(vk100_state, i8251_txrdy_int))
- 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/votrpss.cpp b/src/mame/drivers/votrpss.cpp
index 1a3a6ada714..09bf0a85a14 100644
--- a/src/mame/drivers/votrpss.cpp
+++ b/src/mame/drivers/votrpss.cpp
@@ -278,7 +278,7 @@ static MACHINE_CONFIG_START( votrpss, votrpss_state )
MCFG_I8251_DTR_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_dtr))
MCFG_I8251_RTS_HANDLER(DEVWRITELINE("rs232", rs232_port_device, write_rts))
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart", i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart", i8251_device, write_dsr))
diff --git a/src/mame/drivers/voyager.cpp b/src/mame/drivers/voyager.cpp
index 02cd1a1c96e..2cf410ed4cd 100644
--- a/src/mame/drivers/voyager.cpp
+++ b/src/mame/drivers/voyager.cpp
@@ -483,12 +483,12 @@ static MACHINE_CONFIG_START( voyager, voyager_state )
MCFG_FRAGMENT_ADD( pcat_common )
- MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("pic8259_2", pic8259_device, ir6_w))
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, intel82439tx_pci_r, intel82439tx_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(7, nullptr, intel82371ab_pci_r, intel82371ab_pci_w)
/* video hardware */
MCFG_FRAGMENT_ADD( pcvideo_trident_vga )
diff --git a/src/mame/drivers/vt100.cpp b/src/mame/drivers/vt100.cpp
index 561de2441e0..ba492285d42 100644
--- a/src/mame/drivers/vt100.cpp
+++ b/src/mame/drivers/vt100.cpp
@@ -431,7 +431,7 @@ static MACHINE_CONFIG_START( vt100, vt100_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/vtech2.cpp b/src/mame/drivers/vtech2.cpp
index d5595320b72..f2f403c87e2 100644
--- a/src/mame/drivers/vtech2.cpp
+++ b/src/mame/drivers/vtech2.cpp
@@ -406,7 +406,7 @@ static const floppy_interface vtech2_floppy_interface =
{
FLOPPY_STANDARD_5_25_SSDD_40,
LEGACY_FLOPPY_OPTIONS_NAME(default),
- NULL
+ nullptr
};
static MACHINE_CONFIG_START( laser350, vtech2_state )
diff --git a/src/mame/drivers/wangpc.cpp b/src/mame/drivers/wangpc.cpp
index 3a5d23d34dc..fc68e3586c0 100644
--- a/src/mame/drivers/wangpc.cpp
+++ b/src/mame/drivers/wangpc.cpp
@@ -42,7 +42,7 @@ enum
void wangpc_state::select_drive()
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (m_ds1) floppy = m_floppy0;
if (m_ds2) floppy = m_floppy1;
@@ -1137,7 +1137,7 @@ static MACHINE_CONFIG_START( wangpc, wangpc_state )
MCFG_DEVICE_ADD("cent_data_in", INPUT_BUFFER, 0)
MCFG_CENTRONICS_OUTPUT_LATCH_ADD("cent_data_out", CENTRONICS_TAG)
- 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(SCN2661_TAG, mc2661_device, rx_w))
MCFG_DEVICE_ADD(WANGPC_KEYBOARD_TAG, WANGPC_KEYBOARD, 0)
@@ -1155,11 +1155,11 @@ static MACHINE_CONFIG_START( wangpc, wangpc_state )
MCFG_WANGPC_BUS_DRQ2_CALLBACK(DEVWRITELINE(AM9517A_TAG, am9517a_device, dreq2_w))
MCFG_WANGPC_BUS_DRQ3_CALLBACK(DEVWRITELINE(AM9517A_TAG, am9517a_device, dreq3_w))
MCFG_WANGPC_BUS_IOERROR_CALLBACK(INPUTLINE(I8086_TAG, INPUT_LINE_NMI))
- MCFG_WANGPC_BUS_SLOT_ADD("slot1", 1, wangpc_cards, NULL)
+ MCFG_WANGPC_BUS_SLOT_ADD("slot1", 1, wangpc_cards, nullptr)
MCFG_WANGPC_BUS_SLOT_ADD("slot2", 2, wangpc_cards, "mvc")
- MCFG_WANGPC_BUS_SLOT_ADD("slot3", 3, wangpc_cards, NULL)
- MCFG_WANGPC_BUS_SLOT_ADD("slot4", 4, wangpc_cards, NULL)
- MCFG_WANGPC_BUS_SLOT_ADD("slot5", 5, wangpc_cards, NULL)
+ MCFG_WANGPC_BUS_SLOT_ADD("slot3", 3, wangpc_cards, nullptr)
+ MCFG_WANGPC_BUS_SLOT_ADD("slot4", 4, wangpc_cards, nullptr)
+ MCFG_WANGPC_BUS_SLOT_ADD("slot5", 5, wangpc_cards, nullptr)
// internal ram
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mame/drivers/warriorb.cpp b/src/mame/drivers/warriorb.cpp
index c93f3a6a4d7..89ed55db7c5 100644
--- a/src/mame/drivers/warriorb.cpp
+++ b/src/mame/drivers/warriorb.cpp
@@ -183,7 +183,7 @@ READ16_MEMBER(warriorb_state::sound_r)
WRITE8_MEMBER(warriorb_state::pancontrol)
{
- filter_volume_device *flt = NULL;
+ filter_volume_device *flt = nullptr;
offset &= 3;
switch (offset)
@@ -623,7 +623,7 @@ ROM_START( sagaia )
ROM_LOAD32_BYTE( "c07-07.26", 0x00003, 0x80000, CRC(fd9f9e74) SHA1(e89beb5cac844fe16662465b0c76337692591aae) )
ROM_REGION( 0x100000, "gfx3", 0 )
- ROM_COPY( "gfx1", 0x000000, 0x000000, 0x100000 ) /* SCr(screen 2) */
+ ROM_COPY( "gfx1", nullptr, 0x000000, 0x100000 ) /* SCr(screen 2) */
/* The actual board duplicates the SCR gfx roms for the 2nd TC0100SCN */
// ROM_LOAD( "c07-03.47", 0x00000, 0x80000, CRC(189bafce) SHA1(d885e444523489fe24269b90dec58e0d92cfbd6e) )
@@ -668,7 +668,7 @@ ROM_START( darius2d )
ROM_LOAD32_BYTE( "c07-07.26", 0x00003, 0x80000, CRC(fd9f9e74) SHA1(e89beb5cac844fe16662465b0c76337692591aae) )
ROM_REGION( 0x100000, "gfx3", 0 )
- ROM_COPY( "gfx1", 0x000000, 0x000000, 0x100000 ) /* SCr(screen 2) */
+ ROM_COPY( "gfx1", nullptr, 0x000000, 0x100000 ) /* SCr(screen 2) */
/* The actual board duplicates the SCR gfx roms for the 2nd TC0100SCN */
// ROM_LOAD( "c07-03.47", 0x00000, 0x80000, CRC(189bafce) SHA1(d885e444523489fe24269b90dec58e0d92cfbd6e) )
@@ -713,7 +713,7 @@ ROM_START( darius2do )
ROM_LOAD32_BYTE( "c07-07.26", 0x00003, 0x80000, CRC(fd9f9e74) SHA1(e89beb5cac844fe16662465b0c76337692591aae) )
ROM_REGION( 0x100000, "gfx3", 0 )
- ROM_COPY( "gfx1", 0x000000, 0x000000, 0x100000 ) /* SCr(screen 2) */
+ ROM_COPY( "gfx1", nullptr, 0x000000, 0x100000 ) /* SCr(screen 2) */
/* The actual board duplicates the SCR gfx roms for the 2nd TC0100SCN */
// ROM_LOAD( "c07-03.47", 0x00000, 0x80000, CRC(189bafce) SHA1(d885e444523489fe24269b90dec58e0d92cfbd6e) )
diff --git a/src/mame/drivers/wecleman.cpp b/src/mame/drivers/wecleman.cpp
index 93cd4e906ca..b529f4b8bfd 100644
--- a/src/mame/drivers/wecleman.cpp
+++ b/src/mame/drivers/wecleman.cpp
@@ -993,7 +993,7 @@ static const gfx_layout wecleman_road_layout =
{0},
64*1,
wecleman_road_layout_xoffset,
- NULL
+ nullptr
};
static GFXDECODE_START( wecleman )
@@ -1027,7 +1027,7 @@ static const gfx_layout hotchase_road_layout =
{0},
32*4,
hotchase_road_layout_xoffset,
- NULL
+ nullptr
};
static GFXDECODE_START( hotchase )
diff --git a/src/mame/drivers/wicat.cpp b/src/mame/drivers/wicat.cpp
index b9bba8cd301..61fdf2d4b1e 100644
--- a/src/mame/drivers/wicat.cpp
+++ b/src/mame/drivers/wicat.cpp
@@ -309,8 +309,8 @@ void wicat_state::machine_reset()
m_kb_timer->adjust(attotime::zero,0,attotime::from_msec(50));
m_nmi_enable = 0;
m_crtc_irq = CLEAR_LINE;
- for(int x=0;x<8;x++)
- m_kb_keys[x] = 0;
+ for(auto & elem : m_kb_keys)
+ elem = 0;
}
void wicat_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
@@ -816,31 +816,31 @@ static MACHINE_CONFIG_START( wicat, wicat_state )
MCFG_MC2661_RXRDY_HANDLER(INPUTLINE("maincpu", M68K_IRQ_2))
MCFG_MC2661_TXEMT_DSCHG_HANDLER(INPUTLINE("maincpu", M68K_IRQ_2))
- MCFG_RS232_PORT_ADD("serial1",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("serial1",default_rs232_devices,nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart1",mc2661_device,rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("uart1",mc2661_device,dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart1",mc2661_device,dsr_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart1",mc2661_device,cts_w))
- MCFG_RS232_PORT_ADD("serial2",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("serial2",default_rs232_devices,nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart2",mc2661_device,rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("uart2",mc2661_device,dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart2",mc2661_device,dsr_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart2",mc2661_device,cts_w))
- MCFG_RS232_PORT_ADD("serial3",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("serial3",default_rs232_devices,nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart3",mc2661_device,rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("uart3",mc2661_device,dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart3",mc2661_device,dsr_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart3",mc2661_device,cts_w))
- MCFG_RS232_PORT_ADD("serial4",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("serial4",default_rs232_devices,nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart4",mc2661_device,rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("uart4",mc2661_device,dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart4",mc2661_device,dsr_w))
MCFG_RS232_CTS_HANDLER(DEVWRITELINE("uart4",mc2661_device,cts_w))
- MCFG_RS232_PORT_ADD("serial5",default_rs232_devices,NULL)
+ MCFG_RS232_PORT_ADD("serial5",default_rs232_devices,nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE("uart5",mc2661_device,rx_w))
MCFG_RS232_DCD_HANDLER(DEVWRITELINE("uart5",mc2661_device,dcd_w))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE("uart5",mc2661_device,dsr_w))
diff --git a/src/mame/drivers/wmg.cpp b/src/mame/drivers/wmg.cpp
index 53084fc46f8..aca783cc93b 100644
--- a/src/mame/drivers/wmg.cpp
+++ b/src/mame/drivers/wmg.cpp
@@ -533,7 +533,7 @@ ROM_START( wmg )
ROM_FILL( 0x2f81d, 1, 0xba )
ROM_FILL( 0x2e0b7, 1, 0x7e )
ROM_FILL( 0x2e0b8, 1, 0xf8 )
- ROM_FILL( 0x2e0b9, 1, 0x00 )
+ ROM_FILL( 0x2e0b9, 1, nullptr )
ROM_REGION( 0x18000, "soundcpu", 0 )
ROM_LOAD( "wmg.snd", 0x10000, 0x8000, CRC(1d08990e) SHA1(7bfb29426b3876f113e6ec3bc6c2fce9d2d1eb0c) )
diff --git a/src/mame/drivers/wolfpack.cpp b/src/mame/drivers/wolfpack.cpp
index dbe21b838de..093f54c5434 100644
--- a/src/mame/drivers/wolfpack.cpp
+++ b/src/mame/drivers/wolfpack.cpp
@@ -163,7 +163,7 @@ ADDRESS_MAP_END
static INPUT_PORTS_START( wolfpack )
PORT_START("INPUTS")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wolfpack_state,wolfpack_dial_r, (void *)0) /* dial connects here */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wolfpack_state,wolfpack_dial_r, (void *)nullptr) /* dial connects here */
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wolfpack_state,wolfpack_dial_r, (void *)1) /* dial connects here */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
@@ -241,7 +241,7 @@ static const gfx_layout ship_layout =
},
0x800,
ship_layout_xoffset,
- NULL
+ nullptr
};
static const UINT32 pt_layout_xoffset[64] =
@@ -266,7 +266,7 @@ static const gfx_layout pt_layout =
{ 0x000, 0x040, 0x080, 0x0c0, 0x100, 0x140, 0x180, 0x1c0 },
0x200,
pt_layout_xoffset,
- NULL
+ nullptr
};
diff --git a/src/mame/drivers/wpc_95.cpp b/src/mame/drivers/wpc_95.cpp
index 1adf3d64867..0ac475f89bb 100644
--- a/src/mame/drivers/wpc_95.cpp
+++ b/src/mame/drivers/wpc_95.cpp
@@ -366,8 +366,8 @@ bool wpc_95_state::sc_aux_lamps_handler(int sid, bool state)
DRIVER_INIT_MEMBER(wpc_95_state, tf95)
{
pic->set_serial("648 123456 12345 123");
- lamp->set_names(NULL);
- out->set_names(NULL);
+ lamp->set_names(nullptr);
+ out->set_names(nullptr);
init();
}
@@ -493,7 +493,7 @@ const char *const wpc_95_state::lamps_afm[64] = {
"Attack Mars", "New York, USA", "London, England", "Light lock", "Lock 1", "Pisa, Italy", "Berlin, Germany", "Paris, France",
"MARTIA\"N\" target", "MARTI\"A\"N target", "Atomic blaster 1", "Atomic blaster 2", "Atomic blaster 3", "R loop jackpot", "Extra ball", "MART\"I\"AN target",
"Capture 1", "Capture 2", "Capture 3", "L loop jackpot", "L loop arrow", "\"M\"ARTIAN target", "M\"A\"RTIAN target", "MA\"R\"TIAN target",
- "Shoot again", "Left outlane", "Left return", "Right return", "Right outlane", "Launch button", NULL, "Start button"
+ "Shoot again", "Left outlane", "Left return", "Right return", "Right outlane", "Launch button", nullptr, "Start button"
};
const char *const wpc_95_state::outputs_afm[52] = {
@@ -501,9 +501,9 @@ const char *const wpc_95_state::outputs_afm[52] = {
"s:Left slingshot", "s:Right slingshot", "s:Left jet", "s:Bottom jet", "s:Right jet", "s:Right alien lo", "s;Saucer shake", "s:Drop target",
"f:R ramp hi (2)", "f:R ramp lo (2)", "f:R side hi (2)", "f:R side lo", "f:Center arrow", "f:Jets", "f:Saucer dome", "m:Motor bank",
"f:L ramp L (2)", "f:L ramp R (2)", "f:L side hi (2)", "f:L side lo", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:Right gate", "s:Left gate", "s:Diverter power", "s:Diverter hold", NULL, NULL, "f:Strobe light", NULL,
+ "s:Right gate", "s:Left gate", "s:Diverter power", "s:Diverter hold", nullptr, nullptr, "f:Strobe light", nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Bottom playfield", "g:Middle playfield", "g:Top playfield"
};
@@ -618,17 +618,17 @@ const char *const wpc_95_state::lamps_cc[64] = {
"R drop: badguy 4", "R standup (bot)", "R standup (top)", "C rmp: catch train", "C ramp: stop train", "C ramp: save Polly", "C ramp: jackpot", "C ramp: combo",
"L rmp: white water", "L rmp: water fall", "L ramp: save Polly", "L ramp: jackpot", "L ramp: combo", "R ret: quick draw", "R out: special", "R gunfight pin",
"Star: stampede", "Star: combo", "Star: high noon", "L loop: combo", "L loop: jackpot", "L loop: ride 'em", "L loop: wild ride", "L loop: B Bronco",
- "Star: Bart Bros", "Shoot again", "Star: show down", "LC drop: badguy 2", NULL, NULL, NULL, "Start button"
+ "Star: Bart Bros", "Shoot again", "Star: show down", "LC drop: badguy 2", nullptr, nullptr, nullptr, "Start button"
};
const char *const wpc_95_state::outputs_cc[52] = {
- "s:Autoplunger", "s:#1 (L) drop tgt", "s:#2 (LC) drop tgt", "s:#3 (RC) drop tgt", "s:#4 (R) drop tgt", "s:Mine popper", NULL, "s:Saloon popper",
+ "s:Autoplunger", "s:#1 (L) drop tgt", "s:#2 (LC) drop tgt", "s:#3 (RC) drop tgt", "s:#4 (R) drop tgt", "s:Mine popper", nullptr, "s:Saloon popper",
"s:Through eject", "s:L slingshot", "s:R slingshot", "s:Left jet", "s:Right jet", "s:L gunfight post", "s:R gunfight post", "s:Bottom jet",
- "s:Mine motor", "f:Mine flasher", "f:Front L flasher", "f:Front R flasher", "s:L loop gate", "s:R loop gate", NULL, "f:Beacon flasher",
+ "s:Mine motor", "f:Mine flasher", "f:Front L flasher", "f:Front R flasher", "s:L loop gate", "s:R loop gate", nullptr, "f:Beacon flasher",
"f:Mid R flasher", "f:Saloon flasher", "f:Back R flasher", "f:Back L flasher", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:Move bart toy", NULL, NULL, "s:Bart toy hat", "s:Train reverse", "s:Train forward", NULL, NULL,
+ "s:Move bart toy", nullptr, nullptr, "s:Bart toy hat", "s:Train reverse", "s:Train forward", nullptr, nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Illum string 1", "g:Illum string 2", "g:Illum string 3"
};
@@ -758,9 +758,9 @@ const char *const wpc_95_state::outputs_cv[52] = {
"s:Trough eject", "s:Left sling", "s:Right sling", "s:Upper jet", "s:Lower jet", "s:Left saucer", "s:Right saucer", "s:Lock post",
"f:Join flasher", "f:Ring 1 flasher", "f:Ring 2 flasher", "f:Ring 3 flasher", "f:Fl right/BB URT", "s:Motor enable", "f:Jet flasher", "f:Fl right/BB ULeft",
"f:FL upper left", "f:Fl URight/BB LLT", "f:Ringmaster FLx2", "f:FL bear/BB LRT", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:Popper", "s:Diverter hold", "s:Ringmaster mgnt", "s:Upper post", "f:Neon", NULL, "s:Motor direction", NULL,
- NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "s:Popper", "s:Diverter hold", "s:Ringmaster mgnt", "s:Upper post", "f:Neon", nullptr, "s:Motor direction", nullptr,
+ nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Playfield right", "g:Playfield middle", "g:Playfield left"
};
@@ -883,9 +883,9 @@ const char *const wpc_95_state::outputs_congo[52] = {
"sTrough eject:", "s:Left slingshot", "s:Right slingshot", "s:Left jet", "s:Right jet", "s:Bottom jet", "s:Gorilla left", "s:Gorilla right",
"f:Amy flasher", "f:Left ramp fls", "f:2-way popper fls", "f:Skill shot fls", "f:Gray gorilla fls", "s:\"Map\" eject", "s:Left gate", "s:Right gate",
"f:Lower right fls", "f:Right ramp fls", "f:Volcano flasher", "f:\"Perimeter def\"", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:Up left post", "s:\"Mystery\" eject", "s:UL flip power", "s:UL flip hold", NULL, NULL, NULL, NULL,
+ "s:Up left post", "s:\"Mystery\" eject", "s:UL flip power", "s:UL flip hold", nullptr, nullptr, nullptr, nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Playfld gorilla", "g:Playfield top", "g:Playfield bottom"
};
@@ -997,20 +997,20 @@ const char *const wpc_95_state::lamps_jy[64] = {
"Right 3 bank top", "Right 3 bank mid", "Right 3 bank bot", "Left bank bot", "Left bank mid", "Left bank top", "Fan", "Bath tub",
"Jackpot", "Super jackpot", "Multiball", "Wrecking ball", "Radar adventure", "Jolopy race", "Toilet adventure", "ATC adventure",
"Gen bus", "Toast", "Magic bus", "Collect junk", "Coo coo clock", "Television", "Weather vane", "Fish bowl",
- "Gen toilet", "Window shopping", "Left recycle", "Left crane HU", "Shoot again", NULL, "Toaster", "Hair dryer",
+ "Gen toilet", "Window shopping", "Left recycle", "Left crane HU", "Shoot again", nullptr, "Toaster", "Hair dryer",
"Propeller", "Outerspace", "DO(G)", "(D)OG", "D(O)G", "Choose junk", "Angel sling", "Bicycles",
"Time machine", "Start adventure", "Extra ball", "Toast 2", "Gen sewer", "Toaster gun", "Gen alley", "Devil sling",
- "Fire works", "Toxic waste", "Lite extra ball", "Free game", "Lite jackpot", "Gen crane", NULL, "Start button"
+ "Fire works", "Toxic waste", "Lite extra ball", "Free game", "Lite jackpot", "Gen crane", nullptr, "Start button"
};
const char *const wpc_95_state::outputs_jy[52] = {
- "s:Auto plunger", "s:Refridge popper", "s:Power crane", NULL, "s:Scoop down", "s:Bus diverter", "s:Knocker", NULL,
- "s:Trough", "s:Left sling", "s:Right sling", NULL, NULL, NULL, "s:Hold crane", "s:Move dog",
+ "s:Auto plunger", "s:Refridge popper", "s:Power crane", nullptr, "s:Scoop down", "s:Bus diverter", "s:Knocker", nullptr,
+ "s:Trough", "s:Left sling", "s:Right sling", nullptr, nullptr, nullptr, "s:Hold crane", "s:Move dog",
"f:1 Fl dog face", "f:1 Fl window shop", "f:2 Fl autofire", "f:2 Fl left side", "s:Scoop up", "f:1 Fl under crane", "f:2 Fl back left", "f:2 Fl back rght",
"f:1 Fl shooter", "f:2 Fl scoop", "f:1 Fl dog house", "f:2 Fls cars", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
+ nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Playfld string 1", "g:Playfld string 2", "g:Logo string"
};
@@ -1133,9 +1133,9 @@ const char *const wpc_95_state::outputs_mm[52] = {
"s:Right eject", "s:Left slingshot", "s:Right slingshot", "s:Left jet", "s:Bottom jet", "s:Right jet", "s:Twr divert power", "s:Twr divert hold",
"f:L side lo (2)", "f:Left ramp (2)", "f:L side hi (2)", "f:R side hi (2)", "f:Right ramp (2)", "f:Cstl R side (2)", "f:R side lo (2)", "f:Moat (2)",
"f:Cstl L side (2)", "s:Tower lock post", "s:Right gate", "s:Left gate", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:L troll power", "s:L troll hold", "s:R troll power", "s:R troll hold", "s:Drawbridge motor", NULL, NULL, NULL,
+ "s:L troll power", "s:L troll hold", "s:R troll power", "s:R troll hold", "s:Drawbridge motor", nullptr, nullptr, nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Bottom playfield", "g:Middle playfield", "g:Top playfield"
};
@@ -1249,18 +1249,18 @@ const char *const wpc_95_state::lamps_mb[64] = {
"Left return", "Left outlane", "3/4 moon (2)", "R blue tgt", "L ramp arrow", "L primp", "L warm up", "L gargle",
"Guitar", "Drums", "Bass guitar", "Keyboard", "Microphone", "Saxophone", "C loop arrow 3", "C blue tgt",
"Creature", "Bride", "Frankenstein", "Mummy", "Wolfman", "Dracula", "Right outlane", "Shoot again",
- "L frank arm", "L frank leg", "Frank torso", "Frank head", "R frank leg", "R frank arm", "L loop arrow", NULL,
+ "L frank arm", "L frank leg", "Frank torso", "Frank head", "R frank leg", "R frank arm", "L loop arrow", nullptr,
"Muck", "Seaweed", "Algae", "Pond scum", "C loop arrow 2", "C loop arrow 1", "Launch button", "Start button"
};
const char *const wpc_95_state::outputs_mb[52] = {
- "s:Auto plunger", "s:Bride post", "s:Mummy coffin", NULL, "s:Left gate", "s:Right gate", NULL, "s:Ramp lock post",
+ "s:Auto plunger", "s:Bride post", "s:Mummy coffin", nullptr, "s:Left gate", "s:Right gate", nullptr, "s:Ramp lock post",
"s:Trough eject", "s:Left slignshot", "s:Right slingshot", "s:Left jet", "s:Right jet", "s:Bottom jet", "s:Left eject", "s:Right popper",
"f:Wolfman (2)", "f:Bride", "f:Frankenstein (2)", "f:Dracula coffin", "f:Creature (2)", "f:Jets/mummy (2)", "f:Right popper", "f:Frank arrow",
- "f:Rock CD", "f:Wolfman loop (2)", NULL, NULL, "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "f:Rock CD", "f:Wolfman loop (2)", nullptr, nullptr, "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Bottom playfield", "g:Top R playfield", "g:Top L playfield"
};
@@ -1388,11 +1388,11 @@ const char *const wpc_95_state::lamps_nbaf[64] = {
const char *const wpc_95_state::outputs_nbaf[52] = {
"s:Autoplunger", "s:", "s:L ramp diverter", "s:R loop diverter", "s:Eject", "s:Loop gate", "s:Backbox flipper", "s:Ball catch mag",
"s:Trough eject", "s:Left sling", "s:Right sling", "s:Left jet", "s:Middle jet", "s:Right jet", "s:Pass right 2", "s:Pass left 2",
- "f:Eject kickout", "f:Left jet bumper", "f:Upper left", "f:Upper right", NULL, "f:Trophy insert", NULL, "f:Lower left/right",
+ "f:Eject kickout", "f:Left jet bumper", "f:Upper left", "f:Upper right", nullptr, "f:Trophy insert", nullptr, "f:Lower left/right",
"s:Pass right 1", "s:Pass left 3", "s:Pass right 3", "s:Pass left 4", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
"s:Shoot 1", "s:Shoot 2", "s:Shoot 3", "s:Shoot 4", "s:Motor enable", "s:Motor direction", "s:Shot clk enable", "s:Shot clk count",
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:String 1", "g:String 2", "g:String 3"
};
@@ -1506,9 +1506,9 @@ const char *const wpc_95_state::lamps_ngg[64] = {
const char *const wpc_95_state::outputs_ngg[52] = {
"s:Autofire", "s:Kickback", "s:Clubhouse kicker", "s:Left gofer up", "s:Right gofer up", "s:Jet popper", "s:Left eject", "s:Upper rgt eject",
"s:Trough eject", "s:Left slingshot", "s:Right slingshot", "s:Top jet", "s:Middle jet", "s:Bottom jet", "s:Left gofer down", "s:Rgt gofer down",
- "f:Jet flash", "f:Lower lft flash", "f:Left spinr flash", "f:Rgt spinr flash", "f:Lower rgt flash", NULL, NULL, "s:Underground pass",
+ "f:Jet flash", "f:Lower lft flash", "f:Left spinr flash", "f:Rgt spinr flash", "f:Lower rgt flash", nullptr, nullptr, "s:Underground pass",
"f:Sand trap flash", "f:Wheel flasher", "s:Left ramp down", "s:Right ramp down", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:UR flip power", "s:UR flip hold", "s:Ball launch ramp", NULL, "s:Wheel spin CCW", "s:Wheel spin CW", NULL, NULL,
+ "s:UR flip power", "s:UR flip hold", "s:Ball launch ramp", nullptr, "s:Wheel spin CCW", "s:Wheel spin CW", nullptr, nullptr,
"c:Coin meter",
"f:Upper right 1", "f:Upper right 2", "f:Upper right 3", "f:Upper pf right", "f:Upper pf left", "f:Upper left 3", "f:Upper left 2", "f:Upper left 1",
"g:Left side string", "g:Rgt side string", "g:Gofer spotlight"
@@ -1648,9 +1648,9 @@ const char *const wpc_95_state::outputs_sc[52] = {
"s:Trough eject", "s:Left slingshot", "s:Right slingshot", "s:Left jet", "s:Right jet", "s:Top jet", "s:Top L 3 bank", "s:Top R 3 bank",
"f:Back left", "f:Jets+Bk Rt (2)", "f:Right middle", "f:Right bottom", "f:Left middle", "f:Left bottom", "f:Light rope 1", "f:Light rope 2",
"s:Top popper eject", "s:Top light+motor", "s:Bot L 3 bank", "s:Bot R 3 bank", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:UR flip power", "s:UR flip hold", "s:Auto plunger", "s:Lockup release", NULL, NULL, NULL, NULL,
- NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "s:UR flip power", "s:UR flip hold", "s:Auto plunger", "s:Lockup release", nullptr, nullptr, nullptr, nullptr,
+ nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Illum string 1", "g:Aux lamp 1 power", "g:Illum string 3"
};
@@ -1772,7 +1772,7 @@ const char *const wpc_95_state::lamps_ss[64] = {
"Ramp item", "Coffin mult item", "Leaper item", "Coffin spotlight", "Shoot again", "Lock lamp", "Left loop center", "Left loop upper",
"Laboratory item", "Crate item", "Skull item", "Web award 2", "Web award 3", "Web award 4", "Web award 5", "Web award 6",
"Web award 7", "Web award 8", "Web award 9", "Web award 10", "Web award 11", "Web award 12", "Web award 13", "Web award 14",
- "Web award 15", "Web award 16", "Web award 1", "Left skull lane", "Enter skull lane", "Right skull lane", NULL, "Start button"
+ "Web award 15", "Web award 16", "Web award 1", "Left skull lane", "Enter skull lane", "Right skull lane", nullptr, "Start button"
};
const char *const wpc_95_state::outputs_ss[52] = {
@@ -1780,9 +1780,9 @@ const char *const wpc_95_state::outputs_ss[52] = {
"s:Trough eject", "s:Left sling", "s:Right sling", "s:Center jet", "s:Upper jet", "s:Lower jet", "s:Upper slingshot", "s:Crate post hold",
"f:Top jet flasher", "f:Mid jet flasher", "f:Lower jet flash", "f:Playfield bolts", "f:Blue skull fl", "f:U right flasher", "f:Lft ramp flasher", "f:C left flasher",
"f:White skull fl", "f:Center TV", "f:U left flasher", "f:C right flasher", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:Lft divert power", "s:Lft divert hold", "f:L left flasher", "f:L right flasher", NULL, NULL, NULL, NULL,
- NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "s:Lft divert power", "s:Lft divert hold", "f:L left flasher", "f:L right flasher", nullptr, nullptr, nullptr, nullptr,
+ nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Upper playfield", "g:Center playfield", "g:Lower playfield"
};
@@ -1907,7 +1907,7 @@ const char *const wpc_95_state::outputs_totan[52] = {
"f:Start tale fls", "f:Jet flashers", "f:Top loop flash", "f:Ramp flash", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
"s:Left div high", "s:Left div hold", "s:Vanish magnet", "s:Loop post div", "s:", "s:", "s:", "s:",
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Illum string 1", "g:Illum string 2", "g:Illum string 3"
};
@@ -2010,7 +2010,7 @@ INPUT_PORTS_END
const char *const wpc_95_state::lamps_cp[64] = {
"Heavy bag cmplt", "Jump rope cmplt", "Speed bag cmplt", "Right jab combo", "Lock", "Rgt start fight", "Right jackpot", "Right jab",
"Bout 1", "Bout 2", "Bout 3", "Bout 4", "Jump rope", "Left jab combo", "Cnt start fight", "Left jab",
- "Low blue arrow", "Left hook to win", "White arrow", "Thrown towel", "Cntr blue arrow", "Low yellow arrow", "Top yellow arrow", NULL,
+ "Low blue arrow", "Left hook to win", "White arrow", "Thrown towel", "Cntr blue arrow", "Low yellow arrow", "Top yellow arrow", nullptr,
"Left hook", "Body blow", "Right hook", "Center jackpot", "Left KO boxer", "Hurry up", "Heavy bag", "Right KO boxer",
"Jackpots cmplt", "Pub champion", "Won by KO", "Multiballs cmplt", "Training cmplt", "Speed bag", "Left jackpot", "Balcony",
"Ultimate chlng", "Poker night", "Extra ball", "Spittn gallery", "Lft start fight", "The corner", "Right return", "Rght second wind",
@@ -2025,7 +2025,7 @@ const char *const wpc_95_state::outputs_cp[52] = {
"s:Rope motor", "s:Toggle direction", "s:Motor on/off", "s:Lock pin", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
"s:Rope popper", "s:Ramp divertor", "s:Left speed bag", "s:Right speed bag", "s:", "s:", "s:", "s:",
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Illum string 1", "g:Illum string 2", "g:Illum string 3"
};
@@ -2133,24 +2133,24 @@ static INPUT_PORTS_START( cp )
INPUT_PORTS_END
const char *const wpc_95_state::lamps_ttt[64] = {
- "Hole \"5\"", "Hole \"6\"", "Hole \"7\"", "Hole \"8\"", "Hole \"9\"", NULL, NULL, NULL,
- NULL, "Grid \"1\"", "Grid \"2\"", "Grid \"3\"", "Grid \"4\"", "Grid \"5\"", "Grid \"6\"", "Grid \"7\"",
+ "Hole \"5\"", "Hole \"6\"", "Hole \"7\"", "Hole \"8\"", "Hole \"9\"", nullptr, nullptr, nullptr,
+ nullptr, "Grid \"1\"", "Grid \"2\"", "Grid \"3\"", "Grid \"4\"", "Grid \"5\"", "Grid \"6\"", "Grid \"7\"",
"Grid \"8\"", "Grid \"9\"", "Left post", "Right post", "Hole \"1\"", "Hole \"2\"", "Hole \"3\"", "Hole \"4\"",
- "Back panel 1", "Back panel 2", "Back panel 3", "Back panel 4", "Back panel 5", "Back panel 6", NULL, NULL,
+ "Back panel 1", "Back panel 2", "Back panel 3", "Back panel 4", "Back panel 5", "Back panel 6", nullptr, nullptr,
"Left sling up", "Left sling low", "Left ret left", "Left ret right", "Right sling up", "Right sling low", "Right ret right", "Right ret left",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Start button"
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "Start button"
};
const char *const wpc_95_state::outputs_ttt[52] = {
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- "s:Kicker", "f:Fl left post", "f:Fl right post", "f:Fl insert 1", "f:Fl insert 2", "f:Fl insert 3", "f:Fl insert 4", NULL,
- "f:Left flasher", "f:Right flasher", "f:Fl left sling", "f:Fl left return", "f:Fl back panel 1", "f:Fl back panel 2", "f:Fl back panel 3", NULL,
- NULL, "s:Ticket lamp", "f:Fl right sling", "f:Fl right return", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:R post power", "s:R post hold", "s:L post power", "s:L post hold", NULL, NULL, NULL, NULL,
- NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
+ "s:Kicker", "f:Fl left post", "f:Fl right post", "f:Fl insert 1", "f:Fl insert 2", "f:Fl insert 3", "f:Fl insert 4", nullptr,
+ "f:Left flasher", "f:Right flasher", "f:Fl left sling", "f:Fl left return", "f:Fl back panel 1", "f:Fl back panel 2", "f:Fl back panel 3", nullptr,
+ nullptr, "s:Ticket lamp", "f:Fl right sling", "f:Fl right return", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
+ "s:R post power", "s:R post hold", "s:L post power", "s:L post hold", nullptr, nullptr, nullptr, nullptr,
+ nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Insert top", "g:Insert middle", "g:Insert bottom"
};
diff --git a/src/mame/drivers/wpc_an.cpp b/src/mame/drivers/wpc_an.cpp
index 49cc252f52a..fdb80ec59ef 100644
--- a/src/mame/drivers/wpc_an.cpp
+++ b/src/mame/drivers/wpc_an.cpp
@@ -349,7 +349,7 @@ ROM_START(dd_p7)
ROM_LOAD("dude_u19.l1", 0x20000, 0x10000, CRC(dc7b985b) SHA1(f672d1f1fe1d1d887113ea6ccd745a78f7760526))
ROM_LOAD("dude_u20.l1", 0x30000, 0x10000, CRC(a83d53dd) SHA1(92a81069c42c7760888201fb0787fa7ddfbf1658))
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(dd_p06)
@@ -360,7 +360,7 @@ ROM_START(dd_p06)
ROM_LOAD("dude_u19.l1", 0x20000, 0x10000, CRC(dc7b985b) SHA1(f672d1f1fe1d1d887113ea6ccd745a78f7760526))
ROM_LOAD("dude_u20.l1", 0x30000, 0x10000, CRC(a83d53dd) SHA1(92a81069c42c7760888201fb0787fa7ddfbf1658))
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
/*-------------
@@ -383,7 +383,7 @@ ROM_START(fh_l9)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(fh_l9b)
@@ -403,7 +403,7 @@ ROM_START(fh_l9b)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(fh_l3)
@@ -423,7 +423,7 @@ ROM_START(fh_l3)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(fh_l4)
@@ -443,7 +443,7 @@ ROM_START(fh_l4)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(fh_l5)
@@ -463,7 +463,7 @@ ROM_START(fh_l5)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(fh_905h)
@@ -483,7 +483,7 @@ ROM_START(fh_905h)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
@@ -503,7 +503,7 @@ ROM_START(hd_l3)
ROM_RELOAD( 0x080000 + 0x40000, 0x20000)
ROM_RELOAD( 0x080000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(hd_l1)
@@ -519,7 +519,7 @@ ROM_START(hd_l1)
ROM_RELOAD( 0x080000 + 0x40000, 0x20000)
ROM_RELOAD( 0x080000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
/*-----------------
@@ -542,7 +542,7 @@ ROM_START(bop_l7)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(bop_l6)
@@ -562,7 +562,7 @@ ROM_START(bop_l6)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(bop_l5)
@@ -582,7 +582,7 @@ ROM_START(bop_l5)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(bop_l4)
@@ -602,7 +602,7 @@ ROM_START(bop_l4)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(bop_l3)
@@ -622,7 +622,7 @@ ROM_START(bop_l3)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
ROM_START(bop_l2)
@@ -642,7 +642,7 @@ ROM_START(bop_l2)
ROM_RELOAD( 0x100000 + 0x40000, 0x20000)
ROM_RELOAD( 0x100000 + 0x60000, 0x20000)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
/*===========
@@ -652,9 +652,9 @@ ROM_START(tfa_13)
ROM_REGION(0x30000, "maincpu", ROMREGION_ERASEFF)
ROM_LOAD("u6_l3.rom", 0x10000, 0x20000, CRC(bf4a37b5) SHA1(91b8bba6182e818a34252a4b2a0b86a2a44d9c42))
ROM_REGION(0x180000, "sound1",0)
- ROM_FILL(0x0000,0x180000,0x00)
+ ROM_FILL(0x0000,0x180000,nullptr)
ROM_REGION(0x8000, "fixed", 0)
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_END
GAME(1990, tfa_13, 0, wpc_an, wpc_an, wpc_an_state, wpc_an, ROT0, "Bally", "WPC Test Fixture: Alphanumeric (1.3)", MACHINE_IS_SKELETON_MECHANICAL)
diff --git a/src/mame/drivers/wpc_dcs.cpp b/src/mame/drivers/wpc_dcs.cpp
index e6c2cefe1ef..e14ed6b0350 100644
--- a/src/mame/drivers/wpc_dcs.cpp
+++ b/src/mame/drivers/wpc_dcs.cpp
@@ -253,43 +253,43 @@ void wpc_dcs_state::init()
DRIVER_INIT_MEMBER(wpc_dcs_state, dm)
{
- lamp->set_names(NULL);
- out->set_names(NULL);
+ lamp->set_names(nullptr);
+ out->set_names(nullptr);
init();
}
DRIVER_INIT_MEMBER(wpc_dcs_state, ij)
{
- lamp->set_names(NULL);
- out->set_names(NULL);
+ lamp->set_names(nullptr);
+ out->set_names(nullptr);
init();
}
DRIVER_INIT_MEMBER(wpc_dcs_state, jd)
{
- lamp->set_names(NULL);
- out->set_names(NULL);
+ lamp->set_names(nullptr);
+ out->set_names(nullptr);
init();
}
DRIVER_INIT_MEMBER(wpc_dcs_state, pop)
{
- lamp->set_names(NULL);
- out->set_names(NULL);
+ lamp->set_names(nullptr);
+ out->set_names(nullptr);
init();
}
DRIVER_INIT_MEMBER(wpc_dcs_state, sttng)
{
- lamp->set_names(NULL);
- out->set_names(NULL);
+ lamp->set_names(nullptr);
+ out->set_names(nullptr);
init();
}
DRIVER_INIT_MEMBER(wpc_dcs_state, afv)
{
- lamp->set_names(NULL);
- out->set_names(NULL);
+ lamp->set_names(nullptr);
+ out->set_names(nullptr);
init();
}
diff --git a/src/mame/drivers/wpc_dot.cpp b/src/mame/drivers/wpc_dot.cpp
index 959b7a1daff..7f2aef3c0b6 100644
--- a/src/mame/drivers/wpc_dot.cpp
+++ b/src/mame/drivers/wpc_dot.cpp
@@ -657,7 +657,7 @@ ROM_START(tfdmd_l3)
ROM_REGION(0x20000, "code", 0)
ROM_LOAD("u6_l3.rom", 0x00000, 0x20000, CRC(bd43e28c) SHA1(df0a64a9fddbc59e3edde56ae12b68f76e44ba2e))
ROM_REGION(0x180000, "sound1", 0)
- ROM_FILL(0x0000,0x180000,0x00)
+ ROM_FILL(0x0000,0x180000,nullptr)
ROM_END
diff --git a/src/mame/drivers/wpc_s.cpp b/src/mame/drivers/wpc_s.cpp
index 2e197dd7121..20b4f565504 100644
--- a/src/mame/drivers/wpc_s.cpp
+++ b/src/mame/drivers/wpc_s.cpp
@@ -359,8 +359,8 @@ DRIVER_INIT_MEMBER(wpc_s_state, wcs)
DRIVER_INIT_MEMBER(wpc_s_state, tfs)
{
pic->set_serial("648 123456 12345 123");
- lamp->set_names(NULL);
- out->set_names(NULL);
+ lamp->set_names(nullptr);
+ out->set_names(nullptr);
init();
}
@@ -376,13 +376,13 @@ const char *const wpc_s_state::lamps_corv[64] = {
};
const char *const wpc_s_state::outputs_corv[54] = {
- "s:Trough eject", "s:ZR1 low rev gate", "s:Kickback", "s:Pit stop popper", "s:ZR1 up rev gate", NULL, "s:Knocker", "s:Route 66 kickout",
- "s:L slingshot", "s:R slingshot", "s:Left jet", "s:Bottom jet", "s:Right jet", NULL, "s:ZR1 lockup", "s:Loop gate",
+ "s:Trough eject", "s:ZR1 low rev gate", "s:Kickback", "s:Pit stop popper", "s:ZR1 up rev gate", nullptr, "s:Knocker", "s:Route 66 kickout",
+ "s:L slingshot", "s:R slingshot", "s:Left jet", "s:Bottom jet", "s:Right jet", nullptr, "s:ZR1 lockup", "s:Loop gate",
"s:Race direction", "s:L race enable", "s:R race enable", "f:Tenth corvette", "f:Jets", "f:R ramps", "f:U L flipper", "f:Catch me",
"f:ZR1 ramp", "f:ZR1 underside", "f:R rear panel", "f:R standup", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:Diverter power", "s:Diverter hold", "s:UL flip power", "s:UL flip hold", NULL, NULL, NULL, NULL,
- NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "s:Diverter power", "s:Diverter hold", "s:UL flip power", "s:UL flip hold", nullptr, nullptr, nullptr, nullptr,
+ nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Upper left", "g:Upper right", "g:Lower left", "g:Lower right", "g:Back box title"
};
@@ -503,7 +503,7 @@ const char *const wpc_s_state::lamps_dh[64] = {
"Safehouse badge", "L ramp badge", "Sil 3 bullet", "Super jackpot", "L ramp generic", "Ramp start mball", "Magazine award", "Contraband",
"Safehouse arrow", "Sil 4 bullet", "Sil 5 bullet", "L loop HQ", "Whse start mball", "Feel lucky", "Right shootout", "Lite ransom",
"L loop generic", "Ricochet", "Extra ball", "HQ badge", "Ransom", "Sil 1 bullet", "HQ", "Sil 2 bullet",
- NULL, NULL, NULL, NULL, NULL, NULL, "Shhot again", "Sil 7 bullet",
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "Shhot again", "Sil 7 bullet",
"Sil 8 bullet", "Left shootout", "Lite magna force", "L/R jets", "Bottom jet", "Body armor", "Extra ball", "Start"
};
@@ -512,9 +512,9 @@ const char *const wpc_s_state::outputs_dh[54] = {
"s:Left sling", "s:Right sling", "s:Left jet", "s:Middle jet", "s:Right jet", "s:Left popper", "s:Right diverter", "s:Trap door hold",
"f:Headquarters", "f:Top L popper", "f:Warehouse", "s:Gun motor", "f:Gun loaded", "f:Right ramp", "f:Right back", "f:Left back",
"s:Drop reset", "s:Top L popper", "s:Left diverter", "s:Right loop gate", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:UR flip power", "s:UR flip hold", "s:R loop magnet", "s:Left loop gate", NULL, NULL, NULL, NULL,
+ "s:UR flip power", "s:UR flip hold", "s:R loop magnet", "s:Left loop gate", nullptr, nullptr, nullptr, nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Right string", "g:Left string", "g:Backbox title", "g:Backbox face", "g:Bottom string"
};
@@ -634,19 +634,19 @@ const char *const wpc_s_state::lamps_i500[64] = {
"Hit the \"wall\"", "Hit \"the\" wall", "\"Hit\" the wall", "Lft ramp jackpot", "Increase boost", "Souvenir lamp", "Left flip lane", "Left outlane",
"Super jets", "Turbo boost", "Checkered flag", "Go for the pole", "Quick pit", "3X playfield", "UR flip wrench", "Right flip lane",
"Dueling drivers", "Super lightups", "Caution flag", "Extra ball flag", "Wrong turn", "Gasoline alley", "Right outlane", "Shoot again",
- "Change setup", "Award speedway", "Hit the wall", "Rt ramp jackpot", "Pit stop", "Fast laps", NULL, NULL,
+ "Change setup", "Award speedway", "Hit the wall", "Rt ramp jackpot", "Pit stop", "Fast laps", nullptr, nullptr,
"Stnd1 lower RT", "Stnd1 upper RT", "Stnd1 upper left", "Stnd1 lower left", "Stnd2 lower RT", "Stnd2 upper RT", "Stnd2 upper left", "Stnd2 lower left",
- "Stnd3 lower RT", "Stnd3 upper RT", "Stnd3 upper left", "Stnd3 lower left", NULL, "Launch button", "Buy-in button", "Start button"
+ "Stnd3 lower RT", "Stnd3 upper RT", "Stnd3 upper left", "Stnd3 lower left", nullptr, "Launch button", "Buy-in button", "Start button"
};
const char *const wpc_s_state::outputs_i500[54] = {
- "s:Auto plunger", "s:Upper popper", "s:Upper eject", "s:Lower eject", "s:Turbo popper", NULL, "s:Knocker", "s:Left jet",
- "s:Right jet", "s:Center jet", "s:Left sling", "s:Right sling", "s:Trough", NULL, "f:Upper popper fls", "f:Top left corner",
+ "s:Auto plunger", "s:Upper popper", "s:Upper eject", "s:Lower eject", "s:Turbo popper", nullptr, "s:Knocker", "s:Left jet",
+ "s:Right jet", "s:Center jet", "s:Left sling", "s:Right sling", "s:Trough", nullptr, "f:Upper popper fls", "f:Top left corner",
"f:Top right corner", "s:Race track motor", "f:Orange car", "f:Yellow car", "f:Blue car", "f:Green car", "f:Lft jet flasher", "f:Rt jet flasher",
"f:Cntr jet flasher", "f:Right side", "f:Left side (2)", "f:Rt ramp enter", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:UR flip power", "s:UR flip hold", "s:Diverter power", "s:Diverter hold", NULL, NULL, NULL, NULL,
+ "s:UR flip power", "s:UR flip hold", "s:Diverter power", "s:Diverter hold", nullptr, nullptr, nullptr, nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Upper lft plyfld", "g:Upper rt plyfld", "g:Lower playfield", "g:Backbox", "g:Title-coindoor"
};
@@ -765,13 +765,13 @@ const char *const wpc_s_state::lamps_jb[64] = {
};
const char *const wpc_s_state::outputs_jb[54] = {
- "s:Ball release", NULL, "s:Game saucer", "s:Drop targets", "s:Right eject hole", "s:Raise ramp", "s:Knocker", "s:Left eject hole",
+ "s:Ball release", nullptr, "s:Game saucer", "s:Drop targets", "s:Right eject hole", "s:Raise ramp", "s:Knocker", "s:Left eject hole",
"s:Left slingshot", "s:Right slingshot", "s:Lower jet bumper", "s:Left jet bumber", "s:Upper jet bumper", "s:Drop ramp", "f:Right visor", "f:Left visor",
"f:Center visor", "f:Pinbot face", "f:Jet bumpers", "f:Lower left", "f:Mid left", "f:Lower right", "f:Back panel 1 (L)", "f:Back panel 2",
- "f:Back panel 3", "f:Back panel 4", "f:Back panel 5 (R)", NULL, "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ "f:Back panel 3", "f:Back panel 4", "f:Back panel 5 (R)", nullptr, "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Playfield lower", "g:Playfield left", "g:Playfield upper", "g:Playfield right", "g:Insert"
};
@@ -874,7 +874,7 @@ INPUT_PORTS_END
const char *const wpc_s_state::lamps_jm[64] = {
"Mode ready", "Download", "Access code 2", "Access code 1", "Upload", "Left jet lane", "Middle jet lane", "Right jet lane",
"Power down", "NAS cure", "R ramp block 4", "Sector 6", "R ramp block 2", "Hold bonus", "R standup R blk", "R standup L blk",
- "L ramp block 4", "Extra ball", "Sector 2", "L ramp block 2", "L ramp block 1", "Sector 1", NULL, "Shoot again",
+ "L ramp block 4", "Extra ball", "Sector 2", "L ramp block 2", "L ramp block 1", "Sector 1", nullptr, "Shoot again",
"L loop top arrow", "L standup arrow", "R ramp block 1", "Lite spinner", "Big points", "Gigabytes", "Lite extra ball", "Quick multiball",
"Cyber matrix 13", "Cyber matrix 23", "Cyber matrix 33", "Right outlane", "Bonus held", "Bonus 4x", "Bonus 3x", "Bonus 2x",
"Cyber matrix 12", "Cyber matrix 22", "Cyber matrix 32", "Right flip lane", "Sector 5", "Spinner millions", "Cyber lock 2", "Inner loop top",
@@ -883,13 +883,13 @@ const char *const wpc_s_state::lamps_jm[64] = {
};
const char *const wpc_s_state::outputs_jm[54] = {
- "s:Trough eject", "s:Autoplunger", "s:Popper", NULL, "s:Clear matrix", "s:Hand magnet", "s:Knocker", NULL,
+ "s:Trough eject", "s:Autoplunger", "s:Popper", nullptr, "s:Clear matrix", "s:Hand magnet", "s:Knocker", nullptr,
"s:Left sling", "s:Right sling", "s:Left jet", "s:Bottom jet", "s:Right jet", "s:Crazy Bob's", "s:Drop target up", "s:Drop target down",
"f:Jets", "f:Crazy Bob's", "f:Left sling", "f:Right sling", "s:X mot direction", "s:X motor enable", "s:Y mot direction", "s:Y motor enable",
"f:Left ramp", "f:Right ramp", "f:Hand popper", "f:R backpanel", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:L diverter power", "s:L diverter hold", "s:R diverter power", "s:R diverter hold", NULL, NULL, NULL, NULL,
+ "s:L diverter power", "s:L diverter hold", "s:R diverter power", "s:R diverter hold", nullptr, nullptr, nullptr, nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:String 1", "g:String 2", "g:String 3", "g:String 4", "g:String 5"
};
@@ -1001,7 +1001,7 @@ const char *const wpc_s_state::lamps_nf[64] = {
"No fear", "20 million", "Light extra ball", "R over the edge", "Air", "Snow", "Fear fest", "Meet your maker",
"Skull", "R track", "Center jackpot", "Extra ball", "Start challenge", "Center lock", "R autofire (2)", "L hurry up",
"L track", "1st", "2nd", "3rd", "Skydive", "Drop jackpot", "Drop lock", "L autofire (2)",
- "Raceway", "L ramp \"turn\"", "Super spin", "L ramp \"start\"", "L ramp \"win!\"", "Hill climb", "Screamer", NULL,
+ "Raceway", "L ramp \"turn\"", "Super spin", "L ramp \"start\"", "L ramp \"win!\"", "Hill climb", "Screamer", nullptr,
"Tube", "Video mode", "R ramp \"win!\"", "R ramp \"turn\"", "R ramp \"start\"", "L flipper lane", "L outlane", "Kickback",
"Light kb top", "Light kb bottom", "R flipper lane", "R outlane", "Hairpin", "Downhill", "Summit", "R hurry up",
"Shoot again", "L skull eye", "Jump now", "Super jackpot", "R skull eye", "Ball launch", "Buy-in button", "Start button"
@@ -1009,12 +1009,12 @@ const char *const wpc_s_state::lamps_nf[64] = {
const char *const wpc_s_state::outputs_nf[54] = {
"s:Right popper", "s:Auto plunger", "s:Right magnet", "s:Kickback", "s:Center magnet", "s:Left magnet", "s:Knocker", "s:Drop target down",
- NULL, "s:Right slingshot", "s:Left slingshot", "s:Drop target up", NULL, "s:Trough", "s:Eject", "s:Skull mouth",
+ nullptr, "s:Right slingshot", "s:Left slingshot", "s:Drop target up", nullptr, "s:Trough", "s:Eject", "s:Skull mouth",
"f:Fls(2) flip rtrn", "f:Fls spinner", "f:Fls no fear", "f:Fls(3) rt ramp", "f:Fls(2) skull", "f:Fls bkbox expl", "f:Fls(3) left ramp", "f:Fls top left",
"f:Fls(2) auto-fire", "f:Fls bkbox L top", "f:Fls bkbox R top", "f:Fls rt popper", "s:R flip power", "s:R flip hold", "s:L flip power", "s:L flip hold",
- "s:UR flip power", "s:UR flip hold", NULL, NULL, NULL, NULL, NULL, NULL,
+ "s:UR flip power", "s:UR flip hold", nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Playfield top", "g:Playfield right", "g:Playfield left", "g:Insert title", "g:Insert bkground"
};
@@ -1132,7 +1132,7 @@ const char *const wpc_s_state::outputs_rs[54] = {
"s:Top jet", "s:Left jet", "s:Right jet", "s:Shaker motor", "s:", "s:", "s:", "s:",
"s:", "s:", "s:", "s:", "f:Little flipper", "f:Left ramp", "f:Back white", "f:Back yellow",
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:Playfld/insert 1", "g:Playfld/insert 2", "g:Playfld/insert 3", "g:Right playfield", "g:Left playfield"
};
@@ -1257,7 +1257,7 @@ const char *const wpc_s_state::outputs_fs[54] = {
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:", "g:", "g:", "g:", "g:"
};
@@ -1382,7 +1382,7 @@ const char *const wpc_s_state::outputs_ts[54] = {
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:", "g:", "g:", "g:", "g:"
};
@@ -1507,7 +1507,7 @@ const char *const wpc_s_state::outputs_tom[54] = {
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:", "g:", "g:", "g:", "g:"
};
@@ -1632,7 +1632,7 @@ const char *const wpc_s_state::outputs_wd[54] = {
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:", "g:", "g:", "g:", "g:"
};
@@ -1757,7 +1757,7 @@ const char *const wpc_s_state::outputs_wcs[54] = {
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:", "s:", "s:", "s:", "s:", "s:", "s:", "s:",
"s:Coin meter",
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
"g:", "g:", "g:", "g:", "g:"
};
diff --git a/src/mame/drivers/wswan.cpp b/src/mame/drivers/wswan.cpp
index bb13d3a291c..8e064ec85f1 100644
--- a/src/mame/drivers/wswan.cpp
+++ b/src/mame/drivers/wswan.cpp
@@ -139,7 +139,7 @@ static MACHINE_CONFIG_START( wswan, wswan_state )
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
/* cartridge */
- MCFG_WSWAN_CARTRIDGE_ADD("cartslot", wswan_cart, NULL)
+ MCFG_WSWAN_CARTRIDGE_ADD("cartslot", wswan_cart, nullptr)
/* software lists */
MCFG_SOFTWARE_LIST_ADD("cart_list","wswan")
diff --git a/src/mame/drivers/x07.cpp b/src/mame/drivers/x07.cpp
index a745bf2f2f8..4cb0db32f25 100644
--- a/src/mame/drivers/x07.cpp
+++ b/src/mame/drivers/x07.cpp
@@ -156,8 +156,8 @@ void x07_state::t6834_cmd (UINT8 cmd)
case 0x0c: //ALM$ write
{
- for(int i = 0; i < 8; i++)
- m_alarm[i] = m_in.data[m_in.read++];
+ for(auto & elem : m_alarm)
+ elem = m_in.data[m_in.read++];
}
break;
@@ -500,8 +500,8 @@ void x07_state::t6834_cmd (UINT8 cmd)
case 0x36: //alarm read
{
- for(int i = 0; i < 8; i++)
- m_out.data[m_out.write++] = m_alarm[i];
+ for(auto & elem : m_alarm)
+ m_out.data[m_out.write++] = elem;
}
break;
@@ -1052,7 +1052,7 @@ DEVICE_IMAGE_LOAD_MEMBER( x07_state, x07_card )
UINT32 size = m_card->common_get_size("rom");
// check card type
- if (image.software_entry() != NULL)
+ if (image.software_entry() != nullptr)
{
const char *card_type = image.get_feature("card_type");
diff --git a/src/mame/drivers/x1.cpp b/src/mame/drivers/x1.cpp
index 796f676dab0..f495eab522d 100644
--- a/src/mame/drivers/x1.cpp
+++ b/src/mame/drivers/x1.cpp
@@ -761,7 +761,7 @@ void x1_state::cmt_command( UINT8 cmd )
*/
m_cmt_current_cmd = cmd;
- if(m_cassette->get_image() == NULL) //avoid a crash if a disk game tries to access this
+ if(m_cassette->get_image() == nullptr) //avoid a crash if a disk game tries to access this
return;
switch(cmd)
@@ -810,7 +810,7 @@ void x1_state::cmt_command( UINT8 cmd )
TIMER_DEVICE_CALLBACK_MEMBER(x1_state::x1_cmt_wind_timer)
{
- if(m_cassette->get_image() == NULL) //avoid a crash if a disk game tries to access this
+ if(m_cassette->get_image() == nullptr) //avoid a crash if a disk game tries to access this
return;
switch(m_cmt_current_cmd)
@@ -922,7 +922,7 @@ WRITE8_MEMBER( x1_state::x1_sub_io_w )
// bit 1 = tape inserted
// bit 2 = record status (1=OK, 0=write protect)
m_sub_val[0] = 0x05;
- if(m_cassette->get_image() != NULL)
+ if(m_cassette->get_image() != nullptr)
m_sub_val[0] |= 0x02;
m_sub_cmd_length = 1;
logerror("CMT: Command 0xEB received, returning 0x%02x.\n",m_sub_val[0]);
@@ -1023,7 +1023,7 @@ READ8_MEMBER( x1_state::x1_fdc_r )
WRITE8_MEMBER( x1_state::x1_fdc_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
switch(offset+0xff8)
{
@@ -2231,7 +2231,7 @@ static const z80_daisy_config x1_daisy[] =
{
{ "x1kb" },
{ "ctc" },
- { NULL }
+ { nullptr }
};
static const z80_daisy_config x1turbo_daisy[] =
@@ -2240,7 +2240,7 @@ static const z80_daisy_config x1turbo_daisy[] =
{ "ctc" },
{ "dma" },
{ "sio" },
- { NULL }
+ { nullptr }
};
/*************************************
diff --git a/src/mame/drivers/x1twin.cpp b/src/mame/drivers/x1twin.cpp
index 3877aaa1510..b7ff8e3323e 100644
--- a/src/mame/drivers/x1twin.cpp
+++ b/src/mame/drivers/x1twin.cpp
@@ -391,7 +391,7 @@ static const z80_daisy_config x1_daisy[] =
{
{ "x1kb" },
{ "ctc" },
- { NULL }
+ { nullptr }
};
static SLOT_INTERFACE_START( x1_floppies )
@@ -526,7 +526,7 @@ ROM_START( x1twin )
ROM_REGION(0x1800, "cgrom", 0)
ROM_LOAD("ank8.rom", 0x00000, 0x00800, CRC(e3995a57) SHA1(1c1a0d8c9f4c446ccd7470516b215ddca5052fb2) )
- ROM_COPY("font", 0x00000, 0x00800, 0x1000 )
+ ROM_COPY("font", nullptr, 0x00800, 0x1000 )
ROM_REGION(0x20000, "kanji", ROMREGION_ERASEFF)
diff --git a/src/mame/drivers/x68k.cpp b/src/mame/drivers/x68k.cpp
index f5cc80da69d..32222745eaf 100644
--- a/src/mame/drivers/x68k.cpp
+++ b/src/mame/drivers/x68k.cpp
@@ -1722,7 +1722,7 @@ static MACHINE_CONFIG_START( x68000, x68k_state )
MCFG_SOFTWARE_LIST_ADD("flop_list","x68k_flop")
MCFG_DEVICE_ADD("exp", X68K_EXPANSION_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(x68000_exp_cards, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(x68000_exp_cards, nullptr, false)
MCFG_X68K_EXPANSION_SLOT_OUT_IRQ2_CB(WRITELINE(x68k_state, x68k_irq2_line))
MCFG_X68K_EXPANSION_SLOT_OUT_IRQ4_CB(INPUTLINE("maincpu", M68K_IRQ_4))
MCFG_X68K_EXPANSION_SLOT_OUT_NMI_CB(INPUTLINE("maincpu", INPUT_LINE_NMI))
@@ -1782,9 +1782,9 @@ ROM_START( x68000 )
ROM_SYSTEM_BIOS(3, "ipl13", "IPL-ROM V1.3 (92/11/27)")
ROMX_LOAD( "iplrom30.dat", 0xfe0000, 0x020000, CRC(e8f8fdad) SHA1(239e9124568c862c31d9ec0605e32373ea74b86a), ROM_BIOS(4) )
ROM_REGION(0x8000, "user1",0) // For Background/Sprite decoding
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_REGION(0x20000, "user2", 0)
- ROM_FILL(0x000,0x20000,0x00)
+ ROM_FILL(0x000,0x20000,nullptr)
ROM_END
ROM_START( x68ksupr )
@@ -1802,9 +1802,9 @@ ROM_START( x68ksupr )
ROM_LOAD("scsiinsu.bin",0xfc0000, 0x002000, CRC(f65a3e24) SHA1(15a17798839a3f7f361119205aebc301c2df5967) ) // Dumped from an X68000 Super HD
// ROM_LOAD("scsiexrom.dat",0xea0000, 0x002000, NO_DUMP )
ROM_REGION(0x8000, "user1",0) // For Background/Sprite decoding
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_REGION(0x20000, "user2", 0)
- ROM_FILL(0x000,0x20000,0x00)
+ ROM_FILL(0x000,0x20000,nullptr)
ROM_END
ROM_START( x68kxvi )
@@ -1822,9 +1822,9 @@ ROM_START( x68kxvi )
ROM_LOAD("scsiinco.bin",0xfc0000, 0x002000, CRC(2485e14d) SHA1(101a9bba8ea4bb90965c144bcfd7182f889ab958) ) // Dumped from an X68000 XVI Compact
// ROM_LOAD("scsiexrom.dat",0xea0000, 0x002000, NO_DUMP )
ROM_REGION(0x8000, "user1",0) // For Background/Sprite decoding
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_REGION(0x20000, "user2", 0)
- ROM_FILL(0x000,0x20000,0x00)
+ ROM_FILL(0x000,0x20000,nullptr)
ROM_END
ROM_START( x68030 )
@@ -1842,9 +1842,9 @@ ROM_START( x68030 )
ROM_LOAD("scsiinrom.dat",0xfc0000, 0x002000, CRC(1c6c889e) SHA1(3f063d4231cdf53da6adc4db96533725e260076a) BAD_DUMP )
// ROM_LOAD("scsiexrom.dat",0xea0000, 0x002000, NO_DUMP )
ROM_REGION(0x8000, "user1",0) // For Background/Sprite decoding
- ROM_FILL(0x0000,0x8000,0x00)
+ ROM_FILL(0x0000,0x8000,nullptr)
ROM_REGION(0x20000, "user2", 0)
- ROM_FILL(0x000,0x20000,0x00)
+ ROM_FILL(0x000,0x20000,nullptr)
ROM_END
diff --git a/src/mame/drivers/xain.cpp b/src/mame/drivers/xain.cpp
index 5430585c9b8..ff10801f735 100644
--- a/src/mame/drivers/xain.cpp
+++ b/src/mame/drivers/xain.cpp
@@ -268,7 +268,7 @@ WRITE8_MEMBER(xain_state::m68705_w)
m_from_main = data;
m_mcu_accept = 0;
- if (m_mcu != NULL)
+ if (m_mcu != nullptr)
m_mcu->set_input_line(0, ASSERT_LINE);
}
@@ -358,7 +358,7 @@ CUSTOM_INPUT_MEMBER(xain_state::mcu_status_r)
{
UINT8 res = 0;
- if (m_mcu != NULL)
+ if (m_mcu != nullptr)
{
if (m_mcu_ready == 1)
res |= 0x01;
@@ -378,7 +378,7 @@ READ8_MEMBER(xain_state::mcu_comm_reset_r)
m_mcu_ready = 1;
m_mcu_accept = 1;
- if (m_mcu != NULL)
+ if (m_mcu != nullptr)
m_mcu->set_input_line(0, CLEAR_LINE);
return 0xff;
diff --git a/src/mame/drivers/xerox820.cpp b/src/mame/drivers/xerox820.cpp
index 172d1d2cd3a..891cbc7e65d 100644
--- a/src/mame/drivers/xerox820.cpp
+++ b/src/mame/drivers/xerox820.cpp
@@ -264,7 +264,7 @@ WRITE8_MEMBER( xerox820_state::kbpio_pa_w )
*/
/* drive select */
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -371,7 +371,7 @@ static const z80_daisy_config xerox820_daisy_chain[] =
{ Z80PIO_KB_TAG },
{ Z80PIO_GP_TAG },
{ Z80CTC_TAG },
- { NULL }
+ { nullptr }
};
/* WD1771 Interface */
@@ -586,10 +586,10 @@ static MACHINE_CONFIG_START( xerox820, xerox820_state )
MCFG_Z80DART_OUT_RTSB_CB(DEVWRITELINE(RS232_B_TAG, rs232_port_device, write_rts))
MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80sio0_device, rxa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80sio0_device, rxb_w))
MCFG_DEVICE_ADD(COM8116_TAG, COM8116, XTAL_5_0688MHz)
@@ -673,10 +673,10 @@ static MACHINE_CONFIG_START( xerox820ii, xerox820ii_state )
MCFG_Z80DART_OUT_RTSB_CB(DEVWRITELINE(RS232_B_TAG, rs232_port_device, write_rts))
MCFG_Z80DART_OUT_INT_CB(INPUTLINE(Z80_TAG, INPUT_LINE_IRQ0))
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80sio0_device, rxa_w))
- MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_B_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(Z80SIO_TAG, z80sio0_device, rxb_w))
MCFG_DEVICE_ADD(COM8116_TAG, COM8116, XTAL_5_0688MHz)
diff --git a/src/mame/drivers/xor100.cpp b/src/mame/drivers/xor100.cpp
index ae1b3fbe8be..3d85c372c7d 100644
--- a/src/mame/drivers/xor100.cpp
+++ b/src/mame/drivers/xor100.cpp
@@ -214,7 +214,7 @@ WRITE8_MEMBER( xor100_state::fdc_dcont_w )
*/
// drive select
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -523,7 +523,7 @@ static MACHINE_CONFIG_START( xor100, xor100_state )
MCFG_I8251_DTR_HANDLER(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_dtr))
MCFG_I8251_RTS_HANDLER(DEVWRITELINE(RS232_A_TAG, rs232_port_device, write_rts))
- MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD(RS232_A_TAG, default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(DEVWRITELINE(I8251_A_TAG, i8251_device, write_rxd))
MCFG_RS232_DSR_HANDLER(DEVWRITELINE(I8251_A_TAG, i8251_device, write_dsr))
@@ -556,8 +556,8 @@ static MACHINE_CONFIG_START( xor100, xor100_state )
MCFG_FD1795_ADD(WD1795_TAG, XTAL_8MHz/4)
MCFG_FLOPPY_DRIVE_ADD(WD1795_TAG":0", xor100_floppies, "8ssdd", floppy_image_device::default_floppy_formats)
MCFG_FLOPPY_DRIVE_ADD(WD1795_TAG":1", xor100_floppies, "8ssdd", floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1795_TAG":2", xor100_floppies, NULL, floppy_image_device::default_floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD(WD1795_TAG":3", xor100_floppies, NULL, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1795_TAG":2", xor100_floppies, nullptr, floppy_image_device::default_floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD(WD1795_TAG":3", xor100_floppies, nullptr, floppy_image_device::default_floppy_formats)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
MCFG_CENTRONICS_ACK_HANDLER(DEVWRITELINE(I8255A_TAG, i8255_device, pc4_w))
@@ -569,16 +569,16 @@ static MACHINE_CONFIG_START( xor100, xor100_state )
// S-100
MCFG_S100_BUS_ADD()
MCFG_S100_RDY_CALLBACK(INPUTLINE(Z80_TAG, Z80_INPUT_LINE_WAIT))
- MCFG_S100_SLOT_ADD("s100_1", xor100_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_2", xor100_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_3", xor100_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_4", xor100_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_5", xor100_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_6", xor100_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_7", xor100_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_8", xor100_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_9", xor100_s100_cards, NULL)
- MCFG_S100_SLOT_ADD("s100_10", xor100_s100_cards, NULL)
+ MCFG_S100_SLOT_ADD("s100_1", xor100_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_2", xor100_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_3", xor100_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_4", xor100_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_5", xor100_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_6", xor100_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_7", xor100_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_8", xor100_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_9", xor100_s100_cards, nullptr)
+ MCFG_S100_SLOT_ADD("s100_10", xor100_s100_cards, nullptr)
/* internal ram */
MCFG_RAM_ADD(RAM_TAG)
diff --git a/src/mame/drivers/xtom3d.cpp b/src/mame/drivers/xtom3d.cpp
index eba0bf581b4..6e014064a85 100644
--- a/src/mame/drivers/xtom3d.cpp
+++ b/src/mame/drivers/xtom3d.cpp
@@ -404,8 +404,8 @@ static MACHINE_CONFIG_START( xtom3d, xtom3d_state )
MCFG_FRAGMENT_ADD( pcat_common )
MCFG_PCI_BUS_LEGACY_ADD("pcibus", 0)
- MCFG_PCI_BUS_LEGACY_DEVICE(0, NULL, intel82439tx_pci_r, intel82439tx_pci_w)
- MCFG_PCI_BUS_LEGACY_DEVICE(7, NULL, intel82371ab_pci_r, intel82371ab_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(0, nullptr, intel82439tx_pci_r, intel82439tx_pci_w)
+ MCFG_PCI_BUS_LEGACY_DEVICE(7, nullptr, intel82371ab_pci_r, intel82371ab_pci_w)
/* video hardware */
MCFG_FRAGMENT_ADD( pcvideo_vga )
diff --git a/src/mame/drivers/z100.cpp b/src/mame/drivers/z100.cpp
index 016c86b4334..721ec1e10cf 100644
--- a/src/mame/drivers/z100.cpp
+++ b/src/mame/drivers/z100.cpp
@@ -168,7 +168,7 @@ public:
m_floppy3(*this, "z207_fdc:3"),
m_crtc(*this, "crtc"),
m_palette(*this, "palette"),
- m_floppy(NULL)
+ m_floppy(nullptr)
{ }
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/drivers/z80ne.cpp b/src/mame/drivers/z80ne.cpp
index 1c0fcd7851f..7b8945b2437 100644
--- a/src/mame/drivers/z80ne.cpp
+++ b/src/mame/drivers/z80ne.cpp
@@ -531,8 +531,8 @@ static MACHINE_CONFIG_START( z80netf, z80ne_state )
MCFG_FD1771_ADD("wd1771", XTAL_2MHz / 2)
MCFG_FLOPPY_DRIVE_ADD("wd1771:0", z80ne_floppies, "sssd", z80ne_state::floppy_formats)
MCFG_FLOPPY_DRIVE_ADD("wd1771:1", z80ne_floppies, "sssd", z80ne_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("wd1771:2", z80ne_floppies, NULL, z80ne_state::floppy_formats)
- MCFG_FLOPPY_DRIVE_ADD("wd1771:3", z80ne_floppies, NULL, z80ne_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("wd1771:2", z80ne_floppies, nullptr, z80ne_state::floppy_formats)
+ MCFG_FLOPPY_DRIVE_ADD("wd1771:3", z80ne_floppies, nullptr, z80ne_state::floppy_formats)
MCFG_DEFAULT_LAYOUT(layout_z80netf)
diff --git a/src/mame/drivers/z88.cpp b/src/mame/drivers/z88.cpp
index 4dcef312899..a5ac22c648d 100644
--- a/src/mame/drivers/z88.cpp
+++ b/src/mame/drivers/z88.cpp
@@ -656,13 +656,13 @@ static MACHINE_CONFIG_START( z88, z88_state )
// cartridges
MCFG_DEVICE_ADD("slot1", Z88CART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(z88_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(z88_cart, nullptr, false)
MCFG_Z88CART_SLOT_OUT_FLP_CB(DEVWRITELINE("blink", upd65031_device, flp_w))
MCFG_DEVICE_ADD("slot2", Z88CART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(z88_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(z88_cart, nullptr, false)
MCFG_Z88CART_SLOT_OUT_FLP_CB(DEVWRITELINE("blink", upd65031_device, flp_w))
MCFG_DEVICE_ADD("slot3", Z88CART_SLOT, 0)
- MCFG_DEVICE_SLOT_INTERFACE(z88_cart, NULL, false)
+ MCFG_DEVICE_SLOT_INTERFACE(z88_cart, nullptr, false)
MCFG_Z88CART_SLOT_OUT_FLP_CB(DEVWRITELINE("blink", upd65031_device, flp_w))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/z9001.cpp b/src/mame/drivers/z9001.cpp
index 91ab13e2e03..3ef04b6520c 100644
--- a/src/mame/drivers/z9001.cpp
+++ b/src/mame/drivers/z9001.cpp
@@ -98,7 +98,7 @@ static const z80_daisy_config z9001_daisy_chain[] =
{ "z80pio2" },
{ "z80pio1" },
{ "z80ctc" },
- { NULL }
+ { nullptr }
};
//Bits0,1 not connected; 2,3,4,5 go to a connector; 6 goes to 'graphics' LED; 7 goes to speaker.
diff --git a/src/mame/drivers/zac2650.cpp b/src/mame/drivers/zac2650.cpp
index 92097d8550b..33aaf20123c 100644
--- a/src/mame/drivers/zac2650.cpp
+++ b/src/mame/drivers/zac2650.cpp
@@ -233,8 +233,8 @@ static const gfx_layout s2636_character =
static GFXDECODE_START( tinvader )
GFXDECODE_SCALE( "gfx1", 0, tinvader_character, 0, 2, 3, 3 )
- GFXDECODE_SCALE( NULL, 0x1F00, s2636_character, 0, 2, 4, 3 ) /* dynamic */
- GFXDECODE_SCALE( NULL, 0x1F00, s2636_character, 0, 2, 8, 6 ) /* dynamic */
+ GFXDECODE_SCALE( nullptr, 0x1F00, s2636_character, 0, 2, 4, 3 ) /* dynamic */
+ GFXDECODE_SCALE( nullptr, 0x1F00, s2636_character, 0, 2, 8, 6 ) /* dynamic */
GFXDECODE_END
static MACHINE_CONFIG_START( tinvader, zac2650_state )
diff --git a/src/mame/drivers/zaxxon.cpp b/src/mame/drivers/zaxxon.cpp
index 8aaeb410837..e17ab41afe6 100644
--- a/src/mame/drivers/zaxxon.cpp
+++ b/src/mame/drivers/zaxxon.cpp
@@ -530,12 +530,12 @@ static INPUT_PORTS_START( zaxxon )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)0)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)1)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)2)
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)2)
@@ -691,7 +691,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( razmataz )
PORT_START("SW00")
- PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)0)
+ PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)nullptr)
PORT_START("DIAL.0")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(1)
@@ -719,12 +719,12 @@ static INPUT_PORTS_START( razmataz )
PORT_START("SW100")
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)0)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)nullptr)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)1)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)2)
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)nullptr)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)1)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, (void *)2)
@@ -784,7 +784,7 @@ static INPUT_PORTS_START( ixion )
PORT_INCLUDE(zaxxon)
PORT_MODIFY("SW00")
- PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)0)
+ PORT_BIT( 0xff, 0x00, IPT_SPECIAL) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)nullptr)
PORT_START("DIAL.0")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_RESET
diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp
index d6734c5c6df..880f3a4ef0d 100644
--- a/src/mame/drivers/zn.cpp
+++ b/src/mame/drivers/zn.cpp
@@ -338,7 +338,7 @@ static const struct
{ "tps", mg01, mg02 },
{ "taitofx1", tt01, tt02 },
{ "vspsx", kn01, kn02 },
- { NULL, NULL, NULL }
+ { nullptr, nullptr, nullptr }
};
READ8_MEMBER(zn_state::znsecsel_r)
@@ -446,7 +446,7 @@ void zn_state::driver_start()
int n_game;
n_game = 0;
- while( zn_config_table[ n_game ].s_name != NULL )
+ while( zn_config_table[ n_game ].s_name != nullptr )
{
if( strcmp( machine().system().name, zn_config_table[ n_game ].s_name ) == 0 )
{
@@ -1505,7 +1505,7 @@ static MACHINE_CONFIG_DERIVED( coh1000w, zn1_2mb_vram )
MCFG_RAM_MODIFY("maincpu:ram")
MCFG_RAM_DEFAULT_SIZE("8M")
- MCFG_VT83C461_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_VT83C461_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("maincpu:irq", psxirq_device, intin10))
MCFG_PSX_DMA_CHANNEL_READ( "maincpu", 5, psx_dma_read_delegate( FUNC( zn_state::atpsx_dma_read ), (zn_state *) owner ) )
MCFG_PSX_DMA_CHANNEL_WRITE( "maincpu", 5, psx_dma_write_delegate( FUNC( zn_state::atpsx_dma_write ), (zn_state *) owner ) )
@@ -2153,7 +2153,7 @@ static MACHINE_CONFIG_DERIVED( jdredd, zn1_2mb_vram )
MCFG_DEVICE_MODIFY("gpu")
MCFG_PSXGPU_VBLANK_CALLBACK(vblank_state_delegate( FUNC( zn_state::jdredd_vblank ), (zn_state *) owner))
- MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", NULL, true)
+ MCFG_ATA_INTERFACE_ADD("ata", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(DEVWRITELINE("maincpu:irq", psxirq_device, intin10))
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/zorba.cpp b/src/mame/drivers/zorba.cpp
index 2b0a9aed58d..647ef396c0f 100644
--- a/src/mame/drivers/zorba.cpp
+++ b/src/mame/drivers/zorba.cpp
@@ -265,7 +265,7 @@ WRITE8_MEMBER( zorba_state::pia0_porta_w )
m_beep->set_state(BIT(data, 7));
m_fdc->dden_w(BIT(data, 6));
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (!BIT(data, 0)) floppy = m_floppy0->get_device();
if (!BIT(data, 1)) floppy = m_floppy1->get_device();
diff --git a/src/mame/includes/apollo.h b/src/mame/includes/apollo.h
index 79b884ba218..bccc6cea044 100644
--- a/src/mame/includes/apollo.h
+++ b/src/mame/includes/apollo.h
@@ -371,9 +371,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "ani,bin"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
DECLARE_WRITE16_MEMBER(write);
DECLARE_READ16_MEMBER(read);
@@ -615,7 +615,7 @@ public:
private:
running_machine &machine() const
{
- assert(m_machine != NULL);
+ assert(m_machine != nullptr);
return *m_machine;
}
diff --git a/src/mame/includes/bullet.h b/src/mame/includes/bullet.h
index 390aac07ad8..701346156c7 100644
--- a/src/mame/includes/bullet.h
+++ b/src/mame/includes/bullet.h
@@ -46,7 +46,7 @@ public:
m_floppy5(*this, MB8877_TAG":5"),
m_floppy6(*this, MB8877_TAG":6"),
m_floppy7(*this, MB8877_TAG":7"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_centronics(*this, CENTRONICS_TAG),
m_rom(*this, Z80_TAG),
m_sw1(*this, "SW1"),
diff --git a/src/mame/includes/bw2.h b/src/mame/includes/bw2.h
index 563ce4b4acd..624a086862f 100644
--- a/src/mame/includes/bw2.h
+++ b/src/mame/includes/bw2.h
@@ -43,7 +43,7 @@ public:
m_ram(*this, RAM_TAG),
m_floppy0(*this, WD2797_TAG":0"),
m_floppy1(*this, WD2797_TAG":1"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_rom(*this, Z80_TAG),
m_y0(*this, "Y0"),
m_y1(*this, "Y1"),
diff --git a/src/mame/includes/chihiro.h b/src/mame/includes/chihiro.h
index c91a9a23fdb..a61383cd8ca 100644
--- a/src/mame/includes/chihiro.h
+++ b/src/mame/includes/chihiro.h
@@ -228,13 +228,13 @@ public:
colorformat_rendertarget = nv2a_renderer::NV2A_COLOR_FORMAT_A8R8G8B8;
bytespixel_rendertarget = 4;
antialias_control = 0;
- rendertarget = NULL;
- depthbuffer = NULL;
- displayedtarget = NULL;
+ rendertarget = nullptr;
+ depthbuffer = nullptr;
+ displayedtarget = nullptr;
puller_channel = 0;
puller_waiting = 0;
debug_grab_texttype = -1;
- debug_grab_textfile = NULL;
+ debug_grab_textfile = nullptr;
waitvblank_used = 1;
memset(vertex_attribute_words, 0, sizeof(vertex_attribute_words));
memset(vertex_attribute_offset, 0, sizeof(vertex_attribute_offset));
diff --git a/src/mame/includes/decocass.h b/src/mame/includes/decocass.h
index d395ab02aec..b0f6161a7ce 100644
--- a/src/mame/includes/decocass.h
+++ b/src/mame/includes/decocass.h
@@ -35,7 +35,7 @@ public:
m_screen(*this, "screen"),
m_palette(*this, "palette")
{
- m_type1_map = 0;
+ m_type1_map = nullptr;
}
/* devices */
diff --git a/src/mame/includes/fm7.h b/src/mame/includes/fm7.h
index 797d19657f0..00698e8cf74 100644
--- a/src/mame/includes/fm7.h
+++ b/src/mame/includes/fm7.h
@@ -135,7 +135,7 @@ public:
m_fdc(*this, "fdc"),
m_floppy0(*this, "fdc:0"),
m_floppy1(*this, "fdc:1"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_kanji(*this, "kanji1"),
m_key1(*this, "key1"),
m_key2(*this, "key2"),
diff --git a/src/mame/includes/hp48.h b/src/mame/includes/hp48.h
index 70780f2817d..e6a9533e004 100644
--- a/src/mame/includes/hp48.h
+++ b/src/mame/includes/hp48.h
@@ -191,9 +191,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "crd"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
diff --git a/src/mame/includes/jaguar.h b/src/mame/includes/jaguar.h
index f57ebdd135c..3a85ceb106d 100644
--- a/src/mame/includes/jaguar.h
+++ b/src/mame/includes/jaguar.h
@@ -49,14 +49,14 @@ public:
m_using_cart(false),
m_misc_control_data(0),
m_eeprom_enable(true),
- m_gpu_jump_address(NULL),
+ m_gpu_jump_address(nullptr),
m_gpu_command_pending(false),
m_gpu_spin_pc(0),
- m_main_speedup(NULL),
+ m_main_speedup(nullptr),
m_main_speedup_hits(0),
m_main_speedup_last_cycles(0),
m_main_speedup_max_cycles(0),
- m_main_gpu_wait(NULL),
+ m_main_gpu_wait(nullptr),
m_joystick_data(0),
m_eeprom_bit_count(0),
m_protection_check(0) ,
diff --git a/src/mame/includes/msx.h b/src/mame/includes/msx.h
index d849693ec14..ba8e3e6064f 100644
--- a/src/mame/includes/msx.h
+++ b/src/mame/includes/msx.h
@@ -153,15 +153,15 @@ public:
{
for (int page = 0; page < 4; page++ )
{
- m_all_slots[prim][sec][page] = NULL;
+ m_all_slots[prim][sec][page] = nullptr;
}
}
}
m_mouse[0] = m_mouse[1] = 0;
m_mouse_stat[0] = m_mouse_stat[1] = 0;
- for (int i = 0; i < ARRAY_LENGTH(m_irq_state); i++)
+ for (auto & elem : m_irq_state)
{
- m_irq_state[i] = CLEAR_LINE;
+ elem = CLEAR_LINE;
}
}
@@ -210,7 +210,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(msx_irq_source3) { msx_irq_source(3, state); } // sometimes expansion slot
protected:
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == 0) ? &m_switched_device_as_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == 0) ? &m_switched_device_as_config : nullptr; }
private:
required_device<z80_device> m_maincpu;
diff --git a/src/mame/includes/namcos2.h b/src/mame/includes/namcos2.h
index 5baea40c092..47c76014fa7 100644
--- a/src/mame/includes/namcos2.h
+++ b/src/mame/includes/namcos2.h
@@ -105,7 +105,7 @@ public:
m_gametype(0),
m_c169_roz_videoram(*this, "rozvideoram", 0),
m_c169_roz_gfxbank(0),
- m_c169_roz_mask(NULL),
+ m_c169_roz_mask(nullptr),
m_c355_obj_gfxbank(0),
m_c355_obj_palxor(0),
m_maincpu(*this, "maincpu"),
diff --git a/src/mame/includes/osborne1.h b/src/mame/includes/osborne1.h
index be11edb2927..b84cf506787 100644
--- a/src/mame/includes/osborne1.h
+++ b/src/mame/includes/osborne1.h
@@ -54,10 +54,10 @@ public:
m_bank_0xxx(*this, "bank_0xxx"),
m_bank_1xxx(*this, "bank_1xxx"),
m_bank_fxxx(*this, "bank_fxxx"),
- m_video_timer(NULL),
- m_p_chargen(NULL),
- m_tilemap(NULL),
- m_acia_rxc_txc_timer(NULL)
+ m_video_timer(nullptr),
+ m_p_chargen(nullptr),
+ m_tilemap(nullptr),
+ m_acia_rxc_txc_timer(nullptr)
{ }
diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h
index 1f965e7850b..156556b85ee 100644
--- a/src/mame/includes/rungun.h
+++ b/src/mame/includes/rungun.h
@@ -48,12 +48,12 @@ public:
required_device<screen_device> m_screen;
/* video-related */
- tilemap_t *m_ttl_tilemap;
- tilemap_t *m_936_tilemap;
+ tilemap_t *m_ttl_tilemap[2];
+ tilemap_t *m_936_tilemap[2];
UINT16 *m_psac2_vram;
UINT16 *m_ttl_vram;
UINT16 *m_pal_ram;
- UINT8 m_current_frame_number;
+ UINT8 m_current_display_bank;
int m_ttl_gfx_index;
int m_sprite_colorbase;
diff --git a/src/mame/includes/sage2.h b/src/mame/includes/sage2.h
index a8138e3c716..49a2b6249f8 100644
--- a/src/mame/includes/sage2.h
+++ b/src/mame/includes/sage2.h
@@ -39,7 +39,7 @@ public:
m_ram(*this, RAM_TAG),
m_floppy0(*this, UPD765_TAG ":0"),
m_floppy1(*this, UPD765_TAG ":1"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_centronics(*this, CENTRONICS_TAG),
m_ieee488(*this, IEEE488_TAG),
m_reset(1),
diff --git a/src/mame/includes/samcoupe.h b/src/mame/includes/samcoupe.h
index e576e32f782..ef72ffd10bf 100644
--- a/src/mame/includes/samcoupe.h
+++ b/src/mame/includes/samcoupe.h
@@ -77,14 +77,14 @@ public:
m_io_mouse_y(*this, "mouse_y"),
m_config(*this, "config")
{
- sam_bank_read_ptr[0] = NULL;
- sam_bank_write_ptr[0] = NULL;
- sam_bank_read_ptr[1] = NULL;
- sam_bank_write_ptr[1] = NULL;
- sam_bank_read_ptr[2] = NULL;
- sam_bank_write_ptr[2] = NULL;
- sam_bank_read_ptr[3] = NULL;
- sam_bank_write_ptr[3] = NULL;
+ sam_bank_read_ptr[0] = nullptr;
+ sam_bank_write_ptr[0] = nullptr;
+ sam_bank_read_ptr[1] = nullptr;
+ sam_bank_write_ptr[1] = nullptr;
+ sam_bank_read_ptr[2] = nullptr;
+ sam_bank_write_ptr[2] = nullptr;
+ sam_bank_read_ptr[3] = nullptr;
+ sam_bank_write_ptr[3] = nullptr;
}
virtual void video_start();
diff --git a/src/mame/includes/segaorun.h b/src/mame/includes/segaorun.h
index 603faccae0b..6fd0db83b74 100644
--- a/src/mame/includes/segaorun.h
+++ b/src/mame/includes/segaorun.h
@@ -37,9 +37,9 @@ public:
m_digital_ports(*this, digital_ports),
m_adc_ports(*this, "ADC"),
m_workram(*this, "workram"),
- m_custom_map(NULL),
+ m_custom_map(nullptr),
m_shangon_video(false),
- m_scanline_timer(NULL),
+ m_scanline_timer(nullptr),
m_irq2_state(0),
m_adc_select(0),
m_vblank_irq_state(0),
diff --git a/src/mame/includes/segas16b.h b/src/mame/includes/segas16b.h
index c0b241368df..7ceba71f17d 100644
--- a/src/mame/includes/segas16b.h
+++ b/src/mame/includes/segas16b.h
@@ -43,7 +43,7 @@ public:
m_romboard(ROM_BOARD_INVALID),
m_tilemap_type(SEGAIC16_TILEMAP_16B),
m_disable_screen_blanking(false),
- m_i8751_initial_config(NULL),
+ m_i8751_initial_config(nullptr),
m_atomicp_sound_divisor(0),
m_atomicp_sound_count(0),
m_hwc_input_value(0),
diff --git a/src/mame/includes/segaybd.h b/src/mame/includes/segaybd.h
index 65b7d811adc..4fa5ec131d7 100644
--- a/src/mame/includes/segaybd.h
+++ b/src/mame/includes/segaybd.h
@@ -32,7 +32,7 @@ public:
m_digital_ports(*this, digital_ports),
m_adc_ports(*this, "ADC"),
m_pdrift_bank(0),
- m_scanline_timer(NULL),
+ m_scanline_timer(nullptr),
m_irq2_scanline(0),
m_timer_irq_state(0),
m_vblank_irq_state(0),
diff --git a/src/mame/includes/sms.h b/src/mame/includes/sms.h
index 4f2efcdbbd3..541e298b4d0 100644
--- a/src/mame/includes/sms.h
+++ b/src/mame/includes/sms.h
@@ -49,7 +49,7 @@ public:
m_port_scope_binocular(*this, "SSCOPE_BINOCULAR"),
m_port_persist(*this, "PERSISTENCE"),
m_region_maincpu(*this, "maincpu"),
- m_mainram(NULL),
+ m_mainram(nullptr),
m_is_gamegear(0),
m_is_gg_region_japan(0),
m_is_smsj(0),
diff --git a/src/mame/includes/svi318.h b/src/mame/includes/svi318.h
index a699f6e9bfb..b0d851a8f2b 100644
--- a/src/mame/includes/svi318.h
+++ b/src/mame/includes/svi318.h
@@ -51,7 +51,7 @@ public:
m_joysticks(*this, "JOYSTICKS"),
m_buttons(*this, "BUTTONS"),
m_palette(*this, "palette"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_bank1(*this, "bank1"),
m_bank2(*this, "bank2"),
m_bank3(*this, "bank3"),
diff --git a/src/mame/includes/tandy2k.h b/src/mame/includes/tandy2k.h
index 761d2f0cb37..e9949ad3443 100644
--- a/src/mame/includes/tandy2k.h
+++ b/src/mame/includes/tandy2k.h
@@ -96,9 +96,9 @@ public:
m_centronics_perror(0),
m_centronics_busy(0)
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_busdmarq)
{
- m_busdmarq[i] = CLEAR_LINE;
+ elem = CLEAR_LINE;
}
}
diff --git a/src/mame/includes/trs80.h b/src/mame/includes/trs80.h
index e4ced5999ab..f4a54afd4a3 100644
--- a/src/mame/includes/trs80.h
+++ b/src/mame/includes/trs80.h
@@ -51,24 +51,24 @@ public:
m_io_line5(*this, "LINE5"),
m_io_line6(*this, "LINE6"),
m_io_line7(*this, "LINE7"),
- m_bank1(NULL),
- m_bank2(NULL),
- m_bank3(NULL),
- m_bank4(NULL),
- m_bank5(NULL),
- m_bank6(NULL),
- m_bank7(NULL),
- m_bank8(NULL),
- m_bank9(NULL),
- m_bank11(NULL),
- m_bank12(NULL),
- m_bank13(NULL),
- m_bank14(NULL),
- m_bank15(NULL),
- m_bank16(NULL),
- m_bank17(NULL),
- m_bank18(NULL),
- m_bank19(NULL) { }
+ m_bank1(nullptr),
+ m_bank2(nullptr),
+ m_bank3(nullptr),
+ m_bank4(nullptr),
+ m_bank5(nullptr),
+ m_bank6(nullptr),
+ m_bank7(nullptr),
+ m_bank8(nullptr),
+ m_bank9(nullptr),
+ m_bank11(nullptr),
+ m_bank12(nullptr),
+ m_bank13(nullptr),
+ m_bank14(nullptr),
+ m_bank15(nullptr),
+ m_bank16(nullptr),
+ m_bank17(nullptr),
+ m_bank18(nullptr),
+ m_bank19(nullptr) { }
DECLARE_FLOPPY_FORMATS(floppy_formats);
diff --git a/src/mame/includes/trs80m2.h b/src/mame/includes/trs80m2.h
index 94a85e36038..9f533cb9a6f 100644
--- a/src/mame/includes/trs80m2.h
+++ b/src/mame/includes/trs80m2.h
@@ -52,7 +52,7 @@ public:
m_floppy1(*this, FD1791_TAG":1"),
m_floppy2(*this, FD1791_TAG":2"),
m_floppy3(*this, FD1791_TAG":3"),
- m_floppy(NULL),
+ m_floppy(nullptr),
m_ram(*this, RAM_TAG),
m_kb(*this, TRS80M2_KEYBOARD_TAG),
m_rom(*this, Z80_TAG),
diff --git a/src/mame/includes/xbox.h b/src/mame/includes/xbox.h
index 253d903b675..85e0c85af4d 100644
--- a/src/mame/includes/xbox.h
+++ b/src/mame/includes/xbox.h
@@ -203,7 +203,7 @@ class xbox_base_state : public driver_device
public:
xbox_base_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
- nvidia_nv2a(NULL),
+ nvidia_nv2a(nullptr),
debug_irq_active(false),
debug_irq_number(0),
m_maincpu(*this, "maincpu") { }
diff --git a/src/mame/layout/rungun_dual.lay b/src/mame/layout/rungun_dual.lay
index 8b8a9a1b41d..cd7178cb61c 100644
--- a/src/mame/layout/rungun_dual.lay
+++ b/src/mame/layout/rungun_dual.lay
@@ -31,5 +31,18 @@
<bounds x="0" y="0" width="4" height="3" />
</screen>
</view>
+
+ <view name="First Screen">
+ <screen index="1">
+ <bounds x="4.03" y="0" width="4" height="3" />
+ </screen>
+ </view>
+
+ <view name="Second Screen">
+ <screen index="2">
+ <bounds x="8.06" y="0" width="4" height="3" />
+ </screen>
+ </view>
+
</mamelayout>
diff --git a/src/mame/machine/315-5838_317-0229_comp.cpp b/src/mame/machine/315-5838_317-0229_comp.cpp
index d7c33c5afad..cfd38aa7c88 100644
--- a/src/mame/machine/315-5838_317-0229_comp.cpp
+++ b/src/mame/machine/315-5838_317-0229_comp.cpp
@@ -49,24 +49,24 @@ sega_315_5838_comp_device::sega_315_5838_comp_device(const machine_config &mconf
void sega_315_5838_comp_device::device_start()
{
- for (int i = 0; i < 2; i++)
+ for (auto & elem : m_channel)
{
- m_channel[i].m_decathlt_lastcount = 0;
- m_channel[i].m_decathlt_prot_uploadmode = 0;
- m_channel[i].m_decathlt_prot_uploadoffset = 0;
- m_channel[i].m_read_ch.bind_relative_to(*owner());
+ elem.m_decathlt_lastcount = 0;
+ elem.m_decathlt_prot_uploadmode = 0;
+ elem.m_decathlt_prot_uploadoffset = 0;
+ elem.m_read_ch.bind_relative_to(*owner());
}
}
void sega_315_5838_comp_device::device_reset()
{
- for (int i = 0; i < 2; i++)
+ for (auto & elem : m_channel)
{
- m_channel[i].m_srcoffset = 0;
- m_channel[i].m_decathlt_lastcount = 0;
- m_channel[i].m_decathlt_prot_uploadmode = 0;
- m_channel[i].m_decathlt_prot_uploadoffset = 0;
+ elem.m_srcoffset = 0;
+ elem.m_decathlt_lastcount = 0;
+ elem.m_decathlt_prot_uploadmode = 0;
+ elem.m_decathlt_prot_uploadoffset = 0;
}
m_protstate = 0;
diff --git a/src/mame/machine/315-5881_crypt.cpp b/src/mame/machine/315-5881_crypt.cpp
index ec07d1c8380..96f654a44e1 100644
--- a/src/mame/machine/315-5881_crypt.cpp
+++ b/src/mame/machine/315-5881_crypt.cpp
@@ -49,7 +49,7 @@ void sega_315_5881_crypt_device::device_start()
std::string skey = parameter("key");
if(!skey.empty())
- key = strtoll(skey.c_str(), 0, 16);
+ key = strtoll(skey.c_str(), nullptr, 16);
else
{
logerror("%s: Warning: key not provided\n", tag());
diff --git a/src/mame/machine/315_5296.cpp b/src/mame/machine/315_5296.cpp
index 18551b95f23..34aa0da1d22 100644
--- a/src/mame/machine/315_5296.cpp
+++ b/src/mame/machine/315_5296.cpp
@@ -105,8 +105,8 @@ void sega_315_5296_device::device_reset()
for (int i = 0; i < 8; i++)
(*m_out_port_cb[i])((offs_t)i, 0);
- for (int i = 0; i < 3; i++)
- (*m_out_cnt_cb[i])(0);
+ for (auto & elem : m_out_cnt_cb)
+ (*elem)(0);
}
diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp
index d47fe3efe78..d912d65ea90 100644
--- a/src/mame/machine/6883sam.cpp
+++ b/src/mame/machine/6883sam.cpp
@@ -72,7 +72,7 @@ const device_type SAM6883 = &device_creator<sam6883_device>;
sam6883_device::sam6883_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SAM6883, "SAM6883", tag, owner, clock, "sam6883", __FILE__),
- m_cpu_tag(NULL),
+ m_cpu_tag(nullptr),
m_cpu_space_ref(AS_PROGRAM),
m_read_res(*this),
m_space_0000(*this),
@@ -133,7 +133,7 @@ void sam6883_device::configure_bank(int bank, UINT8 *memory, UINT32 memory_size,
void sam6883_device::configure_bank(int bank, read8_delegate rhandler, write8_delegate whandler)
{
- configure_bank(bank, NULL, 0, false, rhandler, whandler);
+ configure_bank(bank, nullptr, 0, false, rhandler, whandler);
}
@@ -454,8 +454,8 @@ template<UINT16 _addrstart, UINT16 _addrend>
sam6883_device::sam_space<_addrstart, _addrend>::sam_space(sam6883_device &owner)
: m_owner(owner)
{
- m_read_bank = NULL;
- m_write_bank = NULL;
+ m_read_bank = nullptr;
+ m_write_bank = nullptr;
m_mask = 0;
}
@@ -468,7 +468,7 @@ sam6883_device::sam_space<_addrstart, _addrend>::sam_space(sam6883_device &owner
template<UINT16 _addrstart, UINT16 _addrend>
address_space &sam6883_device::sam_space<_addrstart, _addrend>::cpu_space() const
{
- assert(m_owner.m_cpu_space != NULL);
+ assert(m_owner.m_cpu_space != nullptr);
return *m_owner.m_cpu_space;
}
@@ -506,7 +506,7 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const
{
char buffer[16];
- if (bank->m_memory != NULL)
+ if (bank->m_memory != nullptr)
{
// normalize offset
if (mask != 0)
@@ -530,7 +530,7 @@ void sam6883_device::sam_space<_addrstart, _addrend>::point_specific_bank(const
}
// point the bank
- if (memory_bank != NULL)
+ if (memory_bank != nullptr)
{
if (is_write && bank->m_memory_read_only)
memory_bank->set_base(m_owner.m_dummy);
diff --git a/src/mame/machine/6883sam.h b/src/mame/machine/6883sam.h
index 772fe38d63f..d559860d313 100644
--- a/src/mame/machine/6883sam.h
+++ b/src/mame/machine/6883sam.h
@@ -31,7 +31,7 @@
class sam6883_friend_device
{
public:
- sam6883_friend_device() { m_cpu = NULL; m_sam_state = 0x0000; }
+ sam6883_friend_device() { m_cpu = nullptr; m_sam_state = 0x0000; }
protected:
// SAM state constants
diff --git a/src/mame/machine/abc1600mac.cpp b/src/mame/machine/abc1600mac.cpp
index b22f55708c6..07cc653fc2e 100644
--- a/src/mame/machine/abc1600mac.cpp
+++ b/src/mame/machine/abc1600mac.cpp
@@ -125,7 +125,7 @@ void abc1600_mac_device::device_start()
{
// get the CPU device
m_cpu = machine().device<m68000_base_device>(m_cpu_tag);
- assert(m_cpu != NULL);
+ assert(m_cpu != nullptr);
// allocate memory
m_segment_ram.allocate(0x400);
@@ -160,7 +160,7 @@ void abc1600_mac_device::device_reset()
const address_space_config *abc1600_mac_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_PROGRAM) ? &m_space_config : NULL;
+ return (spacenum == AS_PROGRAM) ? &m_space_config : nullptr;
}
diff --git a/src/mame/machine/amiga.cpp b/src/mame/machine/amiga.cpp
index 6d9fcf46844..47b1d49c33f 100644
--- a/src/mame/machine/amiga.cpp
+++ b/src/mame/machine/amiga.cpp
@@ -147,7 +147,7 @@ void amiga_state::machine_start()
// set up chip RAM access
memory_share *share = memshare("chip_ram");
- if (share == NULL)
+ if (share == nullptr)
fatalerror("Unable to find Amiga chip RAM\n");
m_chip_ram.set(*share, 2);
m_chip_ram_mask = (m_chip_ram.bytes() - 1) & ~1;
@@ -380,7 +380,7 @@ TIMER_CALLBACK_MEMBER( amiga_state::amiga_irq_proc )
UINT16 amiga_state::joy0dat_r()
{
- if (m_input_device == NULL)
+ if (m_input_device == nullptr)
return m_joy0dat_port ? m_joy0dat_port->read() : 0xffff;
if (m_input_device->read() & 0x10)
@@ -391,7 +391,7 @@ UINT16 amiga_state::joy0dat_r()
UINT16 amiga_state::joy1dat_r()
{
- if (m_input_device == NULL)
+ if (m_input_device == nullptr)
return m_joy1dat_port ? m_joy1dat_port->read() : 0xffff;
if (m_input_device->read() & 0x20)
diff --git a/src/mame/machine/amigakbd.cpp b/src/mame/machine/amigakbd.cpp
index c6d1bb05d34..1120c522e6c 100644
--- a/src/mame/machine/amigakbd.cpp
+++ b/src/mame/machine/amigakbd.cpp
@@ -282,9 +282,9 @@ amigakbd_device::amigakbd_device(const machine_config &mconfig, const char *tag,
m_row_c2(*this, "row_c2"),
m_row_c1(*this, "row_c1"),
m_row_c0(*this, "row_c0"),
- m_timer(NULL),
- m_watchdog(NULL),
- m_reset(NULL),
+ m_timer(nullptr),
+ m_watchdog(nullptr),
+ m_reset(nullptr),
m_kdat(1),
m_kclk(1),
m_port_c(0xff),
@@ -307,9 +307,9 @@ void amigakbd_device::device_start()
m_write_krst.resolve_safe();
// allocate timers
- m_timer = timer_alloc(0, NULL);
- m_watchdog = timer_alloc(1, NULL);
- m_reset = timer_alloc(2, NULL);
+ m_timer = timer_alloc(0, nullptr);
+ m_watchdog = timer_alloc(1, nullptr);
+ m_reset = timer_alloc(2, nullptr);
// register for save states
save_item(NAME(m_kdat));
diff --git a/src/mame/machine/amstrad.cpp b/src/mame/machine/amstrad.cpp
index ed4a3f04d6b..eed5c0f291e 100644
--- a/src/mame/machine/amstrad.cpp
+++ b/src/mame/machine/amstrad.cpp
@@ -689,7 +689,7 @@ void amstrad_state::amstrad_update_video()
m_gate_array.line_ticks++;
if ( m_gate_array.line_ticks > m_gate_array.bitmap->width() )
{
- m_gate_array.draw_p = NULL;
+ m_gate_array.draw_p = nullptr;
cycles_passed = 0;
}
}
@@ -791,7 +791,7 @@ void amstrad_state::amstrad_plus_update_video()
m_asic.hsync_first_tick = false;
if ( m_gate_array.line_ticks >= m_gate_array.bitmap->width() )
{
- m_gate_array.draw_p = NULL;
+ m_gate_array.draw_p = nullptr;
cycles_passed = 0;
}
}
@@ -872,7 +872,7 @@ WRITE_LINE_MEMBER(amstrad_state::amstrad_hsync_changed)
}
else
{
- m_gate_array.draw_p = NULL;
+ m_gate_array.draw_p = nullptr;
}
if ( m_gate_array.hsync_after_vsync_counter != 0 ) // counters still operate regardless of PRI state
@@ -915,7 +915,7 @@ WRITE_LINE_MEMBER(amstrad_state::amstrad_plus_hsync_changed)
}
else
{
- m_gate_array.draw_p = NULL;
+ m_gate_array.draw_p = nullptr;
}
if ( m_gate_array.hsync_after_vsync_counter != 0 ) // counters still operate regardless of PRI state
@@ -1106,24 +1106,24 @@ static device_t* get_expansion_device(running_machine &machine, const char* tag)
amstrad_state *state = machine.driver_data<amstrad_state>();
cpc_expansion_slot_device* exp_port = state->m_exp;
- while(exp_port != NULL)
+ while(exp_port != nullptr)
{
device_t* temp;
// first, check if this expansion port has the device we want attached
temp = exp_port->subdevice(tag);
- if(temp != NULL)
+ if(temp != nullptr)
return temp;
// if it's not what we're looking for, then check the expansion port on this expansion device. if it exists.
temp = dynamic_cast<device_t*>(exp_port->get_card_device());
- if(temp == NULL)
- return NULL; // no device attached
+ if(temp == nullptr)
+ return nullptr; // no device attached
exp_port = temp->subdevice<cpc_expansion_slot_device>("exp");
- if(exp_port == NULL)
- return NULL; // we're at the end of the chain
+ if(exp_port == nullptr)
+ return nullptr; // we're at the end of the chain
}
- return NULL;
+ return nullptr;
}
WRITE_LINE_MEMBER(amstrad_state::cpc_romdis)
@@ -1184,7 +1184,7 @@ void amstrad_state::amstrad_setLowerRom()
space.install_write_bank(0x6000, 0x7fff, "bank12");
}
*/
- if(m_AmstradCPC_RamBanks[0] != NULL)
+ if(m_AmstradCPC_RamBanks[0] != nullptr)
{
m_bank1->set_base(m_AmstradCPC_RamBanks[0]);
m_bank2->set_base(m_AmstradCPC_RamBanks[0]+0x2000);
@@ -1241,7 +1241,7 @@ void amstrad_state::amstrad_setLowerRom()
-----------------*/
void amstrad_state::amstrad_setUpperRom()
{
- UINT8 *bank_base = NULL;
+ UINT8 *bank_base = nullptr;
/* b3 : "1" Upper rom area disable or "0" Upper rom area enable */
if ( ! ( m_gate_array.mrer & 0x08 ) && m_gate_array.romdis == 0)
@@ -2000,14 +2000,14 @@ WRITE8_MEMBER(amstrad_state::rom_select)
// expansion devices know the selected ROM by monitoring I/O writes to DFxx
// there are no signals related to which ROM is selected
cpc_expansion_slot_device* exp_port = m_exp;
- while(exp_port != NULL)
+ while(exp_port != nullptr)
{
device_cpc_expansion_card_interface* temp;
device_t* temp_dev;
temp = dynamic_cast<device_cpc_expansion_card_interface*>(exp_port->get_card_device());
temp_dev = dynamic_cast<device_t*>(exp_port->get_card_device());
- if(temp != NULL)
+ if(temp != nullptr)
{
temp->set_rom_bank(data);
}
@@ -2192,7 +2192,7 @@ The exception is the case where none of b7-b0 are reset (i.e. port &FBFF), which
}
mface2 = dynamic_cast<cpc_multiface2_device*>(get_expansion_device(machine(),"multiface2"));
- if(mface2 != NULL)
+ if(mface2 != nullptr)
{
if(mface2->multiface_io_write(offset, data) != 0)
{
@@ -2429,7 +2429,7 @@ void amstrad_state::amstrad_rethinkMemory()
/* multiface hardware enabled? */
mface2 = dynamic_cast<cpc_multiface2_device*>(get_expansion_device(machine(),"multiface2"));
- if(mface2 != NULL)
+ if(mface2 != nullptr)
{
if (mface2->multiface_hardware_enabled())
{
@@ -2463,7 +2463,7 @@ void amstrad_state::screen_eof_amstrad(screen_device &screen, bool state)
{
cpc_multiface2_device* mface2 = dynamic_cast<cpc_multiface2_device*>(get_expansion_device(machine(),"multiface2"));
- if(mface2 != NULL)
+ if(mface2 != nullptr)
{
mface2->check_button_state();
}
@@ -2948,14 +2948,14 @@ void amstrad_state::enumerate_roms()
/* find any expansion devices that have a 'exp_rom' region */
cpc_expansion_slot_device* exp_port = m_exp;
- while(exp_port != NULL)
+ while(exp_port != nullptr)
{
device_t* temp;
temp = dynamic_cast<device_t*>(exp_port->get_card_device());
- if(temp != NULL)
+ if(temp != nullptr)
{
- if(temp->memregion("exp_rom")->base() != NULL)
+ if(temp->memregion("exp_rom")->base() != nullptr)
{
int num = temp->memregion("exp_rom")->bytes() / 0x4000;
for(i=0;i<num;i++)
@@ -2977,7 +2977,7 @@ void amstrad_state::enumerate_roms()
{
sprintf(str,"rom%i",i+1);
romimage = romexp->subdevice<rom_image_device>(str);
- if(romimage->base() != NULL)
+ if(romimage->base() != nullptr)
{
m_Amstrad_ROM_Table[m_rom_count] = romimage->base();
NEXT_ROM_SLOT
@@ -3089,7 +3089,7 @@ MACHINE_RESET_MEMBER(amstrad_state,amstrad)
// amstrad_init_palette(machine());
m_gate_array.de = 0;
- m_gate_array.draw_p = NULL;
+ m_gate_array.draw_p = nullptr;
m_gate_array.hsync = 0;
m_gate_array.vsync = 0;
@@ -3190,7 +3190,7 @@ MACHINE_START_MEMBER(amstrad_state,kccomp)
m_centronics->write_data7(0);
m_gate_array.de = 0;
- m_gate_array.draw_p = NULL;
+ m_gate_array.draw_p = nullptr;
m_gate_array.hsync = 0;
m_gate_array.vsync = 0;
@@ -3260,7 +3260,7 @@ DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge)
logerror("IMG: loading CPC+ cartridge file\n");
// check for .CPR header
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
image.fread(header, 12);
if (strncmp((char *)header, "RIFF", 4) != 0)
@@ -3279,7 +3279,7 @@ DEVICE_IMAGE_LOAD_MEMBER(amstrad_state, amstrad_plus_cartridge)
m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
// actually load the cart into ROM
- if (image.software_entry() != NULL)
+ if (image.software_entry() != nullptr)
{
logerror("IMG: raw CPC+ cartridge from softlist\n");
memcpy(m_cart->get_rom_base(), image.get_software_region("rom"), size);
diff --git a/src/mame/machine/apollo.cpp b/src/mame/machine/apollo.cpp
index ecda2bdc9da..e10522756dd 100644
--- a/src/mame/machine/apollo.cpp
+++ b/src/mame/machine/apollo.cpp
@@ -1161,10 +1161,10 @@ MACHINE_CONFIG_FRAGMENT( common )
MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa1", apollo_isa_cards, "wdc", false)
MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa2", apollo_isa_cards, "ctape", false)
MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa3", apollo_isa_cards, "3c505", false)
- MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa4", apollo_isa_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa5", apollo_isa_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa6", apollo_isa_cards, NULL, false)
- MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa7", apollo_isa_cards, NULL, false)
+ MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa4", apollo_isa_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa5", apollo_isa_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa6", apollo_isa_cards, nullptr, false)
+ MCFG_ISA16_SLOT_ADD(APOLLO_ISA_TAG, "isa7", apollo_isa_cards, nullptr, false)
MCFG_SOFTWARE_LIST_ADD("ctape_list", "apollo_ctape")
MACHINE_CONFIG_END
diff --git a/src/mame/machine/apollo_dbg.cpp b/src/mame/machine/apollo_dbg.cpp
index be6b3811be7..f2991f8934c 100644
--- a/src/mame/machine/apollo_dbg.cpp
+++ b/src/mame/machine/apollo_dbg.cpp
@@ -18,37 +18,37 @@
//------------------------------------------------------
static const char* trap0[] = {
-/* 0x00 */NULL, NULL,
+/* 0x00 */nullptr, nullptr,
/* 0x01 */"FIM_$GET_FIM_ADDR", "",
-/* 0x02 */NULL, NULL,
+/* 0x02 */nullptr, nullptr,
/* 0x03 */"DTTY_$RELOAD_FONT", "",
/* 0x04 */"FILE_$UNLOCK_ALL", "",
-/* 0x05 */NULL, NULL,
-/* 0x06 */NULL, NULL,
+/* 0x05 */nullptr, nullptr,
+/* 0x06 */nullptr, nullptr,
/* 0x07 */"PROC2_$MY_PID", "",
/* 0x08 */"SMD_$OP_WAIT_U", "",
/* 0x09 */"TPAD_$RE_RANGE", "",
-/* 0x0a */NULL, NULL,
-/* 0x0b */NULL, NULL,
-/* 0x0c */NULL, NULL,
+/* 0x0a */nullptr, nullptr,
+/* 0x0b */nullptr, nullptr,
+/* 0x0c */nullptr, nullptr,
/* 0x0d */"ACL_$UP", "",
/* 0x0e */"ACL_$DOWN", "",
-/* 0x0f */NULL, NULL,
+/* 0x0f */nullptr, nullptr,
/* 0x10 */"TPAD_$INQ_DTYPE", "",
-/* 0x11 */NULL, NULL,
+/* 0x11 */nullptr, nullptr,
/* 0x12 */"CACHE_$CLEAR", "",
/* 0x13 */"RIP_$ANNOUNCE_NS", "",
-/* 0x14 */NULL, NULL,
-/* 0x15 */NULL, NULL,
-/* 0x16 */NULL, NULL,
-/* 0x17 */NULL, NULL,
+/* 0x14 */nullptr, nullptr,
+/* 0x15 */nullptr, nullptr,
+/* 0x16 */nullptr, nullptr,
+/* 0x17 */nullptr, nullptr,
/* 0x18 */"PROC2_$DELIVER_PENDING", "",
/* 0x19 */"PROC2_$COMPLETE_FORK", "",
/* 0x1a */"PACCT_$STOP", "",
/* 0x1b */"PACCT_$ON", "",
/* 0x1c */"ACL_$GET_LOCAL_LOCKSMITH", "",
/* 0x1d */"ACL_$IS_SUSER", "",
-/* 0x1e */NULL, NULL,
+/* 0x1e */nullptr, nullptr,
/* 0x1f */"SMD_$N_DEVICES", "",
/* 0x20 */"PROC1_$GET_MAXID", "",
/* 0x21 */"THREAD_$DELETE", "",
@@ -63,8 +63,8 @@ static const char* trap0[] = {
//------------------------------------------------------
static const char* trap1[] = {
-/* 0x00 */NULL, NULL,
-/* 0x01 */NULL, NULL,
+/* 0x00 */nullptr, nullptr,
+/* 0x01 */nullptr, nullptr,
/* 0x02 */"FIM_$INSTALL", "x",
/* 0x03 */"NETWORK_$READ_SERVICE", "x",
/* 0x04 */"PROC1_$GET_CPUT", "x",
@@ -77,26 +77,26 @@ static const char* trap1[] = {
/* 0x0b */"CAL_$REMOVE_LOCAL_OFFSET", "x",
/* 0x0c */"CAL_$SET_DRIFT", "x",
/* 0x0d */"DISK_$GET_ERROR_INFO", "x",
-/* 0x0e */NULL, NULL,
+/* 0x0e */nullptr, nullptr,
/* 0x0f */"MSG_$CLOSE", "x",
/* 0x10 */"PROC2_$WHO_AM_I", "u",
/* 0x11 */"SMD_$CLEAR_KBD_CURSOR", "x",
-/* 0x12 */NULL, NULL,
-/* 0x13 */NULL, NULL,
+/* 0x12 */nullptr, nullptr,
+/* 0x13 */nullptr, nullptr,
/* 0x14 */"SMD_$SEND_RESPONSE", "x",
/* 0x15 */"SMD_$STOP_TP_CURSOR", "x",
-/* 0x16 */NULL, NULL,
-/* 0x17 */NULL, NULL,
+/* 0x16 */nullptr, nullptr,
+/* 0x17 */nullptr, nullptr,
/* 0x18 */"SMD_$UNMAP_DISPLAY_U", "x",
/* 0x19 */"UID_$GEN", "x",
/* 0x1a */"TONE_$TIME", "x",
/* 0x1b */"SMD_$INQ_DISP_TYPE", "x",
-/* 0x1c */NULL, NULL,
-/* 0x1d */NULL, NULL,
-/* 0x1e */NULL, NULL,
+/* 0x1c */nullptr, nullptr,
+/* 0x1d */nullptr, nullptr,
+/* 0x1e */nullptr, nullptr,
/* 0x1f */"TPAD_$SET_CURSOR", "x",
-/* 0x20 */NULL, NULL,
-/* 0x21 */NULL, NULL,
+/* 0x20 */nullptr, nullptr,
+/* 0x21 */nullptr, nullptr,
/* 0x22 */"NAME_$GET_WDIR_UID", "u",
/* 0x23 */"NAME_$GET_NDIR_UID", "u",
/* 0x24 */"NAME_$GET_ROOT_UID", "u",
@@ -105,14 +105,14 @@ static const char* trap1[] = {
/* 0x27 */"NAME_$GET_CANNED_ROOT_UID", "u",
/* 0x28 */"MSG_$GET_MY_NET", "x",
/* 0x29 */"MSG_$GET_MY_NODE", "x",
-/* 0x2a */NULL, NULL,
-/* 0x2b */NULL, NULL,
-/* 0x2c */NULL, NULL,
-/* 0x2d */NULL, NULL,
-/* 0x2e */NULL, NULL,
-/* 0x2f */NULL, NULL,
+/* 0x2a */nullptr, nullptr,
+/* 0x2b */nullptr, nullptr,
+/* 0x2c */nullptr, nullptr,
+/* 0x2d */nullptr, nullptr,
+/* 0x2e */nullptr, nullptr,
+/* 0x2f */nullptr, nullptr,
/* 0x30 */"GPU_$INIT", "x",
-/* 0x31 */NULL, NULL,
+/* 0x31 */nullptr, nullptr,
/* 0x32 */"SMD_$INIT_STATE", "x",
/* 0x33 */"SMD_$CLR_TRK_RECT", "x",
/* 0x34 */"PROC2_$GET_SIG_MASK", "x",
@@ -120,14 +120,14 @@ static const char* trap1[] = {
/* 0x36 */"TIME_$GET_TIME_OF_DAY", "x",
/* 0x37 */"PROC1_$GET_LOADAV", "x",
/* 0x38 */"PROC2_$GET_BOOT_FLAGS", "x",
-/* 0x39 */NULL, NULL,
+/* 0x39 */nullptr, nullptr,
/* 0x3a */"PROC2_$SET_TTY", "x",
/* 0x3b */"OS_$SHUTDOWN", "x",
/* 0x3c */"PBU_$FAULTED_UNITS", "x",
/* 0x3d */"PROC2_$GET_CPU_USAGE", "x",
-/* 0x3e */NULL, NULL,
-/* 0x3f */NULL, NULL,
-/* 0x40 */NULL, NULL,
+/* 0x3e */nullptr, nullptr,
+/* 0x3f */nullptr, nullptr,
+/* 0x40 */nullptr, nullptr,
/* 0x41 */"TIME_$GET_ADJUST", "x",
/* 0x42 */"FILE_$SYNC", "x",
/* 0x43 */"XPAGE_$IS_MAPPED", "x",
@@ -139,11 +139,11 @@ static const char* trap1[] = {
//------------------------------------------------------
static const char* trap2[] = {
-/* 0x00 */NULL, NULL,
-/* 0x01 */NULL, NULL,
+/* 0x00 */nullptr, nullptr,
+/* 0x01 */nullptr, nullptr,
/* 0x02 */"FILE_$DELETE", "x,x",
/* 0x03 */"EC2_$WAKEUP", "x,x",
-/* 0x04 */NULL, NULL,
+/* 0x04 */nullptr, nullptr,
/* 0x05 */"ACL_$GET_SID", "x,x",
/* 0x06 */"FILE_$MK_PERMANENT", "x,x",
/* 0x07 */"FILE_$UNLOCK_VOL", "x,x",
@@ -156,13 +156,13 @@ static const char* trap2[] = {
/* 0x0e */"FILE_$MK_IMMUTABLE", "x,x",
/* 0x0f */"FILE_$PURIFY", "x,x",
/* 0x10 */"GET_BUILD_TIME", "x,x",
-/* 0x11 */NULL, NULL,
-/* 0x12 */NULL, NULL,
+/* 0x11 */nullptr, nullptr,
+/* 0x12 */nullptr, nullptr,
/* 0x13 */"MSG_$ALLOCATE", "x,x",
/* 0x14 */"MSG_$OPEN", "x,x",
/* 0x15 */"MSG_$WAIT", "x,x",
-/* 0x16 */NULL, NULL,
-/* 0x17 */NULL, NULL,
+/* 0x16 */nullptr, nullptr,
+/* 0x17 */nullptr, nullptr,
/* 0x18 */"PBU_$DEVICE_INTERRUPTING", "x,x",
/* 0x19 */"PBU_$DISABLE_DEVICE", "x,x",
/* 0x1a */"PBU_$ENABLE_DEVICE", "x,x",
@@ -170,23 +170,23 @@ static const char* trap2[] = {
/* 0x1c */"PROC2_$QUIT", "x,x",
/* 0x1d */"PROC2_$RESUME", "x,x",
/* 0x1e */"PROC2_$SUSPEND", "x,x",
-/* 0x1f */NULL, NULL,
-/* 0x20 */NULL, NULL,
-/* 0x21 */NULL, NULL,
-/* 0x22 */NULL, NULL,
-/* 0x23 */NULL, NULL,
-/* 0x24 */NULL, NULL,
-/* 0x25 */NULL, NULL,
+/* 0x1f */nullptr, nullptr,
+/* 0x20 */nullptr, nullptr,
+/* 0x21 */nullptr, nullptr,
+/* 0x22 */nullptr, nullptr,
+/* 0x23 */nullptr, nullptr,
+/* 0x24 */nullptr, nullptr,
+/* 0x25 */nullptr, nullptr,
/* 0x26 */"SMD_$MAP_DISPLAY_U", "x,x",
/* 0x27 */"SMD_$MOVE_KBD_CURSOR", "x,x",
-/* 0x28 */NULL, NULL,
+/* 0x28 */nullptr, nullptr,
/* 0x29 */"SMD_$RETURN_DISPLAY", "x,x",
-/* 0x2a */NULL, NULL,
-/* 0x2b */NULL, NULL,
-/* 0x2c */NULL, NULL,
-/* 0x2d */NULL, NULL,
+/* 0x2a */nullptr, nullptr,
+/* 0x2b */nullptr, nullptr,
+/* 0x2c */nullptr, nullptr,
+/* 0x2d */nullptr, nullptr,
/* 0x2e */"PEB_$GET_INFO", "x,x",
-/* 0x2f */NULL, NULL,
+/* 0x2f */nullptr, nullptr,
/* 0x30 */"EC2_$GET_VAL", "x,x",
/* 0x31 */"AST_$ADD_ASTES", "x,x",
/* 0x32 */"PBU_$DISSOC", "x,x",
@@ -194,42 +194,42 @@ static const char* trap2[] = {
/* 0x34 */"FILE_$DELETE_FORCE", "x,x",
/* 0x35 */"FILE_$DELETE_WHEN_UNLOCKED", "x,x",
/* 0x36 */"FILE_$MK_TEMPORARY", "x,x",
-/* 0x37 */NULL, NULL,
-/* 0x38 */NULL, NULL,
-/* 0x39 */NULL, NULL,
-/* 0x3a */NULL, NULL,
+/* 0x37 */nullptr, nullptr,
+/* 0x38 */nullptr, nullptr,
+/* 0x39 */nullptr, nullptr,
+/* 0x3a */nullptr, nullptr,
/* 0x3b */"SMD_$INQ_KBD_CURSOR", "x,x",
/* 0x3c */"ACL_$ENTER_SUBS", "u,x",
-/* 0x3d */NULL, NULL,
-/* 0x3e */NULL, NULL,
-/* 0x3f */NULL, NULL,
-/* 0x40 */NULL, NULL,
-/* 0x41 */NULL, NULL,
+/* 0x3d */nullptr, nullptr,
+/* 0x3e */nullptr, nullptr,
+/* 0x3f */nullptr, nullptr,
+/* 0x40 */nullptr, nullptr,
+/* 0x41 */nullptr, nullptr,
/* 0x42 */"FILE_$DELETE_FORCE_WHEN_UNLOCKED", "x,x",
-/* 0x43 */NULL, NULL,
+/* 0x43 */nullptr, nullptr,
/* 0x44 */"CT_$ACQUIRE", "x,x",
/* 0x45 */"HINT_$ADD", "x,x",
/* 0x46 */"DIR_$FIX_DIR", "x,x",
/* 0x47 */"NAME_$SET_WDIRUS", "u,x",
/* 0x48 */"NAME_$SET_NDIRUS", "u,x",
-/* 0x49 */NULL, NULL,
-/* 0x4a */NULL, NULL,
+/* 0x49 */nullptr, nullptr,
+/* 0x4a */nullptr, nullptr,
/* 0x4b */"MSG_$CLOSEI", "x,x",
/* 0x4c */"NETWORK_$ADD_PAGE_SERVERS", "x,x",
/* 0x4d */"NETWORK_$ADD_REQUEST_SERVERS", "x,x",
/* 0x4e */"ACL_$ADD_PROJ", "x,x",
/* 0x4f */"ACL_$DELETE_PROJ", "x,x",
-/* 0x50 */NULL, NULL,
-/* 0x51 */NULL, NULL,
+/* 0x50 */nullptr, nullptr,
+/* 0x51 */nullptr, nullptr,
/* 0x52 */"SMD_$SET_TP_REPORTING", "x,x",
/* 0x53 */"SMD_$DISABLE_TRACKING", "x,x",
-/* 0x54 */NULL, NULL,
-/* 0x55 */NULL, NULL,
-/* 0x56 */NULL, NULL,
-/* 0x57 */NULL, NULL,
+/* 0x54 */nullptr, nullptr,
+/* 0x55 */nullptr, nullptr,
+/* 0x56 */nullptr, nullptr,
+/* 0x57 */nullptr, nullptr,
/* 0x58 */"HINT_$ADDI", "x,x",
-/* 0x59 */NULL, NULL,
-/* 0x5a */NULL, NULL,
+/* 0x59 */nullptr, nullptr,
+/* 0x5a */nullptr, nullptr,
/* 0x5b */"PBU_$ALLOCATE_EC", "x,x",
/* 0x5c */"SMD_$SET_DISP_UNIT", "x,x",
/* 0x5d */"SMD_$VIDEO_CTL", "x,x",
@@ -253,26 +253,26 @@ static const char* trap2[] = {
/* 0x6f */"CAL_$DECODE_TIME", "x,x",
/* 0x70 */"ACL_$INHERIT_SUBSYS", "x,x",
/* 0x71 */"ACL_$SET_LOCAL_LOCKSMITH", "x,x",
-/* 0x72 */NULL, NULL,
+/* 0x72 */nullptr, nullptr,
/* 0x73 */"SMD_$DISSOC", "x,x",
/* 0x74 */"SMD_$BUSY_WAIT", "x,x",
/* 0x75 */"TTY_$K_OLD_RESET", "x,x",
-/* 0x76 */NULL, NULL,
-/* 0x77 */NULL, NULL,
-/* 0x78 */NULL, NULL,
+/* 0x76 */nullptr, nullptr,
+/* 0x77 */nullptr, nullptr,
+/* 0x78 */nullptr, nullptr,
/* 0x79 */"SCSI_$ABORT_OPERATION", "x,x",
/* 0x7a */"SCSI_$RELEASE", "x,x",
/* 0x7b */"SCSI_$RESET_DEVICE", "x,x",
-/* 0x7c */NULL, NULL,
+/* 0x7c */nullptr, nullptr,
/* 0x7d */"TPAD_$RE_RANGE_UNIT", "x,x",
/* 0x7e */"DISK_$FORMAT_WHOLE", "x,x",
-/* 0x7f */NULL, NULL,
-/* 0x80 */NULL, NULL,
-/* 0x81 */NULL, NULL,
-/* 0x82 */NULL, NULL,
-/* 0x83 */NULL, NULL,
+/* 0x7f */nullptr, nullptr,
+/* 0x80 */nullptr, nullptr,
+/* 0x81 */nullptr, nullptr,
+/* 0x82 */nullptr, nullptr,
+/* 0x83 */nullptr, nullptr,
/* 0x84 */"SMD_$SEND_UNIT_RESPONSE", "x,x",
-/* 0x85 */NULL, NULL,
+/* 0x85 */nullptr, nullptr,
/* 0x86 */"MST_$FW_XTAL", "x,x",
/* 0x87 */"THREAD_$TERMINATE", "x,x",
/* 0x88 */"THREAD_$TERMINATE_ALL", "u,x",
@@ -292,7 +292,7 @@ static const char* trap2[] = {
static const char* trap3[] = {
/* 0x00 */"PBU2_$DMA_STOP", "x,x,x",
-/* 0x01 */NULL, NULL,
+/* 0x01 */nullptr, nullptr,
/* 0x02 */"FILE_$CREATE", "x,x,x",
/* 0x03 */"FILE_$UNLOCK", "u,x,x",
/* 0x04 */"FILE_$TRUNCATE", "u,x,x",
@@ -301,10 +301,10 @@ static const char* trap3[] = {
/* 0x07 */"FILE_$ATTRIBUTES", "x,x,x",
/* 0x08 */"FILE_$SET_LEN", "x,x,x",
/* 0x09 */"FILE_$SET_TYPE", "x,x,x",
-/* 0x0a */NULL, NULL,
-/* 0x0b */NULL, NULL,
-/* 0x0c */NULL, NULL,
-/* 0x0d */NULL, NULL,
+/* 0x0a */nullptr, nullptr,
+/* 0x0b */nullptr, nullptr,
+/* 0x0c */nullptr, nullptr,
+/* 0x0d */nullptr, nullptr,
/* 0x0e */"NETWORK_$SET_SERVICE", "x,x,x",
/* 0x0f */"ASKNODE_$WHO", "s,x,x",
/* 0x10 */"FILE_$ACT_ATTRIBUTES", "x,x,x",
@@ -314,11 +314,11 @@ static const char* trap3[] = {
/* 0x14 */"FILE_$SET_ACL", "x,x,x",
/* 0x15 */"FILE_$SET_DIRPTR", "x,x,x",
/* 0x16 */"FILE_$SET_TROUBLE", "x,x,x",
-/* 0x17 */NULL, NULL,
-/* 0x18 */NULL, NULL,
-/* 0x19 */NULL, NULL,
-/* 0x1a */NULL, NULL,
-/* 0x1b */NULL, NULL,
+/* 0x17 */nullptr, nullptr,
+/* 0x18 */nullptr, nullptr,
+/* 0x19 */nullptr, nullptr,
+/* 0x1a */nullptr, nullptr,
+/* 0x1b */nullptr, nullptr,
/* 0x1c */"PBU_$DMA_STOP", "x,x,x",
/* 0x1d */"PBU_$SETDOWN", "x,x,x",
/* 0x1e */"PBU_$SETUP", "x,x,x",
@@ -326,35 +326,35 @@ static const char* trap3[] = {
/* 0x20 */"FIM_$SINGLE_STEP", "x,x,x",
/* 0x21 */"SMD_$ASSOC", "x,x,x",
/* 0x22 */"SMD_$BORROW_DISPLAY", "x,x,x",
-/* 0x23 */NULL, NULL,
-/* 0x24 */NULL, NULL,
+/* 0x23 */nullptr, nullptr,
+/* 0x24 */nullptr, nullptr,
/* 0x25 */"SMD_$SET_TP_CURSOR", "x,x,x",
/* 0x26 */"TIME_$WAIT", "x,x,x",
/* 0x27 */"RINGLOG_$CNTL", "x,x,x",
/* 0x28 */"SMD_$ALLOC_HDM", "x,x,x",
/* 0x29 */"SMD_$FREE_HDM", "x,x,x",
-/* 0x2a */NULL, NULL,
+/* 0x2a */nullptr, nullptr,
/* 0x2b */"OS_$GET_EC", "x,x,x",
/* 0x2c */"TIME_$GET_EC", "x,x,x",
-/* 0x2d */NULL, NULL,
+/* 0x2d */nullptr, nullptr,
/* 0x2e */"PROC2_$UPID_TO_UID", "x,u,x",
/* 0x2f */"MSG_$GET_EC", "x,x,x",
/* 0x30 */"DISK_$AS_OPTIONS", "x,x,x",
/* 0x31 */"SMD_$GET_EC", "x,x,x",
/* 0x32 */"NAME_$SET_ACL", "x,x,x",
/* 0x33 */"FILE_$SET_REFCNT", "x,x,x",
-/* 0x34 */NULL, NULL,
+/* 0x34 */nullptr, nullptr,
/* 0x35 */"PROC1_$GET_INFO", "x,x,x",
-/* 0x36 */NULL, NULL,
-/* 0x37 */NULL, NULL,
-/* 0x38 */NULL, NULL,
-/* 0x39 */NULL, NULL,
-/* 0x3a */NULL, NULL,
-/* 0x3b */NULL, NULL,
+/* 0x36 */nullptr, nullptr,
+/* 0x37 */nullptr, nullptr,
+/* 0x38 */nullptr, nullptr,
+/* 0x39 */nullptr, nullptr,
+/* 0x3a */nullptr, nullptr,
+/* 0x3b */nullptr, nullptr,
/* 0x3c */"AS_$GET_INFO", "x,x,x",
/* 0x3d */"FILE_$SET_DTM", "x,x,x",
/* 0x3e */"FILE_$SET_DTU", "x,x,x",
-/* 0x3f */NULL, NULL,
+/* 0x3f */nullptr, nullptr,
/* 0x40 */"LOG_$READ", "x,x,x",
/* 0x41 */"PROC2_$SET_PGROUP", "x,x,x",
/* 0x42 */"SMD_$SET_BLANK_TIMEOUT", "x,x,x",
@@ -364,12 +364,12 @@ static const char* trap3[] = {
/* 0x46 */"PROC2_$UPGID_TO_UID", "x,x,x",
/* 0x47 */"TIME_$GET_ITIMER", "x,x,x",
/* 0x48 */"DIR_$SET_DAD", "x,x,x",
-/* 0x49 */NULL, NULL,
-/* 0x4a */NULL, NULL,
-/* 0x4b */NULL, NULL,
-/* 0x4c */NULL, NULL,
-/* 0x4d */NULL, NULL,
-/* 0x4e */NULL, NULL,
+/* 0x49 */nullptr, nullptr,
+/* 0x4a */nullptr, nullptr,
+/* 0x4b */nullptr, nullptr,
+/* 0x4c */nullptr, nullptr,
+/* 0x4d */nullptr, nullptr,
+/* 0x4e */nullptr, nullptr,
/* 0x4f */"RIP_$TABLE", "x,x,x",
/* 0x50 */"FILE_$LOCATEI", "x,x,x",
/* 0x51 */"MSG_$OPENI", "x,x,x",
@@ -377,25 +377,25 @@ static const char* trap3[] = {
/* 0x53 */"MSG_$WAITI", "x,x,x",
/* 0x54 */"ACL_$SET_PROJ_LIST", "x,x,x",
/* 0x55 */"ACL_$GET_RE_SIDS", "x,x,x",
-/* 0x56 */NULL, NULL,
+/* 0x56 */nullptr, nullptr,
/* 0x57 */"MSG_$SET_HPIPC", "x,x,x",
/* 0x58 */"DIR_$VALIDATE_ROOT_ENTRY", "x,x,x",
/* 0x59 */"SMD_$ENABLE_TRACKING", "x,x,x",
/* 0x5a */"FILE_$READ_LOCK_ENTRYUI", "x,x,x",
-/* 0x5b */NULL, NULL,
+/* 0x5b */nullptr, nullptr,
/* 0x5c */"ROUTE_$SERVICE", "x,x,x",
-/* 0x5d */NULL, NULL,
-/* 0x5e */NULL, NULL,
-/* 0x5f */NULL, NULL,
+/* 0x5d */nullptr, nullptr,
+/* 0x5e */nullptr, nullptr,
+/* 0x5f */nullptr, nullptr,
/* 0x60 */"PBU_$ADVANCE_EC", "x,x,x",
/* 0x61 */"PBU_$RELEASE_EC", "x,x,x",
-/* 0x62 */NULL, NULL,
+/* 0x62 */nullptr, nullptr,
/* 0x63 */"SMD_$GET_IDM_EVENT", "x,x,x",
/* 0x64 */"MSG_$TEST_FOR_MESSAGE", "x,x,x",
/* 0x65 */"SMD_$ADD_TRK_RECT", "x,x,x",
/* 0x66 */"SMD_$DEL_TRK_RECT", "x,x,x",
/* 0x67 */"SMD_$SET_KBD_TYPE", "x,x,x",
-/* 0x68 */NULL, NULL,
+/* 0x68 */nullptr, nullptr,
/* 0x69 */"FILE_$SET_AUDITED", "x,x,x",
/* 0x6a */"PROC2_$ACKNOWLEDGE", "x,x,x",
/* 0x6b */"PROC2_$GET_MY_UPIDS", "x,x,x",
@@ -423,7 +423,7 @@ static const char* trap3[] = {
/* 0x81 */"PROC2_$PGUID_TO_UPGID", "x,x,x",
/* 0x82 */"TERM_$INQ_DISCIPLINE", "x,x,x",
/* 0x83 */"PBU_$DMA_STATUS", "x,x,x",
-/* 0x84 */NULL, NULL,
+/* 0x84 */nullptr, nullptr,
/* 0x85 */"MST_$UNMAPS_AND_FREE_AREA", "x,x,x",
/* 0x86 */"SMD_$ASSOC_CSRS", "x,x,x",
/* 0x87 */"SMD_$INQ_DISP_INFO", "x,x,x",
@@ -439,17 +439,17 @@ static const char* trap3[] = {
/* 0x91 */"TPAD_$INQ_PUNCH_IMPACT", "x,x,x",
/* 0x92 */"TTY_$K_INQ_SESSION_ID", "x,x,x",
/* 0x93 */"TTY_$K_SET_SESSION_ID", "x,x,x",
-/* 0x94 */NULL, NULL,
-/* 0x95 */NULL, NULL,
-/* 0x96 */NULL, NULL,
-/* 0x97 */NULL, NULL,
+/* 0x94 */nullptr, nullptr,
+/* 0x95 */nullptr, nullptr,
+/* 0x96 */nullptr, nullptr,
+/* 0x97 */nullptr, nullptr,
/* 0x98 */"SMD_$SHARE_DEVICE", "x,x,x",
/* 0x99 */"SMD_$SET_UNIT_CURSOR_POS", "x,x,x",
/* 0x9a */"SMD_$CLR_AND_LOAD_TRK_RECT", "x,x,x",
/* 0x9b */"PROC2_$GET_PARM", "x,x,x",
-/* 0x9c */NULL, NULL,
-/* 0x9d */NULL, NULL,
-/* 0x9e */NULL, NULL,
+/* 0x9c */nullptr, nullptr,
+/* 0x9d */nullptr, nullptr,
+/* 0x9e */nullptr, nullptr,
/* 0x9f */"FILE_$CW_READ", "x,x,x",
/* 0xa0 */"FILE_$CW_WRITE", "x,x,x",
/* 0xa1 */"MST_$TRUNC_XTAL", "x,x,x",
@@ -461,17 +461,17 @@ static const char* trap3[] = {
/* 0xa7 */"THREAD_$CLEANUP_ALL", "x,x,x",
/* 0xa8 */"DIR_$ADD_MOUNT", "x,x,x",
/* 0xa9 */"DIR_$REMOVE_MOUNT", "x,x,x",
-/* 0xaa */NULL, NULL,
+/* 0xaa */nullptr, nullptr,
/* 0xab */"TTY_$K_RESET", "x,x,x",
/* 0xac */"MST_$SHADOW_MAP", "x,x,x",
-/* 0xad */NULL, NULL };
+/* 0xad */nullptr, nullptr };
//------------------------------------------------------
// TRAP4
//------------------------------------------------------
static const char* trap4[] = {
-/* 0x00 */NULL, NULL,
+/* 0x00 */nullptr, nullptr,
/* 0x01 */"MST_$SET_GUARD", "u,x,x,x",
/* 0x02 */"MST_$UNMAP_GLOBAL", "u,x,x,x",
/* 0x03 */"MST_$GET_UID", "x,u,x,x",
@@ -479,81 +479,81 @@ static const char* trap4[] = {
/* 0x05 */"FILE_$READ_LOCK_ENTRY", "x,x,x,x",
/* 0x06 */"MST_$UNMAP", "u,x,x,x",
/* 0x07 */"MST_$GROW_AREA", "x,x,x,x",
-/* 0x08 */NULL, NULL,
-/* 0x09 */NULL, NULL,
-/* 0x0a */NULL, NULL,
-/* 0x0b */NULL, NULL,
+/* 0x08 */nullptr, nullptr,
+/* 0x09 */nullptr, nullptr,
+/* 0x0a */nullptr, nullptr,
+/* 0x0b */nullptr, nullptr,
/* 0x0c */"TERM_$CONTROL", "x,x,x,x",
/* 0x0d */"TERM_$READ", "x,s,x,x",
/* 0x0e */"TERM_$WRITE", "x,x,x,x",
/* 0x0f */"DISK_$FORMAT", "x,x,x,x",
/* 0x10 */"DISK_$LV_ASSIGN", "x,x,x,x",
/* 0x11 */"FILE_$FW_PARTIAL", "x,x,x,x",
-/* 0x12 */NULL, NULL,
-/* 0x13 */NULL, NULL,
-/* 0x14 */NULL, NULL,
-/* 0x15 */NULL, NULL,
-/* 0x16 */NULL, NULL,
-/* 0x17 */NULL, NULL,
-/* 0x18 */NULL, NULL,
-/* 0x19 */NULL, NULL,
-/* 0x1a */NULL, NULL,
-/* 0x1b */NULL, NULL,
-/* 0x1c */NULL, NULL,
-/* 0x1d */NULL, NULL,
-/* 0x1e */NULL, NULL,
-/* 0x1f */NULL, NULL,
-/* 0x20 */NULL, NULL,
-/* 0x21 */NULL, NULL,
-/* 0x22 */NULL, NULL,
+/* 0x12 */nullptr, nullptr,
+/* 0x13 */nullptr, nullptr,
+/* 0x14 */nullptr, nullptr,
+/* 0x15 */nullptr, nullptr,
+/* 0x16 */nullptr, nullptr,
+/* 0x17 */nullptr, nullptr,
+/* 0x18 */nullptr, nullptr,
+/* 0x19 */nullptr, nullptr,
+/* 0x1a */nullptr, nullptr,
+/* 0x1b */nullptr, nullptr,
+/* 0x1c */nullptr, nullptr,
+/* 0x1d */nullptr, nullptr,
+/* 0x1e */nullptr, nullptr,
+/* 0x1f */nullptr, nullptr,
+/* 0x20 */nullptr, nullptr,
+/* 0x21 */nullptr, nullptr,
+/* 0x22 */nullptr, nullptr,
/* 0x23 */"PBU_$WAIT", "x,x,x,x",
/* 0x24 */"PBU_$GET_PTR", "x,x,x,x",
/* 0x25 */"PCHIST_$CNTL", "x,x,x,x",
/* 0x26 */"PROC2_$GET_INFO", "u,x,x,x",
-/* 0x27 */NULL, NULL,
-/* 0x28 */NULL, NULL,
-/* 0x29 */NULL, NULL,
+/* 0x27 */nullptr, nullptr,
+/* 0x28 */nullptr, nullptr,
+/* 0x29 */nullptr, nullptr,
/* 0x2a */"SMD_$SIGNAL", "x,x,x,x",
-/* 0x2b */NULL, NULL,
-/* 0x2c */NULL, NULL,
+/* 0x2b */nullptr, nullptr,
+/* 0x2c */nullptr, nullptr,
/* 0x2d */"TERM_$INQUIRE", "x,x,x,x",
-/* 0x2e */NULL, NULL,
-/* 0x2f */NULL, NULL,
-/* 0x30 */NULL, NULL,
+/* 0x2e */nullptr, nullptr,
+/* 0x2f */nullptr, nullptr,
+/* 0x30 */nullptr, nullptr,
/* 0x31 */"TERM_$GET_EC", "x,x,x,x",
-/* 0x32 */NULL, NULL,
+/* 0x32 */nullptr, nullptr,
/* 0x33 */"PBU_$GET_EC", "x,x,x,x",
-/* 0x34 */NULL, NULL,
-/* 0x35 */NULL, NULL,
-/* 0x36 */NULL, NULL,
-/* 0x37 */NULL, NULL,
+/* 0x34 */nullptr, nullptr,
+/* 0x35 */nullptr, nullptr,
+/* 0x36 */nullptr, nullptr,
+/* 0x37 */nullptr, nullptr,
/* 0x38 */"TERM_$READ_COND", "x,x,x,x",
-/* 0x39 */NULL, NULL,
-/* 0x3a */NULL, NULL,
+/* 0x39 */nullptr, nullptr,
+/* 0x3a */nullptr, nullptr,
/* 0x3b */"PBU2_$WIRE", "x,x,x,x",
/* 0x3c */"PROC2_$SET_NAME", "x,x,x,x",
/* 0x3d */"PROC2_$SET_PRIORITY", "x,x,x,x",
/* 0x3e */"PROC2_$GET_EC", "u,x,x,x",
/* 0x3f */"PROC2_$LIST_PGROUP", "x,x,x,x",
-/* 0x40 */NULL, NULL,
-/* 0x41 */NULL, NULL,
-/* 0x42 */NULL, NULL,
+/* 0x40 */nullptr, nullptr,
+/* 0x41 */nullptr, nullptr,
+/* 0x42 */nullptr, nullptr,
/* 0x43 */"CT_$CONTROL", "x,x,x,x",
/* 0x44 */"CT_$WAIT", "x,x,x,x",
/* 0x45 */"DIR_$DROP_DIRU", "x,x,x,x",
/* 0x46 */"DIR_$SET_DEFAULT_ACL", "x,x,x,x",
/* 0x47 */"DIR_$GET_DEFAULT_ACL", "x,x,x,x",
/* 0x48 */"NAME_$READ_DIRS_PS", "x,x,x,x",
-/* 0x49 */NULL, NULL,
+/* 0x49 */nullptr, nullptr,
/* 0x4a */"ACL_$GET_PROJ_LIST", "x,x,x,x",
/* 0x4b */"MST_$CHANGE_RIGHTS", "x,x,x,x",
-/* 0x4c */NULL, NULL,
+/* 0x4c */nullptr, nullptr,
/* 0x4d */"FILE_$READ_LOCK_ENTRYI", "x,x,x,x",
/* 0x4e */"ROUTE_$INCOMING", "x,x,x,x",
-/* 0x4f */NULL, NULL,
+/* 0x4f */nullptr, nullptr,
/* 0x50 */"SMD_$INQ_KBD_TYPE", "x,x,x,x",
/* 0x51 */"ROUTE_$GET_EC", "x,x,x,x",
-/* 0x52 */NULL, NULL,
+/* 0x52 */nullptr, nullptr,
/* 0x53 */"SMD_$DM_COND_EVENT_WAIT", "x,x,x,x",
/* 0x54 */"DISK_$READ_MFG_BADSPOTS", "x,x,x,x",
/* 0x55 */"DISK_$GET_MNT_INFO", "x,x,x,x",
@@ -575,7 +575,7 @@ static const char* trap4[] = {
/* 0x65 */"XPD_$GET_REGISTERS", "x,x,x,x",
/* 0x66 */"XPD_$PUT_REGISTERS", "x,x,x,x",
/* 0x67 */"FILE_$RESERVE", "u,x,x,x",
-/* 0x68 */NULL, NULL,
+/* 0x68 */nullptr, nullptr,
/* 0x69 */"ACL_$GET_RES_SIDS", "x,x,x,x",
/* 0x6a */"FILE_$FW_PAGES", "x,x,x,x",
/* 0x6b */"PROC2_$SET_ACCT_INFO", "s,x,x,x",
@@ -585,13 +585,13 @@ static const char* trap4[] = {
/* 0x6f */"FILE_$TRUNCATE_D", "x,x,x,x",
/* 0x70 */"FILE_$SET_DTM_F", "x,x,x,x",
/* 0x71 */"TTY_$K_SET_FLAG", "x,x,x,x",
-/* 0x72 */NULL, NULL,
+/* 0x72 */nullptr, nullptr,
/* 0x73 */"MST_$UNMAP_AND_FREE_AREA", "x,x,x,x",
-/* 0x74 */NULL, NULL,
+/* 0x74 */nullptr, nullptr,
/* 0x75 */"PROC2_$NAME_TO_UID", "S,w,u,x",
-/* 0x76 */NULL, NULL,
-/* 0x77 */NULL, NULL,
-/* 0x78 */NULL, NULL,
+/* 0x76 */nullptr, nullptr,
+/* 0x77 */nullptr, nullptr,
+/* 0x78 */nullptr, nullptr,
/* 0x79 */"SCSI_$GET_EC", "x,x,x,x",
/* 0x7a */"SCSI_$GET_INFO", "x,x,x,x",
/* 0x7b */"SCSI_$SETUP", "x,x,x,x",
@@ -599,12 +599,12 @@ static const char* trap4[] = {
/* 0x7d */"MSG_$SHARE_SOCKET", "x,x,x,x",
/* 0x7e */"TTY_$K_INQ_DELAY", "x,x,x,x",
/* 0x7f */"TTY_$K_SET_DELAY", "x,x,x,x",
-/* 0x80 */NULL, NULL,
-/* 0x81 */NULL, NULL,
+/* 0x80 */nullptr, nullptr,
+/* 0x81 */nullptr, nullptr,
/* 0x82 */"PROC2_$PGROUP_INFO", "x,x,x,x",
/* 0x83 */"PROC2_$SET_PARM", "x,x,x,x",
-/* 0x84 */NULL, NULL,
-/* 0x85 */NULL, NULL,
+/* 0x84 */nullptr, nullptr,
+/* 0x85 */nullptr, nullptr,
/* 0x86 */"XPAGE_$PAGER_RENDEZVOUS", "x,x,x,x",
/* 0x87 */"FILE_$SET_DEVNO32", "x,x,x,x",
/* 0x88 */"MST_$SET_LIMIT", "x,x,x,x",
@@ -618,23 +618,23 @@ static const char* trap4[] = {
//------------------------------------------------------
static const char* trap5[] = {
-/* 0x00 */NULL, NULL,
+/* 0x00 */nullptr, nullptr,
/* 0x01 */"MST_$MAP_AREA", "x,x,x,u,x",
-/* 0x02 */NULL, NULL,
-/* 0x03 */NULL, NULL,
-/* 0x04 */NULL, NULL,
+/* 0x02 */nullptr, nullptr,
+/* 0x03 */nullptr, nullptr,
+/* 0x04 */nullptr, nullptr,
/* 0x05 */"ACL_$RIGHTS", "x,x,x,x,x",
-/* 0x06 */NULL, NULL,
+/* 0x06 */nullptr, nullptr,
/* 0x07 */"ASKNODE_$INFO", "x,x,x,x,x",
/* 0x08 */"DISK_$AS_READ", "x,x,x,x,x",
/* 0x09 */"DISK_$AS_WRITE", "x,x,x,x,x",
-/* 0x0a */NULL, NULL,
-/* 0x0b */NULL, NULL,
-/* 0x0c */NULL, NULL,
-/* 0x0d */NULL, NULL,
-/* 0x0e */NULL, NULL,
-/* 0x0f */NULL, NULL,
-/* 0x10 */NULL, NULL,
+/* 0x0a */nullptr, nullptr,
+/* 0x0b */nullptr, nullptr,
+/* 0x0c */nullptr, nullptr,
+/* 0x0d */nullptr, nullptr,
+/* 0x0e */nullptr, nullptr,
+/* 0x0f */nullptr, nullptr,
+/* 0x10 */nullptr, nullptr,
/* 0x11 */"PBU_$GET_DCTE", "x,x,x,x,x",
/* 0x12 */"PBU_$READ_CSR", "x,x,x,x,x",
/* 0x13 */"PBU_$CONTROL", "x,x,x,x,x",
@@ -647,8 +647,8 @@ static const char* trap5[] = {
/* 0x1a */"VTOC_$GET_UID", "x,x,x,x,x",
/* 0x1b */"NETLOG_$CNTL", "x,x,x,x,x",
/* 0x1c */"PROC2_$GET_UPIDS", "x,x,x,x,x",
-/* 0x1d */NULL, NULL,
-/* 0x1e */NULL, NULL,
+/* 0x1d */nullptr, nullptr,
+/* 0x1e */nullptr, nullptr,
/* 0x1f */"PBU2_$ALLOCATE_MAP", "x,x,x,x,x",
/* 0x20 */"PBU2_$MAP", "x,x,x,x,x",
/* 0x21 */"PBU2_$UNMAP", "x,x,x,x,x",
@@ -656,13 +656,13 @@ static const char* trap5[] = {
/* 0x23 */"MST_$GET_UID_ASID", "x,x,x,x,x",
/* 0x24 */"MST_$INVALIDATE", "x,x,u,x,x",
/* 0x25 */"FILE_$INVALIDATE", "x,x,x,x,x",
-/* 0x26 */NULL, NULL,
-/* 0x27 */NULL, NULL,
-/* 0x28 */NULL, NULL,
+/* 0x26 */nullptr, nullptr,
+/* 0x27 */nullptr, nullptr,
+/* 0x28 */nullptr, nullptr,
/* 0x29 */"MST_$SET_TOUCH_AHEAD_CNT", "x,x,x,x,x",
/* 0x2a */"OS_$CHKSUM", "x,x,x,x,x",
/* 0x2b */"FILE_$GET_SEGMENT_MAP", "x,x,x,x,x",
-/* 0x2c */NULL, NULL,
+/* 0x2c */nullptr, nullptr,
/* 0x2d */"PBU2_$ASSOC", "x,x,x,x,x",
/* 0x2e */"FILE_$UNLOCK_PROC", "x,x,x,x,x",
/* 0x2f */"CT_$READ", "x,x,x,x,x",
@@ -671,19 +671,19 @@ static const char* trap5[] = {
/* 0x32 */"DIR_$DROPU", "x,x,x,x,x",
/* 0x33 */"DIR_$CREATE_DIRU", "x,x,x,x,x",
/* 0x34 */"DIR_$ADD_BAKU", "x,x,x,x,x",
-/* 0x35 */NULL, NULL,
-/* 0x36 */NULL, NULL,
-/* 0x37 */NULL, NULL,
+/* 0x35 */nullptr, nullptr,
+/* 0x36 */nullptr, nullptr,
+/* 0x37 */nullptr, nullptr,
/* 0x38 */"DIR_$ADD_HARD_LINKU", "x,x,x,x,x",
-/* 0x39 */NULL, NULL,
+/* 0x39 */nullptr, nullptr,
/* 0x3a */"RIP_$UPDATE", "x,x,x,x,x",
/* 0x3b */"DIR_$DROP_LINKU", "x,x,x,x,x",
/* 0x3c */"ACL_$CHECK_RIGHTS", "x,x,x,x,x",
/* 0x3d */"DIR_$DROP_HARD_LINKU", "x,x,x,x,x",
/* 0x3e */"ROUTE_$OUTGOING", "x,x,x,x,x",
-/* 0x3f */NULL, NULL,
-/* 0x40 */NULL, NULL,
-/* 0x41 */NULL, NULL,
+/* 0x3f */nullptr, nullptr,
+/* 0x40 */nullptr, nullptr,
+/* 0x41 */nullptr, nullptr,
/* 0x42 */"NET_$GET_INFO", "x,x,x,x,x",
/* 0x43 */"DIR_$GET_ENTRYU", "x,x,x,x,x",
/* 0x44 */"AUDIT_$LOG_EVENT", "x,x,x,x,x",
@@ -691,7 +691,7 @@ static const char* trap5[] = {
/* 0x46 */"TTY_$K_GET", "x,x,s,x,x",
/* 0x47 */"TTY_$K_PUT", "x,x,S,w,x",
/* 0x48 */"PROC2_$ALIGN_CTL", "x,x,x,x,x",
-/* 0x49 */NULL, NULL,
+/* 0x49 */nullptr, nullptr,
/* 0x4a */"XPD_$READ_PROC", "x,x,x,x,x",
/* 0x4b */"XPD_$WRITE_PROC", "x,x,x,x,x",
/* 0x4c */"DIR_$SET_DEF_PROTECTION", "x,x,x,x,x",
@@ -705,24 +705,24 @@ static const char* trap5[] = {
/* 0x54 */"FILE_$EXPORT_LK", "x,x,x,x,x",
/* 0x55 */"FILE_$CHANGE_LOCK_D", "x,x,x,x,x",
/* 0x56 */"XPD_$READ_PROC_ASYNC", "x,x,x,x,x",
-/* 0x57 */NULL, NULL,
+/* 0x57 */nullptr, nullptr,
/* 0x58 */"SMD_$MAP_DISPLAY_MEMORY", "x,x,x,x,x",
-/* 0x59 */NULL, NULL,
-/* 0x5a */NULL, NULL,
-/* 0x5b */NULL, NULL,
-/* 0x5c */NULL, NULL,
+/* 0x59 */nullptr, nullptr,
+/* 0x5a */nullptr, nullptr,
+/* 0x5b */nullptr, nullptr,
+/* 0x5c */nullptr, nullptr,
/* 0x5d */"SCSI_$UNWIRE", "x,x,x,x,x",
/* 0x5e */"SMD_$UNMAP_DISPLAY_MEMORY", "x,x,x,x,x",
/* 0x5f */"SMD_$SET_COLOR_TABLE", "x,x,x,x,x",
/* 0x60 */"RIP_$TABLE_D", "x,x,x,x,x",
-/* 0x61 */NULL, NULL,
+/* 0x61 */nullptr, nullptr,
/* 0x62 */"SMD_$DEVICE_INFO", "x,x,x,x,x",
-/* 0x63 */NULL, NULL,
-/* 0x64 */NULL, NULL,
+/* 0x63 */nullptr, nullptr,
+/* 0x64 */nullptr, nullptr,
/* 0x65 */"THREAD_$GET_STATE", "x,x,x,p,x",
/* 0x66 */"THREAD_$SET_STATE", "x,x,x,p,x",
/* 0x67 */"THREAD_$SET_STACK", "x,u,x,x,x",
-/* 0x68 */NULL, NULL };
+/* 0x68 */nullptr, nullptr };
//------------------------------------------------------
// TRAP7
@@ -732,50 +732,50 @@ static const char* trap7[] = {
/* 0x00 */"FILE_$LOCK", "u,x,x,x,x,x,x",
/* 0x01 */"VFMT_$WRITE", "s,x,x,x,x,x,x",
/* 0x02 */"MST_$MAP_AREA_AT", "x,x,x,x,x,x,x",
-/* 0x03 */NULL, NULL,
-/* 0x04 */NULL, NULL,
-/* 0x05 */NULL, NULL,
-/* 0x06 */NULL, NULL,
-/* 0x07 */NULL, NULL,
-/* 0x08 */NULL, NULL,
-/* 0x09 */NULL, NULL,
-/* 0x0a */NULL, NULL,
-/* 0x0b */NULL, NULL,
-/* 0x0c */NULL, NULL,
+/* 0x03 */nullptr, nullptr,
+/* 0x04 */nullptr, nullptr,
+/* 0x05 */nullptr, nullptr,
+/* 0x06 */nullptr, nullptr,
+/* 0x07 */nullptr, nullptr,
+/* 0x08 */nullptr, nullptr,
+/* 0x09 */nullptr, nullptr,
+/* 0x0a */nullptr, nullptr,
+/* 0x0b */nullptr, nullptr,
+/* 0x0c */nullptr, nullptr,
/* 0x0d */"VFMT_$ENCODE/VFMT_$FORMAT", "x,x,x,x,x,x,x",
/* 0x0e */"VFMT_$ENCODE/VFMT_$FORMAT", "x,x,x,x,x,x,x",
/* 0x0f */"STOP_$WATCH", "x,x,x,x,x,x,x",
-/* 0x10 */NULL, NULL,
-/* 0x11 */NULL, NULL,
+/* 0x10 */nullptr, nullptr,
+/* 0x11 */nullptr, nullptr,
/* 0x12 */"ASKNODE_$GET_INFO", "x,x,x,x,x,x,x",
/* 0x13 */"DISK_$DIAG_IO", "x,x,x,x,x,x,x",
-/* 0x14 */NULL, NULL,
-/* 0x15 */NULL, NULL,
-/* 0x16 */NULL, NULL,
+/* 0x14 */nullptr, nullptr,
+/* 0x15 */nullptr, nullptr,
+/* 0x16 */nullptr, nullptr,
/* 0x17 */"CT_$DIAG", "x,x,x,x,x,x,x",
/* 0x18 */"TIME_$SET_ITIMER", "x,x,x,x,x,x,x",
/* 0x19 */"OSINFO_$GET_STATS", "x,x,x,x,x,x,x",
/* 0x1a */"DIR_$CNAMEU", "x,x,x,x,x,x,x",
/* 0x1b */"DIR_$DELETE_FILEU", "u,S,w,x,x,x,x",
/* 0x1c */"DIR_$ADD_LINKU", "x,x,x,x,x,x,x",
-/* 0x1d */NULL, NULL,
-/* 0x1e */NULL, NULL,
-/* 0x1f */NULL, NULL,
-/* 0x20 */NULL, NULL,
+/* 0x1d */nullptr, nullptr,
+/* 0x1e */nullptr, nullptr,
+/* 0x1f */nullptr, nullptr,
+/* 0x20 */nullptr, nullptr,
/* 0x21 */"ASKNODE_$WHO_REMOTE", "x,x,x,x,x,x,x",
/* 0x22 */"MST_$REMAP", "x,x,x,x,x,x,x",
/* 0x23 */"DIR_$ROOT_ADDU", "x,x,x,x,x,x,x",
-/* 0x24 */NULL, NULL,
-/* 0x25 */NULL, NULL,
-/* 0x26 */NULL, NULL,
-/* 0x27 */NULL, NULL,
+/* 0x24 */nullptr, nullptr,
+/* 0x25 */nullptr, nullptr,
+/* 0x26 */nullptr, nullptr,
+/* 0x27 */nullptr, nullptr,
/* 0x28 */"ASKNODE_$WHO_NOTOPO", "x,x,x,x,x,x,x",
/* 0x29 */"NET_$OPEN", "x,x,x,x,x,x,x",
/* 0x2a */"NET_$CLOSE", "x,x,x,x,x,x,x",
/* 0x2b */"NET_$IOCTL", "x,x,x,x,x,x,x",
/* 0x2c */"DIR_$FIND_UID", "u,u,x,S,w,x,x",
/* 0x2d */"FILE_$GET_ATTRIBUTES", "u,x,x,x,x,x,-",
-/* 0x2e */NULL, NULL,
+/* 0x2e */nullptr, nullptr,
/* 0x2f */"PCHIST_$UNIX_PROFIL_CNTL", "x,x,x,x,x,x,x",
/* 0x30 */"XPD_$RESTART", "x,x,x,x,x,x,x",
/* 0x31 */"FILE_$GET_ATTR_INFO", "u,x,x,x,x,x,p",
@@ -802,12 +802,12 @@ static const char* trap8[] = {
/* 0x03 - 0x0A */"VFMT_$WRITE", "s,x,x,x,x,x,x,x,x,x",
/* 0x04 - 0x06 */"VOLX_$DISMOUNT", "x,x,x,x,x,x",
/* 0x05 - 0x06 */"VOLX_$GET_UIDS", "x,x,x,x,x,x",
-/* 0x06 - 0x07 */NULL, NULL,
+/* 0x06 - 0x07 */nullptr, nullptr,
/* 0x07 - 0x07 */"DISK_$PV_ASSIGN", "x,x,x,x,x,x,x",
/* 0x08 - 0x0B */"MSG_$RCV", "x,x,x,x,x,x,x,x,x,x,x",
/* 0x09 - 0x10 */"MSG_$SAR", "x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x",
/* 0x0a - 0x0A */"MSG_$SEND", "x,x,x,x,x,x,x,x,x,x",
-/* 0x0b - 0x06 */NULL, NULL,
+/* 0x0b - 0x06 */nullptr, nullptr,
/* 0x0c - 0x07 */"SMD_$LOAD_CRSR_BITMAP", "x,x,x,x,x,x,x",
/* 0x0d - 0x07 */"SMD_$READ_CRSR_BITMAP", "x,x,x,x,x,x,x",
/* 0x0e - 0x0D */"VFMT_$ENCODE/VFMT_$FORMAT", "s,x,x,x,x,x,x,x,x,x,x,x,x",
@@ -823,22 +823,22 @@ static const char* trap8[] = {
/* 0x18 - 0x0F */"MSG_$RCVI", "x,x,x,x,x,x,x,x,x,x,x,x,x,x,x",
/* 0x19 - 0x0C */"MSG_$RCV_CONTIGI", "x,x,x,x,x,x,x,x,x,x,x,x",
/* 0x1a - 0x11 */"MSG_$SARI", "x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x",
-/* 0x1b - 0x06 */NULL, NULL,
+/* 0x1b - 0x06 */nullptr, nullptr,
/* 0x1c - 0x0E */"MSG_$SEND_HW", "x,x,x,x,x,x,x,x,x,x,x,x,x,x",
/* 0x1d - 0x07 */"PBU_$WIRE_SPECIAL", "x,x,x,x,x,x,x",
/* 0x1e - 0x06 */"PBU_$DMA_START", "x,x,x,x,x,x",
-/* 0x1f - 0x08 */NULL, NULL,
+/* 0x1f - 0x08 */nullptr, nullptr,
/* 0x20 - 0x07 */"MST_$MAP_TOP", "x,x,x,x,x,x,x",
/* 0x21 - 0x08 */"NET_$SEND", "x,x,x,x,x,x,x,x",
/* 0x22 - 0x08 */"NET_$RCV", "x,x,x,x,x,x,x,x",
/* 0x23 - 0x08 */"DIR_$DIR_READU", "u,S,w,x,x,x,x,x",
/* 0x24 - 0x07 */"DIR_$READ_LINKU", "x,x,x,x,x,x,x",
/* 0x25 - 0x07 */"PBU2_$DMA_START", "x,x,x,x,x,x,x",
-/* 0x26 - 0x09 */NULL, NULL,
-/* 0x27 - 0x09 */NULL, NULL,
+/* 0x26 - 0x09 */nullptr, nullptr,
+/* 0x27 - 0x09 */nullptr, nullptr,
/* 0x28 - 0x07 */"PROC2_$COMPLETE_VFORK", "x,x,x,x,x,x,x",
-/* 0x29 - 0x07 */NULL, NULL,
-/* 0x2a - 0x06 */NULL, NULL,
+/* 0x29 - 0x07 */nullptr, nullptr,
+/* 0x2a - 0x06 */nullptr, nullptr,
/* 0x2b - 0x0A */"DIR_$RESOLVE", "S,w,u,u,x,x,x,x,x,x",
/* 0x2c - 0x08 */"VOLX_$MOUNT", "x,x,x,x,x,x,x,x",
/* 0x2d - 0x06 */"ACL_$IMAGE", "x,x,x,x,x,x",
@@ -938,8 +938,8 @@ static const char* get_svc_call(m68000_base_device *m68k, int trap_no,
{
UINT32 sp = REG_A(m68k)[7];
UINT32 pa;
- const char * name = NULL;
- const char * param = NULL;
+ const char * name = nullptr;
+ const char * param = nullptr;
switch (trap_no)
{
@@ -1003,14 +1003,14 @@ static const char* get_svc_call(m68000_base_device *m68k, int trap_no,
sb[0] = '\0';
- if (name == NULL)
+ if (name == nullptr)
{
strcat(sb, "???");
}
else
{
strcat(sb, name);
- if (param != NULL)
+ if (param != nullptr)
{
int i;
strcat(sb, "(");
diff --git a/src/mame/machine/apollo_kbd.cpp b/src/mame/machine/apollo_kbd.cpp
index 6cb767bc67f..d646b9d70c9 100644
--- a/src/mame/machine/apollo_kbd.cpp
+++ b/src/mame/machine/apollo_kbd.cpp
@@ -146,7 +146,7 @@ const char *apollo_kbd_device::cpu_context()
int ms = (t % osd_ticks_per_second()) / 1000;
/* if we have an executing CPU, output data */
- if (cpu != NULL)
+ if (cpu != nullptr)
{
sprintf(statebuf, "%d.%03d %s pc=%08x - %s", s, ms, cpu->tag(),
cpu->safe_pcbase(), tag());
@@ -163,9 +163,9 @@ const char *apollo_kbd_device::cpu_context()
//**************************************************************************
apollo_kbd_device::beeper::beeper() :
- m_device(NULL),
- m_beeper(NULL),
- m_timer(NULL)
+ m_device(nullptr),
+ m_beeper(nullptr),
+ m_timer(nullptr)
{
}
@@ -218,7 +218,7 @@ TIMER_CALLBACK( apollo_kbd_device::beeper::static_beeper_callback )
//**************************************************************************
apollo_kbd_device::mouse::mouse() :
- m_device(NULL)
+ m_device(nullptr)
{
}
diff --git a/src/mame/machine/appldriv.cpp b/src/mame/machine/appldriv.cpp
index 86e2657cf9b..1257b720e23 100644
--- a/src/mame/machine/appldriv.cpp
+++ b/src/mame/machine/appldriv.cpp
@@ -21,7 +21,7 @@
INLINE apple525_floppy_image_device *get_device(device_t *device)
{
- assert(device != NULL);
+ assert(device != nullptr);
assert(device->type() == FLOPPY_APPLE);
return (apple525_floppy_image_device *) downcast<apple525_floppy_image_device *>(device);
@@ -37,7 +37,7 @@ legacy_floppy_image_device *apple525_get_subdevice(device_t *device, int drive)
case 2 : return device->subdevice<legacy_floppy_image_device>(PARENT_FLOPPY_2);
case 3 : return device->subdevice<legacy_floppy_image_device>(PARENT_FLOPPY_3);
}
- return NULL;
+ return nullptr;
}
device_t *apple525_get_device_by_type(device_t *device, int ftype, int drive)
@@ -53,7 +53,7 @@ device_t *apple525_get_device_by_type(device_t *device, int ftype, int drive)
cnt++;
}
}
- return NULL;
+ return nullptr;
}
void apple525_set_enable_lines(device_t *device,int enable_mask)
@@ -166,10 +166,10 @@ static void apple525_disk_set_lines(device_t *device,device_t *image, UINT8 new_
int apple525_get_count(device_t *device)
{
int cnt = 0;
- if ((device->subdevice("^" FLOPPY_0)!=NULL) && (device->subdevice<legacy_floppy_image_device>("^" FLOPPY_0)->floppy_get_drive_type() == FLOPPY_TYPE_APPLE) && (get_device(device->subdevice(PARENT_FLOPPY_0))!=NULL)) cnt++;
- if ((device->subdevice("^" FLOPPY_1)!=NULL) && (device->subdevice<legacy_floppy_image_device>("^" FLOPPY_1)->floppy_get_drive_type() == FLOPPY_TYPE_APPLE) && (get_device(device->subdevice(PARENT_FLOPPY_1))!=NULL)) cnt++;
- if ((device->subdevice("^" FLOPPY_2)!=NULL) && (device->subdevice<legacy_floppy_image_device>("^" FLOPPY_2)->floppy_get_drive_type() == FLOPPY_TYPE_APPLE) && (get_device(device->subdevice(PARENT_FLOPPY_2))!=NULL)) cnt++;
- if ((device->subdevice("^" FLOPPY_3)!=NULL) && (device->subdevice<legacy_floppy_image_device>("^" FLOPPY_3)->floppy_get_drive_type() == FLOPPY_TYPE_APPLE) && (get_device(device->subdevice(PARENT_FLOPPY_3))!=NULL)) cnt++;
+ if ((device->subdevice("^" FLOPPY_0)!=nullptr) && (device->subdevice<legacy_floppy_image_device>("^" FLOPPY_0)->floppy_get_drive_type() == FLOPPY_TYPE_APPLE) && (get_device(device->subdevice(PARENT_FLOPPY_0))!=nullptr)) cnt++;
+ if ((device->subdevice("^" FLOPPY_1)!=nullptr) && (device->subdevice<legacy_floppy_image_device>("^" FLOPPY_1)->floppy_get_drive_type() == FLOPPY_TYPE_APPLE) && (get_device(device->subdevice(PARENT_FLOPPY_1))!=nullptr)) cnt++;
+ if ((device->subdevice("^" FLOPPY_2)!=nullptr) && (device->subdevice<legacy_floppy_image_device>("^" FLOPPY_2)->floppy_get_drive_type() == FLOPPY_TYPE_APPLE) && (get_device(device->subdevice(PARENT_FLOPPY_2))!=nullptr)) cnt++;
+ if ((device->subdevice("^" FLOPPY_3)!=nullptr) && (device->subdevice<legacy_floppy_image_device>("^" FLOPPY_3)->floppy_get_drive_type() == FLOPPY_TYPE_APPLE) && (get_device(device->subdevice(PARENT_FLOPPY_3))!=nullptr)) cnt++;
return cnt;
}
@@ -253,7 +253,7 @@ static device_t *apple525_selected_image(device_t *device)
if (apple525_enable_mask & (1 << i))
return apple525_get_device_by_type(device, FLOPPY_TYPE_APPLE, i);
}
- return NULL;
+ return nullptr;
}
UINT8 apple525_read_data(device_t *device)
diff --git a/src/mame/machine/apple2.cpp b/src/mame/machine/apple2.cpp
index 765f97ad92a..88a2158ab8b 100644
--- a/src/mame/machine/apple2.cpp
+++ b/src/mame/machine/apple2.cpp
@@ -46,7 +46,7 @@ READ8_MEMBER(apple2_state::read_floatingbus)
void apple2_state::apple2_setup_memory(const apple2_memmap_config *config)
{
m_mem_config = *config;
- m_current_meminfo = NULL;
+ m_current_meminfo = nullptr;
apple2_update_memory();
}
@@ -91,11 +91,11 @@ void apple2_state::apple2_update_memory()
|| (meminfo.read_mem != m_current_meminfo[i].read_mem)
|| (meminfo.read_handler != m_current_meminfo[i].read_handler))
{
- rbase = NULL;
+ rbase = nullptr;
sprintf(rbank,"bank%d",bank);
begin = m_mem_config.memmap[i].begin;
end_r = m_mem_config.memmap[i].end;
- rh = NULL;
+ rh = nullptr;
LOG(("apple2_update_memory(): Updating RD {%06X..%06X} [#%02d] --> %08X\n",
begin, end_r, bank, meminfo.read_mem));
@@ -183,14 +183,14 @@ void apple2_state::apple2_update_memory()
|| (meminfo.write_mem != m_current_meminfo[i].write_mem)
|| (meminfo.write_handler != m_current_meminfo[i].write_handler))
{
- wbase = NULL;
+ wbase = nullptr;
if (bank_disposition == A2MEM_MONO)
sprintf(wbank,"bank%d",bank);
else if (bank_disposition == A2MEM_DUAL)
sprintf(wbank,"bank%d",bank+1);
begin = m_mem_config.memmap[i].begin;
end_w = m_mem_config.memmap[i].end;
- wh = NULL;
+ wh = nullptr;
LOG(("apple2_update_memory(): Updating WR {%06X..%06X} [#%02d] --> %08X\n",
begin, end_w, bank, meminfo.write_mem));
@@ -402,7 +402,7 @@ READ8_MEMBER(apple2_state::apple2_c080_r)
slotdevice = m_a2bus->get_a2bus_card(slot);
/* and if we can, read from the slot */
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
return slotdevice->read_c0nx(space, offset % 0x10);
}
@@ -506,7 +506,7 @@ WRITE8_MEMBER(apple2_state::apple2_c080_w)
slotdevice = m_a2bus->get_a2bus_card(slot);
/* and if we can, write to the slot */
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_c0nx(space, offset % 0x10, data);
}
@@ -539,7 +539,7 @@ READ8_MEMBER(apple2_state::apple2_c1xx_r )
slotnum = ((offset>>8) & 0xf) + 1;
slotdevice = m_a2bus->get_a2bus_card(slotnum);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
if ((slotdevice->take_c800()) && (!space.debugger_access()))
{
@@ -569,7 +569,7 @@ WRITE8_MEMBER(apple2_state::apple2_c1xx_w )
slotdevice = m_a2bus->get_a2bus_card(slotnum);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_cnxx(space, offset&0xff, data);
}
@@ -589,7 +589,7 @@ READ8_MEMBER(apple2_state::apple2_c3xx_r )
slotdevice = m_a2bus->get_a2bus_card(slotnum);
// is a card installed in this slot?
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
if ((slotdevice->take_c800()) && (!space.debugger_access()))
{
@@ -617,7 +617,7 @@ WRITE8_MEMBER(apple2_state::apple2_c3xx_w )
slotnum = 3;
slotdevice = m_a2bus->get_a2bus_card(slotnum);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
if ((slotdevice->take_c800()) && (!space.debugger_access()))
{
@@ -643,7 +643,7 @@ READ8_MEMBER(apple2_state::apple2_c4xx_r )
slotdevice = m_a2bus->get_a2bus_card(slotnum);
// is a card installed in this slot?
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
if (slotdevice->take_c800() && (m_a2_cnxx_slot != slotnum) && (!space.debugger_access()))
{
@@ -670,7 +670,7 @@ WRITE8_MEMBER ( apple2_state::apple2_c4xx_w )
slotnum = ((offset>>8) & 0xf) + 4;
slotdevice = m_a2bus->get_a2bus_card(slotnum);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
if ((slotdevice->take_c800()) && (!space.debugger_access()))
{
@@ -716,7 +716,7 @@ READ8_MEMBER(apple2_state::apple2_c800_r )
slotdevice = m_a2bus->get_a2bus_card(m_a2_cnxx_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
return slotdevice->read_c800(space, offset&0xfff);
}
@@ -730,7 +730,7 @@ WRITE8_MEMBER(apple2_state::apple2_c800_w )
slotdevice = m_a2bus->get_a2bus_card(m_a2_cnxx_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_c800(space, offset&0xfff, data);
}
@@ -742,7 +742,7 @@ READ8_MEMBER(apple2_state::apple2_ce00_r )
slotdevice = m_a2bus->get_a2bus_card(m_a2_cnxx_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
return slotdevice->read_c800(space, (offset&0xfff) + 0x600);
}
@@ -756,7 +756,7 @@ WRITE8_MEMBER(apple2_state::apple2_ce00_w )
slotdevice = m_a2bus->get_a2bus_card(m_a2_cnxx_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_c800(space, (offset&0xfff)+0x600, data);
}
@@ -768,7 +768,7 @@ READ8_MEMBER(apple2_state::apple2_inh_d000_r )
slotdevice = m_a2bus->get_a2bus_card(m_inh_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
return slotdevice->read_inh_rom(space, offset & 0xfff);
}
@@ -782,7 +782,7 @@ WRITE8_MEMBER(apple2_state::apple2_inh_d000_w )
slotdevice = m_a2bus->get_a2bus_card(m_inh_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
return slotdevice->write_inh_rom(space, offset & 0xfff, data);
}
@@ -794,7 +794,7 @@ READ8_MEMBER(apple2_state::apple2_inh_e000_r )
slotdevice = m_a2bus->get_a2bus_card(m_inh_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
return slotdevice->read_inh_rom(space, (offset & 0x1fff) + 0x1000);
}
@@ -808,7 +808,7 @@ WRITE8_MEMBER(apple2_state::apple2_inh_e000_w )
slotdevice = m_a2bus->get_a2bus_card(m_inh_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_inh_rom(space, (offset & 0x1fff) + 0x1000, data);
}
@@ -1308,8 +1308,8 @@ void apple2_state::machine_reset()
int apple2_state::a2_no_ctrl_reset()
{
- return (((m_kbrepeat != NULL) && (m_resetdip == NULL)) ||
- ((m_resetdip != NULL) && !m_resetdip->read()));
+ return (((m_kbrepeat != nullptr) && (m_resetdip == nullptr)) ||
+ ((m_resetdip != nullptr) && !m_resetdip->read()));
}
/* -----------------------------------------------------------------------
@@ -2235,9 +2235,9 @@ void apple2_state::apple2_init_common()
m_rom = memregion("maincpu")->base();
m_rom_length = memregion("maincpu")->bytes() & ~0xFFF;
m_slot_length = memregion("maincpu")->bytes() - m_rom_length;
- m_slot_ram = (m_slot_length > 0) ? &m_rom[m_rom_length] : NULL;
+ m_slot_ram = (m_slot_length > 0) ? &m_rom[m_rom_length] : nullptr;
- m_auxslotdevice = NULL;
+ m_auxslotdevice = nullptr;
if (m_machinetype == APPLE_IIE || m_machinetype == TK3000)
{
m_auxslotdevice = m_a2eauxslot->get_a2eauxslot_card();
@@ -2283,14 +2283,14 @@ MACHINE_START_MEMBER(apple2_state,apple2c)
{
m_machinetype = APPLE_IIC;
- apple2eplus_init_common((void *)NULL);
+ apple2eplus_init_common((void *)nullptr);
}
MACHINE_START_MEMBER(apple2_state,tk3000)
{
m_machinetype = TK3000; // enhanced IIe clone with Z80 keyboard scanner subcpu
- apple2eplus_init_common((void *)NULL);
+ apple2eplus_init_common((void *)nullptr);
}
MACHINE_START_MEMBER(apple2_state,apple2cp)
@@ -2322,7 +2322,7 @@ MACHINE_START_MEMBER(apple2_state,apple2e)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = apple2_memmap_entries;
- mem_cfg.auxmem = (UINT8*)NULL;
+ mem_cfg.auxmem = (UINT8*)nullptr;
apple2_setup_memory(&mem_cfg);
}
@@ -2353,14 +2353,14 @@ MACHINE_START_MEMBER(apple2_state,laser128)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = apple2_memmap_entries;
- mem_cfg.auxmem = (UINT8*)NULL;
+ mem_cfg.auxmem = (UINT8*)nullptr;
apple2_setup_memory(&mem_cfg);
}
MACHINE_START_MEMBER(apple2_state,apple2orig)
{
apple2_memmap_config mem_cfg;
- void *apple2cp_ce00_ram = NULL;
+ void *apple2cp_ce00_ram = nullptr;
// II and II+ have no internal ROM or internal slot 3 h/w, so don't allow these states
m_flags_mask = VAR_INTCXROM|VAR_SLOTC3ROM;
@@ -2380,7 +2380,7 @@ MACHINE_START_MEMBER(apple2_state,apple2orig)
MACHINE_START_MEMBER(apple2_state,space84)
{
apple2_memmap_config mem_cfg;
- void *apple2cp_ce00_ram = NULL;
+ void *apple2cp_ce00_ram = nullptr;
// II and II+ have no internal ROM or internal slot 3 h/w, so don't allow these states
m_flags_mask = VAR_INTCXROM|VAR_SLOTC3ROM;
@@ -2400,7 +2400,7 @@ MACHINE_START_MEMBER(apple2_state,space84)
MACHINE_START_MEMBER(apple2_state,laba2p)
{
apple2_memmap_config mem_cfg;
- void *apple2cp_ce00_ram = NULL;
+ void *apple2cp_ce00_ram = nullptr;
// II and II+ have no internal ROM or internal slot 3 h/w, so don't allow these states
m_flags_mask = VAR_INTCXROM|VAR_SLOTC3ROM;
@@ -2432,7 +2432,7 @@ MACHINE_START_MEMBER(apple2_state,tk2000)
memset(&mem_cfg, 0, sizeof(mem_cfg));
mem_cfg.first_bank = 1;
mem_cfg.memmap = tk2000_memmap_entries;
- mem_cfg.auxmem = (UINT8*)NULL;
+ mem_cfg.auxmem = (UINT8*)nullptr;
apple2_setup_memory(&mem_cfg);
}
diff --git a/src/mame/machine/apple2gs.cpp b/src/mame/machine/apple2gs.cpp
index 4f7f64f0f7c..132ed6e8dca 100644
--- a/src/mame/machine/apple2gs.cpp
+++ b/src/mame/machine/apple2gs.cpp
@@ -247,7 +247,7 @@ const char *apple2gs_state::apple2gs_irq_name(UINT16 irq_mask)
case IRQ_DOC: return "IRQ_DOC";
case IRQ_SLOT: return "IRQ_SLOT";
}
- return NULL;
+ return nullptr;
}
void apple2gs_state::apple2gs_add_irq(UINT16 irq_mask)
@@ -1638,7 +1638,7 @@ UINT8 apple2gs_state::apple2gs_xxCxxx_r(address_space &space, offs_t address)
else
{
// accessing a slot mapped to "Your Card", C800 should belong to that card
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
if (slotdevice->take_c800())
{
@@ -1655,7 +1655,7 @@ UINT8 apple2gs_state::apple2gs_xxCxxx_r(address_space &space, offs_t address)
}
else // C800-CFFF, not cards
{
- slotdevice = NULL;
+ slotdevice = nullptr;
// if CFFF accessed, reset C800 area to internal ROM
if(!space.debugger_access())
@@ -1730,7 +1730,7 @@ void apple2gs_state::apple2gs_xxCxxx_w(address_space &space, offs_t address, UIN
else
{
// accessing a slot mapped to "Your Card", C800 should belong to that card if it can take it
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
if (slotdevice->take_c800())
{
@@ -1744,7 +1744,7 @@ void apple2gs_state::apple2gs_xxCxxx_w(address_space &space, offs_t address, UIN
}
else // C800-CFFF, not cards
{
- slotdevice = NULL;
+ slotdevice = nullptr;
// if CFFF accessed, reset C800 area to internal ROM
if ((address & 0xfff) == 0xfff)
@@ -1908,7 +1908,7 @@ MACHINE_RESET_MEMBER(apple2gs_state,apple2gs)
// call "base class" machine reset to set up m_rambase and the language card
machine_reset();
- m_cur_slot6_image = NULL;
+ m_cur_slot6_image = nullptr;
m_newvideo = 0x00;
m_vgcint = 0x00;
m_langsel = 0x00;
@@ -1961,7 +1961,7 @@ MACHINE_START_MEMBER(apple2gs_state,apple2gscommon)
apple2gs_refresh_delegates();
m_machinetype = APPLE_IIGS;
- apple2eplus_init_common(NULL);
+ apple2eplus_init_common(nullptr);
/* set up Apple IIgs vectoring */
m_maincpu->set_read_vector_callback(read8_delegate(FUNC(apple2gs_state::apple2gs_read_vector),this));
diff --git a/src/mame/machine/apple3.cpp b/src/mame/machine/apple3.cpp
index 8df76e3de4a..69db605aa36 100644
--- a/src/mame/machine/apple3.cpp
+++ b/src/mame/machine/apple3.cpp
@@ -196,7 +196,7 @@ READ8_MEMBER(apple3_state::apple3_c0xx_r)
case 0x98: case 0x99: case 0x9a: case 0x9b:
case 0x9c: case 0x9d: case 0x9e: case 0x9f:
slotdevice = m_a2bus->get_a2bus_card(1);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
result = slotdevice->read_c0nx(space, offset&0xf);
}
@@ -207,7 +207,7 @@ READ8_MEMBER(apple3_state::apple3_c0xx_r)
case 0xa8: case 0xa9: case 0xaa: case 0xab:
case 0xac: case 0xad: case 0xae: case 0xaf:
slotdevice = m_a2bus->get_a2bus_card(2);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
result = slotdevice->read_c0nx(space, offset&0xf);
}
@@ -218,7 +218,7 @@ READ8_MEMBER(apple3_state::apple3_c0xx_r)
case 0xb8: case 0xb9: case 0xba: case 0xbb:
case 0xbc: case 0xbd: case 0xbe: case 0xbf:
slotdevice = m_a2bus->get_a2bus_card(3);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
result = slotdevice->read_c0nx(space, offset&0xf);
}
@@ -229,7 +229,7 @@ READ8_MEMBER(apple3_state::apple3_c0xx_r)
case 0xc8: case 0xc9: case 0xca: case 0xcb:
case 0xcc: case 0xcd: case 0xce: case 0xcf:
slotdevice = m_a2bus->get_a2bus_card(4);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
result = slotdevice->read_c0nx(space, offset&0xf);
}
@@ -351,7 +351,7 @@ WRITE8_MEMBER(apple3_state::apple3_c0xx_w)
case 0x98: case 0x99: case 0x9a: case 0x9b:
case 0x9c: case 0x9d: case 0x9e: case 0x9f:
slotdevice = m_a2bus->get_a2bus_card(1);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_c0nx(space, offset&0xf, data);
}
@@ -362,7 +362,7 @@ WRITE8_MEMBER(apple3_state::apple3_c0xx_w)
case 0xa8: case 0xa9: case 0xaa: case 0xab:
case 0xac: case 0xad: case 0xae: case 0xaf:
slotdevice = m_a2bus->get_a2bus_card(2);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_c0nx(space, offset&0xf, data);
}
@@ -373,7 +373,7 @@ WRITE8_MEMBER(apple3_state::apple3_c0xx_w)
case 0xb8: case 0xb9: case 0xba: case 0xbb:
case 0xbc: case 0xbd: case 0xbe: case 0xbf:
slotdevice = m_a2bus->get_a2bus_card(3);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_c0nx(space, offset&0xf, data);
}
@@ -384,7 +384,7 @@ WRITE8_MEMBER(apple3_state::apple3_c0xx_w)
case 0xc8: case 0xc9: case 0xca: case 0xcb:
case 0xcc: case 0xcd: case 0xce: case 0xcf:
slotdevice = m_a2bus->get_a2bus_card(4);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_c0nx(space, offset&0xf, data);
}
@@ -642,7 +642,7 @@ MACHINE_RESET_MEMBER(apple3_state,apple3)
UINT8 *apple3_state::apple3_get_indexed_addr(offs_t offset)
{
- UINT8 *result = NULL;
+ UINT8 *result = nullptr;
// m_indir_bank is guaranteed to be between 0x80 and 0x8f
if (m_indir_bank == 0x8f)
@@ -810,7 +810,7 @@ READ8_MEMBER(apple3_state::apple3_memory_r)
/* now identify the device */
device_a2bus_card_interface *slotdevice = m_a2bus->get_a2bus_card((offset>>8) & 0x7);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
if (slotdevice->take_c800())
{
@@ -842,7 +842,7 @@ READ8_MEMBER(apple3_state::apple3_memory_r)
{
device_a2bus_card_interface *slotdevice = m_a2bus->get_a2bus_card(m_cnxx_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
rv = slotdevice->read_c800(space, offset&0x7ff);
}
@@ -938,7 +938,7 @@ WRITE8_MEMBER(apple3_state::apple3_memory_w)
/* now identify the device */
device_a2bus_card_interface *slotdevice = m_a2bus->get_a2bus_card((offset>>8) & 0x7);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
if (slotdevice->take_c800())
{
@@ -976,7 +976,7 @@ WRITE8_MEMBER(apple3_state::apple3_memory_w)
{
device_a2bus_card_interface *slotdevice = m_a2bus->get_a2bus_card(m_cnxx_slot);
- if (slotdevice != NULL)
+ if (slotdevice != nullptr)
{
slotdevice->write_c800(space, offset&0x7ff, data);
}
diff --git a/src/mame/machine/applefdc.cpp b/src/mame/machine/applefdc.cpp
index dac524308ba..014546b0f85 100644
--- a/src/mame/machine/applefdc.cpp
+++ b/src/mame/machine/applefdc.cpp
@@ -174,9 +174,9 @@ void applefdc_base_device::device_timer(emu_timer &timer, device_timer_id id, in
const applefdc_interface *applefdc_base_device::get_interface()
{
- static const applefdc_interface dummy_interface = {0, };
+ static const applefdc_interface dummy_interface = {nullptr, };
- return (static_config() != NULL)
+ return (static_config() != nullptr)
? (const applefdc_interface *) static_config()
: &dummy_interface;
}
@@ -331,7 +331,7 @@ void applefdc_base_device::write_reg(UINT8 data)
logerror("applefdc_write_reg(): latch mode off not implemented\n");
}
- if (intf->write_data != NULL)
+ if (intf->write_data != nullptr)
intf->write_data(this, data);
}
break;
@@ -366,7 +366,7 @@ void applefdc_base_device::turn_motor_onoff(bool status)
}
/* invoke callback, if present */
- if (intf->set_enable_lines != NULL)
+ if (intf->set_enable_lines != nullptr)
intf->set_enable_lines(this, enable_lines);
if (LOG_APPLEFDC_EXTRA)
@@ -406,7 +406,7 @@ void applefdc_base_device::iwm_access(int offset)
(offset & 1) ? "setting" : "clearing", lines[offset >> 1], m_lines);
}
- if ((offset < 0x08) && (intf->set_lines != NULL))
+ if ((offset < 0x08) && (intf->set_lines != nullptr))
intf->set_lines(this, m_lines & 0x0f);
switch(offset)
@@ -424,13 +424,13 @@ void applefdc_base_device::iwm_access(int offset)
case 0x0A:
/* turn off IWM_DRIVE */
- if ((m_lines & IWM_MOTOR) && (intf->set_enable_lines != NULL))
+ if ((m_lines & IWM_MOTOR) && (intf->set_enable_lines != nullptr))
intf->set_enable_lines(this, 1);
break;
case 0x0B:
/* turn on IWM_DRIVE */
- if ((m_lines & IWM_MOTOR) && (intf->set_enable_lines != NULL))
+ if ((m_lines & IWM_MOTOR) && (intf->set_enable_lines != nullptr))
intf->set_enable_lines(this, 2);
break;
}
@@ -463,7 +463,7 @@ UINT8 applefdc_base_device::read(UINT8 offset)
case 0x0C:
if (m_lines & IWM_Q7)
{
- if (intf->write_data != NULL)
+ if (intf->write_data != nullptr)
intf->write_data(this, m_write_byte);
result = 0;
}
@@ -525,7 +525,7 @@ void applefdc_base_device::write(UINT8 offset, UINT8 data)
case 0x0C:
if (m_lines & IWM_Q7)
{
- if (intf->write_data != NULL)
+ if (intf->write_data != nullptr)
intf->write_data(this, m_write_byte);
}
break;
diff --git a/src/mame/machine/apricotkb_hle.cpp b/src/mame/machine/apricotkb_hle.cpp
index 6950033c79f..7bf5531454c 100644
--- a/src/mame/machine/apricotkb_hle.cpp
+++ b/src/mame/machine/apricotkb_hle.cpp
@@ -70,37 +70,37 @@ const device_type APRICOT_KEYBOARD_HLE = &device_creator<apricot_keyboard_hle_de
static INPUT_PORTS_START( keyboard )
PORT_START("keyboard_0")
PORT_BIT(1 << 0, IP_ACTIVE_HIGH, IPT_UNUSED)
- APRICOT_KEY( 1, 0) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_NAME("Help")
- APRICOT_KEY( 2, 0) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_NAME("Undo")
- APRICOT_KEY( 3, 0) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) PORT_NAME("Repeat")
- APRICOT_KEY( 4, 0) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) PORT_NAME("Calc")
- APRICOT_KEY( 5, 0) PORT_CODE(KEYCODE_PRTSCR) PORT_CHAR(UCHAR_MAMEKEY(PRTSCR)) PORT_NAME("Print")
- APRICOT_KEY( 6, 0) PORT_CODE(KEYCODE_CANCEL) PORT_CHAR(UCHAR_MAMEKEY(CANCEL)) PORT_NAME("Intr")
- APRICOT_KEY( 7, 0) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_NAME("Menu")
- APRICOT_KEY( 8, 0) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) PORT_NAME("Finish")
- APRICOT_KEY( 9, 0) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_NAME("Function 1")
- APRICOT_KEY(10, 0) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_NAME("Function 2")
- APRICOT_KEY(11, 0) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_NAME("Function 3")
- APRICOT_KEY(12, 0) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_NAME("Function 4")
- APRICOT_KEY(13, 0) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_NAME("Function 5")
- APRICOT_KEY(14, 0) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_NAME("Function 6")
- APRICOT_KEY(15, 0) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('^')
- APRICOT_KEY(16, 0) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
- APRICOT_KEY(17, 0) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@')
- APRICOT_KEY(18, 0) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
- APRICOT_KEY(19, 0) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR(0xa3) // pound
- APRICOT_KEY(20, 0) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
- APRICOT_KEY(21, 0) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('$')
- APRICOT_KEY(22, 0) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
- APRICOT_KEY(23, 0) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
- APRICOT_KEY(24, 0) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
- APRICOT_KEY(25, 0) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
- APRICOT_KEY(26, 0) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
- APRICOT_KEY(27, 0) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
- APRICOT_KEY(28, 0) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(9)
+ APRICOT_KEY( 1, nullptr) PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_NAME("Help")
+ APRICOT_KEY( 2, nullptr) PORT_CODE(KEYCODE_F8) PORT_CHAR(UCHAR_MAMEKEY(F8)) PORT_NAME("Undo")
+ APRICOT_KEY( 3, nullptr) PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) PORT_NAME("Repeat")
+ APRICOT_KEY( 4, nullptr) PORT_CODE(KEYCODE_F10) PORT_CHAR(UCHAR_MAMEKEY(F10)) PORT_NAME("Calc")
+ APRICOT_KEY( 5, nullptr) PORT_CODE(KEYCODE_PRTSCR) PORT_CHAR(UCHAR_MAMEKEY(PRTSCR)) PORT_NAME("Print")
+ APRICOT_KEY( 6, nullptr) PORT_CODE(KEYCODE_CANCEL) PORT_CHAR(UCHAR_MAMEKEY(CANCEL)) PORT_NAME("Intr")
+ APRICOT_KEY( 7, nullptr) PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_NAME("Menu")
+ APRICOT_KEY( 8, nullptr) PORT_CODE(KEYCODE_F12) PORT_CHAR(UCHAR_MAMEKEY(F12)) PORT_NAME("Finish")
+ APRICOT_KEY( 9, nullptr) PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) PORT_NAME("Function 1")
+ APRICOT_KEY(10, nullptr) PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_NAME("Function 2")
+ APRICOT_KEY(11, nullptr) PORT_CODE(KEYCODE_F3) PORT_CHAR(UCHAR_MAMEKEY(F3)) PORT_NAME("Function 3")
+ APRICOT_KEY(12, nullptr) PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_NAME("Function 4")
+ APRICOT_KEY(13, nullptr) PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_NAME("Function 5")
+ APRICOT_KEY(14, nullptr) PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_NAME("Function 6")
+ APRICOT_KEY(15, nullptr) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('^')
+ APRICOT_KEY(16, nullptr) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!')
+ APRICOT_KEY(17, nullptr) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('@')
+ APRICOT_KEY(18, nullptr) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#')
+ APRICOT_KEY(19, nullptr) PORT_CODE(KEYCODE_4) PORT_CHAR('4') PORT_CHAR(0xa3) // pound
+ APRICOT_KEY(20, nullptr) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%')
+ APRICOT_KEY(21, nullptr) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('$')
+ APRICOT_KEY(22, nullptr) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&')
+ APRICOT_KEY(23, nullptr) PORT_CODE(KEYCODE_8) PORT_CHAR('8') PORT_CHAR('*')
+ APRICOT_KEY(24, nullptr) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR('(')
+ APRICOT_KEY(25, nullptr) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR(')')
+ APRICOT_KEY(26, nullptr) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_')
+ APRICOT_KEY(27, nullptr) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('=') PORT_CHAR('+')
+ APRICOT_KEY(28, nullptr) PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(9)
PORT_BIT(1 << 29, IP_ACTIVE_HIGH, IPT_UNUSED) // actually a dedicated % key
- APRICOT_KEY(30, 0) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK))
- APRICOT_KEY(31, 0) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD))
+ APRICOT_KEY(30, nullptr) PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK))
+ APRICOT_KEY(31, nullptr) PORT_CODE(KEYCODE_SLASH_PAD) PORT_CHAR(UCHAR_MAMEKEY(SLASH_PAD))
PORT_START("keyboard_1")
APRICOT_KEY( 0, 1) PORT_CODE(KEYCODE_MINUS_PAD) PORT_CHAR(UCHAR_MAMEKEY(MINUS_PAD))
diff --git a/src/mame/machine/archimds.cpp b/src/mame/machine/archimds.cpp
index ad5b6f70f85..b22ef889e37 100644
--- a/src/mame/machine/archimds.cpp
+++ b/src/mame/machine/archimds.cpp
@@ -487,7 +487,7 @@ void archimedes_state::latch_timer_cnt(int tmr)
bool archimedes_state::check_floppy_ready()
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if(!m_fdc)
return false;
@@ -859,12 +859,12 @@ WRITE32_MEMBER(archimedes_state::archimedes_ioc_w)
/*
-x-- ---- In Use Control (floppy?)
*/
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (!(data & 1)) { m_floppy_select = 0; floppy = m_floppy0->get_device(); }
if (!(data & 2)) { m_floppy_select = 1; floppy = m_floppy1->get_device(); }
- if (!(data & 4)) { m_floppy_select = 2; floppy = NULL; } // floppy 2
- if (!(data & 8)) { m_floppy_select = 3; floppy = NULL; } // floppy 3
+ if (!(data & 4)) { m_floppy_select = 2; floppy = nullptr; } // floppy 2
+ if (!(data & 8)) { m_floppy_select = 3; floppy = nullptr; } // floppy 3
m_fdc->set_floppy(floppy);
diff --git a/src/mame/machine/asic65.cpp b/src/mame/machine/asic65.cpp
index 978443f497c..3ad34f5e32a 100644
--- a/src/mame/machine/asic65.cpp
+++ b/src/mame/machine/asic65.cpp
@@ -100,11 +100,11 @@ asic65_device::asic65_device(const machine_config &mconfig, const char *tag, dev
m_xflg(0),
m_68data(0),
m_tdata(0),
- m_log(NULL)
+ m_log(nullptr)
{
- for (int i = 0; i < 32; i++)
+ for (auto & elem : m_param)
{
- m_param[i] = 0;
+ elem = 0;
}
}
diff --git a/src/mame/machine/asteroid.cpp b/src/mame/machine/asteroid.cpp
index 37e252e6bd0..e8e01c5f065 100644
--- a/src/mame/machine/asteroid.cpp
+++ b/src/mame/machine/asteroid.cpp
@@ -120,7 +120,7 @@ WRITE8_MEMBER(asteroid_state::astdelux_led_w)
void asteroid_state::machine_start()
{
/* configure RAM banks if present (not on llander) */
- if (m_ram1.target() != NULL)
+ if (m_ram1.target() != nullptr)
{
UINT8 *ram1 = reinterpret_cast<UINT8 *>(memshare("ram1")->ptr());
UINT8 *ram2 = reinterpret_cast<UINT8 *>(memshare("ram2")->ptr());
@@ -139,7 +139,7 @@ void asteroid_state::machine_reset()
m_dvg->reset_w(m_maincpu->space(AS_PROGRAM), 0, 0);
/* reset RAM banks if present */
- if (m_ram1.target() != NULL)
+ if (m_ram1.target() != nullptr)
{
m_ram1->set_entry(0);
m_ram2->set_entry(0);
diff --git a/src/mame/machine/atarifdc.cpp b/src/mame/machine/atarifdc.cpp
index d3c70c12543..0249ba31e7e 100644
--- a/src/mame/machine/atarifdc.cpp
+++ b/src/mame/machine/atarifdc.cpp
@@ -136,7 +136,7 @@ void atari_fdc_device::atari_load_proc(device_image_interface &image)
if( size <= 0 )
{
- m_drv[id].image = NULL;
+ m_drv[id].image = nullptr;
return;
}
@@ -147,7 +147,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 :/
- if (image.software_entry() != NULL) ext="ATR";
+ if (image.software_entry() != nullptr) ext="ATR";
/* no extension: assume XFD format (no header) */
if (!ext)
@@ -749,7 +749,7 @@ legacy_floppy_image_device *atari_fdc_device::atari_floppy_get_device_child(int
case 2 : return subdevice<legacy_floppy_image_device>(FLOPPY_2);
case 3 : return subdevice<legacy_floppy_image_device>(FLOPPY_3);
}
- return NULL;
+ return nullptr;
}
const device_type ATARI_FDC = &device_creator<atari_fdc_device>;
diff --git a/src/mame/machine/atarigen.cpp b/src/mame/machine/atarigen.cpp
index 639726f0528..05127cb1edd 100644
--- a/src/mame/machine/atarigen.cpp
+++ b/src/mame/machine/atarigen.cpp
@@ -44,7 +44,7 @@ inline const atarigen_screen_timer *get_screen_timer(screen_device &screen)
return &state->m_screen_timer[i];
fatalerror("Unexpected: no atarivc_eof_update_timer for screen '%s'\n", screen.tag());
- return NULL;
+ return nullptr;
}
@@ -62,9 +62,9 @@ const device_type ATARI_SOUND_COMM = &device_creator<atari_sound_comm_device>;
atari_sound_comm_device::atari_sound_comm_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, ATARI_SOUND_COMM, "Atari Sound Communications", tag, owner, clock, "atarscom", __FILE__),
- m_sound_cpu_tag(NULL),
+ m_sound_cpu_tag(nullptr),
m_main_int_cb(*this),
- m_sound_cpu(NULL),
+ m_sound_cpu(nullptr),
m_main_to_sound_ready(false),
m_sound_to_main_ready(false),
m_main_to_sound_data(0),
@@ -93,10 +93,10 @@ void atari_sound_comm_device::static_set_sound_cpu(device_t &device, const char
void atari_sound_comm_device::device_start()
{
// find the sound CPU
- if (m_sound_cpu_tag == NULL)
+ if (m_sound_cpu_tag == nullptr)
throw emu_fatalerror("No sound CPU specified!");
m_sound_cpu = siblingdevice<m6502_device>(m_sound_cpu_tag);
- if (m_sound_cpu == NULL)
+ if (m_sound_cpu == nullptr)
throw emu_fatalerror("Sound CPU '%s' not found!", m_sound_cpu_tag);
// resolve callbacks
@@ -362,9 +362,9 @@ atari_vad_device::atari_vad_device(const machine_config &mconfig, const char *ta
m_playfield2_tilemap(*this, "playfield2"),
m_mob(*this, "mob"),
m_eof_data(*this, "eof"),
- m_scanline_int_timer(NULL),
- m_tilerow_update_timer(NULL),
- m_eof_timer(NULL),
+ m_scanline_int_timer(nullptr),
+ m_tilerow_update_timer(nullptr),
+ m_eof_timer(nullptr),
m_palette_bank(0),
m_pf0_xscroll_raw(0),
m_pf0_yscroll(0),
@@ -431,7 +431,7 @@ WRITE16_MEMBER(atari_vad_device::alpha_w)
WRITE16_MEMBER(atari_vad_device::playfield_upper_w)
{
m_playfield_tilemap->write_ext(space, offset, data, mem_mask);
- if (m_playfield2_tilemap != NULL)
+ if (m_playfield2_tilemap != nullptr)
m_playfield2_tilemap->write_ext(space, offset, data, mem_mask);
}
@@ -485,9 +485,9 @@ WRITE16_MEMBER(atari_vad_device::playfield2_latched_msb_w)
void atari_vad_device::device_start()
{
// verify configuration
- if (m_playfield_tilemap == NULL)
+ if (m_playfield_tilemap == nullptr)
throw emu_fatalerror("Playfield tilemap not found!");
- if (m_eof_data == NULL)
+ if (m_eof_data == nullptr)
throw emu_fatalerror("EOF data not found!");
// resolve callbacks
@@ -517,7 +517,7 @@ void atari_vad_device::device_start()
void atari_vad_device::device_reset()
{
// share extended memory between the two tilemaps
- if (m_playfield2_tilemap != NULL)
+ if (m_playfield2_tilemap != nullptr)
m_playfield2_tilemap->extmem().set(m_playfield_tilemap->extmem());
// reset the state
@@ -691,7 +691,7 @@ void atari_vad_device::internal_control_write(offs_t offset, UINT16 newword)
inline void atari_vad_device::update_pf_xscrolls()
{
m_playfield_tilemap->set_scrollx(0, m_pf0_xscroll_raw + ((m_pf1_xscroll_raw) & 7));
- if (m_playfield2_tilemap != NULL)
+ if (m_playfield2_tilemap != nullptr)
m_playfield2_tilemap->set_scrollx(0, m_pf1_xscroll_raw + 4);
}
@@ -708,7 +708,7 @@ void atari_vad_device::update_parameter(UINT16 newword)
{
case 9:
m_mo_xscroll = (newword >> 7) & 0x1ff;
- if (m_mob != NULL)
+ if (m_mob != nullptr)
m_mob->set_xscroll(m_mo_xscroll);
break;
@@ -724,13 +724,13 @@ void atari_vad_device::update_parameter(UINT16 newword)
case 13:
m_mo_yscroll = (newword >> 7) & 0x1ff;
- if (m_mob != NULL)
+ if (m_mob != nullptr)
m_mob->set_yscroll(m_mo_yscroll);
break;
case 14:
m_pf1_yscroll = (newword >> 7) & 0x1ff;
- if (m_playfield2_tilemap != NULL)
+ if (m_playfield2_tilemap != nullptr)
m_playfield2_tilemap->set_scrolly(0, m_pf1_yscroll);
break;
@@ -751,7 +751,7 @@ void atari_vad_device::update_parameter(UINT16 newword)
void atari_vad_device::update_tilerow(emu_timer &timer, int scanline)
{
// skip if out of bounds, or not enabled
- if (scanline <= m_screen->visible_area().max_y && (m_control[0x0a] & 0x2000) != 0 && m_alpha_tilemap != NULL)
+ if (scanline <= m_screen->visible_area().max_y && (m_control[0x0a] & 0x2000) != 0 && m_alpha_tilemap != nullptr)
{
// iterate over non-visible alpha tiles in this row
int offset = scanline / 8 * 64 + 48 + 2 * (scanline % 8);
@@ -960,7 +960,7 @@ atarigen_state::atarigen_state(const machine_config &mconfig, device_type type,
m_xscroll(*this, "xscroll"),
m_yscroll(*this, "yscroll"),
m_slapstic_num(0),
- m_slapstic(NULL),
+ m_slapstic(nullptr),
m_slapstic_bank(0),
m_slapstic_last_pc(0),
m_slapstic_last_address(0),
@@ -987,7 +987,7 @@ void atarigen_state::machine_start()
// allocate timers for all screens
screen_device_iterator iter(*this);
assert(iter.count() <= ARRAY_LENGTH(m_screen_timer));
- for (i = 0, screen = iter.first(); screen != NULL; i++, screen = iter.next())
+ for (i = 0, screen = iter.first(); screen != nullptr; i++, screen = iter.next())
{
m_screen_timer[i].screen = screen;
m_screen_timer[i].scanline_interrupt_timer = timer_alloc(TID_SCANLINE_INTERRUPT, (void *)screen);
@@ -1016,7 +1016,7 @@ void atarigen_state::machine_reset()
m_video_int_state = m_sound_int_state = m_scanline_int_state = 0;
// reset the control latch on the EAROM, if present
- if (m_earom != NULL)
+ if (m_earom != nullptr)
m_earom->set_control(0, 1, 1, 0, 0);
// reset the slapstic
@@ -1236,7 +1236,7 @@ void atarigen_state::slapstic_configure(cpu_device &device, offs_t base, offs_t
{
// reset in case we have no state
m_slapstic_num = chipnum;
- m_slapstic = NULL;
+ m_slapstic = nullptr;
// if we have a chip, install it
if (chipnum != 0)
@@ -1314,7 +1314,7 @@ READ16_MEMBER(atarigen_state::slapstic_r)
void atarigen_state::set_volume_by_type(int volume, device_type type)
{
sound_interface_iterator iter(*this);
- for (device_sound_interface *sound = iter.first(); sound != NULL; sound = iter.next())
+ for (device_sound_interface *sound = iter.first(); sound != nullptr; sound = iter.next())
if (sound->device().type() == type)
sound->set_output_gain(ALL_OUTPUTS, volume / 100.0);
}
@@ -1463,7 +1463,7 @@ void atarigen_state::blend_gfx(int gfx0, int gfx1, int mask0, int mask1)
gx0->set_granularity(granularity);
// free the second graphics element
- m_gfxdecode->set_gfx(gfx1, NULL);
+ m_gfxdecode->set_gfx(gfx1, nullptr);
}
diff --git a/src/mame/machine/awboard.cpp b/src/mame/machine/awboard.cpp
index be4b899ef95..342ff0b18e9 100644
--- a/src/mame/machine/awboard.cpp
+++ b/src/mame/machine/awboard.cpp
@@ -167,7 +167,7 @@ ADDRESS_MAP_END
aw_rom_board::aw_rom_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: naomi_g1_device(mconfig, AW_ROM_BOARD, "Sammy Atomiswave ROM Board", tag, owner, clock, "aw_rom_board", __FILE__)
{
- keyregion = 0;
+ keyregion = nullptr;
}
void aw_rom_board::static_set_keyregion(device_t &device, const char *_keyregion)
@@ -389,7 +389,7 @@ void aw_rom_board::dma_get_position(UINT8 *&base, UINT32 &limit, bool to_mainram
{
if(!to_mainram) {
limit = 0;
- base = 0;
+ base = nullptr;
return;
}
diff --git a/src/mame/machine/b2m.cpp b/src/mame/machine/b2m.cpp
index 2ff9f595aa1..10e9f587c21 100644
--- a/src/mame/machine/b2m.cpp
+++ b/src/mame/machine/b2m.cpp
@@ -183,7 +183,7 @@ WRITE8_MEMBER(b2m_state::b2m_ext_8255_portc_w)
UINT8 side = (data & 1) ^ 1;
static const char *names[] = { "fd0", "fd1"};
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
floppy_connector *con = machine().device<floppy_connector>(names[drive]);
if(con)
floppy = con->get_device();
diff --git a/src/mame/machine/balsente.cpp b/src/mame/machine/balsente.cpp
index 803b5dc5325..8eceeffa417 100644
--- a/src/mame/machine/balsente.cpp
+++ b/src/mame/machine/balsente.cpp
@@ -843,7 +843,7 @@ void balsente_state::set_counter_0_ff(timer_device &timer, int newstate)
{
m_counter[0].count--;
if (m_counter[0].count == 0)
- balsente_counter_callback(timer, NULL, 0);
+ balsente_counter_callback(timer, nullptr, 0);
}
}
@@ -925,8 +925,8 @@ WRITE8_MEMBER(balsente_state::balsente_counter_control_w)
/* bit D0 enables/disables audio */
if (diff_counter_control & 0x01)
{
- for (int ch = 0; ch < 6; ch++)
- m_cem_device[ch]->set_output_gain(0, (data & 0x01) ? 1.0 : 0);
+ for (auto & elem : m_cem_device)
+ elem->set_output_gain(0, (data & 0x01) ? 1.0 : 0);
}
/* bit D1 is hooked to counter 0's gate */
diff --git a/src/mame/machine/bbc.cpp b/src/mame/machine/bbc.cpp
index 1c181c96030..f30c170848b 100644
--- a/src/mame/machine/bbc.cpp
+++ b/src/mame/machine/bbc.cpp
@@ -1490,7 +1490,7 @@ WRITE_LINE_MEMBER(bbc_state::fdc_drq_w)
WRITE8_MEMBER(bbc_state::bbc_wd1770_status_w)
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
m_drive_control = data;
@@ -1531,7 +1531,7 @@ READ8_MEMBER(bbc_state::bbcm_wd177xl_read)
WRITE8_MEMBER(bbc_state::bbcm_wd1770l_write)
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
m_drive_control = data;
@@ -1554,7 +1554,7 @@ WRITE8_MEMBER(bbc_state::bbcm_wd1770l_write)
WRITE8_MEMBER(bbc_state::bbcm_wd1772l_write)
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
m_drive_control = data;
@@ -1601,7 +1601,7 @@ int bbc_state::bbc_load_rom(device_image_interface &image, generic_slot_device *
int bbc_state::bbcm_load_cart(device_image_interface &image, generic_slot_device *slot)
{
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
UINT32 filesize = image.length();
diff --git a/src/mame/machine/bebox.cpp b/src/mame/machine/bebox.cpp
index d5bceceb0aa..4b89b4b6871 100644
--- a/src/mame/machine/bebox.cpp
+++ b/src/mame/machine/bebox.cpp
@@ -270,8 +270,8 @@ void bebox_state::bebox_set_irq_bit(unsigned int interrupt_bit, int val)
{
static const char *const interrupt_names[32] =
{
- NULL,
- NULL,
+ nullptr,
+ nullptr,
"GEEKPORT",
"ADC",
"IR",
@@ -298,17 +298,17 @@ void bebox_state::bebox_set_irq_bit(unsigned int interrupt_bit, int val)
"COM3",
"COM2",
"COM1",
- NULL,
+ nullptr,
"SMI1",
"SMI0",
- NULL
+ nullptr
};
UINT32 old_interrupts;
if (LOG_INTERRUPTS)
{
/* make sure that we don't shoot ourself in the foot */
- assert_always((interrupt_bit < ARRAY_LENGTH(interrupt_names)) && (interrupt_names[interrupt_bit] != NULL), "Raising invalid interrupt");
+ assert_always((interrupt_bit < ARRAY_LENGTH(interrupt_names)) && (interrupt_names[interrupt_bit] != nullptr), "Raising invalid interrupt");
logerror("bebox_set_irq_bit(): pc[0]=0x%08x pc[1]=0x%08x %s interrupt #%u (%s)\n",
(unsigned) m_ppc1->pc(),
diff --git a/src/mame/machine/bublbobl.cpp b/src/mame/machine/bublbobl.cpp
index 84a3a6c125b..3998d02f2d6 100644
--- a/src/mame/machine/bublbobl.cpp
+++ b/src/mame/machine/bublbobl.cpp
@@ -25,7 +25,7 @@ WRITE8_MEMBER(bublbobl_state::bublbobl_bankswitch_w)
m_slave->set_input_line(INPUT_LINE_RESET, (data & 0x10) ? CLEAR_LINE : ASSERT_LINE);
/* bit 5 resets mcu */
- if (m_mcu != NULL) // only if we have a MCU
+ if (m_mcu != nullptr) // only if we have a MCU
m_mcu->set_input_line(INPUT_LINE_RESET, (data & 0x20) ? CLEAR_LINE : ASSERT_LINE);
/* bit 6 enables display */
diff --git a/src/mame/machine/c117.cpp b/src/mame/machine/c117.cpp
index de27ff06011..018fd21689b 100644
--- a/src/mame/machine/c117.cpp
+++ b/src/mame/machine/c117.cpp
@@ -38,8 +38,8 @@ namco_c117_device::namco_c117_device(const machine_config &mconfig, const char *
device_memory_interface(mconfig, *this),
m_subres_cb(*this),
m_program_config("program", ENDIANNESS_BIG, 8, 23),
- m_maincpu_tag(NULL),
- m_subcpu_tag(NULL)
+ m_maincpu_tag(nullptr),
+ m_subcpu_tag(nullptr)
{
}
diff --git a/src/mame/machine/c117.h b/src/mame/machine/c117.h
index ae5d8e4218b..99016721a54 100644
--- a/src/mame/machine/c117.h
+++ b/src/mame/machine/c117.h
@@ -50,7 +50,7 @@ protected:
virtual void device_reset();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : NULL; }
+ virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
private:
// internal helpers
diff --git a/src/mame/machine/cdi070.cpp b/src/mame/machine/cdi070.cpp
index 36b41333b7d..cc8f377d76a 100644
--- a/src/mame/machine/cdi070.cpp
+++ b/src/mame/machine/cdi070.cpp
@@ -426,9 +426,9 @@ void cdi68070_device::mcu_frame()
{
quizard_calculate_state();
uart_rx(0x5a);
- for(int index = 0; index < 8; index++)
+ for(auto & elem : m_state)
{
- uart_rx(m_state[index]);
+ uart_rx(elem);
}
}
}
diff --git a/src/mame/machine/cdislave.cpp b/src/mame/machine/cdislave.cpp
index fea5c7ef2ac..ac9d4fe706f 100644
--- a/src/mame/machine/cdislave.cpp
+++ b/src/mame/machine/cdislave.cpp
@@ -484,15 +484,15 @@ void cdislave_device::device_start()
void cdislave_device::device_reset()
{
- for(INT32 index = 0; index < 4; index++)
+ for(auto & elem : m_channel)
{
- m_channel[index].m_out_buf[0] = 0;
- m_channel[index].m_out_buf[1] = 0;
- m_channel[index].m_out_buf[2] = 0;
- m_channel[index].m_out_buf[3] = 0;
- m_channel[index].m_out_index = 0;
- m_channel[index].m_out_count = 0;
- m_channel[index].m_out_cmd = 0;
+ elem.m_out_buf[0] = 0;
+ elem.m_out_buf[1] = 0;
+ elem.m_out_buf[2] = 0;
+ elem.m_out_buf[3] = 0;
+ elem.m_out_index = 0;
+ elem.m_out_count = 0;
+ elem.m_out_cmd = 0;
}
memset(m_in_buf, 0, 17);
diff --git a/src/mame/machine/coco.cpp b/src/mame/machine/coco.cpp
index f1177b8d9e8..ba88b004762 100644
--- a/src/mame/machine/coco.cpp
+++ b/src/mame/machine/coco.cpp
@@ -487,7 +487,7 @@ READ8_MEMBER( coco_state::pia1_pb_r )
|| (ram_size >= 0x8000 && (m_pia_0->b_output() & 0x40));
// serial in (PB0)
- bool serial_in = (m_rs232 != NULL) && (m_rs232->rxd_r() ? true : false);
+ bool serial_in = (m_rs232 != nullptr) && (m_rs232->rxd_r() ? true : false);
// composite the results
return (memory_sense ? 0x04 : 0x00)
@@ -728,7 +728,7 @@ void coco_state::update_sound(void)
coco_state::joystick_type_t coco_state::joystick_type(int index)
{
assert((index == 0) || (index == 1));
- return (m_joystick_type_control != NULL)
+ return (m_joystick_type_control != nullptr)
? (joystick_type_t) ((m_joystick_type_control->read() >> (index * 4)) & 0x0F)
: JOYSTICK_NONE;
}
@@ -741,7 +741,7 @@ coco_state::joystick_type_t coco_state::joystick_type(int index)
coco_state::hires_type_t coco_state::hires_interface_type(void)
{
- return (m_joystick_hires_control != NULL)
+ return (m_joystick_hires_control != nullptr)
? (hires_type_t) m_joystick_hires_control->read()
: HIRES_NONE;
}
@@ -984,7 +984,7 @@ void coco_state::update_prinout(bool prinout)
else
{
/* output bitbanger if present (only on CoCos) */
- if (m_rs232 != NULL)
+ if (m_rs232 != nullptr)
{
m_rs232->write_txd(prinout ? 1 : 0);
}
@@ -1122,7 +1122,7 @@ coco_vhd_image_device *coco_state::current_vhd(void)
{
case 0: return m_vhd_0;
case 1: return m_vhd_1;
- default: return NULL;
+ default: return nullptr;
}
}
@@ -1136,7 +1136,7 @@ READ8_MEMBER( coco_state::ff60_read )
{
UINT8 result;
- if ((current_vhd() != NULL) && (offset >= 32) && (offset <= 37))
+ if ((current_vhd() != nullptr) && (offset >= 32) && (offset <= 37))
{
result = current_vhd()->read(offset - 32);
}
@@ -1156,7 +1156,7 @@ READ8_MEMBER( coco_state::ff60_read )
WRITE8_MEMBER( coco_state::ff60_write )
{
- if ((current_vhd() != NULL) && (offset >= 32) && (offset <= 37))
+ if ((current_vhd() != nullptr) && (offset >= 32) && (offset <= 37))
{
current_vhd()->write(offset - 32, data);
}
@@ -1251,12 +1251,12 @@ static const char *const os9syscalls[] =
"F$SUser", /* Set User ID number */
"F$UnLoad", /* Unlink Module by name */
"F$Alarm", /* Color Computer Alarm Call (system wide) */
- NULL,
- NULL,
+ nullptr,
+ nullptr,
"F$NMLink", /* Color Computer NonMapping Link */
"F$NMLoad", /* Color Computer NonMapping Load */
- NULL,
- NULL,
+ nullptr,
+ nullptr,
"F$TPS", /* Return System's Ticks Per Second */
"F$TimAlm", /* COCO individual process alarm call */
"F$VIRQ", /* Install/Delete Virtual IRQ */
@@ -1304,50 +1304,50 @@ static const char *const os9syscalls[] =
"F$DelRAM", /* Deallocate RAM blocks */
"F$GCMDir", /* Pack module directory */
"F$AlHRam", /* Allocate HIGH RAM Blocks */
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
"F$RegDmp", /* Ron Lammardo's debugging register dump call */
"F$NVRAM", /* Non Volatile RAM (RTC battery backed static) read/write */
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
"I$Attach", /* Attach I/O Device */
"I$Detach", /* Detach I/O Device */
"I$Dup", /* Duplicate Path */
diff --git a/src/mame/machine/coco_vhd.h b/src/mame/machine/coco_vhd.h
index 3d4819cb8f5..4753d055646 100644
--- a/src/mame/machine/coco_vhd.h
+++ b/src/mame/machine/coco_vhd.h
@@ -36,9 +36,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "vhd"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// specific implementation
DECLARE_READ8_MEMBER(read) { return read(offset); }
diff --git a/src/mame/machine/cps2crpt.cpp b/src/mame/machine/cps2crpt.cpp
index d8d41771203..35bf3d11ef8 100644
--- a/src/mame/machine/cps2crpt.cpp
+++ b/src/mame/machine/cps2crpt.cpp
@@ -747,16 +747,16 @@ DRIVER_INIT_MEMBER(cps_state,cps2crpt)
UINT32 upper;
std::string skey1 = parameter("cryptkey1");;
- key[0] = strtoll(skey1.c_str(), 0, 16);
+ key[0] = strtoll(skey1.c_str(), nullptr, 16);
std::string skey2 = parameter("cryptkey2");
- key[1] = strtoll(skey2.c_str(), 0, 16);
+ key[1] = strtoll(skey2.c_str(), nullptr, 16);
std::string slower = parameter("cryptlower");
- lower = strtoll(slower.c_str(), 0, 16);
+ lower = strtoll(slower.c_str(), nullptr, 16);
std::string supper = parameter("cryptupper");
- upper = strtoll(supper.c_str(), 0, 16);
+ upper = strtoll(supper.c_str(), nullptr, 16);
// we have a proper key so use it to decrypt
if (lower!=0xff0000) // don't run the decrypt on 'dead key' games for now
diff --git a/src/mame/machine/cuda.cpp b/src/mame/machine/cuda.cpp
index 5c4964653b1..fc79fc6b32e 100644
--- a/src/mame/machine/cuda.cpp
+++ b/src/mame/machine/cuda.cpp
@@ -415,8 +415,8 @@ void cuda_device::device_start()
write_via_clock.resolve_safe();
write_via_data.resolve_safe();
- m_timer = timer_alloc(0, NULL);
- m_prog_timer = timer_alloc(1, NULL);
+ m_timer = timer_alloc(0, nullptr);
+ m_prog_timer = timer_alloc(1, nullptr);
save_item(NAME(ddrs[0]));
save_item(NAME(ddrs[1]));
save_item(NAME(ddrs[2]));
diff --git a/src/mame/machine/dc-ctrl.cpp b/src/mame/machine/dc-ctrl.cpp
index 44bd8847c87..f2b5531b64a 100644
--- a/src/mame/machine/dc-ctrl.cpp
+++ b/src/mame/machine/dc-ctrl.cpp
@@ -74,12 +74,12 @@ void dc_controller_device::fixed_status(UINT32 *dest)
{
dest[0] = 0x20000000; // Controller
dest[1] =
- ((port[2] != NULL) ? 0x010000 : 0) |
- ((port[3] != NULL) ? 0x020000 : 0) |
- ((port[4] != NULL) ? 0x040000 : 0) |
- ((port[5] != NULL) ? 0x080000 : 0) |
- ((port[6] != NULL) ? 0x100000 : 0) |
- ((port[7] != NULL) ? 0x200000 : 0) |
+ ((port[2] != nullptr) ? 0x010000 : 0) |
+ ((port[3] != nullptr) ? 0x020000 : 0) |
+ ((port[4] != nullptr) ? 0x040000 : 0) |
+ ((port[5] != nullptr) ? 0x080000 : 0) |
+ ((port[6] != nullptr) ? 0x100000 : 0) |
+ ((port[7] != nullptr) ? 0x200000 : 0) |
((port[0] ? port[0]->active() : 0) << 8) |
(port[1] ? port[1]->active() : 0); // 1st function - controller
dest[2] = 0; // No 2nd function
diff --git a/src/mame/machine/decocass_tape.cpp b/src/mame/machine/decocass_tape.cpp
index 74d777ab91d..8b3f2785032 100644
--- a/src/mame/machine/decocass_tape.cpp
+++ b/src/mame/machine/decocass_tape.cpp
@@ -60,15 +60,15 @@ const device_type DECOCASS_TAPE = &device_creator<decocass_tape_device>;
decocass_tape_device::decocass_tape_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECOCASS_TAPE, "DECO Cassette Tape", tag, owner, clock, "decocass_tape", __FILE__),
- m_tape_timer(NULL),
+ m_tape_timer(nullptr),
m_speed(0),
m_region(REGION_LEADER),
m_bitnum(0),
m_clockpos(0),
m_numclocks(0)
{
- for (int i = 0; i < 256; i++)
- m_crc16[i] = 0;
+ for (auto & elem : m_crc16)
+ elem = 0;
}
//-------------------------------------------------
@@ -91,7 +91,7 @@ void decocass_tape_device::device_start()
/* fetch the data pointer */
m_tape_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(decocass_tape_device::tape_clock_callback), this));
- if (region() == NULL)
+ if (region() == nullptr)
return;
UINT8 *regionbase = region()->base();
@@ -350,7 +350,7 @@ UINT8 decocass_tape_device::get_status_bits()
UINT8 decocass_tape_device::is_present()
{
- return region() != NULL;
+ return region() != nullptr;
}
diff --git a/src/mame/machine/dgn_beta.cpp b/src/mame/machine/dgn_beta.cpp
index 57de97d32f5..57b68c53879 100644
--- a/src/mame/machine/dgn_beta.cpp
+++ b/src/mame/machine/dgn_beta.cpp
@@ -104,23 +104,23 @@ struct bank_info_entry
static const struct bank_info_entry bank_info[] =
{
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b0_w),(dgn_beta_state*)0), 0x0000, 0x0fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b1_w),(dgn_beta_state*)0), 0x1000, 0x1fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b2_w),(dgn_beta_state*)0), 0x2000, 0x2fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b3_w),(dgn_beta_state*)0), 0x3000, 0x3fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b4_w),(dgn_beta_state*)0), 0x4000, 0x4fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b5_w),(dgn_beta_state*)0), 0x5000, 0x5fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b6_w),(dgn_beta_state*)0), 0x6000, 0x6fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b7_w),(dgn_beta_state*)0), 0x7000, 0x7fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b8_w),(dgn_beta_state*)0), 0x8000, 0x8fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b9_w),(dgn_beta_state*)0), 0x9000, 0x9fff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bA_w),(dgn_beta_state*)0), 0xA000, 0xAfff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bB_w),(dgn_beta_state*)0), 0xB000, 0xBfff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bC_w),(dgn_beta_state*)0), 0xC000, 0xCfff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bD_w),(dgn_beta_state*)0), 0xD000, 0xDfff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bE_w),(dgn_beta_state*)0), 0xE000, 0xEfff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bF_w),(dgn_beta_state*)0), 0xF000, 0xFBff },
- { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bG_w),(dgn_beta_state*)0), 0xFF00, 0xFfff }
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b0_w),(dgn_beta_state*)nullptr), 0x0000, 0x0fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b1_w),(dgn_beta_state*)nullptr), 0x1000, 0x1fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b2_w),(dgn_beta_state*)nullptr), 0x2000, 0x2fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b3_w),(dgn_beta_state*)nullptr), 0x3000, 0x3fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b4_w),(dgn_beta_state*)nullptr), 0x4000, 0x4fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b5_w),(dgn_beta_state*)nullptr), 0x5000, 0x5fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b6_w),(dgn_beta_state*)nullptr), 0x6000, 0x6fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b7_w),(dgn_beta_state*)nullptr), 0x7000, 0x7fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b8_w),(dgn_beta_state*)nullptr), 0x8000, 0x8fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_b9_w),(dgn_beta_state*)nullptr), 0x9000, 0x9fff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bA_w),(dgn_beta_state*)nullptr), 0xA000, 0xAfff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bB_w),(dgn_beta_state*)nullptr), 0xB000, 0xBfff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bC_w),(dgn_beta_state*)nullptr), 0xC000, 0xCfff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bD_w),(dgn_beta_state*)nullptr), 0xD000, 0xDfff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bE_w),(dgn_beta_state*)nullptr), 0xE000, 0xEfff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bF_w),(dgn_beta_state*)nullptr), 0xF000, 0xFBff },
+ { write8_delegate(FUNC(dgn_beta_state::dgnbeta_ram_bG_w),(dgn_beta_state*)nullptr), 0xFF00, 0xFfff }
};
#define is_last_page(page) (((page==LastPage) || (page==LastPage+1)) ? 1 : 0)
@@ -587,7 +587,7 @@ WRITE8_MEMBER(dgn_beta_state::d_pia1_pa_w)
}
/* Drive selects are binary encoded on PA0 & PA1 */
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
switch (~data & 0x03)
{
@@ -990,12 +990,12 @@ static const char *const os9syscalls[] =
"F$SUser", /* Set User ID number */
"F$UnLoad", /* Unlink Module by name */
"F$Alarm", /* Color Computer Alarm Call (system wide) */
- NULL,
- NULL,
+ nullptr,
+ nullptr,
"F$NMLink", /* Color Computer NonMapping Link */
"F$NMLoad", /* Color Computer NonMapping Load */
- NULL,
- NULL,
+ nullptr,
+ nullptr,
"F$TPS", /* Return System's Ticks Per Second */
"F$TimAlm", /* COCO individual process alarm call */
"F$VIRQ", /* Install/Delete Virtual IRQ */
@@ -1043,50 +1043,50 @@ static const char *const os9syscalls[] =
"F$DelRAM", /* Deallocate RAM blocks */
"F$GCMDir", /* Pack module directory */
"F$AlHRam", /* Allocate HIGH RAM Blocks */
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
"F$RegDmp", /* Ron Lammardo's debugging register dump call */
"F$NVRAM", /* Non Volatile RAM (RTC battery backed static) read/write */
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
"I$Attach", /* Attach I/O Device */
"I$Detach", /* Detach I/O Device */
"I$Dup", /* Duplicate Path */
diff --git a/src/mame/machine/dgnalpha.cpp b/src/mame/machine/dgnalpha.cpp
index a146e1e3aae..20af8952b04 100644
--- a/src/mame/machine/dgnalpha.cpp
+++ b/src/mame/machine/dgnalpha.cpp
@@ -315,7 +315,7 @@ WRITE8_MEMBER( dragon_alpha_state::psg_porta_write )
/* Bit 4 is the motor on, in the real hardware these are inverted on their way to the drive */
/* Bits 5,6,7 are connected to /DDEN, ENP and 5/8 on the WD2797 */
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
diff --git a/src/mame/machine/egret.cpp b/src/mame/machine/egret.cpp
index 079a2504536..736cdfd3471 100644
--- a/src/mame/machine/egret.cpp
+++ b/src/mame/machine/egret.cpp
@@ -366,7 +366,7 @@ void egret_device::device_start()
write_via_clock.resolve_safe();
write_via_data.resolve_safe();
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
save_item(NAME(ddrs[0]));
save_item(NAME(ddrs[1]));
save_item(NAME(ddrs[2]));
diff --git a/src/mame/machine/electron.cpp b/src/mame/machine/electron.cpp
index 5ed4ca1e07a..3d92206ba3e 100644
--- a/src/mame/machine/electron.cpp
+++ b/src/mame/machine/electron.cpp
@@ -379,7 +379,7 @@ void electron_state::machine_start()
DEVICE_IMAGE_LOAD_MEMBER( electron_state, electron_cart )
{
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
UINT32 filesize = image.length();
diff --git a/src/mame/machine/fd1089.cpp b/src/mame/machine/fd1089.cpp
index 456192b32e6..5f8df8b0b3d 100644
--- a/src/mame/machine/fd1089.cpp
+++ b/src/mame/machine/fd1089.cpp
@@ -253,12 +253,12 @@ void fd1089_base_device::device_start()
// find the key
m_key = memregion("key")->base();
- if (m_key == NULL)
+ if (m_key == nullptr)
throw emu_fatalerror("FD1089 key region not found!");
// get a pointer to the ROM region
UINT16 *rombase = reinterpret_cast<UINT16 *>(region()->base());
- if (rombase == NULL)
+ if (rombase == nullptr)
throw emu_fatalerror("FD1089 found no ROM data to decrypt!");
// determine length and resize our internal buffers
diff --git a/src/mame/machine/fd1094.cpp b/src/mame/machine/fd1094.cpp
index ce1abbfad92..6fb0f8b866e 100644
--- a/src/mame/machine/fd1094.cpp
+++ b/src/mame/machine/fd1094.cpp
@@ -500,8 +500,8 @@ fd1094_decryption_cache::fd1094_decryption_cache(fd1094_device &fd1094)
void fd1094_decryption_cache::reset()
{
// reset all allocated cache buffers
- for (int cache = 0; cache < 256; cache++)
- m_decrypted_opcodes[cache].clear();
+ for (auto & elem : m_decrypted_opcodes)
+ elem.clear();
}
@@ -558,9 +558,9 @@ fd1094_device::fd1094_device(const machine_config &mconfig, const char *tag, dev
m_state(0x00),
m_irqmode(false),
m_cache(*this),
- m_srcbase(NULL),
+ m_srcbase(nullptr),
m_srcbytes(0),
- m_key(NULL)
+ m_key(nullptr)
{
// override the name after the m68000 initializes
m_name.assign("FD1094");
@@ -570,9 +570,9 @@ fd1094_device::fd1094_device(const machine_config &mconfig, const char *tag, dev
// create the initial masked opcode table
memset(m_masked_opcodes_lookup, 0, sizeof(m_masked_opcodes_lookup));
- for (int index = 0; index < ARRAY_LENGTH(s_masked_opcodes); index++)
+ for (auto opcode : s_masked_opcodes)
{
- UINT16 opcode = s_masked_opcodes[index];
+
m_masked_opcodes_lookup[0][opcode >> 4] |= 1 << ((opcode >> 1) & 7);
m_masked_opcodes_lookup[1][opcode >> 4] |= 1 << ((opcode >> 1) & 7);
}
@@ -637,11 +637,11 @@ void fd1094_device::device_start()
{
// find the key
m_key = memregion("key")->base();
- if (m_key == NULL)
+ if (m_key == nullptr)
throw emu_fatalerror("FD1094 key region not found!");
// get a pointer to the ROM region
- if (region() != NULL)
+ if (region() != nullptr)
{
m_srcbase = reinterpret_cast<UINT16 *>(region()->base());
m_srcbytes = region()->bytes();
@@ -651,7 +651,7 @@ void fd1094_device::device_start()
else
{
memory_share *share = owner()->memshare(tag());
- if (share != NULL)
+ if (share != nullptr)
{
m_srcbase = reinterpret_cast<UINT16 *>(share->ptr());
m_srcbytes = share->bytes();
@@ -659,7 +659,7 @@ void fd1094_device::device_start()
}
// if we got nothing, error
- if (m_srcbase == NULL)
+ if (m_srcbase == nullptr)
throw emu_fatalerror("FD1094 found no data to decrypt!");
// determine length and configure our cache
diff --git a/src/mame/machine/gaelco3d.cpp b/src/mame/machine/gaelco3d.cpp
index 4f576eba8fe..a8fe3f32590 100644
--- a/src/mame/machine/gaelco3d.cpp
+++ b/src/mame/machine/gaelco3d.cpp
@@ -192,11 +192,11 @@ gaelco_serial_device::gaelco_serial_device(const machine_config &mconfig, const
m_status(0),
m_last_in_msg_cnt(0),
m_slack_cnt(0),
- m_sync_timer(NULL),
- m_in_ptr(NULL),
- m_out_ptr(NULL),
- m_os_shmem(NULL),
- m_shmem(NULL)
+ m_sync_timer(nullptr),
+ m_in_ptr(nullptr),
+ m_out_ptr(nullptr),
+ m_os_shmem(nullptr),
+ m_shmem(nullptr)
{
}
@@ -221,7 +221,7 @@ void gaelco_serial_device::device_start()
#endif
m_os_shmem = osd_sharedmem_alloc(PATH_NAME, 0, sizeof(shmem_t));
- if (m_os_shmem == NULL)
+ if (m_os_shmem == nullptr)
{
m_os_shmem = osd_sharedmem_alloc(PATH_NAME, 1, sizeof(shmem_t));
m_shmem = (shmem_t *) osd_sharedmem_ptr(m_os_shmem);
diff --git a/src/mame/machine/gamecom.cpp b/src/mame/machine/gamecom.cpp
index 148a0585928..259443b728e 100644
--- a/src/mame/machine/gamecom.cpp
+++ b/src/mame/machine/gamecom.cpp
@@ -22,7 +22,7 @@ void gamecom_state::machine_reset()
m_bank3->set_base(rom);
m_bank4->set_base(rom);
- m_cart_ptr = NULL;
+ m_cart_ptr = nullptr;
m_lch_reg = 0x07;
m_lcv_reg = 0x27;
m_lcdc_reg = 0xb0;
@@ -179,7 +179,7 @@ WRITE8_MEMBER( gamecom_state::gamecom_pio_w )
{
case 0x40: m_cart_ptr = m_cart1_rom->base(); break;
case 0x80: m_cart_ptr = m_cart2_rom->base(); break;
- default: m_cart_ptr = NULL; break;
+ default: m_cart_ptr = nullptr; break;
}
return;
}
diff --git a/src/mame/machine/gb.cpp b/src/mame/machine/gb.cpp
index 187cea04d72..3b77d56b403 100644
--- a/src/mame/machine/gb.cpp
+++ b/src/mame/machine/gb.cpp
@@ -226,8 +226,8 @@ MACHINE_RESET_MEMBER(gb_state,gbc)
/* Enable BIOS rom */
m_bios_disable = 0;
- for (int i = 0; i < 8; i++)
- memset(m_gbc_rammap[i], 0, 0x1000);
+ for (auto & elem : m_gbc_rammap)
+ memset(elem, 0, 0x1000);
}
MACHINE_RESET_MEMBER(gb_state,sgb)
diff --git a/src/mame/machine/gdrom.cpp b/src/mame/machine/gdrom.cpp
index 2909cda71db..59a11e97cc2 100644
--- a/src/mame/machine/gdrom.cpp
+++ b/src/mame/machine/gdrom.cpp
@@ -167,7 +167,7 @@ void gdrom_device::ExecCommand()
m_cur_subblock = 0;
}
- if (m_cdda != NULL)
+ if (m_cdda != nullptr)
{
m_cdda->stop_audio();
}
@@ -205,7 +205,7 @@ void gdrom_device::ExecCommand()
length = 4;
}
- if (m_cdda != NULL)
+ if (m_cdda != nullptr)
{
m_cdda->stop_audio();
}
diff --git a/src/mame/machine/genpin.h b/src/mame/machine/genpin.h
index 6dededf3b4b..5b72d09ff53 100644
--- a/src/mame/machine/genpin.h
+++ b/src/mame/machine/genpin.h
@@ -30,7 +30,7 @@ const char *const genpin_sample_names[] =
"relay_release",
"solenoid_engage",
"solenoid_release",
- 0 /* end of array */
+ nullptr /* end of array */
};
MACHINE_CONFIG_EXTERN( genpin_audio );
diff --git a/src/mame/machine/harddriv.cpp b/src/mame/machine/harddriv.cpp
index e802f2bfe09..9f4a74f8948 100644
--- a/src/mame/machine/harddriv.cpp
+++ b/src/mame/machine/harddriv.cpp
@@ -57,8 +57,8 @@ void harddriv_state::device_reset()
m_slapstic_device->slapstic_reset();
/* halt several of the DSPs to start */
- if (m_adsp != NULL) m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
- if (m_dsp32 != NULL) m_dsp32->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ if (m_adsp != nullptr) m_adsp->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
+ if (m_dsp32 != nullptr) m_dsp32->set_input_line(INPUT_LINE_HALT, ASSERT_LINE);
m_last_gsp_shiftreg = 0;
@@ -72,14 +72,14 @@ void harddriv_state::device_reset()
m_adsp_br = 0;
m_adsp_xflag = 0;
- if (m_ds3sdsp != NULL)
+ if (m_ds3sdsp != nullptr)
{
m_ds3sdsp->load_boot_data(m_ds3sdsp->region()->base(), m_ds3sdsp_pgm_memory);
m_ds3sdsp_timer_en = 0;
m_ds3sdsp_internal_timer->adjust(attotime::never);
}
- if (m_ds3xdsp != NULL)
+ if (m_ds3xdsp != nullptr)
{
m_ds3xdsp->load_boot_data(m_ds3xdsp->region()->base(), m_ds3xdsp_pgm_memory);
m_ds3xdsp_timer_en = 0;
@@ -173,7 +173,7 @@ READ16_MEMBER( harddriv_state::hd68k_msp_io_r )
UINT16 result;
offset = (offset / 2) ^ 1;
m_hd34010_host_access = TRUE;
- result = (m_msp != NULL) ? m_msp->host_r(space, offset, 0xffff) : 0xffff;
+ result = (m_msp != nullptr) ? m_msp->host_r(space, offset, 0xffff) : 0xffff;
m_hd34010_host_access = FALSE;
return result;
}
@@ -182,7 +182,7 @@ READ16_MEMBER( harddriv_state::hd68k_msp_io_r )
WRITE16_MEMBER( harddriv_state::hd68k_msp_io_w )
{
offset = (offset / 2) ^ 1;
- if (m_msp != NULL)
+ if (m_msp != nullptr)
{
m_hd34010_host_access = TRUE;
m_msp->host_w(space, offset, data, 0xffff);
@@ -302,7 +302,7 @@ READ16_MEMBER( harddriv_state::hd68k_adc12_r )
READ16_MEMBER( harddriv_state::hd68k_sound_reset_r )
{
- if (m_jsa != NULL)
+ if (m_jsa != nullptr)
m_jsa->reset();
return ~0;
}
@@ -404,12 +404,12 @@ WRITE16_MEMBER( harddriv_state::hd68k_nwr_w )
break;
case 6: /* /GSPRES */
logerror("Write to /GSPRES(%d)\n", data);
- if (m_gsp != NULL)
+ if (m_gsp != nullptr)
m_gsp->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
break;
case 7: /* /MSPRES */
logerror("Write to /MSPRES(%d)\n", data);
- if (m_msp != NULL)
+ if (m_msp != nullptr)
m_msp->set_input_line(INPUT_LINE_RESET, data ? CLEAR_LINE : ASSERT_LINE);
break;
}
diff --git a/src/mame/machine/hec2hrp.cpp b/src/mame/machine/hec2hrp.cpp
index 55db5bdfe5f..6ed49982f7f 100644
--- a/src/mame/machine/hec2hrp.cpp
+++ b/src/mame/machine/hec2hrp.cpp
@@ -104,7 +104,7 @@ TIMER_CALLBACK_MEMBER(hec2hrp_state::Callback_CK)
WRITE8_MEMBER( hec2hrp_state::minidisc_control_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 6)) floppy = m_floppy0->get_device();
// bit 7 = drive 2?
diff --git a/src/mame/machine/hp48.cpp b/src/mame/machine/hp48.cpp
index 6c6ad253001..e9769f159c1 100644
--- a/src/mame/machine/hp48.cpp
+++ b/src/mame/machine/hp48.cpp
@@ -940,7 +940,7 @@ void hp48_port_image_device::hp48_unfill_port()
state->m_modules[m_module].off_mask = 0x00fff; /* 2 KB */
state->m_modules[m_module].read = read8_delegate();
state->m_modules[m_module].write = write8_delegate();
- state->m_modules[m_module].data = NULL;
+ state->m_modules[m_module].data = nullptr;
state->m_modules[m_module].isnop = 1;
state->m_port_size[m_port] = 0;
}
@@ -1035,12 +1035,12 @@ DRIVER_INIT_MEMBER(hp48_state,hp48)
m_modules[i].off_mask = 0x00fff; /* 2 KB */
m_modules[i].read = read8_delegate();
m_modules[i].write = write8_delegate();
- m_modules[i].data = NULL;
+ m_modules[i].data = nullptr;
m_modules[i].isnop = 0;
}
m_port_size[0] = 0;
m_port_size[1] = 0;
- m_rom = NULL;
+ m_rom = nullptr;
}
void hp48_state::machine_reset()
diff --git a/src/mame/machine/igs022.cpp b/src/mame/machine/igs022.cpp
index 360b333d52f..6a6e45b5c79 100644
--- a/src/mame/machine/igs022.cpp
+++ b/src/mame/machine/igs022.cpp
@@ -29,7 +29,7 @@ void igs022_device::device_start()
{
// Reset stuff
memset(m_kb_regs, 0, 0x100 * sizeof(UINT32));
- m_sharedprotram = 0;
+ m_sharedprotram = nullptr;
save_item(NAME(m_kb_regs));
}
diff --git a/src/mame/machine/igs028.cpp b/src/mame/machine/igs028.cpp
index 5836d946933..5e71c2bff64 100644
--- a/src/mame/machine/igs028.cpp
+++ b/src/mame/machine/igs028.cpp
@@ -26,7 +26,7 @@ void igs028_device::device_validity_check(validity_checker &valid) const
void igs028_device::device_start()
{
- m_sharedprotram = 0;
+ m_sharedprotram = nullptr;
}
diff --git a/src/mame/machine/inder_sb.cpp b/src/mame/machine/inder_sb.cpp
index 5b62cabb5c8..bad2b30d279 100644
--- a/src/mame/machine/inder_sb.cpp
+++ b/src/mame/machine/inder_sb.cpp
@@ -120,7 +120,7 @@ WRITE_LINE_MEMBER(inder_sb_device::z80ctc_ch3)
static const z80_daisy_config daisy_chain[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/machine/isbc_215g.cpp b/src/mame/machine/isbc_215g.cpp
index 000c620d1a7..e49818ee4d6 100644
--- a/src/mame/machine/isbc_215g.cpp
+++ b/src/mame/machine/isbc_215g.cpp
@@ -358,7 +358,7 @@ static MACHINE_CONFIG_FRAGMENT( isbc_215g )
MCFG_HARDDISK_ADD("drive0")
MCFG_HARDDISK_ADD("drive1")
- MCFG_ISBX_SLOT_ADD("sbx1", 0, isbx_cards, NULL)
+ MCFG_ISBX_SLOT_ADD("sbx1", 0, isbx_cards, nullptr)
MCFG_ISBX_SLOT_MINTR0_CALLBACK(WRITELINE(isbc_215g_device, isbx_irq_00_w))
MCFG_ISBX_SLOT_MINTR1_CALLBACK(WRITELINE(isbc_215g_device, isbx_irq_01_w))
MCFG_ISBX_SLOT_ADD("sbx2", 0, isbx_cards, "fdc_218a")
@@ -387,11 +387,11 @@ void isbc_215g_device::device_reset()
if(m_hdd0->get_hard_disk_file())
m_geom[0] = hard_disk_get_info(m_hdd0->get_hard_disk_file());
else
- m_geom[0] = 0;
+ m_geom[0] = nullptr;
if(m_hdd1->get_hard_disk_file())
m_geom[1] = hard_disk_get_info(m_hdd1->get_hard_disk_file());
else
- m_geom[1] = 0;
+ m_geom[1] = nullptr;
m_reset = false;
m_fdctc = false;
diff --git a/src/mame/machine/iteagle_fpga.cpp b/src/mame/machine/iteagle_fpga.cpp
index c5e0ebaa7df..9fa7cef6da8 100644
--- a/src/mame/machine/iteagle_fpga.cpp
+++ b/src/mame/machine/iteagle_fpga.cpp
@@ -49,7 +49,7 @@ void iteagle_fpga_device::device_start()
// RAM defaults to base address 0x000e0000
bank_infos[2].adr = 0x000e0000 & (~(bank_infos[2].size - 1));
- m_timer = timer_alloc(0, NULL);
+ m_timer = timer_alloc(0, nullptr);
// virtpool nvram
memset(m_ram, 0, sizeof(m_ram));
@@ -599,10 +599,10 @@ ADDRESS_MAP_END
static MACHINE_CONFIG_FRAGMENT( iteagle_ide )
- MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", NULL, true)
+ MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide", ata_devices, "hdd", nullptr, true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(iteagle_ide_device, ide_interrupt))
MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE(":maincpu", AS_PROGRAM)
- MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide2", ata_devices, NULL, "cdrom", true)
+ MCFG_BUS_MASTER_IDE_CONTROLLER_ADD("ide2", ata_devices, nullptr, "cdrom", true)
MCFG_ATA_INTERFACE_IRQ_HANDLER(WRITELINE(iteagle_ide_device, ide2_interrupt))
MCFG_BUS_MASTER_IDE_CONTROLLER_SPACE(":maincpu", AS_PROGRAM)
MACHINE_CONFIG_END
diff --git a/src/mame/machine/kaneko_calc3.cpp b/src/mame/machine/kaneko_calc3.cpp
index e5e7a128561..10390dae679 100644
--- a/src/mame/machine/kaneko_calc3.cpp
+++ b/src/mame/machine/kaneko_calc3.cpp
@@ -1706,7 +1706,7 @@ void kaneko_calc3_device::mcu_run()
{
int length;
- length = decompress_table(commandtabl, 0, m_writeaddress_current-2);
+ length = decompress_table(commandtabl, nullptr, m_writeaddress_current-2);
if (length)
{
diff --git a/src/mame/machine/kaypro.cpp b/src/mame/machine/kaypro.cpp
index 9b9c3a7bab7..1d3cdad73bd 100644
--- a/src/mame/machine/kaypro.cpp
+++ b/src/mame/machine/kaypro.cpp
@@ -47,7 +47,7 @@ WRITE8_MEMBER( kaypro_state::kayproii_pio_system_w )
membank("bank3")->set_entry(BIT(data, 7));
m_is_motor_off = BIT(data, 6);
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0))
m_floppy = m_floppy0->get_device();
else
@@ -108,7 +108,7 @@ WRITE8_MEMBER( kaypro_state::kaypro2x_system_port_w )
membank("bank3")->set_entry(BIT(data, 7));
m_is_motor_off = !BIT(data, 4);
- m_floppy = NULL;
+ m_floppy = nullptr;
if (!BIT(data, 0))
m_floppy = m_floppy0->get_device();
else
diff --git a/src/mame/machine/kc.cpp b/src/mame/machine/kc.cpp
index ad707f9dbc6..d4374e31c45 100644
--- a/src/mame/machine/kc.cpp
+++ b/src/mame/machine/kc.cpp
@@ -84,8 +84,8 @@ READ8_MEMBER( kc_state::expansion_read )
// assert MEI line of first slot
m_expansions[0]->mei_w(ASSERT_LINE);
- for (int i=0; i<3; i++)
- m_expansions[i]->read(offset, result);
+ for (auto & elem : m_expansions)
+ elem->read(offset, result);
return result;
}
@@ -95,8 +95,8 @@ WRITE8_MEMBER( kc_state::expansion_write )
// assert MEI line of first slot
m_expansions[0]->mei_w(ASSERT_LINE);
- for (int i=0; i<3; i++)
- m_expansions[i]->write(offset, data);
+ for (auto & elem : m_expansions)
+ elem->write(offset, data);
}
/*
@@ -129,8 +129,8 @@ READ8_MEMBER( kc_state::expansion_io_read )
}
else
{
- for (int i=0; i<3; i++)
- m_expansions[i]->io_read(offset, result);
+ for (auto & elem : m_expansions)
+ elem->io_read(offset, result);
}
return result;
@@ -152,8 +152,8 @@ WRITE8_MEMBER( kc_state::expansion_io_write )
}
else
{
- for (int i=0; i<3; i++)
- m_expansions[i]->io_write(offset, data);
+ for (auto & elem : m_expansions)
+ elem->io_write(offset, data);
}
}
@@ -332,7 +332,7 @@ void kc_state::update_0x0c000()
{
address_space &space = m_maincpu->space( AS_PROGRAM );
- if ((m_pio_data[0] & (1<<7)) && memregion("basic")->base() != NULL)
+ if ((m_pio_data[0] & (1<<7)) && memregion("basic")->base() != nullptr)
{
/* BASIC takes next priority */
LOG(("BASIC rom 0x0c000\n"));
diff --git a/src/mame/machine/konppc.cpp b/src/mame/machine/konppc.cpp
index 76908e28411..93dbc89041b 100644
--- a/src/mame/machine/konppc.cpp
+++ b/src/mame/machine/konppc.cpp
@@ -37,7 +37,7 @@ void konppc_device::device_start()
dsp_shared_ram_bank[i] = 0;
dsp_state[i] = 0x80;
- texture_bank[i] = NULL;
+ texture_bank[i] = nullptr;
nwk_device_sel[i] = 0;
nwk_fifo_read_ptr[i] = 0;
@@ -143,7 +143,7 @@ WRITE32_MEMBER( konppc_device::cgboard_dsp_comm_w_ppc )
if (data & 0x80000000)
dsp_state[cgboard_id] |= 0x10;
- if (k033906 != NULL) /* zr107.c has no PCI and some games only have one PCI Bridge */
+ if (k033906 != nullptr) /* zr107.c has no PCI and some games only have one PCI Bridge */
k033906->set_reg((data & 0x20000000) ? 1 : 0);
if (data & 0x10000000)
@@ -236,7 +236,7 @@ void konppc_device::dsp_comm_sharc_w(address_space &space, int board, int offset
device->set_flag_input(1, ASSERT_LINE);
}
- if (texture_bank[board] != NULL)
+ if (texture_bank[board] != nullptr)
{
int offset = (data & 0x08) ? 1 : 0;
@@ -250,7 +250,7 @@ void konppc_device::dsp_comm_sharc_w(address_space &space, int board, int offset
{
if (offset == 1)
{
- if (texture_bank[board] != NULL)
+ if (texture_bank[board] != nullptr)
{
int offset = (data & 0x08) ? 1 : 0;
diff --git a/src/mame/machine/lynx.cpp b/src/mame/machine/lynx.cpp
index 14ebecf2bbf..179ac99a40f 100644
--- a/src/mame/machine/lynx.cpp
+++ b/src/mame/machine/lynx.cpp
@@ -2066,7 +2066,7 @@ DEVICE_IMAGE_LOAD_MEMBER( lynx_state, lynx_cart )
UINT32 size = m_cart->common_get_size("rom");
UINT16 gran = 0;
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
// check for lnx header
const char *filetype = image.filetype();
@@ -2099,7 +2099,7 @@ DEVICE_IMAGE_LOAD_MEMBER( lynx_state, lynx_cart )
m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
// set-up granularity
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
const char *filetype = image.filetype();
if (!core_stricmp(filetype, "lnx")) // from header
@@ -2126,7 +2126,7 @@ DEVICE_IMAGE_LOAD_MEMBER( lynx_state, lynx_cart )
}
// set-up rotation from softlist
- if (image.software_entry() != NULL)
+ if (image.software_entry() != nullptr)
{
const char *rotate = image.get_feature("rotation");
m_rotate = 0;
diff --git a/src/mame/machine/mac.cpp b/src/mame/machine/mac.cpp
index 52e4a576808..2eb6cc9383c 100644
--- a/src/mame/machine/mac.cpp
+++ b/src/mame/machine/mac.cpp
@@ -1910,7 +1910,7 @@ void mac_state::machine_reset()
this->set_memory_overlay(1);
}
- if (m_overlay_timeout != (emu_timer *)NULL)
+ if (m_overlay_timeout != (emu_timer *)nullptr)
{
m_overlay_timeout->adjust(m_maincpu->cycles_to_attotime(8));
}
@@ -1919,7 +1919,7 @@ void mac_state::machine_reset()
this->m_screen_buffer = 1;
/* setup 'classic' sound */
- if (machine().device("custom") != NULL)
+ if (machine().device("custom") != nullptr)
{
machine().device<mac_sound_device>("custom")->set_sound_buffer(0);
}
@@ -2092,7 +2092,7 @@ void mac_state::mac_driver_init(model_t model)
}
else
{
- m_overlay_timeout = (emu_timer *)NULL;
+ m_overlay_timeout = (emu_timer *)nullptr;
}
/* setup keyboard */
@@ -2257,7 +2257,7 @@ TIMER_CALLBACK_MEMBER(mac_state::mac_scanline_tick)
{
int scanline;
- if (machine().device("custom") != NULL)
+ if (machine().device("custom") != nullptr)
{
machine().device<mac_sound_device>("custom")->sh_updatebuffer();
}
@@ -3138,7 +3138,7 @@ const char *lookup_trap(UINT16 opcode)
if (traps[i].trap == opcode)
return traps[i].name;
}
- return NULL;
+ return nullptr;
}
diff --git a/src/mame/machine/maple-dc.cpp b/src/mame/machine/maple-dc.cpp
index f866243f799..dcefe0fd84c 100644
--- a/src/mame/machine/maple-dc.cpp
+++ b/src/mame/machine/maple-dc.cpp
@@ -34,8 +34,8 @@ maple_dc_device::maple_dc_device(const machine_config &mconfig, const char *tag,
// Do not move that in device_start or there will be a race
// condition with the maple devices call to register_port.
memset(devices, 0, sizeof(devices));
- cpu = 0;
- irq_cb = 0;
+ cpu = nullptr;
+ irq_cb = nullptr;
}
void maple_dc_device::register_port(int port, maple_device *device)
diff --git a/src/mame/machine/mapledev.cpp b/src/mame/machine/mapledev.cpp
index 85906c33064..0f7630e3315 100644
--- a/src/mame/machine/mapledev.cpp
+++ b/src/mame/machine/mapledev.cpp
@@ -14,7 +14,7 @@ void maple_device::static_set_host(device_t &device, const char *_host_tag, int
maple_device::maple_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)
{
- host_tag = 0;
+ host_tag = nullptr;
host_port = 0;
}
diff --git a/src/mame/machine/mbc55x.cpp b/src/mame/machine/mbc55x.cpp
index 5ef2d32a6ed..948f40e79bf 100644
--- a/src/mame/machine/mbc55x.cpp
+++ b/src/mame/machine/mbc55x.cpp
@@ -72,7 +72,7 @@ WRITE8_MEMBER( mbc55x_state::mbc55x_ppi_portb_w )
WRITE8_MEMBER( mbc55x_state::mbc55x_ppi_portc_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
switch (data & 0x03)
{
@@ -374,7 +374,7 @@ static int instruction_hook(device_t &device, offs_t curpc)
addr_ptr = (UINT8*)space.get_read_ptr(curpc);
- if ((addr_ptr !=NULL) && (addr_ptr[0]==0xCD))
+ if ((addr_ptr !=nullptr) && (addr_ptr[0]==0xCD))
{
// logerror("int %02X called\n",addr_ptr[1]);
diff --git a/src/mame/machine/mbee.cpp b/src/mame/machine/mbee.cpp
index e2f6b08a94a..18dbba0126a 100644
--- a/src/mame/machine/mbee.cpp
+++ b/src/mame/machine/mbee.cpp
@@ -115,7 +115,7 @@ WRITE8_MEMBER( mbee_state::fdc_motor_w )
d2 side (1=side 1)
d1..d0 drive select (0 to 3) */
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
floppy = m_floppy0->get_device();
floppy->mon_w(0); // motor on always
floppy = m_floppy1->get_device();
diff --git a/src/mame/machine/mcr.cpp b/src/mame/machine/mcr.cpp
index b746ed79419..0332220fb50 100644
--- a/src/mame/machine/mcr.cpp
+++ b/src/mame/machine/mcr.cpp
@@ -78,7 +78,7 @@ const gfx_layout mcr_sprite_layout =
const z80_daisy_config mcr_daisy_chain[] =
{
{ "ctc" },
- { NULL }
+ { nullptr }
};
@@ -88,7 +88,7 @@ const z80_daisy_config mcr_ipu_daisy_chain[] =
{ "ipu_pio1" },
{ "ipu_sio" },
{ "ipu_pio0" },
- { NULL }
+ { nullptr }
};
diff --git a/src/mame/machine/megacd.cpp b/src/mame/machine/megacd.cpp
index c416bf73d89..0a1449eb45a 100644
--- a/src/mame/machine/megacd.cpp
+++ b/src/mame/machine/megacd.cpp
@@ -1486,7 +1486,7 @@ WRITE16_MEMBER( sega_segacd_device::segacd_trace_vector_base_address_w )
int line;
//bitmap_ind16 *srcbitmap = segacd_stampmap[segacd_get_active_stampmap_tilemap(->pixmap()]);
- bitmap_ind16 *srcbitmap = 0;
+ bitmap_ind16 *srcbitmap = nullptr;
UINT32 bufferstart = ((segacd_imagebuffer_start_address&0xfff8)*2)<<3;
for (line=0;line<segacd_imagebuffer_vdot_size;line++)
@@ -1847,7 +1847,7 @@ void sega_segacd_device::SegaCD_CDC_Do_DMA(int &dmacount, UINT8 *CDC_BUFFER, UIN
}
else if (destination==DMA_PCM)
{
- dest = 0;//fatalerror("PCM RAM DMA unimplemented!\n");
+ dest = nullptr;//fatalerror("PCM RAM DMA unimplemented!\n");
}
else
{
diff --git a/src/mame/machine/megacdcd.cpp b/src/mame/machine/megacdcd.cpp
index 617d3615393..0fd65a3d2c0 100644
--- a/src/mame/machine/megacdcd.cpp
+++ b/src/mame/machine/megacdcd.cpp
@@ -23,10 +23,10 @@ lc89510_temp_device::lc89510_temp_device(const machine_config &mconfig, const ch
is_neoCD = false;
nff0002 = 0;
- for (int i=0;i<10;i++)
- CDD_TX[i] = 0;
- for (int i=0;i<10;i++)
- CDD_RX[i] = 0;
+ for (auto & elem : CDD_TX)
+ elem = 0;
+ for (auto & elem : CDD_RX)
+ elem = 0;
NeoCDCommsWordCount = 0;
NeoCD_StatusHack = 0;
SCD_CURLBA = 0;
@@ -219,7 +219,7 @@ void lc89510_temp_device::CDD_GetPos(void)
CLEAR_CDD_RESULT
UINT32 msf;
CDD_STATUS &= 0xFF;
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
CDD_STATUS |= SCD_STATUS;
msf = lba_to_msf_alt(SCD_CURLBA+150);
@@ -235,7 +235,7 @@ void lc89510_temp_device::CDD_GetTrackPos(void)
UINT32 msf;
CDD_STATUS &= 0xFF;
// UINT32 end_msf = ;
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
CDD_STATUS |= SCD_STATUS;
elapsedlba = SCD_CURLBA - segacd.toc->tracks[ cdrom_get_track(segacd.cd, SCD_CURLBA) ].logframeofs;
@@ -250,7 +250,7 @@ void lc89510_temp_device::CDD_GetTrack(void)
{
CLEAR_CDD_RESULT
CDD_STATUS &= 0xFF;
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
CDD_STATUS |= SCD_STATUS;
SCD_CURTRK = cdrom_get_track(segacd.cd, SCD_CURLBA)+1;
@@ -261,7 +261,7 @@ void lc89510_temp_device::CDD_Length(void)
{
CLEAR_CDD_RESULT
CDD_STATUS &= 0xFF;
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
CDD_STATUS |= SCD_STATUS;
@@ -278,7 +278,7 @@ void lc89510_temp_device::CDD_FirstLast(void)
{
CLEAR_CDD_RESULT
CDD_STATUS &= 0xFF;
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
CDD_STATUS |= SCD_STATUS;
CDD_MIN = 1; // first
@@ -293,7 +293,7 @@ void lc89510_temp_device::CDD_GetTrackAdr(void)
int last_track = cdrom_get_last_track(segacd.cd);
CDD_STATUS &= 0xFF;
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
CDD_STATUS |= SCD_STATUS;
@@ -325,7 +325,7 @@ void lc89510_temp_device::CDD_GetTrackType(void)
int last_track = cdrom_get_last_track(segacd.cd);
CDD_STATUS &= 0xFF;
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
CDD_STATUS |= SCD_STATUS;
@@ -361,7 +361,7 @@ void lc89510_temp_device::CDD_Play(running_machine &machine)
CLEAR_CDD_RESULT
UINT32 msf = getmsf_from_regs();
SCD_CURLBA = msf_to_lba(msf)-150;
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
UINT32 end_msf = segacd.toc->tracks[ cdrom_get_track(segacd.cd, SCD_CURLBA) + 1 ].logframeofs;
SCD_CURTRK = cdrom_get_track(segacd.cd, SCD_CURLBA)+1;
@@ -386,7 +386,7 @@ void lc89510_temp_device::CDD_Seek(void)
CLEAR_CDD_RESULT
UINT32 msf = getmsf_from_regs();
SCD_CURLBA = msf_to_lba(msf)-150;
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
SCD_CURTRK = cdrom_get_track(segacd.cd, SCD_CURLBA)+1;
LC8951UpdateHeader();
@@ -419,7 +419,7 @@ void lc89510_temp_device::CDD_Resume(running_machine &machine)
{
CLEAR_CDD_RESULT
STOP_CDC_READ
- if(segacd.cd == NULL) // no CD is there, bail out
+ if(segacd.cd == nullptr) // no CD is there, bail out
return;
SCD_CURTRK = cdrom_get_track(segacd.cd, SCD_CURLBA)+1;
SCD_STATUS = CDD_PLAYINGCDDA;
@@ -1156,16 +1156,16 @@ char* lc89510_temp_device::LC8915InitTransfer(int NeoCDDMACount)
{
if (!LC8951RegistersW[REG_W_DTTRG]) {
//bprintf(PRINT_ERROR, _T(" LC8951 DTTRG status invalid\n"));
- return NULL;
+ return nullptr;
}
if (!(LC8951RegistersW[REG_W_IFCTRL] & 0x02)) {
//bprintf(PRINT_ERROR, _T(" LC8951 DOUTEN status invalid\n"));
- return NULL;
+ return nullptr;
}
if (((LC8951RegistersW[REG_W_DACH] << 8) | LC8951RegistersW[REG_W_DACL]) + (NeoCDDMACount << 1) > LC89510_EXTERNAL_BUFFER_SIZE) {
//bprintf(PRINT_ERROR, _T(" DMA transfer exceeds current sector in LC8951 external buffer\n"));
- return NULL;
+ return nullptr;
}
char* addr = (char*)CDC_BUFFER + ((LC8951RegistersW[REG_W_DACH] << 8) | LC8951RegistersW[REG_W_DACL]);
diff --git a/src/mame/machine/mexico86.cpp b/src/mame/machine/mexico86.cpp
index c555928ee8e..dfffcf83b6a 100644
--- a/src/mame/machine/mexico86.cpp
+++ b/src/mame/machine/mexico86.cpp
@@ -18,7 +18,7 @@ WRITE8_MEMBER(mexico86_state::mexico86_f008_w)
{
m_audiocpu->set_input_line(INPUT_LINE_RESET, (data & 4) ? CLEAR_LINE : ASSERT_LINE);
- if (m_mcu != NULL)
+ if (m_mcu != nullptr)
{
// mexico 86, knight boy
m_mcu->set_input_line(INPUT_LINE_RESET, (data & 2) ? CLEAR_LINE : ASSERT_LINE);
diff --git a/src/mame/machine/mhavoc.cpp b/src/mame/machine/mhavoc.cpp
index 4c3a9dc2ab1..67453c09d87 100644
--- a/src/mame/machine/mhavoc.cpp
+++ b/src/mame/machine/mhavoc.cpp
@@ -84,7 +84,7 @@ void mhavoc_state::machine_start()
void mhavoc_state::machine_reset()
{
address_space &space = m_alpha->space(AS_PROGRAM);
- m_has_gamma_cpu = (m_gamma != NULL);
+ m_has_gamma_cpu = (m_gamma != nullptr);
membank("bank1")->configure_entry(0, m_zram0);
membank("bank1")->configure_entry(1, m_zram1);
diff --git a/src/mame/machine/microdrv.h b/src/mame/machine/microdrv.h
index 7d8913aae00..50225a3f564 100644
--- a/src/mame/machine/microdrv.h
+++ b/src/mame/machine/microdrv.h
@@ -61,7 +61,7 @@ public:
virtual bool is_reset_on_load() const { return 0; }
virtual const char *image_interface() const { return "ql_cass"; }
virtual const char *file_extensions() const { return "mdv"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// specific implementation
DECLARE_WRITE_LINE_MEMBER( clk_w );
diff --git a/src/mame/machine/micropolis.cpp b/src/mame/machine/micropolis.cpp
index 73b1b58178e..a42c692718c 100644
--- a/src/mame/machine/micropolis.cpp
+++ b/src/mame/machine/micropolis.cpp
@@ -80,13 +80,13 @@ micropolis_device::micropolis_device(const machine_config &mconfig, const char *
m_data_offset(0),
m_data_count(0),
m_sector_length(0),
- m_drive(NULL)
+ m_drive(nullptr)
{
- for (int i = 0; i < 6144; i++)
- m_buffer[i] = 0;
+ for (auto & elem : m_buffer)
+ elem = 0;
- for (int i = 0; i < 4; i++)
- m_floppy_drive_tags[i] = NULL;
+ for (auto & elem : m_floppy_drive_tags)
+ elem = nullptr;
}
//-------------------------------------------------
@@ -118,11 +118,11 @@ void micropolis_device::device_start()
void micropolis_device::device_reset()
{
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_floppy_drive_tags)
{
- if (m_floppy_drive_tags[i])
+ if (elem)
{
- legacy_floppy_image_device *img = siblingdevice<legacy_floppy_image_device>(m_floppy_drive_tags[i]);
+ legacy_floppy_image_device *img = siblingdevice<legacy_floppy_image_device>(elem);
if (img)
{
diff --git a/src/mame/machine/microtan.cpp b/src/mame/machine/microtan.cpp
index 4fca3fe18ca..158c7a9fed5 100644
--- a/src/mame/machine/microtan.cpp
+++ b/src/mame/machine/microtan.cpp
@@ -463,11 +463,11 @@ DRIVER_INIT_MEMBER(microtan_state,microtan)
space.nop_readwrite(0x0400, 0xbbff);
break;
case 1: // +7K TANEX
- space.install_ram(0x0400, 0x1fff,NULL);
+ space.install_ram(0x0400, 0x1fff,nullptr);
space.nop_readwrite(0x2000, 0xbbff);
break;
default: // +7K TANEX + 40K TANRAM
- space.install_ram(0x0400, 0xbbff, NULL);
+ space.install_ram(0x0400, 0xbbff, nullptr);
break;
}
diff --git a/src/mame/machine/midwayic.cpp b/src/mame/machine/midwayic.cpp
index 3f77308544b..783eb12ed3e 100644
--- a/src/mame/machine/midwayic.cpp
+++ b/src/mame/machine/midwayic.cpp
@@ -225,7 +225,7 @@ midway_serial_pic2_device::midway_serial_pic2_device(const machine_config &mconf
m_time_index(0),
m_time_just_written(0),
m_yearoffs(0),
- m_time_write_timer(NULL)
+ m_time_write_timer(nullptr)
{
memset(m_buffer,0,sizeof(m_buffer));
memset(m_time_buf,0,sizeof(m_time_buf));
@@ -245,7 +245,7 @@ midway_serial_pic2_device::midway_serial_pic2_device(const machine_config &mconf
m_time_index(0),
m_time_just_written(0),
m_yearoffs(0),
- m_time_write_timer(NULL)
+ m_time_write_timer(nullptr)
{
memset(m_buffer,0,sizeof(m_buffer));
memset(m_time_buf,0,sizeof(m_time_buf));
@@ -595,11 +595,11 @@ midway_ioasic_device::midway_ioasic_device(const machine_config &mconfig, const
midway_serial_pic2_device(mconfig, MIDWAY_IOASIC, "Midway IOASIC", tag, owner, clock, "midway_ioasic", __FILE__),
m_has_dcs(0),
m_has_cage(0),
- m_dcs_cpu(NULL),
+ m_dcs_cpu(nullptr),
m_shuffle_type(0),
m_shuffle_default(0),
m_shuffle_active(0),
- m_shuffle_map(NULL),
+ m_shuffle_map(nullptr),
m_irq_callback(*this),
m_irq_state(0),
m_sound_irq_state(0),
@@ -609,8 +609,8 @@ midway_ioasic_device::midway_ioasic_device(const machine_config &mconfig, const
m_fifo_out(0),
m_fifo_bytes(0),
m_fifo_force_buffer_empty_pc(0),
- m_cage(NULL),
- m_dcs(NULL)
+ m_cage(nullptr),
+ m_dcs(nullptr)
{
memset(m_fifo,0,sizeof(m_fifo));
memset(m_reg,0,sizeof(m_reg));
@@ -641,14 +641,14 @@ void midway_ioasic_device::device_start()
/* do we have a DCS2 sound chip connected? (most likely) */
m_dcs = machine().device<dcs_audio_device>("dcs");
- m_has_dcs = (m_dcs != NULL);
+ m_has_dcs = (m_dcs != nullptr);
m_cage = machine().device<atari_cage_device>("cage");
- m_has_cage = (m_cage != NULL);
+ m_has_cage = (m_cage != nullptr);
m_dcs_cpu = m_dcs->subdevice("dcs2");
- if (m_dcs_cpu == NULL)
+ if (m_dcs_cpu == nullptr)
m_dcs_cpu = m_dcs->subdevice("dsio");
- if (m_dcs_cpu == NULL)
+ if (m_dcs_cpu == nullptr)
m_dcs_cpu = m_dcs->subdevice("denver");
m_shuffle_map = &shuffle_maps[m_shuffle_type][0];
// resolve callbacks
diff --git a/src/mame/machine/mie.cpp b/src/mame/machine/mie.cpp
index 108192fd021..55bac6f038f 100644
--- a/src/mame/machine/mie.cpp
+++ b/src/mame/machine/mie.cpp
@@ -96,9 +96,9 @@ mie_device::mie_device(const machine_config &mconfig, const char *tag, device_t
: maple_device(mconfig, MIE, "Sega 315-6146 MIE", tag, owner, clock, "mie", __FILE__)
{
memset(gpio_name, 0, sizeof(gpio_name));
- jvs_name = 0;
- cpu = 0;
- jvs = 0;
+ jvs_name = nullptr;
+ cpu = nullptr;
+ jvs = nullptr;
}
void mie_device::device_start()
@@ -110,7 +110,7 @@ void mie_device::device_start()
for (int i = 0; i < ARRAY_LENGTH(gpio_name); i++)
{
- gpio_port[i] = gpio_name[i] ? ioport(gpio_name[i]) : NULL;
+ gpio_port[i] = gpio_name[i] ? ioport(gpio_name[i]) : nullptr;
}
save_item(NAME(gpiodir));
diff --git a/src/mame/machine/mm1kb.cpp b/src/mame/machine/mm1kb.cpp
index 5097eb78225..88faf286961 100644
--- a/src/mame/machine/mm1kb.cpp
+++ b/src/mame/machine/mm1kb.cpp
@@ -45,7 +45,7 @@ static const char *const mm1_kb_sample_names[] =
"*MM1_keyboard",
"beep", // beep at 2.6 kHz
"power_switch", // not actually on the keyboard, but close enough :)
- 0
+ nullptr
};
bool mm1_keyboard_t::first_time = true;
diff --git a/src/mame/machine/model1.cpp b/src/mame/machine/model1.cpp
index 2b7460b2a8b..df1e8006bbf 100644
--- a/src/mame/machine/model1.cpp
+++ b/src/mame/machine/model1.cpp
@@ -1586,15 +1586,15 @@ const struct model1_state::function model1_state::ftab_vf[] = {
{ &model1_state::fsub, 2 },
{ &model1_state::fmul, 2 },
{ &model1_state::fdiv, 2 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::matrix_push, 0 },
{ &model1_state::matrix_pop, 0 },
{ &model1_state::matrix_write, 12 },
{ &model1_state::clear_stack, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::anglev, 2 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::track_select, 1 },
{ &model1_state::f14, 4 },
{ &model1_state::anglep, 4 },
@@ -1606,9 +1606,9 @@ const struct model1_state::function model1_state::ftab_vf[] = {
{ &model1_state::matrix_rotx, 1 },
{ &model1_state::matrix_roty, 1 },
{ &model1_state::matrix_rotz, 1 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::track_read_quad, 1 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::transform_point, 3 },
{ &model1_state::fsin_m1, 1 },
{ &model1_state::fcos_m1, 1 },
@@ -1616,10 +1616,10 @@ const struct model1_state::function model1_state::ftab_vf[] = {
{ &model1_state::fcosm_m1, 2 },
{ &model1_state::distance3, 6 },
- { NULL, 0 }, /* 0x20 */
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 }, /* 0x20 */
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::acc_set, 1 },
{ &model1_state::acc_get, 0 },
{ &model1_state::acc_add, 1 },
@@ -1631,54 +1631,54 @@ const struct model1_state::function model1_state::ftab_vf[] = {
{ &model1_state::f44, 1 },
{ &model1_state::f45, 1 },
{ &model1_state::vlength, 3 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::track_read_info, 1 }, /* 0x30 */
{ &model1_state::colbox_set, 12 },
{ &model1_state::colbox_test, 3 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::track_lookup, 4 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::col_setcirc, 3 }, /* 0x40 */
{ &model1_state::col_testpt, 2 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::distance, 4 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::car_move, 4 },
{ &model1_state::cpa, 12 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::vmat_store, 1 },
{ &model1_state::vmat_restore, 1 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::vmat_mul, 2 },
{ &model1_state::vmat_read, 1 },
{ &model1_state::matrix_unrot, 0 },
{ &model1_state::f80, 0 }, /* 0x50 */
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::matrix_rtrans, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::vmat_save, 1 },
{ &model1_state::vmat_load, 1 },
{ &model1_state::ram_setadr, 1 },
{ &model1_state::groundbox_test, 3 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::f89, 4 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::f92, 4 },
{ &model1_state::f93, 1 },
{ &model1_state::f94, 1 },
@@ -1704,7 +1704,7 @@ const struct model1_state::function model1_state::ftab_swa[] = {
{ &model1_state::fsub, 2 },
{ &model1_state::fmul, 2 },
{ &model1_state::fdiv, 2 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::matrix_push, 0 },
{ &model1_state::matrix_pop, 0 },
{ &model1_state::matrix_write, 12 },
@@ -1724,9 +1724,9 @@ const struct model1_state::function model1_state::ftab_swa[] = {
{ &model1_state::matrix_rotx, 1 },
{ &model1_state::matrix_roty, 1 },
{ &model1_state::matrix_rotz, 1 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::f24_swa, 7 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::transform_point, 3 },
{ &model1_state::fsin_m1, 1 },
{ &model1_state::fcos_m1, 1 },
@@ -1734,8 +1734,8 @@ const struct model1_state::function model1_state::ftab_swa[] = {
{ &model1_state::fcosm_m1, 2 },
{ &model1_state::distance3, 6 },
- { NULL, 0 }, /* 0x20 */
- { NULL, 0 },
+ { nullptr, 0 }, /* 0x20 */
+ { nullptr, 0 },
{ &model1_state::ftoi, 1 },
{ &model1_state::itof, 1 },
{ &model1_state::acc_set, 1 },
@@ -1751,26 +1751,26 @@ const struct model1_state::function model1_state::ftab_swa[] = {
{ &model1_state::vlength, 3 },
{ &model1_state::f47, 3 },
- { NULL, 0 }, /* 0x30 */
+ { nullptr, 0 }, /* 0x30 */
{ &model1_state::f49_swa, 6 },
{ &model1_state::f50_swa, 4 },
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::f52, 0 },
{ &model1_state::matrix_rdir, 3 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::f56, 7 },
{ &model1_state::f57, 0 },
{ &model1_state::matrix_readt, 0 },
{ &model1_state::acc_geti, 0 },
{ &model1_state::f60, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
- { NULL, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
+ { nullptr, 0 },
{ &model1_state::push_and_ident, 0 }, /* 0x40 */
- { NULL, 0 },
+ { nullptr, 0 },
{ &model1_state::catmull_rom, 13 }
};
@@ -1792,7 +1792,7 @@ TGP_FUNCTION( model1_state::function_get_vf )
count += FIFO_SIZE;
logerror("TGP function called with sizeout = %d\n", count);
}
- if(ARRAY_LENGTH(ftab_vf) > f && NULL != ftab_vf[f].cb) {
+ if(ARRAY_LENGTH(ftab_vf) > f && nullptr != ftab_vf[f].cb) {
m_fifoin_cbcount = ftab_vf[f].count;
m_fifoin_cb = model1_state::ftab_vf[f].cb;
// logerror("TGP function %d request, %d parameters\n", f, m_fifoin_cbcount);
@@ -1815,7 +1815,7 @@ TGP_FUNCTION( model1_state::function_get_swa )
count += FIFO_SIZE;
logerror("TGP function called with sizeout = %d\n", count);
}
- if(ARRAY_LENGTH(ftab_swa) > f && NULL != ftab_swa[f].cb) {
+ if(ARRAY_LENGTH(ftab_swa) > f && nullptr != ftab_swa[f].cb) {
m_fifoin_cbcount = ftab_swa[f].count;
m_fifoin_cb = model1_state::ftab_swa[f].cb;
// logerror("TGP function %d request, %d parameters\n", f, m_fifoin_cbcount);
diff --git a/src/mame/machine/model3.cpp b/src/mame/machine/model3.cpp
index 12826528efe..1cfb25e48f8 100644
--- a/src/mame/machine/model3.cpp
+++ b/src/mame/machine/model3.cpp
@@ -154,9 +154,9 @@ void model3_state::tap_write(int tck, int tms, int tdi, int trst)
if (m_ir == U64(0x000023fffffffffe))
{
- for (int i=0; i < 32; i++)
+ for (auto & elem : m_id_data)
{
- m_id_data[i] = 0;
+ elem = 0;
}
m_id_size = 41;
@@ -237,9 +237,9 @@ void model3_state::tap_set_asic_ids()
* data on TAP reset and when the instruction is issued.
*/
- for (int i=0; i < 32; i++)
+ for (auto & elem : m_id_data)
{
- m_id_data[i] = 0;
+ elem = 0;
}
if (m_m3_step == 0x10)
diff --git a/src/mame/machine/msx.cpp b/src/mame/machine/msx.cpp
index 92add704ebe..b881ad38d4d 100644
--- a/src/mame/machine/msx.cpp
+++ b/src/mame/machine/msx.cpp
@@ -31,9 +31,9 @@ void msx_state::check_irq()
{
int state = CLEAR_LINE;
- for (int i = 0; i < ARRAY_LENGTH(m_irq_state); i++)
+ for (auto & elem : m_irq_state)
{
- if (m_irq_state[i] != CLEAR_LINE)
+ if (elem != CLEAR_LINE)
{
state = ASSERT_LINE;
}
@@ -47,9 +47,9 @@ void msx_state::machine_reset()
{
msx_memory_reset ();
msx_memory_map_all ();
- for (int i = 0; i < ARRAY_LENGTH(m_irq_state); i++)
+ for (auto & elem : m_irq_state)
{
- m_irq_state[i] = CLEAR_LINE;
+ elem = CLEAR_LINE;
}
check_irq();
}
@@ -401,15 +401,15 @@ void msx_state::msx_memory_init()
int count_populated_pages = 0;
// Populate all unpopulated slots with the dummy interface
- for ( int prim = 0; prim < 4; prim++ )
+ for (auto & elem : m_all_slots)
{
for ( int sec = 0; sec < 4; sec++ )
{
for ( int page = 0; page < 4; page++ )
{
- if ( m_all_slots[prim][sec][page] == NULL )
+ if ( elem[sec][page] == nullptr )
{
- m_all_slots[prim][sec][page] = &m_empty_slot;
+ elem[sec][page] = &m_empty_slot;
}
else
{
@@ -428,9 +428,9 @@ void msx_state::msx_memory_reset ()
{
m_primary_slot = 0;
- for (int prim=0; prim<4; prim++)
+ for (auto & elem : m_secondary_slot)
{
- m_secondary_slot[prim] = 0;
+ elem = 0;
}
}
diff --git a/src/mame/machine/mtx.cpp b/src/mame/machine/mtx.cpp
index 0594ec6c086..26a0ae6876a 100644
--- a/src/mame/machine/mtx.cpp
+++ b/src/mame/machine/mtx.cpp
@@ -347,7 +347,7 @@ SNAPSHOT_LOAD_MEMBER( mtx_state, mtx )
// verify first byte
if (header[0] != 0xff)
{
- image.seterror(IMAGE_ERROR_INVALIDIMAGE, NULL);
+ image.seterror(IMAGE_ERROR_INVALIDIMAGE, nullptr);
return IMAGE_INIT_FAIL;
}
diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp
index e3270364f66..91ce7e482e4 100644
--- a/src/mame/machine/n64.cpp
+++ b/src/mame/machine/n64.cpp
@@ -23,7 +23,7 @@ const device_type N64PERIPH = &device_creator<n64_periphs>;
n64_periphs::n64_periphs(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, N64PERIPH, "N64 Periphal Chips", tag, owner, clock, "n64_periphs", __FILE__)
, device_video_interface(mconfig, *this)
- , m_nvram_image(NULL)
+ , m_nvram_image(nullptr)
, dd_present(false)
, disk_present(false)
, cart_present(false)
@@ -1281,7 +1281,7 @@ n64_periphs::AUDIO_DMA *n64_periphs::ai_fifo_get_top()
}
else
{
- return NULL;
+ return nullptr;
}
}
@@ -1324,7 +1324,7 @@ void n64_periphs::ai_timer_tick()
signal_rcp_interrupt(AI_INTERRUPT);
// keep playing if there's another DMA queued
- if (ai_fifo_get_top() != NULL)
+ if (ai_fifo_get_top() != nullptr)
{
ai_dma();
}
@@ -2736,7 +2736,7 @@ void n64_state::n64_machine_stop()
{
n64_periphs *periphs = machine().device<n64_periphs>("rcp");
- if( periphs->m_nvram_image == NULL )
+ if( periphs->m_nvram_image == nullptr )
return;
device_image_interface *image = dynamic_cast<device_image_interface *>(periphs->m_nvram_image);
diff --git a/src/mame/machine/namco51.cpp b/src/mame/machine/namco51.cpp
index eb8e17cc02d..2cd77ab69b5 100644
--- a/src/mame/machine/namco51.cpp
+++ b/src/mame/machine/namco51.cpp
@@ -97,7 +97,7 @@ WRITE8_MEMBER( namco_51xx_device::write )
{
/* kludge for a possible bug in Xevious */
- static const game_driver *namcoio_51XX_driver = NULL;
+ static const game_driver *namcoio_51XX_driver = nullptr;
static int namcoio_51XX_kludge = 0;
/* Only compute namcoio_51XX_kludge when gamedrv changes */
diff --git a/src/mame/machine/namcoio.cpp b/src/mame/machine/namcoio.cpp
index b8fb22fef40..4ac534279ce 100644
--- a/src/mame/machine/namcoio.cpp
+++ b/src/mame/machine/namcoio.cpp
@@ -181,8 +181,8 @@ void namcoio_device::device_start()
void namcoio_device::device_reset()
{
- for (int i = 0; i < 16; i++)
- m_ram[i] = 0;
+ for (auto & elem : m_ram)
+ elem = 0;
set_reset_line(PULSE_LINE);
}
diff --git a/src/mame/machine/namcos2.cpp b/src/mame/machine/namcos2.cpp
index 5561aac6300..7265a607d81 100644
--- a/src/mame/machine/namcos2.cpp
+++ b/src/mame/machine/namcos2.cpp
@@ -101,7 +101,7 @@ void namcos2_shared_state::reset_all_subcpus(int state)
MACHINE_START_MEMBER(namcos2_shared_state,namcos2)
{
- namcos2_kickstart = NULL;
+ namcos2_kickstart = nullptr;
m_eeprom = auto_alloc_array(machine(), UINT8, m_eeprom_size);
machine().device<nvram_device>("nvram")->set_base(m_eeprom, m_eeprom_size);
m_posirq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(namcos2_shared_state::namcos2_posirq_tick),this));
@@ -448,9 +448,9 @@ void namcos2_shared_state::init_c148()
UINT16 namcos2_shared_state::readwrite_c148( address_space &space, offs_t offset, UINT16 data, int bWrite )
{
offs_t addr = ((offset * 2) + 0x1c0000) & 0x1fe000;
- device_t *altcpu = NULL;
- UINT16 *pC148Reg = NULL;
- UINT16 *pC148RegAlt = NULL;
+ device_t *altcpu = nullptr;
+ UINT16 *pC148Reg = nullptr;
+ UINT16 *pC148RegAlt = nullptr;
UINT16 result = 0;
if (&space.device() == m_maincpu)
@@ -563,7 +563,7 @@ UINT16 namcos2_shared_state::readwrite_c148( address_space &space, offs_t offset
/* Suspend execution */
m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE);
}
- if (namcos2_kickstart != NULL)
+ if (namcos2_kickstart != nullptr)
{
//printf( "dspkick=0x%x\n", data );
if (data & 0x04)
diff --git a/src/mame/machine/naomibd.cpp b/src/mame/machine/naomibd.cpp
index be95c340f96..704c357d70f 100644
--- a/src/mame/machine/naomibd.cpp
+++ b/src/mame/machine/naomibd.cpp
@@ -68,8 +68,8 @@ ADDRESS_MAP_END
naomi_board::naomi_board(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source)
: naomi_g1_device(mconfig, type, name, tag, owner, clock, shortname, source)
{
- eeprom_tag = 0;
- rombdid_tag = 0;
+ eeprom_tag = nullptr;
+ rombdid_tag = nullptr;
}
void naomi_board::static_set_eeprom_tag(device_t &device, const char *_eeprom_tag, const char *_actel_tag)
@@ -94,7 +94,7 @@ void naomi_board::device_start()
if(eeprom_tag)
eeprom = machine().device<x76f100_device>(eeprom_tag);
else
- eeprom = 0;
+ eeprom = nullptr;
}
void naomi_board::device_reset()
@@ -110,7 +110,7 @@ void naomi_board::device_reset()
void naomi_board::dma_get_position(UINT8 *&base, UINT32 &limit, bool to_mainram)
{
if(!to_mainram) {
- base = 0;
+ base = nullptr;
limit = 0;
return;
}
diff --git a/src/mame/machine/naomigd.cpp b/src/mame/machine/naomigd.cpp
index fbe9cd3d32c..136d7a959b1 100644
--- a/src/mame/machine/naomigd.cpp
+++ b/src/mame/machine/naomigd.cpp
@@ -329,8 +329,8 @@ void naomi_gdrom_board::write_from_qword(UINT8 *region, UINT64 qword)
naomi_gdrom_board::naomi_gdrom_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: naomi_board(mconfig, NAOMI_GDROM_BOARD, "Sega NAOMI GDROM Board", tag, owner, clock, "naomi_gdrom_board", __FILE__)
{
- image_tag = 0;
- pic_tag = 0;
+ image_tag = nullptr;
+ pic_tag = nullptr;
}
void naomi_gdrom_board::static_set_tags(device_t &device, const char *_image_tag, const char *_pic_tag)
@@ -388,7 +388,7 @@ void naomi_gdrom_board::device_start()
{
naomi_board::device_start();
- dimm_data = 0;
+ dimm_data = nullptr;
dimm_data_size = 0;
char name[128];
diff --git a/src/mame/machine/naomim1.cpp b/src/mame/machine/naomim1.cpp
index 84d2db5ecef..c9e5bc1c359 100644
--- a/src/mame/machine/naomim1.cpp
+++ b/src/mame/machine/naomim1.cpp
@@ -19,7 +19,7 @@ naomi_m1_board::naomi_m1_board(const machine_config &mconfig, const char *tag, d
READ16_MEMBER(naomi_m1_board::actel_id_r)
{
- if (rombdid_tag && memregion(rombdid_tag) != NULL)
+ if (rombdid_tag && memregion(rombdid_tag) != nullptr)
{
const UINT8 *bdid = memregion(rombdid_tag)->base();
return bdid[0] | (bdid[1] << 8);
@@ -34,7 +34,7 @@ void naomi_m1_board::device_start()
std::string skey = parameter("key");
if(!skey.empty())
- key = strtoll(skey.c_str(), 0, 16);
+ key = strtoll(skey.c_str(), nullptr, 16);
else
{
logerror("%s: Warning: key not provided\n", tag());
@@ -159,8 +159,8 @@ void naomi_m1_board::enc_reset()
has_history = false;
buffer_actual_size = 0;
- for(int i=0; i<111; i++)
- dict[i] = getb(8);
+ for(auto & elem : dict)
+ elem = getb(8);
}
void naomi_m1_board::wb(UINT8 byte)
diff --git a/src/mame/machine/naomim4.cpp b/src/mame/machine/naomim4.cpp
index 2e23d76aca4..d22f7540ebc 100644
--- a/src/mame/machine/naomim4.cpp
+++ b/src/mame/machine/naomim4.cpp
@@ -49,7 +49,7 @@ ADDRESS_MAP_END
naomi_m4_board::naomi_m4_board(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: naomi_board(mconfig, NAOMI_M4_BOARD, "Sega NAOMI M4 Board", tag, owner, clock, "naomi_m4_board", __FILE__)
{
- key_tag = 0;
+ key_tag = nullptr;
}
void naomi_m4_board::static_set_tags(device_t &device, const char *_key_tag)
@@ -134,7 +134,7 @@ void naomi_m4_board::board_get_buffer(UINT8 *&base, UINT32 &limit)
if (cfi_mode) {
int fpr_num = 0;
- if (rombdid_tag && memregion(rombdid_tag) != NULL)
+ if (rombdid_tag && memregion(rombdid_tag) != nullptr)
{
fpr_num = *memregion(rombdid_tag)->base() & 0x7f;
@@ -217,7 +217,7 @@ READ16_MEMBER(naomi_m4_board::m4_id_r)
{
UINT16 epr_flag = 0;
- if (rombdid_tag && memregion(rombdid_tag) != NULL)
+ if (rombdid_tag && memregion(rombdid_tag) != nullptr)
{
epr_flag = *memregion(rombdid_tag)->base() & 0x80;
diff --git a/src/mame/machine/nb1414m4.cpp b/src/mame/machine/nb1414m4.cpp
index b860a3395cc..07fc537fd6c 100644
--- a/src/mame/machine/nb1414m4.cpp
+++ b/src/mame/machine/nb1414m4.cpp
@@ -35,7 +35,7 @@ const device_type NB1414M4 = &device_creator<nb1414m4_device>;
nb1414m4_device::nb1414m4_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, NB1414M4, "NB1414M4 Mahjong Custom", tag, owner, clock, "nb1414m4", __FILE__),
device_video_interface(mconfig, *this),
- m_data(NULL)
+ m_data(nullptr)
{
}
diff --git a/src/mame/machine/ng_memcard.h b/src/mame/machine/ng_memcard.h
index 9d457ddaa59..f9dfd186c92 100644
--- a/src/mame/machine/ng_memcard.h
+++ b/src/mame/machine/ng_memcard.h
@@ -41,7 +41,7 @@ public:
virtual bool must_be_loaded() const { return false; }
virtual bool is_reset_on_load() const { return false; }
virtual const char *file_extensions() const { return "neo"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
diff --git a/src/mame/machine/nmk112.cpp b/src/mame/machine/nmk112.cpp
index 6e925b53cc7..afe6588c000 100644
--- a/src/mame/machine/nmk112.cpp
+++ b/src/mame/machine/nmk112.cpp
@@ -22,10 +22,10 @@ const device_type NMK112 = &device_creator<nmk112_device>;
nmk112_device::nmk112_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, NMK112, "NMK112", tag, owner, clock, "nmk112", __FILE__),
m_page_mask(0xff),
- m_tag0(NULL),
- m_tag1(NULL),
- m_rom0(NULL),
- m_rom1(NULL),
+ m_tag0(nullptr),
+ m_tag1(nullptr),
+ m_rom0(nullptr),
+ m_rom1(nullptr),
m_size0(0),
m_size1(0)
{
diff --git a/src/mame/machine/osborne1.cpp b/src/mame/machine/osborne1.cpp
index 5ba2a530edc..4d7856e8eb2 100644
--- a/src/mame/machine/osborne1.cpp
+++ b/src/mame/machine/osborne1.cpp
@@ -223,7 +223,7 @@ WRITE8_MEMBER( osborne1_state::video_pia_port_b_w )
}
else
{
- m_fdc->set_floppy(NULL);
+ m_fdc->set_floppy(nullptr);
}
}
diff --git a/src/mame/machine/pce.cpp b/src/mame/machine/pce.cpp
index 6aeba853933..ad5d712367c 100644
--- a/src/mame/machine/pce.cpp
+++ b/src/mame/machine/pce.cpp
@@ -110,8 +110,8 @@ MACHINE_START_MEMBER(pce_state,pce)
MACHINE_RESET_MEMBER(pce_state,mess_pce)
{
- for (int joy_i = 0; joy_i < 5; joy_i++)
- m_joy_6b_packet[joy_i] = 0;
+ for (auto & elem : m_joy_6b_packet)
+ elem = 0;
/* Note: Arcade Card BIOS contents are the same as System 3, only internal HW differs.
We use a category to select between modes (some games can be run in either S-CD or A-CD modes) */
diff --git a/src/mame/machine/pce220_ser.h b/src/mame/machine/pce220_ser.h
index ec52e5c0476..e1d48a02cb8 100644
--- a/src/mame/machine/pce220_ser.h
+++ b/src/mame/machine/pce220_ser.h
@@ -38,9 +38,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "txt,ihx"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
// specific implementation
UINT8 in_xin(void) { return m_xin & 0x01; }
diff --git a/src/mame/machine/pgmprot_igs027a_type1.cpp b/src/mame/machine/pgmprot_igs027a_type1.cpp
index 096d1135c2b..84b7bfc5de6 100644
--- a/src/mame/machine/pgmprot_igs027a_type1.cpp
+++ b/src/mame/machine/pgmprot_igs027a_type1.cpp
@@ -881,9 +881,9 @@ void pgm_arm_type1_state::command_handler_puzzli2(int pc)
m_valueresponse = 0x36<<16;
// clear the return structure
- for (int columns=0;columns<8;columns++)
+ for (auto & elem : level_structure)
for (int rows=0;rows<10;rows++)
- level_structure[columns][rows] = 0x0000;
+ elem[rows] = 0x0000;
break;
diff --git a/src/mame/machine/pgmprot_igs027a_type3.cpp b/src/mame/machine/pgmprot_igs027a_type3.cpp
index 8faa5fc4432..24fc0c19ccd 100644
--- a/src/mame/machine/pgmprot_igs027a_type3.cpp
+++ b/src/mame/machine/pgmprot_igs027a_type3.cpp
@@ -566,10 +566,10 @@ void pgm_arm_type3_state::pgm_patch_external_arm_rom_jumptable_theglada(int base
*/
- for (int i = 0; i < 131; i++)
+ for (auto & subroutine_addresse : subroutine_addresses)
{
// UINT32 addr = extprot[(base/2)] | (extprot[(base/2) + 1] << 16);
- extprot[(base / 2)] = subroutine_addresses[i];
+ extprot[(base / 2)] = subroutine_addresse;
base += 4;
// printf("%04x (%08x)\n", subroutine_addresses[i], addr );
diff --git a/src/mame/machine/pk8020.cpp b/src/mame/machine/pk8020.cpp
index e065aac7fd7..ef70113fdcb 100644
--- a/src/mame/machine/pk8020.cpp
+++ b/src/mame/machine/pk8020.cpp
@@ -830,7 +830,7 @@ WRITE8_MEMBER(pk8020_state::pk8020_portc_w)
WRITE8_MEMBER(pk8020_state::pk8020_portb_w)
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
// Turn all motors off
if (m_floppy0->get_device()) m_floppy0->get_device()->mon_w(1);
diff --git a/src/mame/machine/playch10.cpp b/src/mame/machine/playch10.cpp
index 44d35252341..b9c6cf5d56a 100644
--- a/src/mame/machine/playch10.cpp
+++ b/src/mame/machine/playch10.cpp
@@ -47,12 +47,12 @@ void playch10_state::machine_start()
machine().device("ppu")->memory().space(AS_PROGRAM).install_readwrite_handler(0, 0x1fff, read8_delegate(FUNC(playch10_state::pc10_chr_r),this), write8_delegate(FUNC(playch10_state::pc10_chr_w),this));
machine().device("ppu")->memory().space(AS_PROGRAM).install_readwrite_handler(0x2000, 0x3eff, read8_delegate(FUNC(playch10_state::pc10_nt_r),this),write8_delegate(FUNC(playch10_state::pc10_nt_w),this));
- if (NULL != m_vram)
+ if (nullptr != m_vram)
set_videoram_bank(0, 8, 0, 8);
else pc10_set_videorom_bank(0, 8, 0, 8);
nvram_device *nvram = machine().device<nvram_device>("nvram");
- if (nvram != NULL)
+ if (nvram != nullptr)
nvram->set_base(memregion("cart" )->base() + 0x6000, 0x1000);
}
@@ -387,7 +387,7 @@ void playch10_state::set_videoram_bank( int first, int count, int bank, int size
DRIVER_INIT_MEMBER(playch10_state,playch10)
{
- m_vram = NULL;
+ m_vram = nullptr;
/* set the controller to default */
m_pc10_gun_controller = 0;
@@ -410,7 +410,7 @@ DRIVER_INIT_MEMBER(playch10_state,pc_gun)
DRIVER_INIT_CALL(playch10);
/* we have no vram, make sure switching games doesn't point to an old allocation */
- m_vram = NULL;
+ m_vram = nullptr;
/* set the control type */
m_pc10_gun_controller = 1;
@@ -567,7 +567,7 @@ DRIVER_INIT_MEMBER(playch10_state,pcaboard)
m_mirroring = PPU_MIRROR_VERT;
/* we have no vram, make sure switching games doesn't point to an old allocation */
- m_vram = NULL;
+ m_vram = nullptr;
}
/**********************************************************************************/
@@ -618,7 +618,7 @@ DRIVER_INIT_MEMBER(playch10_state,pccboard)
machine().device("cart")->memory().space(AS_PROGRAM).install_write_handler(0x6000, 0x6000, write8_delegate(FUNC(playch10_state::cboard_vrom_switch_w),this));
/* we have no vram, make sure switching games doesn't point to an old allocation */
- m_vram = NULL;
+ m_vram = nullptr;
/* common init */
DRIVER_INIT_CALL(playch10);
@@ -743,7 +743,7 @@ DRIVER_INIT_MEMBER(playch10_state,pceboard)
UINT8 *prg = memregion("cart")->base();
/* we have no vram, make sure switching games doesn't point to an old allocation */
- m_vram = NULL;
+ m_vram = nullptr;
/* We do manual banking, in case the code falls through */
/* Copy the initial banks */
@@ -771,7 +771,7 @@ DRIVER_INIT_MEMBER(playch10_state,pcfboard)
UINT32 len = memregion("cart")->bytes();
/* we have no vram, make sure switching games doesn't point to an old allocation */
- m_vram = NULL;
+ m_vram = nullptr;
/* We do manual banking, in case the code falls through */
/* Copy the initial banks */
@@ -793,7 +793,7 @@ DRIVER_INIT_MEMBER(playch10_state,pcfboard_2)
/* extra ram at $6000-$6fff */
machine().device("cart")->memory().space(AS_PROGRAM).install_ram(0x6000, 0x6fff);
- m_vram = NULL;
+ m_vram = nullptr;
/* common init */
DRIVER_INIT_CALL(pcfboard);
@@ -957,7 +957,7 @@ DRIVER_INIT_MEMBER(playch10_state,pcgboard)
{
ppu2c0x_device *ppu = machine().device<ppu2c0x_device>("ppu");
UINT8 *prg = memregion("cart")->base();
- m_vram = NULL;
+ m_vram = nullptr;
/* We do manual banking, in case the code falls through */
/* Copy the initial banks */
@@ -986,7 +986,7 @@ DRIVER_INIT_MEMBER(playch10_state,pcgboard)
DRIVER_INIT_MEMBER(playch10_state,pcgboard_type2)
{
- m_vram = NULL;
+ m_vram = nullptr;
/* common init */
DRIVER_INIT_CALL(pcgboard);
diff --git a/src/mame/machine/pmd85.cpp b/src/mame/machine/pmd85.cpp
index d5435443d26..df62cd75b69 100644
--- a/src/mame/machine/pmd85.cpp
+++ b/src/mame/machine/pmd85.cpp
@@ -402,7 +402,7 @@ WRITE8_MEMBER(pmd85_state::pmd85_ppi_2_portc_w)
READ8_MEMBER(pmd85_state::pmd85_ppi_3_porta_r)
{
- if (memregion("user1")->base() != NULL)
+ if (memregion("user1")->base() != nullptr)
return memregion("user1")->base()[m_ppi_port_outputs[3][1] | (m_ppi_port_outputs[3][2] << 8)];
else
return 0;
@@ -797,7 +797,7 @@ DRIVER_INIT_MEMBER(pmd85_state,mato)
}
for ( int i = 9; i < 16; i++ )
{
- m_io_port[i] = NULL;
+ m_io_port[i] = nullptr;
}
}
diff --git a/src/mame/machine/prof80mmu.cpp b/src/mame/machine/prof80mmu.cpp
index ebdccf33004..68bdabb7237 100644
--- a/src/mame/machine/prof80mmu.cpp
+++ b/src/mame/machine/prof80mmu.cpp
@@ -61,7 +61,7 @@ void prof80_mmu_device::device_start()
const address_space_config *prof80_mmu_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_PROGRAM) ? &m_program_space_config : NULL;
+ return (spacenum == AS_PROGRAM) ? &m_program_space_config : nullptr;
}
diff --git a/src/mame/machine/psion_pack.cpp b/src/mame/machine/psion_pack.cpp
index d5ca2da2324..eef4bdc4709 100644
--- a/src/mame/machine/psion_pack.cpp
+++ b/src/mame/machine/psion_pack.cpp
@@ -128,7 +128,7 @@ void datapack_device::update()
if ((m_control & DP_LINE_OUTPUT_ENABLE) && !(m_control & DP_LINE_RESET))
{
// write data
- if (software_entry() == NULL && (m_id & DP_ID_WRITE))
+ if (software_entry() == nullptr && (m_id & DP_ID_WRITE))
{
fseek(pack_addr + OPK_HEAD_SIZE, SEEK_SET);
fwrite(&m_data, 1);
@@ -164,7 +164,7 @@ void datapack_device::update()
else if (!(m_control & DP_LINE_OUTPUT_ENABLE) && (m_control & DP_LINE_RESET))
{
// read datapack ID
- if ((m_id & DP_ID_EPROM) || software_entry() != NULL)
+ if ((m_id & DP_ID_EPROM) || software_entry() != nullptr)
m_data = m_id;
else
m_data = 0x01; // for identify RAM pack
@@ -282,7 +282,7 @@ bool datapack_device::call_create(int format_type, option_resolution *create_arg
{
static const UINT8 opk_head[6] = {'O', 'P', 'K', 0x00, 0x00, 0x00};
- if (create_args != NULL)
+ if (create_args != nullptr)
{
m_id = 0x40;
m_id |= (option_resolution_lookup_int(create_args, 'R')) ? 0x00 : 0x02;
diff --git a/src/mame/machine/psxcd.cpp b/src/mame/machine/psxcd.cpp
index 5ee9eaee9dd..552ad78b3e4 100644
--- a/src/mame/machine/psxcd.cpp
+++ b/src/mame/machine/psxcd.cpp
@@ -108,7 +108,7 @@ void psxcd_device::device_start()
m_sysclock = sysclk;
- res_queue = NULL;
+ res_queue = nullptr;
rdp = 0;
status=status_shellopen;
mode=0;
@@ -171,7 +171,7 @@ void psxcd_device::device_reset()
}
open = true;
if(m_cdrom_handle)
- add_system_event(event_change_disk, m_sysclock, NULL);
+ add_system_event(event_change_disk, m_sysclock, nullptr);
while(res_queue)
{
@@ -188,7 +188,7 @@ void psxcd_device::device_reset()
m_cursec = 0;
m_mute = false;
m_dmaload = false;
- m_int1 = NULL;
+ m_int1 = nullptr;
curpos.w = 0;
}
@@ -197,7 +197,7 @@ bool psxcd_device::call_load()
bool ret = cdrom_image_device::call_load();
open = true;
if(ret == IMAGE_INIT_PASS)
- add_system_event(event_change_disk, m_sysclock, NULL); // 1 sec to spin up the disk
+ add_system_event(event_change_disk, m_sysclock, nullptr); // 1 sec to spin up the disk
return ret;
}
@@ -361,7 +361,7 @@ WRITE8_MEMBER( psxcd_device::write )
{
command_result *res = res_queue;
if(res == m_int1)
- m_int1 = NULL;
+ m_int1 = nullptr;
res_queue = res->next;
global_free(res);
@@ -508,7 +508,7 @@ void psxcd_device::cdcmd_readn()
start_read();
} else
{
- send_result(intr_diskerror, NULL, 0, 0x80);
+ send_result(intr_diskerror, nullptr, 0, 0x80);
}
}
@@ -671,7 +671,7 @@ void psxcd_device::cdcmd_gettn()
}
else
{
- send_result(intr_diskerror, NULL, 0, 0x80);
+ send_result(intr_diskerror, nullptr, 0, 0x80);
}
}
@@ -700,7 +700,7 @@ void psxcd_device::cdcmd_gettd()
}
else
{
- send_result(intr_diskerror, NULL, 0, 0x80);
+ send_result(intr_diskerror, nullptr, 0, 0x80);
}
}
@@ -744,7 +744,7 @@ void psxcd_device::cdcmd_test()
default:
verboselog(*this, 0, "psxcd: unimplemented test cmd %02x\n", cmdbuf[0]);
- cmd_complete(prepare_result(intr_diskerror, NULL, 0, 0x10));
+ cmd_complete(prepare_result(intr_diskerror, nullptr, 0, 0x10));
break;
}
}
@@ -779,7 +779,7 @@ void psxcd_device::cdcmd_id()
}
else
{
- send_result(intr_diskerror, NULL, 0, 0x80);
+ send_result(intr_diskerror, nullptr, 0, 0x80);
}
}
@@ -795,7 +795,7 @@ void psxcd_device::cdcmd_reads()
start_read();
} else
{
- send_result(intr_diskerror, NULL, 0, 0x80);
+ send_result(intr_diskerror, nullptr, 0, 0x80);
}
}
@@ -809,7 +809,7 @@ void psxcd_device::cdcmd_readtoc()
verboselog(*this, 1, "psxcd: readtoc\n");
send_result(intr_complete);
- send_result(intr_acknowledge, NULL, 0, default_irq_delay*3); // ?
+ send_result(intr_acknowledge, nullptr, 0, default_irq_delay*3); // ?
}
void psxcd_device::cdcmd_unknown12()
@@ -819,7 +819,7 @@ void psxcd_device::cdcmd_unknown12()
if(cmdbuf[0] == 1)
send_result(intr_complete);
else
- send_result(intr_diskerror, NULL, 0, 0x40);
+ send_result(intr_diskerror, nullptr, 0, 0x40);
}
void psxcd_device::cdcmd_illegal17()
@@ -841,7 +841,7 @@ void psxcd_device::illegalcmd(UINT8 cmd)
{
verboselog(*this, 0, "psxcd: unimplemented cd command %02x\n", cmd);
- send_result(intr_diskerror, NULL, 0, 0x40);
+ send_result(intr_diskerror, nullptr, 0, 0x40);
}
void psxcd_device::cmd_complete(command_result *res)
@@ -863,12 +863,12 @@ void psxcd_device::cmd_complete(command_result *res)
m_irq_handler(1);
m_regs.sr |= 0x20;
}
- res->next = NULL;
+ res->next = nullptr;
}
psxcd_device::command_result *psxcd_device::prepare_result(UINT8 res, UINT8 *data, int sz, UINT8 errcode)
{
- command_result *cr=global_alloc(command_result);
+ auto cr=global_alloc(command_result);
cr->res=res;
if (sz)
@@ -1008,7 +1008,7 @@ void psxcd_device::read_sector()
next_sector_t+=cyc;
- next_read_event = add_system_event(event_read_sector, cyc, NULL);
+ next_read_event = add_system_event(event_read_sector, cyc, nullptr);
} else
{
verboselog(*this, 1, "psxcd: autopause xa\n");
@@ -1073,7 +1073,7 @@ void psxcd_device::play_sector()
if ((mode&mode_report) && !(sector & 15)) // slow the int rate
{
- command_result *res=global_alloc(command_result);
+ auto res=global_alloc(command_result);
UINT8 track = cdrom_get_track(m_cdrom_handle, sector) + 1;
res->res=intr_dataready;
@@ -1105,7 +1105,7 @@ void psxcd_device::play_sector()
next_sector_t+=cyc>>1;
- next_read_event = add_system_event(event_play_sector, next_sector_t - m_maincpu->total_cycles(), NULL);
+ next_read_event = add_system_event(event_play_sector, next_sector_t - m_maincpu->total_cycles(), nullptr);
}
}
@@ -1118,7 +1118,7 @@ void psxcd_device::start_read()
if(!(mode & mode_cdda) && (cdrom_get_track_type(m_cdrom_handle, cdrom_get_track(m_cdrom_handle, sector + 150)) == CD_TRACK_AUDIO))
{
stop_read();
- cmd_complete(prepare_result(intr_diskerror, NULL, 0, 0x40));
+ cmd_complete(prepare_result(intr_diskerror, nullptr, 0, 0x40));
return;
}
send_result(intr_complete);
@@ -1134,7 +1134,7 @@ void psxcd_device::start_read()
systime+=start_read_delay;
next_sector_t=systime+cyc;
- next_read_event = add_system_event(event_read_sector, start_read_delay+preread_delay, NULL);
+ next_read_event = add_system_event(event_read_sector, start_read_delay+preread_delay, nullptr);
}
void psxcd_device::start_play()
@@ -1160,7 +1160,7 @@ void psxcd_device::start_play()
next_sector_t+=cyc>>1;
- next_read_event = add_system_event(event_play_sector, next_sector_t - m_maincpu->total_cycles(), NULL);
+ next_read_event = add_system_event(event_play_sector, next_sector_t - m_maincpu->total_cycles(), nullptr);
}
void psxcd_device::stop_read()
diff --git a/src/mame/machine/psxcd.h b/src/mame/machine/psxcd.h
index be11fbdbdd6..2d9a24e7310 100644
--- a/src/mame/machine/psxcd.h
+++ b/src/mame/machine/psxcd.h
@@ -90,8 +90,8 @@ private:
void illegalcmd(UINT8 cmd);
void cmd_complete(command_result *res);
- void send_result(UINT8 res, UINT8 *data=NULL, int sz=0, int delay=default_irq_delay, UINT8 errcode = 0);
- command_result *prepare_result(UINT8 res, UINT8 *data=NULL, int sz=0, UINT8 errcode = 0);
+ void send_result(UINT8 res, UINT8 *data=nullptr, int sz=0, int delay=default_irq_delay, UINT8 errcode = 0);
+ command_result *prepare_result(UINT8 res, UINT8 *data=nullptr, int sz=0, UINT8 errcode = 0);
void start_read();
void start_play();
diff --git a/src/mame/machine/rm380z.cpp b/src/mame/machine/rm380z.cpp
index 082dbf6ff75..68636e54262 100644
--- a/src/mame/machine/rm380z.cpp
+++ b/src/mame/machine/rm380z.cpp
@@ -210,7 +210,7 @@ WRITE8_MEMBER( rm380z_state::keyboard_put )
WRITE8_MEMBER( rm380z_state::disk_0_control )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
diff --git a/src/mame/machine/rmnimbus.cpp b/src/mame/machine/rmnimbus.cpp
index ef41cc828ec..e2a5e3a2738 100644
--- a/src/mame/machine/rmnimbus.cpp
+++ b/src/mame/machine/rmnimbus.cpp
@@ -266,7 +266,7 @@ static int instruction_hook(device_t &device, offs_t curpc)
addr_ptr = (UINT8*)space.get_read_ptr(curpc);
- if ((addr_ptr !=NULL) && (addr_ptr[0]==0xCD))
+ if ((addr_ptr !=nullptr) && (addr_ptr[0]==0xCD))
{
if(DEBUG_SET_STATE(DECODE_BIOS) && (addr_ptr[1]==0xF0))
{
@@ -293,7 +293,7 @@ static void decode_subbios(device_t *device,offs_t pc, UINT8 raw_flag)
char drv_str[80];
char func_str[80];
- void (*dump_dssi)(device_t *,UINT16, UINT16 ,UINT8) = NULL;
+ void (*dump_dssi)(device_t *,UINT16, UINT16 ,UINT8) = nullptr;
device_t *cpu = device->machine().device(MAINCPU_TAG);
@@ -614,14 +614,14 @@ static void decode_subbios(device_t *device,offs_t pc, UINT8 raw_flag)
if(raw_flag)
{
- if(dump_dssi!=NULL)
+ if(dump_dssi!=nullptr)
dump_dssi(device,ds,si,raw_flag);
}
else
{
device->logerror("Type=%s, Driver=%s, Function=%s\n",type_str,drv_str,func_str);
- if(dump_dssi!=NULL)
+ if(dump_dssi!=nullptr)
dump_dssi(device,ds,si,raw_flag);
device->logerror("=======================================================================\n");
}
@@ -937,8 +937,8 @@ void rmnimbus_state::nimbus_bank_memory()
}
map_blocks[0] = ram;
- map_blocks[1] = (ramblocks[ramblock][1].blocksize==0) ? NULL : &ram[ramblocks[ramblock][1].blockbase*1024];
- map_blocks[2] = (ramblocks[ramblock][2].blocksize==0) ? NULL : &ram[ramblocks[ramblock][2].blockbase*1024];
+ map_blocks[1] = (ramblocks[ramblock][1].blocksize==0) ? nullptr : &ram[ramblocks[ramblock][1].blockbase*1024];
+ map_blocks[2] = (ramblocks[ramblock][2].blocksize==0) ? nullptr : &ram[ramblocks[ramblock][2].blockbase*1024];
//if(LOG_RAM) logerror("\n\nmcu_reg080=%02X, ramblock=%d, map_blocks[0]=%X, map_blocks[1]=%X, map_blocks[2]=%X\n",m_mcu_reg080,ramblock,(int)map_blocks[0],(int)map_blocks[1],(int)map_blocks[2]);
@@ -960,7 +960,7 @@ void rmnimbus_state::nimbus_bank_memory()
if(LOG_RAM) logerror("mapped %s",bank);
if((map_blockno>-1) && (block_ofs < ramblocks[ramblock][map_blockno].blocksize) &&
- (map_blocks[map_blockno]!=NULL))
+ (map_blocks[map_blockno]!=nullptr))
{
map_base=(ramsel==0x07) ? map_blocks[map_blockno] : &map_blocks[map_blockno][block_ofs*1024];
diff --git a/src/mame/machine/rx01.cpp b/src/mame/machine/rx01.cpp
index e916be7a1fb..b4cb85869ea 100644
--- a/src/mame/machine/rx01.cpp
+++ b/src/mame/machine/rx01.cpp
@@ -17,7 +17,7 @@
#include "formats/basicdsk.h"
static LEGACY_FLOPPY_OPTIONS_START( rx01 )
- LEGACY_FLOPPY_OPTION(rx01, "img", "RX01 image", basicdsk_identify_default, basicdsk_construct_default, NULL,
+ LEGACY_FLOPPY_OPTION(rx01, "img", "RX01 image", basicdsk_identify_default, basicdsk_construct_default, nullptr,
HEADS([1])
TRACKS([77])
SECTORS([26])
@@ -80,11 +80,11 @@ void rx01_device::device_start()
void rx01_device::device_reset()
{
- for(int i=0;i<2;i++)
+ for(auto & elem : m_image)
{
- m_image[i]->floppy_mon_w(0); // turn it on
- m_image[i]->floppy_drive_set_controller(this);
- m_image[i]->floppy_drive_set_rpm(360.);
+ elem->floppy_mon_w(0); // turn it on
+ elem->floppy_drive_set_controller(this);
+ elem->floppy_drive_set_rpm(360.);
}
m_rxes = 0;
m_rxcs = 0;
diff --git a/src/mame/machine/samcoupe.cpp b/src/mame/machine/samcoupe.cpp
index 682d81d906c..15e814c659e 100644
--- a/src/mame/machine/samcoupe.cpp
+++ b/src/mame/machine/samcoupe.cpp
@@ -87,7 +87,7 @@ void samcoupe_state::samcoupe_update_bank(address_space &space, int bank_num, UI
if (!is_readonly)
sam_bank_write_ptr[bank_num-1] = memory;
else
- sam_bank_write_ptr[bank_num-1] = NULL;
+ sam_bank_write_ptr[bank_num-1] = nullptr;
// installing banks on the fly is too slow (20% speed in Manic Miner gameplay vs 300% speed)
#if 0
@@ -117,7 +117,7 @@ void samcoupe_state::samcoupe_install_ext_mem(address_space &space)
if (m_lext >> 6 < m_ram->size() >> 20)
mem = &m_ram->pointer()[(m_ram->size() & 0xfffff) + (m_lext >> 6) * 0x100000 + (m_lext & 0x3f) * 0x4000];
else
- mem = NULL;
+ mem = nullptr;
samcoupe_update_bank(space, 3, mem, FALSE);
@@ -125,7 +125,7 @@ void samcoupe_state::samcoupe_install_ext_mem(address_space &space)
if (m_hext >> 6 < m_ram->size() >> 20)
mem = &m_ram->pointer()[(m_ram->size() & 0xfffff) + (m_hext >> 6) * 0x100000 + (m_hext & 0x3f) * 0x4000];
else
- mem = NULL;
+ mem = nullptr;
samcoupe_update_bank(space, 4, mem, FALSE);
}
@@ -144,7 +144,7 @@ void samcoupe_state::samcoupe_update_memory(address_space &space)
if ((m_lmpr & 0x1F) <= PAGE_MASK)
memory = &m_ram->pointer()[(m_lmpr & PAGE_MASK) * 0x4000];
else
- memory = NULL; /* Attempt to page in non existant ram region */
+ memory = nullptr; /* Attempt to page in non existant ram region */
is_readonly = FALSE;
}
else
@@ -159,7 +159,7 @@ void samcoupe_state::samcoupe_update_memory(address_space &space)
if (((m_lmpr + 1) & 0x1f) <= PAGE_MASK)
memory = &m_ram->pointer()[((m_lmpr + 1) & PAGE_MASK) * 0x4000];
else
- memory = NULL; /* Attempt to page in non existant ram region */
+ memory = nullptr; /* Attempt to page in non existant ram region */
samcoupe_update_bank(space, 2, memory, FALSE);
/* only update bank 3 and 4 when external memory is not enabled */
@@ -173,7 +173,7 @@ void samcoupe_state::samcoupe_update_memory(address_space &space)
if ((m_hmpr & 0x1F) <= PAGE_MASK )
memory = &m_ram->pointer()[(m_hmpr & PAGE_MASK)*0x4000];
else
- memory = NULL; /* Attempt to page in non existant ram region */
+ memory = nullptr; /* Attempt to page in non existant ram region */
samcoupe_update_bank(space, 3, memory, FALSE);
@@ -188,7 +188,7 @@ void samcoupe_state::samcoupe_update_memory(address_space &space)
if (((m_hmpr + 1) & 0x1f) <= PAGE_MASK)
memory = &m_ram->pointer()[((m_hmpr + 1) & PAGE_MASK) * 0x4000];
else
- memory = NULL; /* Attempt to page in non existant ram region */
+ memory = nullptr; /* Attempt to page in non existant ram region */
is_readonly = FALSE;
}
samcoupe_update_bank(space, 4, memory, FALSE);
diff --git a/src/mame/machine/scramble.cpp b/src/mame/machine/scramble.cpp
index b0db1e359e5..af667349e1c 100644
--- a/src/mame/machine/scramble.cpp
+++ b/src/mame/machine/scramble.cpp
@@ -19,7 +19,7 @@ MACHINE_RESET_MEMBER(scramble_state,scramble)
{
MACHINE_RESET_CALL_MEMBER(galaxold);
- if (m_audiocpu != NULL)
+ if (m_audiocpu != nullptr)
sh_init();
}
diff --git a/src/mame/machine/segaic16.cpp b/src/mame/machine/segaic16.cpp
index 36e9d31ffe8..3d807412a56 100644
--- a/src/mame/machine/segaic16.cpp
+++ b/src/mame/machine/segaic16.cpp
@@ -110,16 +110,16 @@ void sega_16bit_common_base::palette_init()
double weights_normal[6];
compute_resistor_weights(0, 255, -1.0,
6, resistances_normal, weights_normal, 0, 0,
- 0, NULL, NULL, 0, 0,
- 0, NULL, NULL, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
// compute weight table for shadow/hilight palette entries
static const int resistances_sh[6] = { 3900, 2000, 1000, 1000/2, 1000/4, 470 };
double weights_sh[6];
compute_resistor_weights(0, 255, -1.0,
6, resistances_sh, weights_sh, 0, 0,
- 0, NULL, NULL, 0, 0,
- 0, NULL, NULL, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
// compute R, G, B for each weight
for (int value = 0; value < 32; value++)
@@ -176,10 +176,10 @@ WRITE16_MEMBER( sega_16bit_common_base::paletteram_w )
sega_315_5195_mapper_device::sega_315_5195_mapper_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SEGA_315_5195_MEM_MAPPER, "Sega 315-5195 Memory Mapper", tag, owner, clock, "sega_315_5195", __FILE__),
- m_cputag(NULL),
- m_cpu(NULL),
- m_space(NULL),
- m_decrypted_space(NULL),
+ m_cputag(nullptr),
+ m_cpu(nullptr),
+ m_space(nullptr),
+ m_decrypted_space(nullptr),
m_curregion(0)
{
}
@@ -487,8 +487,8 @@ void sega_315_5195_mapper_device::configure_explicit(const UINT8 *map_data)
void sega_315_5195_mapper_device::fd1094_state_change(UINT8 state)
{
// iterate over regions and set the decrypted address of any ROM banks
- for (int index = 0; index < ARRAY_LENGTH(m_banks); index++)
- m_banks[index].update();
+ for (auto & elem : m_banks)
+ elem.update();
}
@@ -505,30 +505,30 @@ void sega_315_5195_mapper_device::device_start()
// find our CPU
m_cpu = siblingdevice<m68000_device>(m_cputag);
- if (m_cpu == NULL)
+ if (m_cpu == nullptr)
throw emu_fatalerror("Unable to find sibling device '%s'", m_cputag);
// if we are mapping an FD1089, tell all the banks
fd1089_base_device *fd1089 = dynamic_cast<fd1089_base_device *>(m_cpu);
- if (fd1089 != NULL)
- for (int banknum = 0; banknum < ARRAY_LENGTH(m_banks); banknum++)
- m_banks[banknum].set_decrypt(fd1089);
+ if (fd1089 != nullptr)
+ for (auto & elem : m_banks)
+ elem.set_decrypt(fd1089);
// if we are mapping an FD1094, register for state change notifications and tell all the banks
fd1094_device *fd1094 = dynamic_cast<fd1094_device *>(m_cpu);
- if (fd1094 != NULL)
+ if (fd1094 != nullptr)
{
fd1094->notify_state_change(fd1094_device::state_change_delegate(FUNC(sega_315_5195_mapper_device::fd1094_state_change), this));
- for (int banknum = 0; banknum < ARRAY_LENGTH(m_banks); banknum++)
- m_banks[banknum].set_decrypt(fd1094);
+ for (auto & elem : m_banks)
+ elem.set_decrypt(fd1094);
}
// find the address space that is to be mapped
m_space = &m_cpu->space(AS_PROGRAM);
- if (m_space == NULL)
+ if (m_space == nullptr)
throw emu_fatalerror("Unable to find program address space on device '%s'", m_cputag);
- m_decrypted_space = m_cpu->has_space(AS_DECRYPTED_OPCODES) ? &m_cpu->space(AS_DECRYPTED_OPCODES) : NULL;
+ m_decrypted_space = m_cpu->has_space(AS_DECRYPTED_OPCODES) ? &m_cpu->space(AS_DECRYPTED_OPCODES) : nullptr;
// register for saves
save_item(NAME(m_regs));
@@ -602,13 +602,13 @@ void sega_315_5195_mapper_device::update_mapping()
//-------------------------------------------------
sega_315_5195_mapper_device::decrypt_bank::decrypt_bank()
- : m_bank(NULL),
- m_decrypted_bank(NULL),
+ : m_bank(nullptr),
+ m_decrypted_bank(nullptr),
m_start(0),
m_end(0),
m_rgnoffs(~0),
- m_srcptr(NULL),
- m_fd1089(NULL)
+ m_srcptr(nullptr),
+ m_fd1089(nullptr)
{
// invalidate all states
reset();
@@ -644,7 +644,7 @@ void sega_315_5195_mapper_device::decrypt_bank::set_decrypt(fd1094_device *fd109
m_fd1094_cache = std::make_unique<fd1094_decryption_cache>(*fd1094);
// clear out all fd1089 stuff
- m_fd1089 = NULL;
+ m_fd1089 = nullptr;
m_fd1089_decrypted.clear();
}
@@ -657,7 +657,7 @@ void sega_315_5195_mapper_device::decrypt_bank::set_decrypt(fd1094_device *fd109
void sega_315_5195_mapper_device::decrypt_bank::set(memory_bank *bank, memory_bank *decrypted_bank, offs_t start, offs_t end, offs_t rgnoffs, UINT8 *src)
{
// ignore if not encrypted
- if (m_fd1089 == NULL && m_fd1094_cache == NULL)
+ if (m_fd1089 == nullptr && m_fd1094_cache == nullptr)
return;
// ignore if nothing is changing
@@ -676,7 +676,7 @@ void sega_315_5195_mapper_device::decrypt_bank::set(memory_bank *bank, memory_ba
m_srcptr = src;
// configure the fd1094 cache
- if (m_fd1094_cache != NULL)
+ if (m_fd1094_cache != nullptr)
m_fd1094_cache->configure(m_start, m_end + 1 - m_start, m_rgnoffs);
// force an update of what we have
@@ -692,11 +692,11 @@ void sega_315_5195_mapper_device::decrypt_bank::set(memory_bank *bank, memory_ba
void sega_315_5195_mapper_device::decrypt_bank::update()
{
// if this isn't a valid state, don't try to do anything
- if (m_bank == NULL || m_srcptr == NULL)
+ if (m_bank == nullptr || m_srcptr == nullptr)
return;
// fd1089 case
- if (m_fd1089 != NULL)
+ if (m_fd1089 != nullptr)
{
m_fd1089_decrypted.resize((m_end + 1 - m_start) / 2);
m_fd1089->decrypt(m_start, m_end + 1 - m_start, m_rgnoffs, &m_fd1089_decrypted[0], reinterpret_cast<UINT16 *>(m_srcptr));
@@ -704,7 +704,7 @@ void sega_315_5195_mapper_device::decrypt_bank::update()
}
// fd1094 case
- if (m_fd1094_cache != NULL)
+ if (m_fd1094_cache != nullptr)
m_decrypted_bank->set_base(m_fd1094_cache->decrypted_opcodes(m_fd1094_cache->fd1094().state()));
}
diff --git a/src/mame/machine/segaic16.h b/src/mame/machine/segaic16.h
index cc2a2d73c26..6e98d8b7688 100644
--- a/src/mame/machine/segaic16.h
+++ b/src/mame/machine/segaic16.h
@@ -135,12 +135,12 @@ private:
// configuration
void set_decrypt(fd1089_base_device *fd1089);
void set_decrypt(fd1094_device *fd1094);
- void clear() { set(NULL, NULL, 0, 0, ~0, NULL); }
+ void clear() { set(nullptr, nullptr, 0, 0, ~0, nullptr); }
void set(memory_bank *bank, memory_bank *decrypted_bank, offs_t start, offs_t end, offs_t rgnoffs, UINT8 *src);
// updating
void update();
- void reset() { m_fd1089_decrypted.clear(); if (m_fd1094_cache != NULL) m_fd1094_cache->reset(); }
+ void reset() { m_fd1089_decrypted.clear(); if (m_fd1094_cache != nullptr) m_fd1094_cache->reset(); }
private:
// internal state
diff --git a/src/mame/machine/seicop.cpp b/src/mame/machine/seicop.cpp
index f5868cb6c9a..d5640aa6881 100644
--- a/src/mame/machine/seicop.cpp
+++ b/src/mame/machine/seicop.cpp
@@ -24,7 +24,7 @@ const device_type SEIBU_COP_BOOTLEG = &device_creator<seibu_cop_bootleg_device>;
seibu_cop_bootleg_device::seibu_cop_bootleg_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SEIBU_COP_BOOTLEG, "Seibu COP (Bootleg)", tag, owner, clock, "seibu_cop_boot", __FILE__),
- m_cop_mcu_ram(NULL),
+ m_cop_mcu_ram(nullptr),
m_raiden2cop(*this, ":raiden2cop")
{
}
diff --git a/src/mame/machine/sgi.cpp b/src/mame/machine/sgi.cpp
index 797f27eb58b..fe2259b5219 100644
--- a/src/mame/machine/sgi.cpp
+++ b/src/mame/machine/sgi.cpp
@@ -32,7 +32,7 @@ const device_type SGI_MC = &device_creator<sgi_mc_device>;
sgi_mc_device::sgi_mc_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, SGI_MC, "SGI Memory Controller", tag, owner, clock, "sgi_mc", __FILE__),
- m_tUpdateTimer(NULL),
+ m_tUpdateTimer(nullptr),
m_nCPUControl0(0),
m_nCPUControl1(0),
m_nWatchdog(0),
diff --git a/src/mame/machine/slapstic.cpp b/src/mame/machine/slapstic.cpp
index 5adf0c91d7f..4ff2fe4a2e3 100644
--- a/src/mame/machine/slapstic.cpp
+++ b/src/mame/machine/slapstic.cpp
@@ -716,7 +716,7 @@ static const struct slapstic_data slapstic118 =
static const struct slapstic_data *const slapstic_table[] =
{
&slapstic101, /* NOT confirmed! */
- NULL, /* never seen */
+ nullptr, /* never seen */
&slapstic103,
&slapstic104,
&slapstic105,
diff --git a/src/mame/machine/smartmed.cpp b/src/mame/machine/smartmed.cpp
index 32e9c53bcaa..b3147c49316 100644
--- a/src/mame/machine/smartmed.cpp
+++ b/src/mame/machine/smartmed.cpp
@@ -78,7 +78,7 @@ nand_device::nand_device(const machine_config &mconfig, const char *tag, device_
m_page_total_size(0),
m_num_pages(0),
m_log2_pages_per_block(0),
- m_pagereg(NULL),
+ m_pagereg(nullptr),
m_id_len(0),
m_col_address_cycles(0),
m_row_address_cycles(0),
@@ -94,7 +94,7 @@ nand_device::nand_device(const machine_config &mconfig, device_type type, const
m_page_total_size(0),
m_num_pages(0),
m_log2_pages_per_block(0),
- m_pagereg(NULL),
+ m_pagereg(nullptr),
m_id_len(0),
m_col_address_cycles(0),
m_row_address_cycles(0),
@@ -109,8 +109,8 @@ nand_device::nand_device(const machine_config &mconfig, device_type type, const
*/
void nand_device::device_start()
{
- m_data_ptr = NULL;
- m_data_uid_ptr = NULL;
+ m_data_ptr = nullptr;
+ m_data_uid_ptr = nullptr;
m_mode = SM_M_INIT;
m_pointer_mode = SM_PM_A;
m_page_addr = 0;
@@ -335,8 +335,8 @@ void smartmedia_image_device::call_unload()
m_page_total_size = 0;
m_num_pages = 0;
m_log2_pages_per_block = 0;
- m_data_ptr = NULL;
- m_data_uid_ptr = NULL;
+ m_data_ptr = nullptr;
+ m_data_uid_ptr = nullptr;
m_mode = SM_M_INIT;
m_pointer_mode = SM_PM_A;
m_page_addr = 0;
diff --git a/src/mame/machine/smartmed.h b/src/mame/machine/smartmed.h
index 4f15cf35a0f..5e5b2f1c80d 100644
--- a/src/mame/machine/smartmed.h
+++ b/src/mame/machine/smartmed.h
@@ -215,7 +215,7 @@ public:
virtual bool is_reset_on_load() const { return 0; }
virtual const char *image_interface() const { return "sm_memc"; }
virtual const char *file_extensions() const { return "smc"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_load();
virtual void call_unload();
diff --git a/src/mame/machine/sms.cpp b/src/mame/machine/sms.cpp
index 32081091088..86fb9114bc0 100644
--- a/src/mame/machine/sms.cpp
+++ b/src/mame/machine/sms.cpp
@@ -854,9 +854,9 @@ void sms_state::setup_bios()
m_BIOS = memregion("user1")->base();
m_bios_page_count = (m_BIOS ? memregion("user1")->bytes() / 0x4000 : 0);
- if (m_BIOS == NULL || m_BIOS[0] == 0x00)
+ if (m_BIOS == nullptr || m_BIOS[0] == 0x00)
{
- m_BIOS = NULL;
+ m_BIOS = nullptr;
m_has_bios_0400 = 0;
m_has_bios_2000 = 0;
m_has_bios_full = 0;
@@ -890,7 +890,7 @@ MACHINE_START_MEMBER(sms_state,sms)
m_expslot = machine().device<sms_expansion_slot_device>("exp");
m_space = &m_maincpu->space(AS_PROGRAM);
- if (m_mainram == NULL)
+ if (m_mainram == nullptr)
{
m_mainram = auto_alloc_array_clear(machine(), UINT8, 0x2000);
save_pointer(NAME(m_mainram), 0x2000);
diff --git a/src/mame/machine/snes.cpp b/src/mame/machine/snes.cpp
index 30b125f94fa..9c4253906e2 100644
--- a/src/mame/machine/snes.cpp
+++ b/src/mame/machine/snes.cpp
@@ -1123,17 +1123,17 @@ void snes_state::machine_reset()
snes_init_ram();
/* init DMA regs to be 0xff */
- for (int i = 0; i < 8; i++)
+ for (auto & elem : m_dma_channel)
{
- m_dma_channel[i].dmap = 0xff;
- m_dma_channel[i].dest_addr = 0xff;
- m_dma_channel[i].src_addr = 0xffff;
- m_dma_channel[i].bank = 0xff;
- m_dma_channel[i].trans_size = 0xffff;
- m_dma_channel[i].ibank = 0xff;
- m_dma_channel[i].hdma_addr = 0xffff;
- m_dma_channel[i].hdma_line_counter = 0xff;
- m_dma_channel[i].unk = 0xff;
+ elem.dmap = 0xff;
+ elem.dest_addr = 0xff;
+ elem.src_addr = 0xffff;
+ elem.bank = 0xff;
+ elem.trans_size = 0xffff;
+ elem.ibank = 0xff;
+ elem.hdma_addr = 0xffff;
+ elem.hdma_line_counter = 0xff;
+ elem.unk = 0xff;
}
/* Set STAT78 to NTSC or PAL */
diff --git a/src/mame/machine/sonydriv.cpp b/src/mame/machine/sonydriv.cpp
index f53fcb77e20..3c70a4664e7 100644
--- a/src/mame/machine/sonydriv.cpp
+++ b/src/mame/machine/sonydriv.cpp
@@ -280,7 +280,7 @@ int sony_read_status(device_t *device)
f = &sony.floppy[sony.floppy_select];
cur_image = floppy_get_device_by_type(device->machine(), FLOPPY_TYPE_SONY, sony.floppy_select);
if (!cur_image->exists())
- cur_image = NULL;
+ cur_image = nullptr;
switch(action) {
case 0x00: /* Step direction */
@@ -416,7 +416,7 @@ static void sony_doaction(device_t *device)
f = &sony.floppy[sony.floppy_select];
cur_image = floppy_get_device_by_type(device->machine(), FLOPPY_TYPE_SONY, sony.floppy_select);
if (!cur_image->exists())
- cur_image = NULL;
+ cur_image = nullptr;
switch(action)
{
@@ -549,8 +549,8 @@ void sonydriv_floppy_image_device::device_start()
sony.floppy[1].is_fdhd = 0;
sony.floppy[0].is_400k = 0;
sony.floppy[1].is_400k = 0;
- sony.floppy[0].loadedtrack_data = NULL;
- sony.floppy[1].loadedtrack_data = NULL;
+ sony.floppy[0].loadedtrack_data = nullptr;
+ sony.floppy[1].loadedtrack_data = nullptr;
sony.floppy[0].head = 0;
sony.floppy[1].head = 0;
sony.rotation_speed = 0;
diff --git a/src/mame/machine/special.cpp b/src/mame/machine/special.cpp
index 4bbcdbf4dd9..bb1c7f64f31 100644
--- a/src/mame/machine/special.cpp
+++ b/src/mame/machine/special.cpp
@@ -244,7 +244,7 @@ WRITE_LINE_MEMBER( special_state::fdc_drq )
WRITE8_MEMBER( special_state::specimx_disk_ctrl_w )
{
static const char *names[] = { "fd0", "fd1"};
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
floppy_connector *con = machine().device<floppy_connector>(names[m_drive & 1]);
if(con)
floppy = con->get_device();
diff --git a/src/mame/machine/st0016.cpp b/src/mame/machine/st0016.cpp
index 5dcfb73fa0e..08959876e99 100644
--- a/src/mame/machine/st0016.cpp
+++ b/src/mame/machine/st0016.cpp
@@ -49,8 +49,8 @@ st0016_cpu_device::st0016_cpu_device(const machine_config &mconfig, const char *
m_palette(*this, "palette")
{
- for (int i = 0; i < 0xc0; i++)
- st0016_vregs[i] = 0;
+ for (auto & elem : st0016_vregs)
+ elem = 0;
}
@@ -587,7 +587,7 @@ void st0016_cpu_device::startup()
/* find first empty slot to decode gfx */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == 0)
+ if (m_gfxdecode->gfx(gfx_index) == nullptr)
break;
assert(gfx_index != MAX_GFX_ELEMENTS);
diff --git a/src/mame/machine/super80.cpp b/src/mame/machine/super80.cpp
index b77c04b68fd..27b6d614e7d 100644
--- a/src/mame/machine/super80.cpp
+++ b/src/mame/machine/super80.cpp
@@ -143,7 +143,7 @@ WRITE8_MEMBER( super80_state::port3f_w )
// m_fdc->58(BIT(data, 0)); 5/8 pin not emulated in wd_fdc
m_fdc->enmf_w(BIT(data,1));
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 2)) floppy = m_floppy0->get_device();
if (BIT(data, 3)) floppy = m_floppy1->get_device();
//if (BIT(data, 4)) floppy = m_floppy2->get_device();
diff --git a/src/mame/machine/svi318.cpp b/src/mame/machine/svi318.cpp
index 89ea87ce0e8..b34b6f381fc 100644
--- a/src/mame/machine/svi318.cpp
+++ b/src/mame/machine/svi318.cpp
@@ -63,7 +63,7 @@ DEVICE_IMAGE_LOAD_MEMBER( svi318_state, svi318_cart )
m_cart->rom_alloc(size, GENERIC_ROM8_WIDTH, ENDIANNESS_LITTLE);
m_cart->common_load_rom(m_cart->get_rom_base(), size, "rom");
- if (image.software_entry() == NULL && !cart_verify(m_cart->get_rom_base()))
+ if (image.software_entry() == nullptr && !cart_verify(m_cart->get_rom_base()))
return IMAGE_INIT_FAIL;
return IMAGE_INIT_PASS;
@@ -222,7 +222,7 @@ WRITE_LINE_MEMBER(svi318_state::fdc_drq_w)
WRITE8_MEMBER(svi318_state::fdc_drive_motor_w)
{
- m_floppy = NULL;
+ m_floppy = nullptr;
if (BIT(data, 0)) m_floppy = m_floppy0->get_device();
if (BIT(data, 1)) m_floppy = m_floppy1->get_device();
diff --git a/src/mame/machine/swtpc09.cpp b/src/mame/machine/swtpc09.cpp
index 29bae501462..71613a8b8ac 100644
--- a/src/mame/machine/swtpc09.cpp
+++ b/src/mame/machine/swtpc09.cpp
@@ -126,7 +126,7 @@ WRITE8_MEMBER ( swtpc09_state::dmf2_control_reg_w )
{
LOG(("swtpc09_dmf2_control_reg_w $%02X\n", data));
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (!BIT(data, 0)) floppy = m_floppy0->get_device();
if (!BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -354,7 +354,7 @@ WRITE8_MEMBER ( swtpc09_state::dmf3_control_reg_w )
{
LOG(("swtpc09_dmf3_control_reg_w $%02X\n", data));
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -378,7 +378,7 @@ WRITE8_MEMBER ( swtpc09_state::dc4_control_reg_w )
{
LOG(("swtpc09_dc4_control_reg_w $%02X\n", data));
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
diff --git a/src/mame/machine/tait8741.cpp b/src/mame/machine/tait8741.cpp
index c6485a90dda..5e568fbd6f1 100644
--- a/src/mame/machine/tait8741.cpp
+++ b/src/mame/machine/tait8741.cpp
@@ -127,7 +127,7 @@ void taito8741_4pack_device::update(int num)
st = &m_taito8741[num];
if( st->connect != -1 )
sst = &m_taito8741[st->connect];
- else sst = 0;
+ else sst = nullptr;
next = -1;
/* check pending command */
switch(st->phase)
@@ -381,15 +381,15 @@ void josvolly8741_4pack_device::device_reset()
{
m_nmi_enable = 0;
- for(int i=0;i<4;i++)
+ for(auto & elem : m_i8741)
{
- m_i8741[i].cmd = 0;
- m_i8741[i].sts = 0; // 0xf0; /* init flag */
- m_i8741[i].txd = 0;
- m_i8741[i].outport = 0xff;
- m_i8741[i].rxd = 0;
+ elem.cmd = 0;
+ elem.sts = 0; // 0xf0; /* init flag */
+ elem.txd = 0;
+ elem.outport = 0xff;
+ elem.rxd = 0;
- m_i8741[i].rst = 1;
+ elem.rst = 1;
}
}
diff --git a/src/mame/machine/taitoio.cpp b/src/mame/machine/taitoio.cpp
index 4b15fa06932..6d2bcadd9b0 100644
--- a/src/mame/machine/taitoio.cpp
+++ b/src/mame/machine/taitoio.cpp
@@ -90,8 +90,8 @@ void tc0220ioc_device::device_reset()
{
m_port = 0;
- for (int i = 0; i < 8; i++)
- m_regs[i] = 0;
+ for (auto & elem : m_regs)
+ elem = 0;
}
/*****************************************************************************
@@ -213,8 +213,8 @@ void tc0510nio_device::device_start()
void tc0510nio_device::device_reset()
{
- for (int i = 0; i < 8; i++)
- m_regs[i] = 0;
+ for (auto & elem : m_regs)
+ elem = 0;
}
/*****************************************************************************
@@ -340,8 +340,8 @@ void tc0640fio_device::device_start()
void tc0640fio_device::device_reset()
{
- for (int i = 0; i < 8; i++)
- m_regs[i] = 0;
+ for (auto & elem : m_regs)
+ elem = 0;
}
diff --git a/src/mame/machine/taitosj.cpp b/src/mame/machine/taitosj.cpp
index 890f66f3393..f32f2fc83df 100644
--- a/src/mame/machine/taitosj.cpp
+++ b/src/mame/machine/taitosj.cpp
@@ -47,7 +47,7 @@ void taitosj_state::machine_reset()
m_zaccept = 1;
m_zready = 0;
m_busreq = 0;
- if (m_mcu != NULL)
+ if (m_mcu != nullptr)
m_mcu->set_input_line(0, CLEAR_LINE);
m_spacecr_prot_value = 0;
diff --git a/src/mame/machine/thomflop.cpp b/src/mame/machine/thomflop.cpp
index 3927f7219af..6252d2ec48a 100644
--- a/src/mame/machine/thomflop.cpp
+++ b/src/mame/machine/thomflop.cpp
@@ -296,7 +296,7 @@ WRITE8_MEMBER( thomson_state::to7_5p14_w )
else if ( offset == 8 )
{
/* drive select */
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 1)) floppy = fdc->subdevice<floppy_connector>("0")->get_device();
if (BIT(data, 2)) floppy = fdc->subdevice<floppy_connector>("1")->get_device();
@@ -925,7 +925,7 @@ legacy_floppy_image_device * thomson_state::thmfc_floppy_image()
int thomson_state::thmfc_floppy_is_qdd ( legacy_floppy_image_device *image )
{
- if (image==NULL) return 0;
+ if (image==nullptr) return 0;
if (!image->exists()) return 0;
return image->length()==51200; // idf QDD
}
@@ -1894,18 +1894,18 @@ void thomson_state::thomson_index_callback(legacy_floppy_image_device *device, i
switch ( to7_controller_type )
{
case 1:
- to7_5p14_index_pulse_callback(NULL, device, state);
+ to7_5p14_index_pulse_callback(nullptr, device, state);
break;
case 2:
break;
case 3:
- thmfc_floppy_index_pulse_cb(NULL, device, state);
+ thmfc_floppy_index_pulse_cb(nullptr, device, state);
break;
case 4:
- to7_qdd_index_pulse_cb(NULL, device, state);
+ to7_qdd_index_pulse_cb(nullptr, device, state);
break;
default:
diff --git a/src/mame/machine/thomson.cpp b/src/mame/machine/thomson.cpp
index 240b004141a..b7deec216ee 100644
--- a/src/mame/machine/thomson.cpp
+++ b/src/mame/machine/thomson.cpp
@@ -363,7 +363,7 @@ DEVICE_IMAGE_LOAD_MEMBER( thomson_state, to7_cartridge )
offs_t size;
char name[129];
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
size = image.length();
else
size = image.get_software_region_length("rom");
@@ -383,7 +383,7 @@ DEVICE_IMAGE_LOAD_MEMBER( thomson_state, to7_cartridge )
return IMAGE_INIT_FAIL;
}
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
if ( image.fread( pos, size ) != size )
{
@@ -631,7 +631,7 @@ static MACHINE_CONFIG_FRAGMENT( to7_io_line )
MCFG_PIA_IRQA_HANDLER(DEVWRITELINE("^", thomson_state, thom_firq_1))
MCFG_PIA_IRQB_HANDLER(DEVWRITELINE("^", thomson_state, thom_firq_1))
- MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, NULL)
+ MCFG_RS232_PORT_ADD("rs232", default_rs232_devices, nullptr)
MCFG_RS232_RXD_HANDLER(WRITELINE(to7_io_line_device, write_rxd))
MCFG_RS232_CTS_HANDLER(WRITELINE(to7_io_line_device, write_cts))
MCFG_RS232_DSR_HANDLER(WRITELINE(to7_io_line_device, write_dsr))
@@ -1494,7 +1494,7 @@ DEVICE_IMAGE_LOAD_MEMBER( thomson_state, mo5_cartridge )
int j;
char name[129];
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
size = image.length();
else
size = image.get_software_region_length("rom");
@@ -1514,7 +1514,7 @@ DEVICE_IMAGE_LOAD_MEMBER( thomson_state, mo5_cartridge )
return IMAGE_INIT_FAIL;
}
- if (image.software_entry() == NULL)
+ if (image.software_entry() == nullptr)
{
if ( image.fread(pos, size ) != size )
{
diff --git a/src/mame/machine/ticket.cpp b/src/mame/machine/ticket.cpp
index a80d951a973..595a22b40a9 100644
--- a/src/mame/machine/ticket.cpp
+++ b/src/mame/machine/ticket.cpp
@@ -49,7 +49,7 @@ ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig,
m_ticketnotdispensed(0),
m_status(0),
m_power(0),
- m_timer(NULL)
+ m_timer(nullptr)
{
}
diff --git a/src/mame/machine/tnzs.cpp b/src/mame/machine/tnzs.cpp
index a855f81b9b8..108a5fa1522 100644
--- a/src/mame/machine/tnzs.cpp
+++ b/src/mame/machine/tnzs.cpp
@@ -696,7 +696,7 @@ WRITE8_MEMBER(tnzs_state::tnzs_bankswitch1_w)
/* bit 2 resets the mcu */
if (data & 0x04)
{
- if (m_mcu != NULL && m_mcu->type() == I8742)
+ if (m_mcu != nullptr && m_mcu->type() == I8742)
m_mcu->set_input_line(INPUT_LINE_RESET, PULSE_LINE);
}
/* Coin count and lockout is handled by the i8742 */
diff --git a/src/mame/machine/trs80.cpp b/src/mame/machine/trs80.cpp
index 980176e109e..b2f706028e5 100644
--- a/src/mame/machine/trs80.cpp
+++ b/src/mame/machine/trs80.cpp
@@ -503,7 +503,7 @@ WRITE8_MEMBER( trs80_state::trs80m4_ec_w )
d0 1=select drive 0 */
WRITE8_MEMBER( trs80_state::trs80m4_f4_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
@@ -731,7 +731,7 @@ READ8_MEMBER( trs80_state::trs80_irq_status_r )
WRITE8_MEMBER( trs80_state::trs80_motor_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
diff --git a/src/mame/machine/vector06.cpp b/src/mame/machine/vector06.cpp
index ba944cef8fd..1d1ff0fa417 100644
--- a/src/mame/machine/vector06.cpp
+++ b/src/mame/machine/vector06.cpp
@@ -138,7 +138,7 @@ TIMER_CALLBACK_MEMBER(vector06_state::reset_check_callback)
WRITE8_MEMBER( vector06_state::vector06_disc_w )
{
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
switch (data & 0x01)
{
diff --git a/src/mame/machine/vectrex.cpp b/src/mame/machine/vectrex.cpp
index ca64a1cd23c..4959c3de5f1 100644
--- a/src/mame/machine/vectrex.cpp
+++ b/src/mame/machine/vectrex.cpp
@@ -306,8 +306,8 @@ DRIVER_INIT_MEMBER(vectrex_state,vectrex)
{
m_imager_angles = unknown_game_angles;
m_beam_color = rgb_t::white;
- for (int i = 0; i < ARRAY_LENGTH(m_imager_colors); i++)
- m_imager_colors[i] = rgb_t::white;
+ for (auto & elem : m_imager_colors)
+ elem = rgb_t::white;
/*
* Minestorm's PRNG doesn't work with a 0 seed (mines in the first
diff --git a/src/mame/machine/volfied.cpp b/src/mame/machine/volfied.cpp
index 7776340d11d..498093a5855 100644
--- a/src/mame/machine/volfied.cpp
+++ b/src/mame/machine/volfied.cpp
@@ -259,7 +259,7 @@ static const UINT16 palette_data_11[0x50] =
static const UINT16 *const palette_data_lookup[] =
{
- 0,
+ nullptr,
palette_data_01,
palette_data_02,
palette_data_03,
diff --git a/src/mame/machine/vsnes.cpp b/src/mame/machine/vsnes.cpp
index 8e210a75c95..d07cb99b25d 100644
--- a/src/mame/machine/vsnes.cpp
+++ b/src/mame/machine/vsnes.cpp
@@ -204,7 +204,7 @@ MACHINE_START_MEMBER(vsnes_state,vsnes)
/* establish chr banks */
/* bank 1 is used already! */
/* DRIVER_INIT is called first - means we can handle this different for VRAM games! */
- if (NULL != m_vrom[0])
+ if (nullptr != m_vrom[0])
{
for (i = 0; i < 8; i++)
{
diff --git a/src/mame/machine/vtech2.cpp b/src/mame/machine/vtech2.cpp
index 5929b4aab47..bbc7d427cad 100644
--- a/src/mame/machine/vtech2.cpp
+++ b/src/mame/machine/vtech2.cpp
@@ -319,7 +319,7 @@ void vtech2_state::laser_get_track()
sprintf(m_laser_frame_message, "#%d get track %02d", m_laser_drive, m_laser_track_x2[m_laser_drive]/2);
m_laser_frame_time = 30;
/* drive selected or and image file ok? */
- if( m_laser_drive >= 0 && laser_file() != NULL )
+ if( m_laser_drive >= 0 && laser_file() != nullptr )
{
int size, offs;
device_image_interface *image = dynamic_cast<device_image_interface *>(laser_file());
@@ -337,7 +337,7 @@ void vtech2_state::laser_put_track()
{
device_image_interface *image = dynamic_cast<device_image_interface *>(laser_file());
/* drive selected and image file ok? */
- if( m_laser_drive >= 0 && laser_file() != NULL )
+ if( m_laser_drive >= 0 && laser_file() != nullptr )
{
int size, offs;
offs = TRKSIZE_VZ * m_laser_track_x2[m_laser_drive]/2;
diff --git a/src/mame/machine/wpc_lamp.cpp b/src/mame/machine/wpc_lamp.cpp
index c151bc257a0..2201ba40805 100644
--- a/src/mame/machine/wpc_lamp.cpp
+++ b/src/mame/machine/wpc_lamp.cpp
@@ -9,7 +9,7 @@ const device_type WPC_LAMP = &device_creator<wpc_lamp_device>;
wpc_lamp_device::wpc_lamp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, WPC_LAMP, "Williams Pinball Controller Lamp Control", tag, owner, clock, "wpc_lamp", __FILE__)
{
- names = NULL;
+ names = nullptr;
}
wpc_lamp_device::~wpc_lamp_device()
diff --git a/src/mame/machine/wpc_out.cpp b/src/mame/machine/wpc_out.cpp
index 4532f70581b..d9d73f7b7b2 100644
--- a/src/mame/machine/wpc_out.cpp
+++ b/src/mame/machine/wpc_out.cpp
@@ -9,7 +9,7 @@ const device_type WPC_OUT = &device_creator<wpc_out_device>;
wpc_out_device::wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, WPC_OUT, "Williams Pinball Controller Output Control", tag, owner, clock, "wpc_out", __FILE__)
{
- names = NULL;
+ names = nullptr;
}
wpc_out_device::~wpc_out_device()
diff --git a/src/mame/machine/x68k_hdc.h b/src/mame/machine/x68k_hdc.h
index 73fc210fa63..48f21fa6f99 100644
--- a/src/mame/machine/x68k_hdc.h
+++ b/src/mame/machine/x68k_hdc.h
@@ -92,9 +92,9 @@ public:
virtual bool is_creatable() const { return 1; }
virtual bool must_be_loaded() const { return 0; }
virtual bool is_reset_on_load() const { return 0; }
- virtual const char *image_interface() const { return NULL; }
+ virtual const char *image_interface() const { return nullptr; }
virtual const char *file_extensions() const { return "hdf"; }
- virtual const option_guide *create_option_guide() const { return NULL; }
+ virtual const option_guide *create_option_guide() const { return nullptr; }
virtual bool call_create(int format_type, option_resolution *format_options);
DECLARE_WRITE16_MEMBER( hdc_w );
diff --git a/src/mame/machine/xbox.cpp b/src/mame/machine/xbox.cpp
index ac0b3ea2b0f..f584f62ce1d 100644
--- a/src/mame/machine/xbox.cpp
+++ b/src/mame/machine/xbox.cpp
@@ -290,7 +290,7 @@ static void grab_vprog_command(running_machine &machine, int ref, int params, co
return;
if ((param[0][0] == 0) || (strlen(param[0]) > 127))
return;
- if ((fil = fopen(param[0], "wb")) == NULL)
+ if ((fil = fopen(param[0], "wb")) == nullptr)
return;
for (int n = 0; n < 136; n++) {
chst->nvidia_nv2a->debug_grab_vertex_program_slot(n, instruction);
@@ -829,7 +829,7 @@ ohci_function_device::ohci_function_device()
address = 0;
controldir = 0;
remain = 0;
- position = NULL;
+ position = nullptr;
}
void ohci_function_device::execute_reset()
@@ -846,7 +846,7 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
controldir = p->bmRequestType & 128;
// case !=0, in data stage and out status stage
// case ==0, out data stage and in status stage
- position = NULL;
+ position = nullptr;
remain = p->wLength;
if ((p->bmRequestType & 0x60) == 0) {
switch (p->bRequest) {
@@ -871,7 +871,7 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
if (size > remain)
size = remain;
if (controldir != 0) {
- if (position != NULL)
+ if (position != nullptr)
memcpy(buffer, position, size);
position = position + size;
remain = remain - size;
@@ -883,7 +883,7 @@ int ohci_function_device::execute_transfer(int address, int endpoint, int pid, U
if (size > remain)
size = remain;
if (controldir == 0) {
- if (position != NULL)
+ if (position != nullptr)
memcpy(position, buffer, size);
position = position + size;
remain = remain - size;
diff --git a/src/mame/machine/z80ne.cpp b/src/mame/machine/z80ne.cpp
index 3e5bce4522e..657bf01fc25 100644
--- a/src/mame/machine/z80ne.cpp
+++ b/src/mame/machine/z80ne.cpp
@@ -651,7 +651,7 @@ WRITE8_MEMBER(z80ne_state::lx390_motor_w)
d1 1=select drive 1
d0 1=select drive 0 */
- floppy_image_device *floppy = NULL;
+ floppy_image_device *floppy = nullptr;
if (BIT(data, 0)) floppy = m_floppy0->get_device();
if (BIT(data, 1)) floppy = m_floppy1->get_device();
diff --git a/src/mame/machine/zs01.cpp b/src/mame/machine/zs01.cpp
index 84fda99e05b..613a3cdcc1a 100644
--- a/src/mame/machine/zs01.cpp
+++ b/src/mame/machine/zs01.cpp
@@ -47,7 +47,7 @@ zs01_device::zs01_device( const machine_config &mconfig, const char *tag, device
void zs01_device::device_start()
{
m_ds2401 = siblingdevice<ds2401_device>(m_ds2401_tag);
- if( m_ds2401 == NULL )
+ if( m_ds2401 == nullptr )
{
logerror( "ds2401 '%s' not found\n", m_ds2401_tag );
}
diff --git a/src/mame/machine/zx8302.cpp b/src/mame/machine/zx8302.cpp
index 6866b61f290..16e06522aa0 100644
--- a/src/mame/machine/zx8302.cpp
+++ b/src/mame/machine/zx8302.cpp
@@ -149,7 +149,7 @@ zx8302_device::zx8302_device(const machine_config &mconfig, const char *tag, dev
m_cts2(0),
m_idr(1),
m_irq(0),
- m_ctr(time(NULL) + RTC_BASE_ADJUST),
+ m_ctr(time(nullptr) + RTC_BASE_ADJUST),
m_status(0),
m_comdata_from_ipc(1),
m_comdata_to_cpu(1),
diff --git a/src/mame/video/abc1600.cpp b/src/mame/video/abc1600.cpp
index 8c0ee45bcad..60b05e4fc94 100644
--- a/src/mame/video/abc1600.cpp
+++ b/src/mame/video/abc1600.cpp
@@ -290,7 +290,7 @@ void abc1600_mover_device::device_reset()
const address_space_config *abc1600_mover_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/mame/video/abc806.cpp b/src/mame/video/abc806.cpp
index f958b025b1c..4e8ff8ba854 100644
--- a/src/mame/video/abc806.cpp
+++ b/src/mame/video/abc806.cpp
@@ -413,9 +413,9 @@ void abc806_state::hr_update(bitmap_rgb32 &bitmap, const rectangle &cliprect)
void abc806_state::video_start()
{
// initialize variables
- for (int i = 0; i < 16; i++)
+ for (auto & elem : m_hrc)
{
- m_hrc[i] = 0;
+ elem = 0;
}
m_sync = 10;
diff --git a/src/mame/video/amiga.cpp b/src/mame/video/amiga.cpp
index 1c488f939eb..79651098c66 100644
--- a/src/mame/video/amiga.cpp
+++ b/src/mame/video/amiga.cpp
@@ -674,7 +674,7 @@ void amiga_state::render_scanline(bitmap_ind16 &bitmap, int scanline)
int pf1pri = 0, pf2pri = 0;
int planes = 0;
- UINT16 *dst = NULL;
+ UINT16 *dst = nullptr;
int ebitoffs = 0, obitoffs = 0;
int ecolmask = 0, ocolmask = 0;
int edelay = 0, odelay = 0;
@@ -779,7 +779,7 @@ void amiga_state::render_scanline(bitmap_ind16 &bitmap, int scanline)
}
/* clear the target pixels to the background color as a starting point */
- if (dst != NULL)
+ if (dst != nullptr)
dst[x*2+0] =
dst[x*2+1] = CUSTOM_REG(REG_COLOR00);
@@ -921,7 +921,7 @@ void amiga_state::render_scanline(bitmap_ind16 &bitmap, int scanline)
CUSTOM_REG(REG_CLXDAT) |= 0x001;
/* if we are within the display region, render */
- if (dst != NULL && x >= m_diw.min_x && x < m_diw.max_x)
+ if (dst != nullptr && x >= m_diw.min_x && x < m_diw.max_x)
{
int pix, pri;
@@ -1026,7 +1026,7 @@ void amiga_state::render_scanline(bitmap_ind16 &bitmap, int scanline)
CUSTOM_REG(REG_COLOR00) = save_color0;
// save
- if (dst != NULL)
+ if (dst != nullptr)
memcpy(&m_flickerfixer.pix16(save_scanline), dst, amiga_state::SCREEN_WIDTH * 2);
#if GUESS_COPPER_OFFSET
diff --git a/src/mame/video/amigaaga.cpp b/src/mame/video/amigaaga.cpp
index 953f037fa6f..6af424998e0 100644
--- a/src/mame/video/amigaaga.cpp
+++ b/src/mame/video/amigaaga.cpp
@@ -449,7 +449,7 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline)
int pf1pri = 0, pf2pri = 0;
int planes = 0;
- UINT32 *dst = NULL;
+ UINT32 *dst = nullptr;
int ebitoffs = 0, obitoffs = 0;
int ecolmask = 0, ocolmask = 0;
int edelay = 0, odelay = 0;
@@ -564,7 +564,7 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline)
}
/* clear the target pixels to the background color as a starting point */
- if (dst != NULL)
+ if (dst != nullptr)
dst[x*2+0] =
dst[x*2+1] = aga_palette[0];
@@ -706,7 +706,7 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline)
CUSTOM_REG(REG_CLXDAT) |= 0x001;
/* if we are within the display region, render */
- if (dst != NULL && x >= m_diw.min_x && x < m_diw.max_x)
+ if (dst != nullptr && x >= m_diw.min_x && x < m_diw.max_x)
{
int pix, pri;
@@ -834,7 +834,7 @@ void amiga_state::aga_render_scanline(bitmap_rgb32 &bitmap, int scanline)
CUSTOM_REG(REG_COLOR00) = save_color0;
// save
- if (dst != NULL)
+ if (dst != nullptr)
memcpy(&m_flickerfixer32.pix32(save_scanline), dst, amiga_state::SCREEN_WIDTH * 4);
#if GUESS_COPPER_OFFSET
diff --git a/src/mame/video/antic.cpp b/src/mame/video/antic.cpp
index 2979a86f92a..b01b7ba259e 100644
--- a/src/mame/video/antic.cpp
+++ b/src/mame/video/antic.cpp
@@ -28,7 +28,7 @@ const device_type ATARI_ANTIC = &device_creator<antic_device>;
antic_device::antic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, ATARI_ANTIC, "Atari ANTIC", tag, owner, clock, "antic", __FILE__),
device_video_interface(mconfig, *this),
- m_gtia_tag(NULL),
+ m_gtia_tag(nullptr),
m_maincpu(*this, ":maincpu"),
m_djoy_b(*this, ":djoy_b"),
m_artifacts(*this, ":artifacts"),
@@ -96,8 +96,8 @@ void antic_device::device_start()
LOG(("atari cclk_init\n"));
cclk_init();
- for (int i = 0; i < 64; i++)
- m_prio_table[i] = auto_alloc_array_clear(machine(), UINT8, 8*256);
+ for (auto & elem : m_prio_table)
+ elem = auto_alloc_array_clear(machine(), UINT8, 8*256);
LOG(("atari prio_init\n"));
prio_init();
@@ -1655,7 +1655,7 @@ void antic_device::linerefresh()
dst[2] = color_lookup[PBK] | color_lookup[PBK] << 16;
dst[3] = color_lookup[PBK] | color_lookup[PBK] << 16;
- draw_scanline8(*m_bitmap, 12, y, MIN(m_bitmap->width() - 12, sizeof(scanline)), (const UINT8 *) scanline, NULL);
+ draw_scanline8(*m_bitmap, 12, y, MIN(m_bitmap->width() - 12, sizeof(scanline)), (const UINT8 *) scanline, nullptr);
}
diff --git a/src/mame/video/apollo.cpp b/src/mame/video/apollo.cpp
index f8af2607d22..2cebbc8b4bd 100644
--- a/src/mame/video/apollo.cpp
+++ b/src/mame/video/apollo.cpp
@@ -1721,15 +1721,15 @@ const device_type APOLLO_GRAPHICS = &device_creator<apollo_graphics_15i> ;
apollo_graphics_15i::apollo_graphics_15i(const machine_config &mconfig,const char *tag, device_t *owner, UINT32 clock) :
device_t(mconfig, APOLLO_GRAPHICS, "Apollo Screen", tag, owner, clock,"apollo_graphics_15i", __FILE__),
- m_lut_fifo(NULL),
- m_bt458(NULL)
+ m_lut_fifo(nullptr),
+ m_bt458(nullptr)
{
}
apollo_graphics_15i::apollo_graphics_15i(const machine_config &mconfig,const char *tag, device_t *owner, UINT32 clock, device_type type,const char *name, const char *shortname, const char *source) :
device_t(mconfig, type, name, tag, owner, clock, shortname, source),
- m_lut_fifo(NULL),
- m_bt458(NULL)
+ m_lut_fifo(nullptr),
+ m_bt458(nullptr)
{
}
@@ -1795,14 +1795,14 @@ void apollo_graphics_15i::device_start()
m_p_clock = 0;
m_data_clock = 0;
- m_image_memory = 0;
+ m_image_memory = nullptr;
m_image_plane_size = 0;
m_image_memory_size = 0;
memset(m_color_lookup_table, 0, sizeof(m_color_lookup_table));
- m_lut_fifo = NULL;
- m_bt458 = NULL;
+ m_lut_fifo = nullptr;
+ m_bt458 = nullptr;
}
//-------------------------------------------------
@@ -1866,14 +1866,14 @@ void apollo_graphics_15i::device_reset()
}
}
- if (m_image_memory == NULL)
+ if (m_image_memory == nullptr)
{
/* allocate the memory image */
m_image_plane_size = m_buffer_height * m_buffer_width / 16;
m_image_memory_size = m_image_plane_size * m_n_planes;
m_image_memory
= auto_alloc_array(machine(), UINT16, m_image_memory_size);
- assert(m_image_memory != NULL);
+ assert(m_image_memory != nullptr);
MLOG1(("device reset apollo graphics: buffer=%p size=%0x", (void *) m_image_memory, m_image_memory_size));
}
diff --git a/src/mame/video/apple1.cpp b/src/mame/video/apple1.cpp
index f6485dc7ee5..2dc880127b5 100644
--- a/src/mame/video/apple1.cpp
+++ b/src/mame/video/apple1.cpp
@@ -94,7 +94,7 @@ void apple1_state::terminal_draw(screen_device &screen, bitmap_ind16 &dest, cons
{
m_current_terminal = terminal;
terminal->tm->draw(screen, dest, cliprect, 0, 0);
- m_current_terminal = NULL;
+ m_current_terminal = nullptr;
}
void apple1_state::verify_coords(terminal_t *terminal, int x, int y)
diff --git a/src/mame/video/apple2.cpp b/src/mame/video/apple2.cpp
index bdee351796a..c62c9d02456 100644
--- a/src/mame/video/apple2.cpp
+++ b/src/mame/video/apple2.cpp
@@ -101,7 +101,7 @@ inline void apple2_state::apple2_plot_text_character(bitmap_ind16 &bitmap, int x
const UINT8 *chardata;
UINT16 color;
- if (m_sysconfig != NULL)
+ if (m_sysconfig != nullptr)
{
switch (m_sysconfig->read() & 0x03)
{
@@ -291,7 +291,7 @@ void apple2_state::apple2_hires_draw(bitmap_ind16 &bitmap, const rectangle &clip
UINT16 *artifact_map_ptr;
int mon_type = 0;
- if (m_sysconfig != NULL)
+ if (m_sysconfig != nullptr)
{
mon_type = m_sysconfig->read() & 0x03;
}
diff --git a/src/mame/video/arcadecl.cpp b/src/mame/video/arcadecl.cpp
index 19f4e744690..32edd83c8f7 100644
--- a/src/mame/video/arcadecl.cpp
+++ b/src/mame/video/arcadecl.cpp
@@ -56,7 +56,7 @@ const atari_motion_objects_config arcadecl_state::s_mob_config =
VIDEO_START_MEMBER(arcadecl_state,arcadecl)
{
- if (m_mob != NULL)
+ if (m_mob != nullptr)
m_mob->set_scroll(-12, 0x110);
}
@@ -71,17 +71,17 @@ VIDEO_START_MEMBER(arcadecl_state,arcadecl)
UINT32 arcadecl_state::screen_update_arcadecl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
// start drawing
- if (m_mob != NULL)
+ if (m_mob != nullptr)
m_mob->draw_async(cliprect);
// draw the playfield
arcadecl_bitmap_render(bitmap, cliprect);
// draw and merge the MO
- if (m_mob != NULL)
+ if (m_mob != nullptr)
{
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/argus.cpp b/src/mame/video/argus.cpp
index 868fcec2947..49577665bc4 100644
--- a/src/mame/video/argus.cpp
+++ b/src/mame/video/argus.cpp
@@ -686,7 +686,7 @@ void argus_state::bg_setting()
if (!m_flipscreen)
{
- if (m_bg0_tilemap != NULL)
+ if (m_bg0_tilemap != nullptr)
{
m_bg0_tilemap->set_scrollx(0, bg0_scrollx & 0x1ff);
m_bg0_tilemap->set_scrolly(0, bg0_scrolly & 0x1ff);
@@ -696,7 +696,7 @@ void argus_state::bg_setting()
}
else
{
- if (m_bg0_tilemap != NULL)
+ if (m_bg0_tilemap != nullptr)
{
m_bg0_tilemap->set_scrollx(0, (bg0_scrollx + 256) & 0x1ff);
m_bg0_tilemap->set_scrolly(0, (bg0_scrolly + 256) & 0x1ff);
diff --git a/src/mame/video/arkanoid.cpp b/src/mame/video/arkanoid.cpp
index a7d2fdb62da..f85b0c9ee9f 100644
--- a/src/mame/video/arkanoid.cpp
+++ b/src/mame/video/arkanoid.cpp
@@ -59,7 +59,7 @@ WRITE8_MEMBER(arkanoid_state::arkanoid_d008_w)
leaving the tilt screen (as the MCU is now out of sync with main CPU
which resets itself). This bit is the likely candidate as it is flipped
early in bootup just prior to accessing the MCU for the first time. */
- if (m_mcu != NULL) // Bootlegs don't have the MCU but still set this bit
+ if (m_mcu != nullptr) // Bootlegs don't have the MCU but still set this bit
m_mcu->set_input_line(INPUT_LINE_RESET, (data & 0x80) ? CLEAR_LINE : ASSERT_LINE);
}
diff --git a/src/mame/video/artmagic.cpp b/src/mame/video/artmagic.cpp
index f1807c8ab35..adc4a3b12ad 100644
--- a/src/mame/video/artmagic.cpp
+++ b/src/mame/video/artmagic.cpp
@@ -29,7 +29,7 @@ inline UINT16 *artmagic_state::address_to_vram(offs_t *address)
return m_vram0;
else if (original >= 0x00400000 && original < 0x005fffff)
return m_vram1;
- return NULL;
+ return nullptr;
}
diff --git a/src/mame/video/atarimo.cpp b/src/mame/video/atarimo.cpp
index ea33fcbbf2d..bb5e1927e40 100644
--- a/src/mame/video/atarimo.cpp
+++ b/src/mame/video/atarimo.cpp
@@ -145,7 +145,7 @@ atari_motion_objects_device::atari_motion_objects_device(const machine_config &m
m_xscroll(0),
m_yscroll(0),
m_slipram(*this, "slip"),
- m_activelast(NULL),
+ m_activelast(nullptr),
m_last_xpos(0),
m_next_xpos(0),
m_gfxdecode(*this)
@@ -282,7 +282,7 @@ void atari_motion_objects_device::device_start()
// verify configuration
gfx_element *gfx = m_gfxdecode->gfx(m_gfxindex);
- if (gfx == NULL)
+ if (gfx == nullptr)
throw emu_fatalerror("No gfxelement #%d!", m_gfxindex);
// determine the masks
diff --git a/src/mame/video/atarirle.cpp b/src/mame/video/atarirle.cpp
index 3184310026f..6a433d4666c 100644
--- a/src/mame/video/atarirle.cpp
+++ b/src/mame/video/atarirle.cpp
@@ -190,7 +190,7 @@ void atari_rle_objects_device::device_start()
{
// resolve our memory
memory_share *share = owner()->memshare(tag());
- if (share == NULL)
+ if (share == nullptr)
throw emu_fatalerror("Error: unable to find memory share '%s' needed for Atari RLE device", tag());
m_ram.set(*share, 2);
@@ -386,7 +386,7 @@ void atari_rle_objects_device::prescan_rle(int which)
// make sure it's valid
if (offset < which * 4 || offset >= m_romlength)
{
- info.data = NULL;
+ info.data = nullptr;
return;
}
@@ -474,7 +474,7 @@ void atari_rle_objects_device::sort_and_render()
};
// sort the motion objects into their proper priorities
- sort_entry_t *list_head[256] = { 0 };
+ sort_entry_t *list_head[256] = { nullptr };
sort_entry_t sort_entry[256];
for (int objnum = 0; objnum < 256; objnum++)
{
@@ -489,7 +489,7 @@ void atari_rle_objects_device::sort_and_render()
int count = 0;
int hilite = -1;
for (int order = 1; order < 256; order++)
- for (sort_entry_t *current = list_head[order]; current != NULL; current = current->next)
+ for (sort_entry_t *current = list_head[order]; current != nullptr; current = current->next)
{
// extract scale and code
int scale = m_scalemask.extract(m_ram, current->entry);
@@ -537,7 +537,7 @@ void atari_rle_objects_device::draw_rle(bitmap_ind16 &bitmap, const rectangle &c
{
// bail on a NULL object
const object_info &info = m_info[code];
- if (info.data == NULL)
+ if (info.data == nullptr)
return;
//
diff --git a/src/mame/video/atarisy1.cpp b/src/mame/video/atarisy1.cpp
index 36c0ecddc18..992609effa4 100644
--- a/src/mame/video/atarisy1.cpp
+++ b/src/mame/video/atarisy1.cpp
@@ -470,7 +470,7 @@ UINT32 atarisy1_state::screen_update_atarisy1(screen_device &screen, bitmap_ind1
// draw and merge the MO
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
@@ -608,7 +608,7 @@ int atarisy1_state::get_bank(UINT8 prom1, UINT8 prom2, int bpp)
/* don't have one? let's make it ... first find any empty slot */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == NULL)
+ if (m_gfxdecode->gfx(gfx_index) == nullptr)
break;
assert(gfx_index != MAX_GFX_ELEMENTS);
diff --git a/src/mame/video/atarisy2.cpp b/src/mame/video/atarisy2.cpp
index 65030f97f57..74aaa7db33d 100644
--- a/src/mame/video/atarisy2.cpp
+++ b/src/mame/video/atarisy2.cpp
@@ -288,7 +288,7 @@ UINT32 atarisy2_state::screen_update_atarisy2(screen_device &screen, bitmap_ind1
/* draw and merge the MO */
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/badlands.cpp b/src/mame/video/badlands.cpp
index 98ebd1c707d..2f3d04970a2 100644
--- a/src/mame/video/badlands.cpp
+++ b/src/mame/video/badlands.cpp
@@ -111,7 +111,7 @@ UINT32 badlands_state::screen_update_badlands(screen_device &screen, bitmap_ind1
// draw and merge the MO
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/batman.cpp b/src/mame/video/batman.cpp
index a9100c1fe76..f6ec07bfea0 100644
--- a/src/mame/video/batman.cpp
+++ b/src/mame/video/batman.cpp
@@ -121,7 +121,7 @@ UINT32 batman_state::screen_update_batman(screen_device &screen, bitmap_ind16 &b
// draw and merge the MO
bitmap_ind16 &mobitmap = m_vad->mob()->bitmap();
- for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
@@ -193,7 +193,7 @@ UINT32 batman_state::screen_update_batman(screen_device &screen, bitmap_ind16 &b
m_vad->alpha()->draw(screen, bitmap, cliprect, 0, 0);
/* now go back and process the upper bit of MO priority */
- for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/bbusters.cpp b/src/mame/video/bbusters.cpp
index 7ef87f79c2c..1a090935c17 100644
--- a/src/mame/video/bbusters.cpp
+++ b/src/mame/video/bbusters.cpp
@@ -163,7 +163,7 @@ void bbusters_state::draw_block(bitmap_ind16 &dest,int x,int y,int size,int flip
if (dy>=16 && dy<240) {
UINT16 *destline = &dest.pix16(dy);
UINT8 srcline=*m_scale_table_ptr;
- const UINT8 *srcptr=0;
+ const UINT8 *srcptr=nullptr;
if (!flipy)
srcline=size-srcline-1;
diff --git a/src/mame/video/beathead.cpp b/src/mame/video/beathead.cpp
index 8237f067466..39a7d6bb6aa 100644
--- a/src/mame/video/beathead.cpp
+++ b/src/mame/video/beathead.cpp
@@ -167,7 +167,7 @@ UINT32 beathead_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
}
/* then draw it */
- draw_scanline16(bitmap, cliprect.min_x, y, cliprect.width(), &scanline[cliprect.min_x], NULL);
+ draw_scanline16(bitmap, cliprect.min_x, y, cliprect.width(), &scanline[cliprect.min_x], nullptr);
}
return 0;
}
diff --git a/src/mame/video/bfm_dm01.cpp b/src/mame/video/bfm_dm01.cpp
index 4c9f8e31825..19911ee5654 100644
--- a/src/mame/video/bfm_dm01.cpp
+++ b/src/mame/video/bfm_dm01.cpp
@@ -62,11 +62,11 @@ bfmdm01_device::bfmdm01_device(const machine_config &mconfig, const char *tag, d
m_comdata(0),
m_busy_cb(*this)
{
- for (int i = 0; i < 65; i++)
- m_segbuffer[i] = 0;
+ for (auto & elem : m_segbuffer)
+ elem = 0;
- for (int i = 0; i < DM_BYTESPERROW; i++)
- m_scanline[i] = 0;
+ for (auto & elem : m_scanline)
+ elem = 0;
}
//-------------------------------------------------
diff --git a/src/mame/video/blstroid.cpp b/src/mame/video/blstroid.cpp
index f69a269ac1a..a04bcb83fc2 100644
--- a/src/mame/video/blstroid.cpp
+++ b/src/mame/video/blstroid.cpp
@@ -146,7 +146,7 @@ UINT32 blstroid_state::screen_update_blstroid(screen_device &screen, bitmap_ind1
/* draw and merge the MO */
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/btime.cpp b/src/mame/video/btime.cpp
index 56c68dcd5d0..8ce07c28918 100644
--- a/src/mame/video/btime.cpp
+++ b/src/mame/video/btime.cpp
@@ -38,7 +38,7 @@ PALETTE_INIT_MEMBER(btime_state,btime)
/* Burger Time doesn't have a color PROM, but Hamburge has. */
/* This function is also used by Eggs. */
- if (color_prom == 0) return;
+ if (color_prom == nullptr) return;
for (i = 0; i < palette.entries(); i++)
{
@@ -495,7 +495,7 @@ UINT32 btime_state::screen_update_bnj(screen_device &screen, bitmap_ind16 &bitma
scroll = (m_bnj_scroll1 & 0x02) * 128 + 511 - m_bnj_scroll2;
if (!flip_screen())
scroll = 767 - scroll;
- copyscrollbitmap(bitmap, *m_background_bitmap, 1, &scroll, 0, 0, cliprect);
+ copyscrollbitmap(bitmap, *m_background_bitmap, 1, &scroll, 0, nullptr, cliprect);
/* copy the low priority characters followed by the sprites
then the high priority characters */
diff --git a/src/mame/video/buggychl.cpp b/src/mame/video/buggychl.cpp
index 1bf1e0e7af0..898a85fa5cb 100644
--- a/src/mame/video/buggychl.cpp
+++ b/src/mame/video/buggychl.cpp
@@ -120,7 +120,7 @@ void buggychl_state::draw_bg( bitmap_ind16 &bitmap, const rectangle &cliprect )
for (offs = 0; offs < 256; offs++)
scroll[offs] = -m_scrollh[offs];
- copyscrollbitmap_trans(bitmap, m_tmp_bitmap2, 256, scroll, 0, 0, clip, 32);
+ copyscrollbitmap_trans(bitmap, m_tmp_bitmap2, 256, scroll, 0, nullptr, clip, 32);
}
diff --git a/src/mame/video/c45.cpp b/src/mame/video/c45.cpp
index 6df7edd2331..6860961b4b7 100644
--- a/src/mame/video/c45.cpp
+++ b/src/mame/video/c45.cpp
@@ -202,7 +202,7 @@ void namco_c45_road_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect
int pen = source_gfx[sourcex >> 16];
if (m_palette->pen_indirect(pen) != m_transparent_color)
{
- if (m_clut != NULL)
+ if (m_clut != nullptr)
pen = (pen & ~0xff) | m_clut[pen & 0xff];
dest[screenx] = pen;
}
@@ -215,7 +215,7 @@ void namco_c45_road_device::draw(bitmap_ind16 &bitmap, const rectangle &cliprect
while (numpixels-- > 0)
{
int pen = source_gfx[sourcex >> 16];
- if (m_clut != NULL)
+ if (m_clut != nullptr)
pen = (pen & ~0xff) | m_clut[pen & 0xff];
dest[screenx++] = pen;
sourcex += dsourcex;
@@ -246,7 +246,7 @@ void namco_c45_road_device::device_start()
const address_space_config *namco_c45_road_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/mame/video/calomega.cpp b/src/mame/video/calomega.cpp
index d0b8856c6e0..e6b0b9e4891 100644
--- a/src/mame/video/calomega.cpp
+++ b/src/mame/video/calomega.cpp
@@ -83,7 +83,7 @@ PALETTE_INIT_MEMBER(calomega_state, calomega)
const int b_pot = 0xc0;
/* 00000BGR */
- if (color_prom == 0) return;
+ if (color_prom == nullptr) return;
for (int i = 0;i < palette.entries();i++)
{
diff --git a/src/mame/video/cave.cpp b/src/mame/video/cave.cpp
index 4de649c4244..19f051c0744 100644
--- a/src/mame/video/cave.cpp
+++ b/src/mame/video/cave.cpp
@@ -363,12 +363,12 @@ WRITE16_MEMBER(cave_state::cave_vram_3_8x8_w){ vram_8x8_w(space, offset, data, m
void cave_state::cave_vh_start( int num )
{
- assert(m_palette_map != NULL);
+ assert(m_palette_map != nullptr);
- m_tilemap[0] = 0;
- m_tilemap[1] = 0;
- m_tilemap[2] = 0;
- m_tilemap[3] = 0;
+ m_tilemap[0] = nullptr;
+ m_tilemap[1] = nullptr;
+ m_tilemap[2] = nullptr;
+ m_tilemap[3] = nullptr;
m_tiledim[0] = 0;
m_tiledim[1] = 0;
@@ -793,10 +793,10 @@ void cave_state::cave_sprite_check(int chip, screen_device &screen, const rectan
sprite++;
}
- m_sprite_table[chip][0][i[0]] = 0;
- m_sprite_table[chip][1][i[1]] = 0;
- m_sprite_table[chip][2][i[2]] = 0;
- m_sprite_table[chip][3][i[3]] = 0;
+ m_sprite_table[chip][0][i[0]] = nullptr;
+ m_sprite_table[chip][1][i[1]] = nullptr;
+ m_sprite_table[chip][2][i[2]] = nullptr;
+ m_sprite_table[chip][3][i[3]] = nullptr;
switch (spritetype)
{
@@ -1630,7 +1630,7 @@ UINT32 cave_state::screen_update_cave(screen_device &screen, bitmap_rgb32 &bitma
void cave_state::cave_get_sprite_info(int chip)
{
- if (m_videoregs[chip] == NULL)
+ if (m_videoregs[chip] == nullptr)
return;
if (m_kludge == 3) /* mazinger metmqstr */
diff --git a/src/mame/video/cclimber.cpp b/src/mame/video/cclimber.cpp
index 4f63cfc5e89..b0c16ca12e3 100644
--- a/src/mame/video/cclimber.cpp
+++ b/src/mame/video/cclimber.cpp
@@ -50,7 +50,7 @@ PALETTE_INIT_MEMBER(cclimber_state,cclimber)
compute_resistor_weights(0, 255, -1.0,
3, resistances_rg, weights_rg, 0, 0,
2, resistances_b, weights_b, 0, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
for (i = 0;i < palette.entries(); i++)
{
diff --git a/src/mame/video/chihiro.cpp b/src/mame/video/chihiro.cpp
index cba362d3e52..8e59ed253a9 100644
--- a/src/mame/video/chihiro.cpp
+++ b/src/mame/video/chihiro.cpp
@@ -433,8 +433,8 @@ int vertex_program_disassembler::disassemble(unsigned int *instruction, char *li
vertex_program_simulator::vertex_program_simulator()
{
- for (int i = 0; i < 256; i++)
- op[i].modified = 0;
+ for (auto & elem : op)
+ elem.modified = 0;
initialize_constants();
}
@@ -674,17 +674,17 @@ void vertex_program_simulator::initialize_outputs()
void vertex_program_simulator::initialize_temps()
{
- for (int n = 0; n < 32; n++) {
+ for (auto & elem : r_temp) {
for (int m = 0; m < 4; m++)
- r_temp[n].fv[m] = 0;
+ elem.fv[m] = 0;
}
}
void vertex_program_simulator::initialize_constants()
{
- for (int n = 0; n < 192; n++) {
+ for (auto & elem : c_constant) {
for (int m = 0; m < 4;m++)
- c_constant[n].fv[m] = 0;
+ elem.fv[m] = 0;
}
}
@@ -1286,7 +1286,7 @@ inline UINT8 *nv2a_renderer::read_pixel(int x, int y, INT32 c[4])
c[3] = 0xff;
return addr8;
}
- return NULL;
+ return nullptr;
}
void nv2a_renderer::write_pixel(int x, int y, UINT32 color, UINT32 depth)
@@ -1301,7 +1301,7 @@ void nv2a_renderer::write_pixel(int x, int y, UINT32 color, UINT32 depth)
bool depth_passed;
fb[3] = fb[2] = fb[1] = fb[0] = 0;
- addr = NULL;
+ addr = nullptr;
if (color_mask != 0)
addr = read_pixel(x, y, fb);
if (depthformat_rendertarget == NV2A_RT_DEPTH_FORMAT_Z24S8) {
@@ -1309,18 +1309,18 @@ void nv2a_renderer::write_pixel(int x, int y, UINT32 color, UINT32 depth)
deptsten = *daddr32;
dep = deptsten >> 8;
sten = deptsten & 255;
- daddr16 = NULL;
+ daddr16 = nullptr;
}
else if (depthformat_rendertarget == NV2A_RT_DEPTH_FORMAT_Z16) {
daddr16 = (UINT16 *)depthbuffer + (pitch_depthbuffer / 2) * y + x;
deptsten = *daddr16;
dep = (deptsten << 8) | 0xff;
sten = 0;
- daddr32 = NULL;
+ daddr32 = nullptr;
}
else {
- daddr32 = NULL;
- daddr16 = NULL;
+ daddr32 = nullptr;
+ daddr16 = nullptr;
dep = 0xffffff;
sten = 0;
}
@@ -3378,7 +3378,7 @@ int nv2a_renderer::toggle_wait_vblank_support()
void nv2a_renderer::debug_grab_texture(int type, const char *filename)
{
debug_grab_texttype = type;
- if (debug_grab_textfile == NULL)
+ if (debug_grab_textfile == nullptr)
debug_grab_textfile = (char *)malloc(128);
strncpy(debug_grab_textfile, filename, 127);
}
@@ -3492,13 +3492,13 @@ float *nv2a_renderer::combiner_map_output_select3(int code)
{
switch (code) {
case 0:
- return 0;
+ return nullptr;
case 1:
- return 0;
+ return nullptr;
case 2:
- return 0;
+ return nullptr;
case 3:
- return 0;
+ return nullptr;
case 4:
return combiner.register_primarycolor;
case 5:
@@ -3516,10 +3516,10 @@ float *nv2a_renderer::combiner_map_output_select3(int code)
case 13:
return combiner.register_spare1;
case 14:
- return 0;
+ return nullptr;
case 15:
default:
- return 0;
+ return nullptr;
}
}
@@ -3972,7 +3972,7 @@ void nv2a_renderer::vblank_callback(screen_device &screen, bool state)
#endif
if ((state == true) && (puller_waiting == 1)) {
puller_waiting = 0;
- puller_timer_work(NULL, 0);
+ puller_timer_work(nullptr, 0);
}
if (state == true) {
pcrtc[0x100 / 4] |= 1;
@@ -4008,7 +4008,7 @@ bool nv2a_renderer::update_interrupts()
UINT32 nv2a_renderer::screen_update_callback(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
- if (displayedtarget != NULL) {
+ if (displayedtarget != nullptr) {
bitmap_rgb32 bm(displayedtarget, 640, 480, 640);
UINT32 *dst = (UINT32 *)bitmap.raw_pixptr(0, 0);
diff --git a/src/mame/video/cloak.cpp b/src/mame/video/cloak.cpp
index 7b06f7d9efe..d0951091be2 100644
--- a/src/mame/video/cloak.cpp
+++ b/src/mame/video/cloak.cpp
@@ -56,8 +56,8 @@ void cloak_state::set_pen(int i)
/* compute the color output resistor weights */
compute_resistor_weights(0, 255, -1.0,
3, resistances, weights, 0, 1000,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
int r, g, b;
int bit0, bit1, bit2;
diff --git a/src/mame/video/cps1.cpp b/src/mame/video/cps1.cpp
index a2940aa43cc..0e91647975c 100644
--- a/src/mame/video/cps1.cpp
+++ b/src/mame/video/cps1.cpp
@@ -1604,7 +1604,7 @@ static const struct CPS1config cps1_config_table[]=
{"kenseim", CPS_B_21_DEF, mapper_KNM10B }, // wrong, need to convert equations from PAL
- {0} /* End of table */
+ {nullptr} /* End of table */
};
@@ -2250,11 +2250,11 @@ VIDEO_START_MEMBER(cps_state,cps)
/* Set up old base */
- m_scroll1 = NULL;
- m_scroll2 = NULL;
- m_scroll3 = NULL;
- m_obj = NULL;
- m_other = NULL;
+ m_scroll1 = nullptr;
+ m_scroll2 = nullptr;
+ m_scroll3 = nullptr;
+ m_obj = nullptr;
+ m_other = nullptr;
cps1_get_video_base(); /* Calculate base pointers */
cps1_get_video_base(); /* Calculate old base pointers */
diff --git a/src/mame/video/crt.cpp b/src/mame/video/crt.cpp
index d075600baf7..e69fcfa9b70 100644
--- a/src/mame/video/crt.cpp
+++ b/src/mame/video/crt.cpp
@@ -51,8 +51,8 @@ const device_type CRT = &device_creator<crt_device>;
crt_device::crt_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, CRT, "CRT Video", tag, owner, clock, "crt", __FILE__),
- m_list(NULL),
- m_list_head(NULL),
+ m_list(nullptr),
+ m_list_head(nullptr),
m_decay_counter(0),
m_num_intensity_levels(0),
m_window_offset_x(0),
diff --git a/src/mame/video/cvs.cpp b/src/mame/video/cvs.cpp
index 068445b6013..543d7c1c54a 100644
--- a/src/mame/video/cvs.cpp
+++ b/src/mame/video/cvs.cpp
@@ -186,8 +186,8 @@ UINT32 cvs_state::screen_update_cvs(screen_device &screen, bitmap_ind16 &bitmap,
scroll[6] = 0;
scroll[7] = 0;
- copyscrollbitmap(bitmap, m_background_bitmap, 0, 0, 8, scroll, cliprect);
- copyscrollbitmap(m_scrolled_collision_background, m_collision_background, 0, 0, 8, scroll, cliprect);
+ copyscrollbitmap(bitmap, m_background_bitmap, 0, nullptr, 8, scroll, cliprect);
+ copyscrollbitmap(m_scrolled_collision_background, m_collision_background, 0, nullptr, 8, scroll, cliprect);
/* update the S2636 chips */
bitmap_ind16 *s2636_0_bitmap = &m_s2636_0->update(cliprect);
diff --git a/src/mame/video/cyberbal.cpp b/src/mame/video/cyberbal.cpp
index 99addbfb0c4..3bd450cbbea 100644
--- a/src/mame/video/cyberbal.cpp
+++ b/src/mame/video/cyberbal.cpp
@@ -135,7 +135,7 @@ void cyberbal_state::scanline_update(screen_device &screen, int scanline)
/* loop over screens */
screen_device_iterator iter(*this);
- for (i = 0, update_screen = iter.first(); update_screen != NULL; i++, update_screen = iter.next())
+ for (i = 0, update_screen = iter.first(); update_screen != nullptr; i++, update_screen = iter.next())
{
/* need explicit target() because one is optional_device and other is required_device */
tilemap_t *curplayfield = i ? m_playfield2_tilemap.target() : m_playfield_tilemap.target();
@@ -218,7 +218,7 @@ UINT32 cyberbal_state::update_one_screen(screen_device &screen, bitmap_ind16 &bi
/* draw and merge the MO */
bitmap_ind16 &mobitmap = curmob->bitmap();
- for (const sparse_dirty_rect *rect = curmob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = curmob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/dassault.cpp b/src/mame/video/dassault.cpp
index 2a7e5711c95..992dd15bed9 100644
--- a/src/mame/video/dassault.cpp
+++ b/src/mame/video/dassault.cpp
@@ -86,8 +86,8 @@ UINT32 dassault_state::screen_update_dassault(screen_device &screen, bitmap_rgb3
/* Update tilemaps */
flip_screen_set(BIT(flip, 7));
- m_deco_tilegen1->pf_update(0, m_pf2_rowscroll);
- m_deco_tilegen2->pf_update(0, m_pf4_rowscroll);
+ m_deco_tilegen1->pf_update(nullptr, m_pf2_rowscroll);
+ m_deco_tilegen2->pf_update(nullptr, m_pf4_rowscroll);
/* Draw playfields/update priority bitmap */
screen.priority().fill(0, cliprect);
diff --git a/src/mame/video/decbac06.cpp b/src/mame/video/decbac06.cpp
index 3bbd98b9002..32c2f7c1b4c 100644
--- a/src/mame/video/decbac06.cpp
+++ b/src/mame/video/decbac06.cpp
@@ -69,9 +69,9 @@ const device_type DECO_BAC06 = &device_creator<deco_bac06_device>;
deco_bac06_device::deco_bac06_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECO_BAC06, "DECO BAC06 Tilemap", tag, owner, clock, "deco_bac06", __FILE__),
- m_pf_data(NULL),
- m_pf_rowscroll(NULL),
- m_pf_colscroll(NULL),
+ m_pf_data(nullptr),
+ m_pf_rowscroll(nullptr),
+ m_pf_colscroll(nullptr),
m_tile_region_8(0),
m_tile_region_16(0),
m_supports_8x8(true),
@@ -315,7 +315,7 @@ void deco_bac06_device::custom_tilemap_draw(bitmap_ind16 &bitmap,
void deco_bac06_device::deco_bac06_pf_draw(bitmap_ind16 &bitmap,const rectangle &cliprect,int flags,UINT16 penmask, UINT16 pencondition,UINT16 colprimask, UINT16 colpricondition)
{
- tilemap_t* tm = 0;
+ tilemap_t* tm = nullptr;
int tm_dimensions = m_pf_control_0[3] & 0x3;
if (tm_dimensions == 3) tm_dimensions = 1; // 3 is invalid / the same as 1?
@@ -351,11 +351,11 @@ void deco_bac06_device::deco_bac06_pf_draw(bitmap_ind16 &bitmap,const rectangle
// used for pocket gal bootleg, which doesn't set registers properly and simply expects a fixed size tilemap.
void deco_bac06_device::deco_bac06_pf_draw_bootleg(bitmap_ind16 &bitmap,const rectangle &cliprect,int flags, int mode, int type)
{
- tilemap_t* tm = 0;
+ tilemap_t* tm = nullptr;
if (!mode) tm = m_pf8x8_tilemap[type];
else tm = m_pf16x16_tilemap[type];
- custom_tilemap_draw(bitmap,cliprect,tm,m_pf_rowscroll,m_pf_colscroll,0,0,flags, 0, 0, 0, 0);
+ custom_tilemap_draw(bitmap,cliprect,tm,m_pf_rowscroll,m_pf_colscroll,nullptr,nullptr,flags, 0, 0, 0, 0);
}
diff --git a/src/mame/video/deco16ic.cpp b/src/mame/video/deco16ic.cpp
index fac47cbdf1b..a792ff6fb0c 100644
--- a/src/mame/video/deco16ic.cpp
+++ b/src/mame/video/deco16ic.cpp
@@ -180,11 +180,11 @@ const device_type DECO16IC = &device_creator<deco16ic_device>;
deco16ic_device::deco16ic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECO16IC, "DECO 55 / 56 / 74 / 141 IC", tag, owner, clock, "deco16ic", __FILE__),
device_video_interface(mconfig, *this),
- m_pf1_data(NULL),
- m_pf2_data(NULL),
- m_pf12_control(NULL),
- m_pf1_rowscroll_ptr(NULL),
- m_pf2_rowscroll_ptr(NULL),
+ m_pf1_data(nullptr),
+ m_pf2_data(nullptr),
+ m_pf12_control(nullptr),
+ m_pf1_rowscroll_ptr(nullptr),
+ m_pf2_rowscroll_ptr(nullptr),
m_use_custom_pf1(0),
m_use_custom_pf2(0),
m_pf1_bank(0),
@@ -289,8 +289,8 @@ void deco16ic_device::device_reset()
m_pf1_bank = m_pf2_bank = 0;
m_pf12_last_small = m_pf12_last_big = -1;
m_use_custom_pf1 = m_use_custom_pf2 = 0;
- m_pf1_rowscroll_ptr = 0;
- m_pf2_rowscroll_ptr = 0;
+ m_pf1_rowscroll_ptr = nullptr;
+ m_pf2_rowscroll_ptr = nullptr;
}
/*****************************************************************************************/
@@ -453,8 +453,8 @@ void deco16ic_device::custom_tilemap_draw(
{
tilemap_t *tilemap0 = BIT(control1, 7) ? tilemap0_8x8 : tilemap0_16x16;
tilemap_t *tilemap1 = BIT(control1, 7) ? tilemap1_8x8 : tilemap1_16x16;
- const bitmap_ind16 *src_bitmap0 = tilemap0 ? &tilemap0->pixmap() : NULL;
- const bitmap_ind16 *src_bitmap1 = tilemap1 ? &tilemap1->pixmap() : NULL;
+ const bitmap_ind16 *src_bitmap0 = tilemap0 ? &tilemap0->pixmap() : nullptr;
+ const bitmap_ind16 *src_bitmap1 = tilemap1 ? &tilemap1->pixmap() : nullptr;
int width_mask, height_mask, x, y, p;
int column_offset, src_x = 0, src_y = 0;
int row_type = 1 << ((control0 >> 3) & 0xf);
@@ -890,7 +890,7 @@ void deco16ic_device::tilemap_1_draw_common( screen_device &screen, _BitmapClass
{
if (m_use_custom_pf1)
{
- custom_tilemap_draw(screen, bitmap, cliprect, m_pf1_tilemap_8x8, m_pf1_tilemap_16x16, 0, 0, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0, 0, m_pf1_trans_mask, flags, priority, 0);
+ custom_tilemap_draw(screen, bitmap, cliprect, m_pf1_tilemap_8x8, m_pf1_tilemap_16x16, nullptr, nullptr, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0, 0, m_pf1_trans_mask, flags, priority, 0);
}
else
{
@@ -913,7 +913,7 @@ void deco16ic_device::tilemap_2_draw_common(screen_device &screen, _BitmapClass
{
if (m_use_custom_pf2)
{
- custom_tilemap_draw(screen, bitmap, cliprect, m_pf2_tilemap_8x8, m_pf2_tilemap_16x16, 0, 0, m_pf2_rowscroll_ptr, m_pf12_control[3], m_pf12_control[4], m_pf12_control[5] >> 8, m_pf12_control[6] >> 8, 0, 0, m_pf2_trans_mask, flags, priority, 0);
+ custom_tilemap_draw(screen, bitmap, cliprect, m_pf2_tilemap_8x8, m_pf2_tilemap_16x16, nullptr, nullptr, m_pf2_rowscroll_ptr, m_pf12_control[3], m_pf12_control[4], m_pf12_control[5] >> 8, m_pf12_control[6] >> 8, 0, 0, m_pf2_trans_mask, flags, priority, 0);
}
else
{
@@ -936,12 +936,12 @@ void deco16ic_device::tilemap_2_draw( screen_device &screen, bitmap_rgb32 &bitma
// Combines the output of two 4BPP tilemaps into an 8BPP tilemap
void deco16ic_device::tilemap_12_combine_draw(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, int flags, UINT32 priority, int is_tattoo)
{
- custom_tilemap_draw(screen, bitmap, cliprect, 0, m_pf1_tilemap_16x16, 0, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo);
+ custom_tilemap_draw(screen, bitmap, cliprect, nullptr, m_pf1_tilemap_16x16, nullptr, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo);
}
void deco16ic_device::tilemap_12_combine_draw(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int flags, UINT32 priority, int is_tattoo)
{
- custom_tilemap_draw(screen, bitmap, cliprect, 0, m_pf1_tilemap_16x16, 0, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo);
+ custom_tilemap_draw(screen, bitmap, cliprect, nullptr, m_pf1_tilemap_16x16, nullptr, m_pf2_tilemap_16x16, m_pf1_rowscroll_ptr, m_pf12_control[1], m_pf12_control[2], m_pf12_control[5] & 0xff, m_pf12_control[6] & 0xff, 0xf, 4, 0xff, flags, priority, is_tattoo);
}
//-------------------------------------------------
diff --git a/src/mame/video/deco_mlc.cpp b/src/mame/video/deco_mlc.cpp
index df850940603..808b177bf91 100644
--- a/src/mame/video/deco_mlc.cpp
+++ b/src/mame/video/deco_mlc.cpp
@@ -137,7 +137,7 @@ static void mlc_drawgfxzoomline(deco_mlc_state *state,
void deco_mlc_state::draw_sprites( const rectangle &cliprect, int scanline, UINT32* dest)
{
- UINT32 *index_ptr=0;
+ UINT32 *index_ptr=nullptr;
int offs,fx=0,fy=0,x,y,color,colorOffset,sprite,indx,h,w,bx,by,fx1,fy1;
int xoffs,yoffs;
UINT8 *rom = memregion("gfx2")->base() + 0x20000, *index_ptr8;
diff --git a/src/mame/video/deco_zoomspr.cpp b/src/mame/video/deco_zoomspr.cpp
index c357f0376bf..e1b5cfdb949 100644
--- a/src/mame/video/deco_zoomspr.cpp
+++ b/src/mame/video/deco_zoomspr.cpp
@@ -399,7 +399,7 @@ void deco_zoomspr_device::dragngun_draw_sprites( bitmap_rgb32 &bitmap, const rec
colour,
fx,fy,
xpos>>16,ypos>>16,
- 15,zoomx,zoomy,NULL,0,
+ 15,zoomx,zoomy,nullptr,0,
((xpos+(zoomx<<4))>>16) - (xpos>>16), ((ypos+(zoomy<<4))>>16) - (ypos>>16), alpha,
pri_bitmap, temp_bitmap,
priority
diff --git a/src/mame/video/decocomn.cpp b/src/mame/video/decocomn.cpp
index a8646815d37..f0a5aa76c3f 100644
--- a/src/mame/video/decocomn.cpp
+++ b/src/mame/video/decocomn.cpp
@@ -15,7 +15,7 @@ const device_type DECOCOMN = &device_creator<decocomn_device>;
decocomn_device::decocomn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, DECOCOMN, "DECO Common Video Functions", tag, owner, clock, "decocomn", __FILE__),
device_video_interface(mconfig, *this),
- m_dirty_palette(NULL),
+ m_dirty_palette(nullptr),
m_priority(0),
m_palette(*this),
m_generic_paletteram_16(*this, "^paletteram")
diff --git a/src/mame/video/decodmd2.cpp b/src/mame/video/decodmd2.cpp
index 75a561b4e06..48863b1c0fc 100644
--- a/src/mame/video/decodmd2.cpp
+++ b/src/mame/video/decodmd2.cpp
@@ -135,7 +135,7 @@ static MACHINE_CONFIG_FRAGMENT( decodmd2 )
MCFG_TIMER_DRIVER_ADD_PERIODIC("firq_timer",decodmd_type2_device,dmd_firq,attotime::from_hz(80))
- MCFG_MC6845_ADD("dmd6845", MC6845, NULL, XTAL_8MHz / 8) // TODO: confirm clock speed
+ MCFG_MC6845_ADD("dmd6845", MC6845, nullptr, XTAL_8MHz / 8) // TODO: confirm clock speed
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(8)
MCFG_MC6845_UPDATE_ROW_CB(decodmd_type2_device, crtc_update_row)
diff --git a/src/mame/video/decodmd3.cpp b/src/mame/video/decodmd3.cpp
index 44235f83bc1..18b41d4ce71 100644
--- a/src/mame/video/decodmd3.cpp
+++ b/src/mame/video/decodmd3.cpp
@@ -137,7 +137,7 @@ static MACHINE_CONFIG_FRAGMENT( decodmd3 )
MCFG_TIMER_DRIVER_ADD_PERIODIC("irq_timer",decodmd_type3_device,dmd_irq,attotime::from_hz(150))
- MCFG_MC6845_ADD("dmd6845", MC6845, NULL, XTAL_12MHz / 4) // TODO: confirm clock speed
+ MCFG_MC6845_ADD("dmd6845", MC6845, nullptr, XTAL_12MHz / 4) // TODO: confirm clock speed
MCFG_MC6845_SHOW_BORDER_AREA(false)
MCFG_MC6845_CHAR_WIDTH(16)
MCFG_MC6845_UPDATE_ROW_CB(decodmd_type3_device, crtc_update_row)
diff --git a/src/mame/video/dkong.cpp b/src/mame/video/dkong.cpp
index a17b45b527a..05630cba8e8 100644
--- a/src/mame/video/dkong.cpp
+++ b/src/mame/video/dkong.cpp
@@ -807,7 +807,7 @@ void dkong_state::radarscp_step(int line_cnt)
void dkong_state::radarscp_draw_background(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- const UINT8 *htable = NULL;
+ const UINT8 *htable = nullptr;
int x,y;
UINT8 draw_ok;
UINT16 *pixel;
@@ -890,7 +890,7 @@ void dkong_state::check_palette()
int newset;
port = ioport("VIDHW");
- if (port != NULL)
+ if (port != nullptr)
{
newset = port->read();
if (newset != m_vidhw)
diff --git a/src/mame/video/dooyong.cpp b/src/mame/video/dooyong.cpp
index 2e2376a7f82..128450d9279 100644
--- a/src/mame/video/dooyong.cpp
+++ b/src/mame/video/dooyong.cpp
@@ -10,7 +10,7 @@ inline void dooyong_state::scroll8_w(offs_t offset, UINT8 data, UINT8 *scroll, t
if (old != data)
{
scroll[offset] = data;
- if (map != NULL) switch (offset)
+ if (map != nullptr) switch (offset)
{
case 0: /* Low byte of x scroll - scroll tilemap */
map->set_scrollx(0, data);
@@ -850,7 +850,7 @@ VIDEO_START_MEMBER(dooyong_68k_state, popbingo)
/* Create tilemaps */
m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(dooyong_state::get_bg_tile_info),this), TILEMAP_SCAN_COLS,
32, 32, 32, 8);
- m_bg2_tilemap = m_fg_tilemap = m_fg2_tilemap = NULL; /* Stop scroll handler from crashing on these */
+ m_bg2_tilemap = m_fg_tilemap = m_fg2_tilemap = nullptr; /* Stop scroll handler from crashing on these */
memset(m_bgscroll8, 0, 0x10);
memset(m_bg2scroll8, 0, 0x10);
diff --git a/src/mame/video/dynax.cpp b/src/mame/video/dynax.cpp
index 4a4683e303a..6c179631645 100644
--- a/src/mame/video/dynax.cpp
+++ b/src/mame/video/dynax.cpp
@@ -990,7 +990,7 @@ VIDEO_START_MEMBER(dynax_state,mjdialq2)
dynax_common_reset();
m_layer_layout = LAYOUT_MJDIALQ2;
- m_update_irq_func = 0;
+ m_update_irq_func = nullptr;
save_pointer(NAME(m_pixmap[0][0]), 256 * 256);
save_pointer(NAME(m_pixmap[1][0]), 256 * 256);
diff --git a/src/mame/video/eprom.cpp b/src/mame/video/eprom.cpp
index 3deab68cbd8..83d36240ffc 100644
--- a/src/mame/video/eprom.cpp
+++ b/src/mame/video/eprom.cpp
@@ -218,7 +218,7 @@ UINT32 eprom_state::screen_update_eprom(screen_device &screen, bitmap_ind16 &bit
// draw and merge the MO
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
@@ -324,7 +324,7 @@ UINT32 eprom_state::screen_update_eprom(screen_device &screen, bitmap_ind16 &bit
m_alpha_tilemap->draw(screen, bitmap, cliprect, 0, 0);
/* now go back and process the upper bit of MO priority */
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
@@ -365,7 +365,7 @@ UINT32 eprom_state::screen_update_guts(screen_device &screen, bitmap_ind16 &bitm
// draw and merge the MO
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
@@ -390,7 +390,7 @@ UINT32 eprom_state::screen_update_guts(screen_device &screen, bitmap_ind16 &bitm
m_alpha_tilemap->draw(screen, bitmap, cliprect, 0, 0);
/* now go back and process the upper bit of MO priority */
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/exerion.cpp b/src/mame/video/exerion.cpp
index 9ec66724edd..8f1743f0ba0 100644
--- a/src/mame/video/exerion.cpp
+++ b/src/mame/video/exerion.cpp
@@ -334,7 +334,7 @@ void exerion_state::draw_background( bitmap_ind16 &bitmap, const rectangle &clip
}
/* draw the scanline */
- draw_scanline16(bitmap, cliprect.min_x, y, cliprect.width(), &scanline[cliprect.min_x], NULL);
+ draw_scanline16(bitmap, cliprect.min_x, y, cliprect.width(), &scanline[cliprect.min_x], nullptr);
}
}
diff --git a/src/mame/video/exidy440.cpp b/src/mame/video/exidy440.cpp
index 455ab6add53..5528165795a 100644
--- a/src/mame/video/exidy440.cpp
+++ b/src/mame/video/exidy440.cpp
@@ -392,7 +392,7 @@ void exidy440_state::update_screen(screen_device &screen, bitmap_ind16 &bitmap,
sy -= (VBSTART - VBEND);
/* draw line */
- draw_scanline8(bitmap, 0, y, (HBSTART - HBEND), &m_local_videoram[sy * 512], NULL);
+ draw_scanline8(bitmap, 0, y, (HBSTART - HBEND), &m_local_videoram[sy * 512], nullptr);
}
/* draw the sprites */
diff --git a/src/mame/video/exterm.cpp b/src/mame/video/exterm.cpp
index 74f57b1e1cb..a22cc152b77 100644
--- a/src/mame/video/exterm.cpp
+++ b/src/mame/video/exterm.cpp
@@ -68,7 +68,7 @@ TMS340X0_FROM_SHIFTREG_CB_MEMBER(exterm_state::from_shiftreg_slave)
TMS340X0_SCANLINE_IND16_CB_MEMBER(exterm_state::scanline_update)
{
UINT16 *bgsrc = &m_master_videoram[(params->rowaddr << 8) & 0xff00];
- UINT16 *fgsrc = NULL;
+ UINT16 *fgsrc = nullptr;
UINT16 *dest = &bitmap.pix16(scanline);
tms34010_display_params fgparams;
int coladdr = params->coladdr;
@@ -90,7 +90,7 @@ TMS340X0_SCANLINE_IND16_CB_MEMBER(exterm_state::scanline_update)
{
UINT16 bgdata, fgdata = 0;
- if (fgsrc != NULL)
+ if (fgsrc != nullptr)
fgdata = fgsrc[fgcoladdr++ & 0x7f];
bgdata = bgsrc[coladdr++ & 0xff];
diff --git a/src/mame/video/flkatck.cpp b/src/mame/video/flkatck.cpp
index bcb34111d11..64c75e17bf7 100644
--- a/src/mame/video/flkatck.cpp
+++ b/src/mame/video/flkatck.cpp
@@ -162,7 +162,7 @@ UINT32 flkatck_state::screen_update_flkatck(screen_device &screen, bitmap_ind16
/* draw the graphics */
m_k007121_tilemap[0]->draw(screen, bitmap, clip[0], 0, 0);
- m_k007121->sprites_draw(bitmap, cliprect, m_gfxdecode->gfx(0), NULL, &m_k007121_ram[0x1000], 0, 40, 0, screen.priority(), (UINT32)-1);
+ m_k007121->sprites_draw(bitmap, cliprect, m_gfxdecode->gfx(0), nullptr, &m_k007121_ram[0x1000], 0, 40, 0, screen.priority(), (UINT32)-1);
m_k007121_tilemap[1]->draw(screen, bitmap, clip[1], 0, 0);
return 0;
}
diff --git a/src/mame/video/fromanc2.cpp b/src/mame/video/fromanc2.cpp
index addee088756..0a8204d744e 100644
--- a/src/mame/video/fromanc2.cpp
+++ b/src/mame/video/fromanc2.cpp
@@ -313,11 +313,11 @@ VIDEO_START_MEMBER(fromanc2_state,fromancr)
m_tilemap[0][0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v0_l0_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
m_tilemap[0][1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v0_l1_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
m_tilemap[0][2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v0_l2_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
- m_tilemap[0][3] = NULL;
+ m_tilemap[0][3] = nullptr;
m_tilemap[1][0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v1_l0_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
m_tilemap[1][1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v1_l1_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
m_tilemap[1][2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v1_l2_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 64);
- m_tilemap[1][3] = NULL;
+ m_tilemap[1][3] = nullptr;
for (int screen = 0; screen < 2; screen++)
{
@@ -349,11 +349,11 @@ VIDEO_START_MEMBER(fromanc2_state,fromanc4)
m_tilemap[0][0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v0_l0_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
m_tilemap[0][1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v0_l1_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
m_tilemap[0][2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v0_l2_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
- m_tilemap[0][3] = NULL;
+ m_tilemap[0][3] = nullptr;
m_tilemap[1][0] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v1_l0_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
m_tilemap[1][1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v1_l1_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
m_tilemap[1][2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(fromanc2_state::fromancr_get_v1_l2_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 256, 64);
- m_tilemap[1][3] = NULL;
+ m_tilemap[1][3] = nullptr;
for (int screen = 0; screen < 2; screen++)
{
diff --git a/src/mame/video/fuukifg2.cpp b/src/mame/video/fuukifg2.cpp
index 83b8d743736..eba3f8059ca 100644
--- a/src/mame/video/fuukifg2.cpp
+++ b/src/mame/video/fuukifg2.cpp
@@ -220,7 +220,7 @@ UINT32 fuuki16_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
draw_layer(screen, bitmap, cliprect, tm_middle, 0, 2);
draw_layer(screen, bitmap, cliprect, tm_front, 0, 4);
- m_fuukivid->draw_sprites(screen, bitmap, cliprect, flip_screen(), 0);
+ m_fuukivid->draw_sprites(screen, bitmap, cliprect, flip_screen(), nullptr);
return 0;
}
diff --git a/src/mame/video/gaiden.cpp b/src/mame/video/gaiden.cpp
index f8f1f951e26..bc302bab000 100644
--- a/src/mame/video/gaiden.cpp
+++ b/src/mame/video/gaiden.cpp
@@ -313,7 +313,7 @@ UINT32 gaiden_state::screen_update_raiga(screen_device &screen, bitmap_rgb32 &bi
m_background->draw(screen, m_tile_bitmap_bg, cliprect, 0, 0);
m_foreground->draw(screen, m_tile_bitmap_fg, cliprect, 0, 0);
- m_mixer->mix_bitmaps(screen, bitmap, cliprect, m_palette, &m_tile_bitmap_bg, &m_tile_bitmap_fg, (bitmap_ind16*)0, &m_sprite_bitmap);
+ m_mixer->mix_bitmaps(screen, bitmap, cliprect, m_palette, &m_tile_bitmap_bg, &m_tile_bitmap_fg, (bitmap_ind16*)nullptr, &m_sprite_bitmap);
// todo, this should go through the mixer!
m_text_layer->draw(screen, bitmap, cliprect, 0, 0);
diff --git a/src/mame/video/galaxian.cpp b/src/mame/video/galaxian.cpp
index e3beb486c6a..ba022af66b5 100644
--- a/src/mame/video/galaxian.cpp
+++ b/src/mame/video/galaxian.cpp
@@ -446,7 +446,7 @@ UINT32 galaxian_state::screen_update_galaxian(screen_device &screen, bitmap_rgb3
sprites_draw(bitmap, cliprect, &m_spriteram[m_sprites_base + i * 0x20]);
/* if we have bullets to draw, render them following */
- if (m_draw_bullet_ptr != NULL)
+ if (m_draw_bullet_ptr != nullptr)
bullets_draw(bitmap, cliprect, &m_spriteram[m_bullets_base]);
return 0;
@@ -469,7 +469,7 @@ TILE_GET_INFO_MEMBER(galaxian_state::bg_get_tile_info)
UINT8 attrib = m_spriteram[x*2+1];
UINT8 color = attrib & 7;
- if (m_extend_tile_info_ptr != NULL)
+ if (m_extend_tile_info_ptr != nullptr)
(this->*m_extend_tile_info_ptr)(&code, &color, attrib, x);
SET_TILE_INFO_MEMBER(0, code, color, 0);
@@ -561,7 +561,7 @@ void galaxian_state::sprites_draw(bitmap_rgb32 &bitmap, const rectangle &cliprec
UINT8 sx = base[3] + hoffset;
/* extend the sprite information */
- if (m_extend_sprite_info_ptr != NULL)
+ if (m_extend_sprite_info_ptr != nullptr)
(this->*m_extend_sprite_info_ptr)(base, &sx, &sy, &flipx, &flipy, &code, &color);
/* apply flipscreen in X direction */
diff --git a/src/mame/video/galaxold.cpp b/src/mame/video/galaxold.cpp
index bdfa8dd068c..cebfe20e687 100644
--- a/src/mame/video/galaxold.cpp
+++ b/src/mame/video/galaxold.cpp
@@ -402,12 +402,12 @@ void galaxold_state::state_save_register()
void galaxold_state::video_start_common()
{
- m_modify_charcode = 0;
- m_modify_spritecode = 0;
- m_modify_color = 0;
- m_modify_ypos = 0;
+ m_modify_charcode = nullptr;
+ m_modify_spritecode = nullptr;
+ m_modify_color = nullptr;
+ m_modify_ypos = nullptr;
- m_draw_bullets = 0;
+ m_draw_bullets = nullptr;
m_draw_background = &galaxold_state::galaxold_draw_background;
m_background_enable = 0;
diff --git a/src/mame/video/gauntlet.cpp b/src/mame/video/gauntlet.cpp
index 89ba735c88b..c9430f4f0ef 100644
--- a/src/mame/video/gauntlet.cpp
+++ b/src/mame/video/gauntlet.cpp
@@ -83,8 +83,8 @@ VIDEO_START_MEMBER(gauntlet_state,gauntlet)
{
/* modify the motion object code lookup table to account for the code XOR */
std::vector<UINT16> &codelookup = m_mob->code_lookup();
- for (unsigned int i = 0; i < codelookup.size(); i++)
- codelookup[i] ^= 0x800;
+ for (auto & elem : codelookup)
+ elem ^= 0x800;
/* set up the base color for the playfield */
m_playfield_color_bank = m_vindctr2_screen_refresh ? 0 : 1;
@@ -167,7 +167,7 @@ UINT32 gauntlet_state::screen_update_gauntlet(screen_device &screen, bitmap_ind1
/* draw and merge the MO */
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/gb_lcd.cpp b/src/mame/video/gb_lcd.cpp
index b46aece5a15..9e0db236901 100644
--- a/src/mame/video/gb_lcd.cpp
+++ b/src/mame/video/gb_lcd.cpp
@@ -565,7 +565,7 @@ void gb_lcd_device::update_sprites()
case 0xA0: /* priority is set (behind bgnd & wnd, flip x) */
for (bit = 0; bit < 8; bit++, xindex++)
{
- register int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
+ int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
if (colour && !m_bg_zbuf[xindex] && xindex >= 0 && xindex < 160)
plot_pixel(bitmap, xindex, yindex, spal[colour]);
data >>= 1;
@@ -574,7 +574,7 @@ void gb_lcd_device::update_sprites()
case 0x20: /* priority is not set (overlaps bgnd & wnd, flip x) */
for (bit = 0; bit < 8; bit++, xindex++)
{
- register int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
+ int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
if (colour && xindex >= 0 && xindex < 160)
plot_pixel(bitmap, xindex, yindex, spal[colour]);
data >>= 1;
@@ -583,7 +583,7 @@ void gb_lcd_device::update_sprites()
case 0x80: /* priority is set (behind bgnd & wnd, don't flip x) */
for (bit = 0; bit < 8 && xindex < 160; bit++, xindex++)
{
- register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
+ int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
if (colour && !m_bg_zbuf[xindex] && xindex >= 0 && xindex < 160)
plot_pixel(bitmap, xindex, yindex, spal[colour]);
data <<= 1;
@@ -592,7 +592,7 @@ void gb_lcd_device::update_sprites()
case 0x00: /* priority is not set (overlaps bgnd & wnd, don't flip x) */
for (bit = 0; bit < 8 && xindex < 160; bit++, xindex++)
{
- register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
+ int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
if (colour && xindex >= 0 && xindex < 160)
plot_pixel(bitmap, xindex, yindex, spal[colour]);
data <<= 1;
@@ -694,7 +694,7 @@ void gb_lcd_device::update_scanline()
{
while ((m_layer[l].xshift < 8) && i)
{
- register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
+ int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
plot_pixel(bitmap, xindex, m_current_line, m_gb_bpal[colour]);
m_bg_zbuf[xindex] = colour;
xindex++;
@@ -807,7 +807,7 @@ void sgb_lcd_device::update_sprites()
case 0xA0: /* priority is set (behind bgnd & wnd, flip x) */
for (bit = 0; bit < 8; bit++, xindex++)
{
- register int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
+ int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
if ((xindex >= SGB_XOFFSET && xindex < SGB_XOFFSET + 160) && colour && !m_bg_zbuf[xindex - SGB_XOFFSET])
plot_pixel(bitmap, xindex, yindex, m_sgb_pal[pal + spal[colour]]);
data >>= 1;
@@ -816,7 +816,7 @@ void sgb_lcd_device::update_sprites()
case 0x20: /* priority is not set (overlaps bgnd & wnd, flip x) */
for (bit = 0; bit < 8; bit++, xindex++)
{
- register int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
+ int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
if ((xindex >= SGB_XOFFSET && xindex < SGB_XOFFSET + 160) && colour)
plot_pixel(bitmap, xindex, yindex, m_sgb_pal[pal + spal[colour]]);
data >>= 1;
@@ -825,7 +825,7 @@ void sgb_lcd_device::update_sprites()
case 0x80: /* priority is set (behind bgnd & wnd, don't flip x) */
for (bit = 0; bit < 8; bit++, xindex++)
{
- register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
+ int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
if ((xindex >= SGB_XOFFSET && xindex < SGB_XOFFSET + 160) && colour && !m_bg_zbuf[xindex - SGB_XOFFSET])
plot_pixel(bitmap, xindex, yindex, m_sgb_pal[pal + spal[colour]]);
data <<= 1;
@@ -834,7 +834,7 @@ void sgb_lcd_device::update_sprites()
case 0x00: /* priority is not set (overlaps bgnd & wnd, don't flip x) */
for (bit = 0; bit < 8; bit++, xindex++)
{
- register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
+ int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
if ((xindex >= SGB_XOFFSET && xindex < SGB_XOFFSET + 160) && colour)
plot_pixel(bitmap, xindex, yindex, m_sgb_pal[pal + spal[colour]]);
data <<= 1;
@@ -886,7 +886,7 @@ void sgb_lcd_device::refresh_border()
for (int i = 0; i < 8; i++)
{
- register UINT8 colour;
+ UINT8 colour;
if ((map[xidx + 1] & 0x40)) /* Horizontal flip */
{
colour = ((data & 0x0001) ? 1 : 0) | ((data & 0x0100) ? 2 : 0) |
@@ -1041,7 +1041,7 @@ void sgb_lcd_device::update_scanline()
while ((m_layer[l].xshift < 8) && i)
{
- register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
+ int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
plot_pixel(bitmap, xindex + SGB_XOFFSET, m_current_line + SGB_YOFFSET, m_sgb_pal[sgb_palette + m_gb_bpal[colour]]);
m_bg_zbuf[xindex] = colour;
xindex++;
@@ -1149,7 +1149,7 @@ void cgb_lcd_device::update_sprites()
case 0xA0: /* priority is set (behind bgnd & wnd, flip x) */
for (bit = 0; bit < 8; bit++, xindex++)
{
- register int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
+ int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
if (colour && !m_bg_zbuf[xindex] && xindex >= 0 && xindex < 160)
{
if (!m_gbc_mode)
@@ -1162,7 +1162,7 @@ void cgb_lcd_device::update_sprites()
case 0x20: /* priority is not set (overlaps bgnd & wnd, flip x) */
for (bit = 0; bit < 8; bit++, xindex++)
{
- register int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
+ int colour = ((data & 0x0100) ? 2 : 0) | ((data & 0x0001) ? 1 : 0);
if ((m_bg_zbuf[xindex] & 0x80) && (m_bg_zbuf[xindex] & 0x7f) && (LCDCONT & 0x1))
colour = 0;
if (colour && xindex >= 0 && xindex < 160)
@@ -1177,7 +1177,7 @@ void cgb_lcd_device::update_sprites()
case 0x80: /* priority is set (behind bgnd & wnd, don't flip x) */
for (bit = 0; bit < 8; bit++, xindex++)
{
- register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
+ int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
if (colour && !m_bg_zbuf[xindex] && xindex >= 0 && xindex < 160)
{
if (!m_gbc_mode)
@@ -1192,7 +1192,7 @@ void cgb_lcd_device::update_sprites()
{
if (xindex >= 0 && xindex < 160)
{
- register int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
+ int colour = ((data & 0x8000) ? 2 : 0) | ((data & 0x0080) ? 1 : 0);
if ((m_bg_zbuf[xindex] & 0x80) && (m_bg_zbuf[xindex] & 0x7f) && (LCDCONT & 0x1))
colour = 0;
if (colour)
diff --git a/src/mame/video/gic.cpp b/src/mame/video/gic.cpp
index 994e97e16f8..6adcea87227 100644
--- a/src/mame/video/gic.cpp
+++ b/src/mame/video/gic.cpp
@@ -84,11 +84,11 @@ gic_device::gic_device(const machine_config &mconfig, const char *tag, device_t
: device_t(mconfig, GIC, "GIC", tag, owner, clock, "gic", __FILE__)
, device_sound_interface(mconfig, *this)
, device_video_interface(mconfig, *this)
- , m_cgrom(0)
+ , m_cgrom(nullptr)
, m_audiocnt(0)
, m_audioval(0)
, m_audioreset(0)
- , m_ram(0)
+ , m_ram(nullptr)
{
}
@@ -97,11 +97,11 @@ gic_device::gic_device(const machine_config &mconfig, device_type type, const ch
: device_t(mconfig, type, name, tag, owner, clock, shortname, source)
, device_sound_interface(mconfig, *this)
, device_video_interface(mconfig, *this)
- , m_cgrom(0)
+ , m_cgrom(nullptr)
, m_audiocnt(0)
, m_audioval(0)
, m_audioreset(0)
- , m_ram(0)
+ , m_ram(nullptr)
{
}
diff --git a/src/mame/video/gime.cpp b/src/mame/video/gime.cpp
index 83b78e92b25..a98cd3d83cd 100644
--- a/src/mame/video/gime.cpp
+++ b/src/mame/video/gime.cpp
@@ -113,9 +113,9 @@ gime_base_device::gime_base_device(const machine_config &mconfig, device_type ty
m_write_irq(*this),
m_write_firq(*this),
m_read_floating_bus(*this),
- m_maincpu_tag(NULL),
- m_ram_tag(NULL),
- m_ext_tag(NULL)
+ m_maincpu_tag(nullptr),
+ m_ram_tag(nullptr),
+ m_ext_tag(nullptr)
{
}
@@ -620,7 +620,7 @@ void gime_base_device::update_memory(int bank)
// are we in onboard ROM or cart ROM?
UINT8 *rom_ptr = (block & 4) ? m_cart_rom : m_rom;
// TODO: make this unmapped
- if (rom_ptr==NULL) rom_ptr = m_rom;
+ if (rom_ptr==nullptr) rom_ptr = m_rom;
// perform the look up
memory = &rom_ptr[(block & 3) * 0x2000];
is_read_only = true;
@@ -1738,7 +1738,7 @@ inline void gime_base_device::render_scanline(const scanline_record *scanline, p
int left_border, right_border;
int x, x2, pixel_position;
pixel_t border_color = resolver->lookup(scanline->m_border);
- const pixel_t *resolved_palette = NULL;
+ const pixel_t *resolved_palette = nullptr;
/* is this a wide video mode? */
bool wide = !m_legacy_video && (scanline->m_ff99_value & 0x04);
diff --git a/src/mame/video/gp9001.cpp b/src/mame/video/gp9001.cpp
index 711eb1b0199..9a8c379bf7f 100644
--- a/src/mame/video/gp9001.cpp
+++ b/src/mame/video/gp9001.cpp
@@ -228,7 +228,7 @@ gp9001vdp_device::gp9001vdp_device(const machine_config &mconfig, const char *ta
const address_space_config *gp9001vdp_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
TILE_GET_INFO_MEMBER(gp9001vdp_device::get_top0_tile_info)
diff --git a/src/mame/video/gyruss.cpp b/src/mame/video/gyruss.cpp
index 3f0a77465a9..f08b60fc0dd 100644
--- a/src/mame/video/gyruss.cpp
+++ b/src/mame/video/gyruss.cpp
@@ -43,7 +43,7 @@ PALETTE_INIT_MEMBER(gyruss_state, gyruss)
compute_resistor_weights(0, 255, -1.0,
3, resistances_rg, weights_rg, 470, 0,
2, resistances_b, weights_b, 470, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
/* create a lookup table for the palette */
for (i = 0; i < 0x20; i++)
diff --git a/src/mame/video/hnayayoi.cpp b/src/mame/video/hnayayoi.cpp
index 7c3d10f77c2..42470fd2c59 100644
--- a/src/mame/video/hnayayoi.cpp
+++ b/src/mame/video/hnayayoi.cpp
@@ -27,7 +27,7 @@ void hnayayoi_state::common_vh_start( int num_pixmaps )
m_pixmap[i] = auto_alloc_array(machine(), UINT8, 256 * 256);
}
else
- m_pixmap[i] = NULL;
+ m_pixmap[i] = nullptr;
}
}
diff --git a/src/mame/video/hng64.cpp b/src/mame/video/hng64.cpp
index 63bbff6e2f6..ac7084687b6 100644
--- a/src/mame/video/hng64.cpp
+++ b/src/mame/video/hng64.cpp
@@ -575,7 +575,7 @@ void hng64_state::hng64_drawtilemap(screen_device &screen, bitmap_rgb32 &bitmap,
//}
// Select the proper tilemap size
- tilemap_t* tilemap = NULL;
+ tilemap_t* tilemap = nullptr;
if (global_dimensions==0)
{
if (bigTilemapBit) tilemap = m_tilemap[tm].m_tilemap_16x16;
@@ -1274,11 +1274,11 @@ void hng64_state::video_start()
m_tilemap[3].m_tilemap_16x16 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(hng64_state::get_hng64_tile3_16x16_info),this), TILEMAP_SCAN_ROWS, 16, 16, 128, 128); /* 128x128x4 = 0x10000 */
m_tilemap[3].m_tilemap_16x16_alt = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(hng64_state::get_hng64_tile3_16x16_info),this), TILEMAP_SCAN_ROWS, 16, 16, 256, 64); /* 128x128x4 = 0x10000 */
- for (int i = 0; i < 4; i++)
+ for (auto & elem : m_tilemap)
{
- m_tilemap[i].m_tilemap_8x8->set_transparent_pen(0);
- m_tilemap[i].m_tilemap_16x16->set_transparent_pen(0);
- m_tilemap[i].m_tilemap_16x16_alt->set_transparent_pen(0);
+ elem.m_tilemap_8x8->set_transparent_pen(0);
+ elem.m_tilemap_16x16->set_transparent_pen(0);
+ elem.m_tilemap_16x16_alt->set_transparent_pen(0);
}
// Debug switch, turn on / off additive blending on a per-tilemap basis
diff --git a/src/mame/video/igs017_igs031.cpp b/src/mame/video/igs017_igs031.cpp
index 81fbdd64e57..8aa254db422 100644
--- a/src/mame/video/igs017_igs031.cpp
+++ b/src/mame/video/igs017_igs031.cpp
@@ -94,7 +94,7 @@ igs017_igs031_device::igs017_igs031_device(const machine_config &mconfig, const
const address_space_config *igs017_igs031_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
UINT16 igs017_igs031_device::palette_callback_straight(UINT16 bgr)
diff --git a/src/mame/video/irobot.cpp b/src/mame/video/irobot.cpp
index 628a5c480e3..418384d4f99 100644
--- a/src/mame/video/irobot.cpp
+++ b/src/mame/video/irobot.cpp
@@ -353,7 +353,7 @@ UINT32 irobot_state::screen_update_irobot(screen_device &screen, bitmap_ind16 &b
/* copy the polygon bitmap */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
- draw_scanline8(bitmap, 0, y, BITMAP_WIDTH, &bitmap_base[y * BITMAP_WIDTH], NULL);
+ draw_scanline8(bitmap, 0, y, BITMAP_WIDTH, &bitmap_base[y * BITMAP_WIDTH], nullptr);
/* redraw the non-zero characters in the alpha layer */
for (y = offs = 0; y < 32; y++)
diff --git a/src/mame/video/itech32.cpp b/src/mame/video/itech32.cpp
index 856cdf6844f..f0b9b84b8e0 100644
--- a/src/mame/video/itech32.cpp
+++ b/src/mame/video/itech32.cpp
@@ -1169,8 +1169,8 @@ void itech32_state::handle_video_command()
}
else
{
- if (m_enable_latch[0]) shiftreg_clear(m_videoplane[0], NULL);
- if (m_enable_latch[1]) shiftreg_clear(m_videoplane[1], NULL);
+ if (m_enable_latch[0]) shiftreg_clear(m_videoplane[0], nullptr);
+ if (m_enable_latch[1]) shiftreg_clear(m_videoplane[1], nullptr);
}
g_profiler.stop();
@@ -1386,12 +1386,12 @@ UINT32 itech32_state::screen_update_itech32(screen_device &screen, bitmap_ind16
}
/* draw from the buffer */
- draw_scanline16(bitmap, cliprect.min_x, y, cliprect.width(), &scanline[cliprect.min_x], NULL);
+ draw_scanline16(bitmap, cliprect.min_x, y, cliprect.width(), &scanline[cliprect.min_x], nullptr);
}
/* otherwise, draw directly from VRAM */
else
- draw_scanline16(bitmap, cliprect.min_x, y, cliprect.width(), &src1[cliprect.min_x], NULL);
+ draw_scanline16(bitmap, cliprect.min_x, y, cliprect.width(), &src1[cliprect.min_x], nullptr);
}
return 0;
}
diff --git a/src/mame/video/jalblend.cpp b/src/mame/video/jalblend.cpp
index acfeadd470e..1220d2a3d09 100644
--- a/src/mame/video/jalblend.cpp
+++ b/src/mame/video/jalblend.cpp
@@ -26,7 +26,7 @@ const device_type JALECO_BLEND = &device_creator<jaleco_blend_device>;
jaleco_blend_device::jaleco_blend_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, JALECO_BLEND, "Jaleco Blending Device", tag, owner, clock, "jaleco_blend", __FILE__),
- m_table(NULL)
+ m_table(nullptr)
{
}
diff --git a/src/mame/video/k001005.cpp b/src/mame/video/k001005.cpp
index eb15e55616f..0a6b3e535b7 100644
--- a/src/mame/video/k001005.cpp
+++ b/src/mame/video/k001005.cpp
@@ -1173,16 +1173,16 @@ const device_type K001005 = &device_creator<k001005_device>;
k001005_device::k001005_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K001005, "K001005 Polygon Renderer", tag, owner, clock, "k001005", __FILE__),
device_video_interface(mconfig, *this),
- m_k001006(NULL),
- m_fifo(NULL),
+ m_k001006(nullptr),
+ m_fifo(nullptr),
m_status(0),
m_ram_ptr(0),
m_fifo_read_ptr(0),
m_fifo_write_ptr(0),
m_reg_far_z(0)
{
- m_ram[0] = 0;
- m_ram[1] = 0;
+ m_ram[0] = nullptr;
+ m_ram[1] = nullptr;
}
//-------------------------------------------------
diff --git a/src/mame/video/k001006.cpp b/src/mame/video/k001006.cpp
index f6b5626a78d..67a55f137fc 100644
--- a/src/mame/video/k001006.cpp
+++ b/src/mame/video/k001006.cpp
@@ -16,11 +16,11 @@ const device_type K001006 = &device_creator<k001006_device>;
k001006_device::k001006_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K001006, "K001006 Texel Unit", tag, owner, clock, "k001006", __FILE__),
- m_pal_ram(NULL),
- m_unknown_ram(NULL),
+ m_pal_ram(nullptr),
+ m_unknown_ram(nullptr),
m_addr(0),
m_device_sel(0),
- m_palette(NULL),
+ m_palette(nullptr),
m_tex_layout(0)
{
}
diff --git a/src/mame/video/k001604.cpp b/src/mame/video/k001604.cpp
index 1ce897f4785..474dddce394 100644
--- a/src/mame/video/k001604.cpp
+++ b/src/mame/video/k001604.cpp
@@ -25,9 +25,9 @@ k001604_device::k001604_device(const machine_config &mconfig, const char *tag, d
m_roz_size(0),
m_txt_mem_offset(0),
m_roz_mem_offset(0),
- m_tile_ram(NULL),
- m_char_ram(NULL),
- m_reg(NULL),
+ m_tile_ram(nullptr),
+ m_char_ram(nullptr),
+ m_reg(nullptr),
m_gfxdecode(*this),
m_palette(*this)
{
diff --git a/src/mame/video/k007121.cpp b/src/mame/video/k007121.cpp
index 3bc2c4f3be8..6914945baa5 100644
--- a/src/mame/video/k007121.cpp
+++ b/src/mame/video/k007121.cpp
@@ -235,7 +235,7 @@ void k007121_device::sprites_draw( bitmap_ind16 &bitmap, const rectangle &clipre
// gfx_element *gfx = gfxs[chip];
int flipscreen = m_flipscreen;
int i, num, inc, offs[5];
- int is_flakatck = (palette == NULL);
+ int is_flakatck = (palette == nullptr);
if (is_flakatck)
{
diff --git a/src/mame/video/k007342.cpp b/src/mame/video/k007342.cpp
index bc482a5e4ad..0cc57b6c826 100644
--- a/src/mame/video/k007342.cpp
+++ b/src/mame/video/k007342.cpp
@@ -39,12 +39,12 @@ const device_type K007342 = &device_creator<k007342_device>;
k007342_device::k007342_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K007342, "K007342 Video Controller", tag, owner, clock, "k007342", __FILE__),
- m_ram(NULL),
- m_scroll_ram(NULL),
- m_videoram_0(NULL),
- m_videoram_1(NULL),
- m_colorram_0(NULL),
- m_colorram_1(NULL),
+ m_ram(nullptr),
+ m_scroll_ram(nullptr),
+ m_videoram_0(nullptr),
+ m_videoram_1(nullptr),
+ m_colorram_0(nullptr),
+ m_colorram_1(nullptr),
//m_tilemap[2];
m_flipscreen(0),
m_int_enabled(0),
diff --git a/src/mame/video/k007420.cpp b/src/mame/video/k007420.cpp
index cec62760fc8..d9806491022 100644
--- a/src/mame/video/k007420.cpp
+++ b/src/mame/video/k007420.cpp
@@ -20,7 +20,7 @@ const device_type K007420 = &device_creator<k007420_device>;
k007420_device::k007420_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K007420, "K007420 Sprite Generator", tag, owner, clock, "k007420", __FILE__),
- m_ram(NULL),
+ m_ram(nullptr),
m_flipscreen(0),
m_palette(*this),
m_banklimit(0)
diff --git a/src/mame/video/k037122.cpp b/src/mame/video/k037122.cpp
index 2a96426952e..c5e42a8c4fc 100644
--- a/src/mame/video/k037122.cpp
+++ b/src/mame/video/k037122.cpp
@@ -18,9 +18,9 @@ const device_type K037122 = &device_creator<k037122_device>;
k037122_device::k037122_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K037122, "K037122 2D Tilemap", tag, owner, clock, "k037122", __FILE__),
device_video_interface(mconfig, *this),
- m_tile_ram(NULL),
- m_char_ram(NULL),
- m_reg(NULL),
+ m_tile_ram(nullptr),
+ m_char_ram(nullptr),
+ m_reg(nullptr),
m_gfx_index(0),
m_gfxdecode(*this),
m_palette(*this)
diff --git a/src/mame/video/k051316.cpp b/src/mame/video/k051316.cpp
index a5411f463ae..958b38fab3f 100644
--- a/src/mame/video/k051316.cpp
+++ b/src/mame/video/k051316.cpp
@@ -106,7 +106,7 @@ GFXDECODE_END
k051316_device::k051316_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K051316, "K051316 PSAC", tag, owner, clock, "k051316", __FILE__),
device_gfx_interface(mconfig, *this, gfxinfo),
- m_zoom_rom(NULL),
+ m_zoom_rom(nullptr),
m_zoom_size(0),
m_dx(0),
m_dy(0),
@@ -152,7 +152,7 @@ void k051316_device::set_bpp(device_t &device, int bpp)
void k051316_device::device_start()
{
memory_region *ROM = region();
- if (ROM != NULL)
+ if (ROM != nullptr)
{
m_zoom_rom = ROM->base();
m_zoom_size = ROM->bytes();
diff --git a/src/mame/video/k051960.cpp b/src/mame/video/k051960.cpp
index 96c1acb2faf..45f634e95ca 100644
--- a/src/mame/video/k051960.cpp
+++ b/src/mame/video/k051960.cpp
@@ -128,12 +128,12 @@ GFXDECODE_END
k051960_device::k051960_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K051960, "K051960 Sprite Generator", tag, owner, clock, "k051960", __FILE__),
device_gfx_interface(mconfig, *this, gfxinfo),
- m_ram(NULL),
- m_sprite_rom(NULL),
+ m_ram(nullptr),
+ m_sprite_rom(nullptr),
m_sprite_size(0),
- m_screen_tag(NULL),
- m_screen(NULL),
- m_scanline_timer(NULL),
+ m_screen_tag(nullptr),
+ m_screen(nullptr),
+ m_scanline_timer(nullptr),
m_irq_handler(*this),
m_firq_handler(*this),
m_nmi_handler(*this),
diff --git a/src/mame/video/k052109.cpp b/src/mame/video/k052109.cpp
index ccffe5f2e89..07e4e1ef80c 100644
--- a/src/mame/video/k052109.cpp
+++ b/src/mame/video/k052109.cpp
@@ -162,25 +162,25 @@ GFXDECODE_END
k052109_device::k052109_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K052109, "K052109 Tilemap Generator", tag, owner, clock, "k052109", __FILE__),
device_gfx_interface(mconfig, *this, gfxinfo),
- m_ram(NULL),
- m_videoram_F(NULL),
- m_videoram_A(NULL),
- m_videoram_B(NULL),
- m_videoram2_F(NULL),
- m_videoram2_A(NULL),
- m_videoram2_B(NULL),
- m_colorram_F(NULL),
- m_colorram_A(NULL),
- m_colorram_B(NULL),
+ m_ram(nullptr),
+ m_videoram_F(nullptr),
+ m_videoram_A(nullptr),
+ m_videoram_B(nullptr),
+ m_videoram2_F(nullptr),
+ m_videoram2_A(nullptr),
+ m_videoram2_B(nullptr),
+ m_colorram_F(nullptr),
+ m_colorram_A(nullptr),
+ m_colorram_B(nullptr),
m_tileflip_enable(0),
m_has_extra_video_ram(0),
m_rmrd_line(0),
m_irq_enabled(0),
m_romsubbank(0),
m_scrollctrl(0),
- m_char_rom(NULL),
+ m_char_rom(nullptr),
m_char_size(0),
- m_screen_tag(NULL),
+ m_screen_tag(nullptr),
m_irq_handler(*this),
m_firq_handler(*this),
m_nmi_handler(*this)
@@ -205,7 +205,7 @@ void k052109_device::set_ram(device_t &device, bool ram)
void k052109_device::device_start()
{
- if (m_screen_tag != NULL)
+ if (m_screen_tag != nullptr)
{
// make sure our screen is started
screen_device *screen = m_owner->subdevice<screen_device>(m_screen_tag);
@@ -216,7 +216,7 @@ void k052109_device::device_start()
screen->register_vblank_callback(vblank_state_delegate(FUNC(k052109_device::vblank_callback), this));
}
- if (region() != NULL)
+ if (region() != nullptr)
{
m_char_rom = region()->base();
m_char_size = region()->bytes();
diff --git a/src/mame/video/k053244_k053245.cpp b/src/mame/video/k053244_k053245.cpp
index 4a887b8004f..8596af1ce54 100644
--- a/src/mame/video/k053244_k053245.cpp
+++ b/src/mame/video/k053244_k053245.cpp
@@ -84,9 +84,9 @@ GFXDECODE_END
k05324x_device::k05324x_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K053244, "K053244 & 053245 Sprite Generator", tag, owner, clock, "k05324x", __FILE__),
device_gfx_interface(mconfig, *this, gfxinfo),
- m_ram(NULL),
- m_buffer(NULL),
- m_sprite_rom(NULL),
+ m_ram(nullptr),
+ m_buffer(nullptr),
+ m_sprite_rom(nullptr),
m_dx(0),
m_dy(0),
m_rombank(0),
@@ -152,8 +152,8 @@ void k05324x_device::device_reset()
{
m_rombank = 0;
- for (int i = 0; i < 0x10; i++)
- m_regs[i] = 0;
+ for (auto & elem : m_regs)
+ elem = 0;
}
/*****************************************************************************
diff --git a/src/mame/video/k053246_k053247_k055673.cpp b/src/mame/video/k053246_k053247_k055673.cpp
index dc678d36a45..b97fc461e63 100644
--- a/src/mame/video/k053246_k053247_k055673.cpp
+++ b/src/mame/video/k053246_k053247_k055673.cpp
@@ -49,19 +49,19 @@ The sprite RAM format is very similar to the 053245.
void k053247_device::clear_all()
{
- m_ram = 0;
- m_gfx = 0;
+ m_ram = nullptr;
+ m_gfx = nullptr;
- for (int i=0;i<8;i++)
- m_kx46_regs[i] = 0;
+ for (auto & elem : m_kx46_regs)
+ elem = 0;
- for (int i=0;i<16;i++)
- m_kx47_regs[i] = 0;
+ for (auto & elem : m_kx47_regs)
+ elem = 0;
m_objcha_line = 0;
m_z_rejection = 0;
- m_memory_region = 0;
+ m_memory_region = nullptr;
}
void k053247_device::k053247_get_ram( UINT16 **ram )
@@ -400,7 +400,7 @@ void k053247_device::k053247_sprites_draw_common( _BitmapClass &bitmap, const re
m_k053247_cb(&code, &color, &primask);
k053247_draw_single_sprite_gxcore( bitmap, cliprect,
- NULL, NULL,
+ nullptr, nullptr,
code, m_ram, offs,
color,
/* gx only */
@@ -967,7 +967,7 @@ void k055673_device::device_start()
/* find first empty slot to decode gfx */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == 0)
+ if (m_gfxdecode->gfx(gfx_index) == nullptr)
break;
assert(gfx_index != MAX_GFX_ELEMENTS);
diff --git a/src/mame/video/k053246_k053247_k055673.h b/src/mame/video/k053246_k053247_k055673.h
index 9fa846f593e..951c5484cc8 100644
--- a/src/mame/video/k053246_k053247_k055673.h
+++ b/src/mame/video/k053246_k053247_k055673.h
@@ -266,7 +266,7 @@ public:
pri,
zcode, alpha, drawmode,
gx_objzbuf, gx_shdzbuf,
- 0,0
+ 0,nullptr
);
}
@@ -308,7 +308,7 @@ public:
nozoom,
0,
0, 0, 0,
- 0, 0,
+ nullptr, nullptr,
primask,whichtable
);
diff --git a/src/mame/video/k053936.cpp b/src/mame/video/k053936.cpp
index 4852e8c1a34..b7ce3aa158f 100644
--- a/src/mame/video/k053936.cpp
+++ b/src/mame/video/k053936.cpp
@@ -232,8 +232,8 @@ const device_type K053936 = &device_creator<k053936_device>;
k053936_device::k053936_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, K053936, "K053936 Video Controller", tag, owner, clock, "k053936", __FILE__),
- m_ctrl(NULL),
- m_linectrl(NULL),
+ m_ctrl(nullptr),
+ m_linectrl(nullptr),
m_wrap(0),
m_xoff(0),
m_yoff(0)
diff --git a/src/mame/video/k054156_k054157_k056832.cpp b/src/mame/video/k054156_k054157_k056832.cpp
index a7c5e7954b3..3a52d677ff7 100644
--- a/src/mame/video/k054156_k054157_k056832.cpp
+++ b/src/mame/video/k054156_k054157_k056832.cpp
@@ -187,15 +187,15 @@ k056832_device::k056832_device(const machine_config &mconfig, const char *tag, d
//*m_pixmap[K056832_PAGE_COUNT],
//m_regs[0x20],
//m_regsb[4],
- m_rombase(NULL),
+ m_rombase(nullptr),
m_num_gfx_banks(0),
m_cur_gfx_banks(0),
- m_gfx_memory_region(NULL),
+ m_gfx_memory_region(nullptr),
m_gfx_num(0),
m_bpp(-1),
m_big(0),
m_djmain_hack(0),
- m_k055555_tag(NULL),
+ m_k055555_tag(nullptr),
//m_layer_assoc_with_page[K056832_PAGE_COUNT],
//m_layer_offs[8][2],
//m_lsram_page[8][2],
@@ -219,7 +219,7 @@ k056832_device::k056832_device(const machine_config &mconfig, const char *tag, d
m_use_ext_linescroll(0),
m_uses_tile_banks(0),
m_cur_tile_bank(0),
- m_k055555(NULL),
+ m_k055555(nullptr),
m_gfxdecode(*this),
m_palette(*this)
{
@@ -1452,7 +1452,7 @@ printf("\nend\n");
}
*/
last_active = m_active_layer;
- new_colorbase = (m_k055555 != NULL) ? m_k055555->K055555_get_palette_index(layer) : 0;
+ new_colorbase = (m_k055555 != nullptr) ? m_k055555->K055555_get_palette_index(layer) : 0;
for (r = 0; r < rowspan; r++)
{
@@ -1557,7 +1557,7 @@ printf("\nend\n");
m_active_layer = layer;
}
- if (m_k055555 != NULL) // are we using k055555 palette?
+ if (m_k055555 != nullptr) // are we using k055555 palette?
{
if (m_last_colorbase[pageIndex] != new_colorbase)
{
@@ -1757,7 +1757,7 @@ void k056832_device::tilemap_draw_dj( screen_device &screen, bitmap_rgb32 &bitma
sdat_adv = -sdat_adv;
last_active = m_active_layer;
- new_colorbase = (m_k055555 != NULL) ? m_k055555->K055555_get_palette_index(layer) : 0;
+ new_colorbase = (m_k055555 != nullptr) ? m_k055555->K055555_get_palette_index(layer) : 0;
for (r = 0; r <= rowspan; r++)
{
@@ -1838,7 +1838,7 @@ void k056832_device::tilemap_draw_dj( screen_device &screen, bitmap_rgb32 &bitma
m_active_layer = layer;
}
- if (m_k055555 != NULL) // are we using k055555 palette?
+ if (m_k055555 != nullptr) // are we using k055555 palette?
{
if (m_last_colorbase[pageIndex] != new_colorbase)
{
@@ -2102,7 +2102,7 @@ void k056832_device::create_gfx(const char *gfx_memory_region, int bpp, int big)
/* find first empty slot to decode gfx */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
{
- if (m_gfxdecode->gfx(gfx_index) == 0) break;
+ if (m_gfxdecode->gfx(gfx_index) == nullptr) break;
}
assert(gfx_index != MAX_GFX_ELEMENTS);
@@ -2371,7 +2371,7 @@ void k056832_device::m_tilemap_draw(screen_device &screen, bitmap_rgb32 &bitmap,
if (flipy) sdat_adv = -sdat_adv;
last_active = m_active_layer;
- new_colorbase = (m_k055555 != NULL) ? m_k055555->K055555_get_palette_index(layer) : 0;
+ new_colorbase = (m_k055555 != nullptr) ? m_k055555->K055555_get_palette_index(layer) : 0;
for (r=0; r<rowspan; r++)
{
@@ -2469,7 +2469,7 @@ void k056832_device::m_tilemap_draw(screen_device &screen, bitmap_rgb32 &bitmap,
m_active_layer = layer;
}
- if (m_k055555 != NULL)
+ if (m_k055555 != nullptr)
{
if (m_last_colorbase[pageIndex] != new_colorbase)
{
diff --git a/src/mame/video/k054156_k054157_k056832.h b/src/mame/video/k054156_k054157_k056832.h
index 71e1008002a..918b5314109 100644
--- a/src/mame/video/k054156_k054157_k056832.h
+++ b/src/mame/video/k054156_k054157_k056832.h
@@ -41,7 +41,7 @@ public:
k056832_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
~k056832_device()
{
- m_k055555 = 0;
+ m_k055555 = nullptr;
}
static void set_k056832_callback(device_t &device, k056832_cb_delegate callback) { downcast<k056832_device &>(device).m_k056832_cb = callback; }
diff --git a/src/mame/video/k054338.cpp b/src/mame/video/k054338.cpp
index 5a389a4c01a..928f331991f 100644
--- a/src/mame/video/k054338.cpp
+++ b/src/mame/video/k054338.cpp
@@ -24,7 +24,7 @@ k054338_device::k054338_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, K054338, "K054338 Mixer", tag, owner, clock, "k054338", __FILE__),
device_video_interface(mconfig, *this),
m_alpha_inv(0),
- m_k055555_tag(NULL)
+ m_k055555_tag(nullptr)
{
memset(&m_regs, 0, sizeof(m_regs));
memset(&m_shd_rgb, 0, sizeof(m_shd_rgb));
@@ -36,7 +36,7 @@ k054338_device::k054338_device(const machine_config &mconfig, const char *tag, d
void k054338_device::device_start()
{
- m_k055555 = m_k055555_tag ? machine().device<k055555_device>(m_k055555_tag) : NULL;
+ m_k055555 = m_k055555_tag ? machine().device<k055555_device>(m_k055555_tag) : nullptr;
save_item(NAME(m_regs));
save_item(NAME(m_shd_rgb));
diff --git a/src/mame/video/k057714.cpp b/src/mame/video/k057714.cpp
index 2ab8685cf56..405f0e722c2 100644
--- a/src/mame/video/k057714.cpp
+++ b/src/mame/video/k057714.cpp
@@ -35,11 +35,11 @@ void k057714_device::device_reset()
m_vram_fifo0_addr = 0;
m_vram_fifo1_addr = 0;
- for (int i=0; i < 4; i++)
+ for (auto & elem : m_frame)
{
- m_frame[i].base = 0;
- m_frame[i].width = 0;
- m_frame[i].height = 0;
+ elem.base = 0;
+ elem.width = 0;
+ elem.height = 0;
}
}
diff --git a/src/mame/video/kan_pand.cpp b/src/mame/video/kan_pand.cpp
index 5a4f94236f8..ad8777a2ff7 100644
--- a/src/mame/video/kan_pand.cpp
+++ b/src/mame/video/kan_pand.cpp
@@ -226,7 +226,7 @@ void kaneko_pandora_device::draw( bitmap_ind16 &bitmap, const rectangle &cliprec
void kaneko_pandora_device::eof( )
{
- assert(m_spriteram != NULL);
+ assert(m_spriteram != nullptr);
// the games can disable the clearing of the sprite bitmap, to leave sprite trails
if (m_clear_bitmap)
diff --git a/src/mame/video/kaneko16.cpp b/src/mame/video/kaneko16.cpp
index 18d1e602511..47dc6e209d9 100644
--- a/src/mame/video/kaneko16.cpp
+++ b/src/mame/video/kaneko16.cpp
@@ -116,8 +116,8 @@ VIDEO_START_MEMBER(kaneko16_berlwall_state,berlwall)
/* Render the hi-color static backgrounds held in the ROMs */
- for (int screen = 0; screen < 32; screen++)
- m_bg15_bitmap[screen].allocate(256, 256);
+ for (auto & elem : m_bg15_bitmap)
+ elem.allocate(256, 256);
/*
8aba is used as background color
diff --git a/src/mame/video/klax.cpp b/src/mame/video/klax.cpp
index d9369f7e507..bcc0a9b49ff 100644
--- a/src/mame/video/klax.cpp
+++ b/src/mame/video/klax.cpp
@@ -103,7 +103,7 @@ UINT32 klax_state::screen_update_klax(screen_device &screen, bitmap_ind16 &bitma
// draw and merge the MO
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/konamigx.cpp b/src/mame/video/konamigx.cpp
index f87156e3b01..971972ba435 100644
--- a/src/mame/video/konamigx.cpp
+++ b/src/mame/video/konamigx.cpp
@@ -864,7 +864,7 @@ void konamigx_state::konamigx_mixer_draw(screen_device &screen, bitmap_rgb32 &bi
m_gx_objzbuf, m_gx_shdzbuf, code, m_gx_spriteram, offs,
color, alpha, drawmode, zcode, pri,
/* non-gx only */
- 0,0,NULL,NULL,0
+ 0,0,nullptr,nullptr,0
);
}
/* the rest are tilemaps of various kinda */
@@ -1411,7 +1411,7 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3
if (m_gx_specialrozenable==3)
{
- konamigx_mixer(screen, bitmap, cliprect, m_gx_psac_tilemap, GXSUB_8BPP,0,0, 0, 0, m_gx_rushingheroes_hack);
+ konamigx_mixer(screen, bitmap, cliprect, m_gx_psac_tilemap, GXSUB_8BPP,nullptr,0, 0, nullptr, m_gx_rushingheroes_hack);
}
// hack, draw the roz tilemap if W is held
// todo: fix so that it works with the mixer without crashing(!)
@@ -1426,11 +1426,11 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3
else K053936_0_zoom_draw(screen, *m_type3_roz_temp_bitmap, temprect,m_gx_psac_tilemap, 0,0,0); // soccerss playfield
- konamigx_mixer(screen, bitmap, cliprect, 0, 0, 0, 0, 0, m_type3_roz_temp_bitmap, m_gx_rushingheroes_hack);
+ konamigx_mixer(screen, bitmap, cliprect, nullptr, 0, nullptr, 0, 0, m_type3_roz_temp_bitmap, m_gx_rushingheroes_hack);
}
else
{
- konamigx_mixer(screen, bitmap, cliprect, 0, 0, 0, 0, 0, 0, m_gx_rushingheroes_hack);
+ konamigx_mixer(screen, bitmap, cliprect, nullptr, 0, nullptr, 0, 0, nullptr, m_gx_rushingheroes_hack);
}
diff --git a/src/mame/video/legionna.cpp b/src/mame/video/legionna.cpp
index 5fccd7a222e..69b591ce001 100644
--- a/src/mame/video/legionna.cpp
+++ b/src/mame/video/legionna.cpp
@@ -33,7 +33,7 @@ WRITE16_MEMBER(legionna_state::tile_scroll_w)
COMBINE_DATA(scrollvals + offset);
data = scrollvals[offset];
- tilemap_t *tm = 0;
+ tilemap_t *tm = nullptr;
switch(offset/2) {
case 0: tm = m_background_layer; break;
case 1: tm = m_midground_layer; break;
diff --git a/src/mame/video/liberatr.cpp b/src/mame/video/liberatr.cpp
index af7b50584de..74c349924bf 100644
--- a/src/mame/video/liberatr.cpp
+++ b/src/mame/video/liberatr.cpp
@@ -80,7 +80,7 @@ void liberatr_state::init_planet(planet &liberatr_planet, UINT8 *planet_rom)
UINT8 *buffer;
planet_frame frame;
- planet_frame_line *line = 0;
+ planet_frame_line *line = nullptr;
UINT16 total_segment_count = 0;
diff --git a/src/mame/video/m10.cpp b/src/mame/video/m10.cpp
index f5dd92ed91e..1d5b029c3c6 100644
--- a/src/mame/video/m10.cpp
+++ b/src/mame/video/m10.cpp
@@ -30,7 +30,7 @@ static const gfx_layout backlayout =
{ 0, 1, 2, 3, 4, 5, 6, 7 },
EXTENDED_YOFFS,
32*8*8, /* every char takes 8 consecutive bytes */
- NULL, extyoffs
+ nullptr, extyoffs
};
static const gfx_layout charlayout =
diff --git a/src/mame/video/madalien.cpp b/src/mame/video/madalien.cpp
index 7d1822ad5b7..cd9447a6478 100644
--- a/src/mame/video/madalien.cpp
+++ b/src/mame/video/madalien.cpp
@@ -361,7 +361,7 @@ static const gfx_layout tilelayout =
static GFXDECODE_START( madalien )
- GFXDECODE_ENTRY( NULL, 0, charlayout, 0x20, 2 ) /* foreground characters, stored in RAM */
+ GFXDECODE_ENTRY( nullptr, 0, charlayout, 0x20, 2 ) /* foreground characters, stored in RAM */
GFXDECODE_ENTRY( "gfx1", 0, tilelayout, 0, 4 )
GFXDECODE_ENTRY( "gfx2", 0, headlightlayout, 0, 1 )
GFXDECODE_END
diff --git a/src/mame/video/magmax.cpp b/src/mame/video/magmax.cpp
index 1683199b40d..f6279a137f6 100644
--- a/src/mame/video/magmax.cpp
+++ b/src/mame/video/magmax.cpp
@@ -163,10 +163,10 @@ UINT32 magmax_state::screen_update_magmax(screen_device &screen, bitmap_ind16 &b
UINT16 line_data_flip_x[256];
for (i=0; i<256; i++)
line_data_flip_x[i] = line_data[255-i];
- draw_scanline16(bitmap, 0, 255-v, 256, line_data_flip_x, NULL);
+ draw_scanline16(bitmap, 0, 255-v, 256, line_data_flip_x, nullptr);
}
else
- draw_scanline16(bitmap, 0, v, 256, line_data, NULL);
+ draw_scanline16(bitmap, 0, v, 256, line_data, nullptr);
}
}
diff --git a/src/mame/video/maria.cpp b/src/mame/video/maria.cpp
index b2514770e82..a5501989e4b 100644
--- a/src/mame/video/maria.cpp
+++ b/src/mame/video/maria.cpp
@@ -93,12 +93,12 @@ void atari_maria_device::device_start()
void atari_maria_device::device_reset()
{
- for (int i = 0; i < 32; i++)
- m_maria_palette[i] = 0;
+ for (auto & elem : m_maria_palette)
+ elem = 0;
- for (int i = 0; i < 2; i++)
+ for (auto & elem : m_line_ram)
for (int j = 0; j < 160; j++)
- m_line_ram[i][j] = 0;
+ elem[j] = 0;
m_active_buffer = 0;
diff --git a/src/mame/video/matmania.cpp b/src/mame/video/matmania.cpp
index 848a8e93d9c..3a994d02079 100644
--- a/src/mame/video/matmania.cpp
+++ b/src/mame/video/matmania.cpp
@@ -162,9 +162,9 @@ UINT32 matmania_state::screen_update_matmania(screen_device &screen, bitmap_ind1
{
int scrolly = -*m_scroll;
if (m_pageselect[0] & 0x01) // maniach sets 0x20 sometimes, which must have a different meaning
- copyscrollbitmap(bitmap, *m_tmpbitmap2, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *m_tmpbitmap2, 0, nullptr, 1, &scrolly, cliprect);
else
- copyscrollbitmap(bitmap, *m_tmpbitmap, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *m_tmpbitmap, 0, nullptr, 1, &scrolly, cliprect);
}
@@ -235,9 +235,9 @@ UINT32 matmania_state::screen_update_maniach(screen_device &screen, bitmap_ind16
int scrolly = -*m_scroll;
if (m_pageselect[0] & 0x01) // this sets 0x20 sometimes, which must have a different meaning
- copyscrollbitmap(bitmap, *m_tmpbitmap2, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *m_tmpbitmap2, 0, nullptr, 1, &scrolly, cliprect);
else
- copyscrollbitmap(bitmap, *m_tmpbitmap, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, *m_tmpbitmap, 0, nullptr, 1, &scrolly, cliprect);
}
diff --git a/src/mame/video/mb60553.cpp b/src/mame/video/mb60553.cpp
index c6569ddba63..e3fd96d0d28 100644
--- a/src/mame/video/mb60553.cpp
+++ b/src/mame/video/mb60553.cpp
@@ -16,9 +16,9 @@ const device_type MB60553 = &device_creator<mb60553_zooming_tilemap_device>;
mb60553_zooming_tilemap_device::mb60553_zooming_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, MB60553, "MB60553 Zooming Tilemap", tag, owner, clock, "mb60553", __FILE__),
- m_vram(NULL),
+ m_vram(nullptr),
m_pal_base(0),
- m_lineram(NULL),
+ m_lineram(nullptr),
m_gfx_region(0),
m_gfxdecode(*this)
{
diff --git a/src/mame/video/mbee.cpp b/src/mame/video/mbee.cpp
index ce55969f6a3..fa9f884ae80 100644
--- a/src/mame/video/mbee.cpp
+++ b/src/mame/video/mbee.cpp
@@ -292,8 +292,8 @@ VIDEO_START_MEMBER( mbee_state, mono )
{
m_p_videoram = memregion("videoram")->base();
m_p_gfxram = memregion("gfx")->base()+0x1000;
- m_p_colorram = 0;
- m_p_attribram = 0;
+ m_p_colorram = nullptr;
+ m_p_attribram = nullptr;
m_is_premium = 0;
}
@@ -302,7 +302,7 @@ VIDEO_START_MEMBER( mbee_state, standard )
m_p_videoram = memregion("videoram")->base();
m_p_gfxram = memregion("gfx")->base()+0x1000;
m_p_colorram = memregion("colorram")->base();
- m_p_attribram = 0;
+ m_p_attribram = nullptr;
m_is_premium = 0;
}
diff --git a/src/mame/video/mcd212.cpp b/src/mame/video/mcd212.cpp
index 5476e0a5030..aec55056c8f 100644
--- a/src/mame/video/mcd212.cpp
+++ b/src/mame/video/mcd212.cpp
@@ -1470,37 +1470,37 @@ TIMER_CALLBACK_MEMBER( mcd212_device::perform_scan )
void mcd212_device::device_reset()
{
- for(int index = 0; index < 2; index++)
+ for(auto & elem : m_channel)
{
- m_channel[index].csrr = 0;
- m_channel[index].csrw = 0;
- m_channel[index].dcr = 0;
- m_channel[index].vsr = 0;
- m_channel[index].ddr = 0;
- m_channel[index].dcp = 0;
- m_channel[index].dca = 0;
- memset(m_channel[index].clut_r, 0, 256);
- memset(m_channel[index].clut_g, 0, 256);
- memset(m_channel[index].clut_b, 0, 256);
- m_channel[index].image_coding_method = 0;
- m_channel[index].transparency_control = 0;
- m_channel[index].plane_order = 0;
- m_channel[index].clut_bank = 0;
- m_channel[index].transparent_color_a = 0;
- m_channel[index].transparent_color_b = 0;
- m_channel[index].mask_color_a = 0;
- m_channel[index].mask_color_b = 0;
- m_channel[index].dyuv_abs_start_a = 0;
- m_channel[index].dyuv_abs_start_b = 0;
- m_channel[index].cursor_position = 0;
- m_channel[index].cursor_control = 0;
- memset((UINT8*)&m_channel[index].cursor_pattern, 0, 16 * sizeof(UINT32));
- memset((UINT8*)&m_channel[index].region_control, 0, 8 * sizeof(UINT32));
- m_channel[index].backdrop_color = 0;
- m_channel[index].mosaic_hold_a = 0;
- m_channel[index].mosaic_hold_b = 0;
- memset(m_channel[index].weight_factor_a, 0, 768);
- memset(m_channel[index].weight_factor_b, 0, 768);
+ elem.csrr = 0;
+ elem.csrw = 0;
+ elem.dcr = 0;
+ elem.vsr = 0;
+ elem.ddr = 0;
+ elem.dcp = 0;
+ elem.dca = 0;
+ memset(elem.clut_r, 0, 256);
+ memset(elem.clut_g, 0, 256);
+ memset(elem.clut_b, 0, 256);
+ elem.image_coding_method = 0;
+ elem.transparency_control = 0;
+ elem.plane_order = 0;
+ elem.clut_bank = 0;
+ elem.transparent_color_a = 0;
+ elem.transparent_color_b = 0;
+ elem.mask_color_a = 0;
+ elem.mask_color_b = 0;
+ elem.dyuv_abs_start_a = 0;
+ elem.dyuv_abs_start_b = 0;
+ elem.cursor_position = 0;
+ elem.cursor_control = 0;
+ memset((UINT8*)&elem.cursor_pattern, 0, 16 * sizeof(UINT32));
+ memset((UINT8*)&elem.region_control, 0, 8 * sizeof(UINT32));
+ elem.backdrop_color = 0;
+ elem.mosaic_hold_a = 0;
+ elem.mosaic_hold_b = 0;
+ memset(elem.weight_factor_a, 0, 768);
+ memset(elem.weight_factor_b, 0, 768);
}
memset(m_region_flag_0, 0, 768);
memset(m_region_flag_1, 0, 768);
diff --git a/src/mame/video/megasys1.cpp b/src/mame/video/megasys1.cpp
index ef6beea9144..ae519a2ef90 100644
--- a/src/mame/video/megasys1.cpp
+++ b/src/mame/video/megasys1.cpp
@@ -732,7 +732,7 @@ static const struct priority priorities[] =
{ 0x14032,0x04132,0x14032,0x04132,0xfffff,0xfffff,0xfffff,0xfffff,
0xfffff,0xfffff,0x01324,0xfffff,0xfffff,0xfffff,0xfffff,0xfffff }
},
- { 0 } // end of list: use the prom's data
+ { nullptr } // end of list: use the prom's data
};
diff --git a/src/mame/video/metro.cpp b/src/mame/video/metro.cpp
index 17622b68686..12127cce1a3 100644
--- a/src/mame/video/metro.cpp
+++ b/src/mame/video/metro.cpp
@@ -641,7 +641,7 @@ void metro_state::draw_layers( screen_device &screen, bitmap_ind16 &bitmap, cons
if (BIT(layers_ctrl, layer)) // for debug
{
- UINT16 *tilemapram = 0;
+ UINT16 *tilemapram = nullptr;
switch (layer)
{
diff --git a/src/mame/video/midyunit.cpp b/src/mame/video/midyunit.cpp
index cb66b1b3092..5190df267ca 100644
--- a/src/mame/video/midyunit.cpp
+++ b/src/mame/video/midyunit.cpp
@@ -563,7 +563,7 @@ TMS340X0_SCANLINE_IND16_CB_MEMBER(midyunit_state::scanline_update)
dest[x] = m_pen_map[src[coladdr++ & 0x1ff]];
/* handle autoerase on the previous line */
- autoerase_line(NULL, params->rowaddr - 1);
+ autoerase_line(nullptr, params->rowaddr - 1);
/* if this is the last update of the screen, set a timer to clear out the final line */
/* (since we update one behind) */
diff --git a/src/mame/video/mitchell.cpp b/src/mame/video/mitchell.cpp
index f4c4007bf50..0498f1bda1f 100644
--- a/src/mame/video/mitchell.cpp
+++ b/src/mame/video/mitchell.cpp
@@ -157,7 +157,7 @@ logerror("PC %04x: pang_gfxctrl_w %02x\n",space.device().safe_pc(),data);
/* bit 3 is unknown (used, e.g. marukin pulses it on the title screen) */
/* bit 4 selects OKI M6295 bank */
- if (m_oki != NULL)
+ if (m_oki != nullptr)
m_oki->set_bank_base((data & 0x10) ? 0x40000 : 0x00000);
/* bit 5 is palette RAM bank selector (doesn't apply to mgakuen) */
diff --git a/src/mame/video/model2.cpp b/src/mame/video/model2.cpp
index 4975a26fbbf..93d41b28552 100644
--- a/src/mame/video/model2.cpp
+++ b/src/mame/video/model2.cpp
@@ -451,9 +451,9 @@ static void model2_3d_process_quad( raster_state *raster, UINT32 attr )
/* get our list read to add the triangles */
ztri = raster->tri_sorted_list[object.z];
- if ( ztri != NULL )
+ if ( ztri != nullptr )
{
- while( ztri->next != NULL )
+ while( ztri->next != nullptr )
ztri = (triangle *)ztri->next;
}
@@ -492,9 +492,9 @@ static void model2_3d_process_quad( raster_state *raster, UINT32 attr )
memcpy( &tri->v[2], &verts[i], sizeof( poly_vertex ) );
/* add to our sorted list */
- tri->next = NULL;
+ tri->next = nullptr;
- if ( ztri == NULL )
+ if ( ztri == nullptr )
{
raster->tri_sorted_list[object.z] = tri;
}
@@ -688,9 +688,9 @@ static void model2_3d_process_triangle( raster_state *raster, UINT32 attr )
/* get our list read to add the triangles */
ztri = raster->tri_sorted_list[object.z];
- if ( ztri != NULL )
+ if ( ztri != nullptr )
{
- while( ztri->next != NULL )
+ while( ztri->next != nullptr )
ztri = (triangle *)ztri->next;
}
@@ -729,9 +729,9 @@ static void model2_3d_process_triangle( raster_state *raster, UINT32 attr )
memcpy( &tri->v[2], &verts[i], sizeof( poly_vertex ) );
/* add to our sorted list */
- tri->next = NULL;
+ tri->next = nullptr;
- if ( ztri == NULL )
+ if ( ztri == nullptr )
{
raster->tri_sorted_list[object.z] = tri;
}
@@ -953,13 +953,13 @@ void model2_state::model2_3d_frame_end( bitmap_rgb32 &bitmap, const rectangle &c
for( z = raster->max_z; z >= raster->min_z; z-- )
{
/* see if we have items at this z level */
- if ( raster->tri_sorted_list[z] != NULL )
+ if ( raster->tri_sorted_list[z] != nullptr )
{
/* get a pointer to the first triangle */
triangle *tri = raster->tri_sorted_list[z];
/* and loop clipping and rendering each triangle */
- while( tri != NULL )
+ while( tri != nullptr )
{
/* project and render */
model2_3d_project( tri );
@@ -2377,7 +2377,7 @@ static UINT32 * geo_end( geo_state *geo, UINT32 opcode, UINT32 *input )
model2_3d_push( raster, 0xFF000000 );
/* signal end by returning NULL */
- return NULL;
+ return nullptr;
}
/* Command 10: Dummy */
@@ -2558,7 +2558,7 @@ static void geo_parse( model2_state *state )
UINT32 *input = &state->m_bufferram[address];
UINT32 opcode;
- while( input != NULL && (input - state->m_bufferram) < 0x20000 )
+ while( input != nullptr && (input - state->m_bufferram) < 0x20000 )
{
/* read in the opcode */
opcode = *input++;
diff --git a/src/mame/video/model3.cpp b/src/mame/video/model3.cpp
index 33ed150f227..4cea4a5a2e7 100644
--- a/src/mame/video/model3.cpp
+++ b/src/mame/video/model3.cpp
@@ -548,7 +548,7 @@ void model3_state::invalidate_texture(int page, int texx, int texy, int texwidth
for (int y = 0; y < htiles; y++)
for (int x = 0; x < wtiles; x++)
- while (m_texcache[page][texy + y][texx + x] != NULL)
+ while (m_texcache[page][texy + y][texx + x] != nullptr)
{
cached_texture *freeme = m_texcache[page][texy + y][texx + x];
m_texcache[page][texy + y][texx + x] = freeme->next;
@@ -565,7 +565,7 @@ cached_texture *model3_state::get_texture(int page, int texx, int texy, int texw
int x, y;
/* if we have one already, validate it */
- for (tex = m_texcache[page][texy][texx]; tex != NULL; tex = tex->next)
+ for (tex = m_texcache[page][texy][texx]; tex != nullptr; tex = tex->next)
if (tex->width == texwidth && tex->height == texheight && tex->format == format)
return tex;
@@ -1446,7 +1446,7 @@ m3_triangle *model3_state::push_triangle(bool alpha)
if (m_tri_buffer_ptr >= TRI_BUFFER_SIZE)
{
- return NULL;
+ return nullptr;
//fatalerror("push_triangle: tri buffer max exceeded");
}
@@ -1459,7 +1459,7 @@ m3_triangle *model3_state::push_triangle(bool alpha)
if (m_tri_alpha_buffer_ptr >= TRI_ALPHA_BUFFER_SIZE)
{
- return NULL;
+ return nullptr;
//fatalerror("push_triangle: tri alpha buffer max exceeded");
}
@@ -1712,7 +1712,7 @@ void model3_state::draw_model(UINT32 addr)
}
else
{
- texture = NULL;
+ texture = nullptr;
}
for (i=2; i < num_vertices; i++)
diff --git a/src/mame/video/mystston.cpp b/src/mame/video/mystston.cpp
index ada64ddae6c..8a72fc1f416 100644
--- a/src/mame/video/mystston.cpp
+++ b/src/mame/video/mystston.cpp
@@ -81,7 +81,7 @@ void mystston_state::set_palette()
compute_resistor_weights(0, 255, -1.0,
3, resistances_rg, weights_rg, 0, 4700,
2, resistances_b, weights_b, 0, 4700,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
for (i = 0; i < 0x40; i++)
{
diff --git a/src/mame/video/mystwarr.cpp b/src/mame/video/mystwarr.cpp
index b3873916399..fee3daa0801 100644
--- a/src/mame/video/mystwarr.cpp
+++ b/src/mame/video/mystwarr.cpp
@@ -281,7 +281,7 @@ UINT32 mystwarr_state::screen_update_mystwarr(screen_device &screen, bitmap_rgb3
m_sprite_colorbase = m_k055555->K055555_get_palette_index(4)<<5;
- konamigx_mixer(screen, bitmap, cliprect, 0, 0, 0, 0, blendmode, 0, 0);
+ konamigx_mixer(screen, bitmap, cliprect, nullptr, 0, nullptr, 0, blendmode, nullptr, 0);
return 0;
}
@@ -298,7 +298,7 @@ UINT32 mystwarr_state::screen_update_metamrph(screen_device &screen, bitmap_rgb3
m_sprite_colorbase = m_k055555->K055555_get_palette_index(4)<<4;
- konamigx_mixer(screen, bitmap, cliprect, 0, GXSUB_K053250 | GXSUB_4BPP, 0, 0, 0, 0, 0);
+ konamigx_mixer(screen, bitmap, cliprect, nullptr, GXSUB_K053250 | GXSUB_4BPP, nullptr, 0, 0, nullptr, 0);
return 0;
}
@@ -321,7 +321,7 @@ UINT32 mystwarr_state::screen_update_martchmp(screen_device &screen, bitmap_rgb3
// not quite right
blendmode = (m_oinprion==0xef && m_k054338->register_r(K338_REG_PBLEND)) ? ((1<<16|GXMIX_BLEND_FORCE)<<2) : 0;
- konamigx_mixer(screen, bitmap, cliprect, 0, 0, 0, 0, blendmode, 0, 0);
+ konamigx_mixer(screen, bitmap, cliprect, nullptr, 0, nullptr, 0, blendmode, nullptr, 0);
return 0;
}
@@ -482,6 +482,6 @@ UINT32 mystwarr_state::screen_update_dadandrn(screen_device &screen, bitmap_rgb3
popmessage("K053936: PSAC colorbase changed");
}
- konamigx_mixer(screen, bitmap, cliprect, (m_roz_enable) ? m_ult_936_tilemap : 0, rozmode, 0, 0, 0, 0, 0);
+ konamigx_mixer(screen, bitmap, cliprect, (m_roz_enable) ? m_ult_936_tilemap : nullptr, rozmode, nullptr, 0, 0, nullptr, 0);
return 0;
}
diff --git a/src/mame/video/n64.cpp b/src/mame/video/n64.cpp
index 786f09f2f24..bba19f6aa56 100644
--- a/src/mame/video/n64.cpp
+++ b/src/mame/video/n64.cpp
@@ -2051,7 +2051,7 @@ void n64_rdp::draw_triangle(bool shade, bool texture, bool zbuffer, bool rect)
}
bool new_object = true;
- rdp_poly_state* object = NULL;
+ rdp_poly_state* object = nullptr;
bool valid = false;
INT32* minx = flip ? &minxhx : &minxmx;
@@ -3129,7 +3129,7 @@ n64_rdp::n64_rdp(n64_state &state) : poly_manager<UINT32, rdp_poly_state, 8, 320
ignore = false;
dolog = false;
m_aux_buf_ptr = 0;
- m_aux_buf = NULL;
+ m_aux_buf = nullptr;
m_pipe_clean = true;
m_pending_mode_block = false;
@@ -3145,9 +3145,9 @@ n64_rdp::n64_rdp(n64_state &state) : poly_manager<UINT32, rdp_poly_state, 8, 320
m_one.set(0xff, 0xff, 0xff, 0xff);
m_zero.set(0, 0, 0, 0);
- m_tmem = NULL;
+ m_tmem = nullptr;
- m_machine = NULL;
+ m_machine = nullptr;
//memset(m_hidden_bits, 3, 8388608);
diff --git a/src/mame/video/n64.h b/src/mame/video/n64.h
index 8c5a5e9f753..8f9bb174633 100644
--- a/src/mame/video/n64.h
+++ b/src/mame/video/n64.h
@@ -135,7 +135,7 @@ class n64_rdp : public poly_manager<UINT32, rdp_poly_state, 8, 32000>
public:
n64_rdp(n64_state &state);
- running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
+ running_machine &machine() const { assert(m_machine != nullptr); return *m_machine; }
void init_internal_state()
{
diff --git a/src/mame/video/namcos22.cpp b/src/mame/video/namcos22.cpp
index a5ee8803dae..aa59865c2aa 100644
--- a/src/mame/video/namcos22.cpp
+++ b/src/mame/video/namcos22.cpp
@@ -52,7 +52,7 @@ namcos22_renderer::namcos22_renderer(namcos22_state &state)
void namcos22_renderer::reset()
{
memset(&m_scenenode_root, 0, sizeof(m_scenenode_root));
- m_scenenode_cur = NULL;
+ m_scenenode_cur = nullptr;
m_clipx = 320;
m_clipy = 240;
@@ -649,7 +649,7 @@ struct namcos22_scenenode *namcos22_renderer::alloc_scenenode(running_machine &m
struct namcos22_scenenode *namcos22_renderer::new_scenenode(running_machine &machine, UINT32 zsort, namcos22_scenenode_type type)
{
struct namcos22_scenenode *node = &m_scenenode_root;
- struct namcos22_scenenode *prev = NULL;
+ struct namcos22_scenenode *prev = nullptr;
int hash = 0;
for (int i = 0; i < 24; i += NAMCOS22_RADIX_BITS)
@@ -728,7 +728,7 @@ void namcos22_renderer::render_scene(screen_device &screen, bitmap_rgb32 &bitmap
for (int i = NAMCOS22_RADIX_BUCKETS - 1; i >= 0; i--)
{
render_scene_nodes(screen, bitmap, node->data.nonleaf.next[i]);
- node->data.nonleaf.next[i] = NULL;
+ node->data.nonleaf.next[i] = nullptr;
}
m_clipx = 320;
@@ -2470,7 +2470,7 @@ void namcos22_state::init_tables()
void namcos22_state::video_start()
{
- m_is_ss22 = (m_iomcu == NULL);
+ m_is_ss22 = (m_iomcu == nullptr);
init_tables();
m_mix_bitmap = auto_bitmap_ind16_alloc(machine(), 640, 480);
diff --git a/src/mame/video/naughtyb.cpp b/src/mame/video/naughtyb.cpp
index e1114c84fe0..dba95b73a00 100644
--- a/src/mame/video/naughtyb.cpp
+++ b/src/mame/video/naughtyb.cpp
@@ -69,7 +69,7 @@ PALETTE_INIT_MEMBER(naughtyb_state, naughtyb)
compute_resistor_weights(0, 255, -1.0,
2, resistances, weights, 0, 0,
2, resistances, weights, 0, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
for (int i = 0;i < palette.entries(); i++)
{
@@ -246,7 +246,7 @@ UINT32 naughtyb_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
copybitmap(bitmap,m_tmpbitmap,0,0,-30*8,0,rightvisiblearea);
scrollx = ( m_cocktail ) ? *m_scrollreg - 239 : -*m_scrollreg + 16;
- copyscrollbitmap(bitmap,m_tmpbitmap,1,&scrollx,0,0,scrollvisiblearea);
+ copyscrollbitmap(bitmap,m_tmpbitmap,1,&scrollx,0,nullptr,scrollvisiblearea);
}
return 0;
}
diff --git a/src/mame/video/nbmj8891.cpp b/src/mame/video/nbmj8891.cpp
index 16c4643ba2a..56d40311475 100644
--- a/src/mame/video/nbmj8891.cpp
+++ b/src/mame/video/nbmj8891.cpp
@@ -587,11 +587,11 @@ UINT32 nbmj8891_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
if (m_gfxdraw_mode)
{
- copyscrollbitmap (bitmap, m_tmpbitmap0, 0, 0, 0, 0, cliprect);
- copyscrollbitmap_trans(bitmap, m_tmpbitmap1, 0, 0, 1, &scrolly, cliprect, 0xff);
+ copyscrollbitmap (bitmap, m_tmpbitmap0, 0, nullptr, 0, nullptr, cliprect);
+ copyscrollbitmap_trans(bitmap, m_tmpbitmap1, 0, nullptr, 1, &scrolly, cliprect, 0xff);
}
else
- copyscrollbitmap(bitmap, m_tmpbitmap0, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, m_tmpbitmap0, 0, nullptr, 1, &scrolly, cliprect);
}
else
bitmap.fill(0xff);
diff --git a/src/mame/video/nbmj8900.cpp b/src/mame/video/nbmj8900.cpp
index 1cfb31dee91..503b209249c 100644
--- a/src/mame/video/nbmj8900.cpp
+++ b/src/mame/video/nbmj8900.cpp
@@ -447,12 +447,12 @@ UINT32 nbmj8900_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
if (m_gfxdraw_mode)
{
- copyscrollbitmap(bitmap, m_tmpbitmap0, 0, 0, 0, 0, cliprect);
- copyscrollbitmap_trans(bitmap, m_tmpbitmap1, 0, 0, 1, &scrolly, cliprect, 0xff);
+ copyscrollbitmap(bitmap, m_tmpbitmap0, 0, nullptr, 0, nullptr, cliprect);
+ copyscrollbitmap_trans(bitmap, m_tmpbitmap1, 0, nullptr, 1, &scrolly, cliprect, 0xff);
}
else
{
- copyscrollbitmap(bitmap, m_tmpbitmap0, 0, 0, 1, &scrolly, cliprect);
+ copyscrollbitmap(bitmap, m_tmpbitmap0, 0, nullptr, 1, &scrolly, cliprect);
}
}
else
diff --git a/src/mame/video/nemesis.cpp b/src/mame/video/nemesis.cpp
index f5b15c30794..191f5e20d59 100644
--- a/src/mame/video/nemesis.cpp
+++ b/src/mame/video/nemesis.cpp
@@ -188,8 +188,8 @@ void nemesis_state::create_palette_lookups()
// normalize black/white levels
double black = m_palette_lookup[0];
double white = 255.0 / (m_palette_lookup[31] - black);
- for (int i = 0; i < 32; i++)
- m_palette_lookup[i] = (m_palette_lookup[i] - black) * white + 0.5;
+ for (auto & elem : m_palette_lookup)
+ elem = (elem - black) * white + 0.5;
}
diff --git a/src/mame/video/neogeo.cpp b/src/mame/video/neogeo.cpp
index 013c53eae06..752853d3ab4 100644
--- a/src/mame/video/neogeo.cpp
+++ b/src/mame/video/neogeo.cpp
@@ -30,26 +30,26 @@ void neogeo_state::create_rgb_lookups()
double weights_normal[5];
double scaler = compute_resistor_weights(0, 255, -1,
5, resistances, weights_normal, 0, 0,
- 0, NULL, NULL, 0, 0,
- 0, NULL, NULL, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
double weights_dark[5];
compute_resistor_weights(0, 255, scaler,
5, resistances, weights_dark, 8200, 0,
- 0, NULL, NULL, 0, 0,
- 0, NULL, NULL, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
double weights_shadow[5];
compute_resistor_weights(0, 255, scaler,
5, resistances, weights_shadow, 150, 0,
- 0, NULL, NULL, 0, 0,
- 0, NULL, NULL, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
double weights_dark_shadow[5];
compute_resistor_weights(0, 255, scaler,
5, resistances, weights_dark_shadow, 1.0 / ((1.0 / 8200) + (1.0 / 150)), 0,
- 0, NULL, NULL, 0, 0,
- 0, NULL, NULL, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
for (int i = 0; i < 32; i++)
{
diff --git a/src/mame/video/neogeo_spr.cpp b/src/mame/video/neogeo_spr.cpp
index b0c0db6fbd8..8a8089e8f2e 100644
--- a/src/mame/video/neogeo_spr.cpp
+++ b/src/mame/video/neogeo_spr.cpp
@@ -705,7 +705,7 @@ const device_type NEOGEO_SPRITE_OPTIMZIED = &device_creator<neosprite_optimized_
neosprite_optimized_device::neosprite_optimized_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: neosprite_base_device(mconfig, tag, owner, clock, NEOGEO_SPRITE_OPTIMZIED),
- m_spritegfx8(0)
+ m_spritegfx8(nullptr)
{
}
diff --git a/src/mame/video/nick.cpp b/src/mame/video/nick.cpp
index afb16ff815b..0da67848e5e 100644
--- a/src/mame/video/nick.cpp
+++ b/src/mame/video/nick.cpp
@@ -206,7 +206,7 @@ void nick_device::device_timer(emu_timer &timer, device_timer_id id, int param,
const address_space_config *nick_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == 0) ? &m_space_config : NULL;
+ return (spacenum == 0) ? &m_space_config : nullptr;
}
@@ -300,7 +300,7 @@ void nick_device::initialize_palette()
compute_resistor_weights(0, 0xff, -1.0,
3, resistances_rg, color_weights_rg, 0, 0,
2, resistances_b, color_weights_b, 0, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
for (int i = 0; i < 256; i++)
{
diff --git a/src/mame/video/nmk16.cpp b/src/mame/video/nmk16.cpp
index f412b1f3abe..4560985cc6a 100644
--- a/src/mame/video/nmk16.cpp
+++ b/src/mame/video/nmk16.cpp
@@ -112,7 +112,7 @@ void nmk16_state::nmk16_video_init()
m_spriteram_old2 = auto_alloc_array_clear(machine(), UINT16, 0x1000/2);
m_videoshift = 0; /* 256x224 screen, no shift */
- m_background_bitmap = NULL;
+ m_background_bitmap = nullptr;
m_simple_scroll = 1;
}
diff --git a/src/mame/video/offtwall.cpp b/src/mame/video/offtwall.cpp
index d5f49ba387b..4bba555e584 100644
--- a/src/mame/video/offtwall.cpp
+++ b/src/mame/video/offtwall.cpp
@@ -91,7 +91,7 @@ UINT32 offtwall_state::screen_update_offtwall(screen_device &screen, bitmap_ind1
// draw and merge the MO
bitmap_ind16 &mobitmap = m_vad->mob()->bitmap();
- for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/pacman.cpp b/src/mame/video/pacman.cpp
index 1ddf2f42427..0020ac46eb4 100644
--- a/src/mame/video/pacman.cpp
+++ b/src/mame/video/pacman.cpp
@@ -209,7 +209,7 @@ UINT32 pacman_state::screen_update_pacman(screen_device &screen, bitmap_ind16 &b
else
m_bg_tilemap->draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE,0);
- if( m_spriteram != NULL )
+ if( m_spriteram != nullptr )
{
UINT8 *spriteram = m_spriteram;
UINT8 *spriteram_2 = m_spriteram2;
diff --git a/src/mame/video/pc080sn.cpp b/src/mame/video/pc080sn.cpp
index 73c74b68a3d..55c67ed2bfa 100644
--- a/src/mame/video/pc080sn.cpp
+++ b/src/mame/video/pc080sn.cpp
@@ -52,7 +52,7 @@ const device_type PC080SN = &device_creator<pc080sn_device>;
pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, PC080SN, "Taito PC080SN", tag, owner, clock, "pc080sn", __FILE__),
- m_ram(NULL),
+ m_ram(nullptr),
m_gfxnum(0),
m_x_offset(0),
m_y_offset(0),
@@ -61,13 +61,13 @@ pc080sn_device::pc080sn_device(const machine_config &mconfig, const char *tag, d
m_gfxdecode(*this),
m_palette(*this)
{
- for (int i = 0; i < 8; i++)
- m_ctrl[i] = 0;
+ for (auto & elem : m_ctrl)
+ elem = 0;
for (int i = 0; i < 2; i++)
{
- m_bg_ram[i] = NULL;
- m_bgscroll_ram[i] = NULL;
+ m_bg_ram[i] = nullptr;
+ m_bgscroll_ram[i] = nullptr;
m_bgscrollx[i] = 0;
m_bgscrolly[i] = 0;
}
diff --git a/src/mame/video/pc090oj.cpp b/src/mame/video/pc090oj.cpp
index d9b56ff9d94..0aa609d093e 100644
--- a/src/mame/video/pc090oj.cpp
+++ b/src/mame/video/pc090oj.cpp
@@ -78,8 +78,8 @@ pc090oj_device::pc090oj_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, PC090OJ, "Taito PC090OJ", tag, owner, clock, "pc090oj", __FILE__),
m_ctrl(0),
m_sprite_ctrl(0),
- m_ram(NULL),
- m_ram_buffered(0),
+ m_ram(nullptr),
+ m_ram_buffered(nullptr),
m_gfxnum(0),
m_x_offset(0),
m_y_offset(0),
diff --git a/src/mame/video/pc_t1t.cpp b/src/mame/video/pc_t1t.cpp
index e77c5339bd0..b5931d4daba 100644
--- a/src/mame/video/pc_t1t.cpp
+++ b/src/mame/video/pc_t1t.cpp
@@ -40,8 +40,8 @@ pc_t1t_device::pc_t1t_device(const machine_config &mconfig, device_type type, co
m_status(0),
m_bank(0),
m_pc_framecnt(0),
- m_displayram(NULL),
- m_chr_gen(NULL),
+ m_displayram(nullptr),
+ m_chr_gen(nullptr),
m_chr_size(0),
m_ra_offset(0),
m_address_data_ff(0),
@@ -55,13 +55,13 @@ pc_t1t_device::pc_t1t_device(const machine_config &mconfig, device_type type, co
pcvideo_t1000_device::pcvideo_t1000_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: pc_t1t_device(mconfig, PCVIDEO_T1000, "Tandy 1000 Graphics Adapter", tag, owner, clock, "tandy_1000_graphics_adapter", __FILE__),
- m_t1_displayram(NULL)
+ m_t1_displayram(nullptr)
{
}
pcvideo_pcjr_device::pcvideo_pcjr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: pc_t1t_device(mconfig, PCVIDEO_PCJR, "PC Jr Graphics Adapter", tag, owner, clock, "pcjr_graphics_adapter", __FILE__),
- m_jxkanji(NULL)
+ m_jxkanji(nullptr)
{
}
@@ -85,7 +85,7 @@ void pcvideo_pcjr_device::device_start()
if(!strncmp(machine().system().name, "ibmpcjx", 7))
m_jxkanji = machine().root_device().memregion("kanji")->base();
else
- m_jxkanji = NULL;
+ m_jxkanji = nullptr;
}
diff --git a/src/mame/video/pcw.cpp b/src/mame/video/pcw.cpp
index f4d18761636..d24c870081e 100644
--- a/src/mame/video/pcw.cpp
+++ b/src/mame/video/pcw.cpp
@@ -175,7 +175,7 @@ UINT32 pcw_state::screen_update_pcw_printer(screen_device &screen, bitmap_ind16
INT32 feed;
rectangle rect(0, PCW_PRINTER_WIDTH - 1, 0, PCW_PRINTER_HEIGHT - 1);
feed = -(m_paper_feed / 2);
- copyscrollbitmap(bitmap,*m_prn_output,0,NULL,1,&feed,rect);
+ copyscrollbitmap(bitmap,*m_prn_output,0,nullptr,1,&feed,rect);
bitmap.pix16(PCW_PRINTER_HEIGHT-1, m_printer_headpos) = 0;
bitmap.pix16(PCW_PRINTER_HEIGHT-2, m_printer_headpos) = 0;
bitmap.pix16(PCW_PRINTER_HEIGHT-3, m_printer_headpos) = 0;
diff --git a/src/mame/video/pgm.cpp b/src/mame/video/pgm.cpp
index e425a00f135..f4d923075ae 100644
--- a/src/mame/video/pgm.cpp
+++ b/src/mame/video/pgm.cpp
@@ -241,7 +241,7 @@ void pgm_state::draw_sprite_new_zoomed( int wide, int high, int xpos, int ypos,
}
else
{
- draw_sprite_line(wide, NULL, NULL, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
+ draw_sprite_line(wide, nullptr, nullptr, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
}
ycntdraw++;
@@ -263,7 +263,7 @@ void pgm_state::draw_sprite_new_zoomed( int wide, int high, int xpos, int ypos,
}
else
{
- draw_sprite_line(wide, NULL, NULL, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
+ draw_sprite_line(wide, nullptr, nullptr, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
if (!(flip & 0x02))
{
@@ -283,7 +283,7 @@ void pgm_state::draw_sprite_new_zoomed( int wide, int high, int xpos, int ypos,
else if (yzoombit == 1 && ygrow == 0)
{
/* skip this line */
- draw_sprite_line(wide, NULL, NULL, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
+ draw_sprite_line(wide, nullptr, nullptr, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
}
else /* normal line */
{
@@ -300,7 +300,7 @@ void pgm_state::draw_sprite_new_zoomed( int wide, int high, int xpos, int ypos,
}
else
{
- draw_sprite_line(wide, NULL, NULL, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
+ draw_sprite_line(wide, nullptr, nullptr, xzoom, xgrow, flip, xpos, pri, realxsize, palt, 0);
if (!(flip & 0x02))
{
@@ -464,7 +464,7 @@ void pgm_state::draw_sprite_new_basic( int wide, int high, int xpos, int ypos, i
}
else
{
- draw_sprite_line_basic(wide, NULL, NULL, flip, xpos, pri, realxsize, palt, 0);
+ draw_sprite_line_basic(wide, nullptr, nullptr, flip, xpos, pri, realxsize, palt, 0);
if (!(flip & 0x02))
{
diff --git a/src/mame/video/plygonet.cpp b/src/mame/video/plygonet.cpp
index ca66f22a76f..8fc07010a8e 100644
--- a/src/mame/video/plygonet.cpp
+++ b/src/mame/video/plygonet.cpp
@@ -95,7 +95,7 @@ void polygonet_state::video_start()
/* find first empty slot to decode gfx */
for (m_ttl_gfx_index = 0; m_ttl_gfx_index < MAX_GFX_ELEMENTS; m_ttl_gfx_index++)
- if (m_gfxdecode->gfx(m_ttl_gfx_index) == 0)
+ if (m_gfxdecode->gfx(m_ttl_gfx_index) == nullptr)
break;
assert(m_ttl_gfx_index != MAX_GFX_ELEMENTS);
diff --git a/src/mame/video/polepos.cpp b/src/mame/video/polepos.cpp
index ae2e5a337a0..0044de3836b 100644
--- a/src/mame/video/polepos.cpp
+++ b/src/mame/video/polepos.cpp
@@ -408,7 +408,7 @@ void polepos_state::draw_road(bitmap_ind16 &bitmap)
}
/* draw the scanline */
- draw_scanline16(bitmap, 0, y, 256, &scanline[xscroll], NULL);
+ draw_scanline16(bitmap, 0, y, 256, &scanline[xscroll], nullptr);
}
}
diff --git a/src/mame/video/policetr.cpp b/src/mame/video/policetr.cpp
index fa69085656b..ddcccad3933 100644
--- a/src/mame/video/policetr.cpp
+++ b/src/mame/video/policetr.cpp
@@ -351,7 +351,7 @@ UINT32 policetr_state::screen_update_policetr(screen_device &screen, bitmap_ind1
/* render all the scanlines from the dstbitmap to MAME's bitmap */
for (y = cliprect.min_y; y <= cliprect.max_y; y++)
- draw_scanline8(bitmap, cliprect.min_x, y, width, &m_dstbitmap[DSTBITMAP_WIDTH * y + cliprect.min_x], NULL);
+ draw_scanline8(bitmap, cliprect.min_x, y, width, &m_dstbitmap[DSTBITMAP_WIDTH * y + cliprect.min_x], nullptr);
return 0;
}
diff --git a/src/mame/video/powervr2.cpp b/src/mame/video/powervr2.cpp
index bea1e3fca36..a0db91d6b62 100644
--- a/src/mame/video/powervr2.cpp
+++ b/src/mame/video/powervr2.cpp
@@ -921,9 +921,9 @@ WRITE32_MEMBER( powervr2_device::softreset_w )
logerror("%s: Core Pipeline soft reset\n", tag());
#endif
if (start_render_received == 1) {
- for (int a=0;a < NUM_BUFFERS;a++)
- if (grab[a].busy == 1)
- grab[a].busy = 0;
+ for (auto & elem : grab)
+ if (elem.busy == 1)
+ elem.busy = 0;
start_render_received = 0;
}
}
diff --git a/src/mame/video/ppu2c0x.cpp b/src/mame/video/ppu2c0x.cpp
index 2edff541ce3..d6511dbb245 100644
--- a/src/mame/video/ppu2c0x.cpp
+++ b/src/mame/video/ppu2c0x.cpp
@@ -97,7 +97,7 @@ ADDRESS_MAP_END
const address_space_config *ppu2c0x_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
@@ -124,7 +124,7 @@ ppu2c0x_device::ppu2c0x_device(const machine_config &mconfig, device_type type,
: device_t(mconfig, type, name, tag, owner, clock, shortname, source),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, NULL, *ADDRESS_MAP_NAME(ppu2c0x)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, nullptr, *ADDRESS_MAP_NAME(ppu2c0x)),
m_cpu(*this),
m_scanline(0), // reset the scanline count
m_refresh_data(0),
@@ -144,8 +144,8 @@ ppu2c0x_device::ppu2c0x_device(const machine_config &mconfig, device_type type,
m_draw_phase(0),
m_use_sprite_write_limitation(true)
{
- for (int i = 0; i < PPU_MAX_REG; i++)
- m_regs[i] = 0;
+ for (auto & elem : m_regs)
+ elem = 0;
memset(m_palette_ram, 0, ARRAY_LENGTH(m_palette_ram));
diff --git a/src/mame/video/psikyosh.cpp b/src/mame/video/psikyosh.cpp
index 0eb703853cd..24b51d9e375 100644
--- a/src/mame/video/psikyosh.cpp
+++ b/src/mame/video/psikyosh.cpp
@@ -260,7 +260,7 @@ void psikyosh_state::draw_bglayerscroll( int layer, bitmap_rgb32 &bitmap, const
/* cache rendered bitmap */
int last_bank[32]; // corresponds to bank of bitmap in m_bg_bitmap. bg_bitmap is split into 16/32-rows of one-tile high each
- for(int ii = 0; ii < 32; ii++) last_bank[ii] = -1;
+ for(auto & elem : last_bank) elem = -1;
int scr_width = cliprect.width();
int scr_height = cliprect.height();
diff --git a/src/mame/video/punchout.cpp b/src/mame/video/punchout.cpp
index a294f9cc6ee..687ef0d8c74 100644
--- a/src/mame/video/punchout.cpp
+++ b/src/mame/video/punchout.cpp
@@ -103,7 +103,7 @@ void punchout_state::video_start()
m_spr1_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(punchout_state::bs1_get_info),this), TILEMAP_SCAN_ROWS, 8,8, 16,32);
m_spr2_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(punchout_state::bs2_get_info),this), TILEMAP_SCAN_ROWS, 8,8, 16,32);
- m_fg_tilemap = NULL;
+ m_fg_tilemap = nullptr;
m_spr1_tilemap->set_transparent_pen(0x07);
m_spr2_tilemap->set_transparent_pen(0x03);
diff --git a/src/mame/video/rampart.cpp b/src/mame/video/rampart.cpp
index 0c8a7f7bac6..4154b56ea0a 100644
--- a/src/mame/video/rampart.cpp
+++ b/src/mame/video/rampart.cpp
@@ -75,7 +75,7 @@ UINT32 rampart_state::screen_update_rampart(screen_device &screen, bitmap_ind16
// draw and merge the MO
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/rdpblend.h b/src/mame/video/rdpblend.h
index eb665a677b9..962017a9dcc 100644
--- a/src/mame/video/rdpblend.h
+++ b/src/mame/video/rdpblend.h
@@ -33,7 +33,7 @@ class n64_blender_t
void set_machine(running_machine& machine) { m_machine = &machine; }
void set_processor(n64_rdp* rdp) { m_rdp = rdp; }
- running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
+ running_machine &machine() const { assert(m_machine != nullptr); return *m_machine; }
private:
running_machine* m_machine;
diff --git a/src/mame/video/rdptpipe.h b/src/mame/video/rdptpipe.h
index e47f6f17130..201b15d63c1 100644
--- a/src/mame/video/rdptpipe.h
+++ b/src/mame/video/rdptpipe.h
@@ -34,9 +34,9 @@ class n64_texture_pipe_t
}
m_start_span = false;
- for (int idx = 0; idx < 80; idx++)
+ for (auto & elem : m_texel_fetch)
{
- m_texel_fetch[idx] = &n64_texture_pipe_t::fetch_nop;
+ elem = &n64_texture_pipe_t::fetch_nop;
}
m_texel_fetch[ 8] = &n64_texture_pipe_t::fetch_rgba16_raw;
diff --git a/src/mame/video/redalert.cpp b/src/mame/video/redalert.cpp
index 3478f298bea..288e92198bd 100644
--- a/src/mame/video/redalert.cpp
+++ b/src/mame/video/redalert.cpp
@@ -63,7 +63,7 @@ void redalert_state::get_pens(pen_t *pens)
compute_resistor_weights(0, 0xff, scaler,
1, resistances_back_r, back_r_weight, 470, 0,
1, resistances_back_gb, back_gb_weight, 470, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
/* the character layer colors come from the PROM */
for (offs = 0; offs < NUM_CHARMAP_PENS; offs++)
@@ -128,7 +128,7 @@ void redalert_state::get_panther_pens(pen_t *pens)
compute_resistor_weights(0, 0xff, scaler,
1, resistances_back_r, back_r_weight, 470, 0,
1, resistances_back_gb, back_gb_weight, 470, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
/* the character layer colors come from the PROM */
for (offs = 0; offs < NUM_CHARMAP_PENS; offs++)
diff --git a/src/mame/video/relief.cpp b/src/mame/video/relief.cpp
index 8acf0e2ac63..3b0b0047177 100644
--- a/src/mame/video/relief.cpp
+++ b/src/mame/video/relief.cpp
@@ -106,7 +106,7 @@ UINT32 relief_state::screen_update_relief(screen_device &screen, bitmap_ind16 &b
// draw and merge the MO
bitmap_ind16 &mobitmap = m_vad->mob()->bitmap();
- for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/rohga.cpp b/src/mame/video/rohga.cpp
index 1c97fea5d64..313d73717bf 100644
--- a/src/mame/video/rohga.cpp
+++ b/src/mame/video/rohga.cpp
@@ -134,7 +134,7 @@ UINT32 rohga_state::screen_update_wizdfire(screen_device &screen, bitmap_rgb32 &
/* Update playfields */
flip_screen_set(BIT(flip, 7));
- m_deco_tilegen1->pf_update(0, 0);
+ m_deco_tilegen1->pf_update(nullptr, nullptr);
m_deco_tilegen2->pf_update(m_pf3_rowscroll, m_pf4_rowscroll);
/* Draw playfields - Palette of 2nd playfield chip visible if playfields turned off */
diff --git a/src/mame/video/rungun.cpp b/src/mame/video/rungun.cpp
index bb10546796f..9fb6e2b62e4 100644
--- a/src/mame/video/rungun.cpp
+++ b/src/mame/video/rungun.cpp
@@ -18,7 +18,8 @@
/* TTL text plane stuff */
TILE_GET_INFO_MEMBER(rungun_state::ttl_get_tile_info)
{
- UINT8 *lvram = (UINT8 *)m_ttl_vram + (m_current_frame_number * 0x2000);
+ UINT32 base_addr = (FPTR)tilemap.user_data();
+ UINT8 *lvram = (UINT8 *)m_ttl_vram + base_addr;
int attr, code;
attr = (lvram[BYTE_XOR_LE(tile_index<<2)] & 0xf0) >> 4;
@@ -40,6 +41,7 @@ READ16_MEMBER(rungun_state::rng_ttl_ram_r)
WRITE16_MEMBER(rungun_state::rng_ttl_ram_w)
{
COMBINE_DATA(&m_ttl_vram[offset+(m_video_mux_bank*0x1000)]);
+ m_ttl_tilemap[m_video_mux_bank]->mark_tile_dirty(offset / 2);
}
/* 53936 (PSAC2) rotation/zoom plane */
@@ -51,13 +53,13 @@ READ16_MEMBER(rungun_state::rng_psac2_videoram_r)
WRITE16_MEMBER(rungun_state::rng_psac2_videoram_w)
{
COMBINE_DATA(&m_psac2_vram[offset+(m_video_mux_bank*0x80000)]);
- //m_936_tilemap->mark_tile_dirty(offset / 2);
+ m_936_tilemap[m_video_mux_bank]->mark_tile_dirty(offset / 2);
}
TILE_GET_INFO_MEMBER(rungun_state::get_rng_936_tile_info)
{
+ UINT32 base_addr = (FPTR)tilemap.user_data();
int tileno, colour, flipx;
- UINT32 base_addr = (m_current_frame_number * 0x80000);
tileno = m_psac2_vram[tile_index * 2 + 1 + base_addr] & 0x3fff;
flipx = (m_psac2_vram[tile_index * 2 + 1 + base_addr] & 0xc000) >> 14;
@@ -84,12 +86,10 @@ void rungun_state::video_start()
m_ttl_vram = auto_alloc_array(machine(), UINT16, 0x1000*2);
m_psac2_vram = auto_alloc_array(machine(), UINT16, 0x80000*2);
- m_936_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rungun_state::get_rng_936_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 128, 128);
- m_936_tilemap->set_transparent_pen(0);
/* find first empty slot to decode gfx */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == 0)
+ if (m_gfxdecode->gfx(gfx_index) == nullptr)
break;
assert(gfx_index != MAX_GFX_ELEMENTS);
@@ -98,11 +98,18 @@ void rungun_state::video_start()
m_gfxdecode->set_gfx(gfx_index, global_alloc(gfx_element(m_palette, charlayout, memregion("gfx3")->base(), 0, m_palette->entries() / 16, 0)));
m_ttl_gfx_index = gfx_index;
- // create the tilemap
- m_ttl_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rungun_state::ttl_get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
-
- m_ttl_tilemap->set_transparent_pen(0);
-
+ // create the tilemaps
+ for(UINT32 screen_num = 0;screen_num < 2;screen_num++)
+ {
+ m_ttl_tilemap[screen_num] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rungun_state::ttl_get_tile_info),this), TILEMAP_SCAN_ROWS, 8, 8, 64, 32);
+ m_ttl_tilemap[screen_num]->set_user_data((void *)(FPTR)(screen_num * 0x2000));
+ m_ttl_tilemap[screen_num]->set_transparent_pen(0);
+
+ m_936_tilemap[screen_num] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(rungun_state::get_rng_936_tile_info),this), TILEMAP_SCAN_ROWS, 16, 16, 128, 128);
+ m_936_tilemap[screen_num]->set_user_data((void *)(FPTR)(screen_num * 0x80000));
+ m_936_tilemap[screen_num]->set_transparent_pen(0);
+
+ }
m_sprite_colorbase = 0x20;
m_screen->register_screen_bitmap(m_rng_dual_demultiplex_left_temp);
@@ -113,29 +120,24 @@ UINT32 rungun_state::screen_update_rng(screen_device &screen, bitmap_ind16 &bitm
{
bitmap.fill(m_palette->black_pen(), cliprect);
screen.priority().fill(0, cliprect);
- m_current_frame_number = machine().first_screen()->frame_number() & 1;
- {
- m_ttl_tilemap->mark_all_dirty();
- m_936_tilemap->mark_all_dirty();
- }
-
+ m_current_display_bank = machine().first_screen()->frame_number() & 1;
if(m_video_priority_mode == false)
{
- m_k053936->zoom_draw(screen, bitmap, cliprect, m_936_tilemap, 0, 0, 1);
+ m_k053936->zoom_draw(screen, bitmap, cliprect, m_936_tilemap[m_current_display_bank], 0, 0, 1);
m_k055673->k053247_sprites_draw(bitmap, cliprect);
}
else
{
m_k055673->k053247_sprites_draw(bitmap, cliprect);
- m_k053936->zoom_draw(screen, bitmap, cliprect, m_936_tilemap, 0, 0, 1);
+ m_k053936->zoom_draw(screen, bitmap, cliprect, m_936_tilemap[m_current_display_bank], 0, 0, 1);
}
- m_ttl_tilemap->draw(screen, bitmap, cliprect, 0, 0);
+ m_ttl_tilemap[m_current_display_bank]->draw(screen, bitmap, cliprect, 0, 0);
// copy frame output to temp buffers so we can demultiplex it for the dual screen output
// (really only need to do this for dual setup)
- if (m_current_frame_number)
+ if (m_current_display_bank)
{
copybitmap(m_rng_dual_demultiplex_right_temp, bitmap, 0, 0, 0, 0, cliprect);
}
diff --git a/src/mame/video/segahang.cpp b/src/mame/video/segahang.cpp
index 9c8f8def887..11bc1b3d4f9 100644
--- a/src/mame/video/segahang.cpp
+++ b/src/mame/video/segahang.cpp
@@ -66,7 +66,7 @@ UINT32 segahang_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
diff --git a/src/mame/video/segaic16.cpp b/src/mame/video/segaic16.cpp
index 8ac02ea654b..f76ec9bebfc 100644
--- a/src/mame/video/segaic16.cpp
+++ b/src/mame/video/segaic16.cpp
@@ -1082,8 +1082,8 @@ void segaic16_video_device::tilemap_init(int which, int type, int colorbase, int
get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16a_tile_info),this);
info->numpages = 4;
info->draw_layer = tilemap_16a_draw_layer;
- info->reset = NULL;
- info->latch_timer = NULL;
+ info->reset = nullptr;
+ info->latch_timer = nullptr;
break;
case SEGAIC16_TILEMAP_16A:
@@ -1091,8 +1091,8 @@ void segaic16_video_device::tilemap_init(int which, int type, int colorbase, int
get_tile_info = tilemap_get_info_delegate(FUNC(segaic16_video_device::tilemap_16a_tile_info),this);
info->numpages = 8;
info->draw_layer = tilemap_16a_draw_layer;
- info->reset = NULL;
- info->latch_timer = NULL;
+ info->reset = nullptr;
+ info->latch_timer = nullptr;
break;
case SEGAIC16_TILEMAP_16B:
diff --git a/src/mame/video/segaic24.cpp b/src/mame/video/segaic24.cpp
index 9de160f0c4c..27be4638793 100644
--- a/src/mame/video/segaic24.cpp
+++ b/src/mame/video/segaic24.cpp
@@ -100,7 +100,7 @@ void segas24_tile::device_start()
throw device_missing_dependencies();
for(char_gfx_index = 0; char_gfx_index < MAX_GFX_ELEMENTS; char_gfx_index++)
- if (m_gfxdecode->gfx(char_gfx_index) == 0)
+ if (m_gfxdecode->gfx(char_gfx_index) == nullptr)
break;
assert(char_gfx_index != MAX_GFX_ELEMENTS);
@@ -646,7 +646,7 @@ void segas24_sprite::draw(bitmap_ind16 &bitmap, const rectangle &cliprect, bitma
UINT8 pmt[4];
int i;
UINT16 *sprd[0x2000], *clip[0x2000];
- UINT16 *cclip = 0;
+ UINT16 *cclip = nullptr;
for(i=0; i<4; i++)
pmt[i] = 0xff << (1+spri[3-i]);
diff --git a/src/mame/video/segaorun.cpp b/src/mame/video/segaorun.cpp
index 79f72426cb5..8c6f6e991e0 100644
--- a/src/mame/video/segaorun.cpp
+++ b/src/mame/video/segaorun.cpp
@@ -71,7 +71,7 @@ UINT32 segaorun_state::screen_update_shangon(screen_device &screen, bitmap_ind16
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
@@ -138,7 +138,7 @@ UINT32 segaorun_state::screen_update_outrun(screen_device &screen, bitmap_ind16
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
diff --git a/src/mame/video/segas16a.cpp b/src/mame/video/segas16a.cpp
index adf2e089e76..561d4160388 100644
--- a/src/mame/video/segas16a.cpp
+++ b/src/mame/video/segas16a.cpp
@@ -60,7 +60,7 @@ UINT32 segas16a_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
diff --git a/src/mame/video/segas16b.cpp b/src/mame/video/segas16b.cpp
index f6010f0b8b7..c37188cfdad 100644
--- a/src/mame/video/segas16b.cpp
+++ b/src/mame/video/segas16b.cpp
@@ -60,7 +60,7 @@ UINT32 segas16b_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
diff --git a/src/mame/video/segas18.cpp b/src/mame/video/segas18.cpp
index 15953461c61..8db333c3155 100644
--- a/src/mame/video/segas18.cpp
+++ b/src/mame/video/segas18.cpp
@@ -221,7 +221,7 @@ UINT32 segas18_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
{
for (int y = rect->min_y; y <= rect->max_y; y++)
{
diff --git a/src/mame/video/segas32.cpp b/src/mame/video/segas32.cpp
index 55aa4c4dd75..ed05f3df3c6 100644
--- a/src/mame/video/segas32.cpp
+++ b/src/mame/video/segas32.cpp
@@ -222,7 +222,7 @@ void segas32_state::common_start(int multi32)
m_spriteram_32bit = auto_alloc_array(machine(), UINT32, 0x20000/4);
/* allocate the tilemap cache */
- m_cache_head = NULL;
+ m_cache_head = nullptr;
for (tmap = 0; tmap < TILEMAP_CACHE_SIZE; tmap++)
{
struct cache_entry *entry = auto_alloc(machine(), struct cache_entry);
@@ -470,7 +470,7 @@ WRITE16_MEMBER(segas32_state::system32_videoram_w)
offset %= 0x200;
/* scan the cache for a matching pages */
- for (entry = m_cache_head; entry != NULL; entry = entry->next)
+ for (entry = m_cache_head; entry != nullptr; entry = entry->next)
if (entry->page == page)
entry->tmap->mark_tile_dirty(offset);
}
@@ -671,7 +671,7 @@ tilemap_t *segas32_state::find_cache_entry(int page, int bank)
struct segas32_state::cache_entry *entry, *prev;
/* scan the list for a matching entry */
- prev = NULL;
+ prev = nullptr;
entry = m_cache_head;
while (1)
{
@@ -688,7 +688,7 @@ tilemap_t *segas32_state::find_cache_entry(int page, int bank)
}
/* stop on the last entry */
- if (entry->next == NULL)
+ if (entry->next == nullptr)
break;
prev = entry;
entry = entry->next;
@@ -1992,7 +1992,7 @@ void segas32_state::mix_all_layers(int which, int xoffs, bitmap_rgb32 &bitmap, c
UINT8 mixshift; /* shift from control reg */
UINT8 coloroffs; /* color offset index */
} layerorder[16][8], layersort[8];
- struct layer_info temp_sprite_save = { 0 };
+ struct layer_info temp_sprite_save = { nullptr };
UINT8 sprgroup_shift, sprgroup_mask, sprgroup_or;
int numlayers, laynum, groupnum;
int rgboffs[3][3];
diff --git a/src/mame/video/segaxbd.cpp b/src/mame/video/segaxbd.cpp
index 2f47959eeab..30a92aff0a0 100644
--- a/src/mame/video/segaxbd.cpp
+++ b/src/mame/video/segaxbd.cpp
@@ -73,7 +73,7 @@ UINT32 segaxbd_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
diff --git a/src/mame/video/segaybd.cpp b/src/mame/video/segaybd.cpp
index e26390982d4..80f3b3c8353 100644
--- a/src/mame/video/segaybd.cpp
+++ b/src/mame/video/segaybd.cpp
@@ -47,7 +47,7 @@ UINT32 segaybd_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap,
// mix in 16B sprites
bitmap_ind16 &sprites = m_bsprites->bitmap();
- for (const sparse_dirty_rect *rect = m_bsprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_bsprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
diff --git a/src/mame/video/seibu_crtc.cpp b/src/mame/video/seibu_crtc.cpp
index 92f8f1951e0..413fb5468d7 100644
--- a/src/mame/video/seibu_crtc.cpp
+++ b/src/mame/video/seibu_crtc.cpp
@@ -209,7 +209,7 @@ seibu_crtc_device::seibu_crtc_device(const machine_config &mconfig, const char *
device_video_interface(mconfig, *this),
m_layer_en_cb(*this),
m_layer_scroll_cb(*this),
- m_space_config("vregs", ENDIANNESS_LITTLE, 16, 7, 0, NULL, *ADDRESS_MAP_NAME(seibu_crtc_vregs))
+ m_space_config("vregs", ENDIANNESS_LITTLE, 16, 7, 0, nullptr, *ADDRESS_MAP_NAME(seibu_crtc_vregs))
{
}
@@ -249,7 +249,7 @@ void seibu_crtc_device::device_reset()
const address_space_config *seibu_crtc_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/mame/video/seibuspi.cpp b/src/mame/video/seibuspi.cpp
index 96af09eae2d..c89a5505f9d 100644
--- a/src/mame/video/seibuspi.cpp
+++ b/src/mame/video/seibuspi.cpp
@@ -470,9 +470,9 @@ UINT32 seibuspi_state::screen_update_spi(screen_device &screen, bitmap_rgb32 &bi
}
else
{
- back_rowscroll = NULL;
- midl_rowscroll = NULL;
- fore_rowscroll = NULL;
+ back_rowscroll = nullptr;
+ midl_rowscroll = nullptr;
+ fore_rowscroll = nullptr;
}
screen.priority().fill(0, cliprect);
@@ -507,7 +507,7 @@ UINT32 seibuspi_state::screen_update_spi(screen_device &screen, bitmap_rgb32 &bi
draw_sprites(bitmap, cliprect, screen.priority(), 3);
if (~m_layer_enable & 8)
- combine_tilemap(bitmap, cliprect, m_text_layer, 0, 0, 0, NULL);
+ combine_tilemap(bitmap, cliprect, m_text_layer, 0, 0, 0, nullptr);
return 0;
}
@@ -665,7 +665,7 @@ VIDEO_START_MEMBER(seibuspi_state,sys386f)
m_sprite_ram_size = 0x2000;
m_sprite_bpp = 8;
- m_tilemap_ram = NULL;
+ m_tilemap_ram = nullptr;
m_palette_ram = auto_alloc_array_clear(machine(), UINT32, m_palette_ram_size/4);
m_sprite_ram = auto_alloc_array_clear(machine(), UINT32, m_sprite_ram_size/4);
@@ -691,7 +691,7 @@ void seibuspi_state::register_video_state()
save_item(NAME(m_midl_layer_d14));
save_item(NAME(m_fore_layer_d14));
- if (m_tilemap_ram != NULL) save_pointer(NAME(m_tilemap_ram), m_tilemap_ram_size/4);
+ if (m_tilemap_ram != nullptr) save_pointer(NAME(m_tilemap_ram), m_tilemap_ram_size/4);
save_pointer(NAME(m_palette_ram), m_palette_ram_size/4);
save_pointer(NAME(m_sprite_ram), m_sprite_ram_size/4);
}
diff --git a/src/mame/video/seta.cpp b/src/mame/video/seta.cpp
index 816d7e98745..349fc743f99 100644
--- a/src/mame/video/seta.cpp
+++ b/src/mame/video/seta.cpp
@@ -209,7 +209,7 @@ static const game_offset game_offsets[] =
{ "crazyfgt", { 0, 0 }, { -2, 0 } }, // wrong (empty background column in title screen, but aligned sprites in screen select)
{ "magspeed", { 0, 0 }, { -2, 0 } }, // floating tilemap maybe 1px off in test grid
- { NULL }
+ { nullptr }
};
@@ -270,7 +270,7 @@ WRITE16_MEMBER(seta_state::seta_vregs_w)
if (ACCESSING_BITS_0_7)
{
seta_coin_lockout_w (data & 0x0f);
- if (m_x1 != NULL)
+ if (m_x1 != nullptr)
m_x1->enable_w (data & 0x20);
coin_counter_w(machine(), 0,data & 0x01);
coin_counter_w(machine(), 1,data & 0x02);
@@ -386,7 +386,7 @@ inline void seta_state::get_tile_info( tile_data &tileinfo, int tile_index, int
UINT16 code = vram[ tile_index ];
UINT16 attr = vram[ tile_index + 0x800 ];
- if(m_gfxdecode->gfx(gfx + ((vctrl[ 4/2 ] & 0x10) >> m_color_mode_shift)) != NULL)
+ if(m_gfxdecode->gfx(gfx + ((vctrl[ 4/2 ] & 0x10) >> m_color_mode_shift)) != nullptr)
{
gfx += (vctrl[ 4/2 ] & 0x10) >> m_color_mode_shift;
}
@@ -538,10 +538,10 @@ SETA001_SPRITE_GFXBANK_CB_MEMBER(seta_state::setac_gfxbank_callback)
/* NO layers, only sprites */
VIDEO_START_MEMBER(seta_state,seta_no_layers)
{
- m_tilemap_0 = 0;
- m_tilemap_1 = 0;
- m_tilemap_2 = 0;
- m_tilemap_3 = 0;
+ m_tilemap_0 = nullptr;
+ m_tilemap_1 = nullptr;
+ m_tilemap_2 = nullptr;
+ m_tilemap_3 = nullptr;
m_tilemaps_flip = 0;
@@ -722,7 +722,7 @@ void seta_state::set_pens()
m_palette->set_pen_color(i, color);
}
- if(m_paletteram2 != NULL)
+ if(m_paletteram2 != nullptr)
{
for (i = 0; i < m_paletteram2.bytes() / 2; i++)
{
@@ -848,7 +848,7 @@ void seta_state::seta_layers_update(screen_device &screen, bitmap_ind16 &bitmap,
m_tilemap_1->mark_all_dirty();
}
- if(m_tilemap_2 != NULL && m_tilemap_3 != NULL)
+ if(m_tilemap_2 != nullptr && m_tilemap_3 != nullptr)
{
if(m_current_tilemap_mode[1] != (m_vctrl_2[ 4/2 ] & 0x10))
{
@@ -976,7 +976,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
{
if (layers_ctrl & 8) m_seta001->draw_sprites(screen, bitmap,cliprect,sprite_bank_size, sprite_setac);
- if((order & 4) && m_paletteram2 != NULL)
+ if((order & 4) && m_paletteram2 != nullptr)
{
if(m_tilemap_2->enabled())
{
@@ -1003,7 +1003,7 @@ if (screen.machine().input().code_pressed(KEYCODE_Z))
}
else
{
- if((order & 4) && m_paletteram2 != NULL)
+ if((order & 4) && m_paletteram2 != nullptr)
{
if(m_tilemap_2->enabled())
{
diff --git a/src/mame/video/shuuz.cpp b/src/mame/video/shuuz.cpp
index 490521829ae..b8ff46f6ab2 100644
--- a/src/mame/video/shuuz.cpp
+++ b/src/mame/video/shuuz.cpp
@@ -85,7 +85,7 @@ UINT32 shuuz_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap, c
// draw and merge the MO
bitmap_ind16 &mobitmap = m_vad->mob()->bitmap();
- for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/skullxbo.cpp b/src/mame/video/skullxbo.cpp
index 653c52f0849..b1d6e2e8eb3 100644
--- a/src/mame/video/skullxbo.cpp
+++ b/src/mame/video/skullxbo.cpp
@@ -244,7 +244,7 @@ UINT32 skullxbo_state::screen_update_skullxbo(screen_device &screen, bitmap_ind1
// draw and merge the MO
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/spacefb.cpp b/src/mame/video/spacefb.cpp
index 72b0c11ca05..154ba917172 100644
--- a/src/mame/video/spacefb.cpp
+++ b/src/mame/video/spacefb.cpp
@@ -80,7 +80,7 @@ void spacefb_state::video_start()
compute_resistor_weights(0, 0xff, -1.0,
3, resistances_rg, m_color_weights_rg, 470, 0,
2, resistances_b, m_color_weights_b, 470, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
width = m_screen->width();
height = m_screen->height();
diff --git a/src/mame/video/spbactn.cpp b/src/mame/video/spbactn.cpp
index 09af97f44ea..5e7f1735a1b 100644
--- a/src/mame/video/spbactn.cpp
+++ b/src/mame/video/spbactn.cpp
@@ -129,7 +129,7 @@ int spbactn_state::draw_video(screen_device &screen, bitmap_rgb32 &bitmap, const
m_bg_tilemap->draw(screen, m_tile_bitmap_bg, cliprect, 0, 0);
m_fg_tilemap->draw(screen, m_tile_bitmap_fg, cliprect, 0, 0);
- m_mixer->mix_bitmaps(screen, bitmap, cliprect, m_palette, &m_tile_bitmap_bg, &m_tile_bitmap_fg, (bitmap_ind16*)0, &m_sprite_bitmap);
+ m_mixer->mix_bitmaps(screen, bitmap, cliprect, m_palette, &m_tile_bitmap_bg, &m_tile_bitmap_fg, (bitmap_ind16*)nullptr, &m_sprite_bitmap);
return 0;
}
diff --git a/src/mame/video/spectrum.cpp b/src/mame/video/spectrum.cpp
index c663aa5b865..5379510d2c9 100644
--- a/src/mame/video/spectrum.cpp
+++ b/src/mame/video/spectrum.cpp
@@ -118,11 +118,11 @@ UINT32 spectrum_state::screen_update_spectrum(screen_device &screen, bitmap_ind1
static const rectangle rect(SPEC_LEFT_BORDER, SPEC_LEFT_BORDER + SPEC_DISPLAY_XSIZE - 1, SPEC_TOP_BORDER, SPEC_TOP_BORDER + SPEC_DISPLAY_YSIZE - 1);
if (m_border_bitmap.valid())
- copyscrollbitmap(bitmap, m_border_bitmap, 0, 0, 0, 0, cliprect);
+ copyscrollbitmap(bitmap, m_border_bitmap, 0, nullptr, 0, nullptr, cliprect);
spectrum_UpdateScreenBitmap();
if (m_screen_bitmap.valid())
- copyscrollbitmap(bitmap, m_screen_bitmap, 0, 0, 0, 0, rect);
+ copyscrollbitmap(bitmap, m_screen_bitmap, 0, nullptr, 0, nullptr, rect);
#if 0
// note, don't update borders in here, this can time travel w/regards to other timers and may end up giving you
diff --git a/src/mame/video/sshangha.cpp b/src/mame/video/sshangha.cpp
index a28b2b29c67..57d7edf11f6 100644
--- a/src/mame/video/sshangha.cpp
+++ b/src/mame/video/sshangha.cpp
@@ -35,7 +35,7 @@ UINT32 sshangha_state::screen_update_sshangha(screen_device &screen, bitmap_rgb3
m_sprgen1->draw_sprites(bitmap, cliprect, m_spriteram, 0x800, true);
// I'm pretty sure only the original has the 2nd spriteram, used for the Japanese text on the 2nd scene (non-scrolling text) in the intro of the quest (3rd in JPN) mode
- if (m_spriteram2 != NULL)
+ if (m_spriteram2 != nullptr)
m_sprgen2->draw_sprites(bitmap, cliprect, m_spriteram2, 0x800, true);
// flip screen
@@ -58,7 +58,7 @@ UINT32 sshangha_state::screen_update_sshangha(screen_device &screen, bitmap_rgb3
m_deco_tilegen1->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
}
- if (m_spriteram2 != NULL)
+ if (m_spriteram2 != nullptr)
m_sprgen2->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0000, 0, 0x1ff);
m_sprgen1->inefficient_copy_sprite_bitmap(bitmap, cliprect, 0x0000, 0x0200, 0, 0x1ff);
diff --git a/src/mame/video/st0020.cpp b/src/mame/video/st0020.cpp
index abe62a111ac..29bcee1e161 100644
--- a/src/mame/video/st0020.cpp
+++ b/src/mame/video/st0020.cpp
@@ -78,7 +78,7 @@ void st0020_device::device_start()
m_st0020_blitram = auto_alloc_array_clear(machine(), UINT16, 0x100 / 2);
for (m_gfx_index = 0; m_gfx_index < MAX_GFX_ELEMENTS; m_gfx_index++)
- if (m_gfxdecode->gfx(m_gfx_index) == 0)
+ if (m_gfxdecode->gfx(m_gfx_index) == nullptr)
break;
m_gfxdecode->set_gfx(m_gfx_index, global_alloc(gfx_element(m_palette, layout_16x8x8_2, (UINT8 *)m_st0020_gfxram, 0, m_palette->entries() / 64, 0)));
diff --git a/src/mame/video/stic.cpp b/src/mame/video/stic.cpp
index b5b8dbfb6a4..350544e8f90 100644
--- a/src/mame/video/stic.cpp
+++ b/src/mame/video/stic.cpp
@@ -760,8 +760,8 @@ void stic_device::screenrefresh()
render_background(m_bitmap);
// Render the sprites into their buffers
render_sprites();
- for (int i = 0; i < STIC_MOBS; i++)
- m_sprite[i].collision = 0;
+ for (auto & elem : m_sprite)
+ elem.collision = 0;
// Copy the sprites to the background
copy_sprites_to_background(m_bitmap);
determine_sprite_collisions();
diff --git a/src/mame/video/system1.cpp b/src/mame/video/system1.cpp
index f326cb1d5b3..85dd664f3b9 100644
--- a/src/mame/video/system1.cpp
+++ b/src/mame/video/system1.cpp
@@ -322,7 +322,7 @@ WRITE8_MEMBER(system1_state::system1_paletteram_w)
accurate to +/- .003K ohms.
*/
- if (m_color_prom != NULL)
+ if (m_color_prom != nullptr)
{
m_paletteram[offset] = data;
UINT8 val;
diff --git a/src/mame/video/system16.cpp b/src/mame/video/system16.cpp
index e2f5f756a46..f25c59d1446 100644
--- a/src/mame/video/system16.cpp
+++ b/src/mame/video/system16.cpp
@@ -643,7 +643,7 @@ UINT32 segas1x_bootleg_state::screen_update_s16a_bootleg(screen_device &screen,
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
@@ -713,7 +713,7 @@ UINT32 segas1x_bootleg_state::screen_update_s16a_bootleg_passht4b(screen_device
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
@@ -792,7 +792,7 @@ UINT32 segas1x_bootleg_state::screen_update_system16(screen_device &screen, bitm
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
@@ -855,7 +855,7 @@ UINT32 segas1x_bootleg_state::screen_update_system18old(screen_device &screen, b
// mix in sprites
bitmap_ind16 &sprites = m_sprites->bitmap();
- for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_sprites->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *dest = &bitmap.pix(y);
diff --git a/src/mame/video/taito_b.cpp b/src/mame/video/taito_b.cpp
index e4cdb0098cb..0583938da2f 100644
--- a/src/mame/video/taito_b.cpp
+++ b/src/mame/video/taito_b.cpp
@@ -41,7 +41,7 @@ VIDEO_START_MEMBER(taitob_state,taitob_core)
{
m_framebuffer[0] = auto_bitmap_ind16_alloc(machine(), 512, 256);
m_framebuffer[1] = auto_bitmap_ind16_alloc(machine(), 512, 256);
- m_pixel_bitmap = NULL; /* only hitice needs this */
+ m_pixel_bitmap = nullptr; /* only hitice needs this */
save_item(NAME(m_pixel_scroll));
diff --git a/src/mame/video/taito_f2.cpp b/src/mame/video/taito_f2.cpp
index 9c073b6891d..76672f2e0c5 100644
--- a/src/mame/video/taito_f2.cpp
+++ b/src/mame/video/taito_f2.cpp
@@ -977,7 +977,7 @@ UINT32 taitof2_state::screen_update_taitof2_ssi(screen_device &screen, bitmap_in
(they are in Majestic 12, but the tilemaps are not used anyway) */
screen.priority().fill(0, cliprect);
bitmap.fill(0, cliprect);
- draw_sprites(screen, bitmap, cliprect, NULL, 0);
+ draw_sprites(screen, bitmap, cliprect, nullptr, 0);
return 0;
}
@@ -990,7 +990,7 @@ UINT32 taitof2_state::screen_update_taitof2_yesnoj(screen_device &screen, bitmap
screen.priority().fill(0, cliprect);
bitmap.fill(0, cliprect); /* wrong color? */
- draw_sprites(screen, bitmap, cliprect, NULL, 0);
+ draw_sprites(screen, bitmap, cliprect, nullptr, 0);
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, m_tc0100scn->bottomlayer(), 0, 0);
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, m_tc0100scn->bottomlayer() ^ 1, 0, 0);
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, 2, 0, 0);
@@ -1008,7 +1008,7 @@ UINT32 taitof2_state::screen_update_taitof2(screen_device &screen, bitmap_ind16
bitmap.fill(0, cliprect); /* wrong color? */
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, m_tc0100scn->bottomlayer(), 0, 0);
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, m_tc0100scn->bottomlayer() ^ 1, 0, 0);
- draw_sprites(screen, bitmap, cliprect, NULL, 0);
+ draw_sprites(screen, bitmap, cliprect, nullptr, 0);
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, 2, 0, 0);
return 0;
}
@@ -1044,7 +1044,7 @@ UINT32 taitof2_state::screen_update_taitof2_pri(screen_device &screen, bitmap_in
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 2);
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, layer[2], 0, 4);
- draw_sprites(screen, bitmap, cliprect, NULL, 1);
+ draw_sprites(screen, bitmap, cliprect, nullptr, 1);
return 0;
}
@@ -1052,10 +1052,10 @@ UINT32 taitof2_state::screen_update_taitof2_pri(screen_device &screen, bitmap_in
void taitof2_state::draw_roz_layer( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, UINT32 priority)
{
- if (m_tc0280grd != NULL)
+ if (m_tc0280grd != nullptr)
m_tc0280grd->tc0280grd_zoom_draw(screen, bitmap, cliprect, m_pivot_xdisp, m_pivot_ydisp, priority);
- if (m_tc0430grw != NULL)
+ if (m_tc0430grw != nullptr)
m_tc0430grw->tc0430grw_zoom_draw(screen, bitmap, cliprect, m_pivot_xdisp, m_pivot_ydisp, priority);
}
@@ -1071,10 +1071,10 @@ UINT32 taitof2_state::screen_update_taitof2_pri_roz(screen_device &screen, bitma
taitof2_handle_sprite_buffering();
- if (m_tc0280grd != NULL)
+ if (m_tc0280grd != nullptr)
m_tc0280grd->tc0280grd_tilemap_update(roz_base_color);
- if (m_tc0430grw != NULL)
+ if (m_tc0430grw != nullptr)
m_tc0430grw->tc0430grw_tilemap_update(roz_base_color);
m_tc0100scn->tilemap_update();
@@ -1121,7 +1121,7 @@ UINT32 taitof2_state::screen_update_taitof2_pri_roz(screen_device &screen, bitma
}
}
- draw_sprites(screen, bitmap, cliprect, NULL, 1);
+ draw_sprites(screen, bitmap, cliprect, nullptr, 1);
return 0;
}
@@ -1310,7 +1310,7 @@ UINT32 taitof2_state::screen_update_taitof2_metalb(screen_device &screen, bitmap
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[3], 0, 8);
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[4], 0, 16);
- draw_sprites(screen, bitmap, cliprect, NULL, 1);
+ draw_sprites(screen, bitmap, cliprect, nullptr, 1);
return 0;
}
diff --git a/src/mame/video/taito_f3.cpp b/src/mame/video/taito_f3.cpp
index 99622d27221..ffc66158f0e 100644
--- a/src/mame/video/taito_f3.cpp
+++ b/src/mame/video/taito_f3.cpp
@@ -547,10 +547,10 @@ VIDEO_START_MEMBER(taito_f3_state,f3)
m_tr_3a = 0;
m_tr_3b = 1;
- m_spritelist=0;
- m_spriteram16_buffered=0;
- m_pf_line_inf=0;
- m_tile_opaque_sp=0;
+ m_spritelist=nullptr;
+ m_spriteram16_buffered=nullptr;
+ m_pf_line_inf=nullptr;
+ m_tile_opaque_sp=nullptr;
/* Setup individual game */
do {
@@ -1665,7 +1665,7 @@ void taito_f3_state::calculate_clip(int y, UINT16 pri, UINT32* clip0, UINT32* cl
case 0x0310: /* Clip plane 1 & 2 enable, plane 1 inverted */
{
if (sa_line_t->clip1_l[y] > sa_line_t->clip1_r[y])
- line_enable=0;
+ line_enable=nullptr;
else
*clip0=(sa_line_t->clip1_l[y]) | (sa_line_t->clip1_r[y]<<16);
@@ -1675,7 +1675,7 @@ void taito_f3_state::calculate_clip(int y, UINT16 pri, UINT32* clip0, UINT32* cl
case 0x0320: /* Clip plane 1 & 2 enable, plane 2 inverted */
{
if (sa_line_t->clip0_l[y] > sa_line_t->clip0_r[y])
- line_enable=0;
+ line_enable=nullptr;
else
*clip0=(sa_line_t->clip0_l[y]) | (sa_line_t->clip0_r[y]<<16);
@@ -2272,10 +2272,10 @@ void taito_f3_state::scanline_draw(bitmap_rgb32 &bitmap, const rectangle &clipre
/* set sprite alpha mode */
sprite_alpha_check=0;
sprite_alpha_all_2a=1;
- m_dpix_sp[1]=0;
- m_dpix_sp[2]=0;
- m_dpix_sp[4]=0;
- m_dpix_sp[8]=0;
+ m_dpix_sp[1]=nullptr;
+ m_dpix_sp[2]=nullptr;
+ m_dpix_sp[4]=nullptr;
+ m_dpix_sp[8]=nullptr;
for(i=0;i<4;i++) /* i = sprite priority offset */
{
UINT8 sprite_alpha_mode=(sprite_alpha>>(i*2))&3;
@@ -2389,20 +2389,20 @@ void taito_f3_state::scanline_draw(bitmap_rgb32 &bitmap, const rectangle &clipre
if(alpha_mode[3]>1) alpha_mode[3]=1;
if(alpha_mode[4]>1) alpha_mode[4]=1;
sprite_alpha_check=0;
- m_dpix_sp[1]=0;
- m_dpix_sp[2]=0;
- m_dpix_sp[4]=0;
- m_dpix_sp[8]=0;
+ m_dpix_sp[1]=nullptr;
+ m_dpix_sp[2]=nullptr;
+ m_dpix_sp[4]=nullptr;
+ m_dpix_sp[8]=nullptr;
}
}
}
else
{
sprite_alpha_check=0;
- m_dpix_sp[1]=0;
- m_dpix_sp[2]=0;
- m_dpix_sp[4]=0;
- m_dpix_sp[8]=0;
+ m_dpix_sp[1]=nullptr;
+ m_dpix_sp[2]=nullptr;
+ m_dpix_sp[4]=nullptr;
+ m_dpix_sp[8]=nullptr;
}
diff --git a/src/mame/video/taitojc.cpp b/src/mame/video/taitojc.cpp
index fd9493160fd..ecca7b3ff0e 100644
--- a/src/mame/video/taitojc.cpp
+++ b/src/mame/video/taitojc.cpp
@@ -304,7 +304,7 @@ void taitojc_state::video_start()
{
/* find first empty slot to decode gfx */
for (m_gfx_index = 0; m_gfx_index < MAX_GFX_ELEMENTS; m_gfx_index++)
- if (m_gfxdecode->gfx(m_gfx_index) == 0)
+ if (m_gfxdecode->gfx(m_gfx_index) == nullptr)
break;
assert(m_gfx_index != MAX_GFX_ELEMENTS);
diff --git a/src/mame/video/tc0080vco.cpp b/src/mame/video/tc0080vco.cpp
index 97d9e2f3000..40e7bd34f41 100644
--- a/src/mame/video/tc0080vco.cpp
+++ b/src/mame/video/tc0080vco.cpp
@@ -79,19 +79,19 @@ const device_type TC0080VCO = &device_creator<tc0080vco_device>;
tc0080vco_device::tc0080vco_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0080VCO, "Taito TC0080VCO", tag, owner, clock, "tc0080vco", __FILE__),
- m_ram(NULL),
- m_bg0_ram_0(NULL),
- m_bg0_ram_1(NULL),
- m_bg1_ram_0(NULL),
- m_bg1_ram_1(NULL),
- m_tx_ram_0(NULL),
- m_tx_ram_1(NULL),
- m_char_ram(NULL),
- m_bgscroll_ram(NULL),
- m_chain_ram_0(NULL),
- m_chain_ram_1(NULL),
- m_spriteram(NULL),
- m_scroll_ram(NULL),
+ m_ram(nullptr),
+ m_bg0_ram_0(nullptr),
+ m_bg0_ram_1(nullptr),
+ m_bg1_ram_0(nullptr),
+ m_bg1_ram_1(nullptr),
+ m_tx_ram_0(nullptr),
+ m_tx_ram_1(nullptr),
+ m_char_ram(nullptr),
+ m_bgscroll_ram(nullptr),
+ m_chain_ram_0(nullptr),
+ m_chain_ram_1(nullptr),
+ m_spriteram(nullptr),
+ m_scroll_ram(nullptr),
m_bg0_scrollx(0),
m_bg0_scrolly(0),
m_bg1_scrollx(0),
diff --git a/src/mame/video/tc0100scn.cpp b/src/mame/video/tc0100scn.cpp
index dc9e16489ce..e63bd9b0c25 100644
--- a/src/mame/video/tc0100scn.cpp
+++ b/src/mame/video/tc0100scn.cpp
@@ -150,14 +150,14 @@ const device_type TC0100SCN = &device_creator<tc0100scn_device>;
tc0100scn_device::tc0100scn_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0100SCN, "Taito TC0100SCN", tag, owner, clock, "tc0100scn", __FILE__),
- m_ram(NULL),
- m_bg_ram(NULL),
- m_fg_ram(NULL),
- m_tx_ram(NULL),
- m_char_ram(NULL),
- m_bgscroll_ram(NULL),
- m_fgscroll_ram(NULL),
- m_colscroll_ram(NULL),
+ m_ram(nullptr),
+ m_bg_ram(nullptr),
+ m_fg_ram(nullptr),
+ m_tx_ram(nullptr),
+ m_char_ram(nullptr),
+ m_bgscroll_ram(nullptr),
+ m_fgscroll_ram(nullptr),
+ m_colscroll_ram(nullptr),
m_bgscrollx(0),
m_bgscrolly(0),
m_fgscrollx(0),
@@ -318,8 +318,8 @@ void tc0100scn_device::device_reset()
m_dblwidth = 0;
m_gfxbank = 0; /* Mjnquest uniquely banks tiles */
- for (int i = 0; i < 8; i++)
- m_ctrl[i] = 0;
+ for (auto & elem : m_ctrl)
+ elem = 0;
}
diff --git a/src/mame/video/tc0110pcr.cpp b/src/mame/video/tc0110pcr.cpp
index f9c87099122..8c3fdf99d51 100644
--- a/src/mame/video/tc0110pcr.cpp
+++ b/src/mame/video/tc0110pcr.cpp
@@ -22,7 +22,7 @@ const device_type TC0110PCR = &device_creator<tc0110pcr_device>;
tc0110pcr_device::tc0110pcr_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0110PCR, "Taito TC0110PCR", tag, owner, clock, "tc0110pcr", __FILE__),
- m_ram(NULL),
+ m_ram(nullptr),
m_type(0),
m_addr(0),
m_palette(*this)
diff --git a/src/mame/video/tc0150rod.cpp b/src/mame/video/tc0150rod.cpp
index 2e7a0ce98fa..6077df445e3 100644
--- a/src/mame/video/tc0150rod.cpp
+++ b/src/mame/video/tc0150rod.cpp
@@ -16,7 +16,7 @@ const device_type TC0150ROD = &device_creator<tc0150rod_device>;
tc0150rod_device::tc0150rod_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0150ROD, "Taito TC0150ROD", tag, owner, clock, "tc0150rod", __FILE__),
- m_roadgfx(NULL)
+ m_roadgfx(nullptr)
{
}
diff --git a/src/mame/video/tc0180vcu.cpp b/src/mame/video/tc0180vcu.cpp
index 29809218cfd..ff7a1df5ed7 100644
--- a/src/mame/video/tc0180vcu.cpp
+++ b/src/mame/video/tc0180vcu.cpp
@@ -13,7 +13,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(NULL),
+ m_ram(nullptr),
//m_scrollram(NULL),
//m_bg_rambank(0),
//m_fg_rambank(0),
diff --git a/src/mame/video/tc0280grd.cpp b/src/mame/video/tc0280grd.cpp
index a4532102250..8034de45c6f 100644
--- a/src/mame/video/tc0280grd.cpp
+++ b/src/mame/video/tc0280grd.cpp
@@ -29,7 +29,7 @@ const device_type TC0280GRD = &device_creator<tc0280grd_device>;
tc0280grd_device::tc0280grd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0280GRD, "Taito TC0280GRD & TC0430GRW", tag, owner, clock, "tc0280grd", __FILE__),
- m_ram(NULL),
+ m_ram(nullptr),
//m_ctrl[8](0),
m_base_color(0),
m_gfxdecode(*this)
diff --git a/src/mame/video/tc0360pri.cpp b/src/mame/video/tc0360pri.cpp
index 43bf42ee1ef..e3620cb74ac 100644
--- a/src/mame/video/tc0360pri.cpp
+++ b/src/mame/video/tc0360pri.cpp
@@ -65,8 +65,8 @@ void tc0360pri_device::device_start()
void tc0360pri_device::device_reset()
{
- for (int i = 0; i < 16; i++)
- m_regs[i] = 0;
+ for (auto & elem : m_regs)
+ elem = 0;
}
diff --git a/src/mame/video/tc0480scp.cpp b/src/mame/video/tc0480scp.cpp
index 1c2aa3eea2a..df66f8afb3b 100644
--- a/src/mame/video/tc0480scp.cpp
+++ b/src/mame/video/tc0480scp.cpp
@@ -153,8 +153,8 @@ const device_type TC0480SCP = &device_creator<tc0480scp_device>;
tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, TC0480SCP, "Taito TC0480SCP", tag, owner, clock, "tc0480scp", __FILE__),
- m_tx_ram(NULL),
- m_char_ram(NULL),
+ m_tx_ram(nullptr),
+ m_char_ram(nullptr),
m_pri_reg(0),
m_dblwidth(0),
m_gfxnum(0),
@@ -173,10 +173,10 @@ tc0480scp_device::tc0480scp_device(const machine_config &mconfig, const char *ta
for (int i = 0; i < 4; i++)
{
- m_bg_ram[i] = NULL;
- m_bgscroll_ram[i] = NULL;
- m_rowzoom_ram[i] = NULL;
- m_bgcolumn_ram[i] = NULL;
+ m_bg_ram[i] = nullptr;
+ m_bgscroll_ram[i] = nullptr;
+ m_rowzoom_ram[i] = nullptr;
+ m_bgcolumn_ram[i] = nullptr;
m_bgscrollx[i] = 0;
m_bgscrolly[i] = 0;
}
@@ -317,8 +317,8 @@ void tc0480scp_device::device_reset()
{
m_dblwidth = 0;
- for (int i = 0; i < 0x18; i++)
- m_ctrl[i] = 0;
+ for (auto & elem : m_ctrl)
+ elem = 0;
}
diff --git a/src/mame/video/tceptor.cpp b/src/mame/video/tceptor.cpp
index e419140eda6..55347e4ce08 100644
--- a/src/mame/video/tceptor.cpp
+++ b/src/mame/video/tceptor.cpp
@@ -365,7 +365,7 @@ void tceptor_state::video_start()
/* find first empty slot to decode gfx */
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == 0)
+ if (m_gfxdecode->gfx(gfx_index) == nullptr)
break;
assert(gfx_index + 4 <= MAX_GFX_ELEMENTS);
diff --git a/src/mame/video/tecmo16.cpp b/src/mame/video/tecmo16.cpp
index 32a50cb23a2..7a49c8c705a 100644
--- a/src/mame/video/tecmo16.cpp
+++ b/src/mame/video/tecmo16.cpp
@@ -228,7 +228,7 @@ UINT32 tecmo16_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap,
m_bg_tilemap->draw(screen, m_tile_bitmap_bg, cliprect, 0, 0);
m_fg_tilemap->draw(screen, m_tile_bitmap_fg, cliprect, 0, 0);
- m_mixer->mix_bitmaps(screen, bitmap, cliprect, m_palette, &m_tile_bitmap_bg, &m_tile_bitmap_fg, (bitmap_ind16*)0, &m_sprite_bitmap);
+ m_mixer->mix_bitmaps(screen, bitmap, cliprect, m_palette, &m_tile_bitmap_bg, &m_tile_bitmap_fg, (bitmap_ind16*)nullptr, &m_sprite_bitmap);
// todo, this should go through the mixer!
m_tx_tilemap->draw(screen, bitmap, cliprect, 0, 0);
diff --git a/src/mame/video/thomson.cpp b/src/mame/video/thomson.cpp
index a258bb529da..1443fff7441 100644
--- a/src/mame/video/thomson.cpp
+++ b/src/mame/video/thomson.cpp
@@ -994,7 +994,7 @@ UINT32 thomson_state::screen_update_thom(screen_device &screen, bitmap_ind16 &bi
ypos = m_thom_bheight /* * scale */;
for ( y = 0; y < 200; v += xwidth, y++ , ypos ++ /* += scale */ )
{
- draw_scanline16( bitmap, xbleft, ypos, xwidth, v, NULL );
+ draw_scanline16( bitmap, xbleft, ypos, xwidth, v, nullptr );
#if 0
if ( thom_hires )
draw_scanline16( bitmap, xbleft, ypos+1, xwidth, v, NULL );
@@ -1166,11 +1166,11 @@ VIDEO_START_MEMBER( thomson_state, thom )
m_thom_scanline_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::thom_scanline_start),this));
m_thom_lightpen_nb = 0;
- m_thom_lightpen_cb = NULL;
+ m_thom_lightpen_cb = nullptr;
m_thom_lightpen_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::thom_lightpen_step),this));
save_item(NAME(m_thom_lightpen_nb));
- m_thom_init_cb = NULL;
+ m_thom_init_cb = nullptr;
m_thom_init_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(thomson_state::thom_set_init),this));
save_item(NAME(m_thom_bwidth));
diff --git a/src/mame/video/thunderj.cpp b/src/mame/video/thunderj.cpp
index cf5f06c87d7..34cb3485248 100644
--- a/src/mame/video/thunderj.cpp
+++ b/src/mame/video/thunderj.cpp
@@ -122,7 +122,7 @@ UINT32 thunderj_state::screen_update_thunderj(screen_device &screen, bitmap_ind1
// draw and merge the MO
bitmap_ind16 &mobitmap = m_vad->mob()->bitmap();
- for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
@@ -220,7 +220,7 @@ UINT32 thunderj_state::screen_update_thunderj(screen_device &screen, bitmap_ind1
m_vad->alpha()->draw(screen, bitmap, cliprect, 0, 0);
/* now go back and process the upper bit of MO priority */
- for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_vad->mob()->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/timex.cpp b/src/mame/video/timex.cpp
index 6b7bd460366..145b6e2131d 100644
--- a/src/mame/video/timex.cpp
+++ b/src/mame/video/timex.cpp
@@ -201,7 +201,7 @@ UINT32 spectrum_state::screen_update_ts2068(screen_device &screen, bitmap_ind16
int count;
if (m_border_bitmap.valid())
- copyscrollbitmap(bitmap, m_border_bitmap, 0, 0, 0, 0, cliprect);
+ copyscrollbitmap(bitmap, m_border_bitmap, 0, nullptr, 0, nullptr, cliprect);
if ((m_port_ff_data & 7) == 6)
{
@@ -238,7 +238,7 @@ UINT32 spectrum_state::screen_update_tc2048(screen_device &screen, bitmap_ind16
int count;
if (m_border_bitmap.valid())
- copyscrollbitmap(bitmap, m_border_bitmap, 0, 0, 0, 0, cliprect);
+ copyscrollbitmap(bitmap, m_border_bitmap, 0, nullptr, 0, nullptr, cliprect);
if ((m_port_ff_data & 7) == 6)
{
diff --git a/src/mame/video/toaplan2.cpp b/src/mame/video/toaplan2.cpp
index b47d98d2015..f1e971fc400 100644
--- a/src/mame/video/toaplan2.cpp
+++ b/src/mame/video/toaplan2.cpp
@@ -76,13 +76,13 @@ VIDEO_START_MEMBER(toaplan2_state,toaplan2)
/* our current VDP implementation needs this bitmap to work with */
m_screen->register_screen_bitmap(m_custom_priority_bitmap);
- if (m_vdp0 != NULL)
+ if (m_vdp0 != nullptr)
{
m_secondary_render_bitmap.reset();
m_vdp0->custom_priority_bitmap = &m_custom_priority_bitmap;
}
- if (m_vdp1 != NULL)
+ if (m_vdp1 != nullptr)
{
m_screen->register_screen_bitmap(m_secondary_render_bitmap);
m_vdp1->custom_priority_bitmap = &m_custom_priority_bitmap;
diff --git a/src/mame/video/tp84.cpp b/src/mame/video/tp84.cpp
index 80b3d00a95f..852f845edf4 100644
--- a/src/mame/video/tp84.cpp
+++ b/src/mame/video/tp84.cpp
@@ -53,8 +53,8 @@ PALETTE_INIT_MEMBER(tp84_state, tp84)
/* compute the color output resistor weights */
compute_resistor_weights(0, 255, -1.0,
4, resistances, weights, 470, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0,
+ 0, nullptr, nullptr, 0, 0);
/* create a lookup table for the palette */
for (i = 0; i < 0x100; i++)
diff --git a/src/mame/video/tubep.cpp b/src/mame/video/tubep.cpp
index 4899dde8bdf..adac17e1a65 100644
--- a/src/mame/video/tubep.cpp
+++ b/src/mame/video/tubep.cpp
@@ -168,7 +168,7 @@ PALETTE_INIT_MEMBER(tubep_state,tubep)
compute_resistor_weights(0, 255, -1.0,
3, resistors_txt_rg, weights_txt_rg, 470, 0,
2, resistors_txt_b, weights_txt_b, 470, 0,
- 0, 0, 0, 0, 0 );
+ 0, nullptr, nullptr, 0, 0 );
/* create text palette */
@@ -687,7 +687,7 @@ PALETTE_INIT_MEMBER(tubep_state,rjammer)
compute_resistor_weights(0, 255, -1.0,
3, resistors_rg, weights_rg, 470, 0,
2, resistors_b, weights_b, 470, 0,
- 0, 0, 0, 0, 0 );
+ 0, nullptr, nullptr, 0, 0 );
for (i = 0;i < palette.entries();i++)
{
diff --git a/src/mame/video/twin16.cpp b/src/mame/video/twin16.cpp
index 464bf85d8cd..5fee639712d 100644
--- a/src/mame/video/twin16.cpp
+++ b/src/mame/video/twin16.cpp
@@ -279,7 +279,7 @@ void twin16_state::draw_sprites( screen_device &screen, bitmap_ind16 &bitmap )
int pal_base = ((attributes&0xf)+0x10)*16;
int height = 16<<((attributes>>6)&0x3);
int width = 16<<((attributes>>4)&0x3);
- const UINT16 *pen_data = 0;
+ const UINT16 *pen_data = nullptr;
int flipy = attributes&0x0200;
int flipx = attributes&0x0100;
diff --git a/src/mame/video/twincobr.cpp b/src/mame/video/twincobr.cpp
index 11129fa21a7..4f602dd688a 100644
--- a/src/mame/video/twincobr.cpp
+++ b/src/mame/video/twincobr.cpp
@@ -356,7 +356,7 @@ UINT32 twincobr_state::screen_update_toaplan0(screen_device &screen, bitmap_ind1
UINT16 *buffered_spriteram16;
UINT32 bytes;
- if (m_spriteram16 != NULL)
+ if (m_spriteram16 != nullptr)
{
buffered_spriteram16 = m_spriteram16->buffer();
bytes = m_spriteram16->bytes();
diff --git a/src/mame/video/vaportra.cpp b/src/mame/video/vaportra.cpp
index c15527c6878..2d518fddc18 100644
--- a/src/mame/video/vaportra.cpp
+++ b/src/mame/video/vaportra.cpp
@@ -56,8 +56,8 @@ UINT32 vaportra_state::screen_update_vaportra(screen_device &screen, bitmap_ind1
int pri = m_priority[0] & 0x03;
flip_screen_set(!BIT(flip, 7));
- m_deco_tilegen1->pf_update(0, 0);
- m_deco_tilegen2->pf_update(0, 0);
+ m_deco_tilegen1->pf_update(nullptr, nullptr);
+ m_deco_tilegen2->pf_update(nullptr, nullptr);
m_spritegen->set_pri_type(1); // force priorities to be handled in a different way for this driver for now
diff --git a/src/mame/video/vigilant.cpp b/src/mame/video/vigilant.cpp
index 6728f37d8c2..0f95bdcde96 100644
--- a/src/mame/video/vigilant.cpp
+++ b/src/mame/video/vigilant.cpp
@@ -229,7 +229,7 @@ void vigilant_state::draw_background(bitmap_ind16 &bitmap, const rectangle &clip
m_rear_refresh=0;
}
- copyscrollbitmap(bitmap,*m_bg_bitmap,1,&scrollx,0,0,bottomvisiblearea);
+ copyscrollbitmap(bitmap,*m_bg_bitmap,1,&scrollx,0,nullptr,bottomvisiblearea);
}
diff --git a/src/mame/video/vindictr.cpp b/src/mame/video/vindictr.cpp
index e2a10874ffa..f29890764c4 100644
--- a/src/mame/video/vindictr.cpp
+++ b/src/mame/video/vindictr.cpp
@@ -212,7 +212,7 @@ UINT32 vindictr_state::screen_update_vindictr(screen_device &screen, bitmap_ind1
// draw and merge the MO
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
@@ -252,7 +252,7 @@ UINT32 vindictr_state::screen_update_vindictr(screen_device &screen, bitmap_ind1
m_alpha_tilemap->draw(screen, bitmap, cliprect, 0, 0);
/* now go back and process the upper bit of MO priority */
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/vs920a.cpp b/src/mame/video/vs920a.cpp
index b655f09a625..6e88864c216 100644
--- a/src/mame/video/vs920a.cpp
+++ b/src/mame/video/vs920a.cpp
@@ -34,7 +34,7 @@ const device_type VS920A = &device_creator<vs920a_text_tilemap_device>;
vs920a_text_tilemap_device::vs920a_text_tilemap_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, VS920A, "VS920A Text Tilemap", tag, owner, clock, "vs920a", __FILE__),
- m_vram(NULL),
+ m_vram(nullptr),
m_pal_base(0),
m_gfx_region(0),
m_gfxdecode(*this)
diff --git a/src/mame/video/vtvideo.cpp b/src/mame/video/vtvideo.cpp
index 5170143d749..b4d5b40ab55 100644
--- a/src/mame/video/vtvideo.cpp
+++ b/src/mame/video/vtvideo.cpp
@@ -112,7 +112,7 @@ void vt100_video_device::device_start()
m_write_clear_video_interrupt.resolve_safe();
m_gfx = machine().root_device().memregion(m_char_rom_tag)->base();
- assert(m_gfx != NULL);
+ assert(m_gfx != nullptr);
// LBA7 is scan line frequency update
machine().scheduler().timer_pulse(attotime::from_nsec(31778), timer_expired_delegate(FUNC(vt100_video_device::lba7_change), this));
@@ -247,7 +247,7 @@ WRITE8_MEMBER(vt100_video_device::dc012_w)
if (data == 0)
{
UINT8 *rom = machine().root_device().memregion("maincpu")->base();
- if (rom != NULL)
+ if (rom != nullptr)
{
UINT32 PC = space.device().safe_pc();
if ((rom[ PC - 1] == 0xe6) &&
diff --git a/src/mame/video/williams.cpp b/src/mame/video/williams.cpp
index a63f22c35c8..84f5d7a5578 100644
--- a/src/mame/video/williams.cpp
+++ b/src/mame/video/williams.cpp
@@ -114,7 +114,7 @@ void williams_state::state_save_register()
VIDEO_START_MEMBER(williams_state,williams)
{
- blitter_init(m_blitter_config, NULL);
+ blitter_init(m_blitter_config, nullptr);
create_palette_lookup();
state_save_register();
}
@@ -132,7 +132,7 @@ VIDEO_START_MEMBER(blaster_state,blaster)
VIDEO_START_MEMBER(williams2_state,williams2)
{
- blitter_init(m_blitter_config, NULL);
+ blitter_init(m_blitter_config, nullptr);
/* create the tilemap */
m_bg_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(williams2_state::get_tile_info),this), TILEMAP_SCAN_COLS, 24,16, 128,16);
diff --git a/src/mame/video/x68k.cpp b/src/mame/video/x68k.cpp
index fce9998286a..770ab644f8d 100644
--- a/src/mame/video/x68k.cpp
+++ b/src/mame/video/x68k.cpp
@@ -1079,7 +1079,7 @@ VIDEO_START_MEMBER(x68k_state,x68000)
int gfx_index;
for (gfx_index = 0; gfx_index < MAX_GFX_ELEMENTS; gfx_index++)
- if (m_gfxdecode->gfx(gfx_index) == 0)
+ if (m_gfxdecode->gfx(gfx_index) == nullptr)
break;
/* create the char set (gfx will then be updated dynamically from RAM) */
diff --git a/src/mame/video/xybots.cpp b/src/mame/video/xybots.cpp
index f67a57e10ac..6b1e1e75b8b 100644
--- a/src/mame/video/xybots.cpp
+++ b/src/mame/video/xybots.cpp
@@ -101,7 +101,7 @@ UINT32 xybots_state::screen_update_xybots(screen_device &screen, bitmap_ind16 &b
// draw and merge the MO
bitmap_ind16 &mobitmap = m_mob->bitmap();
- for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != NULL; rect = rect->next())
+ for (const sparse_dirty_rect *rect = m_mob->first_dirty_rect(cliprect); rect != nullptr; rect = rect->next())
for (int y = rect->min_y; y <= rect->max_y; y++)
{
UINT16 *mo = &mobitmap.pix16(y);
diff --git a/src/mame/video/ygv608.cpp b/src/mame/video/ygv608.cpp
index a4784c21b56..1b70da162ee 100644
--- a/src/mame/video/ygv608.cpp
+++ b/src/mame/video/ygv608.cpp
@@ -562,8 +562,8 @@ void ygv608_device::device_start()
m_tilemap_B_cache_16[1] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 64,32);
m_tilemap_B_cache_16[2] = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(ygv608_device::get_tile_info_B_16),this), tilemap_mapper_delegate(FUNC(ygv608_device::get_tile_offset),this), 16,16, 32,64);
- m_tilemap_A = NULL;
- m_tilemap_B = NULL;
+ m_tilemap_A = nullptr;
+ m_tilemap_B = nullptr;
register_state_save();
}
diff --git a/src/mame/video/zaccaria.cpp b/src/mame/video/zaccaria.cpp
index 573a77f09e5..85d99f009d4 100644
--- a/src/mame/video/zaccaria.cpp
+++ b/src/mame/video/zaccaria.cpp
@@ -47,7 +47,7 @@ PALETTE_INIT_MEMBER(zaccaria_state, zaccaria)
compute_resistor_weights(0, 0xff, -1.0,
3, resistances_rg, weights_rg, 390, 0,
2, resistances_b, weights_b, 470, 0,
- 0, 0, 0, 0, 0);
+ 0, nullptr, nullptr, 0, 0);
for (i = 0; i < 0x200; i++)
{
diff --git a/src/mame/video/zx8301.cpp b/src/mame/video/zx8301.cpp
index a7c115e8237..708b8c4879f 100644
--- a/src/mame/video/zx8301.cpp
+++ b/src/mame/video/zx8301.cpp
@@ -66,7 +66,7 @@ ADDRESS_MAP_END
const address_space_config *zx8301_device::memory_space_config(address_spacenum spacenum) const
{
- return (spacenum == AS_0) ? &m_space_config : NULL;
+ return (spacenum == AS_0) ? &m_space_config : nullptr;
}
@@ -108,7 +108,7 @@ zx8301_device::zx8301_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, ZX8301, "Sinclair ZX8301", tag, owner, clock, "zx8301", __FILE__),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, NULL, *ADDRESS_MAP_NAME(zx8301)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, nullptr, *ADDRESS_MAP_NAME(zx8301)),
m_cpu(*this),
m_write_vsync(*this),
m_dispoff(1),
diff --git a/src/osd/modules/debugger/debugint.cpp b/src/osd/modules/debugger/debugint.cpp
index 2598f481ca6..49ae108e881 100644
--- a/src/osd/modules/debugger/debugint.cpp
+++ b/src/osd/modules/debugger/debugint.cpp
@@ -28,7 +28,7 @@ class debug_internal : public osd_module, public debug_module
public:
debug_internal()
: osd_module(OSD_DEBUG_PROVIDER, "internal"), debug_module(),
- m_machine(NULL)
+ m_machine(nullptr)
{
}
@@ -150,7 +150,7 @@ class DView_edit
DISABLE_COPYING(DView_edit);
public:
- DView_edit(): active(0), container(NULL) { }
+ DView_edit(): active(0), container(nullptr) { }
~DView_edit() { }
int active;
render_container * container;
@@ -170,7 +170,7 @@ class DView
public:
DView(render_target *target, running_machine &machine, debug_view_type type, int flags)
- : next(NULL),
+ : next(nullptr),
type(0),
state(0),
ofs_x(0),
@@ -205,7 +205,7 @@ public:
machine().debug_view().free_view(*this->view);
}
- running_machine &machine() const { assert(m_machine != NULL); return *m_machine; }
+ running_machine &machine() const { assert(m_machine != nullptr); return *m_machine; }
DView * next;
@@ -259,11 +259,11 @@ INLINE void dview_set_state(DView *dv, int state, int onoff)
LOCAL VARIABLES
***************************************************************************/
-static render_font * debug_font = NULL;
+static render_font * debug_font = nullptr;
static int debug_font_width;
static int debug_font_height;
static float debug_font_aspect;
-static DView * list = NULL;
+static DView * list = nullptr;
static DView * focus_view;
static ui_menu * menu;
@@ -271,10 +271,10 @@ static DView_edit * cur_editor;
static void set_focus_view(DView *dv)
{
- if (focus_view != NULL)
+ if (focus_view != nullptr)
dview_set_state(focus_view, VIEW_STATE_NEEDS_UPDATE, TRUE);
- if (dv != NULL)
+ if (dv != nullptr)
dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE);
if (focus_view != dv)
@@ -863,16 +863,16 @@ static void dview_update(debug_view &dw, void *osdprivate)
void debug_internal::exit()
{
- for (DView *ndv = list; ndv != NULL; )
+ for (DView *ndv = list; ndv != nullptr; )
{
DView *temp = ndv;
ndv = ndv->next;
dview_free(temp);
}
- if (debug_font != NULL)
+ if (debug_font != nullptr)
{
m_machine->render().font_free(debug_font);
- debug_font = NULL;
+ debug_font = nullptr;
}
if (menu)
global_free(menu);
@@ -889,10 +889,10 @@ void debug_internal::init_debugger(running_machine &machine)
debug_font_width = 0;
debug_font_height = 15;
- menu = NULL;
- cur_editor = NULL;
- list = NULL;
- focus_view = NULL;
+ menu = nullptr;
+ cur_editor = nullptr;
+ list = nullptr;
+ focus_view = nullptr;
debug_font_aspect = m_machine->render().ui_aspect();
@@ -980,7 +980,7 @@ static void on_disasm_cpu_activate(DView *dv, const ui_menu_event *event)
if (event->iptkey == IPT_UI_RIGHT)
{
current = current->next();
- if (current == NULL)
+ if (current == nullptr)
current = dv->view->first_source();
dv->view->set_source(*current);
dview_set_state(dv, VIEW_STATE_NEEDS_UPDATE, TRUE);
@@ -1111,7 +1111,7 @@ static void render_editor(DView_edit *editor)
editor->container->empty();
/* get the size of the text */
editor->container->manager().machine().ui().draw_text_full(editor->container, editor->str.c_str(), 0.0f, 0.0f, 1.0f, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, NULL);
+ DRAW_NONE, ARGB_WHITE, ARGB_BLACK, &width, nullptr);
width += 2 * UI_BOX_LR_BORDER;
maxwidth = MAX(width, 0.5f);
@@ -1131,7 +1131,7 @@ static void render_editor(DView_edit *editor)
/* draw the text within it */
editor->container->manager().machine().ui().draw_text_full(editor->container, editor->str.c_str(), x1, y1, x2 - x1, JUSTIFY_CENTER, WRAP_TRUNCATE,
- DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, NULL, NULL);
+ DRAW_NORMAL, UI_TEXT_COLOR, UI_TEXT_BG_COLOR, nullptr, nullptr);
}
@@ -1176,8 +1176,8 @@ static void CreateMainMenu(running_machine &machine)
break;
}
- menu->item_append(title.append(focus_view->title).c_str(), NULL, MENU_FLAG_DISABLE, NULL);
- menu->item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ menu->item_append(title.append(focus_view->title).c_str(), nullptr, MENU_FLAG_DISABLE, nullptr);
+ menu->item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
switch (focus_view->type)
{
@@ -1191,37 +1191,37 @@ static void CreateMainMenu(running_machine &machine)
case DASM_RIGHTCOL_COMMENTS: subtext = "Comments"; break;
}
menu->item_append("View", subtext, MENU_FLAG_RIGHT_ARROW, (void *)on_view_opcodes_activate);
- menu->item_append("Run to cursor", NULL, 0, (void *)on_run_to_cursor_activate);
+ menu->item_append("Run to cursor", nullptr, 0, (void *)on_run_to_cursor_activate);
if (!dview_is_state(focus_view, VIEW_STATE_FOLLOW_CPU))
{
menu->item_append("CPU", focus_view->view->source()->name(), MENU_FLAG_RIGHT_ARROW, (void *)on_disasm_cpu_activate);
}
- menu->item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ menu->item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
break;
}
}
/* add input menu items */
- menu->item_append("New Memory Window", NULL, 0, (void *)on_memory_window_activate);
- menu->item_append("New Disassembly Window", NULL, 0, (void *)on_disassembly_window_activate);
- menu->item_append("New Error Log Window", NULL, 0, (void *)on_log_window_activate);
- menu->item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- menu->item_append("Run", NULL, 0, (void *)on_run_activate);
- menu->item_append("Run to Next CPU", NULL, 0, (void *)on_run_cpu_activate);
- menu->item_append("Run until Next Interrupt on This CPU", NULL, 0, (void *)on_run_irq_activate);
- menu->item_append("Run until Next VBLANK", NULL, 0, (void *)on_run_vbl_activate);
- menu->item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- menu->item_append("Step Into", NULL, 0, (void *)on_step_into_activate);
- menu->item_append("Step Over", NULL, 0, (void *)on_step_over_activate);
- menu->item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
- menu->item_append("Soft Reset", NULL, 0, (void *)on_soft_reset_activate);
- menu->item_append("Hard Reset", NULL, 0, (void *)on_hard_reset_activate);
- menu->item_append(MENU_SEPARATOR_ITEM, NULL, 0, NULL);
+ menu->item_append("New Memory Window", nullptr, 0, (void *)on_memory_window_activate);
+ menu->item_append("New Disassembly Window", nullptr, 0, (void *)on_disassembly_window_activate);
+ menu->item_append("New Error Log Window", nullptr, 0, (void *)on_log_window_activate);
+ menu->item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ menu->item_append("Run", nullptr, 0, (void *)on_run_activate);
+ menu->item_append("Run to Next CPU", nullptr, 0, (void *)on_run_cpu_activate);
+ menu->item_append("Run until Next Interrupt on This CPU", nullptr, 0, (void *)on_run_irq_activate);
+ menu->item_append("Run until Next VBLANK", nullptr, 0, (void *)on_run_vbl_activate);
+ menu->item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ menu->item_append("Step Into", nullptr, 0, (void *)on_step_into_activate);
+ menu->item_append("Step Over", nullptr, 0, (void *)on_step_over_activate);
+ menu->item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
+ menu->item_append("Soft Reset", nullptr, 0, (void *)on_soft_reset_activate);
+ menu->item_append("Hard Reset", nullptr, 0, (void *)on_hard_reset_activate);
+ menu->item_append(MENU_SEPARATOR_ITEM, nullptr, 0, nullptr);
if (!dview_is_state(focus_view, VIEW_STATE_FOLLOW_CPU))
- menu->item_append("Close Window", NULL, 0, (void *)on_close_activate);
- menu->item_append("Exit", NULL, 0, (void *)on_exit_activate);
+ menu->item_append("Close Window", nullptr, 0, (void *)on_close_activate);
+ menu->item_append("Exit", nullptr, 0, (void *)on_exit_activate);
}
static int map_point(DView *dv, INT32 target_x, INT32 target_y, INT32 *mapped_x, INT32 *mapped_y)
@@ -1254,16 +1254,16 @@ static void handle_mouse(running_machine &machine)
INT32 x,y;
bool button;
- if (menu != NULL)
+ if (menu != nullptr)
return;
mouse_target = ui_input_find_mouse(machine, &x, &y, &button);
- if (mouse_target == NULL)
+ if (mouse_target == nullptr)
return;
//printf("mouse %d %d %d\n", x, y, button);
- for (DView *dv = list; dv != NULL; dv = dv->next)
+ for (DView *dv = list; dv != nullptr; dv = dv->next)
{
if (mouse_target == dv->target)
{
@@ -1313,17 +1313,17 @@ static void handle_editor(running_machine &machine)
break;
}
}
- if (cur_editor != NULL)
+ if (cur_editor != nullptr)
{
render_editor(cur_editor);
if (ui_input_pressed(machine, IPT_UI_SELECT))
{
process_string(focus_view, focus_view->editor.str.c_str());
focus_view->editor.str = "";
- cur_editor = NULL;
+ cur_editor = nullptr;
}
if (ui_input_pressed(machine, IPT_UI_CANCEL))
- cur_editor = NULL;
+ cur_editor = nullptr;
}
}
@@ -1340,11 +1340,11 @@ static void handle_menus(running_machine &machine)
machine.render().ui_container().empty();
ui_input_frame_update(machine);
- if (menu != NULL)
+ if (menu != nullptr)
{
/* process the menu */
event = menu->process(0);
- if (event != NULL && (event->iptkey == IPT_UI_SELECT || (event->iptkey == IPT_UI_RIGHT)))
+ if (event != nullptr && (event->iptkey == IPT_UI_SELECT || (event->iptkey == IPT_UI_RIGHT)))
{
//global_free(menu);
//menu = NULL;
@@ -1355,7 +1355,7 @@ static void handle_menus(running_machine &machine)
else if (ui_input_pressed(machine, IPT_UI_CONFIGURE))
{
global_free(menu);
- menu = NULL;
+ menu = nullptr;
}
}
else
@@ -1378,7 +1378,7 @@ static void followers_set_cpu(device_t *device)
{
std::string title;
- for (DView *dv = list; dv != NULL; dv = dv->next)
+ for (DView *dv = list; dv != nullptr; dv = dv->next)
{
if (dview_is_state(dv, VIEW_STATE_FOLLOW_CPU))
{
@@ -1420,7 +1420,7 @@ static void update_views(void)
DView *dv, *prev;
LIST_GET_LAST(list, dv);
- while (dv != NULL)
+ while (dv != nullptr)
{
dview_update_view(dv);
LIST_GET_PREVIOUS(list, dv, prev);
@@ -1431,7 +1431,7 @@ static void update_views(void)
void debug_internal::wait_for_debugger(device_t &device, bool firststop)
{
- if (firststop && list == NULL)
+ if (firststop && list == nullptr)
{
render_target *target = &device.machine().render().ui_target();
@@ -1463,7 +1463,7 @@ void debug_internal::wait_for_debugger(device_t &device, bool firststop)
void debug_internal::debugger_update()
{
- if ((m_machine != NULL) && (!debug_cpu_is_stopped(*m_machine)) && (m_machine->phase() == MACHINE_PHASE_RUNNING))
+ if ((m_machine != nullptr) && (!debug_cpu_is_stopped(*m_machine)) && (m_machine->phase() == MACHINE_PHASE_RUNNING))
{
update_views();
}
diff --git a/src/osd/modules/debugger/none.cpp b/src/osd/modules/debugger/none.cpp
index 48085afd089..f6b22a1883a 100644
--- a/src/osd/modules/debugger/none.cpp
+++ b/src/osd/modules/debugger/none.cpp
@@ -16,7 +16,7 @@ class debug_none : public osd_module, public debug_module
public:
debug_none()
: osd_module(OSD_DEBUG_PROVIDER, "none"), debug_module(),
- m_machine(NULL)
+ m_machine(nullptr)
{
}
diff --git a/src/osd/modules/debugger/win/debugbaseinfo.cpp b/src/osd/modules/debugger/win/debugbaseinfo.cpp
index 66824b9f029..9f53899affd 100644
--- a/src/osd/modules/debugger/win/debugbaseinfo.cpp
+++ b/src/osd/modules/debugger/win/debugbaseinfo.cpp
@@ -25,7 +25,7 @@ void debugbase_info::smart_set_window_bounds(HWND wnd, HWND parent, RECT const &
// first get the current bounds, relative to the parent
GetWindowRect(wnd, &curbounds);
- if (parent != NULL)
+ if (parent != nullptr)
{
RECT parentbounds;
GetWindowRect(parent, &parentbounds);
@@ -44,7 +44,7 @@ void debugbase_info::smart_set_window_bounds(HWND wnd, HWND parent, RECT const &
// if we need to, reposition the window
if (flags != (SWP_NOMOVE | SWP_NOSIZE))
- SetWindowPos(wnd, NULL,
+ SetWindowPos(wnd, nullptr,
bounds.left, bounds.top,
bounds.right - bounds.left, bounds.bottom - bounds.top,
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER | flags);
diff --git a/src/osd/modules/debugger/win/debugwininfo.h b/src/osd/modules/debugger/win/debugwininfo.h
index 78c088a5eef..08e08d79de9 100644
--- a/src/osd/modules/debugger/win/debugwininfo.h
+++ b/src/osd/modules/debugger/win/debugwininfo.h
@@ -24,7 +24,7 @@ public:
debugwin_info(debugger_windows_interface &debugger, bool is_main_console, LPCSTR title, WNDPROC handler);
virtual ~debugwin_info();
- bool is_valid() const { return m_wnd != NULL; }
+ bool is_valid() const { return m_wnd != nullptr; }
debugwin_info *next() const { return m_next; }
void set_ignore_char_lparam(LPARAM value) { m_ignore_char_lparam = value >> 16; }
diff --git a/src/osd/modules/debugger/win/disasmbasewininfo.cpp b/src/osd/modules/debugger/win/disasmbasewininfo.cpp
index 783cc8d75fa..f7f516ca24c 100644
--- a/src/osd/modules/debugger/win/disasmbasewininfo.cpp
+++ b/src/osd/modules/debugger/win/disasmbasewininfo.cpp
@@ -25,7 +25,7 @@ disasmbasewin_info::disasmbasewin_info(debugger_windows_interface &debugger, boo
return;
m_views[0].reset(global_alloc(disasmview_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;
@@ -115,10 +115,10 @@ void disasmbasewin_info::update_menu()
// first find an existing breakpoint at this address
device_debug::breakpoint *bp = debug->breakpoint_first();
- while ((bp != NULL) && (bp->address() != address))
+ while ((bp != nullptr) && (bp->address() != address))
bp = bp->next();
- if (bp == NULL)
+ if (bp == nullptr)
{
ModifyMenu(menu, ID_TOGGLE_BREAKPOINT, MF_BYCOMMAND, ID_TOGGLE_BREAKPOINT, TEXT("Set breakpoint at cursor\tF9"));
ModifyMenu(menu, ID_DISABLE_BREAKPOINT, MF_BYCOMMAND, ID_DISABLE_BREAKPOINT, TEXT("Disable breakpoint at cursor\tShift+F9"));
@@ -131,7 +131,7 @@ void disasmbasewin_info::update_menu()
else
ModifyMenu(menu, ID_DISABLE_BREAKPOINT, MF_BYCOMMAND, ID_DISABLE_BREAKPOINT, TEXT("Enable breakpoint at cursor\tShift+F9"));
}
- bool const available = (bp != NULL) && (!is_main_console() || dasmview->source_is_visible_cpu());
+ bool const available = (bp != nullptr) && (!is_main_console() || dasmview->source_is_visible_cpu());
EnableMenuItem(menu, ID_DISABLE_BREAKPOINT, MF_BYCOMMAND | (available ? MF_ENABLED : MF_GRAYED));
}
else
@@ -168,7 +168,7 @@ bool disasmbasewin_info::handle_command(WPARAM wparam, LPARAM lparam)
INT32 bpindex = -1;
// first find an existing breakpoint at this address
- for (device_debug::breakpoint *bp = debug->breakpoint_first(); bp != NULL; bp = bp->next())
+ for (device_debug::breakpoint *bp = debug->breakpoint_first(); bp != nullptr; bp = bp->next())
{
if (address == bp->address())
{
@@ -182,7 +182,7 @@ bool disasmbasewin_info::handle_command(WPARAM wparam, LPARAM lparam)
{
if (bpindex == -1)
{
- bpindex = debug->breakpoint_set(address, NULL, NULL);
+ bpindex = debug->breakpoint_set(address, nullptr, nullptr);
debug_console_printf(machine(), "Breakpoint %X set\n", bpindex);
}
else
@@ -213,11 +213,11 @@ bool disasmbasewin_info::handle_command(WPARAM wparam, LPARAM lparam)
// first find an existing breakpoint at this address
device_debug::breakpoint *bp = debug->breakpoint_first();
- while ((bp != NULL) && (bp->address() != address))
+ while ((bp != nullptr) && (bp->address() != address))
bp = bp->next();
// if it doesn't exist, add a new one
- if (bp != NULL)
+ if (bp != nullptr)
{
if (!is_main_console())
{
diff --git a/src/osd/modules/debugger/win/logwininfo.cpp b/src/osd/modules/debugger/win/logwininfo.cpp
index 6610e8a296f..2f631e199d3 100644
--- a/src/osd/modules/debugger/win/logwininfo.cpp
+++ b/src/osd/modules/debugger/win/logwininfo.cpp
@@ -12,13 +12,13 @@
logwin_info::logwin_info(debugger_windows_interface &debugger) :
- debugwin_info(debugger, false, std::string("Errorlog: ").append(debugger.machine().system().description).append(" [").append(debugger.machine().system().name).append("]").c_str(), NULL)
+ debugwin_info(debugger, false, std::string("Errorlog: ").append(debugger.machine().system().description).append(" [").append(debugger.machine().system().name).append("]").c_str(), nullptr)
{
if (!window())
return;
m_views[0].reset(global_alloc(debugview_info(debugger, *this, window(), DVT_LOG)));
- 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/lib/osdlib_win32.cpp b/src/osd/modules/lib/osdlib_win32.cpp
index 85334fd8ddc..75218574aff 100644
--- a/src/osd/modules/lib/osdlib_win32.cpp
+++ b/src/osd/modules/lib/osdlib_win32.cpp
@@ -77,7 +77,7 @@ int osd_setenv(const char *name, const char *value, int overwrite)
if (!overwrite)
{
- if (osd_getenv(name) != NULL)
+ if (osd_getenv(name) != nullptr)
return 0;
}
buf = (char *) osd_malloc_array(strlen(name)+strlen(value)+2);
@@ -217,7 +217,7 @@ void osd_free(void *ptr)
void *osd_alloc_executable(size_t size)
{
- return VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
+ return VirtualAlloc(nullptr, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
}
diff --git a/src/osd/modules/lib/osdobj_common.h b/src/osd/modules/lib/osdobj_common.h
index ddbc8c974d4..c3501ec84b6 100644
--- a/src/osd/modules/lib/osdobj_common.h
+++ b/src/osd/modules/lib/osdobj_common.h
@@ -200,7 +200,7 @@ public:
// this INTERFACE but part of the osd IMPLEMENTATION
// getters
- running_machine &machine() { assert(m_machine != NULL); return *m_machine; }
+ running_machine &machine() { assert(m_machine != nullptr); return *m_machine; }
virtual void debugger_update();
diff --git a/src/osd/modules/midi/portmidi.cpp b/src/osd/modules/midi/portmidi.cpp
index dd75d58ff17..9aa02c63c5b 100644
--- a/src/osd/modules/midi/portmidi.cpp
+++ b/src/osd/modules/midi/portmidi.cpp
@@ -46,7 +46,7 @@ static const int RX_EVENT_BUF_SIZE = 512;
class osd_midi_device_pm : public osd_midi_device
{
public:
- osd_midi_device_pm(): pmStream(NULL), xmit_cnt(0), last_status(0), rx_sysex(false) { }
+ osd_midi_device_pm(): pmStream(nullptr), xmit_cnt(0), last_status(0), rx_sysex(false) { }
virtual ~osd_midi_device_pm() { }
virtual bool open_input(const char *devname);
virtual bool open_output(const char *devname);
@@ -147,7 +147,7 @@ bool osd_midi_device_pm::open_input(const char *devname)
if (found_dev >= 0)
{
- if (Pm_OpenInput(&stm, found_dev, NULL, RX_EVENT_BUF_SIZE, NULL, NULL) == pmNoError)
+ if (Pm_OpenInput(&stm, found_dev, nullptr, RX_EVENT_BUF_SIZE, nullptr, nullptr) == pmNoError)
{
pmStream = stm;
return true;
@@ -194,7 +194,7 @@ bool osd_midi_device_pm::open_output(const char *devname)
if (found_dev >= 0)
{
- if (Pm_OpenOutput(&stm, found_dev, NULL, 100, NULL, NULL, 0) == pmNoError)
+ if (Pm_OpenOutput(&stm, found_dev, nullptr, 100, nullptr, nullptr, 0) == pmNoError)
{
pmStream = stm;
return true;
diff --git a/src/osd/modules/osdmodule.cpp b/src/osd/modules/osdmodule.cpp
index e0d7781ace0..1c745effc6c 100644
--- a/src/osd/modules/osdmodule.cpp
+++ b/src/osd/modules/osdmodule.cpp
@@ -11,13 +11,13 @@ osd_module_manager::osd_module_manager()
{
for (int i=0; i<MAX_MODULES; i++)
{
- m_modules[i] = NULL;
- m_selected[i] = NULL;
+ m_modules[i] = nullptr;
+ m_selected[i] = nullptr;
}
}
osd_module_manager::~osd_module_manager()
{
- for (int i = 0; m_modules[i] != NULL; i++)
+ for (int i = 0; m_modules[i] != nullptr; i++)
{
m_modules[i]->~osd_module();
osd_free(m_modules[i]);
@@ -32,7 +32,7 @@ void osd_module_manager::register_module(const module_type &mod_type)
osd_printf_verbose("===> registered module %s %s\n", module->name(), module->type());
int i;
- for (i = 0; m_modules[i] != NULL; i++)
+ for (i = 0; m_modules[i] != nullptr; i++)
;
m_modules[i] = module;
}
@@ -55,7 +55,7 @@ osd_module *osd_module_manager::get_module_generic(const char *type, const char
if (i>=0)
return m_modules[i];
else
- return NULL;
+ return nullptr;
}
osd_module *osd_module_manager::select_module(const char *type, const char *name)
@@ -64,7 +64,7 @@ osd_module *osd_module_manager::select_module(const char *type, const char *name
// FIXME: check if already exists!
int i;
- for (i = 0; m_selected[i] != NULL; i++)
+ for (i = 0; m_selected[i] != nullptr; i++)
;
m_selected[i] = m;
return m;
@@ -72,7 +72,7 @@ osd_module *osd_module_manager::select_module(const char *type, const char *name
void osd_module_manager::init(const osd_options &options)
{
- for (int i = 0; m_selected[i] != NULL; i++)
+ for (int i = 0; m_selected[i] != nullptr; i++)
{
m_selected[i]->init(options);
}
@@ -82,18 +82,18 @@ void osd_module_manager::exit()
{
// Find count
int cnt;
- for (cnt = 0; m_selected[cnt] != NULL; cnt++)
+ for (cnt = 0; m_selected[cnt] != nullptr; cnt++)
;
for (int i = cnt - 1; i >= 0; i--)
{
m_selected[i]->exit();
- m_selected[i] = NULL;
+ m_selected[i] = nullptr;
}
}
int osd_module_manager::get_module_index(const char *type, const char *name)
{
- for (int i = 0; m_modules[i] != NULL; i++)
+ for (int i = 0; m_modules[i] != nullptr; i++)
{
if (strcmp(m_modules[i]->type(), type) == 0 && ((name[0] == 0) || (strcmp(name, m_modules[i]->name())==0)))
return i;
@@ -104,7 +104,7 @@ int osd_module_manager::get_module_index(const char *type, const char *name)
void osd_module_manager::get_module_names(const char *type, const int max, int *num, const char *names[])
{
*num = 0;
- for (int i = 0; m_modules[i] != NULL; i++)
+ for (int i = 0; m_modules[i] != nullptr; i++)
{
if ((strcmp(m_modules[i]->type(), type) == 0) && (*num < max))
{
diff --git a/src/osd/modules/render/d3d/d3d9intf.cpp b/src/osd/modules/render/d3d/d3d9intf.cpp
index d6751b6ca21..cb8eb741f65 100644
--- a/src/osd/modules/render/d3d/d3d9intf.cpp
+++ b/src/osd/modules/render/d3d/d3d9intf.cpp
@@ -70,32 +70,32 @@ base *drawd3d9_init(void)
// dynamically grab the create function from d3d9.dll
HINSTANCE dllhandle = LoadLibrary(TEXT("d3d9.dll"));
- if (dllhandle == NULL)
+ if (dllhandle == nullptr)
{
osd_printf_verbose("Direct3D: Unable to access d3d9.dll\n");
- return NULL;
+ return nullptr;
}
// import the create function
direct3dcreate9_ptr direct3dcreate9 = (direct3dcreate9_ptr)GetProcAddress(dllhandle, "Direct3DCreate9");
- if (direct3dcreate9 == NULL)
+ if (direct3dcreate9 == nullptr)
{
osd_printf_verbose("Direct3D: Unable to find Direct3DCreate9\n");
FreeLibrary(dllhandle);
- return NULL;
+ return nullptr;
}
// create our core direct 3d object
IDirect3D9 *d3d9 = (*direct3dcreate9)(D3D_SDK_VERSION);
- if (d3d9 == NULL)
+ if (d3d9 == nullptr)
{
osd_printf_verbose("Direct3D: Error attempting to initialize Direct3D9\n");
FreeLibrary(dllhandle);
- return NULL;
+ return nullptr;
}
// dynamically grab the shader load function from d3dx9.dll
- HINSTANCE fxhandle = NULL;
+ HINSTANCE fxhandle = nullptr;
for (int idx = 99; idx >= 0; idx--) // a shameful moogle
{
#ifdef UNICODE
@@ -107,19 +107,19 @@ base *drawd3d9_init(void)
sprintf(dllbuf, "d3dx9_%d.dll", idx);
fxhandle = LoadLibraryA(dllbuf);
#endif
- if (fxhandle != NULL)
+ if (fxhandle != nullptr)
{
break;
}
}
- if (fxhandle == NULL)
+ if (fxhandle == nullptr)
{
osd_printf_verbose("Direct3D: Warning - Unable find any D3D9 DLLs; disabling post-effect rendering\n");
post_available = false;
}
// allocate an object to hold our data
- base *d3dptr = global_alloc(base);
+ auto d3dptr = global_alloc(base);
d3dptr->version = 9;
d3dptr->d3dobj = d3d9;
d3dptr->dllhandle = dllhandle;
@@ -284,20 +284,20 @@ static HRESULT device_clear(device *dev, DWORD count, const D3DRECT *rects, DWOR
static HRESULT device_create_offscreen_plain_surface(device *dev, UINT width, UINT height, D3DFORMAT format, D3DPOOL pool, surface **surface)
{
IDirect3DDevice9 *device = (IDirect3DDevice9 *)dev;
- return IDirect3DDevice9_CreateOffscreenPlainSurface(device, width, height, format, pool, (IDirect3DSurface9 **)surface, NULL);
+ return IDirect3DDevice9_CreateOffscreenPlainSurface(device, width, height, format, pool, (IDirect3DSurface9 **)surface, nullptr);
}
static HRESULT device_create_texture(device *dev, UINT width, UINT height, UINT levels, DWORD usage, D3DFORMAT format, D3DPOOL pool, texture **texture)
{
IDirect3DDevice9 *device = (IDirect3DDevice9 *)dev;
- return IDirect3DDevice9_CreateTexture(device, width, height, levels, usage, format, pool, (IDirect3DTexture9 **)texture, NULL);
+ return IDirect3DDevice9_CreateTexture(device, width, height, levels, usage, format, pool, (IDirect3DTexture9 **)texture, nullptr);
}
static HRESULT device_create_vertex_buffer(device *dev, UINT length, DWORD usage, DWORD fvf, D3DPOOL pool, vertex_buffer **buf)
{
IDirect3DDevice9 *device = (IDirect3DDevice9 *)dev;
- return IDirect3DDevice9_CreateVertexBuffer(device, length, usage, fvf, pool, (IDirect3DVertexBuffer9 **)buf, NULL);
+ return IDirect3DDevice9_CreateVertexBuffer(device, length, usage, fvf, pool, (IDirect3DVertexBuffer9 **)buf, nullptr);
}
@@ -395,7 +395,7 @@ static HRESULT device_set_render_target(device *dev, DWORD index, surface *surf)
static HRESULT device_create_render_target(device *dev, UINT width, UINT height, D3DFORMAT format, surface **surface)
{
IDirect3DDevice9 *device = (IDirect3DDevice9 *)dev;
- return IDirect3DDevice9_CreateRenderTarget(device, width, height, format, D3DMULTISAMPLE_NONE, 0, false, (IDirect3DSurface9 **)surface, NULL);
+ return IDirect3DDevice9_CreateRenderTarget(device, width, height, format, D3DMULTISAMPLE_NONE, 0, false, (IDirect3DSurface9 **)surface, nullptr);
}
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp
index 567426b3c27..2cffe639ec2 100644
--- a/src/osd/modules/render/d3d/d3dhlsl.cpp
+++ b/src/osd/modules/render/d3d/d3dhlsl.cpp
@@ -2907,7 +2907,7 @@ void uniform::update()
}
else
{
- float targetdims[2] = { shadersys->curr_render_target->target_width, shadersys->curr_render_target->target_height };
+ float targetdims[2] = { static_cast<float>(shadersys->curr_render_target->target_width), static_cast<float>(shadersys->curr_render_target->target_height) };
m_shader->set_vector("TargetDims", 2, targetdims);
}
break;
@@ -3013,7 +3013,7 @@ void uniform::update()
break;
case CU_POST_SHADOW_COUNT:
{
- float shadowcount[2] = { options->shadow_mask_count_x, options->shadow_mask_count_y };
+ float shadowcount[2] = { static_cast<float>(options->shadow_mask_count_x), static_cast<float>(options->shadow_mask_count_y) };
m_shader->set_vector("ShadowCount", 2, shadowcount);
break;
}
diff --git a/src/osd/modules/render/draw13.cpp b/src/osd/modules/render/draw13.cpp
index 79540bfd624..6b5528f9a5e 100644
--- a/src/osd/modules/render/draw13.cpp
+++ b/src/osd/modules/render/draw13.cpp
@@ -260,7 +260,7 @@ static void drawsdl2_exit(void);
// STATIC VARIABLES
//============================================================
-#define BM_ALL (-1)
+#define BM_ALL (UINT32_MAX)
//( SDL_BLENDMODE_MASK | SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MOD)
#define ENTRY(a,b,f) { SDL_TEXFORMAT_ ## a, SDL_PIXELFORMAT_ ## b, &texcopy_ ## f, BM_ALL, #a, #b, 0, 0, 0, 0}
diff --git a/src/osd/modules/sync/sync_mini.cpp b/src/osd/modules/sync/sync_mini.cpp
index a09303aed80..f5e6accb0c7 100644
--- a/src/osd/modules/sync/sync_mini.cpp
+++ b/src/osd/modules/sync/sync_mini.cpp
@@ -82,7 +82,7 @@ void osd_lock_free(osd_lock *lock)
osd_event *osd_event_alloc(int manualreset, int initialstate)
{
- return NULL;
+ return nullptr;
}
@@ -129,7 +129,7 @@ int osd_event_wait(osd_event *event, osd_ticks_t timeout)
osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
{
- return NULL;
+ return nullptr;
}
diff --git a/src/osd/modules/sync/sync_windows.cpp b/src/osd/modules/sync/sync_windows.cpp
index c3d93c75fc9..9439d68b72c 100644
--- a/src/osd/modules/sync/sync_windows.cpp
+++ b/src/osd/modules/sync/sync_windows.cpp
@@ -68,7 +68,7 @@ struct osd_scalable_lock
// GLOBAL VARIABLES
//============================================================
-static try_enter_critical_section_ptr try_enter_critical_section = NULL;
+static try_enter_critical_section_ptr try_enter_critical_section = nullptr;
static int checked_for_try_enter = FALSE;
@@ -80,8 +80,8 @@ static int checked_for_try_enter = FALSE;
osd_lock *osd_lock_alloc(void)
{
osd_lock *lock = (osd_lock *)malloc(sizeof(*lock));
- if (lock == NULL)
- return NULL;
+ if (lock == nullptr)
+ return nullptr;
InitializeCriticalSection(&lock->critsect);
return lock;
}
@@ -121,13 +121,13 @@ int osd_lock_try(osd_lock *lock)
{
// see if we can use TryEnterCriticalSection
HMODULE library = LoadLibrary(TEXT("kernel32.dll"));
- if (library != NULL)
+ if (library != nullptr)
try_enter_critical_section = (try_enter_critical_section_ptr)GetProcAddress(library, "TryEnterCriticalSection");
checked_for_try_enter = TRUE;
}
// if we have it, use it, otherwise just block
- if (try_enter_critical_section != NULL)
+ if (try_enter_critical_section != nullptr)
result = (*try_enter_critical_section)(&lock->critsect);
else
EnterCriticalSection(&lock->critsect);
@@ -203,7 +203,7 @@ INT32 win_atomic_add32(INT32 volatile *ptr, INT32 delta)
osd_event *osd_event_alloc(int manualreset, int initialstate)
{
- return (osd_event *) CreateEvent(NULL, manualreset, initialstate, NULL);
+ return (osd_event *) CreateEvent(nullptr, manualreset, initialstate, nullptr);
}
//============================================================
@@ -271,15 +271,15 @@ osd_thread *osd_thread_create(osd_thread_callback callback, void *cbparam)
uintptr_t handle;
thread = (osd_thread *)calloc(1, sizeof(osd_thread));
- if (thread == NULL)
- return NULL;
+ if (thread == nullptr)
+ return nullptr;
thread->callback = callback;
thread->param = cbparam;
- handle = _beginthreadex(NULL, 0, worker_thread_entry, thread, 0, NULL);
+ handle = _beginthreadex(nullptr, 0, worker_thread_entry, thread, 0, nullptr);
if (handle == 0)
{
free(thread);
- return NULL;
+ return nullptr;
}
thread->handle = (HANDLE) handle;
return thread;
@@ -327,8 +327,8 @@ osd_scalable_lock *osd_scalable_lock_alloc(void)
osd_scalable_lock *lock;
lock = (osd_scalable_lock *)calloc(1, sizeof(*lock));
- if (lock == NULL)
- return NULL;
+ if (lock == nullptr)
+ return nullptr;
memset(lock, 0, sizeof(*lock));
#if USE_SCALABLE_LOCKS
diff --git a/src/osd/modules/sync/work_mini.cpp b/src/osd/modules/sync/work_mini.cpp
index fd359c6ee40..3d4b10fc539 100644
--- a/src/osd/modules/sync/work_mini.cpp
+++ b/src/osd/modules/sync/work_mini.cpp
@@ -80,8 +80,8 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
// allocate memory to hold the result
item = (osd_work_item *)malloc(sizeof(*item));
- if (item == NULL)
- return NULL;
+ if (item == nullptr)
+ return nullptr;
// loop over all requested items
for (itemnum = 0; itemnum < numitems; itemnum++)
@@ -97,7 +97,7 @@ osd_work_item *osd_work_item_queue_multiple(osd_work_queue *queue, osd_work_call
if (flags & WORK_ITEM_FLAG_AUTO_RELEASE)
{
free(item);
- item = NULL;
+ item = nullptr;
}
return item;
}
diff --git a/src/osd/osdcore.cpp b/src/osd/osdcore.cpp
index 82bbf1ee63b..91ba3fc4266 100644
--- a/src/osd/osdcore.cpp
+++ b/src/osd/osdcore.cpp
@@ -17,7 +17,7 @@ void osd_output::push(osd_output *delegate)
{
if (m_ptr < MAXSTACK)
{
- delegate->m_chain = (m_ptr >= 0 ? m_stack[m_ptr] : NULL);
+ delegate->m_chain = (m_ptr >= 0 ? m_stack[m_ptr] : nullptr);
m_ptr++;
m_stack[m_ptr] = delegate;
}
diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h
index 982cfbf2234..d39e49d3bff 100644
--- a/src/osd/osdcore.h
+++ b/src/osd/osdcore.h
@@ -962,7 +962,7 @@ enum osd_output_channel
class osd_output
{
public:
- osd_output() : m_chain(NULL) { }
+ osd_output() : m_chain(nullptr) { }
virtual ~osd_output() { }
virtual void output_callback(osd_output_channel channel, const char *msg, va_list args) = 0;
@@ -973,7 +973,7 @@ protected:
void chain_output(osd_output_channel channel, const char *msg, va_list args)
{
- if (m_chain != NULL)
+ if (m_chain != nullptr)
m_chain->output_callback(channel, msg, args);
}
private:
diff --git a/src/osd/osdmini/minidir.cpp b/src/osd/osdmini/minidir.cpp
index 66b815daabb..e061b644cdf 100644
--- a/src/osd/osdmini/minidir.cpp
+++ b/src/osd/osdmini/minidir.cpp
@@ -17,7 +17,7 @@ osd_directory *osd_opendir(const char *dirname)
{
// since there are no standard C library routines for walking directories,
// we always return an error here
- return NULL;
+ return nullptr;
}
@@ -29,7 +29,7 @@ const osd_directory_entry *osd_readdir(osd_directory *dir)
{
// since there are no standard C library routines for walking directories,
// we always return an error here
- return NULL;
+ return nullptr;
}
diff --git a/src/osd/osdmini/minifile.cpp b/src/osd/osdmini/minifile.cpp
index b55a3ad77e9..b30b566585c 100644
--- a/src/osd/osdmini/minifile.cpp
+++ b/src/osd/osdmini/minifile.cpp
@@ -35,7 +35,7 @@ file_error osd_open(const char *path, UINT32 openflags, osd_file **file, UINT64
// open the file
fileptr = fopen(path, mode);
- if (fileptr == NULL)
+ if (fileptr == nullptr)
return FILERR_NOT_FOUND;
// store the file pointer directly as an osd_file
@@ -75,7 +75,7 @@ file_error osd_read(osd_file *file, void *buffer, UINT64 offset, UINT32 length,
// perform the read
count = fread(buffer, 1, length, (FILE *)file);
- if (actual != NULL)
+ if (actual != nullptr)
*actual = count;
return FILERR_NONE;
@@ -95,7 +95,7 @@ file_error osd_write(osd_file *file, const void *buffer, UINT64 offset, UINT32 l
// perform the write
count = fwrite(buffer, 1, length, (FILE *)file);
- if (actual != NULL)
+ if (actual != nullptr)
*actual = count;
return FILERR_NONE;
@@ -169,7 +169,7 @@ int osd_uchar_from_osdchar(UINT32 /* unicode_char */ *uchar, const char *osdchar
osd_directory_entry *osd_stat(const char *path)
{
- osd_directory_entry *result = NULL;
+ osd_directory_entry *result = nullptr;
// create an osd_directory_entry; be sure to make sure that the caller can
// free all resources by just freeing the resulting osd_directory_entry
@@ -180,7 +180,7 @@ osd_directory_entry *osd_stat(const char *path)
result->size = 0;
FILE *f = fopen(path, "rb");
- if (f != NULL)
+ if (f != nullptr)
{
fseek(f, 0, SEEK_END);
result->type = ENTTYPE_FILE;
@@ -199,11 +199,11 @@ file_error osd_get_full_path(char **dst, const char *path)
{
// derive the full path of the file in an allocated string
// for now just fake it since we don't presume any underlying file system
- *dst = NULL;
- if (path != NULL)
+ *dst = nullptr;
+ if (path != nullptr)
{
*dst = (char *)osd_malloc_array(strlen(path) + 1);
- if (*dst != NULL)
+ if (*dst != nullptr)
strcpy(*dst, path);
}
@@ -218,5 +218,5 @@ file_error osd_get_full_path(char **dst, const char *path)
const char *osd_get_volume_name(int idx)
{
// we don't expose volumes
- return NULL;
+ return nullptr;
}
diff --git a/src/osd/osdmini/minimain.cpp b/src/osd/osdmini/minimain.cpp
index c0598e65dfd..18fbba1bc37 100644
--- a/src/osd/osdmini/minimain.cpp
+++ b/src/osd/osdmini/minimain.cpp
@@ -117,7 +117,7 @@ void mini_osd_interface::init(running_machine &machine)
// initialize the input system by adding devices
// let's pretend like we have a keyboard device
keyboard_device = machine.input().device_class(DEVICE_CLASS_KEYBOARD).add_device("Keyboard");
- if (keyboard_device == NULL)
+ if (keyboard_device == nullptr)
fatalerror("Error creating keyboard device\n");
// our faux keyboard only has a couple of keys (corresponding to the
diff --git a/src/osd/osdmini/minimisc.cpp b/src/osd/osdmini/minimisc.cpp
index 21d658ace5b..c6bb413b292 100644
--- a/src/osd/osdmini/minimisc.cpp
+++ b/src/osd/osdmini/minimisc.cpp
@@ -79,7 +79,7 @@ void osd_break_into_debugger(const char *message)
char *osd_get_clipboard_text(void)
{
// can't support clipboards generically
- return NULL;
+ return nullptr;
}
//============================================================
@@ -88,7 +88,7 @@ char *osd_get_clipboard_text(void)
const char *osd_getenv(const char *name)
{
- return NULL;
+ return nullptr;
}
//============================================================
diff --git a/src/osd/osdnet.cpp b/src/osd/osdnet.cpp
index 4c167251cea..057a562ee76 100644
--- a/src/osd/osdnet.cpp
+++ b/src/osd/osdnet.cpp
@@ -7,11 +7,11 @@ static class simple_list<osd_netdev::entry_t> netdev_list;
void add_netdev(const char *name, const char *description, create_netdev func)
{
- osd_netdev::entry_t *entry = global_alloc_clear(osd_netdev::entry_t);
+ auto entry = global_alloc_clear(osd_netdev::entry_t);
entry->id = netdev_list.count();
strncpy(entry->name, name, 255);
entry->name[255] = '\0';
- strncpy(entry->description, (description != NULL) ? description : "(no name)", 255);
+ strncpy(entry->description, (description != nullptr) ? description : "(no name)", 255);
entry->description[255] = '\0';
entry->func = func;
netdev_list.append(*entry);
@@ -35,7 +35,7 @@ class osd_netdev *open_netdev(int id, class device_network_interface *ifdev, int
entry = entry->m_next;
}
- return NULL;
+ return nullptr;
}
osd_netdev::osd_netdev(class device_network_interface *ifdev, int rate)
diff --git a/src/osd/sdl/watchdog.cpp b/src/osd/sdl/watchdog.cpp
index c3fef7a7709..01d98f460dc 100644
--- a/src/osd/sdl/watchdog.cpp
+++ b/src/osd/sdl/watchdog.cpp
@@ -38,7 +38,7 @@ static void *watchdog_thread(void *param)
osd_process_kill();
}
}
- return NULL;
+ return nullptr;
}
watchdog::watchdog(void)
diff --git a/src/osd/windows/ledutil.cpp b/src/osd/windows/ledutil.cpp
index 6788fdaf53e..6106005145e 100644
--- a/src/osd/windows/ledutil.cpp
+++ b/src/osd/windows/ledutil.cpp
@@ -180,13 +180,13 @@ int main(int argc, char *argv[])
// if the argument is "-kill", post a close message
if (strcmp(arg, "-kill") == 0)
{
- if (otherwnd != NULL)
+ if (otherwnd != nullptr)
PostMessage(otherwnd, WM_QUIT, 0, 0);
- return (otherwnd != NULL) ? 1 : 0;
+ return (otherwnd != nullptr) ? 1 : 0;
}
// if we had another instance, defer to it
- if (otherwnd != NULL)
+ if (otherwnd != nullptr)
return 0;
// call the startup code
@@ -205,11 +205,11 @@ int main(int argc, char *argv[])
WINDOW_STYLE,
0, 0,
1, 1,
- NULL,
- NULL,
- GetModuleHandle(NULL),
- NULL);
- if (listener_hwnd == NULL)
+ nullptr,
+ nullptr,
+ GetModuleHandle(nullptr),
+ nullptr);
+ if (listener_hwnd == nullptr)
goto error;
// allocate message ids
@@ -235,18 +235,18 @@ int main(int argc, char *argv[])
// see if MAME is already running
otherwnd = FindWindow(OUTPUT_WINDOW_CLASS, OUTPUT_WINDOW_NAME);
- if (otherwnd != NULL)
+ if (otherwnd != nullptr)
handle_mame_start((WPARAM)otherwnd, 0);
// process messages
- while (GetMessage(&message, NULL, 0, 0))
+ while (GetMessage(&message, nullptr, 0, 0))
{
TranslateMessage(&message);
DispatchMessage(&message);
}
// reset on the way out if still live
- if (mame_target != NULL)
+ if (mame_target != nullptr)
handle_mame_stop((WPARAM)mame_target, 0);
exitcode = 0;
@@ -273,7 +273,7 @@ static int create_window_class(void)
// initialize the description of the window class
wc.lpszClassName = WINDOW_CLASS;
- wc.hInstance = GetModuleHandle(NULL);
+ wc.hInstance = GetModuleHandle(nullptr);
wc.lpfnWndProc = listener_window_proc;
// register the class; fail if we can't
@@ -351,7 +351,7 @@ static LRESULT handle_mame_stop(WPARAM wparam, LPARAM lparam)
return 1;
// clear our target out
- mame_target = NULL;
+ mame_target = nullptr;
reset_id_to_outname_cache();
// reset the LED states
@@ -379,11 +379,11 @@ static LRESULT handle_copydata(WPARAM wparam, LPARAM lparam)
// allocate memory
entry = (id_map_entry *)malloc(sizeof(*entry));
- if (entry == NULL)
+ if (entry == nullptr)
return 0;
string = (char *)malloc(strlen(data->string) + 1);
- if (string == NULL)
+ if (string == nullptr)
{
free(entry);
return 0;
@@ -411,7 +411,7 @@ static LRESULT handle_copydata(WPARAM wparam, LPARAM lparam)
static void reset_id_to_outname_cache(void)
{
// free our ID list
- while (idmaplist != NULL)
+ while (idmaplist != nullptr)
{
id_map_entry *temp = idmaplist;
idmaplist = temp->next;
@@ -430,7 +430,7 @@ static const char *map_id_to_outname(WPARAM id)
id_map_entry *entry;
// see if we have an entry in our map
- for (entry = idmaplist; entry != NULL; entry = entry->next)
+ for (entry = idmaplist; entry != nullptr; entry = entry->next)
if (entry->id == id)
return entry->name;
@@ -438,7 +438,7 @@ static const char *map_id_to_outname(WPARAM id)
SendMessage(mame_target, om_mame_get_id_string, (WPARAM)listener_hwnd, id);
// now see if we have the entry in our map
- for (entry = idmaplist; entry != NULL; entry = entry->next)
+ for (entry = idmaplist; entry != nullptr; entry = entry->next)
if (entry->id == id)
return entry->name;
@@ -476,7 +476,7 @@ static void output_startup(const char *commandline)
{
// default to PS/2, override if USB is specified as a parameter
ledmethod = LED_METHOD_PS2;
- if (commandline != NULL && strcmp(commandline, "-usb") == 0)
+ if (commandline != nullptr && strcmp(commandline, "-usb") == 0)
ledmethod = LED_METHOD_USB;
// output the method
@@ -522,7 +522,7 @@ static void output_mame_start(void)
return;
}
- hKbdDev = CreateFile(TEXT("\\\\.\\Kbd"), GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
+ hKbdDev = CreateFile(TEXT("\\\\.\\Kbd"), GENERIC_WRITE, 0, nullptr, OPEN_EXISTING, 0, nullptr);
if (hKbdDev == INVALID_HANDLE_VALUE)
{
error_number = GetLastError();
@@ -551,7 +551,7 @@ static void output_mame_stop(void)
switch (ledmethod)
{
case LED_METHOD_PS2:
- if (!DefineDosDevice(DDD_REMOVE_DEFINITION, TEXT("Kbd"), NULL))
+ if (!DefineDosDevice(DDD_REMOVE_DEFINITION, TEXT("Kbd"), nullptr))
{
error_number = GetLastError();
fprintf(stderr, "Unable to close the keyboard device. (error %d)\n", error_number);
@@ -632,9 +632,9 @@ static int led_get_state(void)
OutputBuffer.UnitId = 0;
DeviceIoControl(hKbdDev, IOCTL_KEYBOARD_QUERY_INDICATORS,
- NULL, 0,
+ nullptr, 0,
&OutputBuffer, DataLength,
- &ReturnedLength, NULL);
+ &ReturnedLength, nullptr);
// Demangle lights to match 95/98
if (OutputBuffer.LedFlags & KEYBOARD_NUM_LOCK_ON) result |= 0x1;
@@ -702,8 +702,8 @@ static void led_set_state(int state)
InputBuffer.LedFlags = LedFlags;
DeviceIoControl(hKbdDev, IOCTL_KEYBOARD_SET_INDICATORS,
&InputBuffer, DataLength,
- NULL, 0,
- &ReturnedLength, NULL);
+ nullptr, 0,
+ &ReturnedLength, nullptr);
break;
}
}
diff --git a/src/osd/windows/output.cpp b/src/osd/windows/output.cpp
index 41f2fd26201..0419d9bc2a7 100644
--- a/src/osd/windows/output.cpp
+++ b/src/osd/windows/output.cpp
@@ -85,7 +85,7 @@ bool windows_osd_interface::output_init()
int result;
// reset globals
- clientlist = NULL;
+ clientlist = nullptr;
// create our window class
result = create_window_class();
@@ -100,11 +100,11 @@ bool windows_osd_interface::output_init()
WINDOW_STYLE,
0, 0,
1, 1,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
GetModuleHandleUni(),
- NULL);
- assert(output_hwnd != NULL);
+ nullptr);
+ assert(output_hwnd != nullptr);
// set a pointer to the running machine
SetWindowLongPtr(output_hwnd, GWLP_USERDATA, (LONG_PTR)&machine());
@@ -128,7 +128,7 @@ bool windows_osd_interface::output_init()
PostMessage(HWND_BROADCAST, om_mame_start, (WPARAM)output_hwnd, 0);
// register a notifier for output changes
- output_set_notifier(NULL, notifier_callback, NULL);
+ output_set_notifier(nullptr, notifier_callback, nullptr);
return true;
}
@@ -141,7 +141,7 @@ bool windows_osd_interface::output_init()
void windows_osd_interface::output_exit()
{
// free all the clients
- while (clientlist != NULL)
+ while (clientlist != nullptr)
{
registered_client *temp = clientlist;
clientlist = temp->next;
@@ -219,7 +219,7 @@ static LRESULT register_client(HWND hwnd, LPARAM id)
// find the end of the list; if we find ourself already registered,
// return 1
- for (client = &clientlist; *client != NULL; client = &(*client)->next)
+ for (client = &clientlist; *client != nullptr; client = &(*client)->next)
if ((*client)->id == id)
{
(*client)->hwnd = hwnd;
@@ -229,7 +229,7 @@ static LRESULT register_client(HWND hwnd, LPARAM id)
// add us to the end
*client = global_alloc(registered_client);
- (*client)->next = NULL;
+ (*client)->next = nullptr;
(*client)->id = id;
(*client)->hwnd = hwnd;
@@ -249,7 +249,7 @@ static LRESULT unregister_client(HWND hwnd, LPARAM id)
int found = FALSE;
// find any matching IDs in the list and remove them
- for (client = &clientlist; *client != NULL; client = &(*client)->next)
+ for (client = &clientlist; *client != nullptr; client = &(*client)->next)
if ((*client)->id == id)
{
registered_client *temp = *client;
@@ -281,7 +281,7 @@ static LRESULT send_id_string(running_machine &machine, HWND hwnd, LPARAM id)
name = output_id_to_name(id);
// a NULL name is an empty string
- if (name == NULL)
+ if (name == nullptr)
name = "";
// allocate memory for the message
@@ -310,7 +310,7 @@ static void notifier_callback(const char *outname, INT32 value, void *param)
registered_client *client;
// loop over clients and notify them
- for (client = clientlist; client != NULL; client = client->next)
- if (param == NULL || param == client)
+ for (client = clientlist; client != nullptr; client = client->next)
+ if (param == nullptr || param == client)
PostMessage(client->hwnd, om_mame_update_state, output_name_to_id(outname), value);
}
diff --git a/src/osd/windows/winsocket.cpp b/src/osd/windows/winsocket.cpp
index 78c3a6161d4..cfa22dbbcb1 100644
--- a/src/osd/windows/winsocket.cpp
+++ b/src/osd/windows/winsocket.cpp
@@ -59,7 +59,7 @@ bool win_check_socket_path(const char *path)
{
if (strlen(winfile_socket_identifier) > 0 &&
strncmp(path, winfile_socket_identifier, strlen(winfile_socket_identifier)) == 0 &&
- strchr(path, ':') != NULL) return true;
+ strchr(path, ':') != nullptr) return true;
return false;
}
@@ -105,7 +105,7 @@ file_error win_open_socket(const char *path, UINT32 openflags, osd_file **file,
}
// mark socket as "listening"
- (*file)->handle = 0;
+ (*file)->handle = nullptr;
*filesize = 0;
return FILERR_NONE;
}
@@ -131,7 +131,7 @@ file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 c
FD_SET(file->socket, &readfds);
timeout.tv_sec = timeout.tv_usec = 0;
- if (select(file->socket + 1, &readfds, NULL, NULL, &timeout) < 0)
+ if (select(file->socket + 1, &readfds, nullptr, nullptr, &timeout) < 0)
{
sprintf(line, "win_read_socket : %s : %d ", __FILE__, __LINE__);
perror(line);
@@ -148,7 +148,7 @@ file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 c
{
// listening socket
SOCKET AcceptSocket;
- AcceptSocket = accept(file->socket, NULL, NULL);
+ AcceptSocket = accept(file->socket, nullptr, nullptr);
if (AcceptSocket == INVALID_SOCKET)
{
return FILERR_FAILURE;
@@ -156,7 +156,7 @@ file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 c
closesocket(file->socket);
file->socket = AcceptSocket;
file->handle = INVALID_HANDLE_VALUE;
- if (actual != NULL )
+ if (actual != nullptr )
{
*actual = 0;
}
@@ -174,7 +174,7 @@ file_error win_read_socket(osd_file *file, void *buffer, UINT64 offset, UINT32 c
return win_error_to_mame_file_error(GetLastError());
}
- if (actual != NULL )
+ if (actual != nullptr )
{
*actual = result;
}
@@ -190,7 +190,7 @@ file_error win_write_socket(osd_file *file, const void *buffer, UINT64 offset, U
return win_error_to_mame_file_error(GetLastError());
}
- if (actual != NULL )
+ if (actual != nullptr )
{
*actual = result;
}
diff --git a/src/tools/castool.cpp b/src/tools/castool.cpp
index 22564dcdf78..a6b5c190b72 100644
--- a/src/tools/castool.cpp
+++ b/src/tools/castool.cpp
@@ -121,7 +121,7 @@ const struct SupportedCassetteFormats formats[] = {
- {NULL,NULL,NULL}
+ {nullptr,nullptr,nullptr}
};
@@ -129,9 +129,9 @@ static const char *get_extension(const char *name)
{
const char *s;
s = name;
- if (s != NULL)
+ if (s != nullptr)
s = strrchr(s, '.');
- return s ? s+1 : NULL;
+ return s ? s+1 : nullptr;
}
static void display_usage(void)
@@ -156,7 +156,7 @@ int CLIB_DECL main(int argc, char *argv[])
{
int i;
int found =0;
- const struct CassetteFormat * const *selected_formats = NULL;
+ const struct CassetteFormat * const *selected_formats = nullptr;
cassette_image *cassette;
FILE *f;
diff --git a/src/tools/chdman.cpp b/src/tools/chdman.cpp
index 3ea0a31f752..91e40c51b5b 100644
--- a/src/tools/chdman.cpp
+++ b/src/tools/chdman.cpp
@@ -189,7 +189,7 @@ public:
chd_rawfile_compressor(core_file *file, UINT64 offset = 0, UINT64 maxoffset = ~0)
: m_file(file),
m_offset(offset),
- m_maxoffset(MIN(maxoffset, (file != NULL) ? core_fsize(file) : 0)) { }
+ m_maxoffset(MIN(maxoffset, (file != nullptr) ? core_fsize(file) : 0)) { }
// read interface
virtual UINT32 read_data(void *dest, UINT64 offset, UINT32 length)
@@ -218,7 +218,7 @@ class chd_chdfile_compressor : public chd_file_compressor
public:
// construction/destruction
chd_chdfile_compressor(chd_file &file, UINT64 offset = 0, UINT64 maxoffset = ~0)
- : m_toc(NULL),
+ : m_toc(nullptr),
m_file(file),
m_offset(offset),
m_maxoffset(MIN(maxoffset, file.logical_bytes())) { }
@@ -289,13 +289,13 @@ class chd_cd_compressor : public chd_file_compressor
public:
// construction/destruction
chd_cd_compressor(cdrom_toc &toc, chdcd_track_input_info &info)
- : m_file(NULL),
+ : m_file(nullptr),
m_toc(toc),
m_info(info) { }
~chd_cd_compressor()
{
- if (m_file != NULL)
+ if (m_file != nullptr)
core_fclose(m_file);
}
@@ -320,9 +320,9 @@ public:
if (offset >= startoffs && offset < endoffs)
{
// if we don't already have this file open, open it now
- if (m_file == NULL || m_lastfile.compare(m_info.track[tracknum].fname)!=0)
+ if (m_file == nullptr || m_lastfile.compare(m_info.track[tracknum].fname)!=0)
{
- if (m_file != NULL)
+ if (m_file != nullptr)
core_fclose(m_file);
m_lastfile = m_info.track[tracknum].fname;
file_error filerr = core_fopen(m_lastfile.c_str(), OPEN_FLAG_READ, &m_file);
@@ -764,17 +764,17 @@ static void ATTR_PRINTF(2,3) progress(bool forceit, const char *format, ...)
// print_help - print help for all the commands
//-------------------------------------------------
-static int print_help(const char *argv0, const char *error = NULL)
+static int print_help(const char *argv0, const char *error = nullptr)
{
// print the error message first
- if (error != NULL)
+ if (error != nullptr)
fprintf(stderr, "Error: %s\n\n", error);
// print a summary of each command
printf("Usage:\n");
- for (int cmdnum = 0; cmdnum < ARRAY_LENGTH(s_commands); cmdnum++)
+ for (auto & desc : s_commands)
{
- const command_description &desc = s_commands[cmdnum];
+
printf(" %s %s%s\n", argv0, desc.name, desc.description);
}
printf("\nFor help with any command, run:\n");
@@ -788,10 +788,10 @@ static int print_help(const char *argv0, const char *error = NULL)
// command
//-------------------------------------------------
-static int print_help(const char *argv0, const command_description &desc, const char *error = NULL)
+static int print_help(const char *argv0, const command_description &desc, const char *error = nullptr)
{
// print the error message first
- if (error != NULL)
+ if (error != nullptr)
fprintf(stderr, "Error: %s\n\n", error);
// print usage for this command
@@ -801,19 +801,19 @@ static int print_help(const char *argv0, const command_description &desc, const
{
// determine whether we are required
const char *option = desc.valid_options[valid];
- if (option == NULL)
+ if (option == nullptr)
break;
bool required = (option[0] == REQUIRED[0]);
if (required)
option++;
// find the option
- for (int optnum = 0; optnum < ARRAY_LENGTH(s_options); optnum++)
- if (strcmp(option, s_options[optnum].name) == 0)
+ for (auto & s_option : s_options)
+ if (strcmp(option, s_option.name) == 0)
{
- const option_description &odesc = s_options[optnum];
+ const option_description &odesc = s_option;
printf(" --%s", odesc.name);
- if (odesc.shortname != NULL)
+ if (odesc.shortname != nullptr)
printf(", -%s", odesc.shortname);
printf("%s%s\n", odesc.description, required ? " (required)" : "");
}
@@ -904,7 +904,7 @@ UINT64 parse_number(const char *string)
static void guess_chs(std::string *filename, UINT64 filesize, int sectorsize, UINT32 &cylinders, UINT32 &heads, UINT32 &sectors, UINT32 &bps)
{
// if this is a direct physical drive read, handle it specially
- if (filename != NULL && osd_get_physical_drive_geometry(filename->c_str(), &cylinders, &heads, &sectors, &bps))
+ if (filename != nullptr && osd_get_physical_drive_geometry(filename->c_str(), &cylinders, &heads, &sectors, &bps))
return;
// if we have no length to work with, we can't guess
@@ -941,7 +941,7 @@ static void parse_input_chd_parameters(const parameters_t &params, chd_file &inp
{
// process input parent file
std::string *input_chd_parent_str = params.find(OPTION_INPUT_PARENT);
- if (input_chd_parent_str != NULL)
+ if (input_chd_parent_str != nullptr)
{
chd_error err = input_parent_chd.open(input_chd_parent_str->c_str());
if (err != CHDERR_NONE)
@@ -950,9 +950,9 @@ static void parse_input_chd_parameters(const parameters_t &params, chd_file &inp
// process input file
std::string *input_chd_str = params.find(OPTION_INPUT);
- if (input_chd_str != NULL)
+ if (input_chd_str != nullptr)
{
- chd_error err = input_chd.open(input_chd_str->c_str(), writeable, input_parent_chd.opened() ? &input_parent_chd : NULL);
+ chd_error err = input_chd.open(input_chd_str->c_str(), writeable, input_parent_chd.opened() ? &input_parent_chd : nullptr);
if (err != CHDERR_NONE)
report_error(1, "Error opening CHD file (%s): %s", input_chd_str->c_str(), chd_file::error_string(err));
}
@@ -974,11 +974,11 @@ static void parse_input_start_end(const parameters_t &params, UINT64 logical_siz
std::string *input_start_byte_str = params.find(OPTION_INPUT_START_BYTE);
std::string *input_start_hunk_str = params.find(OPTION_INPUT_START_HUNK);
std::string *input_start_frame_str = params.find(OPTION_INPUT_START_FRAME);
- if (input_start_byte_str != NULL)
+ if (input_start_byte_str != nullptr)
input_start = parse_number(input_start_byte_str->c_str());
- if (input_start_hunk_str != NULL)
+ if (input_start_hunk_str != nullptr)
input_start = parse_number(input_start_hunk_str->c_str()) * hunkbytes;
- if (input_start_frame_str != NULL)
+ if (input_start_frame_str != nullptr)
input_start = parse_number(input_start_frame_str->c_str()) * framebytes;
if (input_start >= input_end)
report_error(1, "Input start offset greater than input file size");
@@ -988,11 +988,11 @@ static void parse_input_start_end(const parameters_t &params, UINT64 logical_siz
std::string *input_length_hunks_str = params.find(OPTION_INPUT_LENGTH_HUNKS);
std::string *input_length_frames_str = params.find(OPTION_INPUT_LENGTH_FRAMES);
UINT64 input_length = input_end;
- if (input_length_bytes_str != NULL)
+ if (input_length_bytes_str != nullptr)
input_length = parse_number(input_length_bytes_str->c_str());
- if (input_length_hunks_str != NULL)
+ if (input_length_hunks_str != nullptr)
input_length = parse_number(input_length_hunks_str->c_str()) * hunkbytes;
- if (input_length_frames_str != NULL)
+ if (input_length_frames_str != nullptr)
input_length = parse_number(input_length_frames_str->c_str()) * framebytes;
if (input_start + input_length < input_end)
input_end = input_start + input_length;
@@ -1007,7 +1007,7 @@ static void parse_input_start_end(const parameters_t &params, UINT64 logical_siz
static void check_existing_output_file(const parameters_t &params, const char *filename)
{
- if (params.find(OPTION_OUTPUT_FORCE) == NULL)
+ if (params.find(OPTION_OUTPUT_FORCE) == nullptr)
{
core_file *file;
file_error filerr = core_fopen(filename, OPEN_FLAG_READ, &file);
@@ -1029,7 +1029,7 @@ static std::string *parse_output_chd_parameters(const parameters_t &params, chd_
{
// process output parent file
std::string *output_chd_parent_str = params.find(OPTION_OUTPUT_PARENT);
- if (output_chd_parent_str != NULL)
+ if (output_chd_parent_str != nullptr)
{
chd_error err = output_parent_chd.open(output_chd_parent_str->c_str());
if (err != CHDERR_NONE)
@@ -1038,7 +1038,7 @@ static std::string *parse_output_chd_parameters(const parameters_t &params, chd_
// process output file
std::string *output_chd_str = params.find(OPTION_OUTPUT);
- if (output_chd_str != NULL)
+ if (output_chd_str != nullptr)
check_existing_output_file(params, output_chd_str->c_str());
return output_chd_str;
}
@@ -1052,7 +1052,7 @@ static std::string *parse_output_chd_parameters(const parameters_t &params, chd_
static void parse_hunk_size(const parameters_t &params, UINT32 required_granularity, UINT32 &hunk_size)
{
std::string *hunk_size_str = params.find(OPTION_HUNK_SIZE);
- if (hunk_size_str != NULL)
+ if (hunk_size_str != nullptr)
{
hunk_size = parse_number(hunk_size_str->c_str());
if (hunk_size < 16 || hunk_size > 1024 * 1024)
@@ -1072,7 +1072,7 @@ static void parse_compression(const parameters_t &params, chd_codec_type compres
{
// see if anything was specified
std::string *compression_str = params.find(OPTION_COMPRESSION);
- if (compression_str == NULL)
+ if (compression_str == nullptr)
return;
// special case: 'none'
@@ -1112,7 +1112,7 @@ static void parse_compression(const parameters_t &params, chd_codec_type compres
static void parse_numprocessors(const parameters_t &params)
{
std::string *numprocessors_str = params.find(OPTION_NUMPROCESSORS);
- if (numprocessors_str == NULL)
+ if (numprocessors_str == nullptr)
return;
int count = atoi(numprocessors_str->c_str());
@@ -1234,7 +1234,7 @@ void output_track_metadata(int mode, core_file *file, int tracknum, const cdrom_
size = 2352;
break;
}
- bool needquote = strchr(filename, ' ') != NULL;
+ bool needquote = strchr(filename, ' ') != nullptr;
core_fprintf(file, "%d %d %d %d %s%s%s %" I64FMT "d\n", tracknum+1, frameoffs, mode, size, needquote?"\"":"", filename, needquote?"\"":"", discoffs);
}
else if (mode == MODE_CUEBIN)
@@ -1391,10 +1391,10 @@ static void do_info(parameters_t &params)
// determine our index
UINT32 metaindex = ~0;
- for (unsigned int cur = 0; cur < info.size(); cur++)
- if (info[cur].tag == metatag)
+ for (auto & elem : info)
+ if (elem.tag == metatag)
{
- metaindex = ++info[cur].index;
+ metaindex = ++elem.index;
break;
}
@@ -1421,7 +1421,7 @@ static void do_info(parameters_t &params)
}
// print compression stats if verbose
- if (params.find(OPTION_VERBOSE) != NULL)
+ if (params.find(OPTION_VERBOSE) != nullptr)
{
UINT32 compression_types[10] = { 0 };
for (UINT32 hunknum = 0; hunknum < input_chd.hunk_count(); hunknum++)
@@ -1528,7 +1528,7 @@ static void do_verify(parameters_t &params)
fprintf(stderr, " actual SHA1 = %s\n", computed_sha1.as_string(tempstr));
// fix it if requested; this also fixes the overall one so we don't need to do any more
- if (params.find(OPTION_FIX) != NULL)
+ if (params.find(OPTION_FIX) != nullptr)
{
input_chd.set_raw_sha1(computed_sha1);
printf("SHA-1 updated to correct value in input CHD\n");
@@ -1551,7 +1551,7 @@ static void do_verify(parameters_t &params)
fprintf(stderr, " actual SHA1 = %s\n", computed_overall_sha1.as_string(tempstr));
// fix it if requested
- if (params.find(OPTION_FIX) != NULL)
+ if (params.find(OPTION_FIX) != nullptr)
{
input_chd.set_raw_sha1(computed_sha1);
printf("SHA-1 updated to correct value in input CHD\n");
@@ -1570,9 +1570,9 @@ static void do_verify(parameters_t &params)
static void do_create_raw(parameters_t &params)
{
// process input file
- core_file *input_file = NULL;
+ core_file *input_file = nullptr;
std::string *input_file_str = params.find(OPTION_INPUT);
- if (input_file_str != NULL)
+ if (input_file_str != nullptr)
{
file_error filerr = core_fopen(input_file_str->c_str(), OPEN_FLAG_READ, &input_file);
if (filerr != FILERR_NONE)
@@ -1590,7 +1590,7 @@ static void do_create_raw(parameters_t &params)
// process unit size
UINT32 unit_size = output_parent.opened() ? output_parent.unit_bytes() : 0;
std::string *unit_size_str = params.find(OPTION_UNIT_SIZE);
- if (unit_size_str != NULL)
+ if (unit_size_str != nullptr)
{
unit_size = parse_number(unit_size_str->c_str());
if (hunk_size % unit_size != 0)
@@ -1626,7 +1626,7 @@ static void do_create_raw(parameters_t &params)
printf("Logical size: %s\n", big_int_string(tempstr, input_end - input_start));
// catch errors so we can close & delete the output file
- chd_rawfile_compressor *chd = NULL;
+ chd_rawfile_compressor *chd = nullptr;
try
{
// create the new CHD
@@ -1652,7 +1652,7 @@ static void do_create_raw(parameters_t &params)
delete chd;
// delete the output file
std::string *output_chd_str = params.find(OPTION_OUTPUT);
- if (output_chd_str != NULL)
+ if (output_chd_str != nullptr)
osd_rmfile(output_chd_str->c_str());
throw;
}
@@ -1667,9 +1667,9 @@ static void do_create_raw(parameters_t &params)
static void do_create_hd(parameters_t &params)
{
// process input file
- core_file *input_file = NULL;
+ core_file *input_file = nullptr;
std::string *input_file_str = params.find(OPTION_INPUT);
- if (input_file_str != NULL)
+ if (input_file_str != nullptr)
{
file_error filerr = core_fopen(input_file_str->c_str(), OPEN_FLAG_READ, &input_file);
if (filerr != FILERR_NONE)
@@ -1683,7 +1683,7 @@ static void do_create_hd(parameters_t &params)
// process sectorsize
UINT32 sector_size = output_parent.opened() ? output_parent.unit_bytes() : IDE_SECTOR_SIZE;
std::string *sectorsize_str = params.find(OPTION_SECTOR_SIZE);
- if (sectorsize_str != NULL)
+ if (sectorsize_str != nullptr)
{
if (output_parent.opened())
report_error(1, "Sector size does not apply when creating a diff from the parent");
@@ -1698,7 +1698,7 @@ static void do_create_hd(parameters_t &params)
UINT64 filesize = 0;
UINT64 input_start = 0;
UINT64 input_end = 0;
- if (input_file != NULL)
+ if (input_file != nullptr)
{
parse_input_start_end(params, core_fsize(input_file), hunk_size, hunk_size, input_start, input_end);
filesize = input_end - input_start;
@@ -1706,7 +1706,7 @@ static void do_create_hd(parameters_t &params)
else
{
std::string *size_str = params.find(OPTION_SIZE);
- if (size_str != NULL)
+ if (size_str != nullptr)
{
if (sscanf(size_str->c_str(), "%" I64FMT"d", &filesize) != 1)
report_error(1, "Invalid size string");
@@ -1716,10 +1716,10 @@ static void do_create_hd(parameters_t &params)
// process compression
chd_codec_type compression[4];
memcpy(compression, s_default_hd_compression, sizeof(compression));
- if (input_file == NULL)
+ if (input_file == nullptr)
compression[0] = compression[1] = compression[2] = compression[3] = CHD_CODEC_NONE;
parse_compression(params, compression);
- if (input_file == NULL && compression[0] != CHD_CODEC_NONE)
+ if (input_file == nullptr && compression[0] != CHD_CODEC_NONE)
report_error(1, "Blank hard disks must be uncompressed");
// process numprocessors
@@ -1730,7 +1730,7 @@ static void do_create_hd(parameters_t &params)
UINT32 heads = 0;
UINT32 sectors = 0;
std::string *chs_str = params.find(OPTION_CHS);
- if (chs_str != NULL)
+ if (chs_str != nullptr)
{
if (output_parent.opened())
report_error(1, "CHS does not apply when creating a diff from the parent");
@@ -1743,7 +1743,7 @@ static void do_create_hd(parameters_t &params)
if (output_parent.opened())
output_parent.read_metadata(HARD_DISK_IDENT_METADATA_TAG, 0, identdata);
std::string *ident_str = params.find(OPTION_IDENT);
- if (ident_str != NULL)
+ if (ident_str != nullptr)
{
// load the file
file_error filerr = core_fload(ident_str->c_str(), identdata);
@@ -1775,7 +1775,7 @@ static void do_create_hd(parameters_t &params)
// if no CHS values, try to guess them
if (cylinders == 0)
{
- if (input_file == NULL && filesize == 0)
+ if (input_file == nullptr && filesize == 0)
report_error(1, "Blank hard drives must specify either a length or a set of CHS values");
guess_chs(input_file_str, filesize, sector_size, cylinders, heads, sectors, sector_size);
}
@@ -1786,7 +1786,7 @@ static void do_create_hd(parameters_t &params)
printf("Output CHD: %s\n", output_chd_str->c_str());
if (output_parent.opened())
printf("Parent CHD: %s\n", params.find(OPTION_OUTPUT_PARENT)->c_str());
- if (input_file != NULL)
+ if (input_file != nullptr)
{
printf("Input file: %s\n", input_file_str->c_str());
if (input_start != 0 || input_end != core_fsize(input_file))
@@ -1804,7 +1804,7 @@ static void do_create_hd(parameters_t &params)
printf("Logical size: %s\n", big_int_string(tempstr, UINT64(totalsectors) * UINT64(sector_size)));
// catch errors so we can close & delete the output file
- chd_rawfile_compressor *chd = NULL;
+ chd_rawfile_compressor *chd = nullptr;
try
{
// create the new hard drive
@@ -1833,7 +1833,7 @@ static void do_create_hd(parameters_t &params)
}
// compress it generically
- if (input_file != NULL)
+ if (input_file != nullptr)
compress_common(*chd);
delete chd;
}
@@ -1842,7 +1842,7 @@ static void do_create_hd(parameters_t &params)
delete chd;
// delete the output file
std::string *output_chd_str = params.find(OPTION_OUTPUT);
- if (output_chd_str != NULL)
+ if (output_chd_str != nullptr)
osd_rmfile(output_chd_str->c_str());
throw;
}
@@ -1860,7 +1860,7 @@ static void do_create_cd(parameters_t &params)
chdcd_track_input_info track_info;
cdrom_toc toc = { 0 };
std::string *input_file_str = params.find(OPTION_INPUT);
- if (input_file_str != NULL)
+ if (input_file_str != nullptr)
{
chd_error err = chdcd_parse_toc(input_file_str->c_str(), toc, track_info);
if (err != CHDERR_NONE)
@@ -1907,7 +1907,7 @@ static void do_create_cd(parameters_t &params)
printf("Logical size: %s\n", big_int_string(tempstr, UINT64(totalsectors) * CD_FRAME_SIZE));
// catch errors so we can close & delete the output file
- chd_cd_compressor *chd = NULL;
+ chd_cd_compressor *chd = nullptr;
try
{
// create the new CD
@@ -1934,7 +1934,7 @@ static void do_create_cd(parameters_t &params)
delete chd;
// delete the output file
std::string *output_chd_str = params.find(OPTION_OUTPUT);
- if (output_chd_str != NULL)
+ if (output_chd_str != nullptr)
osd_rmfile(output_chd_str->c_str());
throw;
}
@@ -1949,9 +1949,9 @@ static void do_create_cd(parameters_t &params)
static void do_create_ld(parameters_t &params)
{
// process input file
- avi_file *input_file = NULL;
+ avi_file *input_file = nullptr;
std::string *input_file_str = params.find(OPTION_INPUT);
- if (input_file_str != NULL)
+ if (input_file_str != nullptr)
{
avi_error avierr = avi_open(input_file_str->c_str(), &input_file);
if (avierr != AVIERR_NONE)
@@ -2025,7 +2025,7 @@ static void do_create_ld(parameters_t &params)
printf("Logical size: %s\n", big_int_string(tempstr, UINT64(input_end - input_start) * hunk_size));
// catch errors so we can close & delete the output file
- chd_avi_compressor *chd = NULL;
+ chd_avi_compressor *chd = nullptr;
try
{
// create the new CHD
@@ -2062,7 +2062,7 @@ static void do_create_ld(parameters_t &params)
delete chd;
// delete the output file
std::string *output_chd_str = params.find(OPTION_OUTPUT);
- if (output_chd_str != NULL)
+ if (output_chd_str != nullptr)
osd_rmfile(output_chd_str->c_str());
throw;
}
@@ -2134,7 +2134,7 @@ static void do_copy(parameters_t &params)
printf("Logical size: %s\n", big_int_string(tempstr, input_end - input_start));
// catch errors so we can close & delete the output file
- chd_chdfile_compressor *chd = NULL;
+ chd_chdfile_compressor *chd = nullptr;
try
{
// create the new CHD
@@ -2179,7 +2179,7 @@ static void do_copy(parameters_t &params)
if (redo_cd)
{
cdrom_file *cdrom = cdrom_open(&input_chd);
- if (cdrom == NULL)
+ if (cdrom == nullptr)
report_error(1, "Error upgrading CD metadata");
const cdrom_toc *toc = cdrom_get_toc(cdrom);
err = cdrom_write_metadata(chd, toc);
@@ -2198,7 +2198,7 @@ static void do_copy(parameters_t &params)
delete chd;
// delete the output file
std::string *output_chd_str = params.find(OPTION_OUTPUT);
- if (output_chd_str != NULL)
+ if (output_chd_str != nullptr)
osd_rmfile(output_chd_str->c_str());
throw;
}
@@ -2224,7 +2224,7 @@ static void do_extract_raw(parameters_t &params)
// verify output file doesn't exist
std::string *output_file_str = params.find(OPTION_OUTPUT);
- if (output_file_str != NULL)
+ if (output_file_str != nullptr)
check_existing_output_file(params, output_file_str->c_str());
// print some info
@@ -2238,7 +2238,7 @@ static void do_extract_raw(parameters_t &params)
}
// catch errors so we can close & delete the output file
- core_file *output_file = NULL;
+ core_file *output_file = nullptr;
try
{
// process output file
@@ -2274,7 +2274,7 @@ static void do_extract_raw(parameters_t &params)
catch (...)
{
// delete the output file
- if (output_file != NULL)
+ if (output_file != nullptr)
{
core_fclose(output_file);
osd_rmfile(output_file_str->c_str());
@@ -2298,13 +2298,13 @@ static void do_extract_cd(parameters_t &params)
// further process input file
cdrom_file *cdrom = cdrom_open(&input_chd);
- if (cdrom == NULL)
+ if (cdrom == nullptr)
report_error(1, "Unable to recognize CHD file as a CD");
const cdrom_toc *toc = cdrom_get_toc(cdrom);
// verify output file doesn't exist
std::string *output_file_str = params.find(OPTION_OUTPUT);
- if (output_file_str != NULL)
+ if (output_file_str != nullptr)
check_existing_output_file(params, output_file_str->c_str());
// verify output BIN file doesn't exist
@@ -2316,7 +2316,7 @@ static void do_extract_cd(parameters_t &params)
char basename[128];
strncpy(basename, default_name.c_str(), 127);
default_name.append(".bin");
- if (output_bin_file_str == NULL)
+ if (output_bin_file_str == nullptr)
output_bin_file_str = &default_name;
check_existing_output_file(params, output_bin_file_str->c_str());
@@ -2327,8 +2327,8 @@ static void do_extract_cd(parameters_t &params)
printf("Input CHD: %s\n", params.find(OPTION_INPUT)->c_str());
// catch errors so we can close & delete the output file
- core_file *output_bin_file = NULL;
- core_file *output_toc_file = NULL;
+ core_file *output_bin_file = nullptr;
+ core_file *output_toc_file = nullptr;
try
{
int mode = MODE_NORMAL;
@@ -2387,7 +2387,7 @@ static void do_extract_cd(parameters_t &params)
if (output_bin_file)
{
core_fclose(output_bin_file);
- output_bin_file = NULL;
+ output_bin_file = nullptr;
}
filerr = core_fopen(trackbin_name.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_bin_file);
@@ -2474,9 +2474,9 @@ static void do_extract_cd(parameters_t &params)
catch (...)
{
// delete the output files
- if (output_bin_file != NULL)
+ if (output_bin_file != nullptr)
core_fclose(output_bin_file);
- if (output_toc_file != NULL)
+ if (output_toc_file != nullptr)
core_fclose(output_toc_file);
osd_rmfile(output_bin_file_str->c_str());
osd_rmfile(output_file_str->c_str());
@@ -2551,7 +2551,7 @@ static void do_extract_ld(parameters_t &params)
// verify output file doesn't exist
std::string *output_file_str = params.find(OPTION_OUTPUT);
- if (output_file_str != NULL)
+ if (output_file_str != nullptr)
check_existing_output_file(params, output_file_str->c_str());
// print some info
@@ -2565,7 +2565,7 @@ static void do_extract_ld(parameters_t &params)
}
// catch errors so we can close & delete the output file
- avi_file *output_file = NULL;
+ avi_file *output_file = nullptr;
try
{
// process output file
@@ -2596,7 +2596,7 @@ static void do_extract_ld(parameters_t &params)
input_chd.codec_configure(CHD_CODEC_AVHUFF, AVHUFF_CODEC_DECOMPRESS_CONFIG, &avconfig);
// read the hunk into the buffers
- chd_error err = input_chd.read_hunk(framenum, NULL);
+ chd_error err = input_chd.read_hunk(framenum, nullptr);
if (err != CHDERR_NONE)
{
UINT64 filepos = core_ftell(input_chd);
@@ -2627,7 +2627,7 @@ static void do_extract_ld(parameters_t &params)
catch (...)
{
// delete the output file
- if (output_file != NULL)
+ if (output_file != nullptr)
avi_close(output_file);
osd_rmfile(output_file_str->c_str());
throw;
@@ -2650,7 +2650,7 @@ static void do_add_metadata(parameters_t &params)
// process tag
chd_metadata_tag tag = CHD_MAKE_TAG('?','?','?','?');
std::string *tag_str = params.find(OPTION_TAG);
- if (tag_str != NULL)
+ if (tag_str != nullptr)
{
tag_str->append(" ");
tag = CHD_MAKE_TAG((*tag_str)[0], (*tag_str)[1], (*tag_str)[2], (*tag_str)[3]);
@@ -2659,13 +2659,13 @@ static void do_add_metadata(parameters_t &params)
// process index
UINT32 index = 0;
std::string *index_str = params.find(OPTION_INDEX);
- if (index_str != NULL)
+ if (index_str != nullptr)
index = atoi(index_str->c_str());
// process text input
std::string *text_str = params.find(OPTION_VALUE_TEXT);
std::string text;
- if (text_str != NULL)
+ if (text_str != nullptr)
{
text = *text_str;
if (text[0] == '"' && text[text.length() - 1] == '"')
@@ -2675,7 +2675,7 @@ static void do_add_metadata(parameters_t &params)
// process file input
std::string *file_str = params.find(OPTION_VALUE_FILE);
dynamic_buffer file;
- if (file_str != NULL)
+ if (file_str != nullptr)
{
file_error filerr = core_fload(file_str->c_str(), file);
if (filerr != FILERR_NONE)
@@ -2683,14 +2683,14 @@ static void do_add_metadata(parameters_t &params)
}
// make sure we have one or the other
- if (text_str == NULL && file_str == NULL)
+ if (text_str == nullptr && file_str == nullptr)
report_error(1, "Error: missing either --valuetext/-vt or --valuefile/-vf parameters");
- if (text_str != NULL && file_str != NULL)
+ if (text_str != nullptr && file_str != nullptr)
report_error(1, "Error: both --valuetext/-vt or --valuefile/-vf parameters specified; only one permitted");
// process no checksum
UINT8 flags = CHD_MDFLAGS_CHECKSUM;
- if (params.find(OPTION_NO_CHECKSUM) != NULL)
+ if (params.find(OPTION_NO_CHECKSUM) != nullptr)
flags &= ~CHD_MDFLAGS_CHECKSUM;
// print some info
@@ -2698,14 +2698,14 @@ static void do_add_metadata(parameters_t &params)
printf("Input file: %s\n", params.find(OPTION_INPUT)->c_str());
printf("Tag: %c%c%c%c\n", (tag >> 24) & 0xff, (tag >> 16) & 0xff, (tag >> 8) & 0xff, tag & 0xff);
printf("Index: %d\n", index);
- if (text_str != NULL)
+ if (text_str != nullptr)
printf("Text: %s\n", text.c_str());
else
printf("Data: %s (%d bytes)\n", file_str->c_str(), int(file.size()));
// write the metadata
chd_error err;
- if (text_str != NULL)
+ if (text_str != nullptr)
err = input_chd.write_metadata(tag, index, text, flags);
else
err = input_chd.write_metadata(tag, index, &file[0], flags);
@@ -2730,7 +2730,7 @@ static void do_del_metadata(parameters_t &params)
// process tag
chd_metadata_tag tag = CHD_MAKE_TAG('?','?','?','?');
std::string *tag_str = params.find(OPTION_TAG);
- if (tag_str != NULL)
+ if (tag_str != nullptr)
{
tag_str->append(" ");
tag = CHD_MAKE_TAG((*tag_str)[0], (*tag_str)[1], (*tag_str)[2], (*tag_str)[3]);
@@ -2739,7 +2739,7 @@ static void do_del_metadata(parameters_t &params)
// process index
UINT32 index = 0;
std::string *index_str = params.find(OPTION_INDEX);
- if (index_str != NULL)
+ if (index_str != nullptr)
index = atoi(index_str->c_str());
// print some info
@@ -2770,13 +2770,13 @@ static void do_dump_metadata(parameters_t &params)
// verify output file doesn't exist
std::string *output_file_str = params.find(OPTION_OUTPUT);
- if (output_file_str != NULL)
+ if (output_file_str != nullptr)
check_existing_output_file(params, output_file_str->c_str());
// process tag
chd_metadata_tag tag = CHD_MAKE_TAG('?','?','?','?');
std::string *tag_str = params.find(OPTION_TAG);
- if (tag_str != NULL)
+ if (tag_str != nullptr)
{
tag_str->append(" ");
tag = CHD_MAKE_TAG((*tag_str)[0], (*tag_str)[1], (*tag_str)[2], (*tag_str)[3]);
@@ -2785,7 +2785,7 @@ static void do_dump_metadata(parameters_t &params)
// process index
UINT32 index = 0;
std::string *index_str = params.find(OPTION_INDEX);
- if (index_str != NULL)
+ if (index_str != nullptr)
index = atoi(index_str->c_str());
// write the metadata
@@ -2795,11 +2795,11 @@ static void do_dump_metadata(parameters_t &params)
report_error(1, "Error reading metadata: %s", chd_file::error_string(err));
// catch errors so we can close & delete the output file
- core_file *output_file = NULL;
+ core_file *output_file = nullptr;
try
{
// create the file
- if (output_file_str != NULL)
+ if (output_file_str != nullptr)
{
file_error filerr = core_fopen(output_file_str->c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &output_file);
if (filerr != FILERR_NONE)
@@ -2826,7 +2826,7 @@ static void do_dump_metadata(parameters_t &params)
catch (...)
{
// delete the output file
- if (output_file != NULL)
+ if (output_file != nullptr)
core_fclose(output_file);
osd_rmfile(output_file_str->c_str());
throw;
@@ -2858,10 +2858,10 @@ int CLIB_DECL main(int argc, char *argv[])
}
// iterate over commands to find our match
- for (int cmdnum = 0; cmdnum < ARRAY_LENGTH(s_commands); cmdnum++)
- if (strcmp(command, s_commands[cmdnum].name) == 0)
+ for (auto & s_command : s_commands)
+ if (strcmp(command, s_command.name) == 0)
{
- const command_description &desc = s_commands[cmdnum];
+ const command_description &desc = s_command;
// print help if that was requested
if (help)
@@ -2882,7 +2882,7 @@ int CLIB_DECL main(int argc, char *argv[])
{
// reduce to the option name
const char *validname = desc.valid_options[valid];
- if (validname == NULL)
+ if (validname == nullptr)
break;
if (*validname == REQUIRED[0])
validname++;
@@ -2897,7 +2897,7 @@ int CLIB_DECL main(int argc, char *argv[])
// do we match?
const option_description &odesc = s_options[optnum];
if ((arg[1] == '-' && strcmp(odesc.name, &arg[2]) == 0) ||
- (arg[1] != '-' && odesc.shortname != NULL && strcmp(odesc.shortname, &arg[1]) == 0))
+ (arg[1] != '-' && odesc.shortname != nullptr && strcmp(odesc.shortname, &arg[1]) == 0))
{
// if we need a parameter, consume it
const char *param = "";
@@ -2924,16 +2924,16 @@ int CLIB_DECL main(int argc, char *argv[])
for (int valid = 0; valid < ARRAY_LENGTH(desc.valid_options); valid++)
{
const char *validname = desc.valid_options[valid];
- if (validname == NULL)
+ if (validname == nullptr)
break;
- if (*validname == REQUIRED[0] && parameters.find(++validname) == NULL)
+ if (*validname == REQUIRED[0] && parameters.find(++validname) == nullptr)
return print_help(argv[0], desc, "Required parameters missing");
}
// all clear, run the command
try
{
- (*s_commands[cmdnum].handler)(parameters);
+ (*s_command.handler)(parameters);
return 0;
}
catch (chd_error &err)
diff --git a/src/tools/floptool.cpp b/src/tools/floptool.cpp
index 2cb36f3a873..190e2004ea6 100644
--- a/src/tools/floptool.cpp
+++ b/src/tools/floptool.cpp
@@ -100,13 +100,13 @@ static floppy_image_format_t *find_format_by_name(const char *name)
for(int i=0; i != FORMAT_COUNT; i++)
if(!core_stricmp(name, formats[i]->name()))
return formats[i];
- return 0;
+ return nullptr;
}
static floppy_image_format_t *find_format_by_identify(io_generic *image)
{
int best = 0;
- floppy_image_format_t *best_fif = 0;
+ floppy_image_format_t *best_fif = nullptr;
for(int i = 0; i != FORMAT_COUNT; i++) {
floppy_image_format_t *fif = formats[i];
diff --git a/src/tools/imgtool/charconv.cpp b/src/tools/imgtool/charconv.cpp
index 39b5953d799..34a912dcb89 100644
--- a/src/tools/imgtool/charconv.cpp
+++ b/src/tools/imgtool/charconv.cpp
@@ -24,7 +24,7 @@ static char *utf8_from_latin1(const char *src)
/* validate input */
if (!src)
{
- return NULL;
+ return nullptr;
}
/* allocate space for result, twice the source len to be safe */
@@ -69,7 +69,7 @@ static char *latin1_from_utf8(const char *src)
/* validate input */
if (!src)
{
- return NULL;
+ return nullptr;
}
/* allocate space for result */
@@ -128,7 +128,7 @@ char *utf8_from_native(imgtool_charset charset, const char *src)
break;
default:
- result = NULL;
+ result = nullptr;
break;
}
return result;
@@ -155,7 +155,7 @@ char *native_from_utf8(imgtool_charset charset, const char *src)
break;
default:
- result = NULL;
+ result = nullptr;
break;
}
return result;
diff --git a/src/tools/imgtool/filtbas.cpp b/src/tools/imgtool/filtbas.cpp
index bff1bda121e..a83d7a80108 100644
--- a/src/tools/imgtool/filtbas.cpp
+++ b/src/tools/imgtool/filtbas.cpp
@@ -83,15 +83,15 @@ static imgtoolerr_t basic_readfile(const basictokens *tokens,
const char *token;
/* open a memory stream */
- mem_stream = stream_open_mem(NULL, 0);
- if (mem_stream == NULL)
+ mem_stream = stream_open_mem(nullptr, 0);
+ if (mem_stream == nullptr)
{
err = IMGTOOLERR_OUTOFMEMORY;
goto done;
}
/* read actual file */
- err = imgtool_partition_read_file(partition, filename, fork, mem_stream, NULL);
+ err = imgtool_partition_read_file(partition, filename, fork, mem_stream, nullptr);
if (err)
goto done;
@@ -126,7 +126,7 @@ static imgtoolerr_t basic_readfile(const basictokens *tokens,
if ((b & 0x80) && (!in_string))
{
- token = NULL;
+ token = nullptr;
for (i = 0; i < tokens->num_entries; i++)
{
@@ -161,7 +161,7 @@ static imgtoolerr_t basic_readfile(const basictokens *tokens,
}
done:
- if (mem_stream != NULL)
+ if (mem_stream != nullptr)
stream_close(mem_stream);
return err;
}
@@ -193,8 +193,8 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
UINT16 address;
/* open a memory stream */
- mem_stream = stream_open_mem(NULL, 0);
- if (mem_stream == NULL)
+ mem_stream = stream_open_mem(nullptr, 0);
+ if (mem_stream == nullptr)
{
err = IMGTOOLERR_OUTOFMEMORY;
goto done;
@@ -272,7 +272,7 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
/* read until end of line */
while(buf[pos] != '\0')
{
- token = NULL;
+ token = nullptr;
token_shift = 0;
token_value = 0;
@@ -283,10 +283,10 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
}
else if (!in_quotes)
{
- for (i = 0; (token == NULL) && (i < tokens->num_entries); i++)
+ for (i = 0; (token == nullptr) && (i < tokens->num_entries); i++)
{
token_table = &tokens->entries[i];
- for (j = 0; (token == NULL) && (j < token_table->num_tokens); j++)
+ for (j = 0; (token == nullptr) && (j < token_table->num_tokens); j++)
{
if (!strncmp(&buf[pos], token_table->tokens[j], strlen(token_table->tokens[j])))
{
@@ -300,7 +300,7 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
}
/* did we find a token? */
- if (token != NULL)
+ if (token != nullptr)
{
/* emit the token */
if (token_shift != 0)
@@ -343,12 +343,12 @@ static imgtoolerr_t basic_writefile(const basictokens *tokens,
}
/* write actual file */
- err = imgtool_partition_write_file(partition, filename, fork, mem_stream, opts, NULL);
+ err = imgtool_partition_write_file(partition, filename, fork, mem_stream, opts, nullptr);
if (err)
goto done;
done:
- if (mem_stream != NULL)
+ if (mem_stream != nullptr)
stream_close(mem_stream);
return err;
}
@@ -684,7 +684,7 @@ static const char *const vzbas[] =
"RESET", /* 0x82 */
"SET", /* 0x83 */
"CLS", /* 0x84 */
- NULL, /* 0x85 */
+ nullptr, /* 0x85 */
"RANDOM", /* 0x86 */
"NEXT", /* 0x87 */
"DATA", /* 0x88 */
@@ -713,21 +713,21 @@ static const char *const vzbas[] =
"RESUME", /* 0x9f */
"OUT", /* 0xa0 */
"IN", /* 0xa1 */
- NULL, /* 0xa2 */
- NULL, /* 0xa3 */
- NULL, /* 0xa4 */
- NULL, /* 0xa5 */
- NULL, /* 0xa6 */
- NULL, /* 0xa7 */
- NULL, /* 0xa8 */
- NULL, /* 0xa9 */
- NULL, /* 0xaa */
- NULL, /* 0xab */
- NULL, /* 0xac */
- NULL, /* 0xad */
+ nullptr, /* 0xa2 */
+ nullptr, /* 0xa3 */
+ nullptr, /* 0xa4 */
+ nullptr, /* 0xa5 */
+ nullptr, /* 0xa6 */
+ nullptr, /* 0xa7 */
+ nullptr, /* 0xa8 */
+ nullptr, /* 0xa9 */
+ nullptr, /* 0xaa */
+ nullptr, /* 0xab */
+ nullptr, /* 0xac */
+ nullptr, /* 0xad */
"(RESET)", /* 0xae */
"LPRINT", /* 0xaf */
- NULL, /* 0xb0 */
+ nullptr, /* 0xb0 */
"POKE", /* 0xb1 */
"PRINT", /* 0xb2 */
"CONT", /* 0xb3 */
@@ -741,16 +741,16 @@ static const char *const vzbas[] =
"NEW", /* 0xbb */
"TAB(", /* 0xbc */
"TO", /* 0xbd */
- NULL, /* 0xbe */
+ nullptr, /* 0xbe */
"USING", /* 0xbf */
"VARPTR", /* 0xc0 */
"USR", /* 0xc1 */
"ERL", /* 0xc2 */
"ERR", /* 0xc3 */
"STRING$", /* 0xc4 */
- NULL, /* 0xc5 */
+ nullptr, /* 0xc5 */
"POINT", /* 0xc6 */
- NULL, /* 0xc7 */
+ nullptr, /* 0xc7 */
"MEM", /* 0xc8 */
"INKEY$", /* 0xc9 */
"THEN", /* 0xca */
@@ -781,15 +781,15 @@ static const char *const vzbas[] =
"TAN", /* 0xe3 */
"ATN", /* 0xe4 */
"PEEK", /* 0xe5 */
- NULL, /* 0xe6 */
- NULL, /* 0xe7 */
- NULL, /* 0xe8 */
- NULL, /* 0xe9 */
- NULL, /* 0xea */
- NULL, /* 0xeb */
- NULL, /* 0xec */
- NULL, /* 0xed */
- NULL, /* 0xee */
+ nullptr, /* 0xe6 */
+ nullptr, /* 0xe7 */
+ nullptr, /* 0xe8 */
+ nullptr, /* 0xe9 */
+ nullptr, /* 0xea */
+ nullptr, /* 0xeb */
+ nullptr, /* 0xec */
+ nullptr, /* 0xed */
+ nullptr, /* 0xee */
"CINT", /* 0xef */
"CSNG", /* 0xf0 */
"CDBL", /* 0xf1 */
@@ -802,11 +802,11 @@ static const char *const vzbas[] =
"LEFT$", /* 0xf8 */
"RIGHT$", /* 0xf9 */
"MID$", /* 0xfa */
- NULL, /* 0xfb */
- NULL, /* 0xfc */
- NULL, /* 0xfd */
- NULL, /* 0xfe */
- NULL /* 0xff */
+ nullptr, /* 0xfb */
+ nullptr, /* 0xfc */
+ nullptr, /* 0xfd */
+ nullptr, /* 0xfe */
+ nullptr /* 0xff */
};
static const char *const bml3bas_statements[] =
diff --git a/src/tools/imgtool/filteoln.cpp b/src/tools/imgtool/filteoln.cpp
index 30fb52ed429..457ac89aee6 100644
--- a/src/tools/imgtool/filteoln.cpp
+++ b/src/tools/imgtool/filteoln.cpp
@@ -58,14 +58,14 @@ static imgtoolerr_t ascii_readfile(imgtool_partition *partition, const char *fil
imgtoolerr_t err;
imgtool_stream *mem_stream;
- mem_stream = stream_open_mem(NULL, 0);
+ mem_stream = stream_open_mem(nullptr, 0);
if (!mem_stream)
{
err = IMGTOOLERR_OUTOFMEMORY;
goto done;
}
- err = imgtool_partition_read_file(partition, filename, fork, mem_stream, NULL);
+ err = imgtool_partition_read_file(partition, filename, fork, mem_stream, nullptr);
if (err)
goto done;
@@ -85,11 +85,11 @@ done:
static imgtoolerr_t ascii_writefile(imgtool_partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, option_resolution *opts)
{
imgtoolerr_t err;
- imgtool_stream *mem_stream = NULL;
+ imgtool_stream *mem_stream = nullptr;
const char *eoln;
/* create a stream */
- mem_stream = stream_open_mem(NULL, 0);
+ mem_stream = stream_open_mem(nullptr, 0);
if (!mem_stream)
{
err = IMGTOOLERR_OUTOFMEMORY;
@@ -103,7 +103,7 @@ static imgtoolerr_t ascii_writefile(imgtool_partition *partition, const char *fi
goto done;
stream_seek(mem_stream, SEEK_SET, 0);
- err = imgtool_partition_write_file(partition, filename, fork, mem_stream, opts, NULL);
+ err = imgtool_partition_write_file(partition, filename, fork, mem_stream, opts, nullptr);
if (err)
goto done;
diff --git a/src/tools/imgtool/filter.cpp b/src/tools/imgtool/filter.cpp
index 5887d6b501d..cd90026b6f7 100644
--- a/src/tools/imgtool/filter.cpp
+++ b/src/tools/imgtool/filter.cpp
@@ -25,7 +25,7 @@ INT64 filter_get_info_int(filter_getinfoproc get_info, UINT32 state)
void *filter_get_info_ptr(filter_getinfoproc get_info, UINT32 state)
{
union filterinfo info;
- info.p = NULL;
+ info.p = nullptr;
get_info(state, &info);
return info.p;
}
@@ -33,7 +33,7 @@ void *filter_get_info_ptr(filter_getinfoproc get_info, UINT32 state)
void *filter_get_info_fct(filter_getinfoproc get_info, UINT32 state)
{
union filterinfo info;
- info.f = NULL;
+ info.f = nullptr;
get_info(state, &info);
return info.f;
}
@@ -41,7 +41,7 @@ void *filter_get_info_fct(filter_getinfoproc get_info, UINT32 state)
const char *filter_get_info_string(filter_getinfoproc get_info, UINT32 state)
{
union filterinfo info;
- info.s = NULL;
+ info.s = nullptr;
get_info(state, &info);
return info.s;
}
@@ -61,7 +61,7 @@ const filter_getinfoproc filters[] =
filter_thombas128_getinfo,
filter_thomcrypt_getinfo,
filter_bml3bas_getinfo,
- NULL
+ nullptr
};
@@ -78,5 +78,5 @@ filter_getinfoproc filter_lookup(const char *name)
return filters[i];
}
- return NULL;
+ return nullptr;
}
diff --git a/src/tools/imgtool/iflopimg.cpp b/src/tools/imgtool/iflopimg.cpp
index 9e8493f9477..3bf05aacd35 100644
--- a/src/tools/imgtool/iflopimg.cpp
+++ b/src/tools/imgtool/iflopimg.cpp
@@ -81,7 +81,7 @@ static const struct io_procs imgtool_ioprocs =
static const struct io_procs imgtool_noclose_ioprocs =
{
- NULL,
+ nullptr,
imgtool_floppy_seekproc,
imgtool_floppy_readproc,
imgtool_floppy_writeproc,
@@ -118,7 +118,7 @@ static imgtoolerr_t imgtool_floppy_open_internal(imgtool_image *image, imgtool_s
/* open up the floppy */
ferr = floppy_open(f, noclose ? &imgtool_noclose_ioprocs : &imgtool_ioprocs,
- NULL, format, FLOPPY_FLAGS_READWRITE, &fimg->floppy);
+ nullptr, format, FLOPPY_FLAGS_READWRITE, &fimg->floppy);
if (ferr)
{
err = imgtool_floppy_error(ferr);
@@ -127,7 +127,7 @@ static imgtoolerr_t imgtool_floppy_open_internal(imgtool_image *image, imgtool_s
if (open)
{
- err = open(image, NULL);
+ err = open(image, nullptr);
if (err)
return err;
}
@@ -171,7 +171,7 @@ static imgtoolerr_t imgtool_floppy_create(imgtool_image *image, imgtool_stream *
/* do we have to do extra stuff when creating the image? */
if (create)
{
- err = create(image, NULL, opts);
+ err = create(image, nullptr, opts);
if (err)
goto done;
}
@@ -179,7 +179,7 @@ static imgtoolerr_t imgtool_floppy_create(imgtool_image *image, imgtool_stream *
/* do we have to do extra stuff when opening the image? */
if (open)
{
- err = open(image, NULL);
+ err = open(image, nullptr);
if (err)
goto done;
}
@@ -269,7 +269,7 @@ static void imgtool_floppy_get_info(const imgtool_class *imgclass, UINT32 state,
case IMGTOOLINFO_PTR_OPEN: info->open = imgtool_floppy_open; break;
case IMGTOOLINFO_PTR_CREATE: info->create = imgtool_floppy_create; break;
case IMGTOOLINFO_PTR_CLOSE: info->close = imgtool_floppy_close; break;
- case IMGTOOLINFO_PTR_CREATEIMAGE_OPTGUIDE: info->createimage_optguide = format->param_guidelines ? floppy_option_guide : NULL; break;
+ case IMGTOOLINFO_PTR_CREATEIMAGE_OPTGUIDE: info->createimage_optguide = format->param_guidelines ? floppy_option_guide : nullptr; break;
case IMGTOOLINFO_PTR_GET_SECTOR_SIZE: info->get_sector_size = imgtool_floppy_get_sector_size; break;
case IMGTOOLINFO_PTR_READ_SECTOR: info->read_sector = imgtool_floppy_read_sector; break;
case IMGTOOLINFO_PTR_WRITE_SECTOR: info->write_sector = imgtool_floppy_write_sector; break;
diff --git a/src/tools/imgtool/imghd.cpp b/src/tools/imgtool/imghd.cpp
index 8ac129751f9..b3161ae2caf 100644
--- a/src/tools/imgtool/imghd.cpp
+++ b/src/tools/imgtool/imghd.cpp
@@ -134,8 +134,8 @@ imgtoolerr_t imghd_open(imgtool_stream *stream, struct mess_hard_disk_file *hard
chd_error chderr;
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
- hard_disk->hard_disk = NULL;
- hard_disk->chd = NULL;
+ hard_disk->hard_disk = nullptr;
+ hard_disk->chd = nullptr;
chderr = hard_disk->chd->open(*stream_core_file(stream), stream_isreadonly(stream));
if (chderr)
@@ -170,7 +170,7 @@ void imghd_close(struct mess_hard_disk_file *disk)
if (disk->hard_disk)
{
hard_disk_close(disk->hard_disk);
- disk->hard_disk = NULL;
+ disk->hard_disk = nullptr;
}
if (disk->stream)
stream_close(disk->stream);
diff --git a/src/tools/imgtool/imgtool.cpp b/src/tools/imgtool/imgtool.cpp
index df44a9bbff2..c2c07e4ee23 100644
--- a/src/tools/imgtool/imgtool.cpp
+++ b/src/tools/imgtool/imgtool.cpp
@@ -170,7 +170,7 @@ char *imgtool_basename(char *filename)
// NULL begets NULL
if (!filename)
- return NULL;
+ return nullptr;
// start at the end and return when we hit a slash or colon
for (c = filename + strlen(filename) - 1; c >= filename; c--)
@@ -240,9 +240,9 @@ void imgtool_exit(void)
if (global_imgtool_library)
{
imgtool_library_close(global_imgtool_library);
- global_imgtool_library = NULL;
+ global_imgtool_library = nullptr;
}
- global_warn = NULL;
+ global_warn = nullptr;
}
@@ -311,9 +311,9 @@ static imgtoolerr_t evaluate_module(const char *fname,
const imgtool_module *module, float *result)
{
imgtoolerr_t err;
- imgtool_image *image = NULL;
- imgtool_partition *partition = NULL;
- imgtool_directory *imageenum = NULL;
+ imgtool_image *image = nullptr;
+ imgtool_partition *partition = nullptr;
+ imgtool_directory *imageenum = nullptr;
imgtool_dirent ent;
float current_result;
@@ -331,7 +331,7 @@ static imgtoolerr_t evaluate_module(const char *fname,
if (err)
goto done;
- err = imgtool_directory_open(partition, NULL, &imageenum);
+ err = imgtool_directory_open(partition, nullptr, &imageenum);
if (err)
goto done;
@@ -387,12 +387,12 @@ imgtoolerr_t imgtool_identify_file(const char *fname, imgtool_module **modules,
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
imgtool_library *library = global_imgtool_library;
- imgtool_module *module = NULL;
+ imgtool_module *module = nullptr;
imgtool_module *insert_module;
imgtool_module *temp_module;
size_t i = 0;
const char *extension;
- float val, temp_val, *values = NULL;
+ float val, temp_val, *values = nullptr;
if (count <= 0)
{
@@ -401,7 +401,7 @@ imgtoolerr_t imgtool_identify_file(const char *fname, imgtool_module **modules,
}
for (i = 0; i < count; i++)
- modules[i] = NULL;
+ modules[i] = nullptr;
if (count > 1)
count--; /* null terminate */
@@ -420,7 +420,7 @@ imgtoolerr_t imgtool_identify_file(const char *fname, imgtool_module **modules,
extension++;
/* iterate through all modules */
- while((module = imgtool_library_iterate(library, module)) != NULL)
+ while((module = imgtool_library_iterate(library, module)) != nullptr)
{
if (!extension || image_find_extension(module->extensions, extension))
{
@@ -592,7 +592,7 @@ imgtoolerr_t imgtool_image_write_block(imgtool_image *image, UINT64 block, const
imgtoolerr_t imgtool_image_clear_block(imgtool_image *image, UINT64 block, UINT8 data)
{
imgtoolerr_t err;
- UINT8 *block_data = NULL;
+ UINT8 *block_data = nullptr;
UINT32 length;
err = imgtool_image_get_block_size(image, &length);
@@ -666,7 +666,7 @@ const imgtool_module *imgtool_image_module(imgtool_image *img)
void *imgtool_image_extra_bytes(imgtool_image *image)
{
- void *ptr = NULL;
+ void *ptr = nullptr;
if (image->module->image_extra_bytes > 0)
ptr = ((UINT8 *) image) + sizeof(*image);
assert(ptr);
@@ -699,7 +699,7 @@ UINT64 imgtool_image_rand(imgtool_image *image)
static char *pool_strdup_allow_null(object_pool *pool, char *s)
{
- return s ? pool_strdup_lib(pool, s) : NULL;
+ return s ? pool_strdup_lib(pool, s) : nullptr;
}
@@ -707,7 +707,7 @@ static char *pool_strdup_allow_null(object_pool *pool, char *s)
imgtoolerr_t imgtool_partition_open(imgtool_image *image, int partition_index, imgtool_partition **partition)
{
imgtoolerr_t err = (imgtoolerr_t)IMGTOOLERR_SUCCESS;
- imgtool_partition *p = NULL;
+ imgtool_partition *p = nullptr;
imgtool_class imgclass;
imgtool_partition_info partition_info[32];
UINT64 base_block, block_count;
@@ -753,7 +753,7 @@ imgtoolerr_t imgtool_partition_open(imgtool_image *image, int partition_index, i
partition_extra_bytes = imgtool_get_info_int(&imgclass, IMGTOOLINFO_INT_PARTITION_EXTRA_BYTES);
/* allocate the new memory pool */
- pool = pool_alloc_lib(NULL);
+ pool = pool_alloc_lib(nullptr);
if (!pool)
{
err = (imgtoolerr_t)IMGTOOLERR_OUTOFMEMORY;
@@ -806,12 +806,12 @@ imgtoolerr_t imgtool_partition_open(imgtool_image *image, int partition_index, i
/* mask out if writing is untested */
if (global_omit_untested && imgtool_get_info_int(&imgclass, IMGTOOLINFO_INT_WRITING_UNTESTED))
{
- p->write_file = NULL;
- p->delete_file = NULL;
- p->create_dir = NULL;
- p->delete_dir = NULL;
- p->writefile_optguide = NULL;
- p->writefile_optspec = NULL;
+ p->write_file = nullptr;
+ p->delete_file = nullptr;
+ p->create_dir = nullptr;
+ p->delete_dir = nullptr;
+ p->writefile_optguide = nullptr;
+ p->writefile_optspec = nullptr;
}
/* call the partition open function, if present */
@@ -825,7 +825,7 @@ imgtoolerr_t imgtool_partition_open(imgtool_image *image, int partition_index, i
}
done:
- *partition = err ? NULL : p;
+ *partition = err ? nullptr : p;
return err;
}
@@ -930,18 +930,18 @@ int imgtool_validitychecks(void)
int error = 0;
int val;
imgtoolerr_t err = (imgtoolerr_t)IMGTOOLERR_SUCCESS;
- const imgtool_module *module = NULL;
+ const imgtool_module *module = nullptr;
const option_guide *guide_entry;
imgtool_module_features features;
int created_library = FALSE;
if (!global_imgtool_library)
{
- imgtool_init(FALSE, NULL);
+ imgtool_init(FALSE, nullptr);
created_library = TRUE;
}
- while((module = imgtool_library_iterate(global_imgtool_library, module)) != NULL)
+ while((module = imgtool_library_iterate(global_imgtool_library, module)) != nullptr)
{
features = imgtool_get_module_features(module);
@@ -1091,13 +1091,13 @@ static imgtoolerr_t internal_open(const imgtool_module *module, const char *fnam
int read_or_write, option_resolution *createopts, imgtool_image **outimg)
{
imgtoolerr_t err;
- imgtool_stream *f = NULL;
- imgtool_image *image = NULL;
- object_pool *pool = NULL;
+ imgtool_stream *f = nullptr;
+ imgtool_image *image = nullptr;
+ object_pool *pool = nullptr;
size_t size;
if (outimg)
- *outimg = NULL;
+ *outimg = nullptr;
/* is the requested functionality implemented? */
if ((read_or_write == OSD_FOPEN_RW_CREATE) ? !module->create : !module->open)
@@ -1107,7 +1107,7 @@ static imgtoolerr_t internal_open(const imgtool_module *module, const char *fnam
}
/* create a memory pool */
- pool = pool_alloc_lib(NULL);
+ pool = pool_alloc_lib(nullptr);
if (!pool)
{
err = (imgtoolerr_t)(IMGTOOLERR_OUTOFMEMORY);
@@ -1152,7 +1152,7 @@ done:
stream_close(f);
if (pool)
pool_free_lib(pool);
- image = NULL;
+ image = nullptr;
}
if (outimg)
@@ -1171,7 +1171,7 @@ done:
imgtoolerr_t imgtool_image_open(const imgtool_module *module, const char *fname, int read_or_write, imgtool_image **outimg)
{
read_or_write = read_or_write ? OSD_FOPEN_RW : OSD_FOPEN_READ;
- return internal_open(module, fname, read_or_write, NULL, outimg);
+ return internal_open(module, fname, read_or_write, nullptr, outimg);
}
@@ -1214,7 +1214,7 @@ imgtoolerr_t imgtool_image_create(const imgtool_module *module, const char *fnam
option_resolution *opts, imgtool_image **image)
{
imgtoolerr_t err;
- option_resolution *alloc_resolution = NULL;
+ option_resolution *alloc_resolution = nullptr;
/* allocate dummy options if necessary */
if (!opts && module->createimage_optguide)
@@ -1291,7 +1291,7 @@ static imgtoolerr_t cannonicalize_path(imgtool_partition *partition, UINT32 flag
const char **path, char **alloc_path)
{
imgtoolerr_t err = (imgtoolerr_t)IMGTOOLERR_SUCCESS;
- char *new_path = NULL;
+ char *new_path = nullptr;
char path_separator, alt_path_separator;
const char *s;
int in_path_separator, i, j;
@@ -1323,7 +1323,7 @@ static imgtoolerr_t cannonicalize_path(imgtool_partition *partition, UINT32 flag
err = (imgtoolerr_t)(IMGTOOLERR_CANNOTUSEPATH | IMGTOOLERR_SRC_FUNCTIONALITY);
goto done;
}
- *path = NULL; /* normalize empty path */
+ *path = nullptr; /* normalize empty path */
}
}
else
@@ -1395,7 +1395,7 @@ static imgtoolerr_t cannonicalize_fork(imgtool_partition *partition, const char
imgtoolerr_t imgtool_partition_get_directory_entry(imgtool_partition *partition, const char *path, int index, imgtool_dirent *ent)
{
imgtoolerr_t err;
- imgtool_directory *imgenum = NULL;
+ imgtool_directory *imgenum = nullptr;
if (index < 0)
{
@@ -1443,7 +1443,7 @@ imgtoolerr_t imgtool_partition_get_file_size(imgtool_partition *partition, const
imgtool_dirent ent;
const char *path;
- path = NULL; /* TODO: Need to parse off the path */
+ path = nullptr; /* TODO: Need to parse off the path */
*filesize = -1;
memset(&ent, 0, sizeof(ent));
@@ -1484,8 +1484,8 @@ done:
imgtoolerr_t imgtool_partition_list_file_attributes(imgtool_partition *partition, const char *path, UINT32 *attrs, size_t len)
{
imgtoolerr_t err;
- char *alloc_path = NULL;
- char *new_fname = NULL;
+ char *alloc_path = nullptr;
+ char *new_fname = nullptr;
memset(attrs, 0, sizeof(*attrs) * len);
@@ -1496,7 +1496,7 @@ imgtoolerr_t imgtool_partition_list_file_attributes(imgtool_partition *partition
}
new_fname = normalize_filename(partition, path);
- if (new_fname == NULL)
+ if (new_fname == nullptr)
{
err = (imgtoolerr_t)(IMGTOOLERR_BADFILENAME | IMGTOOLERR_SRC_FUNCTIONALITY);
goto done;
@@ -1514,9 +1514,9 @@ imgtoolerr_t imgtool_partition_list_file_attributes(imgtool_partition *partition
goto done;
done:
- if (alloc_path != NULL)
+ if (alloc_path != nullptr)
free(alloc_path);
- if (new_fname != NULL)
+ if (new_fname != nullptr)
osd_free(new_fname);
return err;
}
@@ -1531,8 +1531,8 @@ done:
imgtoolerr_t imgtool_partition_get_file_attributes(imgtool_partition *partition, const char *path, const UINT32 *attrs, imgtool_attribute *values)
{
imgtoolerr_t err;
- char *alloc_path = NULL;
- char *new_fname = NULL;
+ char *alloc_path = nullptr;
+ char *new_fname = nullptr;
if (!partition->get_attrs)
{
@@ -1541,7 +1541,7 @@ imgtoolerr_t imgtool_partition_get_file_attributes(imgtool_partition *partition,
}
new_fname = normalize_filename(partition, path);
- if (new_fname == NULL)
+ if (new_fname == nullptr)
{
err = (imgtoolerr_t)(IMGTOOLERR_BADFILENAME | IMGTOOLERR_SRC_FUNCTIONALITY);
goto done;
@@ -1559,9 +1559,9 @@ imgtoolerr_t imgtool_partition_get_file_attributes(imgtool_partition *partition,
goto done;
done:
- if (alloc_path != NULL)
+ if (alloc_path != nullptr)
free(alloc_path);
- if (new_fname != NULL)
+ if (new_fname != nullptr)
osd_free(new_fname);
return err;
}
@@ -1576,7 +1576,7 @@ done:
imgtoolerr_t imgtool_partition_put_file_attributes(imgtool_partition *partition, const char *path, const UINT32 *attrs, const imgtool_attribute *values)
{
imgtoolerr_t err;
- char *alloc_path = NULL;
+ char *alloc_path = nullptr;
if (!partition->set_attrs)
{
@@ -1639,8 +1639,8 @@ imgtoolerr_t imgtool_partition_put_file_attribute(imgtool_partition *partition,
imgtoolerr_t imgtool_partition_get_icon_info(imgtool_partition *partition, const char *path, imgtool_iconinfo *iconinfo)
{
imgtoolerr_t err;
- char *alloc_path = NULL;
- char *new_fname = NULL;
+ char *alloc_path = nullptr;
+ char *new_fname = nullptr;
if (!partition->get_iconinfo)
{
@@ -1649,7 +1649,7 @@ imgtoolerr_t imgtool_partition_get_icon_info(imgtool_partition *partition, const
}
new_fname = normalize_filename(partition, path);
- if (new_fname == NULL)
+ if (new_fname == nullptr)
{
err = (imgtoolerr_t)(IMGTOOLERR_BADFILENAME | IMGTOOLERR_SRC_FUNCTIONALITY);
goto done;
@@ -1688,7 +1688,7 @@ imgtoolerr_t imgtool_partition_suggest_file_filters(imgtool_partition *partition
{
imgtoolerr_t err;
int i, j;
- char *alloc_path = NULL;
+ char *alloc_path = nullptr;
imgtoolerr_t (*check_stream)(imgtool_stream *stream, imgtool_suggestion_viability_t *viability);
size_t position;
@@ -1890,7 +1890,7 @@ imgtoolerr_t imgtool_partition_get_free_space(imgtool_partition *partition, UINT
imgtoolerr_t imgtool_partition_read_file(imgtool_partition *partition, const char *filename, const char *fork, imgtool_stream *destf, filter_getinfoproc filter)
{
imgtoolerr_t err;
- char *alloc_path = NULL;
+ char *alloc_path = nullptr;
union filterinfo u;
if (!partition->read_file)
@@ -1952,10 +1952,10 @@ done:
imgtoolerr_t imgtool_partition_write_file(imgtool_partition *partition, const char *filename, const char *fork, imgtool_stream *sourcef, option_resolution *opts, filter_getinfoproc filter)
{
imgtoolerr_t err;
- char *buf = NULL;
+ char *buf = nullptr;
char *s;
- option_resolution *alloc_resolution = NULL;
- char *alloc_path = NULL;
+ option_resolution *alloc_resolution = nullptr;
+ char *alloc_path = nullptr;
UINT64 free_space;
UINT64 file_size;
union filterinfo u;
@@ -2073,17 +2073,17 @@ imgtoolerr_t imgtool_partition_get_file(imgtool_partition *partition, const char
{
imgtoolerr_t err;
imgtool_stream *f;
- char *new_fname = NULL;
- char *alloc_dest = NULL;
- const char *filter_extension = NULL;
+ char *new_fname = nullptr;
+ char *alloc_dest = nullptr;
+ const char *filter_extension = nullptr;
if (!dest)
{
/* determine the filter extension, if appropriate */
- if (filter != NULL)
+ if (filter != nullptr)
filter_extension = filter_get_info_string(filter, FILTINFO_STR_EXTENSION);
- if (filter_extension != NULL)
+ if (filter_extension != nullptr)
{
alloc_dest = (char*)malloc(strlen(filename) + 1 + strlen(filter_extension) + 1);
if (!alloc_dest)
@@ -2109,7 +2109,7 @@ imgtoolerr_t imgtool_partition_get_file(imgtool_partition *partition, const char
}
new_fname = normalize_filename(partition, filename);
- if (new_fname == NULL)
+ if (new_fname == nullptr)
{
err = (imgtoolerr_t)(IMGTOOLERR_BADFILENAME | IMGTOOLERR_SRC_FUNCTIONALITY);
goto done;
@@ -2120,11 +2120,11 @@ imgtoolerr_t imgtool_partition_get_file(imgtool_partition *partition, const char
goto done;
done:
- if (f != NULL)
+ if (f != nullptr)
stream_close(f);
- if (alloc_dest != NULL)
+ if (alloc_dest != nullptr)
free(alloc_dest);
- if (new_fname != NULL)
+ if (new_fname != nullptr)
osd_free(new_fname);
return err;
}
@@ -2140,9 +2140,9 @@ imgtoolerr_t imgtool_partition_put_file(imgtool_partition *partition, const char
const char *source, option_resolution *opts, filter_getinfoproc filter)
{
imgtoolerr_t err;
- imgtool_stream *f = NULL;
+ imgtool_stream *f = nullptr;
imgtool_charset charset;
- char *alloc_newfname = NULL;
+ char *alloc_newfname = nullptr;
if (!newfname)
newfname = (const char *) imgtool_basename((char *) source);
@@ -2152,7 +2152,7 @@ imgtoolerr_t imgtool_partition_put_file(imgtool_partition *partition, const char
{
/* convert to native format */
alloc_newfname = native_from_utf8(charset, newfname);
- if (alloc_newfname == NULL)
+ if (alloc_newfname == nullptr)
{
err = (imgtoolerr_t)(IMGTOOLERR_BADFILENAME | IMGTOOLERR_SRC_NATIVEFILE);
goto done;
@@ -2169,9 +2169,9 @@ imgtoolerr_t imgtool_partition_put_file(imgtool_partition *partition, const char
done:
/* clean up */
- if (f != NULL)
+ if (f != nullptr)
stream_close(f);
- if (alloc_newfname != NULL)
+ if (alloc_newfname != nullptr)
osd_free(alloc_newfname);
return err;
}
@@ -2186,8 +2186,8 @@ done:
imgtoolerr_t imgtool_partition_delete_file(imgtool_partition *partition, const char *fname)
{
imgtoolerr_t err;
- char *alloc_path = NULL;
- char *new_fname = NULL;
+ char *alloc_path = nullptr;
+ char *new_fname = nullptr;
if (!partition->delete_file)
{
@@ -2196,7 +2196,7 @@ imgtoolerr_t imgtool_partition_delete_file(imgtool_partition *partition, const c
}
new_fname = normalize_filename(partition, fname);
- if (new_fname == NULL)
+ if (new_fname == nullptr)
{
err = (imgtoolerr_t)(IMGTOOLERR_BADFILENAME | IMGTOOLERR_SRC_FUNCTIONALITY);
goto done;
@@ -2234,8 +2234,8 @@ done:
imgtoolerr_t imgtool_partition_list_file_forks(imgtool_partition *partition, const char *path, imgtool_forkent *ents, size_t len)
{
imgtoolerr_t err;
- char *alloc_path = NULL;
- char *new_fname = NULL;
+ char *alloc_path = nullptr;
+ char *new_fname = nullptr;
if (!partition->list_forks)
{
@@ -2244,7 +2244,7 @@ imgtoolerr_t imgtool_partition_list_file_forks(imgtool_partition *partition, con
}
new_fname = normalize_filename(partition, path);
- if (new_fname == NULL)
+ if (new_fname == nullptr)
{
err = (imgtoolerr_t)(IMGTOOLERR_BADFILENAME | IMGTOOLERR_SRC_FUNCTIONALITY);
goto done;
@@ -2279,8 +2279,8 @@ done:
imgtoolerr_t imgtool_partition_create_directory(imgtool_partition *partition, const char *path)
{
imgtoolerr_t err;
- char *alloc_path = NULL;
- char *new_path = NULL;
+ char *alloc_path = nullptr;
+ char *new_path = nullptr;
/* implemented? */
if (!partition->create_dir)
@@ -2290,7 +2290,7 @@ imgtoolerr_t imgtool_partition_create_directory(imgtool_partition *partition, co
}
new_path = normalize_filename(partition, path);
- if (new_path == NULL)
+ if (new_path == nullptr)
{
err = (imgtoolerr_t)(IMGTOOLERR_BADFILENAME | IMGTOOLERR_SRC_FUNCTIONALITY);
goto done;
@@ -2325,8 +2325,8 @@ done:
imgtoolerr_t imgtool_partition_delete_directory(imgtool_partition *partition, const char *path)
{
imgtoolerr_t err;
- char *alloc_path = NULL;
- char *new_path = NULL;
+ char *alloc_path = nullptr;
+ char *new_path = nullptr;
/* implemented? */
if (!partition->delete_dir)
@@ -2336,7 +2336,7 @@ imgtoolerr_t imgtool_partition_delete_directory(imgtool_partition *partition, co
}
new_path = normalize_filename(partition, path);
- if (new_path == NULL)
+ if (new_path == nullptr)
{
err = (imgtoolerr_t)(IMGTOOLERR_BADFILENAME | IMGTOOLERR_SRC_FUNCTIONALITY);
goto done;
@@ -2482,7 +2482,7 @@ UINT64 imgtool_partition_get_info_int(imgtool_partition *partition, UINT32 state
void *imgtool_partition_extra_bytes(imgtool_partition *partition)
{
- void *ptr = NULL;
+ void *ptr = nullptr;
if (partition->partition_extra_bytes > 0)
ptr = ((UINT8 *) partition) + sizeof(*partition);
assert(ptr);
@@ -2618,16 +2618,16 @@ const char *imgtool_partition_get_base_name(imgtool_partition *partition, const
imgtoolerr_t imgtool_directory_open(imgtool_partition *partition, const char *path, imgtool_directory **outenum)
{
imgtoolerr_t err = (imgtoolerr_t)IMGTOOLERR_SUCCESS;
- imgtool_directory *enumeration = NULL;
- char *alloc_path = NULL;
- char *new_path = NULL;
+ imgtool_directory *enumeration = nullptr;
+ char *alloc_path = nullptr;
+ char *new_path = nullptr;
size_t size;
/* sanity checks */
assert(partition);
assert(outenum);
- *outenum = NULL;
+ *outenum = nullptr;
if (!partition->next_enum)
{
@@ -2663,14 +2663,14 @@ imgtoolerr_t imgtool_directory_open(imgtool_partition *partition, const char *pa
}
done:
- if (alloc_path != NULL)
+ if (alloc_path != nullptr)
free(alloc_path);
- if (new_path != NULL)
+ if (new_path != nullptr)
osd_free(new_path);
- if (err && (enumeration != NULL))
+ if (err && (enumeration != nullptr))
{
free(enumeration);
- enumeration = NULL;
+ enumeration = nullptr;
}
*outenum = enumeration;
return err;
@@ -2731,17 +2731,17 @@ imgtoolerr_t imgtool_directory_get_next(imgtool_directory *directory, imgtool_di
/* don't trust the module! */
if (!partition->supports_creation_time && (ent->creation_time != 0))
{
- internal_error(NULL, "next_enum() specified creation_time, which is marked as unsupported by this module");
+ internal_error(nullptr, "next_enum() specified creation_time, which is marked as unsupported by this module");
return IMGTOOLERR_UNEXPECTED;
}
if (!partition->supports_lastmodified_time && (ent->lastmodified_time != 0))
{
- internal_error(NULL, "next_enum() specified lastmodified_time, which is marked as unsupported by this module");
+ internal_error(nullptr, "next_enum() specified lastmodified_time, which is marked as unsupported by this module");
return IMGTOOLERR_UNEXPECTED;
}
if (!partition->path_separator && ent->directory)
{
- internal_error(NULL, "next_enum() returned a directory, which is marked as unsupported by this module");
+ internal_error(nullptr, "next_enum() returned a directory, which is marked as unsupported by this module");
return IMGTOOLERR_UNEXPECTED;
}
return IMGTOOLERR_SUCCESS;
diff --git a/src/tools/imgtool/library.cpp b/src/tools/imgtool/library.cpp
index e2ce14d4461..88c1119a85a 100644
--- a/src/tools/imgtool/library.cpp
+++ b/src/tools/imgtool/library.cpp
@@ -30,7 +30,7 @@ imgtool_library *imgtool_library_create(void)
object_pool *pool;
/* create a memory pool */
- pool = pool_alloc_lib(NULL);
+ pool = pool_alloc_lib(nullptr);
if (!pool)
goto error;
@@ -48,7 +48,7 @@ imgtool_library *imgtool_library_create(void)
error:
if (pool)
pool_free_lib(pool);
- return NULL;
+ return nullptr;
}
@@ -162,12 +162,12 @@ const imgtool_module *imgtool_library_unlink(imgtool_library *library,
next = m->next ? &m->next->previous : &library->last;
*previous = m->next;
*next = m->previous;
- m->previous = NULL;
- m->next = NULL;
+ m->previous = nullptr;
+ m->next = nullptr;
return m;
}
}
- return NULL;
+ return nullptr;
}
@@ -278,5 +278,5 @@ char *imgtool_library_strdup(imgtool_library *library, const char *s)
char *imgtool_library_strdup_allow_null(imgtool_library *library, const char *s)
{
- return s ? imgtool_library_strdup(library, s) : NULL;
+ return s ? imgtool_library_strdup(library, s) : nullptr;
}
diff --git a/src/tools/imgtool/library.h b/src/tools/imgtool/library.h
index 25c923c1f4d..0ea52a68e44 100644
--- a/src/tools/imgtool/library.h
+++ b/src/tools/imgtool/library.h
@@ -308,7 +308,7 @@ INLINE INT64 imgtool_get_info_int(const imgtool_class *imgclass, UINT32 state)
INLINE void *imgtool_get_info_ptr(const imgtool_class *imgclass, UINT32 state)
{
union imgtoolinfo info;
- info.p = NULL;
+ info.p = nullptr;
imgclass->get_info(imgclass, state, &info);
return info.p;
}
@@ -316,7 +316,7 @@ INLINE void *imgtool_get_info_ptr(const imgtool_class *imgclass, UINT32 state)
INLINE void *imgtool_get_info_fct(const imgtool_class *imgclass, UINT32 state)
{
union imgtoolinfo info;
- info.f = NULL;
+ info.f = nullptr;
imgclass->get_info(imgclass, state, &info);
return info.f;
}
@@ -324,7 +324,7 @@ INLINE void *imgtool_get_info_fct(const imgtool_class *imgclass, UINT32 state)
INLINE char *imgtool_get_info_string(const imgtool_class *imgclass, UINT32 state)
{
union imgtoolinfo info;
- info.s = NULL;
+ info.s = nullptr;
imgclass->get_info(imgclass, state, &info);
return info.s;
}
diff --git a/src/tools/imgtool/main.cpp b/src/tools/imgtool/main.cpp
index 6825b71fa81..fb34403f51a 100644
--- a/src/tools/imgtool/main.cpp
+++ b/src/tools/imgtool/main.cpp
@@ -38,15 +38,15 @@ static int parse_options(int argc, char *argv[], int minunnamed, int maxunnamed,
int i;
int lastunnamed = 0;
char *s;
- char *name = NULL;
- char *value = NULL;
+ char *name = nullptr;
+ char *value = nullptr;
optreserr_t oerr;
static char buf[256];
if (filter)
- *filter = NULL;
+ *filter = nullptr;
if (fork)
- *fork = NULL;
+ *fork = nullptr;
for (i = 0; i < argc; i++)
{
@@ -177,9 +177,9 @@ static int cmd_dir(const struct command *c, int argc, char *argv[])
imgtoolerr_t err;
int total_count, total_size, freespace_err;
UINT64 freespace;
- imgtool_image *image = NULL;
- imgtool_partition *partition = NULL;
- imgtool_directory *imgenum = NULL;
+ imgtool_image *image = nullptr;
+ imgtool_partition *partition = nullptr;
+ imgtool_directory *imgenum = nullptr;
imgtool_dirent ent;
char buf[512];
char last_modified[19];
@@ -196,7 +196,7 @@ static int cmd_dir(const struct command *c, int argc, char *argv[])
if (err)
goto done;
- path = argc > 2 ? argv[2] : NULL;
+ path = argc > 2 ? argv[2] : nullptr;
err = imgtool_directory_open(partition, path, &imgenum);
if (err)
@@ -260,7 +260,7 @@ done:
if (image)
imgtool_image_close(image);
if (err)
- reporterror(err, c, argv[0], argv[1], NULL, NULL, NULL);
+ reporterror(err, c, argv[0], argv[1], nullptr, nullptr, nullptr);
return err ? -1 : 0;
}
@@ -269,8 +269,8 @@ done:
static int cmd_get(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err;
- imgtool_image *image = NULL;
- imgtool_partition *partition = NULL;
+ imgtool_image *image = nullptr;
+ imgtool_partition *partition = nullptr;
const char *filename;
char *new_filename;
int unnamedargs = 0;
@@ -288,11 +288,11 @@ static int cmd_get(const struct command *c, int argc, char *argv[])
filename = interpret_filename(argv[2]);
- unnamedargs = parse_options(argc, argv, 3, 4, NULL, &filter, &fork);
+ unnamedargs = parse_options(argc, argv, 3, 4, nullptr, &filter, &fork);
if (unnamedargs < 0)
goto done;
- new_filename = (unnamedargs == 4) ? argv[3] : NULL;
+ new_filename = (unnamedargs == 4) ? argv[3] : nullptr;
err = imgtool_partition_get_file(partition, filename, fork, new_filename, filter);
if (err)
@@ -302,7 +302,7 @@ static int cmd_get(const struct command *c, int argc, char *argv[])
done:
if (err)
- reporterror(err, c, argv[0], argv[1], argv[2], argv[3], NULL);
+ reporterror(err, c, argv[0], argv[1], argv[2], argv[3], nullptr);
if (partition)
imgtool_partition_close(partition);
if (image)
@@ -316,13 +316,13 @@ static int cmd_put(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err = IMGTOOLERR_SUCCESS;
int i;
- imgtool_image *image = NULL;
- imgtool_partition *partition = NULL;
- const char *filename = NULL;
+ imgtool_image *image = nullptr;
+ imgtool_partition *partition = nullptr;
+ const char *filename = nullptr;
int unnamedargs;
filter_getinfoproc filter;
const imgtool_module *module;
- option_resolution *resolution = NULL;
+ option_resolution *resolution = nullptr;
const char *fork;
const char *new_filename;
char **filename_list;
@@ -394,7 +394,7 @@ done:
if (resolution)
option_resolution_close(resolution);
if (err)
- reporterror(err, c, argv[0], argv[1], filename, NULL, resolution);
+ reporterror(err, c, argv[0], argv[1], filename, nullptr, resolution);
return err ? -1 : 0;
}
@@ -403,13 +403,13 @@ done:
static int cmd_getall(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err;
- imgtool_image *image = NULL;
- imgtool_partition *partition = NULL;
- imgtool_directory *imgenum = NULL;
+ imgtool_image *image = nullptr;
+ imgtool_partition *partition = nullptr;
+ imgtool_directory *imgenum = nullptr;
imgtool_dirent ent;
filter_getinfoproc filter;
int unnamedargs;
- const char *path = NULL;
+ const char *path = nullptr;
int arg;
int partition_index = 0;
@@ -427,7 +427,7 @@ static int cmd_getall(const struct command *c, int argc, char *argv[])
path = argv[arg++];
}
- unnamedargs = parse_options(argc, argv, arg, arg, NULL, &filter, NULL);
+ unnamedargs = parse_options(argc, argv, arg, arg, nullptr, &filter, nullptr);
if (unnamedargs < 0)
goto done;
@@ -441,7 +441,7 @@ static int cmd_getall(const struct command *c, int argc, char *argv[])
{
fprintf(stdout, "Retrieving %s (%u bytes)\n", ent.filename, (unsigned int) ent.filesize);
- err = imgtool_partition_get_file(partition, ent.filename, NULL, NULL, filter);
+ err = imgtool_partition_get_file(partition, ent.filename, nullptr, nullptr, filter);
if (err)
goto done;
}
@@ -454,7 +454,7 @@ done:
if (image)
imgtool_image_close(image);
if (err)
- reporterror(err, c, argv[0], argv[1], NULL, NULL, NULL);
+ reporterror(err, c, argv[0], argv[1], nullptr, nullptr, nullptr);
return err ? -1 : 0;
}
@@ -463,8 +463,8 @@ done:
static int cmd_del(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err;
- imgtool_image *image = NULL;
- imgtool_partition *partition = NULL;
+ imgtool_image *image = nullptr;
+ imgtool_partition *partition = nullptr;
int partition_index = 0;
err = imgtool_image_open_byname(argv[0], argv[1], OSD_FOPEN_RW, &image);
@@ -485,7 +485,7 @@ done:
if (image)
imgtool_image_close(image);
if (err)
- reporterror(err, c, argv[0], argv[1], argv[2], NULL, NULL);
+ reporterror(err, c, argv[0], argv[1], argv[2], nullptr, nullptr);
return err ? -1 : 0;
}
@@ -494,8 +494,8 @@ done:
static int cmd_mkdir(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err;
- imgtool_image *image = NULL;
- imgtool_partition *partition = NULL;
+ imgtool_image *image = nullptr;
+ imgtool_partition *partition = nullptr;
int partition_index = 0;
err = imgtool_image_open_byname(argv[0], argv[1], OSD_FOPEN_RW, &image);
@@ -516,7 +516,7 @@ done:
if (image)
imgtool_image_close(image);
if (err)
- reporterror(err, c, argv[0], argv[1], argv[2], NULL, NULL);
+ reporterror(err, c, argv[0], argv[1], argv[2], nullptr, nullptr);
return err ? -1 : 0;
}
@@ -525,8 +525,8 @@ done:
static int cmd_rmdir(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err;
- imgtool_image *image = NULL;
- imgtool_partition *partition = NULL;
+ imgtool_image *image = nullptr;
+ imgtool_partition *partition = nullptr;
int partition_index = 0;
err = imgtool_image_open_byname(argv[0], argv[1], OSD_FOPEN_RW, &image);
@@ -547,7 +547,7 @@ done:
if (image)
imgtool_image_close(image);
if (err)
- reporterror(err, c, argv[0], argv[1], argv[2], NULL, NULL);
+ reporterror(err, c, argv[0], argv[1], argv[2], nullptr, nullptr);
return err ? -1 : 0;
}
@@ -571,7 +571,7 @@ static int cmd_identify(const struct command *c, int argc, char *argv[])
return 0;
error:
- reporterror(err, c, NULL, argv[0], NULL, NULL, 0);
+ reporterror(err, c, nullptr, argv[0], nullptr, nullptr, nullptr);
return -1;
}
@@ -582,7 +582,7 @@ static int cmd_create(const struct command *c, int argc, char *argv[])
imgtoolerr_t err;
int unnamedargs;
const imgtool_module *module;
- option_resolution *resolution = NULL;
+ option_resolution *resolution = nullptr;
module = imgtool_find_module(argv[0]);
if (!module)
@@ -601,11 +601,11 @@ static int cmd_create(const struct command *c, int argc, char *argv[])
}
}
- unnamedargs = parse_options(argc, argv, 2, 3, resolution, NULL, NULL);
+ unnamedargs = parse_options(argc, argv, 2, 3, resolution, nullptr, nullptr);
if (unnamedargs < 0)
return -1;
- err = imgtool_image_create(module, argv[1], resolution, NULL);
+ err = imgtool_image_create(module, argv[1], resolution, nullptr);
if (err)
goto error;
@@ -616,7 +616,7 @@ static int cmd_create(const struct command *c, int argc, char *argv[])
error:
if (resolution)
option_resolution_close(resolution);
- reporterror(err, c, argv[0], argv[1], NULL, NULL, 0);
+ reporterror(err, c, argv[0], argv[1], nullptr, nullptr, nullptr);
return -1;
}
@@ -626,7 +626,7 @@ static int cmd_readsector(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err;
imgtool_image *img;
- imgtool_stream *stream = NULL;
+ imgtool_stream *stream = nullptr;
dynamic_buffer buffer;
UINT32 size, track, head, sector;
@@ -663,7 +663,7 @@ done:
if (stream)
stream_close(stream);
if (err)
- reporterror(err, c, argv[0], argv[1], NULL, NULL, 0);
+ reporterror(err, c, argv[0], argv[1], nullptr, nullptr, nullptr);
return err ? -1 : 0;
}
@@ -673,7 +673,7 @@ static int cmd_writesector(const struct command *c, int argc, char *argv[])
{
imgtoolerr_t err;
imgtool_image *img;
- imgtool_stream *stream = NULL;
+ imgtool_stream *stream = nullptr;
dynamic_buffer buffer;
UINT32 size, track, head, sector;
@@ -707,7 +707,7 @@ done:
if (stream)
stream_close(stream);
if (err)
- reporterror(err, c, argv[0], argv[1], NULL, NULL, 0);
+ reporterror(err, c, argv[0], argv[1], nullptr, nullptr, nullptr);
return err ? -1 : 0;
}
@@ -719,7 +719,7 @@ static int cmd_listformats(const struct command *c, int argc, char *argv[])
fprintf(stdout, "Image formats supported by imgtool:\n\n");
- mod = imgtool_find_module(NULL);
+ mod = imgtool_find_module(nullptr);
while(mod)
{
fprintf(stdout, " %-25s%s\n", mod->name, mod->description);
@@ -865,7 +865,7 @@ static int cmd_listdriveroptions(const struct command *c, int argc, char *argv[]
return 0;
error:
- reporterror((imgtoolerr_t)(IMGTOOLERR_MODULENOTFOUND|IMGTOOLERR_SRC_MODULE), c, argv[0], NULL, NULL, NULL, NULL);
+ reporterror((imgtoolerr_t)(IMGTOOLERR_MODULENOTFOUND|IMGTOOLERR_SRC_MODULE), c, argv[0], nullptr, nullptr, nullptr, nullptr);
return -1;
}
@@ -886,8 +886,8 @@ static const struct command cmds[] =
{ "readsector", cmd_readsector, "<format> <imagename> <track> <head> <sector> <filename>", 6, 6, 0 },
{ "writesector", cmd_writesector, "<format> <imagename> <track> <head> <sector> <filename>", 6, 6, 0 },
{ "identify", cmd_identify, "<imagename>", 1, 1 },
- { "listformats", cmd_listformats, NULL, 0, 0, 0 },
- { "listfilters", cmd_listfilters, NULL, 0, 0, 0 },
+ { "listformats", cmd_listformats, nullptr, 0, 0, 0 },
+ { "listfilters", cmd_listfilters, nullptr, 0, 0, 0 },
{ "listdriveroptions", cmd_listdriveroptions, "<format>", 1, 1, 0 }
};
@@ -918,7 +918,7 @@ int CLIB_DECL main(int argc, char *argv[])
goto cmderror;
/* initialize the imgtool core */
- imgtool_init(TRUE, NULL);
+ imgtool_init(TRUE, nullptr);
if (c->lastargrepeats && (argc > c->maxargs))
{
diff --git a/src/tools/imgtool/modules.cpp b/src/tools/imgtool/modules.cpp
index 982fec1972c..72f81b862b9 100644
--- a/src/tools/imgtool/modules.cpp
+++ b/src/tools/imgtool/modules.cpp
@@ -60,18 +60,18 @@ imgtoolerr_t imgtool_create_cannonical_library(int omit_untested, imgtool_librar
/* if we are omitting untested, go through and block out the functionality in question */
if (omit_untested)
{
- module = NULL;
- while((module = imgtool_library_iterate(lib, module)) != NULL)
+ module = nullptr;
+ while((module = imgtool_library_iterate(lib, module)) != nullptr)
{
if (module->writing_untested)
{
- module->write_sector = NULL;
+ module->write_sector = nullptr;
}
if (module->creation_untested)
{
- module->create = NULL;
- module->createimage_optguide = NULL;
- module->createimage_optspec = NULL;
+ module->create = nullptr;
+ module->createimage_optguide = nullptr;
+ module->createimage_optspec = nullptr;
}
}
}
diff --git a/src/tools/imgtool/stream.cpp b/src/tools/imgtool/stream.cpp
index 5c9cf4050c6..461d2fd99bd 100644
--- a/src/tools/imgtool/stream.cpp
+++ b/src/tools/imgtool/stream.cpp
@@ -41,9 +41,9 @@ struct imgtool_stream
static imgtool_stream *stream_open_zip(const char *zipname, const char *subname, int read_or_write)
{
- imgtool_stream *imgfile = NULL;
+ imgtool_stream *imgfile = nullptr;
// zip_error ziperr;
- zip_file *z = NULL;
+ zip_file *z = nullptr;
const zip_file_header *zipent;
FILE *f;
@@ -96,7 +96,7 @@ error:
free(imgfile->u.buffer);
free(imgfile);
}
- return NULL;
+ return nullptr;
}
@@ -105,7 +105,7 @@ imgtool_stream *stream_open(const char *fname, int read_or_write)
{
file_error filerr;
const char *ext;
- imgtool_stream *imgfile = NULL;
+ imgtool_stream *imgfile = nullptr;
static const UINT32 write_modes[] =
{
OPEN_FLAG_READ,
@@ -113,16 +113,16 @@ imgtool_stream *stream_open(const char *fname, int read_or_write)
OPEN_FLAG_READ | OPEN_FLAG_WRITE,
OPEN_FLAG_READ | OPEN_FLAG_WRITE | OPEN_FLAG_CREATE
};
- core_file *f = NULL;
- char *buf = NULL;
+ core_file *f = nullptr;
+ char *buf = nullptr;
int len, i;
- imgtool_stream *s = NULL;
+ imgtool_stream *s = nullptr;
char c;
/* maybe we are just a ZIP? */
ext = strrchr(fname, '.');
if (ext && !core_stricmp(ext, ".zip"))
- return stream_open_zip(fname, NULL, read_or_write);
+ return stream_open_zip(fname, nullptr, read_or_write);
filerr = core_fopen(fname, write_modes[read_or_write], &f);
if (filerr != FILERR_NONE)
@@ -148,7 +148,7 @@ imgtool_stream *stream_open(const char *fname, int read_or_write)
}
}
free(buf);
- buf = NULL;
+ buf = nullptr;
if (s)
return s;
@@ -173,13 +173,13 @@ imgtool_stream *stream_open(const char *fname, int read_or_write)
return imgfile;
error:
- if (imgfile != NULL)
+ if (imgfile != nullptr)
free((void *) imgfile);
- if (f != NULL)
+ if (f != nullptr)
core_fclose(f);
if (buf)
free(buf);
- return (imgtool_stream *) NULL;
+ return (imgtool_stream *) nullptr;
}
@@ -190,7 +190,7 @@ imgtool_stream *stream_open_write_stream(int size)
imgfile = (imgtool_stream *)malloc(sizeof(imgtool_stream));
if (!imgfile)
- return NULL;
+ return nullptr;
imgfile->imgtype = IMG_MEM;
imgfile->write_protect = 0;
@@ -201,7 +201,7 @@ imgtool_stream *stream_open_write_stream(int size)
if (!imgfile->u.buffer)
{
free(imgfile);
- return NULL;
+ return nullptr;
}
return imgfile;
@@ -215,7 +215,7 @@ imgtool_stream *stream_open_mem(void *buf, size_t sz)
imgfile = (imgtool_stream *)malloc(sizeof(imgtool_stream));
if (!imgfile)
- return NULL;
+ return nullptr;
memset(imgfile, 0, sizeof(*imgfile));
imgfile->imgtype = IMG_MEM;
@@ -231,23 +231,23 @@ imgtool_stream *stream_open_mem(void *buf, size_t sz)
void stream_close(imgtool_stream *s)
{
- assert(s != NULL);
+ assert(s != nullptr);
switch(s->imgtype)
{
case IMG_FILE:
- if (s->u.file != NULL)
+ if (s->u.file != nullptr)
{
core_fclose(s->u.file);
- s->u.file = NULL;
+ s->u.file = nullptr;
}
break;
case IMG_MEM:
- if (s->u.buffer != NULL)
+ if (s->u.buffer != nullptr)
{
free(s->u.buffer);
- s->u.buffer = NULL;
+ s->u.buffer = nullptr;
}
break;
@@ -262,7 +262,7 @@ void stream_close(imgtool_stream *s)
core_file *stream_core_file(imgtool_stream *stream)
{
- return (stream->imgtype == IMG_FILE) ? stream->u.file : NULL;
+ return (stream->imgtype == IMG_FILE) ? stream->u.file : nullptr;
}
@@ -369,7 +369,7 @@ void *stream_getptr(imgtool_stream *f)
break;
default:
- ptr = NULL;
+ ptr = nullptr;
break;
}
return ptr;
diff --git a/src/tools/jedutil.cpp b/src/tools/jedutil.cpp
index 7e4fe826c8a..284b77ae217 100644
--- a/src/tools/jedutil.cpp
+++ b/src/tools/jedutil.cpp
@@ -1875,93 +1875,93 @@ static pal_data paldata[] = {
pal10l8pinfusecolumns, ARRAY_LENGTH(pal10l8pinfusecolumns),
print_pal10l8_product_terms,
config_pal10l8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL10H8", 320,
pal10h8pinfuserows, ARRAY_LENGTH(pal10h8pinfuserows),
pal10h8pinfusecolumns, ARRAY_LENGTH(pal10h8pinfusecolumns),
print_pal10h8_product_terms,
config_pal10h8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL12H6", 384,
pal12h6pinfuserows, ARRAY_LENGTH(pal12h6pinfuserows),
pal12h6pinfusecolumns, ARRAY_LENGTH(pal12h6pinfusecolumns),
print_pal12h6_product_terms,
config_pal12h6_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL14H4", 448,
pal14h4pinfuserows, ARRAY_LENGTH(pal14h4pinfuserows),
pal14h4pinfusecolumns, ARRAY_LENGTH(pal14h4pinfusecolumns),
print_pal14h4_product_terms,
config_pal14h4_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16H2", 512,
pal16h2pinfuserows, ARRAY_LENGTH(pal16h2pinfuserows),
pal16h2pinfusecolumns, ARRAY_LENGTH(pal16h2pinfusecolumns),
print_pal16h2_product_terms,
config_pal16h2_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16C1", 512,
pal16c1pinfuserows, ARRAY_LENGTH(pal16c1pinfuserows),
pal16c1pinfusecolumns, ARRAY_LENGTH(pal16c1pinfusecolumns),
print_pal16c1_product_terms,
config_pal16c1_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL12L6", 384,
pal12l6pinfuserows, ARRAY_LENGTH(pal12l6pinfuserows),
pal12l6pinfusecolumns, ARRAY_LENGTH(pal12l6pinfusecolumns),
print_pal12l6_product_terms,
config_pal12l6_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL14L4", 448,
pal14l4pinfuserows, ARRAY_LENGTH(pal14l4pinfuserows),
pal14l4pinfusecolumns, ARRAY_LENGTH(pal14l4pinfusecolumns),
print_pal14l4_product_terms,
config_pal14l4_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16L2", 512,
pal16l2pinfuserows, ARRAY_LENGTH(pal16l2pinfuserows),
pal16l2pinfusecolumns, ARRAY_LENGTH(pal16l2pinfusecolumns),
print_pal16l2_product_terms,
config_pal16l2_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
/*{"15S8", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/
{"PAL16L8", 2048,
pal16l8pinfuserows, ARRAY_LENGTH(pal16l8pinfuserows),
pal16l8pinfusecolumns, ARRAY_LENGTH(pal16l8pinfusecolumns),
print_pal16l8_product_terms,
config_pal16l8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16R4", 2048,
pal16r4pinfuserows, ARRAY_LENGTH(pal16r4pinfuserows),
pal16r4pinfusecolumns, ARRAY_LENGTH(pal16r4pinfusecolumns),
print_pal16r4_product_terms,
config_pal16r4_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16R6", 2048,
pal16r6pinfuserows, ARRAY_LENGTH(pal16r6pinfuserows),
pal16r6pinfusecolumns, ARRAY_LENGTH(pal16r6pinfusecolumns),
print_pal16r6_product_terms,
config_pal16r6_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16R8", 2048,
pal16r8pinfuserows, ARRAY_LENGTH(pal16r8pinfuserows),
pal16r8pinfusecolumns, ARRAY_LENGTH(pal16r8pinfusecolumns),
print_pal16r8_product_terms,
config_pal16r8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
/*{"PAL16RA8", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
{"PAL16V8R", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},*/
{"PALCE16V8", 2194,
@@ -1969,85 +1969,85 @@ static pal_data paldata[] = {
palce16v8pinfusecolumns, ARRAY_LENGTH(palce16v8pinfusecolumns),
print_palce16v8_product_terms,
config_palce16v8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"GAL16V8", 2194,
gal16v8pinfuserows, ARRAY_LENGTH(gal16v8pinfuserows),
gal16v8pinfusecolumns, ARRAY_LENGTH(gal16v8pinfusecolumns),
print_gal16v8_product_terms,
config_gal16v8_pins,
is_gal16v8_product_term_enabled,
- NULL},
+ nullptr},
{"18CV8", 2696,
peel18cv8pinfuserows, ARRAY_LENGTH(peel18cv8pinfuserows),
peel18cv8pinfusecolumns, ARRAY_LENGTH(peel18cv8pinfusecolumns),
print_peel18cv8_product_terms,
config_peel18cv8_pins,
- NULL,
+ nullptr,
get_peel18cv8_pin_fuse_state},
{"GAL18V10", 3540,
gal18v10pinfuserows, ARRAY_LENGTH(gal18v10pinfuserows),
gal18v10pinfusecolumns, ARRAY_LENGTH(gal18v10pinfusecolumns),
print_gal18v10_product_terms,
config_gal18v10_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20L8", 2560,
pal20l8pinfuserows, ARRAY_LENGTH(pal20l8pinfuserows),
pal20l8pinfusecolumns, ARRAY_LENGTH(pal20l8pinfusecolumns),
print_pal20l8_product_terms,
config_pal20l8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20L10", 1600,
pal20l10pinfuserows, ARRAY_LENGTH(pal20l10pinfuserows),
pal20l10pinfusecolumns, ARRAY_LENGTH(pal20l10pinfusecolumns),
print_pal20l10_product_terms,
config_pal20l10_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20R4", 2560,
pal20r4pinfuserows, ARRAY_LENGTH(pal20r4pinfuserows),
pal20r4pinfusecolumns, ARRAY_LENGTH(pal20r4pinfusecolumns),
print_pal20r4_product_terms,
config_pal20r4_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20R6", 2560,
pal20r6pinfuserows, ARRAY_LENGTH(pal20r6pinfuserows),
pal20r6pinfusecolumns, ARRAY_LENGTH(pal20r6pinfusecolumns),
print_pal20r6_product_terms,
config_pal20r6_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20R8", 2560,
pal20r8pinfuserows, ARRAY_LENGTH(pal20r8pinfuserows),
pal20r8pinfusecolumns, ARRAY_LENGTH(pal20r8pinfusecolumns),
print_pal20r8_product_terms,
config_pal20r8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20X4", 1600,
pal20x4pinfuserows, ARRAY_LENGTH(pal20x4pinfuserows),
pal20x4pinfusecolumns, ARRAY_LENGTH(pal20x4pinfusecolumns),
print_pal20x4_product_terms,
config_pal20x4_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20X8", 1600,
pal20x8pinfuserows, ARRAY_LENGTH(pal20x8pinfuserows),
pal20x8pinfusecolumns, ARRAY_LENGTH(pal20x8pinfusecolumns),
print_pal20x8_product_terms,
config_pal20x8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20X10", 1600,
pal20x10pinfuserows, ARRAY_LENGTH(pal20x10pinfuserows),
pal20x10pinfusecolumns, ARRAY_LENGTH(pal20x10pinfusecolumns),
print_pal20x10_product_terms,
config_pal20x10_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
/*{"PAL22V10", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
{"GAL20V8A", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
{"GAL22V10", 0, NULL, 0, NULL, 0, NULL, NULL, NULL, NULL},
@@ -2057,22 +2057,22 @@ static pal_data paldata[] = {
_82s153_pls153pinfusecolumns, ARRAY_LENGTH(_82s153_pls153pinfusecolumns),
print_82s153_pls153_product_terms,
config_82s153_pls153_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PLS153", 1842,
_82s153_pls153pinfuserows, ARRAY_LENGTH(_82s153_pls153pinfuserows),
_82s153_pls153pinfusecolumns, ARRAY_LENGTH(_82s153_pls153pinfusecolumns),
print_82s153_pls153_product_terms,
config_82s153_pls153_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"CK2605", 1106,
ck2605pinfuserows, ARRAY_LENGTH(ck2605pinfuserows),
ck2605pinfusecolumns, ARRAY_LENGTH(ck2605pinfusecolumns),
print_ck2605_product_terms,
config_ck2605_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
#if defined(ricoh_pals)
{"EPL10P8", 664,
epl10p8pinfuserows, ARRAY_LENGTH(epl10p8pinfuserows),
@@ -2136,141 +2136,141 @@ static pal_data paldata[] = {
pal10p8pinfusecolumns, ARRAY_LENGTH(pal10p8pinfusecolumns),
print_pal10p8_product_terms,
config_pal10p8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL12P6", 390,
pal12p6pinfuserows, ARRAY_LENGTH(pal12p6pinfuserows),
pal12p6pinfusecolumns, ARRAY_LENGTH(pal12p6pinfusecolumns),
print_pal12p6_product_terms,
config_pal12p6_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL14P4", 452,
pal14p4pinfuserows, ARRAY_LENGTH(pal14p4pinfuserows),
pal14p4pinfusecolumns, ARRAY_LENGTH(pal14p4pinfusecolumns),
print_pal14p4_product_terms,
config_pal14p4_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16P2", 514,
pal16p2pinfuserows, ARRAY_LENGTH(pal16p2pinfuserows),
pal16p2pinfusecolumns, ARRAY_LENGTH(pal16p2pinfusecolumns),
print_pal16p2_product_terms,
config_pal16p2_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16P8", 2056,
pal16p8pinfuserows, ARRAY_LENGTH(pal16p8pinfuserows),
pal16p8pinfusecolumns, ARRAY_LENGTH(pal16p8pinfusecolumns),
print_pal16p8_product_terms,
config_pal16p8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16RP4", 2056,
pal16rp4pinfuserows, ARRAY_LENGTH(pal16rp4pinfuserows),
pal16rp4pinfusecolumns, ARRAY_LENGTH(pal16rp4pinfusecolumns),
print_pal16rp4_product_terms,
config_pal16rp4_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16RP6", 2056,
pal16rp6pinfuserows, ARRAY_LENGTH(pal16rp6pinfuserows),
pal16rp6pinfusecolumns, ARRAY_LENGTH(pal16rp6pinfusecolumns),
print_pal16rp6_product_terms,
config_pal16rp6_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16RP8", 2056,
pal16rp8pinfuserows, ARRAY_LENGTH(pal16rp8pinfuserows),
pal16rp8pinfusecolumns, ARRAY_LENGTH(pal16rp8pinfusecolumns),
print_pal16rp8_product_terms,
config_pal16rp8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL6L16", 192,
pal6l16pinfuserows, ARRAY_LENGTH(pal6l16pinfuserows),
pal6l16pinfusecolumns, ARRAY_LENGTH(pal6l16pinfusecolumns),
print_pal6l16_product_terms,
config_pal6l16_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL8L14", 224,
pal8l14pinfuserows, ARRAY_LENGTH(pal8l14pinfuserows),
pal8l14pinfusecolumns, ARRAY_LENGTH(pal8l14pinfusecolumns),
print_pal8l14_product_terms,
config_pal8l14_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL12H10", 480,
pal12h10pinfuserows, ARRAY_LENGTH(pal12h10pinfuserows),
pal12h10pinfusecolumns, ARRAY_LENGTH(pal12h10pinfusecolumns),
print_pal12h10_product_terms,
config_pal12h10_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL12L10", 480,
pal12l10pinfuserows, ARRAY_LENGTH(pal12l10pinfuserows),
pal12l10pinfusecolumns, ARRAY_LENGTH(pal12l10pinfusecolumns),
print_pal12l10_product_terms,
config_pal12l10_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL14H8", 560,
pal14h8pinfuserows, ARRAY_LENGTH(pal14h8pinfuserows),
pal14h8pinfusecolumns, ARRAY_LENGTH(pal14h8pinfusecolumns),
print_pal14h8_product_terms,
config_pal14h8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL14L8", 560,
pal14l8pinfuserows, ARRAY_LENGTH(pal14l8pinfuserows),
pal14l8pinfusecolumns, ARRAY_LENGTH(pal14l8pinfusecolumns),
print_pal14l8_product_terms,
config_pal14l8_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16H6", 640,
pal16h6pinfuserows, ARRAY_LENGTH(pal16h6pinfuserows),
pal16h6pinfusecolumns, ARRAY_LENGTH(pal16h6pinfusecolumns),
print_pal16h6_product_terms,
config_pal16h6_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL16L6", 640,
pal16l6pinfuserows, ARRAY_LENGTH(pal16l6pinfuserows),
pal16l6pinfusecolumns, ARRAY_LENGTH(pal16l6pinfusecolumns),
print_pal16l6_product_terms,
config_pal16l6_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL18H4", 720,
pal18h4pinfuserows, ARRAY_LENGTH(pal18h4pinfuserows),
pal18h4pinfusecolumns, ARRAY_LENGTH(pal18h4pinfusecolumns),
print_pal18h4_product_terms,
config_pal18h4_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL18L4", 720,
pal18l4pinfuserows, ARRAY_LENGTH(pal18l4pinfuserows),
pal18l4pinfusecolumns, ARRAY_LENGTH(pal18l4pinfusecolumns),
print_pal18l4_product_terms,
config_pal18l4_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20C1", 640,
pal20c1pinfuserows, ARRAY_LENGTH(pal20c1pinfuserows),
pal20c1pinfusecolumns, ARRAY_LENGTH(pal20c1pinfusecolumns),
print_pal20c1_product_terms,
config_pal20c1_pins,
- NULL,
- NULL},
+ nullptr,
+ nullptr},
{"PAL20L2", 640,
pal20l2pinfuserows, ARRAY_LENGTH(pal20l2pinfuserows),
pal20l2pinfusecolumns, ARRAY_LENGTH(pal20l2pinfusecolumns),
print_pal20l2_product_terms,
config_pal20l2_pins,
- NULL,
- NULL}};
+ nullptr,
+ nullptr}};
/***************************************************************************
CORE IMPLEMENTATION
@@ -2333,7 +2333,7 @@ static const pal_data* find_pal_data(const char *name)
}
}
- return NULL;
+ return nullptr;
}
@@ -2355,7 +2355,7 @@ static const pin_fuse_rows* find_fuse_rows(const pal_data* pal, UINT16 pin)
}
}
- return NULL;
+ return nullptr;
}
@@ -2377,7 +2377,7 @@ static const pin_fuse_columns* find_fuse_columns(const pal_data* pal, UINT16 pin
}
}
- return NULL;
+ return nullptr;
}
@@ -7054,7 +7054,7 @@ static int command_convert(int argc, char *argv[])
printf(" Total fuses = %d\n", jed.numfuses);
/* generate the output */
- dstbuflen = jedbin_output(&jed, NULL, 0);
+ dstbuflen = jedbin_output(&jed, nullptr, 0);
dstbuf = (UINT8 *)malloc(dstbuflen);
if (!dstbuf)
{
@@ -7082,7 +7082,7 @@ static int command_convert(int argc, char *argv[])
printf(" Total fuses = %d\n", jed.numfuses);
/* generate the output */
- dstbuflen = jed_output(&jed, NULL, 0);
+ dstbuflen = jed_output(&jed, nullptr, 0);
dstbuf = (UINT8 *)malloc(dstbuflen);
if (!dstbuf)
{
diff --git a/src/tools/ldresample.cpp b/src/tools/ldresample.cpp
index d22fcd7a4a9..771c4e94676 100644
--- a/src/tools/ldresample.cpp
+++ b/src/tools/ldresample.cpp
@@ -248,7 +248,7 @@ static bool read_chd(chd_file &file, UINT32 field, movie_info &info, UINT32 soun
file.codec_configure(CHD_CODEC_AVHUFF, AVHUFF_CODEC_DECOMPRESS_CONFIG, &avconfig);
// read the field
- chd_error chderr = file.read_hunk(field, NULL);
+ chd_error chderr = file.read_hunk(field, nullptr);
return (chderr == CHDERR_NONE);
}
@@ -508,13 +508,13 @@ int main(int argc, char *argv[])
if (argc < 2)
return usage();
const char *srcfilename = argv[1];
- const char *dstfilename = (argc < 3) ? NULL : argv[2];
+ const char *dstfilename = (argc < 3) ? nullptr : argv[2];
double offset = (argc < 4) ? 0.0 : atof(argv[3]);
double slope = (argc < 5) ? 1.0 : atof(argv[4]);
// print basic information
printf("Input file: %s\n", srcfilename);
- if (dstfilename != NULL)
+ if (dstfilename != nullptr)
{
printf("Output file: %s\n", dstfilename);
printf("Offset: %f\n", offset);
@@ -538,7 +538,7 @@ int main(int argc, char *argv[])
printf("Total fields: %d\n", info.numfields);
// if we don't have a destination file, scan for edges
- if (dstfilename == NULL)
+ if (dstfilename == nullptr)
{
for (UINT32 fieldnum = 60; fieldnum < info.numfields - 60; fieldnum += 30)
{
@@ -554,7 +554,7 @@ int main(int argc, char *argv[])
// open the destination file
chd_resample_compressor dstfile(srcfile, info, INT64(offset * 65536.0 * 256.0), INT64(slope * 65536.0 * 256.0));
err = create_chd(dstfile, dstfilename, srcfile, info);
- if (dstfile == NULL)
+ if (dstfile == nullptr)
{
fprintf(stderr, "Unable to create file '%s'\n", dstfilename);
return 1;
diff --git a/src/tools/ldverify.cpp b/src/tools/ldverify.cpp
index 020e611181c..ab3947dfaea 100644
--- a/src/tools/ldverify.cpp
+++ b/src/tools/ldverify.cpp
@@ -107,7 +107,7 @@ static void *open_avi(const char *filename, movie_info &info)
if (avierr != AVIERR_NONE)
{
fprintf(stderr, "Error opening AVI file: %s\n", avi_error_string(avierr));
- return NULL;
+ return nullptr;
}
// extract movie info
@@ -171,7 +171,7 @@ static void close_avi(void *file)
static void *open_chd(const char *filename, movie_info &info)
{
- chd_file *chd = new chd_file;
+ auto chd = new chd_file;
// open the file
chd_error chderr = chd->open(filename);
@@ -179,7 +179,7 @@ static void *open_chd(const char *filename, movie_info &info)
{
fprintf(stderr, "Error opening CHD file: %s\n", chd_file::error_string(chderr));
delete chd;
- return NULL;
+ return nullptr;
}
// get the metadata
@@ -189,7 +189,7 @@ static void *open_chd(const char *filename, movie_info &info)
{
fprintf(stderr, "Error getting A/V metadata: %s\n", chd_file::error_string(chderr));
delete chd;
- return NULL;
+ return nullptr;
}
// extract the info
@@ -198,7 +198,7 @@ static void *open_chd(const char *filename, movie_info &info)
{
fprintf(stderr, "Improperly formatted metadata\n");
delete chd;
- return NULL;
+ return nullptr;
}
// extract movie info
@@ -249,7 +249,7 @@ static int read_chd(void *file, int frame, bitmap_yuy16 &bitmap, INT16 *lsound,
chdfile->codec_configure(CHD_CODEC_AVHUFF, AVHUFF_CODEC_DECOMPRESS_CONFIG, &avconfig);
// read the frame
- chd_error chderr = chdfile->read_hunk(frame * interlace_factor + fieldnum, NULL);
+ chd_error chderr = chdfile->read_hunk(frame * interlace_factor + fieldnum, nullptr);
if (chderr != CHDERR_NONE)
return false;
@@ -735,7 +735,7 @@ int main(int argc, char *argv[])
printf("Processing file: %s\n", srcfile);
movie_info info = { 0 };
void *file = isavi ? open_avi(srcfile, info) : open_chd(srcfile, info);
- if (file == NULL)
+ if (file == nullptr)
{
fprintf(stderr, "Unable to open file '%s'\n", srcfile);
return 1;
diff --git a/src/tools/pngcmp.cpp b/src/tools/pngcmp.cpp
index 4b0974d824f..dda54ed7730 100644
--- a/src/tools/pngcmp.cpp
+++ b/src/tools/pngcmp.cpp
@@ -72,7 +72,7 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img
bitmap_argb32 bitmap2;
bitmap_argb32 finalbitmap;
int width, height, maxwidth;
- core_file *file = NULL;
+ core_file *file = nullptr;
file_error filerr;
png_error pngerr;
int error = 100;
@@ -150,8 +150,8 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img
/* iterate over rows in these bitmaps */
for (y = 0; y < curheight; y++)
{
- UINT32 *src1 = (y < bitmap1.height()) ? &bitmap1.pix32(y) : NULL;
- UINT32 *src2 = (y < bitmap2.height()) ? &bitmap2.pix32(y) : NULL;
+ UINT32 *src1 = (y < bitmap1.height()) ? &bitmap1.pix32(y) : nullptr;
+ UINT32 *src2 = (y < bitmap2.height()) ? &bitmap2.pix32(y) : nullptr;
UINT32 *dst1 = &finalbitmap.pix32(y);
UINT32 *dst2 = &finalbitmap.pix32(y, bitmap1.width() + BITMAP_SPACE);
UINT32 *dstdiff = &finalbitmap.pix32(y, bitmap1.width() + BITMAP_SPACE + maxwidth + BITMAP_SPACE);
@@ -161,9 +161,9 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img
{
int pix1 = -1, pix2 = -2;
- if (src1 != NULL && x < bitmap1.width())
+ if (src1 != nullptr && x < bitmap1.width())
pix1 = dst1[x] = src1[x];
- if (src2 != NULL && x < bitmap2.width())
+ if (src2 != nullptr && x < bitmap2.width())
pix2 = dst2[x] = src2[x];
dstdiff[x] = (pix1 != pix2) ? 0xffffffff : 0xff000000;
}
@@ -176,7 +176,7 @@ static int generate_png_diff(const std::string& imgfile1, const std::string& img
printf("Could not open %s (%d)\n", outfilename.c_str(), filerr);
goto error;
}
- pngerr = png_write_bitmap(file, NULL, finalbitmap, 0, NULL);
+ pngerr = png_write_bitmap(file, nullptr, finalbitmap, 0, nullptr);
core_fclose(file);
if (pngerr != PNGERR_NONE)
{
diff --git a/src/tools/regrep.cpp b/src/tools/regrep.cpp
index 8c2beddf0ed..6f5adbf8f22 100644
--- a/src/tools/regrep.cpp
+++ b/src/tools/regrep.cpp
@@ -287,14 +287,14 @@ static summary_file *get_file(const char *filename)
summary_file *file;
/* use the first two characters as a lookup */
- for (file = filehash[filename[0] & 0x7f][filename[1] & 0x7f]; file != NULL; file = file->next)
+ for (file = filehash[filename[0] & 0x7f][filename[1] & 0x7f]; file != nullptr; file = file->next)
if (strcmp(filename, file->name) == 0)
return file;
/* didn't find one -- allocate */
file = (summary_file *)malloc(sizeof(*file));
- if (file == NULL)
- return NULL;
+ if (file == nullptr)
+ return nullptr;
memset(file, 0, sizeof(*file));
/* set the name so we find it in the future */
@@ -314,7 +314,7 @@ static summary_file *get_file(const char *filename)
static int read_summary_log(const char *filename, int index)
{
- summary_file *curfile = NULL;
+ summary_file *curfile = nullptr;
char linebuffer[1024];
char *linestart;
int drivers = 0;
@@ -322,14 +322,14 @@ static int read_summary_log(const char *filename, int index)
/* open the logfile */
file = fopen(filename, "r");
- if (file == NULL)
+ if (file == nullptr)
{
fprintf(stderr, "Error: file '%s' not found\n", filename);
return 1;
}
/* parse it */
- while (fgets(linebuffer, sizeof(linebuffer), file) != NULL)
+ while (fgets(linebuffer, sizeof(linebuffer), file) != nullptr)
{
/* trim the leading/trailing spaces */
linestart = trim_string(linebuffer);
@@ -344,7 +344,7 @@ static int read_summary_log(const char *filename, int index)
if (strncmp(linestart, "driver=", 7) == 0)
{
curfile = parse_driver_tag(linestart + 7, index);
- if (curfile == NULL)
+ if (curfile == nullptr)
goto error;
drivers++;
}
@@ -353,7 +353,7 @@ static int read_summary_log(const char *filename, int index)
else if (strncmp(linestart, "source=", 7) == 0)
{
/* error if no driver yet */
- if (curfile == NULL)
+ if (curfile == nullptr)
{
fprintf(stderr, "Unexpected @@@@@source= tag\n");
goto error;
@@ -370,7 +370,7 @@ static int read_summary_log(const char *filename, int index)
/* allocate a copy of the string */
lists[index].dir = (char *)malloc(strlen(dirname) + 1);
- if (lists[index].dir == NULL)
+ if (lists[index].dir == nullptr)
goto error;
strcpy(lists[index].dir, dirname);
fprintf(stderr, "Directory %s\n", lists[index].dir);
@@ -378,7 +378,7 @@ static int read_summary_log(const char *filename, int index)
}
/* if not, consider other options */
- else if (curfile != NULL)
+ else if (curfile != nullptr)
{
int foundchars = 0;
char *curptr;
@@ -443,19 +443,19 @@ static summary_file *parse_driver_tag(char *linestart, int index)
/* find the colon separating name from status */
colon = strchr(linestart, ':');
- if (colon == NULL)
+ if (colon == nullptr)
{
fprintf(stderr, "Unexpected text after @@@@@driver=\n");
- return NULL;
+ return nullptr;
}
/* NULL terminate at the colon and look up the file */
*colon = 0;
curfile = get_file(trim_string(linestart));
- if (curfile == NULL)
+ if (curfile == nullptr)
{
fprintf(stderr, "Unable to allocate memory for driver\n");
- return NULL;
+ return nullptr;
}
/* clear out any old status for this file */
@@ -514,36 +514,36 @@ static summary_file *sort_file_list(void)
numfiles = 0;
for (c0 = 0; c0 < 128; c0++)
for (c1 = 0; c1 < 128; c1++)
- for (curfile = filehash[c0][c1]; curfile != NULL; curfile = curfile->next)
+ for (curfile = filehash[c0][c1]; curfile != nullptr; curfile = curfile->next)
numfiles++;
/* allocate an array of files */
filearray = (summary_file **)malloc(numfiles * sizeof(*filearray));
- if (filearray == NULL)
+ if (filearray == nullptr)
{
fprintf(stderr, "Out of memory!\n");
- return NULL;
+ return nullptr;
}
/* populate the array */
numfiles = 0;
for (c0 = 0; c0 < 128; c0++)
for (c1 = 0; c1 < 128; c1++)
- for (curfile = filehash[c0][c1]; curfile != NULL; curfile = curfile->next)
+ for (curfile = filehash[c0][c1]; curfile != nullptr; curfile = curfile->next)
filearray[numfiles++] = curfile;
/* sort the array */
qsort(filearray, numfiles, sizeof(filearray[0]), compare_file);
/* now regenerate a single list */
- listhead = NULL;
+ listhead = nullptr;
tailptr = &listhead;
for (filenum = 0; filenum < numfiles; filenum++)
{
*tailptr = filearray[filenum];
tailptr = &(*tailptr)->next;
}
- *tailptr = NULL;
+ *tailptr = nullptr;
free(filearray);
return listhead;
@@ -566,7 +566,7 @@ static core_file *create_file_and_output_header(std::string &filename, std::stri
/* create the indexfile */
if (core_fopen(filename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, &file) != FILERR_NONE)
- return NULL;
+ return nullptr;
/* print a header */
std::string modified(templatefile);
@@ -615,17 +615,17 @@ static void output_report(std::string &dirname, std::string &tempheader, std::st
/* initialize the lists */
for (bucknum = 0; bucknum < BUCKET_COUNT; bucknum++)
{
- buckethead[bucknum] = NULL;
+ buckethead[bucknum] = nullptr;
buckettailptr[bucknum] = &buckethead[bucknum];
}
/* compute the total number of files */
total = 0;
- for (curfile = filelist; curfile != NULL; curfile = curfile->next)
+ for (curfile = filelist; curfile != nullptr; curfile = curfile->next)
total++;
/* first bucketize the games */
- for (curfile = filelist; curfile != NULL; curfile = curfile->next)
+ for (curfile = filelist; curfile != nullptr; curfile = curfile->next)
{
int statcount[STATUS_COUNT] = { 0 };
int bucket = BUCKET_UNKNOWN;
@@ -683,12 +683,12 @@ static void output_report(std::string &dirname, std::string &tempheader, std::st
/* terminate all the lists */
for (bucknum = 0; bucknum < BUCKET_COUNT; bucknum++)
- *buckettailptr[bucknum] = NULL;
+ *buckettailptr[bucknum] = nullptr;
/* output header */
strprintf(tempname,"%s" PATH_SEPARATOR "%s", dirname.c_str(), "index.html");
indexfile = create_file_and_output_header(tempname, tempheader, title);
- if (indexfile == NULL)
+ if (indexfile == nullptr)
{
fprintf(stderr, "Error creating file '%s'\n", tempname.c_str());
return;
@@ -699,7 +699,7 @@ static void output_report(std::string &dirname, std::string &tempheader, std::st
{
int curbucket = bucket_output_order[bucknum];
- if (buckethead[curbucket] != NULL)
+ if (buckethead[curbucket] != nullptr)
{
fprintf(stderr, "Outputting bucket: %s\n", bucket_name[curbucket]);
append_driver_list_table(bucket_name[curbucket], dirname, indexfile, buckethead[curbucket], tempheader, tempfooter);
@@ -836,7 +836,7 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir,
int width, height, maxwidth;
int bitmapcount = 0;
int listnum, bmnum;
- core_file *file = NULL;
+ core_file *file = nullptr;
file_error filerr;
png_error pngerr;
int error = -1;
@@ -901,8 +901,8 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir,
/* iterate over rows in these bitmaps */
for (y = 0; y < curheight; y++)
{
- UINT32 *src1 = (y < bitmap1.height()) ? &bitmap1.pix32(y) : NULL;
- UINT32 *src2 = (y < bitmap2.height()) ? &bitmap2.pix32(y) : NULL;
+ UINT32 *src1 = (y < bitmap1.height()) ? &bitmap1.pix32(y) : nullptr;
+ UINT32 *src2 = (y < bitmap2.height()) ? &bitmap2.pix32(y) : nullptr;
UINT32 *dst1 = &finalbitmap.pix32(starty + y, 0);
UINT32 *dst2 = &finalbitmap.pix32(starty + y, bitmap1.width() + BITMAP_SPACE);
UINT32 *dstdiff = &finalbitmap.pix32(starty + y, bitmap1.width() + BITMAP_SPACE + maxwidth + BITMAP_SPACE);
@@ -912,9 +912,9 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir,
{
int pix1 = -1, pix2 = -2;
- if (src1 != NULL && x < bitmap1.width())
+ if (src1 != nullptr && x < bitmap1.width())
pix1 = dst1[x] = src1[x];
- if (src2 != NULL && x < bitmap2.width())
+ if (src2 != nullptr && x < bitmap2.width())
pix2 = dst2[x] = src2[x];
dstdiff[x] = (pix1 != pix2) ? 0xffffffff : 0xff000000;
}
@@ -928,7 +928,7 @@ static int generate_png_diff(const summary_file *curfile, std::string &destdir,
filerr = core_fopen(dstfilename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE, &file);
if (filerr != FILERR_NONE)
goto error;
- pngerr = png_write_bitmap(file, NULL, finalbitmap, 0, NULL);
+ pngerr = png_write_bitmap(file, nullptr, finalbitmap, 0, nullptr);
core_fclose(file);
if (pngerr != PNGERR_NONE)
goto error;
@@ -963,7 +963,7 @@ static void create_linked_file(std::string &dirname, const summary_file *curfile
strprintf(title, "%s Regressions (%s)", curfile->name, curfile->source);
strprintf(linkname,"%s" PATH_SEPARATOR "%s", dirname.c_str(), filename.c_str());
linkfile = create_file_and_output_header(linkname, tempheader, title);
- if (linkfile == NULL)
+ if (linkfile == nullptr)
{
fprintf(stderr, "Error creating file '%s'\n", filename.c_str());
return;
@@ -973,12 +973,12 @@ static void create_linked_file(std::string &dirname, const summary_file *curfile
core_fprintf(linkfile, "\t<p>\n");
core_fprintf(linkfile, "\t<table width=\"100%%\">\n");
core_fprintf(linkfile, "\t\t<td align=\"left\" width=\"40%%\" style=\"border:none\">");
- if (prevfile != NULL)
+ if (prevfile != nullptr)
core_fprintf(linkfile, "<a href=\"%s.html\"><< %s (%s)</a>", prevfile->name, prevfile->name, prevfile->source);
core_fprintf(linkfile, "</td>\n");
core_fprintf(linkfile, "\t\t<td align=\"center\" width=\"20%%\" style=\"border:none\"><a href=\"index.html\">Home</a></td>\n");
core_fprintf(linkfile, "\t\t<td align=\"right\" width=\"40%%\" style=\"border:none\">");
- if (nextfile != NULL)
+ if (nextfile != nullptr)
core_fprintf(linkfile, "<a href=\"%s.html\">%s (%s) >></a>", nextfile->name, nextfile->name, nextfile->source);
core_fprintf(linkfile, "</td>\n");
core_fprintf(linkfile, "\t</table>\n");
@@ -993,7 +993,7 @@ static void create_linked_file(std::string &dirname, const summary_file *curfile
core_fprintf(linkfile, "\n\t<h2>%s</h2>\n", lists[listnum].version);
core_fprintf(linkfile, "\t<p>\n");
core_fprintf(linkfile, "\t<b>Status:</b> %s\n", status_text[curfile->status[listnum]]);
- if (pngfile != NULL)
+ if (pngfile != nullptr)
imageindex = get_unique_index(curfile, listnum);
if (imageindex != -1)
core_fprintf(linkfile, " [%d]", imageindex);
@@ -1008,7 +1008,7 @@ static void create_linked_file(std::string &dirname, const summary_file *curfile
}
/* output link to the image */
- if (pngfile != NULL)
+ if (pngfile != nullptr)
{
core_fprintf(linkfile, "\n\t<h2>Screenshot Comparisons</h2>\n");
core_fprintf(linkfile, "\t<p>\n");
@@ -1043,7 +1043,7 @@ static void append_driver_list_table(const char *header, std::string &dirname, c
core_fprintf(indexfile, "\n\t\t</tr>\n");
/* if nothing, print a default message */
- if (listhead == NULL)
+ if (listhead == nullptr)
{
core_fprintf(indexfile, "\t\t<tr>\n\t\t\t");
core_fprintf(indexfile, "<td colspan=\"%d\" align=\"center\">(No regressions detected)</td>", list_count + 2);
@@ -1051,16 +1051,16 @@ static void append_driver_list_table(const char *header, std::string &dirname, c
}
/* iterate over files */
- for (prevfile = NULL, curfile = listhead; curfile != NULL; prevfile = curfile, curfile = curfile->next)
+ for (prevfile = nullptr, curfile = listhead; curfile != nullptr; prevfile = curfile, curfile = curfile->next)
{
int rowspan = 0, uniqueshots = 0;
char pngdiffname[40];
/* if this is the first entry in this source file, count how many rows we need to span */
- if (prevfile == NULL || strcmp(prevfile->source, curfile->source) != 0)
+ if (prevfile == nullptr || strcmp(prevfile->source, curfile->source) != 0)
{
const summary_file *cur;
- for (cur = curfile; cur != NULL; cur = cur->next)
+ for (cur = curfile; cur != nullptr; cur = cur->next)
if (strcmp(cur->source, curfile->source) == 0)
rowspan++;
else
@@ -1080,7 +1080,7 @@ static void append_driver_list_table(const char *header, std::string &dirname, c
}
/* create a linked file */
- create_linked_file(dirname, curfile, prevfile, curfile->next, (pngdiffname[0] == 0) ? NULL : pngdiffname, tempheader, tempfooter);
+ create_linked_file(dirname, curfile, prevfile, curfile->next, (pngdiffname[0] == 0) ? nullptr : pngdiffname, tempheader, tempfooter);
/* create a row */
core_fprintf(indexfile, "\t\t<tr>\n\t\t\t");
diff --git a/src/tools/romcmp.cpp b/src/tools/romcmp.cpp
index 97cdfa47ab3..4d89718abe9 100644
--- a/src/tools/romcmp.cpp
+++ b/src/tools/romcmp.cpp
@@ -120,7 +120,7 @@ static void checkintegrity(const fileinfo *file,int side)
int mask0,mask1;
int addrbit;
- if (file->buf == 0) return;
+ if (file->buf == nullptr) return;
/* check for bad data lines */
mask0 = 0x0000;
@@ -351,7 +351,7 @@ static float filecompare(const fileinfo *file1,const fileinfo *file2,int mode1,i
int base1=0,base2=0,mult1=0,mult2=0,mask1=0,mask2=0;
- if (file1->buf == 0 || file2->buf == 0) return 0.0;
+ if (file1->buf == nullptr || file2->buf == nullptr) return 0.0;
size1 = usedbytes(file1,mode1);
size2 = usedbytes(file2,mode2);
@@ -397,7 +397,7 @@ static void readfile(const char *path,fileinfo *file)
UINT64 filesize;
UINT32 actual;
char fullname[256];
- osd_file *f = 0;
+ osd_file *f = nullptr;
if (path)
{
@@ -408,7 +408,7 @@ static void readfile(const char *path,fileinfo *file)
else fullname[0] = 0;
strcat(fullname,file->name);
- if ((file->buf = (unsigned char *)malloc(file->size)) == 0)
+ if ((file->buf = (unsigned char *)malloc(file->size)) == nullptr)
{
printf("%s: out of memory!\n",file->name);
return;
@@ -436,7 +436,7 @@ static void readfile(const char *path,fileinfo *file)
static void freefile(fileinfo *file)
{
free(file->buf);
- file->buf = 0;
+ file->buf = nullptr;
}
@@ -455,12 +455,12 @@ static int load_files(int i, int *found, const char *path)
/* attempt to open as a directory first */
dir = osd_opendir(path);
- if (dir != NULL)
+ if (dir != nullptr)
{
const osd_directory_entry *d;
/* load all files in directory */
- while ((d = osd_readdir(dir)) != NULL)
+ while ((d = osd_readdir(dir)) != nullptr)
{
const char *d_name = d->name;
char buf[255+1];
@@ -506,7 +506,7 @@ static int load_files(int i, int *found, const char *path)
}
/* load all files in zip file */
- for (zipent = zip_file_first_file(zip); zipent != NULL; zipent = zip_file_next_file(zip))
+ for (zipent = zip_file_first_file(zip); zipent != nullptr; zipent = zip_file_next_file(zip))
{
int size;
@@ -525,14 +525,14 @@ static int load_files(int i, int *found, const char *path)
else
strcpy(file->name,zipent->filename);
file->size = zipent->uncompressed_length;
- if ((file->buf = (unsigned char *)malloc(file->size)) == 0)
+ if ((file->buf = (unsigned char *)malloc(file->size)) == nullptr)
printf("%s: out of memory!\n",file->name);
else
{
if (zip_file_decompress(zip, (char *)file->buf, file->size) != ZIPERR_NONE)
{
free(file->buf);
- file->buf = 0;
+ file->buf = nullptr;
}
}
@@ -728,11 +728,11 @@ int CLIB_DECL main(int argc,char *argv[])
for (i = 0;i < found[0];i++)
{
- if (files[0][i].listed == 0) printname(&files[0][i],0,0.0,0,0);
+ if (files[0][i].listed == 0) printname(&files[0][i],nullptr,0.0,0,0);
}
for (i = 0;i < found[1];i++)
{
- if (files[1][i].listed == 0) printname(0,&files[1][i],0.0,0,0);
+ if (files[1][i].listed == 0) printname(nullptr,&files[1][i],0.0,0,0);
}
}
diff --git a/src/tools/split.cpp b/src/tools/split.cpp
index 302bc6d8d7f..043d93b3a78 100644
--- a/src/tools/split.cpp
+++ b/src/tools/split.cpp
@@ -64,9 +64,9 @@ static void compute_hash_as_string(std::string &buffer, void *data, UINT32 lengt
static int split_file(const char *filename, const char *basename, UINT32 splitsize)
{
std::string outfilename, basefilename, splitfilename;
- core_file *outfile = NULL, *infile = NULL, *splitfile = NULL;
+ core_file *outfile = nullptr, *infile = nullptr, *splitfile = nullptr;
std::string computedhash;
- void *splitbuffer = NULL;
+ void *splitbuffer = nullptr;
int index, partnum;
UINT64 totallength;
file_error filerr;
@@ -103,7 +103,7 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi
// allocate a buffer for reading
splitbuffer = malloc(splitsize);
- if (splitbuffer == NULL)
+ if (splitbuffer == nullptr)
{
fprintf(stderr, "Fatal error: unable to allocate memory for the split\n");
goto cleanup;
@@ -174,7 +174,7 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi
goto cleanup;
}
core_fclose(outfile);
- outfile = NULL;
+ outfile = nullptr;
printf(" done\n");
@@ -188,21 +188,21 @@ static int split_file(const char *filename, const char *basename, UINT32 splitsi
error = 0;
cleanup:
- if (splitfile != NULL)
+ if (splitfile != nullptr)
{
core_fclose(splitfile);
if (error != 0)
remove(splitfilename.c_str());
}
- if (infile != NULL)
+ if (infile != nullptr)
core_fclose(infile);
- if (outfile != NULL)
+ if (outfile != nullptr)
{
core_fclose(outfile);
if (error != 0)
remove(outfilename.c_str());
}
- if (splitbuffer != NULL)
+ if (splitbuffer != nullptr)
free(splitbuffer);
return error;
}
@@ -218,8 +218,8 @@ static int join_file(const char *filename, const char *outname, int write_output
std::string expectedhash, computedhash;
std::string outfilename, infilename;
std::string basepath;
- core_file *outfile = NULL, *infile = NULL, *splitfile = NULL;
- void *splitbuffer = NULL;
+ core_file *outfile = nullptr, *infile = nullptr, *splitfile = nullptr;
+ void *splitbuffer = nullptr;
file_error filerr;
UINT32 splitsize;
char buffer[256];
@@ -252,7 +252,7 @@ static int join_file(const char *filename, const char *outname, int write_output
basepath.clear();
// override the output filename if specified, otherwise prepend the path
- if (outname != NULL)
+ if (outname != nullptr)
outfilename.assign(outname);
else
outfilename.insert(0, basepath);
@@ -272,7 +272,7 @@ static int join_file(const char *filename, const char *outname, int write_output
if (filerr == FILERR_NONE)
{
core_fclose(outfile);
- outfile = NULL;
+ outfile = nullptr;
fprintf(stderr, "Fatal error: output file '%s' already exists\n", outfilename.c_str());
goto cleanup;
}
@@ -346,7 +346,7 @@ static int join_file(const char *filename, const char *outname, int write_output
// release allocated memory
osd_free(splitbuffer);
- splitbuffer = NULL;
+ splitbuffer = nullptr;
}
if (write_output)
printf("File re-created successfully\n");
@@ -357,17 +357,17 @@ static int join_file(const char *filename, const char *outname, int write_output
error = 0;
cleanup:
- if (splitfile != NULL)
+ if (splitfile != nullptr)
core_fclose(splitfile);
- if (infile != NULL)
+ if (infile != nullptr)
core_fclose(infile);
- if (outfile != NULL)
+ if (outfile != nullptr)
{
core_fclose(outfile);
if (error != 0)
remove(outfilename.c_str());
}
- if (splitbuffer != NULL)
+ if (splitbuffer != nullptr)
osd_free(splitbuffer);
return error;
}
@@ -398,7 +398,7 @@ int main(int argc, char *argv[])
{
if (argc != 3 && argc != 4)
goto usage;
- result = join_file(argv[2], (argc >= 4) ? argv[3] : NULL, TRUE);
+ result = join_file(argv[2], (argc >= 4) ? argv[3] : nullptr, TRUE);
}
/* verify command */
@@ -406,7 +406,7 @@ int main(int argc, char *argv[])
{
if (argc != 3)
goto usage;
- result = join_file(argv[2], NULL, FALSE);
+ result = join_file(argv[2], nullptr, FALSE);
}
else
goto usage;
diff --git a/src/tools/src2html.cpp b/src/tools/src2html.cpp
index 91780cd2fc6..e5d2f8f496c 100644
--- a/src/tools/src2html.cpp
+++ b/src/tools/src2html.cpp
@@ -99,7 +99,7 @@ static const ext_to_type extension_lookup[] =
static const token_entry dummy_token_table[] =
{
- { NULL, KEYWORD_CLASS }
+ { nullptr, KEYWORD_CLASS }
};
@@ -192,7 +192,7 @@ static const token_entry c_token_table[] =
{ "UINT64", CUSTOM_CLASS },
{ "ARRAY_LENGTH", CUSTOM_CLASS },
*/
- { NULL, KEYWORD_CLASS }
+ { nullptr, KEYWORD_CLASS }
};
@@ -244,9 +244,9 @@ int main(int argc, char *argv[])
if (arg[0] == '-' && arg[1] == 'I')
{
*incpathhead = new include_path;
- if (*incpathhead != NULL)
+ if (*incpathhead != nullptr)
{
- (*incpathhead)->next = NULL;
+ (*incpathhead)->next = nullptr;
strreplacechr((*incpathhead)->path.assign(&arg[2]), '/', PATH_SEPARATOR[0]);
incpathhead = &(*incpathhead)->next;
}
@@ -348,7 +348,7 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std:
// open the directory and iterate through it
osd_directory *dir = osd_opendir(srcdir.c_str());
- if (dir == NULL)
+ if (dir == nullptr)
{
result = 1;
break;
@@ -357,11 +357,11 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std:
// build up the list of files
const osd_directory_entry *entry;
int found = 0;
- list_entry *list = NULL;
- while ((entry = osd_readdir(dir)) != NULL)
+ list_entry *list = nullptr;
+ while ((entry = osd_readdir(dir)) != nullptr)
if (entry->type == entry_type && entry->name[0] != '.')
{
- list_entry *lentry = new list_entry;
+ auto lentry = new list_entry;
lentry->name.assign(entry->name);
lentry->next = list;
list = lentry;
@@ -376,16 +376,16 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std:
continue;
// allocate memory for sorting
- list_entry **listarray = new list_entry *[found];
+ auto listarray = new list_entry *[found];
found = 0;
- for (list_entry *curlist = list; curlist != NULL; curlist = curlist->next)
+ for (list_entry *curlist = list; curlist != nullptr; curlist = curlist->next)
listarray[found++] = curlist;
// sort the list
qsort(listarray, found, sizeof(listarray[0]), compare_list_entries);
// rebuild the list
- list = NULL;
+ list = nullptr;
while (--found >= 0)
{
listarray[found]->next = list;
@@ -394,7 +394,7 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std:
delete[] listarray;
// iterate through each file
- for (list_entry *curlist = list; curlist != NULL && result == 0; curlist = curlist->next)
+ for (list_entry *curlist = list; curlist != nullptr && result == 0; curlist = curlist->next)
{
// add a header
if (curlist == list)
@@ -410,10 +410,10 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std:
{
// make sure we care, first
file_type type = FILE_TYPE_INVALID;
- for (int extnum = 0; extnum < ARRAY_LENGTH(extension_lookup); extnum++)
- if (core_filename_ends_with(curlist->name.c_str(), extension_lookup[extnum].extension))
+ for (auto & elem : extension_lookup)
+ if (core_filename_ends_with(curlist->name.c_str(), elem.extension))
{
- type = extension_lookup[extnum].type;
+ type = elem.type;
break;
}
@@ -421,7 +421,7 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std:
if (type != FILE_TYPE_INVALID)
{
strprintf(dstfile, "%s%c%s.html", dstdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str());
- if (indexfile != NULL)
+ if (indexfile != nullptr)
core_fprintf(indexfile, "\t<li><a href=\"%s.html\">%s</a></li>\n", curlist->name.c_str(), curlist->name.c_str());
result = output_file(type, srcrootlen, dstrootlen, srcfile, dstfile, srcdir.compare(dstdir) == 0, tempheader, tempfooter);
}
@@ -431,18 +431,18 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std:
else
{
strprintf(dstfile, "%s%c%s", dstdir.c_str(), PATH_SEPARATOR[0], curlist->name.c_str());
- if (indexfile != NULL)
+ if (indexfile != nullptr)
core_fprintf(indexfile, "\t<li><a href=\"%s/index.html\">%s/</a></li>\n", curlist->name.c_str(), curlist->name.c_str());
result = recurse_dir(srcrootlen, dstrootlen, srcfile, dstfile, tempheader, tempfooter);
}
}
// close the list if we found some stuff
- if (list != NULL)
+ if (list != nullptr)
core_fprintf(indexfile, "\t</ul>\n");
// free all the allocated entries
- while (list != NULL)
+ while (list != nullptr)
{
list_entry *next = list->next;
delete list;
@@ -450,7 +450,7 @@ static int recurse_dir(int srcrootlen, int dstrootlen, std::string &srcdir, std:
}
}
- if (indexfile != NULL)
+ if (indexfile != nullptr)
output_footer_and_close_file(indexfile, tempfooter, srcdir_subpath);
return result;
}
@@ -525,7 +525,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, std::stri
// open the output file
core_file *dst = create_file_and_output_header(dstfile, tempheader, srcfile_subpath);
- if (dst == NULL)
+ if (dst == nullptr)
{
fprintf(stderr, "Unable to write file '%s'\n", dstfile.c_str());
core_fclose(src);
@@ -544,7 +544,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, std::stri
int linenum = 1;
bool in_comment = false;
char srcline[4096];
- while (core_fgets(srcline, ARRAY_LENGTH(srcline), src) != NULL)
+ while (core_fgets(srcline, ARRAY_LENGTH(srcline), src) != nullptr)
{
// start with the line number
std::string dstline;
@@ -608,7 +608,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, std::stri
// scan the token table
last_token_was_include = false;
- for (curtoken = token_table; curtoken->token != NULL; curtoken++)
+ for (curtoken = token_table; curtoken->token != nullptr; curtoken++)
if (strncmp(srcptr - 1, curtoken->token, toklength) == 0 && strlen(curtoken->token) == toklength)
{
strcatprintf(dstline, "<span class=\"%s\">%s</span>", curtoken->color, curtoken->token);
@@ -653,7 +653,7 @@ static int output_file(file_type type, int srcrootlen, int dstrootlen, std::stri
if (last_token_was_include)
{
char *endquote = strchr(srcptr, ch);
- if (endquote != NULL)
+ if (endquote != nullptr)
{
std::string filename(srcptr, endquote - srcptr);
std::string target;
@@ -734,7 +734,7 @@ static core_file *create_file_and_output_header(std::string &filename, std::stri
// create the indexfile
core_file *file;
if (core_fopen(filename.c_str(), OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS | OPEN_FLAG_NO_BOM, &file) != FILERR_NONE)
- return NULL;
+ return nullptr;
// print a header
std::string modified(templatefile);
@@ -831,7 +831,7 @@ static void output_path_as_links(core_file *file, std::string &path, bool end_is
static bool find_include_file(std::string &srcincpath, int srcrootlen, int dstrootlen, std::string &srcfile, std::string &dstfile, std::string &filename)
{
// iterate over include paths and find the file
- for (include_path *curpath = incpaths; curpath != NULL; curpath = curpath->next)
+ for (include_path *curpath = incpaths; curpath != nullptr; curpath = curpath->next)
{
// a '.' include path is specially treated
if (curpath->path.compare(".") == 0)
diff --git a/src/tools/srcclean.cpp b/src/tools/srcclean.cpp
index 24db9bca880..0af298a4441 100644
--- a/src/tools/srcclean.cpp
+++ b/src/tools/srcclean.cpp
@@ -39,7 +39,7 @@ static int le_convert(char *buffer, int size)
/* brute force */
*end = 0;
pos = strchr(buffer, 0x0d);
- while (pos != NULL)
+ while (pos != nullptr)
{
memmove(pos, pos+1,end - pos + 1);
size--;
@@ -111,7 +111,7 @@ int main(int argc, char *argv[])
/* read the file */
file = fopen(argv[1], "rb");
- if (file == NULL)
+ if (file == nullptr)
{
fprintf(stderr, "Can't open %s\n", argv[1]);
return 1;
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
fclose(file);
/* check whether we have dos line endings and are in unix mode */
- if (unix_le && (strchr((char *) original, 0x0d) != NULL))
+ if (unix_le && (strchr((char *) original, 0x0d) != nullptr))
fixed_dos_style = 1;
/* determine if we are a C file */
diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp
index 7a245886d6a..13eabe31c59 100644
--- a/src/tools/unidasm.cpp
+++ b/src/tools/unidasm.cpp
@@ -454,7 +454,7 @@ static int parse_options(int argc, char *argv[], options *opts)
}
// filename
- else if (opts->filename == NULL)
+ else if (opts->filename == nullptr)
opts->filename = curarg;
// fail
@@ -467,7 +467,7 @@ static int parse_options(int argc, char *argv[], options *opts)
goto usage;
// if no file or no architecture, fail
- if (opts->filename == NULL || opts->dasm == NULL)
+ if (opts->filename == nullptr || opts->dasm == nullptr)
goto usage;
return 0;
@@ -545,7 +545,7 @@ int main(int argc, char *argv[])
int numchunks;
// disassemble
- pcdelta = (*opts.dasm->func)(NULL, buffer, curpc, oprom, oprom, opts.mode) & DASMFLAG_LENGTHMASK;
+ pcdelta = (*opts.dasm->func)(nullptr, buffer, curpc, oprom, oprom, opts.mode) & DASMFLAG_LENGTHMASK;
if (opts.dasm->pcshift < 0)
numbytes = pcdelta << -opts.dasm->pcshift;