From 68f961927a156c47cb444c1f66258a89342d0205 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 4 Dec 2015 07:02:00 +0100 Subject: [PATCH] clang-modernize part 2 --- src/devices/bus/a1bus/a1bus.cpp | 2 +- src/devices/bus/a1bus/a1cffa.cpp | 2 +- src/devices/bus/a2bus/a2bus.cpp | 6 +- src/devices/bus/a2bus/a2cffa.cpp | 2 +- src/devices/bus/a2bus/a2eauxslot.cpp | 2 +- src/devices/bus/a2bus/a2hsscsi.cpp | 12 +- src/devices/bus/a2bus/a2mcms.cpp | 4 +- src/devices/bus/a2bus/a2pic.cpp | 2 +- src/devices/bus/a2bus/a2scsi.cpp | 12 +- src/devices/bus/a2bus/a2ssc.cpp | 2 +- src/devices/bus/a2bus/a2vulcan.cpp | 2 +- src/devices/bus/a2bus/a2zipdrive.cpp | 2 +- src/devices/bus/a2bus/corvfdc01.cpp | 14 +- src/devices/bus/a2bus/corvfdc02.cpp | 12 +- src/devices/bus/a2bus/mouse.cpp | 4 +- src/devices/bus/a7800/a78_slot.cpp | 8 +- src/devices/bus/a7800/a78_slot.h | 4 +- src/devices/bus/a7800/hiscore.cpp | 2 +- src/devices/bus/a7800/xboard.cpp | 4 +- src/devices/bus/a800/a800_slot.cpp | 8 +- src/devices/bus/a800/a800_slot.h | 4 +- src/devices/bus/a800/a8sio.cpp | 6 +- src/devices/bus/abcbus/abc890.cpp | 80 +++---- src/devices/bus/abcbus/fd2.cpp | 4 +- src/devices/bus/abcbus/hdc.cpp | 2 +- src/devices/bus/abcbus/lux10828.cpp | 4 +- src/devices/bus/abcbus/lux21046.cpp | 6 +- src/devices/bus/abcbus/lux21056.cpp | 2 +- src/devices/bus/abcbus/turbo.cpp | 2 +- src/devices/bus/abckb/abckb.cpp | 4 +- src/devices/bus/adam/exp.cpp | 6 +- src/devices/bus/adam/exp.h | 2 +- src/devices/bus/adam/ide.cpp | 2 +- src/devices/bus/adamnet/adamnet.cpp | 6 +- src/devices/bus/adamnet/fdc.cpp | 4 +- src/devices/bus/adamnet/spi.cpp | 2 +- src/devices/bus/amiga/zorro/a2232.cpp | 14 +- src/devices/bus/amiga/zorro/buddha.cpp | 4 +- src/devices/bus/amiga/zorro/zorro.cpp | 24 +-- src/devices/bus/apf/slot.cpp | 10 +- src/devices/bus/apf/slot.h | 2 +- src/devices/bus/apricot/expansion.cpp | 12 +- src/devices/bus/arcadia/slot.cpp | 10 +- src/devices/bus/arcadia/slot.h | 2 +- src/devices/bus/astrocde/slot.cpp | 10 +- src/devices/bus/astrocde/slot.h | 2 +- src/devices/bus/bml3/bml3bus.cpp | 4 +- src/devices/bus/bml3/bml3mp1802.cpp | 2 +- src/devices/bus/bml3/bml3mp1805.cpp | 4 +- src/devices/bus/bw2/exp.cpp | 14 +- src/devices/bus/c64/16kb.cpp | 4 +- src/devices/bus/c64/bn1541.cpp | 8 +- src/devices/bus/c64/dela_ep256.cpp | 16 +- src/devices/bus/c64/dela_ep64.cpp | 4 +- src/devices/bus/c64/dela_ep7x8.cpp | 14 +- src/devices/bus/c64/dqbb.h | 4 +- src/devices/bus/c64/exp.cpp | 18 +- src/devices/bus/c64/exp.h | 2 +- src/devices/bus/c64/fcc.h | 4 +- src/devices/bus/c64/ide64.cpp | 2 +- src/devices/bus/c64/ieee488.cpp | 2 +- src/devices/bus/c64/neoram.h | 4 +- src/devices/bus/c64/reu.cpp | 2 +- src/devices/bus/c64/rex_ep256.cpp | 16 +- src/devices/bus/c64/swiftlink.cpp | 2 +- src/devices/bus/c64/turbo232.cpp | 2 +- src/devices/bus/cbm2/exp.cpp | 6 +- src/devices/bus/cbm2/exp.h | 2 +- src/devices/bus/cbm2/user.h | 18 +- src/devices/bus/cbmiec/c1541.cpp | 4 +- src/devices/bus/cbmiec/c1571.cpp | 4 +- src/devices/bus/cbmiec/cbmiec.cpp | 12 +- src/devices/bus/cbmiec/interpod.cpp | 2 +- src/devices/bus/centronics/ctronics.cpp | 2 +- src/devices/bus/centronics/epson_lx810l.cpp | 2 +- .../bus/cgenie/expansion/expansion.cpp | 6 +- src/devices/bus/cgenie/expansion/floppy.cpp | 8 +- src/devices/bus/cgenie/parallel/parallel.cpp | 2 +- src/devices/bus/chanf/slot.cpp | 10 +- src/devices/bus/chanf/slot.h | 2 +- src/devices/bus/coco/coco_dwsock.cpp | 14 +- src/devices/bus/coco/coco_fdc.cpp | 6 +- src/devices/bus/coco/coco_multi.cpp | 6 +- src/devices/bus/coco/cococart.cpp | 12 +- src/devices/bus/coco/cococart.h | 2 +- src/devices/bus/coleco/ctrl.h | 2 +- src/devices/bus/coleco/exp.cpp | 10 +- src/devices/bus/coleco/exp.h | 2 +- src/devices/bus/comx35/exp.cpp | 14 +- src/devices/bus/comx35/expbox.cpp | 16 +- src/devices/bus/comx35/fdc.cpp | 6 +- src/devices/bus/cpc/cpc_rom.cpp | 6 +- src/devices/bus/cpc/cpc_rom.h | 4 +- src/devices/bus/cpc/cpc_rs232.cpp | 4 +- src/devices/bus/cpc/cpc_ssa1.cpp | 4 +- src/devices/bus/cpc/ddi1.cpp | 2 +- src/devices/bus/cpc/mface2.cpp | 4 +- src/devices/bus/cpc/playcity.cpp | 2 +- src/devices/bus/cpc/symbfac2.cpp | 2 +- src/devices/bus/crvision/slot.cpp | 10 +- src/devices/bus/crvision/slot.h | 2 +- src/devices/bus/dmv/k210.cpp | 2 +- src/devices/bus/dmv/k801.cpp | 2 +- src/devices/bus/ecbbus/ecbbus.cpp | 10 +- src/devices/bus/ecbbus/grip.cpp | 2 +- src/devices/bus/econet/e01.cpp | 2 +- src/devices/bus/econet/econet.cpp | 6 +- src/devices/bus/ep64/exdos.cpp | 12 +- src/devices/bus/epson_sio/epson_sio.cpp | 4 +- src/devices/bus/epson_sio/pf10.cpp | 4 +- src/devices/bus/epson_sio/tf20.cpp | 6 +- src/devices/bus/gameboy/gb_slot.cpp | 20 +- src/devices/bus/gameboy/gb_slot.h | 2 +- src/devices/bus/gba/gba_slot.cpp | 8 +- src/devices/bus/gba/gba_slot.h | 2 +- src/devices/bus/generic/slot.cpp | 16 +- src/devices/bus/generic/slot.h | 6 +- src/devices/bus/ieee488/c2040fdc.cpp | 4 +- src/devices/bus/ieee488/c8050fdc.cpp | 4 +- src/devices/bus/ieee488/c8280.cpp | 4 +- src/devices/bus/ieee488/ieee488.cpp | 12 +- src/devices/bus/ieee488/shark.cpp | 2 +- src/devices/bus/ieee488/softbox.cpp | 2 +- src/devices/bus/imi7000/imi5000h.cpp | 2 +- src/devices/bus/intv/ecs.cpp | 4 +- src/devices/bus/intv/slot.cpp | 6 +- src/devices/bus/intv/slot.h | 2 +- src/devices/bus/intv/voice.cpp | 2 +- src/devices/bus/iq151/disc2.cpp | 4 +- src/devices/bus/iq151/iq151.cpp | 4 +- src/devices/bus/iq151/iq151.h | 4 +- src/devices/bus/isa/3c505.cpp | 4 +- src/devices/bus/isa/aga.cpp | 4 +- src/devices/bus/isa/cga.cpp | 6 +- src/devices/bus/isa/com.cpp | 4 +- src/devices/bus/isa/ega.cpp | 2 +- src/devices/bus/isa/hdc.cpp | 82 ++++---- src/devices/bus/isa/ide.cpp | 2 +- src/devices/bus/isa/mda.cpp | 4 +- src/devices/bus/isa/mufdc.cpp | 4 +- src/devices/bus/isa/omti8621.cpp | 10 +- src/devices/bus/isa/pc1640_iga.cpp | 2 +- src/devices/bus/isa/pgc.cpp | 2 +- src/devices/bus/isa/s3virge.h | 2 +- src/devices/bus/isa/sblaster.cpp | 4 +- src/devices/bus/isa/sc499.cpp | 10 +- src/devices/bus/isa/sc499.h | 2 +- src/devices/bus/isa/side116.cpp | 2 +- src/devices/bus/isa/xtide.cpp | 2 +- src/devices/bus/isbx/isbx.h | 2 +- src/devices/bus/kc/d002.cpp | 12 +- src/devices/bus/kc/d004.cpp | 6 +- src/devices/bus/kc/kc.cpp | 6 +- src/devices/bus/kc/kc.h | 4 +- src/devices/bus/lpci/i82439tx.cpp | 6 +- src/devices/bus/lpci/pci.cpp | 20 +- src/devices/bus/lpci/southbridge.cpp | 4 +- src/devices/bus/macpds/pds_tpdfpd.cpp | 2 +- src/devices/bus/megadrive/ggenie.cpp | 2 +- src/devices/bus/megadrive/md_slot.cpp | 10 +- src/devices/bus/megadrive/md_slot.h | 2 +- src/devices/bus/megadrive/sk.cpp | 4 +- src/devices/bus/midi/midi.cpp | 2 +- src/devices/bus/msx_cart/ascii.cpp | 18 +- src/devices/bus/msx_cart/crossblaim.cpp | 8 +- src/devices/bus/msx_cart/disk.cpp | 14 +- src/devices/bus/msx_cart/fmpac.cpp | 2 +- src/devices/bus/msx_cart/fs_sr022.cpp | 2 +- src/devices/bus/msx_cart/halnote.cpp | 8 +- src/devices/bus/msx_cart/hfox.cpp | 2 +- src/devices/bus/msx_cart/holy_quran.cpp | 2 +- src/devices/bus/msx_cart/konami.cpp | 22 +- src/devices/bus/msx_cart/korean.cpp | 6 +- src/devices/bus/msx_cart/majutsushi.cpp | 2 +- src/devices/bus/msx_cart/msx_audio.cpp | 6 +- src/devices/bus/msx_cart/msx_audio_kb.cpp | 2 +- src/devices/bus/msx_cart/msxdos2.cpp | 2 +- src/devices/bus/msx_cart/rtype.cpp | 2 +- src/devices/bus/msx_cart/super_swangi.cpp | 2 +- src/devices/bus/msx_cart/superloderunner.cpp | 2 +- src/devices/bus/msx_cart/yamaha.cpp | 2 +- src/devices/bus/msx_slot/bunsetsu.cpp | 8 +- src/devices/bus/msx_slot/cartridge.cpp | 4 +- src/devices/bus/msx_slot/cartridge.h | 2 +- src/devices/bus/msx_slot/disk.cpp | 66 +++--- src/devices/bus/msx_slot/fs4600.cpp | 10 +- src/devices/bus/msx_slot/music.cpp | 8 +- src/devices/bus/msx_slot/panasonic08.cpp | 10 +- src/devices/bus/msx_slot/rom.cpp | 12 +- src/devices/bus/msx_slot/sony08.cpp | 16 +- src/devices/bus/nasbus/floppy.cpp | 10 +- src/devices/bus/nasbus/nasbus.cpp | 12 +- src/devices/bus/neogeo/banked_cart.cpp | 4 +- src/devices/bus/neogeo/bootleg_prot.cpp | 6 +- src/devices/bus/neogeo/cmc_prot.cpp | 18 +- src/devices/bus/neogeo/fatfury2_prot.cpp | 2 +- src/devices/bus/neogeo/neogeo_slot.cpp | 10 +- src/devices/bus/neogeo/neogeo_slot.h | 16 +- src/devices/bus/neogeo/pcm2_prot.cpp | 2 +- src/devices/bus/neogeo/pvc_prot.cpp | 2 +- src/devices/bus/neogeo/sbp_prot.cpp | 2 +- src/devices/bus/neogeo/sma_prot.cpp | 2 +- src/devices/bus/nes/aladdin.cpp | 4 +- src/devices/bus/nes/aladdin.h | 2 +- src/devices/bus/nes/datach.cpp | 2 +- src/devices/bus/nes/datach.h | 2 +- src/devices/bus/nes/disksys.cpp | 2 +- src/devices/bus/nes/ggenie.cpp | 2 +- src/devices/bus/nes/jaleco.cpp | 14 +- src/devices/bus/nes/karastudio.cpp | 2 +- src/devices/bus/nes/karastudio.h | 2 +- src/devices/bus/nes/nes_ines.inc | 4 +- src/devices/bus/nes/nes_pcb.inc | 22 +- src/devices/bus/nes/nes_slot.cpp | 18 +- src/devices/bus/nes/nes_slot.h | 2 +- src/devices/bus/nes/nes_unif.inc | 4 +- src/devices/bus/nes/pt554.cpp | 2 +- src/devices/bus/nes/sunsoft_dcs.cpp | 4 +- src/devices/bus/nes/sunsoft_dcs.h | 2 +- src/devices/bus/nes_ctrl/joypad.cpp | 2 +- src/devices/bus/nubus/nubus_48gc.cpp | 4 +- src/devices/bus/nubus/nubus_image.cpp | 20 +- src/devices/bus/nubus/nubus_m2hires.cpp | 2 +- src/devices/bus/nubus/nubus_m2video.cpp | 2 +- src/devices/bus/nubus/nubus_radiustpd.cpp | 2 +- src/devices/bus/nubus/nubus_spec8.cpp | 2 +- src/devices/bus/nubus/nubus_specpdq.cpp | 2 +- src/devices/bus/nubus/nubus_wsportrait.cpp | 2 +- src/devices/bus/nubus/pds30_30hr.cpp | 2 +- src/devices/bus/nubus/pds30_cb264.cpp | 2 +- src/devices/bus/nubus/pds30_mc30.cpp | 2 +- src/devices/bus/nubus/pds30_procolor816.cpp | 2 +- src/devices/bus/nubus/pds30_sigmalview.cpp | 2 +- src/devices/bus/odyssey2/slot.cpp | 10 +- src/devices/bus/odyssey2/slot.h | 2 +- src/devices/bus/odyssey2/voice.cpp | 2 +- src/devices/bus/oricext/jasmin.cpp | 12 +- src/devices/bus/oricext/microdisc.cpp | 6 +- src/devices/bus/oricext/oricext.cpp | 2 +- src/devices/bus/pc_joy/pc_joy_sw.cpp | 2 +- src/devices/bus/pc_kbd/pc_kbdc.cpp | 6 +- src/devices/bus/pce/pce_slot.cpp | 12 +- src/devices/bus/pce/pce_slot.h | 2 +- src/devices/bus/pet/cass.cpp | 8 +- src/devices/bus/pet/exp.cpp | 6 +- src/devices/bus/pet/superpet.cpp | 2 +- src/devices/bus/pet/user.cpp | 40 ++-- src/devices/bus/plus4/exp.cpp | 6 +- src/devices/bus/plus4/exp.h | 2 +- src/devices/bus/plus4/sid.cpp | 2 +- src/devices/bus/psx/memcard.h | 2 +- src/devices/bus/psx/multitap.cpp | 6 +- src/devices/bus/ql/cst_q_plus4.cpp | 8 +- src/devices/bus/ql/qubide.cpp | 2 +- src/devices/bus/ql/rom.cpp | 2 +- src/devices/bus/ql/rom.h | 2 +- src/devices/bus/ql/sandy_superdisk.cpp | 6 +- src/devices/bus/ql/sandy_superqboard.cpp | 6 +- src/devices/bus/ql/trumpcard.cpp | 6 +- src/devices/bus/rs232/null_modem.cpp | 2 +- src/devices/bus/rs232/pty.cpp | 2 +- src/devices/bus/rs232/rs232.cpp | 4 +- src/devices/bus/s100/dj2db.cpp | 10 +- src/devices/bus/s100/wunderbus.cpp | 4 +- src/devices/bus/saturn/sat_slot.cpp | 10 +- src/devices/bus/saturn/sat_slot.h | 2 +- src/devices/bus/scsi/scsi.cpp | 38 ++-- src/devices/bus/scsi/scsihle.cpp | 10 +- src/devices/bus/scv/slot.cpp | 12 +- src/devices/bus/scv/slot.h | 2 +- src/devices/bus/sega8/ccatch.cpp | 2 +- src/devices/bus/sega8/mgear.cpp | 2 +- src/devices/bus/sega8/sega8_slot.cpp | 16 +- src/devices/bus/sega8/sega8_slot.h | 2 +- src/devices/bus/sms_exp/gender.cpp | 2 +- src/devices/bus/snes/bsx.cpp | 2 +- src/devices/bus/snes/sgb.cpp | 2 +- src/devices/bus/snes/snes_slot.cpp | 22 +- src/devices/bus/snes/snes_slot.h | 2 +- src/devices/bus/snes/sufami.cpp | 4 +- src/devices/bus/ti99_peb/bwg.cpp | 32 +-- src/devices/bus/ti99_peb/hfdc.cpp | 50 ++--- src/devices/bus/ti99_peb/horizon.cpp | 4 +- src/devices/bus/ti99_peb/memex.cpp | 2 +- src/devices/bus/ti99_peb/myarcmem.cpp | 2 +- src/devices/bus/ti99_peb/peribox.cpp | 28 +-- src/devices/bus/ti99_peb/samsmem.cpp | 2 +- src/devices/bus/ti99_peb/ti_32kmem.cpp | 2 +- src/devices/bus/ti99_peb/ti_fdc.cpp | 16 +- src/devices/bus/ti99_peb/ti_rs232.cpp | 8 +- src/devices/bus/ti99_peb/ti_rs232.h | 4 +- src/devices/bus/ti99_peb/tn_ide.cpp | 4 +- src/devices/bus/ti99x/990_hd.cpp | 10 +- src/devices/bus/ti99x/990_tap.cpp | 4 +- src/devices/bus/ti99x/998board.cpp | 28 +-- src/devices/bus/ti99x/datamux.cpp | 20 +- src/devices/bus/ti99x/genboard.cpp | 2 +- src/devices/bus/ti99x/grom.cpp | 2 +- src/devices/bus/ti99x/gromport.cpp | 198 +++++++++--------- src/devices/bus/ti99x/gromport.h | 12 +- src/devices/bus/tvc/hbf.cpp | 2 +- src/devices/bus/vboy/slot.cpp | 12 +- src/devices/bus/vboy/slot.h | 2 +- src/devices/bus/vc4000/slot.cpp | 10 +- src/devices/bus/vc4000/slot.h | 2 +- src/devices/bus/vcs/vcs_slot.cpp | 10 +- src/devices/bus/vcs/vcs_slot.h | 2 +- src/devices/bus/vcs_ctrl/ctrl.h | 2 +- src/devices/bus/vectrex/slot.cpp | 8 +- src/devices/bus/vectrex/slot.h | 2 +- src/devices/bus/vic10/exp.cpp | 14 +- src/devices/bus/vic10/exp.h | 2 +- src/devices/bus/vic20/exp.cpp | 6 +- src/devices/bus/vic20/exp.h | 2 +- src/devices/bus/vic20/std.cpp | 8 +- src/devices/bus/vic20/vic1011.cpp | 2 +- src/devices/bus/vic20/vic1112.cpp | 2 +- src/devices/bus/vidbrain/exp.cpp | 6 +- src/devices/bus/vidbrain/exp.h | 2 +- src/devices/bus/vip/byteio.cpp | 10 +- src/devices/bus/vip/exp.cpp | 26 +-- src/devices/bus/vip/vp575.cpp | 10 +- src/devices/bus/vtech/ioexp/ioexp.cpp | 4 +- src/devices/bus/vtech/memexp/floppy.cpp | 4 +- src/devices/bus/vtech/memexp/memexp.cpp | 6 +- src/devices/bus/vtech/memexp/rs232.cpp | 2 +- src/devices/bus/wangpc/rtc.cpp | 2 +- src/devices/bus/wswan/slot.cpp | 10 +- src/devices/bus/wswan/slot.h | 2 +- src/devices/bus/z88/z88.cpp | 4 +- src/devices/bus/z88/z88.h | 4 +- 331 files changed, 1224 insertions(+), 1224 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; 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..eec06d8bdb8 100644 --- a/src/devices/bus/a2bus/a2bus.cpp +++ b/src/devices/bus/a2bus/a2bus.cpp @@ -170,7 +170,7 @@ void a2bus_device::device_start() // clear slots for (int i = 0; i < 8; i++) { - m_device_list[i] = NULL; + m_device_list[i] = 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; #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..93a62a6d03d 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)); 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; #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; #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..78c4cece478 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; 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; @@ -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..973be0eb899 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; 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; @@ -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; //------------------------------------------------- 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..60f5b96ac53 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)) 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; //------------------------------------------------- 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(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(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..4a89673a9d0 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; 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; @@ -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; 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; @@ -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..74071506c90 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_creatorbase(); m_rom_size = size; @@ -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..b06ac50e5d2 100644 --- a/src/devices/bus/bml3/bml3bus.cpp +++ b/src/devices/bus/bml3/bml3bus.cpp @@ -141,7 +141,7 @@ void bml3bus_device::device_start() // clear slots for (int i = 0; i < BML3BUS_MAX_SLOTS; i++) { - m_device_list[i] = NULL; + m_device_list[i] = 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; //------------------------------------------------- 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_creatorm_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; 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_creatorcbm2_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 static devcb_base &set_flag_wr_callback(device_t &device, _Object object) { return downcast(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..bcfc9318860 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_TAG); - if (bus != NULL) break; + if (bus != nullptr) break; } assert(bus); @@ -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,9 +353,9 @@ 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++) { 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(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(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..ad6eae7bde8 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; 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; @@ -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(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..be5bc3bee73 100644 --- a/src/devices/bus/comx35/expbox.cpp +++ b/src/devices/bus/comx35/expbox.cpp @@ -164,7 +164,7 @@ void comx_eb_device::device_reset() { 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]->device().reset(); m_expansion_slot[slot]->ds_w(0); @@ -183,7 +183,7 @@ int comx_eb_device::comx_ef4_r() for (int slot = 0; slot < MAX_EB_SLOTS; slot++) { - if (m_expansion_slot[slot] != NULL) + if (m_expansion_slot[slot] != nullptr) { state |= m_expansion_slot[slot]->ef4_r(); } @@ -201,7 +201,7 @@ void comx_eb_device::comx_q_w(int state) { 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]->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; 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; // 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..df7caa51f95 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_creatorbase(); m_rom_size = size; @@ -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(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..100af329b10 100644 --- a/src/devices/bus/ecbbus/ecbbus.cpp +++ b/src/devices/bus/ecbbus/ecbbus.cpp @@ -96,7 +96,7 @@ ecbbus_device::ecbbus_device(const machine_config &mconfig, const char *tag, dev m_write_nmi(*this) { for (int i = 0; i < MAX_ECBBUS_SLOTS; i++) - m_ecbbus_device[i] = NULL; + m_ecbbus_device[i] = nullptr; } @@ -132,7 +132,7 @@ READ8_MEMBER( ecbbus_device::mem_r ) for (int i = 0; i < MAX_ECBBUS_SLOTS; i++) { - if (m_ecbbus_device[i] != NULL) + if (m_ecbbus_device[i] != nullptr) { data |= m_ecbbus_device[i]->ecbbus_mem_r(offset); } @@ -150,7 +150,7 @@ WRITE8_MEMBER( ecbbus_device::mem_w ) { for (int i = 0; i < MAX_ECBBUS_SLOTS; i++) { - if (m_ecbbus_device[i] != NULL) + if (m_ecbbus_device[i] != nullptr) { m_ecbbus_device[i]->ecbbus_mem_w(offset, data); } @@ -168,7 +168,7 @@ READ8_MEMBER( ecbbus_device::io_r ) for (int i = 0; i < MAX_ECBBUS_SLOTS; i++) { - if (m_ecbbus_device[i] != NULL) + if (m_ecbbus_device[i] != nullptr) { data |= m_ecbbus_device[i]->ecbbus_io_r(offset); } @@ -186,7 +186,7 @@ WRITE8_MEMBER( ecbbus_device::io_w ) { for (int i = 0; i < MAX_ECBBUS_SLOTS; i++) { - if (m_ecbbus_device[i] != NULL) + if (m_ecbbus_device[i] != nullptr) { m_ecbbus_device[i]->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..f1a2ff110e0 100644 --- a/src/devices/bus/econet/econet.cpp +++ b/src/devices/bus/econet/econet.cpp @@ -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,9 +247,9 @@ 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++) { 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("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("5a:0")->get_device(); m_fd1 = subdevice("5a:1")->get_device(); diff --git a/src/devices/bus/gameboy/gb_slot.cpp b/src/devices/bus/gameboy/gb_slot.cpp index a1f92b31bcd..19ddda4601b 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_creatorbase(); m_rom_size = size; @@ -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..2618b7ad09f 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; 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(); @@ -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); 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; 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..c217407d49e 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_TAG); - if (bus != NULL) break; + if (bus != nullptr) break; } assert(bus); @@ -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,9 +167,9 @@ 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++) 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..342a40964f4 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; 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); @@ -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..3c1cd22cab7 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; } 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(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_DISK0_TAG); our_disks[1] = subdevice(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; //------------------------------------------------- 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..7abf3aa6b47 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)) 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(get_card_device()); - m_next_slot = m_next_slot_tag ? owner()->subdevice(m_next_slot_tag) : NULL; + m_next_slot = m_next_slot_tag ? owner()->subdevice(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(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..90e13e9eb22 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(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; + m_devtag[i]= 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(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(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..45fc6b75030 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; 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; @@ -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..07da54de8b7 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; } } @@ -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; } } @@ -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) { @@ -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) { @@ -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; } } diff --git a/src/devices/bus/msx_cart/crossblaim.cpp b/src/devices/bus/msx_cart/crossblaim.cpp index 2b2edece1f3..24116832469 100644 --- a/src/devices/bus/msx_cart/crossblaim.cpp +++ b/src/devices/bus/msx_cart/crossblaim.cpp @@ -13,7 +13,7 @@ msx_cart_crossblaim::msx_cart_crossblaim(const machine_config &mconfig, const ch { for (int i = 0; i < 4; i++) { - m_bank_base[i] = NULL; + m_bank_base[i] = 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(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..63b298e67b0 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; } } } @@ -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..fbb7068da02 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: diff --git a/src/devices/bus/msx_cart/konami.cpp b/src/devices/bus/msx_cart/konami.cpp index c0beb8da357..ee0abcda095 100644 --- a/src/devices/bus/msx_cart/konami.cpp +++ b/src/devices/bus/msx_cart/konami.cpp @@ -23,7 +23,7 @@ msx_cart_konami::msx_cart_konami(const machine_config &mconfig, const char *tag, } for (int i = 0; i < 8; i++) { - m_bank_base[i] = NULL; + m_bank_base[i] = nullptr; } } @@ -132,7 +132,7 @@ msx_cart_konami_scc::msx_cart_konami_scc(const machine_config &mconfig, const ch } for (int i = 0; i < 8; i++) { - m_bank_base[i] = NULL; + m_bank_base[i] = nullptr; } } @@ -305,7 +305,7 @@ msx_cart_gamemaster2::msx_cart_gamemaster2(const machine_config &mconfig, const } for (int i = 0; i < 8; i++) { - m_bank_base[i] = NULL; + m_bank_base[i] = 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") { } @@ -539,11 +539,11 @@ msx_cart_konami_sound::msx_cart_konami_sound(const machine_config &mconfig, devi } for (int i = 0; i < 8; i++) { - m_bank_base[i] = NULL; + m_bank_base[i] = nullptr; } for (int i = 0; i < 16; i++) { - m_ram_bank[i] = NULL; + m_ram_bank[i] = nullptr; } for (int i = 0; i < 4; i++) { @@ -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..0fb2e1bb6b4 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; } } @@ -109,7 +109,7 @@ msx_cart_korean_90in1::msx_cart_korean_90in1(const machine_config &mconfig, cons { for (int i = 0; i < 4; i++) { - m_bank_base[i] = NULL; + m_bank_base[i] = 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..eca7aa44f6c 100644 --- a/src/devices/bus/msx_cart/majutsushi.cpp +++ b/src/devices/bus/msx_cart/majutsushi.cpp @@ -17,7 +17,7 @@ msx_cart_majutsushi::msx_cart_majutsushi(const machine_config &mconfig, const ch } for (int i = 0; i < 8; i++) { - m_bank_base[i] = NULL; + m_bank_base[i] = 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_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..22e4e6c11ec 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) { } 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_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(m_floppy0_tag) : NULL; - m_floppy1 = m_floppy1_tag ? owner()->subdevice(m_floppy1_tag) : NULL; - m_floppy2 = m_floppy2_tag ? owner()->subdevice(m_floppy2_tag) : NULL; - m_floppy3 = m_floppy3_tag ? owner()->subdevice(m_floppy3_tag) : NULL; + m_floppy0 = m_floppy0_tag ? owner()->subdevice(m_floppy0_tag) : nullptr; + m_floppy1 = m_floppy1_tag ? owner()->subdevice(m_floppy1_tag) : nullptr; + m_floppy2 = m_floppy2_tag ? owner()->subdevice(m_floppy2_tag) : nullptr; + m_floppy3 = m_floppy3_tag ? owner()->subdevice(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(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(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(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(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(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(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(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 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(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(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 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(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(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(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(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/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..fdaceb3c1ba 100644 --- a/src/devices/bus/nes/nes_pcb.inc +++ b/src/devices/bus/nes/nes_pcb.inc @@ -330,7 +330,7 @@ static const nes_pcb *nes_pcb_lookup( const char *slot ) if (!core_stricmp(pcb_list[i].slot_opt, slot)) return &pcb_list[i]; } - return NULL; + return nullptr; } static const nes_pcb *nes_id_lookup( int id ) @@ -340,14 +340,14 @@ static const nes_pcb *nes_id_lookup( int id ) if (pcb_list[i].pcb_id == id) return &pcb_list[i]; } - 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; 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..69473618b04 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; 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; @@ -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..fb145d1a6a6 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; 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; @@ -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; 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(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_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..733c8258ea0 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; 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; @@ -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..a1be24b7f2e 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; 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; @@ -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/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..5f439459bfc 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; 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; @@ -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/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..0f5f338bda0 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); @@ -548,7 +548,7 @@ void snug_bwg_device::set_floppy_motors_running(bool run) // Set all motors for (int i=0; i < 4; i++) - if (m_floppy[i] != NULL) m_floppy[i]->mon_w((run)? 0 : 1); + if (m_floppy[i] != nullptr) m_floppy[i]->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); @@ -622,13 +622,13 @@ void snug_bwg_device::device_reset() void snug_bwg_device::device_config_complete() { for (int i=0; i < 4; i++) - m_floppy[i] = NULL; + m_floppy[i] = nullptr; // Seems to be null when doing a "-listslots" - if (subdevice("0")!=NULL) m_floppy[0] = static_cast(subdevice("0")->first_subdevice()); - if (subdevice("1")!=NULL) m_floppy[1] = static_cast(subdevice("1")->first_subdevice()); - if (subdevice("2")!=NULL) m_floppy[2] = static_cast(subdevice("2")->first_subdevice()); - if (subdevice("3")!=NULL) m_floppy[3] = static_cast(subdevice("3")->first_subdevice()); + if (subdevice("0")!=nullptr) m_floppy[0] = static_cast(subdevice("0")->first_subdevice()); + if (subdevice("1")!=nullptr) m_floppy[1] = static_cast(subdevice("1")->first_subdevice()); + if (subdevice("2")!=nullptr) m_floppy[2] = static_cast(subdevice("2")->first_subdevice()); + if (subdevice("3")!=nullptr) m_floppy[3] = static_cast(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..e1def78eedb 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; } } @@ -803,7 +803,7 @@ 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); + if (m_floppy_unit[i] != nullptr) m_floppy_unit[i]->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(subdevice("f1"))->get_device(); m_floppy_unit[1] = static_cast(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..21ddf1a860a 100644 --- a/src/devices/bus/ti99_peb/memex.cpp +++ b/src/devices/bus/ti99_peb/memex.cpp @@ -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/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(owner()); - if (carddev != NULL) + if (carddev != nullptr) { peb->set_slot_loaded(m_slotnumber, this); m_card = static_cast(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..aeb39aa92af 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() 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..c595bcea1e8 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: @@ -334,7 +334,7 @@ void ti_fdc_device::set_floppy_motors_running(bool run) // Set all motors for (int i=0; i < 3; i++) - if (m_floppy[i] != NULL) m_floppy[i]->mon_w((run)? 0 : 1); + if (m_floppy[i] != nullptr) m_floppy[i]->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(subdevice("0")->first_subdevice()); - if (subdevice("1")!=NULL) m_floppy[1] = static_cast(subdevice("1")->first_subdevice()); - if (subdevice("2")!=NULL) m_floppy[2] = static_cast(subdevice("2")->first_subdevice()); + if (subdevice("0")!=nullptr) m_floppy[0] = static_cast(subdevice("0")->first_subdevice()); + if (subdevice("1")!=nullptr) m_floppy[1] = static_cast(subdevice("1")->first_subdevice()); + if (subdevice("2")!=nullptr) m_floppy[2] = static_cast(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(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_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; im_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); } 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..692dd15d483 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 ) 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(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..c6b9245a03f 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; 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); } @@ -492,7 +492,7 @@ WRITE8_MEMBER(multi_conn_device::write) { for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++) { - if (m_cartridge[i] != NULL) + if (m_cartridge[i] != nullptr) { m_cartridge[i]->write(space, offset, data, mem_mask); } @@ -500,7 +500,7 @@ WRITE8_MEMBER(multi_conn_device::write) } 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); } @@ -541,7 +541,7 @@ void multi_conn_device::device_start() m_active_slot = 0; for (int i=0; i < NUMBER_OF_CARTRIDGE_SLOTS; i++) { - m_cartridge[i] = NULL; + m_cartridge[i] = 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 ) @@ -1476,7 +1476,7 @@ READ8Z_MEMBER(ti99_cartridge_pcb::gromreadz) { for (int i=0; i < 5; i++) { - if (m_grom[i] != NULL) + if (m_grom[i] != nullptr) { m_grom[i]->readz(space, offset, value, mem_mask); } @@ -1487,7 +1487,7 @@ WRITE8_MEMBER(ti99_cartridge_pcb::gromwrite) { for (int i=0; i < 5; i++) { - if (m_grom[i] != NULL) + if (m_grom[i] != nullptr) { m_grom[i]->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, " must have a 'file' attribute"); + file = xml_get_attribute_string(rom_resource_node, "file", nullptr); + if (file == nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, " 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, " 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 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 "); + if (romset_node==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, "document element must be "); // 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, " must have a child"); + if (resources_node==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, " must have a 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, " must have a child"); + if (configuration_node==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, " must have a 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, " must have a child"); + if (pcb_node==nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, " must have a 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, " 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, " 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, " element has only children"); - id = xml_get_attribute_string(socket_node, "id", NULL); - if (id == NULL) throw rpk_exception(RPK_INVALID_LAYOUT, " must have an 'id' attribute"); + id = xml_get_attribute_string(socket_node, "id", nullptr); + if (id == nullptr) throw rpk_exception(RPK_INVALID_LAYOUT, " 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, " 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("fdc:0")->get_device(); if (BIT(data, 1)) floppy = subdevice("fdc:1")->get_device(); diff --git a/src/devices/bus/vboy/slot.cpp b/src/devices/bus/vboy/slot.cpp index 87e0130deda..863a0ff9ad0 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; 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; @@ -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..a7c8fc23ec4 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; 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; @@ -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/vcs_slot.cpp b/src/devices/bus/vcs/vcs_slot.cpp index 0295c0d7d7d..1b12824f6ab 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; 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; @@ -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 { 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..fb9e9577ddd 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; 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; @@ -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/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; //------------------------------------------------- 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..9037498a664 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)) 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(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(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..7547be9357d 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; 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; @@ -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);